#14951: tokenize() function in logic/logicparser.py infinite loop
-------------------------+------------------------------------------------
Reporter: pmscurek | Owner: Paul Scurek
Type: defect | Status: new
Priority: major | Milestone: sage-5.11
Component: misc | Keywords: logic, propcalc, logicparser
Merged in: | Authors: Paul Scurek
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Dependencies: | Stopgaps:
-------------------------+------------------------------------------------
The tokenize() function in logic/logicparser.py is called when a new
formula of propositional calculus is created using
propcalc.formula(<formula_expression>). The tokenize() function enters an
infinite loop if the characters '<', '>', or '-', are used in
<formula_expression> incorrectly (i.e. not as a part of one of the
operators '<->' or '->'). The following code would cause an infinitely
loop because of the '-':
{{{
#!python
sage: import sage.logic.propcalc as propcalc
sage: f = propcalc.formula("a-b")
}}}
The BooleanFormula class located in logic/boolformula.py also needs a
method that returns the full syntax parse tree of a boolean formula, so
that each formula has a unique parse tree. The BooleanFormula tree()
method does not serve this purpose.
--
Ticket URL: <http://trac.sagemath.org/ticket/14951>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.