Feuermagier / autograder

Automatic grading of student's Java code
MIT License
13 stars 7 forks source link

Add support for simplifying constant expressions in `PartialEvaluator` #494

Open Luro02 opened 2 months ago

Luro02 commented 2 months ago

The autograder currently has support for evaluating expressions and simplifying them when applicable. This is useful to provide good suggestions that do not contain clutter like + 0 or similar.

One thing that is currently missing is support for grouping together constant expressions like this:

a + b - 2 - 3 => a + b - 5
(a + 2) + (b - 5) => a + b - 3
(a + 1) - (b - 3) => a - b + 4

This has not been implemented yet, because I do not know how one could implement this.

This issue would improve the suggestions made by the RepeatedMathCheck.