public Object makeIntVar(String name, int min, int max) { try { /* * Type sType = vc.subrangeType(vc.ratExpr(min), vc.ratExpr(max)); return * vc.varExpr(name, sType); */ Expr expr = vc.varExpr(name, vc.intType()); return expr; } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("## Error CVC3: Exception caught in CVC3 JNI: \n" + e); } }
public Object makeRealVar(String name, double min, double max) { // WARNING: need to downcast double to int - I don't see // a way in CVC3 to create a sub-range for real types // other choice is not to bound and use vc.realType() to // create the expression int minInt = (int) min; int maxInt = (int) max; try { // Expr x = vc.varExpr(name, vc.realType()); /* * Type sType = vc.subrangeType(vc.ratExpr(minInt), vc.ratExpr(maxInt)); * return vc.varExpr(name, sType); */ Expr expr = vc.varExpr(name, vc.intType()); return expr; } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("## Error CVC3: Exception caught in CVC3 JNI: \n" + e); } }