Defining context-dependent syntax without using contexts

A method for defining context-dependent syntax is presented. The method, like many others, builds on a context-free grammar that defines a superset of a given language, mapping each string in the language to a derivation tree. The context-free language is subsequently restricted by imposing conformity criteria on derivation trees. These criteria are expressed with logic predicates, called context rules, which characterize the form of conformant derivation trees. A text belongs to the defined language if and only if its derivation tree is a model of all context rules. This approach avoids the use of explicit data structures for contextual information and tends to yield very concise formal definitions. It has been applied with good results in the formal definition of the programming language Oberon

[1]  R. S. D'Ippolito,et al.  Software development using models , 1989, IWSSD '89.

[2]  Gregor Snelting,et al.  The PSG system: from formal language definitions to interactive programming environments , 1986, TOPL.

[3]  Isabelle Attali,et al.  Compiling TYPOL with Attribute Grammars , 1988, PLILP.

[4]  Thomas Reps,et al.  The Synthesizer Generator: A System for Constructing Language-Based Editors , 1988 .

[5]  Robert A. Ballance,et al.  Syntactic and semantic checking in language-based editing systems , 1989 .

[6]  H. Redkey,et al.  A new approach. , 1967, Rehabilitation record.

[7]  Gerhard Goos,et al.  An Attribute Grammar for the Semantic Analysis of Ada , 1982, Lecture Notes in Computer Science.

[8]  Martin Odersky,et al.  A new approach to formal language definition and its application to Oberon , 1989 .

[9]  Niklaus Wirth,et al.  The programming language oberon , 1988, Softw. Pract. Exp..

[10]  J. A. Robinson,et al.  Logic, form and function , 1979 .

[11]  J. W. Lloyd,et al.  Foundations of logic programming; (2nd extended ed.) , 1987 .

[12]  Richard C. Holt,et al.  The Turing Programming Language: Design and Definition , 1987 .

[13]  Uwe Kastens,et al.  GAG: A Practical Compiler Generator , 1982, Lecture Notes in Computer Science.

[14]  Michael J. Maher,et al.  Optimal Fixedpoints of Logic Programs , 1985, Theor. Comput. Sci..

[15]  Niklaus Wirth,et al.  What can we do about the unnecessary diversity of notation for syntactic definitions? , 1977, Commun. ACM.

[16]  Tim Teitelbaum,et al.  Higher-order attribute grammars and editing environments , 1990, PLDI '90.

[17]  C. A. R. Hoare,et al.  The emperor's old clothes , 1981, CACM.

[18]  Fernando Pereira,et al.  Definite clause grammars for language analysis , 1986 .

[19]  C. A. R. HOARE,et al.  An axiomatic basis for computer programming , 1969, CACM.

[20]  Robert D. Tennent,et al.  The denotational semantics of programming languages , 1976, CACM.

[21]  Robert A. Ballance Syntactic and Semantic Checking in , 1989 .

[22]  Cliff B. Jones,et al.  Systematic software development using VDM , 1986, Prentice Hall International Series in Computer Science.

[23]  Gilles Kahn,et al.  Natural Semantics , 1987, STACS.

[24]  J. Michael Spivey,et al.  The Z notation - a reference manual , 1992, Prentice Hall International Series in Computer Science.

[25]  Luca Cardelli,et al.  The Modula–3 type system , 1989, POPL '89.

[26]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[27]  Jürgen Uhl Spezifikation von Programmiersprachen und Übersetzern , 1986 .

[28]  Thomas Johnsson,et al.  Attribute grammars as a functional programming paradigm , 1987, FPCA.

[29]  S. Doaitse Swierstra,et al.  Higher order attribute grammars , 1989, PLDI '89.

[30]  Pierre Deransart,et al.  Attribute Grammars: Definitions, Systems and Bibliography , 1988 .

[31]  J. E. L. Peck,et al.  Revised report on the algorithmic languageAlgol 60 , 1962, Springer Berlin Heidelberg.

[32]  Joseph E. Stoy,et al.  Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory , 1981 .

[33]  Elliott Mendelson,et al.  Introduction to mathematical logic (3. ed.) , 1987 .

[34]  Thierry Despeyroux,et al.  Executable Specification of Static Semantics , 1984, Semantics of Data Types.

[35]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.