The recent change to the parser currently breaks our performance on several critical applications, including the use of CVC4 in Facebook. We should only throw a parse error for div in linear logics when strict mode is enabled.
if(d_logic.areIntegersUsed()) {
defineType("Int", d_solver->getIntegerSort(), true, true);
addArithmeticOperators();
- if (!d_logic.isLinear())
+ if (!strictModeEnabled() || !d_logic.isLinear())
{
addOperator(api::INTS_DIVISION, "div");
addOperator(api::INTS_MODULUS, "mod");
; REQUIRES: no-competition
-; COMMAND-LINE: --lang=sygus2 --sygus-si=all --sygus-out=status --no-sygus-repair-const
+; COMMAND-LINE: --lang=sygus2 --sygus-si=all --sygus-out=status --no-sygus-repair-const --strict-parsing
; ERROR-SCRUBBER: grep -o "Symbol 'div' not declared as a variable"
; EXPECT-ERROR: Symbol 'div' not declared as a variable
; EXIT: 1
; REQUIRES: no-competition
+; COMMAND-LINE: --strict-parsing
; SCRUBBER: grep -o "Symbol 'div' not declared as a variable"
; EXPECT: Symbol 'div' not declared as a variable
; EXIT: 1
; REQUIRES: no-competition
+; COMMAND-LINE: --strict-parsing
; SCRUBBER: grep -o "Symbol 'mod' not declared as a variable"
; EXPECT: Symbol 'mod' not declared as a variable
; EXIT: 1
; REQUIRES: no-competition
+; COMMAND-LINE: --strict-parsing
; SCRUBBER: grep -o "Symbol 'abs' not declared as a variable"
; EXPECT: Symbol 'abs' not declared as a variable
; EXIT: 1