1. 19 Aug, 2019 1 commit
  2. 09 May, 2018 2 commits
  3. 03 May, 2018 1 commit
  4. 02 May, 2018 2 commits
    • Akim Demaille's avatar
      tests: fix file names · 65c93b95
      Akim Demaille authored
      * tests/python/proper.dir/lan-poly.3.fail.gv,
      * tests/python/proper.dir/lao-r.in.gv: These are actually daut files.
      65c93b95
    • Akim Demaille's avatar
      edit-automaton: don't insert transitions with the special label · 10e61ad7
      Akim Demaille authored
      We parse in `lan, q`, we parse `<1/2>` as `<1/2>$`, not as `<1/2>\e`.
      This is to support pre- and post-transition labels (e.g., `$ 0 <1/2>`).
      Unfortunately it's easy, in particular with lao, to forget to write
      `\e`, and I have been bitten: I tried to get the weight-series
      
          context = lao, expressionset<lal, q>
          $ -> 0
          0 -> 1 <a>
          1 -> 1 <b>
          1 -> 2 <c>
          2 -> $
      
      But I got `<a+c>`.  The culprit was actually proper/is_proper: both
      consider that automaton to be proper.  And the real culprit is
      actually the user: there are indeed no spontaneous transitions in this
      automaton: they are labeled with `$` because we did not use `\e`.
      This error is too easy, so be sure to be kind to the user, and map the
      special label to one when building the automaton.
      
      It turns out that the test suite itself contained such an error: a
      proper automaton still had a pseudo-spontaneous transition.
      
      * vcsn/algos/edit-automaton.hh: Map $ to \e when adding an inner
      transition.
      * tests/python/proper.dir/lao-r.out.gv: Fix.
      10e61ad7
  5. 01 May, 2018 6 commits
    • Akim Demaille's avatar
      update-test: add --threshold · 383b9b2c
      Akim Demaille authored
      383b9b2c
    • Akim Demaille's avatar
      e31073ee
    • Akim Demaille's avatar
      tests: change object pretty-printer · c376ad2c
      Akim Demaille authored
      * tests/bin/ipynbdoctest.py: Let's try to look like the actual output
      from IPython.  It's output is pretty-printed, but it does not look
      like what I get using pprint.  They seem use the json module.
      
      * tests/bin/update-test: Enable patches based on diffs.
      c376ad2c
    • Akim Demaille's avatar
      Tests: fix portability to newest IPython · 491c1944
      Akim Demaille authored
      It now fails when an exception escapes.
      491c1944
    • Akim Demaille's avatar
      Tests: add logs · f73ececa
      Akim Demaille authored
      It took me way too long to understand the new failure...
      f73ececa
    • Akim Demaille's avatar
      fst: support fstinfo · f4cbaa83
      Akim Demaille authored
      I wanted to know where OpenFST stands on is-deterministic when there
      are spontaneous transitions.  The answer is: Open FST does not care
      about them wrt determinism: the `one` label is treated like any other
      label.
      
      This is something I was considering for Vcsn too...  But I'm uneasy
      with this, so I think I will rather introduce a new property P, and
      define deterministic as having P and no spontaneous transitions.
      
      See also #196.
      
      * python/vcsn/automaton.py (fstinfo): New.
      * tests/python/efsm.py: Check.
      f4cbaa83
  6. 28 Mar, 2018 1 commit
  7. 25 Mar, 2018 2 commits
  8. 22 Mar, 2018 1 commit
    • Akim Demaille's avatar
      Sms2fr: use xz · c6c0218c
      Akim Demaille authored
      Now that we support compressed efsm, let's compress the efsm
      files of sms2fr.  Not only will this save space, it should also
      help with sites that claim that Vcsn is 98.3% of shell-scripts...
      
      The results with Xz are impressive: graphemic.efsm is reduced to
      5% of its original size, and syntactic.efsm 12%.
      
          -rw-r--r--   1 akim  staff  93099091 21 mar 23:46 graphemic.efsm
          -rw-r--r--   1 akim  staff  11713613 21 mar 19:05 graphemic.efsm.bz2
          -rw-r--r--   1 akim  staff   5502716 21 mar 23:22 graphemic.efsm.xz
          -rw-r--r--   1 akim  staff  62289670 21 mar 23:46 syntactic.efsm
          -rw-r--r--   1 akim  staff  13055960 13 mar 19:44 syntactic.efsm.bz2
          -rw-r--r--   1 akim  staff   7916576 21 mar 23:24 syntactic.efsm.xz
      
      And Vcsn is now 68.8% C++, 20.6% Python and 3.5% shell-script!
      
      While at it:
      - use int not char for options
      - don't use references to keep the automata
      - don't force the format to efsm: let vcsn guess the format
      c6c0218c
  9. 20 Mar, 2018 2 commits
    • Akim Demaille's avatar
      examples: clean up · 19b51345
      Akim Demaille authored
      * tests/demo/conjunction.cc: Here.
      19b51345
    • Akim Demaille's avatar
      rat: convert the expression after parsing, if needed · cc0fc3f6
      Akim Demaille authored
      Sometimes we get failures in random_expression for lat.  The reason is
      that we generate a \e, and `exp('\e')` fails in lat.  There is code in
      the parser to convert to multiband if needed, but it was not generic
      enough.  And we actually already have solved this problem with `conv`
      routines which use partial_identity to move from single-tape to
      multitape.
      
      However, `conv` is not accessible in dyn, but `copy` is.  But it is
      very expensive on large expressions such as the ones used in vcsn
      score.  So let's avoid this cost when it is not needed.  Unfortunately
      we have no means to compare two contexts, so... we print their snames
      and compare them.
      
      * lib/vcsn/rat/parse.yy: here.
      cc0fc3f6
  10. 15 Mar, 2018 3 commits
  11. 18 Feb, 2018 1 commit
  12. 08 Feb, 2018 1 commit
  13. 07 Feb, 2018 1 commit
  14. 02 Feb, 2018 2 commits
  15. 01 Feb, 2018 2 commits
  16. 25 Dec, 2017 1 commit
    • Akim Demaille's avatar
      eval: add C++ based benchmark · 91c24b37
      Akim Demaille authored
      2017-12-25 08:55:00
      Run on (8 X 2600 MHz CPU s)
      CPU Caches:
        L1 Data 32K (x4)
        L1 Instruction 32K (x4)
        L2 Unified 262K (x4)
        L3 Unified 6291K (x1)
      ---------------------------------------------------------
      Benchmark                  Time           CPU Iterations
      ---------------------------------------------------------
      BM_evaluate/1000     3719821 ns    3717595 ns        200
      BM_evaluate/2000    14698720 ns   14689273 ns         44
      BM_evaluate/5000    93982619 ns   93912429 ns          7
      BM_evaluate/10000  381631406 ns  381432000 ns          2
      
      * tests/benchmarks/evaluate.cc: New.
      91c24b37
  17. 05 Dec, 2017 7 commits
  18. 03 Dec, 2017 4 commits
    • Akim Demaille's avatar
      tests: more logs · 9928c5bc
      Akim Demaille authored
      * tests/unit/pylint.chk: here.
      9928c5bc
    • Akim Demaille's avatar
      tools: fix handing of invalid options · ed976197
      Akim Demaille authored
      * libexec/vcsn-tools.cc: here.
      ed976197
    • Akim Demaille's avatar
      tests: update cell/line magic missing support · 733d790c
      Akim Demaille authored
      Now IPython reports
      
          UsageError: Cell magic `%%automaton` not found.
          UsageError: Line magic function `%demo` not found.
      
      * tests/bin/ipynbdoctest.py: here.
      733d790c
    • Akim Demaille's avatar
      tests: skip pylint when pylint does not work with Python 3.6 · cca0e032
      Akim Demaille authored
      We have errors like this on the CI:
      
      ```
      command
         vcsn run pylint3 --rcfile=/srv/teamcity-agent/work/9fc823827e961a53/python/pylintrc /srv/teamcity-agent/work/9fc823827e961a53/python/vcsn
      
      status (FAIL)
        expected:  0
        effective: 1
      
      Standard error::
      
      	Traceback (most recent call last):
      	  File "/usr/bin/pylint3", line 3, in <module>
      	    run_pylint()
      	  File "/usr/lib/python3/dist-packages/pylint/__init__.py", line 17, in run_pylint
      	    Run(sys.argv[1:])
      	  File "/usr/lib/python3/dist-packages/pylint/lint.py", line 1333, in __init__
      	    linter.check(args)
      	  File "/usr/lib/python3/dist-packages/pylint/lint.py", line 755, in check
      	    self._do_check(files_or_modules)
      	  File "/usr/lib/python3/dist-packages/pylint/lint.py", line 886, in _do_check
      	    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
      	  File "/usr/lib/python3/dist-packages/pylint/lint.py", line 967, in check_astroid_module
      	    walker.walk(ast_node)
      	  File "/usr/lib/python3/dist-packages/pylint/utils.py", line 959, in walk
      	    self.walk(child)
      	  File "/usr/lib/python3/dist-packages/pylint/utils.py", line 956, in walk
      	    cb(astroid)
      	  File "/usr/lib/python3/dist-packages/pylint/checkers/variables.py", line 1051, in visit_import
      	    module = next(node.infer_name_module(parts[0]))
      	  File "/usr/lib/python3/dist-packages/astroid/context.py", line 49, in cache_generator
      	    for result in generator:
      	  File "/usr/lib/python3/dist-packages/astroid/bases.py", line 302, in wrapped
      	    for res in _func(node, context, **kwargs):
      	  File "/usr/lib/python3/dist-packages/astroid/inference.py", line 123, in infer_import
      	    yield self.do_import_module(name)
      	  File "/usr/lib/python3/dist-packages/astroid/mixins.py", line 129, in do_import_module
      	    relative_only=level and level >= 1)
      	  File "/usr/lib/python3/dist-packages/astroid/scoped_nodes.py", line 492, in import_module
      	    return MANAGER.ast_from_module_name(absmodname)
      	  File "/usr/lib/python3/dist-packages/astroid/manager.py", line 136, in ast_from_module_name
      	    return self.ast_from_file(filepath, modname, fallback=False)
      	  File "/usr/lib/python3/dist-packages/astroid/manager.py", line 86, in ast_from_file
      	    return AstroidBuilder(self).file_build(filepath, modname)
      	  File "/usr/lib/python3/dist-packages/astroid/builder.py", line 141, in file_build
      	    module = self._data_build(data, modname, path)
      	  File "/usr/lib/python3/dist-packages/astroid/builder.py", line 185, in _data_build
      	    module = builder.visit_module(node, modname, node_file, package)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 154, in visit_module
      	    newnode.body = [self.visit(child, newnode) for child in node.body]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 154, in <listcomp>
      	    newnode.body = [self.visit(child, newnode) for child in node.body]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 167, in visit
      	    return visit_method(node, parent, assign_ctx)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 957, in visit_classdef
      	    newnode = super(TreeRebuilder3k, self).visit_classdef(node, parent, assign_ctx)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 357, in visit_classdef
      	    for child in node.body]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 357, in <listcomp>
      	    for child in node.body]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 167, in visit
      	    return visit_method(node, parent, assign_ctx)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 543, in visit_functiondef
      	    assign_ctx=assign_ctx)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 528, in _visit_functiondef
      	    for child in node.body]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 528, in <listcomp>
      	    for child in node.body]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 167, in visit
      	    return visit_method(node, parent, assign_ctx)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 510, in visit_for
      	    assign_ctx=assign_ctx)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 503, in _visit_for
      	    for child in node.body]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 503, in <listcomp>
      	    for child in node.body]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 167, in visit
      	    return visit_method(node, parent, assign_ctx)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 591, in visit_if
      	    for child in node.orelse]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 591, in <listcomp>
      	    for child in node.orelse]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 167, in visit
      	    return visit_method(node, parent, assign_ctx)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 589, in visit_if
      	    for child in node.body]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 589, in <listcomp>
      	    for child in node.body]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 167, in visit
      	    return visit_method(node, parent, assign_ctx)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 447, in visit_expr
      	    newnode.value = self.visit(node.value, newnode, assign_ctx)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 167, in visit
      	    return visit_method(node, parent, assign_ctx)
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 315, in visit_call
      	    for child in node.args]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 315, in <listcomp>
      	    for child in node.args]
      	  File "/usr/lib/python3/dist-packages/astroid/rebuilder.py", line 165, in visit
      	    visit_method = getattr(self, visit_name)
      	AttributeError: 'TreeRebuilder3k' object has no attribute 'visit_joinedstr'
      ```
      
      It appears to be due to pylint itself, see
      https://github.com/DonJayamanne/pythonVSCode/issues/798 for instance.
      
      * tests/unit/pylint.chk: Require pylint 1.7 with Python 3.6.
      cca0e032