Package statechum.analysis.learning

Examples of statechum.analysis.learning.Smt.check()


  public void testYices1()
  {
    Smt smt = new Smt();
   
    smt.loadData("(define x::int)\n(assert (> x 1))");
    Assert.assertTrue(smt.check());
    smt.finalize();
    smt.finalize();
  }

  /** Push/pop. */
 
View Full Code Here


  public void testYices2()
  {
    Smt smt = new Smt();
   
    smt.loadData("(define x::int)\n(assert (> x 1))");
    Assert.assertTrue(smt.check());
    smt.pushContext();
    smt.loadData("(assert (< x 0))");
    Assert.assertFalse(smt.check());
    smt.popContext();
    Assert.assertTrue(smt.check());
View Full Code Here

   
    smt.loadData("(define x::int)\n(assert (> x 1))");
    Assert.assertTrue(smt.check());
    smt.pushContext();
    smt.loadData("(assert (< x 0))");
    Assert.assertFalse(smt.check());
    smt.popContext();
    Assert.assertTrue(smt.check());
    smt.finalize();
  }
 
View Full Code Here

    Assert.assertTrue(smt.check());
    smt.pushContext();
    smt.loadData("(assert (< x 0))");
    Assert.assertFalse(smt.check());
    smt.popContext();
    Assert.assertTrue(smt.check());
    smt.finalize();
  }
 
  /** Multiple contexts. */
  @Test
 
View Full Code Here

  {
    Smt.closeStdOut();
    Smt smtA = new Smt();
   
    smtA.loadData("(define x::int)\n(assert (> x 1))");
    Assert.assertTrue(smtA.check());
    smtA.pushContext();
    smtA.loadData("(assert (< x 0))");
   
    Smt smtB = new Smt();
    smtB.loadData("(define x::int)\n(define y::int)\n(assert (< y 0))");
View Full Code Here

    smtA.pushContext();
    smtA.loadData("(assert (< x 0))");
   
    Smt smtB = new Smt();
    smtB.loadData("(define x::int)\n(define y::int)\n(assert (< y 0))");
    Assert.assertTrue(smtB.check());
    Assert.assertFalse(smtA.check());
    Assert.assertTrue(smtB.check());
    smtA.popContext();
    smtB.loadData("(assert (> y 4))");
    Assert.assertTrue(smtA.check());
View Full Code Here

   
    Smt smtB = new Smt();
    smtB.loadData("(define x::int)\n(define y::int)\n(assert (< y 0))");
    Assert.assertTrue(smtB.check());
    Assert.assertFalse(smtA.check());
    Assert.assertTrue(smtB.check());
    smtA.popContext();
    smtB.loadData("(assert (> y 4))");
    Assert.assertTrue(smtA.check());
    Assert.assertFalse(smtB.check());
    smtA.finalize();
View Full Code Here

    Assert.assertFalse(smtA.check());
    Assert.assertTrue(smtB.check());
    smtA.popContext();
    smtB.loadData("(assert (> y 4))");
    Assert.assertTrue(smtA.check());
    Assert.assertFalse(smtB.check());
    smtA.finalize();
    Smt.reopenStdOut();
  }
 
  /** Cannot parse. */
 
View Full Code Here

    Smt solver = getSolver();
    solver.pushContext();
    String whatToCheck = SmtLabelRepresentation.getAssertionFromVarAndAxiom(variableDeclarations,condition);
    //System.err.println("CHECK: "+whatToCheck);
    solver.loadData(whatToCheck);
    boolean outcome = solver.check();
    solver.popContext();return outcome;   
  }
 
  /** Extracts an ID of a supplied vertex. */
  public static VertID getID(CmpVertex vertex)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.