The PROGRES Language Manual (Version 9.x)

Andy Schürr
Institute for Software Technology
University of the German Armed Forces Munich
D-85577 Neubiberg, Germany
email: schuerr@informatik.unibw-muenchen.de



Table of Contents


1 Introduction

The PROGRES language definition (version 9.x) is a mixture of Extended Backus Naur Form (EBNF) rules and natural language texts. EBNF rules are used to define the language's context-free syntax; the running text explains the semantics of each introduced construct briefly. The definition of PROGRES' syntax by means of EBNF rules is possible due to the fact that any graphical language element has a textual "Ersatz"-representation and that the translation from the textual representation to its graphical counterpart is rather trivial. The first part of this appendix is a definition of the EBNF definition language itself. It uses the same mixture of EBNF rules for context-free syntax definition purposes and natural language comments for additional explanations.

 Please note that this paper is a hypertext document. It is available in four different formats:
 

Any applied occurrence of a nonterminal on the following pages is a "clickable" link to its definition.

Furthermore, there are two types of nonterminals on the right-hand side of EBNF rules, which are treated differently: nonterminals starting with prefix "Decl" or "Appl". They denote identifier declarations or applied identifier occurrences. The default lexical syntax of these identifiers is a sequence of alphanumerical characters. Any deviation from this law is explained in the running text. For further details concerning this topic the reader is referred to the language's lexical syntax definition in (f)lex input format, which is part of the programming environment source code.

For further details concerning the language PROGRES and its programming environment the reader is referred to the PROGRES home page

     http://www-i3.informatik.rwth-aachen.de/research/progres/index.html
 

2 Context-free Syntax of the Syntax Definition Language EBNF

The following set of rules defines the context-free syntax of the syntax definition language EBNF. It has the usual form with one exception: Lists are not defined using left- or right-recursion but by means of special list definition rules.
 

3 Context-Free Syntax of the Language PROGRES

The following pages describe the syntax and semantics of the language PROGRES (version 9.x) as precisely as possible. Nevertheless, there are some differences between the syntax presented here and the syntax of the released language implementation (version 9.2), which is documented in the file $PROGRESROOT/man/ProgresSyntax: The PROGRES grammar's axiom is the nonterminal Specification. The following rule defines its context-free structure:

3.1 Import of External C Types and Functions

3.2 Node Classes, Node Types, and Edge Types

3.3 Attribute Declarations and Redefinitions

3.4 Intrinsic Attribute Declarations and Redefinitions

3.5 Derived Attribute Declarations and Redefinitions

3.6 Meta Attribute Declarations and Redefinitions

3.7 Local Node Constraint Declarations and Redefinitions

3.8 Global Graph Constraint Declarations

3.9 Declarations of Queries and Transactions

3.10 Pre- and Post-Conditions and Ensure Statements

3.11 Statement Lists

3.12 Conditional and Iterating Statements

3.13 Bounded Iteration and Variable Declarations

3.14 Graph Modifying Statements

3.15 Graph Query Statements

3.16 Declarations of Tests and Productions

3.17 Test and Production Qualifiers

3.18 Left-hand Sides of Productions and Graph Patterns of Tests, etc.

3.19 Right-hand sides of Productions

3.20 Node Foldings and Attribute Conditions

3.21 Attribute and Return Assignments

3.22 Embedding Transformation Clauses

3.23 Path Declarations

3.24 Restriction Declarations

3.25 Path and Restriction Defining Expressions

3.26 Iterating and Conditional Path Expressions

3.27 Node Set Restriction Expressions

3.28 Simple Path Expressions

3.29 Edge Traversals, Attribute Accesses, and Path Calls

3.30 User Defined Functions and Formal Parameter Lists

3.31 Attribute Value and Node Set Computing Expressions

3.32 Function Calls and Actual Parameter Lists

3.33 Standard Types Boolean and Sets of Any Type

3.34 Relational Operators

3.35 Standard Types Integer and Integer Set

3.36 Standard Types String and String Set

3.37 Expression Iterators

3.38 Variable Declarations and Type Definitions

3.39 Type and Meta Type Definitions

3.40 Brackets and Conditional Expressions

3.41 Attribute, Node, and Node Type Selections

3.42 Type and Cardinality Constraint Checking Expressions

3.43 Cardinality Qualifiers for Relation Types, Attribute Types, etc.