1. 22 Jun, 2012 4 commits
    • Akim Demaille's avatar
      wip: does not work. · 791e646f
      Akim Demaille authored
      and really, I don't understand why.  Is this a limitation
      of C++11, or of G++ (4.7 and 4.8)?
      * vcsn/algos/aut_to_exp.hh: .
      791e646f
    • Akim Demaille's avatar
      aut_to_exp: next by degree. · 2d72a638
      Akim Demaille authored
      This is not convincing at all.
      
        pprat -H degree -a 'a(a+bcd*)*' | wc -c => 2653
        pprat -H order  -a 'a(a+bcd*)*' | wc -c => 968
      
      * vcsn/algos/aut_to_exp.hh (aut_to_exp_in_degree): New.
      * tests/rat/pprat.cc: Use it.
      2d72a638
    • Akim Demaille's avatar
      formatting changes. · 0e39a747
      Akim Demaille authored
      * tests/rat/pprat.cc: here.
      0e39a747
    • Akim Demaille's avatar
      pprat: fix error messages. · d4905cf2
      Akim Demaille authored
      * tests/rat/pprat.cc: here.
      * tests/rat/interface.rat: Adjust.
      d4905cf2
  2. 19 Jun, 2012 13 commits
  3. 18 Jun, 2012 4 commits
    • Akim Demaille's avatar
      comment changes. · 30b0dfe3
      Akim Demaille authored
      * vcsn/core/rat/abstract_kratexpset.hh: here.
      30b0dfe3
    • Akim Demaille's avatar
      standard-of: move to vcsn::. · 1bc12659
      Akim Demaille authored
      * vcsn/algos/standard_of.hh: here.
      * tests/rat/pprat.cc: Adjust.
      * NEWS.txt: Adjust.
      1bc12659
    • Akim Demaille's avatar
      kratexp. · 9e56a2b6
      Akim Demaille authored
      * vcsn/ctx/ctx.hh, vcsn/core/rat/fwd.hh (kratexp): New.
      * vcsn/algos/standard_of.hh: Use it.
      * NEWS.txt: Doc.
      9e56a2b6
    • Akim Demaille's avatar
      ratexp: atom_value_t -> label_t. · 4c95aeb4
      Akim Demaille authored
      Now that we use the same context for both automata and rational
      expressions, using label to denote the value of the atom not only is
      simpler, it was also approved, together with Alexandre Duret-Lutz, as
      pleasant.
      
      * vcsn/core/rat/abstract_kratexpset.hh, vcsn/core/rat/fwd.hh,
      vcsn/core/rat/kratexp.hh, vcsn/core/rat/kratexp.hxx,
      vcsn/core/rat/kratexpset.hh, vcsn/core/rat/visitor.hh,
      vcsn/core/rat/visitor.hxx:
      s/Atom/Label/g.
      s/atom_value_t/label_t/g.
      4c95aeb4
  4. 15 Jun, 2012 1 commit
    • Akim Demaille's avatar
      kratexp -> node · 1dcdb8ef
      Akim Demaille authored
      Basically, revert 81a232bf.
      kratexp are actually shared_ptr to node_t.
      
      * vcsn/algos/standard_of.hh, vcsn/core/rat/abstract_kratexpset.hh,
      vcsn/core/rat/fwd.hh, vcsn/core/rat/kratexp.hh,
      vcsn/core/rat/kratexp.hxx, vcsn/core/rat/kratexpset.hh,
      vcsn/core/rat/kratexpset.hxx, vcsn/core/rat/printer.hh,
      vcsn/core/rat/visitor.hh, vcsn/ctx/ctx.hh,
      vcsn/io/parse-rat-exp.yy: Here.
      1dcdb8ef
  5. 14 Jun, 2012 18 commits
    • Akim Demaille's avatar
      kratexpset: simplifications. · e39de83b
      Akim Demaille authored
      * vcsn/core/rat/kratexpset.hxx: Remove useless casts.
      Hair cut for hairy code.
      e39de83b
    • Akim Demaille's avatar
      abstract_kratexpset: simplify. · 422daf1d
      Akim Demaille authored
      * vcsn/core/rat/abstract_kratexpset.hh (down): New.
      Use them to simplify.
      Remove a bazillion of useless types (thanks to contexts).
      422daf1d
    • Akim Demaille's avatar
      post-massive-overhaul cleanup. · 2c0f0e73
      Akim Demaille authored
      * vcsn/core/rat/abstract_kratexpset.hh (kvalue_t): Remove, useless.
      * vcsn/core/rat/kratexp.hh, vcsn/core/rat/kratexp.hxx (kvalue_t): Remove,
      used only the name value_t.
      * vcsn/core/rat/kratexpset.hh, vcsn/core/rat/kratexpset.hxx: Likewise.
      2c0f0e73
    • Akim Demaille's avatar
      kratexpset: do not derive from abstract_kratexp. · 17864aea
      Akim Demaille authored
      * vcsn/core/rat/abstract_kratexpset.hh (concrete_abstract_kratexpset): New.
      * vcsn/io/driver.hh, tests/rat/pprat.cc: Use it.
      * vcsn/core/rat/kratexpset.hh, vcsn/core/rat/kratexpset.hxx (kratexpset): Do
      not derive from abstract_kratexp.
      Simplify accordingly.
      * vcsn/algos/lift.hh, vcsn/core/rat/fwd.hh: Adjust.
      * NEWS.txt: Doc this.
      17864aea
    • Akim Demaille's avatar
      rat::node -> rat::kratexp. · 81a232bf
      Akim Demaille authored
      Suggested by Alexandre Duret-Lutz.
      
      * vcsn/core/rat/node.hh, vcsn/core/rat/node.hxx: Rename as...
      * vcsn/core/rat/kratexp.hh, vcsn/core/rat/kratexp.hxx: these.
      s/node/kratexp/g.
      * vcsn/core/rat/node.fwd.hh: Rename as...
      * vcsn/core/rat/fwd.hh: this.
      * vcsn/Makefile.am, vcsn/algos/lift.hh,
      vcsn/core/rat/abstract_kratexpset.hh, vcsn/core/rat/kratexpset.hh,
      vcsn/core/rat/kratexpset.hxx, vcsn/core/rat/printer.hh,
      vcsn/core/rat/visitor.hh, vcsn/core/rat/visitor.hxx,
      vcsn/ctx/ctx.hh, vcsn/io/driver.hh, vcsn/io/parse-rat-exp.txt,
      vcsn/io/parse-rat-exp.yy: Adjust.
      * NEWS.txt: doc it.
      81a232bf
    • Akim Demaille's avatar
      kratexps -> kratexpset. · 4009b53d
      Akim Demaille authored
      Suggested by Alexandre Duret-Lutz.
      * vcsn/core/rat/abstract_kratexps.hh, vcsn/core/rat/kratexps.hh,
      vcsn/core/rat/kratexps.hxx: Rename as...
      * vcsn/core/rat/abstract_kratexpset.hh, vcsn/core/rat/kratexpset.hh,
      vcsn/core/rat/kratexpset.hxx: these.
      s/kratexps/kratexpset/g;s/KRATEXPS/KRATEXPSET/g.
      * tests/rat/pprat.cc, vcsn/Makefile.am, vcsn/algos/lift.hh,
      vcsn/io/driver.cc, vcsn/io/driver.hh,
      vcsn/io/parse-rat-exp.yy: Adjust.
      * NEWS.txt: Doc it.
      4009b53d
    • Akim Demaille's avatar
      lift: handle weights. · 6f0cf1fe
      Akim Demaille authored
      * vcsn/algos/lift.hh: here.
      * tests/rat/pprat.cc (-l): New.
      6f0cf1fe
    • Akim Demaille's avatar
      lift. · bbdc5fe0
      Akim Demaille authored
      * vcsn/algos/lift.hh: New.
      * vcsn/Makefile.am: Adjust.
      * tests/unit/lift.cc, tests/unit/lift.chk: Check it
      * tests/unit/local.mk: Adjust.
      * NEWS.txt: doc.
      bbdc5fe0
    • Akim Demaille's avatar
      kratexp: expose more type acurate interface · 8dfba497
      Akim Demaille authored
      * vcsn/core/rat/kratexps.hh, vcsn/core/rat/kratexps.hxx (atom_):
      Return a kvalue.
      (zero_, unit_): New, on kvalue instead of value.
      8dfba497
    • Akim Demaille's avatar
      ratexp: provide a means to force the display of weights. · c8163a79
      Akim Demaille authored
      * vcsn/core/rat/printer.hh: here.
      * NEWS.txt: Doc it.
      c8163a79
    • Akim Demaille's avatar
      ratexp: fix bug in is_unit. · 3058a4dc
      Akim Demaille authored
      * vcsn/core/rat/kratexps.hh, vcsn/core/rat/kratexps.hxx (is_unit):
      New overload.
      * NEWS.txt: Doc it.
      3058a4dc
    • Akim Demaille's avatar
      dotty: fix signature. · f6b505ce
      Akim Demaille authored
      * tests/rat/pprat.cc: Take a const& automaton.
      f6b505ce
    • Akim Demaille's avatar
      poly: keep a full copy of the context. · 63324258
      Akim Demaille authored
      mutable_automaton does not keep its own context, rather it relies on
      poly to do it.  Since we want to allow automata to keep contexts by
      copy, do it here.
      
      * vcsn/weights/poly.hh (ctx_): No longer a reference.
      63324258
    • Akim Demaille's avatar
      fix comment. · d906ee60
      Akim Demaille authored
      * vcsn/core/rat/kratexps.hh, vcsn/alphabets/char.hh: here.
      d906ee60
    • Akim Demaille's avatar
      build: fix move-if-change. · f4dab6bc
      Akim Demaille authored
      * build-aux/bin/move-if-change: Now colordiff --version
      hangs.
      f4dab6bc
    • Akim Demaille's avatar
      context: use shared_ptr for weightset and genset. · 113c6e66
      Akim Demaille authored
      On occasions, we would like to be able to create new contexts, or
      change them.  For instance, the ladybird factory wants to add the
      letters it uses to its genset.  But then, since the contexts are
      shared bw automata, and bw ratexp, changing one would change them all.
      Unless we make copies of them, in which case, again, this is too
      expensive.
      
      After discussion with Alexandre Duret-Lutz, we agreed that the best
      course of actions would be to have mutable contexts, but immutable
      gensets and weightsets.  So handle "contexts" by copy, yet handle
      gensets and weightsets by pointer.  And use shared_ptr to simplify the
      management.
      
      Finally, it is also simpler to really expose them as pointers, so
      every "weightset().mul", etc. must be rewritten as "weightset()->mul".
      
      * vcsn/ctx/ctx.hh (genset_ptr, weightset_ptr): New.
      (gs_, ws_): Be shared_ptr.
      * vcsn/algos/determinize.hh, vcsn/algos/eval.hh, vcsn/algos/product.hh,
      vcsn/algos/standard_of.hh, vcsn/core/mutable_automaton.hh,
      vcsn/core/rat/kratexps.hh, vcsn/core/rat/kratexps.hxx,
      vcsn/core/rat/printer.hh, vcsn/core/rat/printer.hxx,
      vcsn/weights/poly.hh: Adjust.
      113c6e66
    • Akim Demaille's avatar
      space changes. · b4dd88fa
      Akim Demaille authored
      * vcsn/core/mutable_automaton.hh: here.
      b4dd88fa
    • Akim Demaille's avatar
      standard-of: avoid useless copy. · a3d7c6ab
      Akim Demaille authored
      * vcsn/algos/standard_of.hh (ws_): here.
      a3d7c6ab