示例#1
0
 @Override
 public IResponse start() {
   super.start();
   solverProcess.start(true);
   try {
     if (smtConfig.verbose != 0) smtConfig.log.logDiag("Started simplify");
     solverProcess.sendAndListen(
         "(BG_PUSH (FORALL (B X Y) (IMPLIES (EQ B |@true|) (EQ (" + ite_term + " B X Y) X))))\n");
     solverProcess.sendAndListen(
         "(BG_PUSH (FORALL (B X Y) (IMPLIES (NEQ B |@true|) (EQ (" + ite_term + " B X Y) Y))))\n");
   } catch (IOException e) {
     return smtConfig.responseFactory.error("Failed to assert background formulae at start");
   }
   return smtConfig.responseFactory.success();
 }
示例#2
0
 @Override
 public IResponse get_info(IKeyword key) {
   super.get_info(key);
   IKeyword option = key;
   IAttributeValue lit;
   if (Utils.ERROR_BEHAVIOR.equals(option)) {
     lit = smtConfig.exprFactory.symbol(Utils.CONTINUED_EXECUTION);
   } else if (Utils.AUTHORS.equals(option)) {
     lit = smtConfig.exprFactory.unquotedString("David Detlefs and Greg Nelson and James B. Saxe");
   } else if (Utils.VERSION.equals(option)) {
     lit = smtConfig.exprFactory.unquotedString("1.5.4");
   } else if (Utils.NAME.equals(option)) {
     lit = smtConfig.exprFactory.unquotedString("simplify");
   } else if (Utils.REASON_UNKNOWN.equals(option)) {
     return smtConfig.responseFactory.unsupported();
   } else if (Utils.ALL_STATISTICS.equals(option)) {
     return smtConfig.responseFactory.unsupported();
   } else {
     return smtConfig.responseFactory.unsupported();
   }
   IAttribute<?> attr = smtConfig.exprFactory.attribute(key, lit);
   return smtConfig.responseFactory.get_info_response(attr);
 }