Colin THOMAS

Update README.md

Showing 1 changed file with 30 additions and 3 deletions
1 -# Python ITS model checker 1 +# Python CTL model checker
2 2
3 Given a model (the symbolic representation of the statespace and the transition relation) build an object able to symbolically compute the set of states satistfying a formula (CTL, Fair CTL, wip : ACTL and ARCTL). 3 Given a model (the symbolic representation of the statespace and the transition relation) build an object able to symbolically compute the set of states satistfying a formula (CTL, Fair CTL, wip : ACTL and ARCTL).
4 4
5 -
6 ## Requirement 5 ## Requirement
7 - `pyddd` [https://github.com/fpom/pyddd](https://github.com/fpom/pyddd) 6 - `pyddd` [https://github.com/fpom/pyddd](https://github.com/fpom/pyddd)
8 - `pytl` [https://github.com/fpom/pytl](https://github.com/fpom/pytl) 7 - `pytl` [https://github.com/fpom/pytl](https://github.com/fpom/pytl)
...@@ -12,8 +11,36 @@ Given a model (the symbolic representation of the statespace and the transition ...@@ -12,8 +11,36 @@ Given a model (the symbolic representation of the statespace and the transition
12 The symbolic representation of the model must be : 11 The symbolic representation of the model must be :
13 - a sdd for the state space (see [pyddd](https://github.com/fpom/pyddd)) 12 - a sdd for the state space (see [pyddd](https://github.com/fpom/pyddd))
14 - a shom for the precedence relation (see [pyddd](https://github.com/fpom/pyddd)) 13 - a shom for the precedence relation (see [pyddd](https://github.com/fpom/pyddd))
15 - 14 +
15 +Instantiated with such symbolic representation, the object can be called with the method check on a formula (represented by a string which will be parsed by [pytl](https://github.com/fpom/pytl) or by a `pytl.Phi` object).
16 +The method `check` returns the sdd representing the states that satisfy the formula.
17 +
18 +
19 +Example :
20 +
21 + from pymc import CTL_model_checker, FairCTL_model_checker
22 + %run -m ecco termites-simpler.rr
23 + v = model("test",split=False, force=True)
24 + formula = "AF E(Sd U Fg & Te)"
25 + CTL_mc = CTL_model_checker(v.g.reachable, v.g.m.pred())
26 + FairCTL_mc = FairCTL_model_checker(v.g.reachable, v.g.m.pred(),["~Ac"])
27 + v.g.initial<=CTL_mc.check(formula)
28 + v.g.initial<=FairCTL_mc.check(formula)
29 +
30 +
16 ### CTL 31 ### CTL
17 32
33 +Supports the operators :
34 + - unarry : `EX, EF, EG, AX, AF, AG`
35 + - binary : `EU, EW, ER, AU, AW, AR`
18 36
19 ### Fair CTL 37 ### Fair CTL
38 +
39 +The evaluation of the formula is restricter to the trajectoriers verifying fairness constraints of the form `AND([GF f for f in fairness])`.
40 +An additional argument must be given at initialization, representing the fairness constraints :
41 + - a list of strings, Phi objects or sdd, representing the list of fairness constraints : [f1, f2,...]
42 + - a single string, Phi or sdd, representing a single fairness constraint
43 +
44 +Supports the operators :
45 + - unarry : `EX, EF, EG, AX, AF, AG`
46 + - binary : `EU, AU`
......