Add support for PSL's non-length-matching And.
* src/ltlast/multop.cc, src/ltlast/multop.hh: Declare AndNML
operator.
* src/ltlparse/ltlscan.ll: Distinguish "&" and "&&".
* src/ltlparse/ltlparse.yy: Handle them both as "And" for LTL
formula, use AndNML or And for rational expressions.
* src/ltlvisit/tostring.cc: Adjust to distinguish "&" and "&&" in
rational expressions. Also use {braces} to group rational
expressions.
* src/tgbaalgos/ltl2tgba_fm.cc
(ratexp_trad_visitor::ratexp_trad_visitor): Remove the possibility
to select the empty_word should act like true, and fix the rules
for Closure and NegClosure to rely on constant_term instead.
(ratexp_trad_visitor::visit) Adjust the And translation to also
support AndNML.
(ratexp_trad_visitor::recurse_and_concat): Introduce this new
method to simplify some calls to recurse(f, to_concat_).
* src/tgbatest/ltl2tgba.test: Add more test cases.
* src/ltlvisit/basicreduce.cc, src/ltlvisit/consterm.cc,
src/ltlvisit/contain.cc, src/ltlvisit/mark.cc,
src/ltlvisit/nenoform.cc, src/ltlvisit/syntimpl.cc,
src/tgba/formula2bdd.cc, src/tgbaalgos/eltl2tgba_lacim.cc,
src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_lacim.cc: Add
missing cases in switches.
This commit is contained in:
parent
1ecc6984d3
commit
bbb645e1fc
17 changed files with 238 additions and 100 deletions
|
|
@ -41,7 +41,7 @@ namespace spot
|
|||
class multop : public ref_formula
|
||||
{
|
||||
public:
|
||||
enum type { Or, And, Concat, Fusion };
|
||||
enum type { Or, And, AndNLM, Concat, Fusion };
|
||||
|
||||
/// List of formulae.
|
||||
typedef std::vector<formula*> vec;
|
||||
|
|
@ -80,15 +80,24 @@ namespace spot
|
|||
/// are also taken care of. The following rewriting are performed
|
||||
/// (the left patterns are rewritten as shown on the right):
|
||||
///
|
||||
/// - Concat(Exps1...,[*0],Exps2...) = Concat(Exps1...,Exps2...)
|
||||
/// - Concat(Exps1...,0,Exps2...) = 0
|
||||
/// - Concat(Exp) = Exp
|
||||
/// - And(Exps1...,1,Exps2...) = And(Exps1...,Exps2...)
|
||||
/// - And(Exps1...,0,Exps2...) = 0
|
||||
/// - And(Exps1...,[*0],Exps2...) = [*0] if no Expi is 0.
|
||||
/// - And(Exp) = Exp
|
||||
/// - AndNLM(Exps1...,1,Exps2...) = AndNLM(Exps1...,Exps2...)
|
||||
/// - AndNLM(Exps1...,0,Exps2...) = 0
|
||||
/// - AndNLM(Exps1...,[*0],Exps2...) = AndNLM(Exps1...,Exps2...)
|
||||
/// - AndNLM(Exp) = Exp
|
||||
/// - Or(Exps1...,1,Exps2...) = 1
|
||||
/// - Or(Exps1...,0,Exps2...) = And(Exps1...,Exps2...)
|
||||
/// - Or(Exp) = Exp
|
||||
/// - Concat(Exps1...,[*0],Exps2...) = Concat(Exps1...,Exps2...)
|
||||
/// - Concat(Exps1...,0,Exps2...) = 0
|
||||
/// - Concat(Exp) = Exp
|
||||
/// - Fusion(Exps1...,1,Exps2...) = Concat(Exps1...,Exps2...)
|
||||
/// - Fusion(Exps1...,0,Exps2...) = 0
|
||||
/// - Fusion(Exps1...,[*0],Exps2...) = 0
|
||||
/// - Fusion(Exp) = Exp
|
||||
static formula* instance(type op, vec* v);
|
||||
|
||||
virtual void accept(visitor& v);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue