1. 28 Apr, 2012 29 commits
    • Alexandre Duret-Lutz's avatar
      Add support the bounded star operator [*i..j]. · 126b724a
      Alexandre Duret-Lutz authored
      * src/ltlast/bunop.hh, src/ltlast/bunop.cc: New files for
      bounded unary operators.
      * src/ltlast/Makefile.am, src/ltlast/allnodes.hh: Add them.
      * src/ltlast/predecl.hh (bunop): Declare.
      * src/ltlast/unop.hh, src/ltlast/unop.cc (Star): Remove
      declaration of Star and associated code.
      * src/ltlast/visitor.hh: Add visit(bunop* node) methods.
      * src/ltlparse/ltlparse.yy, src/ltlparse/ltlscan.ll: Add parse
      rules for LTL.  This required passing the parse_error list
      to the lexer, so it can report scanning errors when it reads
      a number that does not fit in an unsigned int.
      * src/ltlparse/parsedecl.hh (YY_DECL): Take error_list
      as third argument.
      * src/ltltest/consterm.test, src/ltltest/tostring.test,
      src/ltltest/equals.test, src/tgbatest/ltl2tgba.test: More tests.
      * src/ltlvisit/basicreduce.cc, src/ltlvisit/clone.cc,
      src/ltlvisit/clone.hh, src/ltlvisit/consterm.cc,
      src/ltlvisit/dotty.cc, src/ltlvisit/mark.cc,
      src/ltlvisit/nenoform.cc, src/ltlvisit/postfix.cc,
      src/ltlvisit/postfix.hh, src/ltlvisit/reduce.cc,
      src/ltlvisit/syntimpl.cc, src/ltlvisit/tostring.cc,
      src/ltlvisit/tunabbrev.cc, src/tgba/formula2bdd.cc,
      src/tgbaalgos/eltl2tgba_lacim.cc, src/tgbaalgos/ltl2taa.cc,
      src/tgbaalgos/ltl2tgba_lacim.cc: Adjust syntax to use
      "bunop::Star" instead of "unop::Star".
      * src/tgbaalgos/ltl2tgba_fm.cc: Likewise, but also adjust
      the code to handle the bounds of the operator.
      126b724a
    • Alexandre Duret-Lutz's avatar
      Print '{!a}*' rather than '!a*'. · 47b2bea8
      Alexandre Duret-Lutz authored
      * src/ltlvisit/tostring.cc: Use braces for unary operators in
      Star.
      * src/ltltest/tostring.test: Add some PSL formulae, it cannot
      hurt.
      47b2bea8
    • Alexandre Duret-Lutz's avatar
      Fix deterministic translation of []->. · aef6c1a0
      Alexandre Duret-Lutz authored
      * src/tgbaalgos/ltl2tgba_fm.cc (ratexp_trad_visitor::visit): Fix
      the "deterministic case" of []->, and merge it with the
      non-deterministic case.
      aef6c1a0
    • Alexandre Duret-Lutz's avatar
      Recognize and use "*" (or "[*]") as an abbreviation for 1*. · 93c042d0
      Alexandre Duret-Lutz authored
      * src/ltlparse/ltlparse.yy: Recognize "*" as "1*".
      * src/ltlvisit/tostring.cc: Abbreviate "1*" as "*".
      * src/tgbatest/ltl2tgba.test: Use the new syntax.
      93c042d0
    • Alexandre Duret-Lutz's avatar
      Support non-overlapping concatenations operators []=> and <>=>. · 4bde130d
      Alexandre Duret-Lutz authored
      * src/ltlparse/ltlscan.ll: Recognize "[]=>" (a.k.a "|=>") and "<>=>".
      * src/ltlparse/ltlparse.yy: Support them by rewriting them using
      "[]->" and "<>->".
      * src/tgbatest/ltl2tgba.test: More tests.
      4bde130d
    • Alexandre Duret-Lutz's avatar
      Allow boolean atoms to be negated in rational expressions. · 4aa82ec7
      Alexandre Duret-Lutz authored
      * src/ltlparse/ltlparse.yy (rationalexp): Recognize "OP_NOT
      booleanatom".
      * src/ltlvisit/consterm.cc, src/tgbaalgos/ltl2tgba_fm.cc: Adjust.
      * src/tgbatest/ltl2tgba.test: Add one test.
      4aa82ec7
    • Alexandre Duret-Lutz's avatar
      Add support for PSL's non-length-matching And. · bbb645e1
      Alexandre Duret-Lutz authored
      * 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.
      bbb645e1
    • Alexandre Duret-Lutz's avatar
      Accept "{E}|->ltl" and "{E}(ltl)" as synonym for "{E}[]->ltl". · 1ecc6984
      Alexandre Duret-Lutz authored
      * src/ltlparse/ltlparse.yy (parenthesedsubformula): Extract these
      rules from...
      (subformula): ... here, and use it to recognize "{SERE}(formula)".
      * src/ltlparse/ltlscan.ll: Recognize "|->" as "[]->".
      * src/ltltest/equals.test: Test these two new syntaxes.
      1ecc6984
    • Alexandre Duret-Lutz's avatar
      Use [*0] instead of #e, and support [*] in addition to *. · 8b8633de
      Alexandre Duret-Lutz authored
      * src/ltlparse/ltlscan.ll: Recognize [*] as *, and use
      [*0] instead of #e for the empty word.
      * src/ltlast/binop.cc, src/ltlast/constant.cc,
      src/ltlast/multop.cc, src/ltlast/multop.hh, src/ltlast/unop.cc,
      src/ltlast/unop.hh, src/ltltest/consterm.test,
      src/ltltest/equals.test: Adjust all occurrences of #e to [*0].
      * src/tgbatest/ltl2tgba.test: Also use [*].
      8b8633de
    • Alexandre Duret-Lutz's avatar
      Support braces in addition to parentheses in rational expressions. · 4e7233d9
      Alexandre Duret-Lutz authored
      * src/ltlparse/ltlparse.yy (rationalexp): Allow bracedrationalexp.
      * src/ltltest/consterm.test, src/tgbatest/ltl2tgba.test: Add more
      tests.
      4e7233d9
    • Alexandre Duret-Lutz's avatar
      Add support for {SERE} and !{SERE} closure operators. · 2f8c4ac8
      Alexandre Duret-Lutz authored
      * src/ltlast/unop.hh, src/ltlast/unop.cc: Introduce Closure and
      NegClosure operators.
      * src/ltlparse/ltlparse.yy: Recognize {foo} as a Closure.
      * src/ltlvisit/mark.cc: Consider NegClosure as a marked operator.
      * src/tgbaalgos/ltl2tgba_fm.cc (ratexp_trad_visitor): Add option to
      select whether the empty_word should act like true (for {SERE}
      and {!SERE}) or false (for {SERE}<>->Exp or {SERE}[]->Exp).
      (ltl_trad_visitor): Translate Closure and NegClosure.
      * src/tgbatest/ltl2tgba.test: Add more tests.
      * src/ltlvisit/basicreduce.cc, src/ltlvisit/consterm.cc,
      src/ltlvisit/nenoform.cc, src/ltlvisit/reduce.cc,
      src/ltlvisit/syntimpl.cc, src/ltlvisit/tostring.cc,
      src/ltlvisit/tunabbrev.cc, src/tgba/formula2bdd.cc,
      src/tgbaalgos/eltl2tgba_lacim.cc, src/tgbaalgos/ltl2tgba_lacim.cc,
      src/tgbaalgos/ltl2taa.cc: Straightforward update to support or
      assert on these new operators.
      2f8c4ac8
    • Alexandre Duret-Lutz's avatar
      Build deterministic automata for []-> operators. · f618e6bc
      Alexandre Duret-Lutz authored
      * src/tgbaalgos/ltl2tgba_fm.cc (ltl_trad_visitor::visit): Honor
      exprop_ while handling the binop::UConcat case.
      f618e6bc
    • Alexandre Duret-Lutz's avatar
      Adjust Python tests to the new simplification rules. · 916c1542
      Alexandre Duret-Lutz authored
      * wrap/python/tests/ltlsimple.py: Adjust.
      916c1542
    • Alexandre Duret-Lutz's avatar
      Build deterministic automata for <>-> operators. · dbdd3701
      Alexandre Duret-Lutz authored
      * src/tgbaalgos/ltl2tgba_fm.cc (ltl_trad_visitor): Take
      an exprop argument, and use it while translation <>-> operators.
      * src/tgbatest/ltl2tgba.test (check_psl): Use -x too.
      dbdd3701
    • Alexandre Duret-Lutz's avatar
      Parse the fusion operator (":") and translate it in ltl2tgba_fm(). · c2b3dac7
      Alexandre Duret-Lutz authored
      * src/ltlast/multop.hh (multop::type::Fusion): New operator.
      * src/ltlast/multop.cc: Handle it.
      * src/ltlparse/ltlparse.yy: Declare OP_FUSION and add grammar
      rules.
      * src/ltlparse/ltlscan.ll: Recognize ":" as OP_FUSION.
      * src/tgbaalgos/ltl2tgba_fm.cc (ratexp_trad_visitor::visit):
      Add translation rule for multop::Fusion.
      * src/tgbatest/ltl2tgba.test: Add more tests.
      * 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/ltlvisit/tostring.cc, src/tgba/formula2bdd.cc,
      src/tgbaalgos/eltl2tgba_lacim.cc, src/tgbaalgos/ltl2taa.cc,
      src/tgbaalgos/ltl2tgba_lacim.cc: Handle multop::Fusion in switches.
      c2b3dac7
    • Alexandre Duret-Lutz's avatar
      Do not assume that concatenation cannot accept the empty word. · ad519b85
      Alexandre Duret-Lutz authored
      For instance "(a+#e);(b+#e);(c*)" does.
      
      * src/ltlvisit/consterm.cc: Fix handling of Concat operator.
      * src/ltltest/consterm.test: Add more tests.
      ad519b85
    • Alexandre Duret-Lutz's avatar
      Update the FM translation to handle <>->, []->, *, ;, #e. · bd9136a9
      Alexandre Duret-Lutz authored
      * src/tgbaalgos/ltl2tgba_fm.cc: Implement translation for
      recently introduced operators.
      * src/tgbatest/ltl2tgba.test: Add some PSL tests.
      bd9136a9
    • Alexandre Duret-Lutz's avatar
      Visitors to transform <>-> into <>+> or to detect the latter. · 21e89f40
      Alexandre Duret-Lutz authored
      * src/ltlvisit/mark.cc, src/ltlvisit/mark.hh: New files.
      * src/ltlvisit/Makefile.am: Add mark.hh and mark.cc.
      21e89f40
    • Alexandre Duret-Lutz's avatar
      Introduce EConcatMarked "<>+>" as operator. · 171ca678
      Alexandre Duret-Lutz authored
      * src/ltlast/binop.cc, src/ltlast/binop.hh: Introduce
      EConcatMarked ("<>+>").
      * src/ltlvisit/basicreduce.cc, src/ltlvisit/consterm.cc,
      src/ltlvisit/lunabbrev.cc, src/ltlvisit/nenoform.cc,
      src/ltlvisit/reduce.cc, src/ltlvisit/simpfg.cc,
      src/ltlvisit/syntimpl.cc, src/ltlvisit/tostring.cc,
      src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/eltl2tgba_lacim.cc,
      src/tgbaalgos/ltl2tgba_lacim.cc, src/tgba/formula2bdd.cc,
      src/tgba/formula2bdd.cc: Deal with it if possible or ignore
      it.
      171ca678
    • Alexandre Duret-Lutz's avatar
      Simplify #e in conjunctions. · 66317db4
      Alexandre Duret-Lutz authored
      * src/ltlast/multop.cc: Handle it.
      66317db4
    • Alexandre Duret-Lutz's avatar
      Simplify {#e}[]->Exp and {#e}<>->Exp. · 76528ee2
      Alexandre Duret-Lutz authored
      * src/ltlast/binop.cc: Add simplification rules.
      76528ee2
    • Alexandre Duret-Lutz's avatar
      more tests for rational operator simplifications. · fc7c2943
      Alexandre Duret-Lutz authored
      * src/ltltest/nenoform.test, src/ltltest/equals.test,
      src/ltltest/consterm.test: Update tests for rational ops.
      * src/ltltest/consterm.cc: Use parse_ratexp().
      * src/ltlast/binop.cc: Fix simplification rules for []-> and
      <>->.
      fc7c2943
    • Alexandre Duret-Lutz's avatar
      Enable parsing stand-alone rational expressions with the LTL parser. · 9aebb80e
      Alexandre Duret-Lutz authored
      * src/ltlparse/ltlparse.yy (parse_ratexp): New function.
      (START_LTL, START_RATEXP): Add these new tokens.
      (result): Parse and LTL formula or a rational expression depending
      on the start symbol.
      * src/ltlparse/public.hh (parse_ratexp): New function.
      * src/ltlparse/parsedecl.hh (flex_set_buffer): Add a new argument
      to set the starting rule.
      * src/ltlparse/ltlscan.ll (flex_set_buffer): Adjust.
      (start_token): New global variable.  Return this as first token if
      it is set.
      9aebb80e
    • Alexandre Duret-Lutz's avatar
      Add []-> and <>->. · c6dd811b
      Alexandre Duret-Lutz authored
      * src/ltlast/binop.hh, src/ltlast/binop.cc (EConcat, UConcat):
      Add these new operators.
      * src/ltlparse/ltlparse.yy, src/ltlparse/ltlscan.ll: Parse
      these new operators.
      * src/ltlvisit/simpfg.cc, src/ltlvisit/syntimpl.cc,
      src/ltlvisit/tostring.cc, src/ltlvisit/basicreduce.cc,
      src/ltlvisit/consterm.cc, src/ltlvisit/lunabbrev.cc,
      src/ltlvisit/nenoform.cc, src/ltlvisit/reduce.cc
      src/tgba/formula2bdd.cc, src/tgbaalgos/eltl2tgba_lacim.cc,
      src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_fm.cc,
      src/tgbaalgos/ltl2tgba_lacim.cc: Add these new operators into the
      switches.
      c6dd811b
    • Alexandre Duret-Lutz's avatar
      Add a constant_term() visitor to decide whether #e is accepted. · 97b7211b
      Alexandre Duret-Lutz authored
      * src/ltlvisit/Makefile.am: Add consterm.cc and consterm.hh.
      * src/ltlvisit/consterm.hh, src/ltlvisit/consterm.cc: New files.
      * src/ltltest/Makefile.am: Add consterm.cc and consterm.test.
      * src/ltltest/consterm.cc, src/ltltest/consterm.test: New files.
      97b7211b
    • Alexandre Duret-Lutz's avatar
      more files to ignore · 2d1aa0a5
      Alexandre Duret-Lutz authored
      2d1aa0a5
    • Alexandre Duret-Lutz's avatar
      Introduce rational operators and trivial simplification rules. · 546559b8
      Alexandre Duret-Lutz authored
      Trivial simplifications rules (such as "FFa=Fa" or "x&1=x")
      are performed any time a formule is instanciated.
      
      * src/ltlast/constant.hh, src/ltlast/constant.cc
      (true_instance, true_instance_): Declare the true_instance_ as a
      static member, and move true_instance() into the .hh so it gets
      inlined.  Have true_instance_ as a class variable will ensure that
      it is the first formula instantiated.  Binop simplifications rely
      on this to order arguments.
      (false_instance, false_instance_): Likewise.
      (empty_word_instance, empty_word_instance_): New method and static
      member.
      * src/ltlast/formula.hh (formula::formula): If max_count_ ever
      loops, skip the first three values so that constants always have
      smaller hash codes.
      * src/ltlast/binop.hh, src/ltlast/binop.cc (instance): Add
      simplifications and document them.
      * src/ltlast/multop.hh (multop::Concat): New operator.
      * src/ltlast/multop.cc (op_name): Handle Concat.
      (instance): Inline Concat arguments without reordering.  Handle
      absorbent and neutral elements for all operators.
      * src/ltlast/unop.hh (unop::Star): New operator.
      * src/ltlast/unop.cc (op_name): Handle Star.
      (instance): Handle Star, and add trivial simplifications for
      other unary operators.
      * src/ltlparse/ltlparse.yy (OP_CONCAT, OP_STAR, CONST_EMPTYWORD):
      Declare these new operators and add rules for them.
      * src/ltlparse/ltlscan.ll (OP_CONCAT, OP_STAR, CONST_EMPTYWORD):
      Output these new operators.
      * src/ltltest/equals.test: New tests.
      * src/ltltest/parse.test: Remove redundant test.
      * src/ltltest/tunabbrev.test, src/tgbatest/emptchk.test: Adjust tests.
      * src/ltlvisit/basicreduce.cc, src/ltlvisit/contain.cc,
      src/ltlvisit/nenoform.cc, src/ltlvisit/reduce.cc,
      src/ltlvisit/syntimpl.cc, src/ltlvisit/tostring.cc,
      src/ltlvisit/tunabbrev.cc: Complete visitors to handle new
      operators.
      * src/ltltest/nenoform.test: More tests.
      * src/ltlvisit/lunabbrev.cc (unabbreviate_logic_visitor::visit):
      Clone formulae before instance() function actually have a chance
      to destroy them.
      * src/tgba/formula2bdd.cc, src/tgbaalgos/eltl2tgba_lacim.cc,
      src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_fm.cc,
      src/tgbaalgos/ltl2tgba_lacim.cc: Adjust switches to assert on new
      operators.
      546559b8
    • Alexandre Duret-Lutz's avatar
      Apply ACI rules to multop formulae. · 4fcc4f82
      Alexandre Duret-Lutz authored
      * src/ltlast/multop.cc (instance): Handle neutral and absorbent
      elements for the operator.
      * src/ltltest/equals.test: Add more tests.
      4fcc4f82
    • Alexandre Duret-Lutz's avatar
      Summarize recent changes. · 4e1a68e6
      Alexandre Duret-Lutz authored
      * NEWS: Here.
      4e1a68e6
  2. 27 Apr, 2012 10 commits
  3. 18 Apr, 2012 1 commit
    • Thomas Badie's avatar
      Add the simulation in the Spot web interface. · dfcaed03
      Thomas Badie authored
      * wrap/python/ajax/spot.in: Add the simulation.
      * wrap/python/ajax/protocol.txt: Add the direct simulation in the
      automaton simplifications section.
      * wrap/python/spot.i (simulation_new): Create a function which
      takes an automaton and a call to the simulation with the good
      template parameter.
      * wrap/python/ajax/ltl2tgba.html: Add the direct simulation
      checkbox.
      dfcaed03