Syntax. The extension of the syntax is very simple and straightforward, as can be seen in Table 2.8. We merely add a construct for declaring imported classes which intro- duces the name of the class only. For the sake of simplicity we do not introduce name spaces, but instead we assume that the names of all imported and all locally defined classes are different. The grammar introduces a new non-terminal symbol pj which replaces p of the former grammar. An element of pj is called a compo- nent. Thus, the program does not only import classes of other components but it constitutes a component itself. In particular, all components contain a main body. This is again due to simplicity, because otherwise we would have to differentiate components and programs (and in this case only component classes could be im- ported but a component could not import a program class). However, we will see in the operational semantics that only the main body of one single component is in execution.2 In the following we will use the word program in order to refer to the component whose code is given and processed in the operational semantics. Note 2Assuming that each component provides its own main body is comparable to the widely used technique to equip a Java package with a static main method allowing for the stand-alone execution of the package due to testing or demonstration purposes. import D; class C1 { C1() { stmt; return } D(int x) { D y; stmt; return y }
Appears in 1 contract
Syntax. The extension of the syntax is very simple and straightforward, as can be seen in Table 2.8. We merely add a construct for declaring imported classes which intro- duces the name of the class only. For the sake of simplicity we do not introduce name spaces, but instead we assume that the names of all imported and all locally defined classes are different. The grammar introduces a new non-terminal symbol pj p′ which replaces p of the former grammar. An element of pj p′ is called a compo- nent. Thus, the program does not only import classes of other components but it constitutes a component itself. In particular, all components contain a main body. This is again due to simplicity, because otherwise we would have to differentiate components and programs (and in this case only component classes could be im- ported but a component could not import a program class). However, we will see in the operational semantics that only the main body of one single component is in execution.2 In the following we will use the word program in order to refer to the component whose code is given and processed in the operational semantics. Note 2Assuming that each component provides its own main body is comparable to the widely used technique to equip a Java package with a static main method allowing for the stand-alone execution of the package due to testing or demonstration purposes. import D; class C1 { C1() { stmt; return } D(int x) { D y; stmt; return y }
Appears in 1 contract
Syntax. The extension of the syntax is very simple and straightforward, as can be seen in Table 2.8. We merely add a construct for declaring imported classes which intro- duces the name of the class only. For the sake of simplicity we do not introduce name spaces, but instead we assume that the names of all imported and all locally defined classes are different. The grammar introduces a new non-terminal symbol pj p′ which replaces p of the former grammar. An element of pj p′ is called a compo- nent. Thus, the program does not only import classes of other components but it constitutes a component itself. In particular, all components contain a main body. This is again due to simplicity, because otherwise we would have to differentiate components and programs (and in this case only component classes could be im- ported but a component could not import a program class). However, we will see in the operational semantics that only the main body of one single component is in execution.2 In the following we will use the word program in order to refer to the component whose code is given and processed in the operational semantics. Note 2Assuming that each component provides its own main body is comparable to the widely used technique to equip a Java package with a static main method allowing for the stand-alone execution of the package due to testing or demonstration purposes. import D; class C1 { C1() { stmt; return } D(int x) { D y; stmt; return y }
Appears in 1 contract
Sources: License Agreement