public static boolean testExternalCallAst () {
Variable N = new Variable("N");
jpl.Integer One = new jpl.Integer(1);
jpl.Integer Thirteen = new jpl.Integer(13);
Query q = new Query(
new Compound(";", new Term[]{
new Compound("succ", new Term[] { Thirteen, N}),
new Compound("succ", new Term[] { One, N})}));
int sum = 0;
while (q.hasMoreSolutions()) {
@SuppressWarnings("unchecked")
Hashtable<Variable, Term> binding = (Hashtable<Variable, Term>) q.nextSolution();
sum += ((jpl.Integer) binding.get("N")).intValue();
}
return sum == (14 + 2);
}