Information Technology Reference
In-Depth Information
returns the name of an entity. A query context feature links an entity to the feature in
which the entity is declared. A literal is a character sequence that represents a con-
stant value. As such, literals count as manifest expressions - programming constructs
whose values can be deduced by the compiler statically. Literals are instances of an
ADT LITERAL . This ADT has instances for booleans, integers, characters, and the
void literal. Each literal except the void literal can be translated into an object with the
query obj . This object matches the literal in both type and value. The following notation
describes instances of EXPRESSION :
e w | b | e . f ( e ,..., e )
Here, w is an element of LITERAL , b is an instance of ENTITY ,and f is an instance
of FEATURE . For instructions, there is an ADT INSTRUCTION andanADTfor
each kind of instruction. The following notation describes such instances:
h b :
=
e
|
) |
create b . f ( e ,..., e ) |
if e then [ s { ; s }∗ ] else [ s { ; s }∗ ] end |
until e loop [ s { ; s }∗ ] end
Here, s stands either for an instance of INSTRUCTION or an operation. Instructions
are actions that occur in the intermediate representation (user syntax). Operations are
actions that do not explicitly occur in the intermediate representation (run-time syntax).
This work builds on an existing type system formalization. It assumes the existence
of a typing environment that can be queried for type information.
e
.
f
(
e
,...,
e
4
State Formalization
This section provides a formalization of the state of a SCOOP program. This is neces-
sary to describe the effect of SCOOP constructs on the state. The discussion starts with
the general approach and continues with the description of the state.
4.1
General Approach
This work considers the state of a SCOOP program to be a data structure that can be
created, modified, and queried through features. For the specification of the state, this
work uses Liskov's ADT theory [18]. The discussion begins with a justification and the
consequences of this choice. The discussion finishes with an explanation on how to get
types for elements in the intermediate representation.
Abstract data types. Meyer's work on a three-level approach to the description of
data structure [20] defines three levels on which a data structure can be described: func-
tional, constructive, and physical. The functional specification is an algebraic approach
that uses an implicit characterization of the data structure. The constructive specifica-
tion provides a means to construct instances of the data structure. The instances con-
structed like this are mathematical entities. A physical description describes the layout
 
Search WWH ::




Custom Search