next up previous
Next: 1.3.2 Examples of SDF Up: 1.3 Action semantics and Previous: 1.3 Action semantics and

1.3.1 The scheme of adding SDF to action semantics

The approach to the separation is by using the Syntax Definition Formalism (SDF) and view the language descriptions at a higher level. This higher level is relative to the view-point of programmers or language description authors, not to that of action semantics researchers. This is because the researchers are already at a higher level, where the language description is a concrete model of the action semantics formalism.

Figure 1: Adding one level to original syntax definition of action semantics
Image 601-1

Figure 1 shows the possible three levels in the improved action semantics. The two levels which are labelled ``Language'' and ``Action Semantics'' on the upper part of the figure belong to the original action semantics. According to a certain language description (so-called ``Language a'' in the figure), a programmer can write a concrete program, i.e. ``Program a''. Because both the syntax and semantics of the language specification are rigorously defined, the programmer can test it in the implementation phase. $100\%$ code generation from the implementation is also possible.

``Language a'' itself, however, is specified in the formalism of action semantics, where it is nothing but a concrete model or an example. It is written in an action-semantics-specific format; and since action semantics is rigorously defined (both syntactically and semantically), the language description is rigorously defined, from which a compiler can be automatically generated.

As discussed above, this scheme has a drawback: language-specific symbols are embedded in the language description, limiting aspect2 reusability among different languages. The solution is found by adding a level between language description and action semantics - syntax definition.

In the new proposal [Mos02], a program is described according to a specific language, the language is described according to the syntax definition formalism (combined with action semantics3), and syntax definition is described in underlying semantics. The border between levels is unimportant and obscure in nature, but the concept is clear and powerful. This scheme is shown in the lower part of Figure 1.


next up previous
Next: 1.3.2 Examples of SDF Up: 1.3 Action semantics and Previous: 1.3 Action semantics and
Thomas Feng 2003-04-18