This is an archive of an inactive wiki and cannot be modified.

Abstract Syntax

RIF uses the term Abstract Syntax to denote a representation of a language that omits semantically irrelevant features (such as lexical separators, semantically unimportant ordering and bracketing, and choice of infix v. prefix notations). The aim being to describe the essence of the RIF syntax in this abstract form and to transform this to various concrete syntax forms (including an XML syntax and a linear presentation syntax).

This usage of the term is common in complier design where an Abstract Syntax Tree is a parse tree which omits nodes and edges for rules that do not affect program semantics.

The term is also used in the same spirit in communication protocol design where ASN.1 provides a notation that separates the Abstract Syntax for data from the encoding rules which can be used to transmit the data on a particular channel.

C.f. Meta-model

Meta-models (see Meta-model) describe the structure of models and so are closely related to the notion of an Abstract Syntax. Indeed in RIF we provide a visualization of our Abstract Syntax using UML notation.

However, not all meta-models need correspond to a useful Abstract Syntax. For example, in RIF we (may) want to separate the notion of declaring a constant (e.g. providing an arrow sort for a function) from the usage of that constant. In meta-modelling these two concepts would typically be collapsed - one would just say that a constant has an associated sort without saying how that sort gets defined. However, such a metamodel would no longer be isomorphic to the intended XML syntax and it would be harder to automatically derive the concrete XML syntax from it.

Relevance

RIF will use an Abstract Syntax as the means for describing the RIF syntax and will automatically generate concrete XML and presentation syntax forms from this. There has been no decision on which of these is normative, this is simply a decision on how to maintain the design information.

For more information

See asn06 for a proposed representation for RIF Abstract Syntax.

See Sandro mail for preliminary discussion on transforming asn06 to XML.

See Gerd mail for suggestion of an alternative langauge (km3) for abstract syntax expression.