Common use of Operational Semantics Clause in Contracts

Operational Semantics. ‌ The introduction of the import construct leads to an under-specification of the program: only the names and the types of the imported classes are given but not the code. The consequence is that the semantics definition of a component now consists of two parts. The first part, called internal semantics, deals with internal computations only, i.e., computations which are completely independent of the imported classes but solely determined by the program’s code. This part is given in form of a transition semantics which is almost identical to the one already given in Table 2.7. We only add a premise in rule Call and in rule New which ensures that the called method or constructor, respectively, indeed belongs to a class of the given program code. As for rule New, this additional check is very simple, since the class name itself is part of the new statement. As for the method call, we have to find out, if the callee object, named o, is an instance of a program class. We will see later, however, that the heap function stores information about objects of program classes, only. Therefore, the check can be easily realized by adding the premise o ∈ dom(h).3

Appears in 2 contracts

Sources: License Agreement Concerning Inclusion of Doctoral Thesis in the Institutional Repository of the University of Leiden, License Agreement Concerning Inclusion of Doctoral Thesis in the Institutional Repository of the University of Leiden

Operational Semantics. The introduction of the import construct leads to an under-specification of the program: only the names and the types of the imported classes are given but not the code. The consequence is that the semantics definition of a component now consists of two parts. The first part, called internal semantics, deals with internal computations only, i.e., computations which are completely independent of the imported classes but solely determined by the program’s code. This part is given in form of a transition semantics which is almost identical to the one already given in Table 2.7. We only add a premise in rule Call and in rule New which ensures that the called method or constructor, respectively, indeed belongs to a class of the given program code. As for rule New, this additional check is very simple, since the class name itself is part of the new statement. As for the method call, we have to find out, if the callee object, named o, is an instance of a program class. We will see later, however, that the heap function stores information about objects of program classes, only. Therefore, the check can be easily realized by adding the premise o ∈ dom(h).3

Appears in 1 contract

Sources: License Agreement