use of at.ac.tuwien.kr.alpha.api.terms.Term in project Alpha by alpha-asp.
the class ThreeColouringTestWithRandom method fact.
private Atom fact(String predicateName, int... iTerms) {
List<Term> terms = new ArrayList<>(iTerms.length);
Predicate predicate = Predicates.getPredicate(predicateName, iTerms.length);
for (int i : iTerms) {
terms.add(Terms.newConstant(i));
}
return Atoms.newBasicAtom(predicate, terms);
}
use of at.ac.tuwien.kr.alpha.api.terms.Term in project Alpha by alpha-asp.
the class TestUtils method basicAtomWithStringTerms.
public static BasicAtom basicAtomWithStringTerms(String predicate, String... terms) {
Predicate pred = Predicates.getPredicate(predicate, terms.length);
List<Term> trms = new ArrayList<>();
for (String str : terms) {
trms.add(Terms.newConstant(str));
}
return Atoms.newBasicAtom(pred, trms);
}
Aggregations