Commit 7c207e04 authored by Akim Demaille's avatar Akim Demaille
Browse files

minor fixes

* TODO.txt: Update.
* doc/notebooks/check-notebooks (referenced): Improve regexp.
* tests/bin/test.py (CHECK_EQUIV): Show more shortest.
* tests/python/standard.py: Use better expression conversion routines.
parent 51534b85
......@@ -222,11 +222,6 @@ we treat it as if it were lan<string> instead of law<char>.
** eliminate-state
Support several arguments.
** expression
On occasions I would have liked to be able to see the AST drawn as a Dot
tree. I'd like two different outputs: as a tree (semantical), or as a DAG:
a physical representation including the shared parts of an expression.
** info
The size of the expression is badly defined. For instance 'a{10}' says it
has a single prod. By the way, it should be call multiplication, not prod.
......
......@@ -17,7 +17,7 @@ def referenced(nb):
# exist.
existing = set([f
for f in os.listdir(path=nbdir)
if re.match(r'(\w+\.\w+)\.ipynb', f)])
if re.match(r'(\w+\.\w+)\.ipynb$', f)])
......
......@@ -223,7 +223,7 @@ def can_test_equivalence(a):
def CHECK_EQUIV(a1, a2):
'''Check that `a1` and `a2` are equivalent. Also works for
expressions.'''
num = 10
num = 20
# Cannot compute equivalence on Zmin, approximate with shortest.
try:
if can_test_equivalence(a1) and can_test_equivalence(a2):
......
......@@ -131,11 +131,12 @@ def check(r, exp=None, file=None):
# Check that we are equivalent to derived-term. However,
# derived-term sometimes needs a neutral to compute ldivide/rdivide.
# FIXME: Not very elegant...
if r.info('ldivide'):
# FIXME: Not very elegant... We need means to derive context
# from others. Unless we get rid of lal.
nctx = vcsn.context(re.sub('(.*?), *(.*)', r'nullableset<\1>, \2',
r.context().format('sname')))
nr = nctx.expression(str(r))
nr = r.expression(nctx)
a_dt = nr.automaton('expansion')
else:
a_dt = r.automaton('expansion')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment