MeFoSyLoMa CNRS Iniria
QR Code
Last modified
June 28, 2016

Aug 18, 2017
Symmetric Nets with Bags Grammar


For questions regarding the syntax, please contact Maximilien Colange, Fabrice Kordon, or Yann Thierry-Mieg.

The presentation of the syntax is divided in four parts:

A precise (and formal) definition can be found here for Symmetric Nets with bags :

Grammar: Basic Elements

The grammar is presented as a Backus-Naur form.

First of all, let us define some elements of the grammar:

any sequence of numeric character
any sequence of numeric character which value > 0
any sequence of numeric character which value ≥ 0
any sequence of character starting with a non numeric character
<Integer> .. <Integer>

Keywords are presented like this ; they are case insensitive.

Grammar for the Declaration Attribute

This attribute allows one to declare color types. There are several possibilities in the implementation of Symmetric Nets with Bags :

Please note that bag-types can be parts of cartesian products. There is also the possibility to defines explicit equivalence classes.


Declaration of Color Classes (Basic Color Types)

class <ListClassDeclarations>
<ClassDeclaration> |
<ListClassDeclarations> <ClassDeclarations>
<ListClassNames> is [circular] <ClassDescription>;
<ClassIdentifier> |
<ListClassNames> <ClassIdentifier>
<interval> | [<ListElements>]
<Identifier> |
<ListElements>, <Identifier>

Declaration of Equivalence in Color Classes

equivalence <ListEquivDeclarations>
<EquivDeclaration> |
<ListEquivDeclarations> <EquivDeclaration>
in <ClassIdentifier> : <ListInterval>;
<NamedInterval> |
<ListInterval>, <NamedInterval>
<Identifier> is <IntervalDefinition>
<interval> | Integer

Declaration of Color Domains (Composition of Color Classes)

domain <ListDomainDeclarations>
<DomainDeclaration> |
<ListDomainDeclarations> <DomainDeclaration>
<ListDomainNames> is <DomainDescription>;
<DomainIdentifier> |
<ListDomainNames> <DomainIdentifier>
<ProductDefinition> |
<BagDefinition> |
<Component> |
<ComponentList>, <Component>
<ClassIdentifier> |
<DomainIdentifier> |
bag (<ClassIdentifier>)

Declaration of variables

var <ListVariableDeclarations>
<VariableDeclaration> |
<ListVariableDeclarations> <VariableDeclaration>
<ListVariableNames> in [unique] Component;
<VariableIdentifier> |
<ListVariableNames>, <VariableIdentifier>

Grammar for Arc Valuations

<ListElementaryExpr> |
<ElementaryExpression> |
<ElementaryExpression> + <ElementaryExpression> |
<ElementaryExpression> - <ElementaryExpression>
<ElementaryProduct> |
<Coefficient> * <ElementaryProduct>
<PositiveInteger> |
ord (<VariableIdentifier>) |
ord (<ClassIdentifier>.<LitteralValue>)
<<ListProdElements> >
<ListProdElements> |
<ListProdElements>, <ProdElement>
<ElementaryExpression> |
<VarClassElement> |
<SimpleBagOperators> |
<VariableIdentifier> |
<ClassIdentifier>.<LitteralValue> |
<VariableIdentifier>++<PositiveInteger> |
<VariableIdentifier>--<PositiveInteger> |
<Integer> | <Identifier>
<VarClassElement> |
(<RecursiveBagOperators>) |
<RecursiveBagOperators> <BagOperation> <RecursiveBagOperators> |
<SimpleBagOperators> |
union | inter | diff

Grammar for Transition Guards

true | false | [ <Guard> ]
not <Guard> |
(<Guard>) |
<Guard> and <Guard> |
<Guard> or <Guard> |
<GuardOperand> <RelOperation> <GuardOperand> |
unique (<GuardOperand>) |
card (<GuardOperand>) <RelOperation> <NaturalInteger>|
<VariableIdentifier> in <ClassIdentifier>|
<SimpleBagOperators> <InclusionOperator> <SimpleBagOperators>
<VarClassElement> |
= | <> | < | > | <= | >=
included | strictincluded

Grammar for Place Marking

<Marking> |
<InitialMarking> <Marking>
<ElementaryProduct> |
<PositiveInteger> * <ElementaryProduct>