// @ requires number >= 0; @Override public IResponse push(int number) { IResponse status = super.push(number); if (!status.isOK()) return status; try { while (--number >= 0) { pushesStack.add(0, conjunction); String s = solverProcess.sendAndListen("(BG_PUSH (EQ 0 0))"); // FIXME - check for error in s -- System.out.println("HEARD " + s); } return smtConfig.responseFactory.success(); } catch (IOException e) { return smtConfig.responseFactory.error("Failed to push"); } }
@Override public IResponse set_logic(String logicName, /*@Nullable*/ IPos pos) { // FIXME - discrimninate among logics boolean lSet = logicSet != null; IResponse status = super.set_logic(logicName, pos); if (!status.isOK()) return status; if (logicName.contains("BV")) { return smtConfig.responseFactory.error( "The simplify solver does not yet support the bit-vector theory", pos); } if (lSet) { pushesStack.clear(); push(1); } return smtConfig.responseFactory.success(); }
@Override public IResponse assertExpr(IExpr sexpr) { IResponse res = super.assertExpr(sexpr); if (!res.isOK()) return res; try { String translatedSexpr = translate(sexpr); if (translatedSexpr == null) { return smtConfig.responseFactory.error( "Failure in translating expression: " + smtConfig.defaultPrinter.toString(sexpr), sexpr.pos()); } conjunction = conjunction + " \n" + translatedSexpr; // String s = solverProcess.sendAndListen("(BG_PUSH ",translatedSexpr," )\r\n"); // System.out.println("HEARD: " + s); } catch (VisitorException e) { return smtConfig.responseFactory.error(e.getMessage(), e.pos); } return smtConfig.responseFactory.success(); }