Esempio n. 1
0
  public Map<HornClausePredicateSymbol, ArrayList<TermVariable>> getPredicateToVars(
      Map<String, HornClausePredicateSymbol> predicateSymbols) {

    final HashMap<HornClausePredicateSymbol, ArrayList<TermVariable>> res = new HashMap<>();
    for (final ApplicationTerm predicate : predicates) {
      final ArrayList<TermVariable> vars = new ArrayList<TermVariable>();
      for (final Term par : predicate.getParameters()) {
        vars.add((TermVariable) par);
      }

      res.put(getHornPredicateSymbol(predicate.getFunction(), predicateSymbols), vars);
    }
    return res;
  }
Esempio n. 2
0
 @Override
 public String toString() {
   String res = "";
   boolean first = true;
   for (final ApplicationTerm t : predicates) {
     if (!first) {
       res += " && ";
     }
     res += t.toString();
     first = false;
   }
   for (final Term t : transitions) {
     if (!first) {
       res += " && ";
     }
     res += t.toStringDirect();
     first = false;
   }
   return '(' + res + ')';
 }