use of kodkod.engine.Solver in project org.alloytools.alloy by AlloyTools.
the class ALG195_1 method main.
/**
* Usage: java examples.tptp.ALG195_1
*/
public static void main(String[] args) {
try {
final ALG195_1 model = new ALG195_1();
final Solver solver = new Solver();
solver.options().setSolver(SATFactory.MiniSat);
final Formula f = model.axioms().and(model.co1().not());
final Bounds b = model.bounds();
// System.out.println(model.decls());
// System.out.println(model.ax2ax7());
// System.out.println(b);
final Solution sol = solver.solve(f, b);
if (sol.instance() == null) {
System.out.println(sol);
} else {
System.out.println(sol.stats());
model.display(sol.instance());
}
} catch (NumberFormatException nfe) {
usage();
}
}
use of kodkod.engine.Solver in project org.alloytools.alloy by AlloyTools.
the class COM008 method main.
/**
* Usage: java examples.tptp.COM008 [univ size]
*/
public static void main(String[] args) {
if (args.length < 1)
usage();
try {
final int n = Integer.parseInt(args[0]);
if (n < 1)
usage();
final COM008 model = new COM008();
final Solver solver = new Solver();
solver.options().setSolver(SATFactory.MiniSat);
// solver.options().setSymmetryBreaking(22);
// solver.options().setFlatten(false);
final Formula f = model.checkGoalToBeProved();
final Bounds b = model.bounds(n);
// System.out.println(f);
final Solution sol = solver.solve(f, b);
System.out.println(sol);
} catch (NumberFormatException nfe) {
usage();
}
}
use of kodkod.engine.Solver in project org.alloytools.alloy by AlloyTools.
the class GEO158 method main.
/**
* Usage: java examples.tptp.GEO158 [# univ size ]
*/
public static void main(String[] args) {
if (args.length < 1)
usage();
try {
final int n = Integer.parseInt(args[0]);
final Solver solver = new Solver();
solver.options().setSolver(SATFactory.MiniSat);
final GEO158 model = new GEO158();
final Formula f = model.checkConsistent();
// System.out.println(model.decls());
// System.out.println(model.partOfDefn());
// System.out.println(model.sumDefn());
//
// System.out.println(model.endPointDefn());
// System.out.println(model.innerPointDefn());
// System.out.println(model.meetDefn());
//
// System.out.println(model.openDefn());
// System.out.println(model.closedDefn());
// System.out.println(model.c1());
//
// System.out.println(model.c2());
// System.out.println(model.c3());
// System.out.println(model.c4());
//
// System.out.println(model.c6());
// System.out.println(model.c7());
// System.out.println(model.c8());
//
// System.out.println(model.c9());
final Bounds b = model.bounds(n);
final Solution sol = solver.solve(f, b);
System.out.println(sol);
} catch (NumberFormatException nfe) {
usage();
}
}
use of kodkod.engine.Solver in project org.alloytools.alloy by AlloyTools.
the class MED009 method main.
/**
* Usage: java examples.tptp.MED009 [univ size]
*/
public static void main(String[] args) {
if (args.length < 1)
usage();
try {
final int n = Integer.parseInt(args[0]);
if (n < 1)
usage();
final MED009 model = new MED009();
final Solver solver = new Solver();
solver.options().setSolver(SATFactory.MiniSat);
// solver.options().setSymmetryBreaking(1000);
// solver.options().setFlatten(false);
final Formula f = model.checkTranssls2_qige27();
final Bounds b = model.bounds(n);
System.out.println(f);
final Solution sol = solver.solve(f, b);
System.out.println(sol);
} catch (NumberFormatException nfe) {
usage();
}
}
use of kodkod.engine.Solver in project org.alloytools.alloy by AlloyTools.
the class NUM374 method main.
/**
* Usage: java examples.tptp.NUM374 [univ size]
*/
public static void main(String[] args) {
if (args.length < 1)
usage();
try {
final int n = Integer.parseInt(args[0]);
if (n < 1)
usage();
final NUM374 model = new NUM374();
final Solver solver = new Solver();
solver.options().setSolver(SATFactory.MiniSat);
solver.options().setSymmetryBreaking(n * n);
final Formula f = model.checkWilkie();
final Bounds b = model.bounds(n);
System.out.println(f);
final Solution sol = solver.solve(f, b);
System.out.println(sol);
} catch (NumberFormatException nfe) {
usage();
}
}
Aggregations