Package org.openiaml.verification.nusmv

Examples of org.openiaml.verification.nusmv.VerificationEngine


    // do inference on the model
    model = resource.getContents().get(0);
    monitor.worked(1);

    // do verification
    VerificationEngine verify = new VerificationEngine();
    IStatus status;
    try {
      status = verify.verify(model, new SubProgressMonitor(monitor, 9));
    } catch (VerificationException e) {
      return errorStatus(e);
    }

    // check for violation exceptions
    if (!verify.getViolations().isEmpty()) {
      final StringBuffer buf = new StringBuffer();

      for (int i = 0; i < 5 && i < verify.getViolations().size(); i++) {
        NuSMVViolation violation = verify.getViolations().get(i);
        if (i != 0)
          buf.append("\n");

        buf.append(violation.getMessage());

      }

      if (verify.getViolations().size() > 5) {
        // there are more
        buf.append("\n(...").append(verify.getViolations().size() - 5)
            .append(" more)");
      }
     
      Display.getDefault().asyncExec(new Runnable() {
View Full Code Here


   */
  protected List<NuSMVViolation> assertValid(String modelFile, int violationsSize) throws VerificationException {
    EObject model = loadModelDirectly(modelFile);
    assertNotNull(model);
   
    VerificationEngine engine = new VerificationEngine(true);
   
    return assertValid(model, violationsSize, engine);
  }
View Full Code Here

   */
  protected List<NuSMVViolation> assertValid(String modelFile, int violationsSize, final String ltlspec) throws VerificationException {
    EObject model = loadModelDirectly(modelFile);
    assertNotNull(model);
   
    VerificationEngine engine = new VerificationEngine(true) {

      @Override
      public List<VerificationRule> getVerificationRules() {
        VerificationRule rule = new StringVerificationRule(ltlspec);
        return Collections.singletonList(rule);
View Full Code Here

TOP

Related Classes of org.openiaml.verification.nusmv.VerificationEngine

Copyright © 2018 www.massapicom. 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.