Syntax for the SNB (Maximilien Colange, Fabrice Kordon, Yann Thierry-Mieg)
Preamble
Black parts correspond to the AMI-NET syntax.
Blue parts correspond to updates to the AMI-NET syntax, for the SN.
Red parts correspond to the difference between SNB and SN : the bag part.
BNF for the declaration attribute
<Declaration> ::= <ClassSection>
[<EquivalenceSection>]
[<DomainDeclaration>]
<VariableSection>
<ClassSection> ::= CLASS <ListClassDeclarations>
<ListClassDeclarations> ::= <ClassDeclaration> |
<ListClassDeclarations> <ClassDeclaration>
<ClassDeclaration> ::= <ListClassNames> IS [CIRCULAR] <ClassDescription>;
<ListClassNames> ::= <ClassIdentifier> |
<ListClassNames>, <ClassIdentifier>
<ClassDescription> ::= <Interval> |
[ <ListElements> ]
<ListElements> ::= <Element> | <ListElements>, <Element>
<Element> ::= <ElementIdentifier>
<Interval> ::= <Integer> .. <Integer> |
<DomainSection> ::= DOMAIN <ListDomainDeclarations>
<ListDomainDeclarations> ::= <DomainDeclaration> |
<ListDomainDeclarations> <DomainDeclaration>
<DomainDeclaration> ::= <ListDomainNames> IS <DomainDescription>;
<ListDomainNames> ::= <DomainIdentifier> |
<ListDomainNames>, <DomainIdentifier>
<DomainDescription> ::= <ClassIdentifier> |
<BagDefinition> |
<DomainProduct> |
<DomainIdentifier>
<DomainProduct> ::= < <ListComponents> >
<ListComponents> ::= <Component> |
<ListComponents> , <Component>
<Component> ::= <ClassIdentifier> |
<DomainIdentifier>
<BagDefinition> ::= BAG (<ClassIdentifier>)
<VariableSection> ::= VAR <ListVariableDeclarations>
<ListVariableDeclarations> ::= <VariableDeclaration> |
<ListVariableDeclarations> <VariableDeclaration>
<VariableDeclaration> ::= <ListVariableNames> IN [UNIQUE] <Component>;
<ListVariableNames> ::= <VariableIdentifier> |
<ListVariableNames>, <VariableIdentifier>
<EquivalenceSection> ::= EQUIVALENCES <ListEquivDeclarations>
<ListEquivDeclarations> ::= <EquivDeclaration> |
<ListEquivDeclarations> <EquivDeclaration>
<EquivDeclaration> ::= IN <ClassIdentifier> : <ListInterval>;
<ListInterval> ::= <NamedIntervalDefinition> |
<ListInterval>, <NamedIntervalDefinition>
<NamedIntervalDefinition> ::= (<SubClassIdentifier> IS)? <IntervalDefinition>
<IntervalDefinition> ::= <Interval> |
<Integer>
BNF of the Arc Valuation attribute
<ArcLabel> ::= <ListElementaryExpr> |
<PositiveInteger>
<ListElementaryExpr> ::= <ElementaryExpression> |
<ListElementaryExpr>+<ListElementaryExpr> |
<ListElementaryExpr>-<ListElementaryExpr>
<ElementaryExpression> ::= <ElementaryProduct> |
<Coefficient>*<ElementaryProduct>
<Coefficient> ::= <PositiveValue> |
ORD(<VariableIdentifier>) |
ORD(<ClassIdentifier>.<LitteralValue>)
<ElementaryProduct> ::= < <ListProdElements> >
<ListProdElements> ::= <ProdElement> |
<ListProdElements> , <ProdElement>
<ProdElement> ::= <ElementaryExpression> |
<VarClassElement> |
<SimpleBagOperators> |
<RecursiveBagOperators>
<VarClassElement> ::= <VariableIdentifier> |
<ClassIdentifier>.<LitteralValue> |
<VariableOrObjectIdentifier>++<PositiveInteger> |
<VariableOrObjectIdentifier>--<PositiveInteger> |
<ClassIdentifier>.ALL
<SimpleBagOperators> ::= { VariableOrObjectIdentifier }
<RecursiveBagOperators> ::= <VarClassElement> |
(<RecursiveBagOperators>) |
<RecursiveBagOperators> <BagOperation> <RecursiveBagOperators> |
<SimpleBagOperators> |
~ RecursiveBagOperators
<BagOperation> ::= UNION |
INTER |
DIFF
BNF of the transition guards
<TransitionGuard> ::= TRUE | FALSE | [<Guard>]
<Guard> ::= TRUE | FALSE |
NOT <Guard> |
(<Guard>) |
<Guard> AND <Guard> |
<Guard> OR <Guard> |
<GardOperator> <RelOp> <GardOperator> |
UNIQUE(<GardOperator>) |
CARD(<GardOperator>) <RelOp> <NaturalValue> |
<VarClassElement> IN <ClassIdentifier> |
<SimpleBagOperator> (INCLUDED | STRICTINCLUDED) < SimpleBagOperator>
<GardOperator> ::= <VarClassElement> |
<SimpleBagOperators>
<RelOp> ::= = | <> | < | > | <= | >=
BNF for the definition of markings :
<InitialMarking> ::= <ListMarkings>
<ListMarkings> ::= <Marking> |
<ListMarkings> + <Marking>
<Marking> ::= <MarkingExpression> |
<PositiveInteger>*<MarkingExpression>
<MarkingExpression> ::= <ElementaryProduct>
|