Currently, when the SympyVisitor detects a bug, it simply prints a warning and continues. The tests also assert that the SympyVisitor is idempotent:
THEN("More SympySolver passes do nothing to the AST and don't throw") {
REQUIRE_NOTHROW(run_sympy_visitor_passes(*ast));
REQUIRE(AST_string == ast_to_string(*ast));
}
Unfortunately, the output of SymPy is not valid input to SymPy. This is why when it fails it the assumption is that the visitor already ran. Then it kindly warns, just in case the assumption is wrong and carries on.
Currently, when the SympyVisitor detects a bug, it simply prints a warning and continues. The tests also assert that the SympyVisitor is idempotent:
Unfortunately, the output of SymPy is not valid input to SymPy. This is why when it fails it the assumption is that the visitor already ran. Then it kindly warns, just in case the assumption is wrong and carries on.
Therefore, simple fixes such as: https://github.com/BlueBrain/nmodl/pull/1257
fail.
This leads to confusing error messages: https://github.com/BlueBrain/nmodl/issues/1258