Next: 2.4 A Semantic Space
Up: 2 Position
Previous: 2.2 Significance for Component-Based
Figure 1 can be interpreted as arising from the scientist's view of the world, as opposed to the engineer's view [Cha97]. That is, the scientist faces this situation: ``I need to explain this artifact or phenomenon ...'' The scientist's attack is to build a mathematical model of the artifact or phenomenon in question. For software the result of this activity is denoted in Figure 1 by , but entirely parallel diagrams arise for other sets of physical artifacts and/or phenomena and their associated model spaces. The engineer faces a slightly different situation: ``I need some artifact or phenomenon such that ...'' The engineer's task is not so much to model something which exists and needs to be explained -- though that is certainly part of it -- but something which ought to exist. Possibly many particular implementations can satisfy the engineer's specifications.
Figure 3 illustrates how we may use this observation to view the semantics of specifications. The meaning of a specification is the set of behaviors that we wish to allow as those of conforming implementations. Indeed this directly becomes the definition of the implements relation:
(1) |
Similarly, it leads directly to the definition of the extends relation:
(2) |
Here is how this approach might pan out for a software example. Suppose operational program component C is a procedure (with possibly relational, i.e., non-deterministic behavior) and specification S is a procedure specification given by a precondition and a postcondition. We might consider a point in to be a binary relation on a state space (i.e., a set of ordered pairs from ), where is in iff C is permitted to start with its environment in state and, when doing so, might change its environment to state . The precondition and postcondition from S also define a binary relation on , where the precondition says where is defined and the postcondition defines it there. We would define as the set of binary relations on which are at least as defined as and which are consistent with it where both are defined.
Notice that this framework lets us consider the meanings of specifications for systems other than programs. For example, Figure 3 and the definitions of implements and extends make sense even if is the set of possible cars or TV sets (or even mere descriptions thereof), is the set of possible behaviors of cars or TV sets, and is the set of instruction manuals for cars or TV sets, respectively.
Our suggested semantic space for specifications might seem so simple as to be obvious or trivial. But the apparent simplicity is deceiving. In fact, we do not know of any other work that addresses the question of how to define the semantics of specifications in a domain-independent way. Even limiting the focus to software specifications, we have seen little previous work on the question of tying specifications' formal semantics to those of operational program components. Stand-alone specification languages such as Larch and have formal semantics, but in them a specification such as S above apparently would denote the single relation -- which is in , not in as in our framework. RESOLVE semantics are based on the ACTI formal model of component-based software [Edw95], which defines semantic spaces for several kinds of software components. Among these are operational software components (``concrete instances'', tantamount to ) and specifications (``abstract instances'', tantamount to ) for modules exporting types and/or operations. The ACTI semantic space for abstract instances is, however, essentially structurally identical to that for concrete instances. What we propose here is different. It is a general construction where the semantic space for specifications is a higher-order space, obtained directly and mechanically from , which is unrelated to the internal structure of .
David S. Gibson and Bruce W. Weide