TODO 2.91 KB
Newer Older
1 2
# vim: set fileencoding=utf-8 :

3 4
 - Fix BisonSyntaxError location tracking.

Taddeus Kroes's avatar
Taddeus Kroes committed
5
 - Sort polynom by its exponents?
6

Taddeus Kroes's avatar
Taddeus Kroes committed
7
 - Fix division by zero caused by "0/0": Catch exception in front-end
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

smvv@multivac ~/work/trs $ printf "a/0\n??" | ./main.py
Traceback (most recent call last):
  File "./main.py", line 75, in <module>
    main()
  File "./main.py", line 64, in main
    node = p.run(debug=args.debug)
  File "/home/smvv/work/trs/external/pybison/src/python/bison.py", line 258, in run
    self.report_last_error(filename, e)
  File "/home/smvv/work/trs/external/pybison/src/python/bison.py", line 251, in run
    self.engine.runEngine(debug)
  File "bison_.pyx", line 592, in bison_.ParserEngine.runEngine (build/external/pybison/bison_.c:592)
  File "/home/smvv/work/trs/src/parser.py", line 195, in hook_handler
    possibilities = handler(retval)
  File "/home/smvv/work/trs/src/rules/fractions.py", line 23, in match_constant_division
    raise ZeroDivisionError('Division by zero: %s.' % node)
ZeroDivisionError: Division by zero: a / 0.

smvv@multivac ~/work/trs $ printf "0/0\n??" | ./main.py
Traceback (most recent call last):
  File "./main.py", line 75, in <module>
    main()
  File "./main.py", line 64, in main
    node = p.run(debug=args.debug)
  File "/home/smvv/work/trs/external/pybison/src/python/bison.py", line 258, in run
    self.report_last_error(filename, e)
  File "/home/smvv/work/trs/external/pybison/src/python/bison.py", line 251, in run
    self.engine.runEngine(debug)
  File "bison_.pyx", line 592, in bison_.ParserEngine.runEngine (build/external/pybison/bison_.c:592)
  File "/home/smvv/work/trs/src/parser.py", line 195, in hook_handler
    possibilities = handler(retval)
  File "/home/smvv/work/trs/src/rules/numerics.py", line 73, in match_divide_numerics
    divide = not divmod(n.value, dv)[1]
ZeroDivisionError: integer division or modulo by zero

 - Last possibilities reduce to a similar result.

smvv@multivac ~/work/trs $ printf "0/1\n??" | ./main.py
<Possibility root="0 / 1" handler=divide_numerics args=(0, 1)>
Division of 0 by 1 reduces to 0.
Division of 0 by 1 reduces to 0.
49 50

 - Fractions constant rewrite rules.
51 52 53 54 55

 - >>> (sin x) ^ 2 + (cos x) ^ 2
   sin(x) ^ 2 + cos(x) ^ 2
   >>> sin(x) ^ 2 + cos(x) ^ 2
   sin(x ^ 2) + cos(x ^ 2)
Sander Mathijs van Veen's avatar
Sander Mathijs van Veen committed
56

57
 - ExpressionNode.equals() werkend maken voor alle cases (negatie).
Sander Mathijs van Veen's avatar
Sander Mathijs van Veen committed
58

59 60
 - validation: preorder traversal implementatie vergelijken met andere
               implementaties.
Taddeus Kroes's avatar
Taddeus Kroes committed
61

Taddeus Kroes's avatar
Taddeus Kroes committed
62
 - No matches for sin(pi), sin(2pi), sin(4pi), etc...
63

Taddeus Kroes's avatar
Taddeus Kroes committed
64
 - Create unit tests for node inequivalence operator.
Taddeus Kroes's avatar
Taddeus Kroes committed
65 66

 - Line printer: 1 / (n + n)x  ->  1 / (n + n) * x
67 68

 - Parser: 'apia' -> 'aa'
Taddeus Kroes's avatar
Taddeus Kroes committed
69 70 71 72

 - 'x(1 / x)'  ->  '(x * 1) / x'  (currently no left/right check: '1x / x')

 - Unit tests for strategy.
Taddeus Kroes's avatar
Taddeus Kroes committed
73 74 75

 - MESSAGES needs to be expanded.

76
 - Use pretty-print for expressions in hint messages.
77

78
 - Parser: add unit tests for operator associativity (derivatives/integrals).
79 80 81 82 83

 - Modules:
   + Equations with substitution
   + Sort
   + Gonio