From Concrete Syntax to Abstract Syntax

Author(s):  
Peter Sestoft
Author(s):  
Mary Holstege

In the mid-eighties a group at Stanford built the MUIR language-development environment as a system for notation design with rendering and layout from the abstract syntax, parsing from concrete syntax, and semi-automated transformation between language variants. We developed models for representing documents at all levels and understanding how the levels relate to one another. Presentation widgets have a purpose: to convey specific abstract syntax relationships. Having an account of what kinds of widgets there are, what kinds of abstract relationships there are, and how the two connect allows for an analysis of how the notation works as a whole. The concept of "notation" taken here is a broad one, encompassing programming or technical notations as well as the form of structured documents of various kinds. Notation designers can apply such an analysis to improve their designs so that the structure is more clearly conveyed by the concrete syntax or so that humans can more readily use the notation without confusion. Software can render or parse instances of notations using rules that capture the concrete syntax, the abstract syntax, and the rules between them in a declarative.


Author(s):  
Marian Daun ◽  
Jennifer Brings ◽  
Lisa Krajinski ◽  
Viktoria Stenkova ◽  
Torsten Bandyszak

AbstractCollaborative cyber-physical systems are capable of forming networks at runtime to achieve goals that are unachievable for individual systems. They do so by connecting to each other and exchanging information that helps them coordinate their behaviors to achieve shared goals. Their highly complex dependencies, however, are difficult to document using traditional goal modeling approaches. To help developers of collaborative cyber-physical systems leverage the advantages of goal modeling approaches, we developed a GRL-compliant extension to the popular iStar goal modeling language that takes the particularities of collaborative cyber-physical systems and their developers’ needs into account. In particular, our extension provides support for explicitly distinguishing between the goals of the individual collaborative cyber-physical systems and the network and for documenting various dependencies not only among the individual collaborative cyber-physical systems but also between the individual systems and the network. We provide abstract syntax, concrete syntax, and well-formedness rules for the extension. To illustrate the benefits of our extension for goal modeling of collaborative cyber-physical systems, we report on two case studies conducted in different industry domains.


Author(s):  
Mario Blažević

We present a novel method for specifying concrete syntax, based on and compatible with the RELAX NG schema standard. A parsing method is described for a well-formed XML document conforming to the given concrete syntax specification. The output of the parser is another XML document conforming to the abstract syntax described by the base RELAX NG schema.


2005 ◽  
Vol 8 ◽  
pp. 145-194 ◽  
Author(s):  
John Howse ◽  
Gem Stapleton ◽  
John Taylor

AbstractThe use of diagrams in mathematics has traditionally been restricted to guiding intuition and communication. With rare exceptions such as Peirce's alpha and beta systems, purely diagrammatic formal reasoning has not been in the mathematician's or logician's toolkit. This paper develops a purely diagrammatic reasoning system of “spider diagrams” that builds on Euler, Venn and Peirce diagrams. The system is known to be expressively equivalent to first-order monadic logic with equality. Two levels of diagrammatic syntax have been developed: an ‘abstract’ syntax that captures the structure of diagrams, and a ‘concrete’ syntax that captures topological properties of drawn diagrams. A number of simple diagrammatic transformation rules are given, and the resulting reasoning system is shown to be sound and complete.


2011 ◽  
Vol 21 (3) ◽  
pp. 219-234
Author(s):  
RALF HINZE

Haskell (Peyton Jones, 2003) is often used as a host language for embedding other languages. Typically, the abstract syntax of the guest language is defined by a collection of datatype declarations; parsers and pretty-printers convert between the concrete syntax and its abstract representation. A quote/antiquote mechanism permits a tighter integration of the guest language into the host language by allowing one to use phrases in the guest language's concrete syntax.


2004 ◽  
Vol 14 (2) ◽  
pp. 145-189 ◽  
Author(s):  
AARNE RANTA

Grammatical Framework (GF) is a special-purpose functional language for defining grammars. It uses a Logical Framework (LF) for a description of abstract syntax, and adds to this a notation for defining concrete syntax. GF grammars themselves are purely declarative, but can be used both for linearizing syntax trees and parsing strings. GF can describe both formal and natural languages. The key notion of this description is a grammatical object, which is not just a string, but a record that contains all information on inflection and inherent grammatical features such as number and gender in natural languages, or precedence in formal languages. Grammatical objects have a type system, which helps to eliminate run-time errors in language processing. In the same way as a LF, GF uses dependent types in abstract syntax to express semantic conditions, such as well-typedness and proof obligations. Multilingual grammars, where one abstract syntax has many parallel concrete syntaxes, can be used for reliable and meaning-preserving translation. They can also be used in authoring systems, where syntax trees are constructed in an interactive editor similar to proof editors based on LF. While being edited, the trees can simultaneously be viewed in different languages. This paper starts with a gradual introduction to GF, going through a sequence of simpler formalisms till the full power is reached. The introduction is followed by a systematic presentation of the GF formalism and outlines of the main algorithms: partial evaluation and parser generation. The paper concludes by brief discussions of the Haskell implementation of GF, existing applications, and related work.


2017 ◽  
Vol 14 (3) ◽  
pp. 939-958 ◽  
Author(s):  
Sergej Chodarev ◽  
Jaroslav Porubän

In spite of its popularity, XML provides poor user experience and a lot of domain-specific languages can be improved by introducing custom, more humanfriendly notation. This paper presents an approach for design and development of the custom notation for existing XML-based language together with a translator between the new notation and XML. The approach supports iterative design of the language concrete syntax, allowing its modification based on users feedback. The translator is developed using a model-driven approach. It is based on explicit representation of language abstract syntax (metamodel) that can be augmented with mappings to both XML and the custom notation. We provide recommendations for application of the approach and demonstrate them on a case study of a language for definition of graphs.


Author(s):  
Keith Duddy ◽  
Anna Gerber ◽  
Michael Lawley ◽  
Kerry Raymond

This chapter provides a context and motivation for a language to describe transformations of models within an object-oriented framework. The requirements for such a language are given, and then an object-oriented model of the language’s abstract syntax is provided that meets these requirements. A concrete syntax is introduced along with some example transformations. Finally, we discuss the tools required to use the language within a model-driven software engineering paradigm. The authors aim to demonstrate the principles of model transformation within an object-oriented framework, and show how this can be applied to the development of software systems.


Sign in / Sign up

Export Citation Format

Share Document