Robert Harper · Cambridge University Press eBooks · 2016
Programming languages express computations in a form comprehensible to both people and machines. The syntax of a language specifies how various sorts of phrases (expressions, commands, declarations, and so forth) may be combined to form programs. But what are these phrases? What is a program made of?
Cited by 0
Andrew W. Appel · Cambridge University Press eBooks · 1997
A compiler must do more than recognize whether a sentence belongs to the language of a grammar – it must do something useful with that sentence. The semantic actions of a parser can do useful things with the phrases that are parsed.
Cited by 0
Martin H. Weik · 2000
Cited by 0
David S. Wile · 1997
Modem Software Engineering practice advocates the development of domain-specific specification languages to characterize formally the idioms of discourse and jargon of specific problem domains. With poorly-understood domains it is best to construct an abstract syntax to characterize the domain concepts and abstractions before developing a concrete syntax. Often, however, a good concrete syntax exists a priori: sometimes in sophisticated formal languages characterizing (often mathematical) domains but more often in miniature, legacy-code languages, sorely in need of reverse engineering. In such cases, it is necessary to derive an appropriate abstract syntax -or its first cousin, an object-oriented model -from the concrete syntax. This report describes a transformation process that produces a good abstract representation from a low-level concrete syntax specification.
Cited by 69Open access
Peter Sestoft · Undergraduate topics in computer science · 2012
Cited by 1
David S. Wile · 2011
A successful technique in modern Software Engineering practice is to develop domain-specific specification languages to characterize syntax to characterize the domain concepts and abstractions before developing a concrete syntax. Often, however, a good concrete syntax exists a priori: sometimes in sophisticated formal languages characterizing (often mathematical) domains but more often in miniature, legacycode languages, sorely in need of reverse engineering. In such cases, it is necessary to derive an appropriate abstract syntax – or its first cousin, an object-oriented model – from the concrete syntax. The relationships between concrete syntax and abstract syntax are quite regular; this is not to say that they are trivial. Herein, those relationships are explored and a transformation process is described that software engineers can use to produce a good abstract syntax specification (e.g. in C++) from a low-level concrete syntax specification (e.g. in YACC). Some details of how the heuristic process has been automated in the author's language processing system, Popart, are presented to introduce software engineers to the practical usage of automatic program generation concepts. Examples from the concrete syntax for CORBA’s IDL are used to illustrate the process.
Cited by 0
M. André Hirschowitz · 2010
Cited by 0
Tijs van der Storm, van der · Data Archiving and Networked Services (DANS) · 2013
Cited by 0
Martin Erwig · 1997
... syntax, much like it is often done for textual languages. Here the focus is on visual programming languages; the impact on visual languages in general is not clear by now. We suggest to use unstructured labeled multi-graphs as abstract visual syntax and show how this facilitates semantics definitions and transformations of visual syntax level makes such manipulations simple and powerful. Moreover, we demonstrate that – in contrast to the traditional monolithic graph definition – an inductive view of graphs provides a very convenient way to move in a structured (and declarative) way through graphs. Again this supports the simplicity of descriptions for transformations and semantics.
Cited by 0
2008
Encodings based on higher-order abstract syntax represent the variables of an object-language as the variables of a meta-language. Such encodings allow for the reuse of α-conversion, substitution and hypothetical judgments already defined in the meta-language and thus often lead to simple and natural formalization. However, it is also well-known that there are some inherent difficulties with higher-order abstract syntax in supporting recursive definitions. We demonstrate a novel approach to explicitly combining higher-order abstract syntax with first-order abstract syntax that makes use of a (restricted) form of dependent types. With this combination, we can readily define recursive functions over first-order abstract syntax while ensuring the correctness of these functions through higher-order abstract syntax. We present an implementation of substitution and a verified evaluator for pure untyped call-by-value λ-calculus.
Cited by 0
Timothy Ray Hines · 1996
Abstract Syntax Notation One is a formal notation for specifying data types and values for networking applications, e.g. client/server applications. Abstract Syntax Notation One was first used for specifying data types in Open Systems Interconnection service elements, e.g. Remote Operations Service Elements, and data types in Open Systems Interconnection protocols, e.g. Common Management Information Protocol. Compilers were soon written to convert Abstract Syntax Notation One source code into target programming languages, e.g. C or Pascal source code. The source code produced by an Abstract Syntax Notation One compiler was then integrated into a network application program. The original Abstract Syntax Notation One International standards included notation for defining macros. Abstract Syntax Notation One compiler writers found that writing Abstract Syntax Notation One compilers for macros was very difficult. The 1994 Abstract Syntax Notation One International standards moved macros to an appendix and replaced them by object-oriented constructs and techniques. Although the object-oriented constructs and techniques were included in Abstract Syntax Notation One, the writer(s) of the 1994 International standards did not include all constructs and techniques of the object-oriented paradigm. They did not include notation for defining class variables, instance variables, methods, superclasses and messages. This research examined the Abstract Syntax Notation One production rules and found that they were not usable by a compiler. Thus, an Abstract Syntax Notation LR(1) grammar was written from the Abstract Syntax Notation One production rules and used for an Abstract Syntax Notation One LR(1) compiler. Two new data types were added to the Abstract Syntax Notation One LR(1) grammar, OPERATION and MESSAGE, and changes were made to the existing CLASS data type to allow for class variables, instance variables, methods, superclasses and class keys. The new grammar is called Abstract Syntax Notation Two.
Cited by 0
Shaon Barman · Texas ScholarWorks (Texas Digital Library) · 2017
Modern parser generators typically require two components: an abstract syntax data \nstructure and a concrete syntax grammar specification. Usually the abstract syntax and \nthe concrete syntax are closely related but are specified independently because it is diffcult \nto distinguish what parts of the concrete syntax are associated with the abstract syntax. \nThere are a few add-ons to parser generators, such as ANTLR, which allow the programmer \nto specify this relationship through annotations in the concrete syntax, but their scope is \nlimited. In this honors thesis, I propose a new way of generating the abstract syntax data \nstructure. The concrete syntax grammar is used as a base for the abstract syntax data \nstructure. The grammar undergoes a series of transformations, where each transformation \nanalyzes the grammar and removes excess information, such as precedence, associativity, or \nliterals used only to disambiguate potential parsings. The final result is an abstract syntax \ndata structure. In addition, since each of these transformations can be linked together, parser \nactions can be inserted into the original grammar so that an abstract syntax tree is created \nwhen the generated parser is run.
Cited by 1Open access
Zhining Zhang (10583870), Liang Wan (119472), Kun Chu (11727827) et al. · Figshare · 2022
Cited by 0Open access
Frank Pfenning, Conal Elliott · 1988
We describe motivation, design, use, and implementation of higher-order abstract syntax as a central representation for programs, formulas, rules, and other syntactic objects in program manipulation and other formal systems where matching and substitution or unification are central operations. Higher-order abstract syntax incorporates name binding information in a uniform and language generic way. Thus it acts as a powerful link integrating diverse tools in such formal environments. We have implemented higher-order abstract syntax, a supporting matching and unification algorithm, and some clients in Common Lisp in the framework of the Ergo project at Carnegie Mellon University.
Cited by 340Open access
K. Donnelly, Hongwei Xi · 2005
Encodings based on higher-order abstract syntax represent the variables of an object-language as the variables of a meta-language. Such encodings allow for the reuse of α-conversion, substitution and hypothetical judgments already defined in the meta-language and thus often lead to simple and natural formalization. However, it is also well-known that there are some inherent difficulties with higher-order abstract syntax in supporting recursive definitions.We demonstrate a novel approach to explicitly combining higher-order abstract syntax with first-order abstract syntax that makes use of a (restricted) form of dependent types. With this combination, we can readily define recursive functions over first-order abstract syntax while ensuring the correctness of these functions through higher-order abstract syntax. We present an implementation of substitution and a verified evaluator for pure untyped call-by-value λ-calculus.
Cited by 8
Marcelo Fiore, Gordon Plotkin, Daniele Turi · ERA · 2003
Abstract We develop a theory of abstract syntax with variable binding. To every binding signature we associate a category of models consisting of variable sets endowed with both a (binding) algebra and a substitution structure compatible with each other. The syntax generated by the signature is the initial model. This gives a notion of initial algebra semantics encompassing the traditional one; besides compositionality, it automatically verifies the semantic substitution lemma.
Cited by 42Open access
Luis Quesada, O Berzal, Juan Carlos Cubero · 2016
Cited by 0
Michael Pedersen (227448), Andrew Phillips (201315), Gordon D. Plotkin (749535) · Figshare · 2015
Cited by 0Open access
Richard L. Apodaca · Front Matter · 2020
SMILES is the de facto standard for information exchange in cheminformatics. But despite this language's prominent role, low-level tools and documentation remain sparse and incomplete. Recent articles here have highlighted the development of a SMILES grammar and a parser implementation in Rust. This article extends that theme by introducing another powerful tool for the analysis and manipulation of SMILES using Rust.
Cited by 0Open access
Richard L. Apodaca · Front Matter · 2020
SMILES is the de facto standard for information exchange in cheminformatics. But despite this language's prominent role, low-level tools and documentation remain sparse and incomplete. Recent articles here have highlighted the development of a SMILES grammar and a parser implementation in Rust. This article extends that theme by introducing another powerful tool for the analysis and manipulation of SMILES using Rust.
Cited by 0Open access