Franck Pommereau

updated doc

...@@ -1507,11 +1507,22 @@ class Inhibitor (Test) : ...@@ -1507,11 +1507,22 @@ class Inhibitor (Test) :
1507 """Like `Test`, it works by encapsulating another annotation. 1507 """Like `Test`, it works by encapsulating another annotation.
1508 Additionally, a condition may be given which allows to select 1508 Additionally, a condition may be given which allows to select
1509 the forbidden tokens more precisely. This is generally better 1509 the forbidden tokens more precisely. This is generally better
1510 - to make this selection at thise level rather that at the level 1510 + to make this selection at this level rather that at the level
1511 of a transition guard: indeed, in the latter case, we may 1511 of a transition guard: indeed, in the latter case, we may
1512 build many modes and reject most of them because of the guard; 1512 build many modes and reject most of them because of the guard;
1513 while in the former case, we will not build these modes at 1513 while in the former case, we will not build these modes at
1514 all. 1514 all.
1515 +
1516 + For instance:
1517 + * `Inhibitor(Value(3))` ensures that there is no token whose
1518 + value is `3` in the place when the transition is fired
1519 + * `Inhibitor(Variable('x'))` ensures that there is no token
1520 + at all in the place
1521 + * `Inhibitor(Variable('x'), Expression('x<3'))` ensures that
1522 + there is no token whose value is less that `3`
1523 + * `Inhibitor(MultiArc([Variable('x'), Variable('y')]),
1524 + Expression('x>y'))` ensures that there is no pair of
1525 + tokens such that one is greater that the other
1515 """ 1526 """
1516 self._annotation = annotation 1527 self._annotation = annotation
1517 if hasattr(annotation, "globals") : 1528 if hasattr(annotation, "globals") :
...@@ -1553,6 +1564,7 @@ class Inhibitor (Test) : ...@@ -1553,6 +1564,7 @@ class Inhibitor (Test) :
1553 return Tree(self.__pnmltag__, None, 1564 return Tree(self.__pnmltag__, None,
1554 Tree("annotation", None, Tree.from_obj(self._annotation)), 1565 Tree("annotation", None, Tree.from_obj(self._annotation)),
1555 Tree("condition", None, Tree.from_obj(self._condition))) 1566 Tree("condition", None, Tree.from_obj(self._condition)))
1567 + # apidoc skip
1556 @classmethod 1568 @classmethod
1557 def __pnmlload__ (cls, tree) : 1569 def __pnmlload__ (cls, tree) :
1558 """Create a `Inhibitor` from a PNML tree 1570 """Create a `Inhibitor` from a PNML tree
......