Foundations of Tree- and Graph-Based Abstract Syntax
A software language can be regarded as a set of structured elements with some associated meaning. A language’s syntax defines its elements and their structure. We may speak of string, tree, and graph languages – to convey the nature of the elements’ structure. One may distinguish two forms of syntax: concrete versus abstract syntax. The former is tailored towards processing (reading, writing, editing) by humans who are language users; the latter is tailored towards processing (parsing, analyzing, transforming, generating) by programs that are authored by language implementers. In this chapter, we cover the foundations of abstract syntax. This includes the notion of conformance of terms (trees) or models (graphs) to signatures or metamodels. The proposed notations for signatures and metamodels correspond to proper software languages in themselves, giving rise to a metametalevel that we develop as well. We defer implementation aspects of abstract syntax, coverage of concrete syntax, and semantics of languages to later chapters.
Unable to display preview. Download preview PDF.