Java Code Examples for kodkod.engine.config.Options#setNoOverflow()
The following examples show how to use
kodkod.engine.config.Options#setNoOverflow() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IncrementalOverflowNumTest.java From org.alloytools.alloy with Apache License 2.0 | 6 votes |
@Test public void testBasic() { Options opt = new Options(); opt.setNoOverflow(true); opt.setBitwidth(2); IncrementalSolver solver = IncrementalSolver.solver(opt); Universe univ = new Universe("-2", "-1", "0", "1"); Bounds b = new Bounds(univ); TupleFactory factory = univ.factory(); b.boundExactly(-2, factory.range(factory.tuple("-2"), factory.tuple("-2"))); b.boundExactly(-1, factory.range(factory.tuple("-1"), factory.tuple("-1"))); b.boundExactly(0, factory.range(factory.tuple("0"), factory.tuple("0"))); b.boundExactly(1, factory.range(factory.tuple("1"), factory.tuple("1"))); Variable n = Variable.unary("n"); Formula f = n.sum().plus(IntConstant.constant(1)).lte(n.sum()).forSome(n.oneOf(Expression.INTS)); Solution sol = solver.solve(f, b); assertNoInstance(sol); }
Example 2
Source File: HOLSome4AllTest.java From org.alloytools.alloy with Apache License 2.0 | 5 votes |
protected void setupOptions() { options = new Options(); options.setNoOverflow(true); options.setBitwidth(bw()); options.setSolver(SATFactory.MiniSat); options.setAllowHOL(true); }
Example 3
Source File: OverflowTheoremTest.java From org.alloytools.alloy with Apache License 2.0 | 5 votes |
protected void setupOptions() { options = new Options(); options.setNoOverflow(true); options.setBitwidth(bw); options.setSolver(SATFactory.MiniSat); options.setSkolemDepth(0); }
Example 4
Source File: OverflowNumTest.java From org.alloytools.alloy with Apache License 2.0 | 4 votes |
protected void setupOptions() { options = new Options(); options.setNoOverflow(true); options.setBitwidth(bw()); options.setSolver(SATFactory.MiniSat); }