1. 08 Jul, 2016 5 commits
    • Akim Demaille's avatar
      package: prepare for 2.3 · beee3e8e
      Akim Demaille authored
      * NEWS.md: .
      * configure.ac: .
      beee3e8e
    • Akim Demaille's avatar
      demangle: don't die when compiling non-plugin · 3919c0f6
      Akim Demaille authored
      * python/vcsn_tools/demangle.py: Currently we always notify, and to do
      so, we split the source file as if we were sure that it's a plugin of
      ours.  It's not always the case.
      3919c0f6
    • Clément Gillard's avatar
      doc: add polynomial.add · 2140c965
      Clément Gillard authored
      See #74.
      
      * doc/notebooks/polynomial.add.ipynb: New file.
      2140c965
    • Clément Gillard's avatar
      ipython: hide stack traces · 2a969ee0
      Clément Gillard authored
      See #90 and a5161adf. Overwrite `ipython.InteractiveTB` to remove our
      code from tracebacks; tweaking `vcsn._traceback_verbose` allows it back.
      
      The tests have been tweaked to also test for traceback in IPython.
      Due to how IPython interpret files that do not end in `.ipy`, since
      Python doesn't care, the tests have been renamed to have the `ipy`
      extension.
      
      * python/vcsn/__init__.py: Here.
      
      * tests/python/tracebacks.py: Add tests on IPython's output.
      
      * tests/python/tracebacks.dir/non-verbose.ipy.out,
      * tests/python/tracebacks.dir/verbose.ipy.out: Compare against those.
      
      * python/vcsn_tools/config.in.py: Add IPython executable.
      
      * tests/python/tracebacks.dir/non-verbose.py,
      * tests/python/tracebacks.dir/verbose.py: Rename to...
      * tests/python/tracebacks.dir/non-verbose.ipy,
      * tests/python/tracebacks.dir/verbose.ipy: Those.
      
      * tests/python/tracebacks.dir/non-verbose.out,
      * tests/python/tracebacks.dir/verbose.out: Rename to...
      * tests/python/tracebacks.dir/non-verbose.py.out,
      * tests/python/tracebacks.dir/verbose.py.out: Those. Update file names.
      2a969ee0
    • Clément Gillard's avatar
      SVG: allow MathJax · c1cae463
      Clément Gillard authored
      See #85. Add `automaton.HTML()` which displays automata as SVG within
      HTML to allow MathJax processing.
      
      * python/vcsn/automaton.py: Here.
      c1cae463
  2. 07 Jul, 2016 8 commits
    • Sébastien Piat's avatar
      shortest: fix incorrect behavior from lightest algorithms · 5e4e2784
      Sébastien Piat authored
      Remove call to lightest algorithm which improved performances,
      but created incorrect results for basic cases like:
      
      $ -> 0
      0 -> 1 <1>a
      0 -> 2 <-1>a
      1 -> $
      2 -> $
      
      Which would return `<1>a` with the lightest implementation
      instead of `\z`.
      
      (Closes #79).
      
      * tests/python/shortest.py: Here.
      * vcsn/algos/shortest.hh: Here.
      5e4e2784
    • Akim Demaille's avatar
      doc: prepare for 2.3 · 964a42b6
      Akim Demaille authored
      * doc/notebooks/!Read-me-first.ipynb: Update.
      * doc/notebooks/CIAA-2016.ipynb, doc/notebooks/ICTAC-2016.ipynb: The
      papers were accepted.
      964a42b6
    • Akim Demaille's avatar
      doc: minor fixes · 856f3df5
      Akim Demaille authored
      Closes #75.
      
      * doc/notebooks/expansion.add.ipynb,
      * doc/notebooks/expansion.lweight.ipynb,
      * doc/notebooks/expansion.project.ipynb,
      * doc/notebooks/expansion.rweight.ipynb: Fix naming conventions.
      Show that there is a correspondance bw the operations on expansions
      and those on expressions.
      856f3df5
    • Clément Gillard's avatar
      doc: fix missing functions · 8358db0a
      Clément Gillard authored
      See #75. Add missing documentation for some functions.
      While at it, generalize the right multiplication of a weight by an
      object to the left multiplication of this object by the weight, for
      any type of object that supports it.
      
      * doc/notebooks/expansion.add.ipynb,
      * doc/notebooks/expansion.lweight.ipynb,
      * doc/notebooks/expansion.rweight.ipynb,
      * doc/notebooks/weight.add.ipynb: New files.
      
      * doc/notebooks/Algorithms.ipynb,
      * doc/notebooks/local.mk: Reference them.
      
      * python/vcsn/weight.py: Generalize right multiplication.
      
      * doc/notebooks/expression.lweight.ipynb: Fix typo.
      * doc/notebooks/expression.rweight.ipynb: Fix self-referencing.
      8358db0a
    • Thibaud Michaud's avatar
      push_weights: document preconditions · bd1c11ca
      Thibaud Michaud authored
      Fixes #10
      
      According to M. Mohri in Weighted Automata Algorithms, the weightset should be
      zero-sum-free and weakly divisible, and the shortest distance must be defined
      for every state of the automaton.
      
      * doc/notebooks/automaton.push_weights.ipynb: Here.
      bd1c11ca
    • Akim Demaille's avatar
      python: random_expression: accept length as keyword argument · 5452708a
      Akim Demaille authored
      * python/vcsn/context.py (random_expression): here.
      * doc/notebooks/context.random_expression.ipynb: Update.
      * tests/python/factory.py: Check.
      5452708a
    • Akim Demaille's avatar
      info: document and also display the length of an expression · db11cf68
      Akim Demaille authored
      * vcsn/algos/info.hh: Length and size are the same thing.  But since
      random_expression refers to `length`, we ought to support it.
      * doc/notebooks/automaton.info.ipynb: Update.
      * doc/notebooks/expression.info.ipynb: New.
      db11cf68
    • Clément Gillard's avatar
      python: hide stack traces · a5161adf
      Clément Gillard authored
      See #90. Overwrite `sys.excepthook` to handle and print tracebacks
      ourselves: tracebacks don't display our code, and tweaking
      `vcsn._traceback_verbose` allows it back.
      
      This only works in Python, not in IPython.
      
      * python/vcsn/__init__.py: Here.
      
      * tests/python/tracebacks.py: (New)Test tracebacks.
      
      * tests/python/local.mk: Use it.
      
      * tests/python/tracebacks.dir/non-verbose.py,
      * tests/unit/tracebacks.dir/verbose.py: (New)Scripts for tests.
      
      * tests/python/tracebacks.dir/non-verbose.out,
      * tests/unit/tracebacks.dir/verbose.out: (New)Compare against those.
      
      * python/vcsn_tools/config.in.py: Add Python executable.
      a5161adf
  3. 04 Jul, 2016 6 commits
    • Thibaud Michaud's avatar
      transpose: support composition · ffd0ac51
      Thibaud Michaud authored
      * vcsn/core/rat/transpose.hh: Here.
      * python/vcsn/expression.py (is_extended): Add compose.
      * tests/python/standard.py: Test it.
      ffd0ac51
    • Thibaud Michaud's avatar
      transpose: parse operator {t} · e6bb285a
      Thibaud Michaud authored
      * lib/vcsn/rat/parse.yy: Here.
      * lib/vcsn/rat/scan.ll: Here.
      * tests/rat/qr.rat: Test it.
      * doc/notebooks/Expressions.ipynb: Document it.
      e6bb285a
    • Clément Gillard's avatar
      widgets: refactor %demo · b05057e0
      Clément Gillard authored
      Refactor and optimize `%demo` algorithms.
      While at it, change `automaton.as_svg()` to `automaton.SVG()`.
      
      * python/vcsn/demo/automaton.py, python/vcsn/demo/eliminate_state.py:
      Refactor with widgets instead of callbacks.
      
      * python/vcsn/demo/eliminate_state.py:
      Optimize by generating and displaying SVGs instead of automata.
      
      * python/vcsn/demo/utils.py: Delete, not used anymore.
      
      * python/vcsn/ipython.py: Adapt. Clean up.
      
      * python/vcsn/automaton.py (as_svg): Rename as...
      (SVG): this.
      b05057e0
    • Clément Gillard's avatar
      widgets: factor text and LaTeX · 8bb71f25
      Clément Gillard authored
      Add `TextLatexWidget` class to eliminate redundancy when creating a
      text box and a LaTeX output.
      
      * python/vcsn/ipython.py: Add class.
      Refactor `%context` and `%expression`.
      8bb71f25
    • Akim Demaille's avatar
      clang-format: tune · 452c810b
      Akim Demaille authored
      * .clang-format: Make it more alike what we would use.
      452c810b
    • Akim Demaille's avatar
      style: clean up automaton printing · 7fb255fb
      Akim Demaille authored
      * vcsn/algos/detail/printer.hh: New.
      * vcsn/algos/grail.hh: Extracted from here.
      * vcsn/algos/dot.hh: Adjust.
      7fb255fb
  4. 03 Jul, 2016 3 commits
    • Akim Demaille's avatar
      style: remove useless includes · 5cb9832b
      Akim Demaille authored
      * vcsn/algos/epsilon-remover-separate.hh,
      * vcsn/algos/epsilon-remover.hh: here.
      * vcsn/algos/is-ambiguous.hh: Remove old debug traces.
      5cb9832b
    • Akim Demaille's avatar
      style: move name.hh from misc/ to dyn/ · b0fa1974
      Akim Demaille authored
      It is insane to have misc/ depend on dyn/, which is currently the case
      as dyn/name.hh needs dyn/automaton.hh and the like.  name.hh clearly
      belongs to dyn/.
      
      * vcsn/misc/name.hh: Rename as...
      * vcsn/dyn/name.hh: this.
      Adjust dependencies.
      b0fa1974
    • Akim Demaille's avatar
      style: remove useless includes · 6f95e601
      Akim Demaille authored
      There is no reason for vcsn/algos to depend on vcsn/alphabets.
      
      * vcsn/algos/de-bruijn.hh, vcsn/algos/divide.hh,
      * vcsn/algos/divkbaseb.hh, vcsn/algos/double-ring.hh,
      * vcsn/algos/ladybird.hh, vcsn/algos/levenshtein.hh,
      * vcsn/algos/quotkbaseb.hh, vcsn/algos/u.hh:
      here.
      6f95e601
  5. 01 Jul, 2016 1 commit
  6. 29 Jun, 2016 11 commits
    • Akim Demaille's avatar
      news: prepare for 2.3 · 45220fd0
      Akim Demaille authored
      * NEWS.md: here.
      45220fd0
    • Akim Demaille's avatar
      expressions: better contexts for errors · 06214b4e
      Akim Demaille authored
      See issue #62.
      
      * vcsn/algos/standard.hh, vcsn/algos/thompson.hh,
      * vcsn/algos/zpc.hh: here.
      06214b4e
    • Akim Demaille's avatar
      expressions: improve diagnostics about unsupported operators · 5d3da332
      Akim Demaille authored
      Issue #62.
      
      * vcsn/core/rat/visitor.hh: here.
      5d3da332
    • Akim Demaille's avatar
      style: no virtual with override · 5dc49aa6
      Akim Demaille authored
      * vcsn/algos/inductive.hh, vcsn/algos/split.hh,
      * vcsn/algos/standard.hh, vcsn/algos/star-normal-form.hh,
      * vcsn/algos/thompson.hh, vcsn/algos/zpc.hh, libexec/vcsn-tafkit.cc,
      * vcsn/algos/edit-automaton.hh: here.
      5dc49aa6
    • Clément Gillard's avatar
      ipython: add %expression · 7e464ade
      Clément Gillard authored
      Fixes #88. Add the magic `%expression` which allows for edition of an expression
      and its context, while rendering an automaton of it in real time, with
      choice over the algorithms used doing so.
      
      * python/vcsn/ipython.py: Here.
      
      * doc/notebooks/Expressions.ipynb,
      * NEWS.md: Mention it.
      7e464ade
    • Clément Gillard's avatar
      python: automate algorithms lists · 25023657
      Clément Gillard authored
      Automate listing of available algorithms for `expression.automaton()`
      and identities for `expression()` into `expression.automaton.algos` and
      `expression.identities_list`.
      
      * python/vcsn/__init__.py: Retrieve lists.
      
      * python/vcsn_cxx.cc:
      Rebind `expression.automaton` to `expression._automaton`.
      
      * python/vcsn/expression.py:
      Turn `expression.automaton` into a native Python function.
      
      * python/vcsn/demo/automaton.py: Turn hardcoded list into dynamic one.
      25023657
    • Akim Demaille's avatar
      python: improve dot recognition · a9f89098
      Akim Demaille authored
      * python/vcsn/automaton.py (_guess_format): Skip spaces before `digraph`.
      * tests/python/automaton.py: Check that case.
      a9f89098
    • Akim Demaille's avatar
      compile: don't show compilation commands at verbosity level 1 · e6abed8c
      Akim Demaille authored
      This is mostly done to make the test suite logs nicer to read.
      Currently there are cluttered with useless build commands.
      
      * libexec/vcsn-compile (log): New.
      Use it.
      Show commands at level 2.
      * doc/notebooks/Hacking.ipynb: Update.
      e6abed8c
    • Akim Demaille's avatar
      tests: fix is-equivalent · 1bb14e0b
      Akim Demaille authored
      * tests/python/is-equivalent.py: Since we move to more `trivial`
      identities, this test was weakened, as the expressions were not just
      equivalent, but equal.
      1bb14e0b
    • Akim Demaille's avatar
      tests: style: prefer 'is None' · 9ae4dc69
      Akim Demaille authored
      * tests/python/demangle.py, tests/python/to-expression.py: here.
      9ae4dc69
    • Akim Demaille's avatar
      tests: style: create add.dir · f90c8c9c
      Akim Demaille authored
      * tests/python/add.dir/a1+b1.gv: New.
      * tests/python/add.dir/a1.gv: New.
      * tests/python/add.dir/ab+bc.gv: New.
      * tests/python/add.dir/b1.gv: New.
      * tests/python/add.dir/join.gv: New.
      * tests/python/add.py: Adjust.
      f90c8c9c
  7. 28 Jun, 2016 6 commits
    • Clément Gillard's avatar
      algos: provide more context to errors · 768b4ddc
      Clément Gillard authored
      Fixes #62. Give more information on what we were doing when the exception
      occurred.
      
      * vcsn/algos/determinize.hh,
      * vcsn/algos/proper.hh,
      * vcsn/algos/to-expression.hh,
      * vcsn/algos/weight-series.hh: Here.
      768b4ddc
    • Clément Gillard's avatar
      demangle: move to new module · 3b467866
      Clément Gillard authored
      See #77. Move `vcsn.demangle`, `vcsn.gdb-demangle` and `vcsn_config` to new module
      `vcsn_tools` to alleviate their importations.
      
      * python/vcsn/demangle.py, python/vcsn/gdb-demangle.py: Move to...
      * python/vcsn_tools/demangle.py,
      * python/vcsn_tools/gdb-demangle.py: Here.
      
      * python/vcsn_config.in.py: Move to...
      * python/vcsn_tools/config.in.py: Here.
      
      * python/vcsn_tools/__init__.py:
      Reference files that are in the build-tree aswell.
      
      * python/pylintrc: Ignore dynamically referenced module.
      
      * configure.ac, python/local.mk: Update configuration.
      
      * libexec/vcsn-compile, libexec/vcsn-demangle, libexec/vcsn-gdb,
      * libexec/vcsn-ps, python/vcsn/__init__.py, tests/python/demangle.py:
      Update imports.
      
      * tests/unit/pylint.chk: Check new module with Pylint.
      3b467866
    • Akim Demaille's avatar
      tafkit: document it · 94a0fa58
      Akim Demaille authored
      * doc/notebooks/Executables.ipynb: New.
      * doc/notebooks/!Read-me-first.ipynb: Fix page name.
      94a0fa58
    • Akim Demaille's avatar
      tafkit: avoid the duplicate definition of supported functions · 9903dd6a
      Akim Demaille authored
      * libexec/parse-args.hh, libexec/parse-args.cc (commands): New.
      * libexec/vcsn-tafkit.cc (-l, --list-commands): New.
      (--help): Use it.
      * bin/vcsn.in: Use it to avoid duplicating this list.
      9903dd6a
    • Akim Demaille's avatar
      tafkit: improve the command line interface · a139c091
      Akim Demaille authored
      Finally we can run `vcsn tafkit --help` and get something meaningful.
      Also, always strip the result, to avoid instantiation explosions.
      
      * libexec/parse-args.hh, libexec/parse-args.cc (vcsn_main): Remove.
      This used to exist when all the TAF-Kit programs were different programs.
      Since then, it's a unique program, vcsn-tafkit.
      (usage, version): Be public.
      More details.
      (parse_args): Don't change argc/argv.
      Interpret --help and --version.
      (print): Strip automata.
      * libexec/vcsn-tafkit.cc (main): Adjust.
      a139c091
    • Akim Demaille's avatar
      tafkit: improve error messages · edf0af69
      Akim Demaille authored
      Issue #62: avoid assert/abort when interacting with the user.
      
      * libexec/parse-args.cc, libexec/vcsn-tafkit.cc: Use vcsn::require.
      Avoid std::endl.
      Improve `-h`.
      edf0af69