Package statechum.analysis.learning

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


  {
    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());
    smt.finalize();
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))");
    Assert.assertTrue(smtB.check());
View Full Code Here

   * @return false if a path leading to the supplied state is not satisfiable.
   */
  protected boolean checkSatisfiability(String variableDeclarations,String condition)
  {
    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;   
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.