Polychrony
Signal V4 (Inria version) BNF Syntax
Notations:
brown | Signal Keyword or required character(s) (in a Signal program, Signal Keywords can appear either totally in lower case or totally in upper case) |
[ elements ] | elements between square brackets are optional elements |
{ elements } | elements between these braces denore possibly empty list of such elements |
set1 \ set2 | denotes any element obtained from set1, which is not an element obtained from set2 |
MODULE ::= module Name-module = [ DIRECTIVES ] DECLARATION { DECLARATION } end ; DECLARATION ::= MODEL | DECLARATION-OF-TYPES | DECLARATION-OF-CONSTANTS | S-DECLARATION | DECLARATION-OF-SHARED-VARIABLES | DECLARATION-OF-STATE-VARIABLES | DECLARATION-OF-LABELS | IMPORT-OF-MODULES | REFERENCES IMPORT-OF-MODULES ::= use IMPORTED-OBJECTS { , IMPORTED-OBJECTS } ; IMPORTED-OBJECTS ::= Name-module MODEL ::= PROCESS | ACTION | NODE | FUNCTION PROCESS ::= process Name-model = DEFINITION-OF-INTERFACE [ DIRECTIVES ] [ BODY ] ; | private process Name-model = DEFINITION-OF-INTERFACE [ DIRECTIVES ] [ BODY ] ; ACTION ::= action Name-model = DEFINITION-OF-INTERFACE [ DIRECTIVES ] [ BODY ] ; | private action Name-model = DEFINITION-OF-INTERFACE [ DIRECTIVES ] [ BODY ] ; NODE ::= node Name-model = DEFINITION-OF-INTERFACE [ DIRECTIVES ] [ BODY ] ; | private node Name-model = DEFINITION-OF-INTERFACE [ DIRECTIVES ] [ BODY ] ; FUNCTION ::= function Name-model = DEFINITION-OF-INTERFACE [ DIRECTIVES ] [ BODY ] ; | private function Name-model = DEFINITION-OF-INTERFACE [ DIRECTIVES ] [ BODY ] ; DEFINITION-OF-INTERFACE ::= INTERFACE | Name-model-type INTERFACE ::= [ PARAMETERS ] ( INPUTS OUTPUTS ) EXTERNAL-GRAPH PARAMETERS ::= { { FORMAL-PARAMETER } } FORMAL-PARAMETER ::= S-DECLARATION | DECLARATION-OF-TYPES | FORMAL-MODEL FORMAL-MODEL ::= process Name-model-type Name-model | action Name-model-type Name-model | node Name-model-type Name-model | function Name-model-type Name-model INPUTS ::= ? { S-DECLARATION } OUTPUTS ::= ! { S-DECLARATION } EXTERNAL-GRAPH ::= [ PROCESS-ATTRIBUTE ] [ SPECIFICATION-OF-PROPERTIES ] PROCESS-ATTRIBUTE ::= safe | deterministic | unsafe SPECIFICATION-OF-PROPERTIES ::= spec GENERAL-PROCESS DIRECTIVES ::= pragmas PRAGMA { PRAGMA } end pragmas PRAGMA ::= Name-pragma [ { PRAGMA-OBJECT { , PRAGMA-OBJECT } ] [ Pragma-statement ] PRAGMA-OBJECT ::= Label | Name Pragma-statement ::= String-cst BODY ::= DESCRIPTION-OF-MODEL DESCRIPTION-OF-MODEL ::= GENERAL-PROCESS | EXTERNAL-NOTATION EXTERNAL-NOTATION ::= external [ String-cst ] DECLARATION-BLOCK ::= where DECLARATION { DECLARATION } end DECLARATION-OF-TYPES ::= type DEFINITION-OF-TYPE { , DEFINITION-OF-TYPE } ; | private type DEFINITION-OF-TYPE { , DEFINITION-OF-TYPE } ; DEFINITION-OF-TYPE ::= Name-type | Name-type = DESCRIPTION-OF-TYPE | process Name-model-type = DEFINITION-OF-INTERFACE [ DIRECTIVES ] | action Name-model-type = DEFINITION-OF-INTERFACE [ DIRECTIVES ] | node Name-model-type = DEFINITION-OF-INTERFACE [ DIRECTIVES ] | function Name-model-type = DEFINITION-OF-INTERFACE [ DIRECTIVES ] DESCRIPTION-OF-TYPE ::= SIGNAL-TYPE | EXTERNAL-NOTATION [ TYPE-INITIAL-VALUE ] TYPE-INITIAL-VALUE ::= init Name-constant SIGNAL-TYPE ::= Scalar-type | External-type | ENUMERATED-TYPE | ARRAY-TYPE | TUPLE-TYPE | Name-type Scalar-type ::= Synchronization-type | Numeric-type | Alphabetic-type Synchronization-type ::= event | boolean Numeric-type ::= Integer-type | Real-type | Complex-type Integer-type ::= short | integer | long Real-type ::= real | dreal Complex-type ::= complex | dcomplex Alphabetic-type ::= char | string External-type ::= Name-type ENUMERATED-TYPE ::= enum ( Name-enum-value { , Name-enum-value } ) ARRAY-TYPE ::= [ S-EXPR { , S-EXPR } ] SIGNAL-TYPE TUPLE-TYPE ::= struct ( NAMED-FIELDS ) | bundle ( NAMED-FIELDS ) [ SPECIFICATION-OF-PROPERTIES ] NAMED-FIELDS ::= S-DECLARATION { S-DECLARATION } DECLARATION-OF-CONSTANTS ::= constant SIGNAL-TYPE DEFINITION-OF-CONSTANT { , DEFINITION-OF-CONSTANT } ; | constant DEFINITION-OF-CONSTANT { , DEFINITION-OF-CONSTANT } ; | private constant SIGNAL-TYPE DEFINITION-OF-CONSTANT { , DEFINITION-OF-CONSTANT } ; | private constant DEFINITION-OF-CONSTANT { , DEFINITION-OF-CONSTANT } ; DEFINITION-OF-CONSTANT ::= Name-constant | Name-constant = DESCRIPTION-OF-CONSTANT DESCRIPTION-OF-CONSTANT ::= S-EXPR | EXTERNAL-NOTATION S-DECLARATION ::= SIGNAL-TYPE DEFINITION-OF-SEQUENCE { , DEFINITION-OF-SEQUENCE } ; | DEFINITION-OF-SEQUENCE { , DEFINITION-OF-SEQUENCE } ; DEFINITION-OF-SEQUENCE ::= Name-signal | Name-signal init S-EXPR DECLARATION-OF-SHARED-VARIABLES ::= shared SIGNAL-TYPE DEFINITION-OF-SEQUENCE { , DEFINITION-OF-SEQUENCE } ; | shared DEFINITION-OF-SEQUENCE { , DEFINITION-OF-SEQUENCE } ; DECLARATION-OF-STATE-VARIABLES ::= statevar SIGNAL-TYPE DEFINITION-OF-SEQUENCE { , DEFINITION-OF-SEQUENCE } ; | statevar DEFINITION-OF-SEQUENCE { , DEFINITION-OF-SEQUENCE } ; DECLARATION-OF-LABELS ::= label Name-label { , Name-label } ; REFERENCES ::= ref Name-signal { , Name-signal } ; P-EXPR ::= GENERAL-PROCESS | ELEMENTARY-PROCESS | LABELLED-PROCESS | HIDING GENERAL-PROCESS ::= CONFINED-PROCESS | COMPOSITION | CHOICE-PROCESS | ITERATION-OF-PROCESSES ELEMENTARY-PROCESS ::= INSTANCE-OF-PROCESS | DEFINITION-OF-SIGNALS | CONSTRAINT | DEPENDENCES LABELLED-PROCESS ::= Label :: P-EXPR Label ::= Name HIDING ::= GENERAL-PROCESS / Name-signal { , Name-signal } | HIDING / Name-signal { , Name-signal } CONFINED-PROCESS ::= GENERAL-PROCESS DECLARATION-BLOCK COMPOSITION ::= (| [ P-EXPR { | P-EXPR } ] |) CHOICE-PROCESS ::= case Name-signal in CASE { CASE } [ ELSE-CASE ] end CASE ::= ENUMERATION-OF-VALUES : GENERAL-PROCESS ELSE-CASE ::= else GENERAL-PROCESS ENUMERATION-OF-VALUES ::= { S-EXPR { , S-EXPR } } | [. [ S-EXPR ] , [ S-EXPR ] .] | [. [ S-EXPR ] , [ S-EXPR ] [. | .] [ S-EXPR ] , [ S-EXPR ] .] | .] [ S-EXPR ] , [ S-EXPR ] [. ITERATION-OF-PROCESSES ::= array ARRAY-INDEX of P-EXPR [ ITERATION-INIT ] end | iterate ITERATION-INDEX of P-EXPR [ ITERATION-INIT ] end ARRAY-INDEX ::= Name to S-EXPR ITERATION-INDEX ::= DEFINED-ELEMENT | ( DEFINED-ELEMENT { , DEFINED-ELEMENT } ) | S-EXPR ITERATION-INIT ::= with P-EXPR INSTANCE-OF-PROCESS ::= EXPANSION | Name-model ( ) | PRODUCTION EXPANSION ::= Name-model { S-EXPR-PARAMETER { , S-EXPR-PARAMETER } } PRODUCTION ::= MODEL-REFERENCE ( S-EXPR { , S-EXPR } ) MODEL-REFERENCE ::= EXPANSION | Name-model S-EXPR-PARAMETER ::= S-EXPR | SIGNAL-TYPE | Name-model DEFINITION-OF-SIGNALS ::= DEFINED-ELEMENT := S-EXPR | ( DEFINED-ELEMENT { , DEFINED-ELEMENT } ) := S-EXPR | DEFINED-ELEMENT ::= S-EXPR | ( DEFINED-ELEMENT { , DEFINED-ELEMENT } ) ::= S-EXPR | DEFINED-ELEMENT ::= defaultvalue S-EXPR | ( DEFINED-ELEMENT { , DEFINED-ELEMENT } ) ::= defaultvalue S-EXPR DEFINED-ELEMENT ::= COMPONENT | COMPONENT [ S-EXPR { , S-EXPR } ] COMPONENT ::= Name-signal | Name-signal . COMPONENT CONSTRAINT ::= S-EXPR { ^= S-EXPR } | S-EXPR { ^< S-EXPR } | S-EXPR { ^> S-EXPR } | S-EXPR { ^# S-EXPR } | S-EXPR :=: S-EXPR DEPENDENCES ::= SIGNALS { --> SIGNALS } | { SIGNALS --> SIGNALS } when S-EXPR SIGNALS ::= ELEMENTARY-SIGNAL | { ELEMENTARY-SIGNAL { , ELEMENTARY-SIGNAL } } ELEMENTARY-SIGNAL ::= DEFINED-ELEMENT | Label S-EXPR ::= INSTANCE-OF-PROCESS | CONVERSION | S-EXPR-DYNAMIC | S-EXPR-TEMPORAL | S-EXPR-CLOCK | S-EXPR-BOOLEAN | S-EXPR-ARITHMETIC | S-EXPR-CONDITION | S-EXPR-TUPLE | S-EXPR-ARRAY | S-EXPR-ELEMENTARY | S-EXPR \\ S-EXPR | ( S-EXPR ) CONVERSION ::= Type-conversion ( S-EXPR ) Type-conversion ::= Scalar-type | Name-type S-EXPR-DYNAMIC ::= SIMPLE-DELAY | WINDOW | GENERALIZED-DELAY SIMPLE-DELAY ::= S-EXPR $ [ init S-EXPR ] WINDOW ::= S-EXPR window S-EXPR [ init S-EXPR ] GENERALIZED-DELAY ::= S-EXPR $ S-EXPR [ init S-EXPR ] S-EXPR-TEMPORAL ::= MERGING | EXTRACTION | MEMORIZATION | VARIABLE | COUNTER MERGING ::= S-EXPR default S-EXPR EXTRACTION ::= S-EXPR when S-EXPR MEMORIZATION ::= S-EXPR cell S-EXPR [ init S-EXPR ] VARIABLE ::= var S-EXPR [ init S-EXPR ] COUNTER ::= S-EXPR after S-EXPR | S-EXPR from S-EXPR | S-EXPR count S-EXPR S-EXPR-CLOCK ::= SIGNAL-CLOCK | CLOCK-EXTRACTION | ^0 | S-EXPR ^+ S-EXPR | S-EXPR ^- S-EXPR | S-EXPR ^* S-EXPR SIGNAL-CLOCK ::= ^ S-EXPR CLOCK-EXTRACTION ::= when S-EXPR S-EXPR-BOOLEAN ::= not S-EXPR | S-EXPR or S-EXPR | S-EXPR and S-EXPR | S-EXPR xor S-EXPR | RELATION RELATION ::= S-EXPR = S-EXPR | S-EXPR /= S-EXPR | S-EXPR > S-EXPR | S-EXPR >= S-EXPR | S-EXPR < S-EXPR | S-EXPR <= S-EXPR | S-EXPR == S-EXPR | S-EXPR <<= S-EXPR S-EXPR-ARITHMETIC ::= S-EXPR + S-EXPR | S-EXPR - S-EXPR | S-EXPR * S-EXPR | S-EXPR / S-EXPR | S-EXPR modulo S-EXPR | S-EXPR ** S-EXPR | + S-EXPR | - S-EXPR | DENOTATION-OF-COMPLEX DENOTATION-OF-COMPLEX ::= S-EXPR @ S-EXPR S-EXPR-CONDITION ::= if S-EXPR then S-EXPR else S-EXPR S-EXPR-TUPLE ::= TUPLE-ENUMERATION | TUPLE-FIELD TUPLE-ENUMERATION ::= ( S-EXPR { , S-EXPR } ) TUPLE-FIELD ::= S-EXPR . Name-field S-EXPR-ARRAY ::= ARRAY-ENUMERATION | CONCATENATION | ITERATIVE-ENUMERATION | INDEX | MULTI-INDEX | ARRAY-ELEMENT | SUB-ARRAY | ARRAY-RESTRUCTURATION | SEQUENTIAL-DEFINITION | TRANSPOSITION | ARRAY-PRODUCT | REFERENCE-SEQUENCE ARRAY-ENUMERATION ::= [ S-EXPR { , S-EXPR } ] CONCATENATION ::= S-EXPR |+ S-EXPR ITERATIVE-ENUMERATION ::= [ PARTIAL-DEFINITION { , PARTIAL-DEFINITION } ] PARTIAL-DEFINITION ::= DEFINITION-OF-ELEMENT | ITERATION DEFINITION-OF-ELEMENT ::= [ S-EXPR { , S-EXPR } ] : S-EXPR ITERATION ::= { PARTIAL-ITERATION { , PARTIAL-ITERATION } } : DEFINITION-OF-ELEMENT | { PARTIAL-ITERATION { , PARTIAL-ITERATION } } : S-EXPR PARTIAL-ITERATION ::= [ Name ] [ in S-EXPR ] [ to S-EXPR ] [ step S-EXPR ] INDEX ::= S-EXPR .. S-EXPR [ step S-EXPR ] MULTI-INDEX ::= << S-EXPR { , S-EXPR } >> ARRAY-ELEMENT ::= S-EXPR [ S-EXPR { , S-EXPR } ] | S-EXPR [ S-EXPR { , S-EXPR } ] ARRAY-RECOVERY ARRAY-RECOVERY ::= \\ S-EXPR SUB-ARRAY ::= S-EXPR [ S-EXPR { , S-EXPR } ] ARRAY-RESTRUCTURATION ::= S-EXPR : S-EXPR SEQUENTIAL-DEFINITION ::= S-EXPR next S-EXPR TRANSPOSITION ::= tr S-EXPR ARRAY-PRODUCT ::= S-EXPR *. S-EXPR REFERENCE-SEQUENCE ::= S-EXPR [ ? ] S-EXPR-ELEMENTARY ::= CONSTANT | Name-signal | Label | Name-state-variable ? CONSTANT ::= ENUM-CST | Boolean-cst | Integer-cst | Real-cst | Character-cst | String-cst ENUM-CST ::= # Name-enum-value | Name-type # Name-enum-value Boolean-cst ::= true | false Integer-cst ::= numeral-char { numeral-char } Real-cst ::= Simple-precision-real-cst | Double-precision-real-cst Simple-precision-real-cst ::= Integer-cst Simple-precision-exponent | Integer-cst . Integer-cst [ Simple-precision-exponent ] Double-precision-real-cst ::= Integer-cst Double-precision-exponent | Integer-cst . Integer-cst Double-precision-exponent Simple-precision-exponent ::= e Relative-cst | E Relative-cst Double-precision-exponent ::= d Relative-cst | D Relative-cst Relative-cst ::= Integer-cst | + Integer-cst | - Integer-cst Character-cst ::= ' Character-cstCharacter ' Character-cstCharacter ::= Character \ character-spec-char character-spec-char ::= ' | long-separator String-cst ::= " { String-cstCharacter } " String-cstCharacter ::= Character \ string-spec-char string-spec-char ::= " | long-separator Name ::= begin-name-char { name-char } begin-name-char ::= name-char \ numeral-char name-char ::= letter-char | numeral-char | _ letter-char ::= upper-case-letter-char | lower-case-letter-char | other-letter-char upper-case-letter-char ::= A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z lower-case-letter-char ::= a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z other-letter-char ::= À | Á | Â | Ã | Ä | Å | Æ | Ç | È | É | Ê | Ë | Ì | Í | Î | Ï | Ð | Ñ | Ò | Ó | Ô | Õ | Ö | Ø | Ù | Ú | Û | Ü | Ý | Þ | ß | à | á | â | ã | ä | å | æ | ç | è | é | ê | ë | ì | í | î | ï | ð | ñ | ò | ó | ô | õ | ö | ø | ù | ú | û | ü | ý | þ | ÿ numeral-char ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Comment ::= % { CommentCharacter } % CommentCharacter ::= Character \ comment-spec-char comment-spec-char ::= % Character ::= character | CharacterCode character ::= name-char | mark | delimitor | separator | other-character mark ::= . | ' | " | % | : | = | < | > | + | - | * | / | @ | $ | ^ | # | | | \ delimitor ::= ( | ) | { | } | [ | ] | ? | ! | , | ; separator ::= \x20 | long-separator long-separator ::= \x9 | \xA | \xC | \xD CharacterCode ::= OctalCode | HexadecimalCode | escape-code OctalCode ::= \ octal-char [ octal-char [ octal-char ] ] octal-char ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 HexadecimalCode ::= \x hexadecimal-char [ hexadecimal-char ] hexadecimal-char ::= numeral-char | A | B | C | D | E | F | a | b | c | d | e | f escape-code ::= \a | \b | \f | \n | \r | \t | \v | \\ | \" | \' | \? | \% prefix-mark ::= \