示例#1
0
 @Override
 protected boolean testGuard(Guard<String> g) {
   System.err.println("BuchiCG.testGuard " + g + ", " + g.size());
   for (Literal<String> l : g) {
     Atom a = stringToAtom(l.getAtom());
     System.err.println("BuchiCG.testGuard " + l.getAtom());
     // TODO: incomplete!
     if (!(a.isSatisfiable() ^ l.isNegated())) {
       return false;
     }
   }
   return true;
 }
示例#2
0
  @Override
  public void advance() {
    super.advance();

    System.err.println("AtomBuchiCG.advance: " + toString());

    if (originalPC == null) {
      return;
    }

    PathCondition guardPC = originalPC.make_copy();
    for (Literal<String> l : node.getOutgoingEdges().get(index).getGuard()) {
      Atom a = stringToAtom(l.getAtom());

      Set<Constraint> constraints = a.getConstraints();
      System.err.println(
          "AtomBuchiCG.advance: for guard="
              + l.getAtom()
              + ", atom="
              + a
              + ", atom.text="
              + a.getText()
              + ", constraints="
              + constraints);
      if (constraints == null) {
        continue;
      }
      for (Constraint c : constraints) {
        if (l.isNegated()) {
          guardPC.prependUnlessRepeated(c.not());
        } else {
          guardPC.prependUnlessRepeated(c);
        }
      }
    }
    setPC(guardPC);
  }