1. 23 Nov, 2015 6 commits
    • Sébastien Piat's avatar
      tests: change is_equivalent prerequisites in CHECK_EQUIV · 1e196bab
      Sébastien Piat authored
      Do not try is_equivalent on automata with expressionset weightset.
      
      * tests/bin/test.py: Here.
      1e196bab
    • Akim Demaille's avatar
      style: run autopep8 · 4f8e07f1
      Akim Demaille authored
      * python/vcsn/automaton.py, python/vcsn/conjunction.py,
      * python/vcsn/d3Widget.py, python/vcsn/demangle.py,
      * python/vcsn/dot.py, python/vcsn/expression.py,
      * python/vcsn/ipython.py, python/vcsn/polynomial.py,
      * python/vcsn/score.py, python/vcsn/tools.py, python/vcsn/weight.py:
      Here.
      4f8e07f1
    • Akim Demaille's avatar
      context: there are more characters to escape · d67d8d14
      Akim Demaille authored
      * vcsn/alphabets/char.hh: We need to escape `'` and `\`.
      
      * tests/python/automaton.dir/lal_char_b.daut,
      * tests/python/automaton.dir/lal_char_b.in.gv,
      * tests/python/automaton.dir/lal_char_b.out.gv,
      * tests/python/automaton.dir/lal_char_b.tex,
      * tests/python/automaton.dir/lal_char_b.tex.gv,
      * tests/python/automaton.py: Test more special characters.
      d67d8d14
    • Akim Demaille's avatar
      style: minor changes · fe34d927
      Akim Demaille authored
      * tests/unit/test.hh: Display the failures in a more natural fashion.
      
      * vcsn/alphabets/setalpha.hh, vcsn/misc/format.hh: Comment changes.
      fe34d927
    • Akim Demaille's avatar
      contexts: fix the display of the list of generators · 831f5937
      Akim Demaille authored
      This fixes a long standing bug: we improprely display the generators
      when they contains `(`, `-` or `)`.  Be sure to escape them.
      
      * vcsn/misc/escape.hh, lib/vcsn/misc/escape.cc: Provide a means to
      specify chars to escape.
      No longer escape `"` by default.
      Beware of signedness issues.
      
      * vcsn/misc/format.hh, lib/vcsn/misc/format.cc (generators): New
      format.
      * vcsn/alphabets/char.hh, vcsn/alphabets/string.hh,
      * vcsn/labelset/nullableset.hh: Add support for it.
      vcsn/alphabets/setalpha.hh (print_set): Use this format to escape
      `(`, `-`, and `)`.
      * vcsn/algos/dot.hh: Now that the generators are no longer overquoted,
      Reenable escaping.
      
      * tests/unit/label.cc, tests/python/context.py: Adjust expectations.
      831f5937
    • Sébastien Piat's avatar
      context: str_escape set when printing · 9ec8f6c2
      Sébastien Piat authored and Akim Demaille's avatar Akim Demaille committed
      * vcsn/alphabets/setalpha.hh: Here.
      * vcsn/algos/dot.hh: So no longer escape `"` and `\` here.
      
      * tests/python/context.py, tests/python/trie.py,
      * tests/unit/label.cc: Update tests.
      9ec8f6c2
  2. 20 Nov, 2015 16 commits
  3. 19 Nov, 2015 6 commits
    • Akim Demaille's avatar
      trie: accept input from a string · 4cd6c9a9
      Akim Demaille authored
      * python/vcsn_cxx.cc: here.
      * tests/python/trie.py: Check it.
      4cd6c9a9
    • Akim Demaille's avatar
      labelsets: refuse the implicit empty word · fafb1441
      Akim Demaille authored
      In law_char, when reading the monomial `a|b` (yes, `|` is not
      escaped), we loop for ever: the `a` is read by setalpha::get_word,
      then it returns, and then polynomialset::conv_label repeatedly calls
      get_word on `|b`, which endlessly returns the empty word, refusing to
      pass the `|`.
      
      * vcsn/weightset/polynomialset.hh (conv_label): Make the empty string an
      error.
      * tests/python/trie.py: check it.
      fafb1441
    • Akim Demaille's avatar
      trie: accept an argument stating the format of the file · 56124c0b
      Akim Demaille authored
      Currently if we build a trie from a file, them the lines of the file
      are read as if each line were a monomial.  So for instance `<` is
      considered introducing a weight.
      
      We need an argument stating the syntax of the stream.  Currently, in
      addition to `"monomials"` (which was the previous implicit value), we
      add `"words"` which means that each line must be understood as a raw
      string up (and excluding) to end-of-line.
      
      This allows to read safely /usr/share/dict/words for instance.
      
      * vcsn/algos/trie.hh (trie_builder::add_words, trie_builder::add_monomials):
      New.
      (trie, cotrie): Now accept a format argument.
      * vcsn/dyn/algos.hh: Likewise.
      * python/vcsn_cxx.cc: Adjust.
      56124c0b
    • Akim Demaille's avatar
      trie: factor tests · 4b2642d8
      Akim Demaille authored
      * tests/python/trie.py (trie, check): New.
      Use them.
      4b2642d8
    • Akim Demaille's avatar
      style: improvements, comment and spaces changes · 2942f9c6
      Akim Demaille authored
      * vcsn/algos/trie.hh, vcsn/labelset/wordset.hh,
      * vcsn/weightset/polynomialset.hh: comment and spaces changes.
      
      * vcsn/misc/raise.hh (require): Accept convertible to bool.
      * vcsn/weightset/polynomialset.hh: Adjust.
      Add missing check.
      2942f9c6
    • Akim Demaille's avatar
      context: fix the display of special letters · 999ab9a1
      Akim Demaille authored
      * vcsn/algos/dot.hh: Be sure to escape the special characters in the
      context.
      999ab9a1
  4. 18 Nov, 2015 4 commits
  5. 17 Nov, 2015 3 commits
    • Sébastien Piat's avatar
      hopcroft: iterate on bitset properly · ab687714
      Sébastien Piat authored
      Use find_first and find_next.
      No difference in performances.
      
      * vcsn/algos/minimize-hopcroft.hh: Here.
      ab687714
    • Sébastien Piat's avatar
      hopcroft: use bitset instead of set · 456a15dd
      Sébastien Piat authored
      Set    Bitset
      1.75   0.37   a.minimize("hopcroft") # a = std([a-g]{300}), c = [a-k] -> B
      13.83  3.32   a.minimize("hopcroft") # a = std([a-g]{800}), c = [a-k] -> B
      
      * vcsn/algos/minimize-hopcroft.hh: Here.
      456a15dd
    • Sébastien Piat's avatar
      minimize: new algorithm hopcroft · 2fecabc6
      Sébastien Piat authored
      New implementation of minimize with hopcroft algorithm.
      Only accepts free labelsets.
      
      * vcsn/algos/minimize-hopcroft.hh: Here.
      * vcsn/algos/minimize.hh: Use it.
      * tests/python/minimize.py: Test it.
      2fecabc6
  6. 15 Nov, 2015 5 commits