1. 15 May, 2003 1 commit
    • Alexandre Duret-Lutz's avatar
      Massage the AST so that identical sub-formula share the same · 5f6d8b62
      Alexandre Duret-Lutz authored
      reference-counted formula*.  One can't call constructors for AST
      items anymore, everything need to be acquired through instance()
      class methods.
      
      * src/ltlast/formula.cc, src/ltlast/refformula.cc,
      src/ltlast/refformula.hh: New files.
      * src/ltlast/Makefile.am (libltlast_la_SOURCES): Add them.
      * src/ltlast/atomic_prop.cc, src/ltlast/atomic_prop.hh,
      src/ltlast/unop.cc, src/ltlast/unop.hh,
      src/ltlast/binop.cc, src/ltlast/binop.hh: Make the constructor
      and destructor protected.  Define a static function `instance()'
      to get an instance with specific argument.  Use a map called
      `instances' to store all known instances.  Inherit from
      ref_formula.
      * src/ltlast/constant.hh, src/ltlast/constant.cc: Protect
      the constructor and destructor.  Provide the false_instance()
      and true_instance() functions instead.
      * src/formula.hh (ref, unref, ref_, unref_): New methods.
      * src/ltlast/multop.cc, src/ltlast/multop.hh: Protect
      the constructor, destructor, as well as the add() method.
      Provides the instance(), and add() class methods instead.
      Store children_ as a pointer.
      * src/ltlenv/defaultenv.cc (require): Adjust to
      call atomic_prop::instance.
      * src/ltlparse/ltlparse.yy: Adjust to call instance() functions
      instead of constructors.
      * src/ltltest/Makefile.am (LDADD): Tweak library ordering.
      * src/ltlvisit/clone.hh (clone_visitor): Inherit from visitor,
      not const_visitor, and adjust all prototypes appropriately.
      * src/ltlvisit/clone.cc (clone_visitor): Likewise.
      Call ref() or instance() methods instead of copy constructors.
      * src/ltlvisit/equals.cc: Simplify atomic_prop and constant
      cases.
      * src/ltlvisit/lunabbrev.hh, src/ltlvisit/lunabbrev.cc,
      src/ltlvisit/tunabbrev.hh, src/ltlvisit/tunabbrev.cc,
      src/ltlvisit/nenoform.hh, src/ltlvisit/nenoform.cc: Use instance()
      methods instead of constructor.  Make these children of visitor, not
      const_visitor.
      * src/ltltest/readltl.c (main): Do not delete the formula.
      5f6d8b62
  2. 18 Apr, 2003 1 commit
    • Alexandre Duret-Lutz's avatar
      * src/ltlast/atomic_prop.hh, src/ltlast/binop.hh, · d35817cc
      Alexandre Duret-Lutz authored
      src/ltlast/constant.hh, src/ltlast/formula.hh,
      src/ltlast/multop.hh, src/ltlast/unop.hh, src/ltlast/visitor.hh,
      src/ltlenv/defaultenv.hh, src/ltlenv/environment.hh,
      src/ltlparse/public.hh, src/ltlvisit/clone.hh,
      src/ltlvisit/dotty.hh, src/ltlvisit/dump.hh,
      src/ltlvisit/equals.hh, src/ltlvisit/lunabbrev.hh,
      src/ltlvisit/nenoform.hh, src/ltlvisit/tunabbrev.hh: Add
      Doxygen comments.
      * src/visitor.hh: Do not use const_sel.  This clarify
      the code and helps Doxygen.
      d35817cc
  3. 17 Apr, 2003 2 commits
  4. 16 Apr, 2003 5 commits
    • Alexandre Duret-Lutz's avatar
      * src/ltlvisit/tunabbrev.cc, src/ltlvisit/tunabbrev.hh: New files. · 080214eb
      Alexandre Duret-Lutz authored
      * src/ltlvisit/Makefile.am (libltlvisit_a_SOURCES): Add them.
      * src/ltltest/tunabbrev.test: New file.
      * src/ltltest/lunabbrev.test: Fix comment.
      * src/ltltest/Makefile.am (TESTS): Add tunabbrev.test.
      (check_PROGRAMS): Add tunabbrev.
      (tunabbrev_SOURCES, tunabbrev_CPPFLAGS): New variables.
      * src/ltltest/equals.cc (main) [TUNABBREV]: Call unabbreviate_ltl.
      * src/ltlvisit/lunabbrev.hh (unabbreviate_logic_visitor::recurse):
      New virtual function.
      * src/ltlvisit/lunabbrev.cc (unabbreviate_logic_visitor::recurse):
      Likewise.
      (unabbreviate_logic_visitor::visit): Use it instead of calling
      unabbreviate_logic directly.
      080214eb
    • Alexandre Duret-Lutz's avatar
    • Alexandre Duret-Lutz's avatar
      * src/ltlvisit/lunabbrev.cc, src/ltlvisit/lunabbrev.hh: New files. · 526012a7
      Alexandre Duret-Lutz authored
      * src/ltlvisit/Makefile.am (libltlvisit_a_SOURCES): Add them.
      * src/ltlast/multop.cc (multop::multop(type)): New constructor.
      * src/ltlast/multop.hh (multop::multop(type)): New constructor.
      * src/ltltest/lunabbrev.test: New file.
      * src/ltltest/Makefile.am (TESTS): Add lunabbrev.test.
      (check_PROGRAMS): Add lunabbrev.
      (lunabbrev_SOURCES, lunabbrev_CPPFLAGS): New variables.
      * src/ltltest/equals.cc (main) [LUNABBREV]: Call unabbreviate_logic.
      526012a7
    • Alexandre Duret-Lutz's avatar
      * src/ltlast/formulae.hh: Rename as ... · ef2d6323
      Alexandre Duret-Lutz authored
      * src/ltlast/formula.hh: ... this.
      * src/ltlast/Makefile.am (libltlast_a_SOURCES): Adjust.
      * src/ltlast/formula.hh (formulae): Rename as ...
      (formula): ... this.
      Adjust all uses.
      ef2d6323
    • Alexandre Duret-Lutz's avatar
      * src/ltlvisit/equals.cc, src/ltlvisit/equals.hh: New files. · 7425f4a9
      Alexandre Duret-Lutz authored
      * src/ltlvisit/Makefile.am (libltlvisit_a_SOURCES): Add equals.hh
      and equals.cc.
      * src/ltltest/equals.cc, src/ltltest/equals.test: New files.
      * src/ltltest/Makefile.am (check_PROGRAMS): Add equals.
      (equals_SOURCES): New variable.
      (TESTS): Add equals.test.
      7425f4a9