Package statechum.analysis.learning

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


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


  @Test
  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();
View Full Code Here

    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

  public void testYices3()
  {
    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();
View Full Code Here

    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());
    Assert.assertFalse(smtA.check());
View Full Code Here

    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());
    Assert.assertFalse(smtA.check());
    Assert.assertTrue(smtB.check());
    smtA.popContext();
    smtB.loadData("(assert (> y 4))");
View Full Code Here

    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();
    Smt.reopenStdOut();
  }
View Full Code Here

  @Test
  public void testYices_error1()
  {
   
    checkForCorrectException(new whatToRun() { public @Override void run() throws NumberFormatException {
      Smt smt = new Smt();smt.loadData("(define x::int)\n(assert (A> x 1))");
    }}, IllegalArgumentException.class,"Undefined name \"A>\"");
  }
 
  /** Checks that if type checking is not enabled, the error goes undetected. */
  @Test
 
View Full Code Here

  /** Checks that if type checking is not enabled, the error goes undetected. */
  @Test
  public void testYices_error2_not_reported()
  {
    Smt.configureYices(-1, false);
    Smt smt = new Smt();smt.loadData("(define x::bool)\n(assert (> x 1))");
  }
 
  /** Cannot parse - type error. */
  @Test
  public void testYices_error2()
View Full Code Here

  /** Cannot parse - type error. */
  @Test
  public void testYices_error2()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() throws NumberFormatException {
      Smt smt = new Smt();smt.loadData("(define x::bool)\n(assert (> x 1))");
    }}, IllegalArgumentException.class,"argument is not a numeral");
  }
 
  /** Check if a field can be correctly extracted. */
  @Test(expected=IllegalArgumentException.class)
 
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.