private void makeBottomAxiom() { final FreeVariableStore freeVar = new FreeVariableStore(); final Node var0 = freeVar.next(); final Node var1 = freeVar.next(); final Node var2 = freeVar.next(); final List<ClauseEntry> body = new ArrayList<>(); body.add(makeSubOfSomeTriple(var0, var1, var2)); body.add(makePropertyAssertionFunctor(var1)); body.add(makeSubclassTriple(var2, BOTTOM)); final ClauseEntry head = makeSubclassTriple(var0, BOTTOM); _rules.add(new Rule(Collections.singletonList(head), body)); }
private void makeBottomAxiom() { final FreeVariableStore freeVar = new FreeVariableStore(); final Node var0 = freeVar.next(); final Node var1 = freeVar.next(); final Node var2 = freeVar.next(); final List<ClauseEntry> body = new ArrayList<>(); body.add(makeSubOfSomeTriple(var0, var1, var2)); body.add(makePropertyAssertionFunctor(var1)); body.add(makeSubclassTriple(var2, BOTTOM)); final ClauseEntry head = makeSubclassTriple(var0, BOTTOM); _rules.add(new Rule(Collections.singletonList(head), body)); }
private void makeBottomAxiom() { final FreeVariableStore freeVar = new FreeVariableStore(); final Node var0 = freeVar.next(); final Node var1 = freeVar.next(); final Node var2 = freeVar.next(); final List<ClauseEntry> body = new ArrayList<>(); body.add(makeSubOfSomeTriple(var0, var1, var2)); body.add(makePropertyAssertionFunctor(var1)); body.add(makeSubclassTriple(var2, BOTTOM)); final ClauseEntry head = makeSubclassTriple(var0, BOTTOM); _rules.add(new Rule(Collections.singletonList(head), body)); }
private void translateSub(final List<ClauseEntry> outBody, final ATermAppl sub, final FreeVariableStore freeVar, final Node currentVar) { final AFun fun = sub.getAFun(); if (ATermUtils.isPrimitive(sub) || ATermUtils.isBottom(sub)) outBody.add(makeSubclassTriple(currentVar, _names.get(sub))); else if (fun.equals(ATermUtils.ANDFUN)) { ATermList list = (ATermList) sub.getArgument(0); while (!list.isEmpty()) { final ATermAppl conj = (ATermAppl) list.getFirst(); translateSub(outBody, conj, freeVar, currentVar); list = list.getNext(); } } else if (fun.equals(ATermUtils.SOMEFUN)) { final ATermAppl prop = (ATermAppl) sub.getArgument(0); final ATermAppl q = (ATermAppl) sub.getArgument(1); final Node nextVar = freeVar.next(); outBody.add(makeSubOfSomeTriple(currentVar, prop, nextVar)); translateSub(outBody, q, freeVar, nextVar); } else assert false; }
private void translateSub(final List<ClauseEntry> outBody, final ATermAppl sub, final FreeVariableStore freeVar, final Node currentVar) { final AFun fun = sub.getAFun(); if (ATermUtils.isPrimitive(sub) || ATermUtils.isBottom(sub)) outBody.add(makeSubclassTriple(currentVar, _names.get(sub))); else if (fun.equals(ATermUtils.ANDFUN)) { ATermList list = (ATermList) sub.getArgument(0); while (!list.isEmpty()) { final ATermAppl conj = (ATermAppl) list.getFirst(); translateSub(outBody, conj, freeVar, currentVar); list = list.getNext(); } } else if (fun.equals(ATermUtils.SOMEFUN)) { final ATermAppl prop = (ATermAppl) sub.getArgument(0); final ATermAppl q = (ATermAppl) sub.getArgument(1); final Node nextVar = freeVar.next(); outBody.add(makeSubOfSomeTriple(currentVar, prop, nextVar)); translateSub(outBody, q, freeVar, nextVar); } else assert false; }
private void translateSub(final List<ClauseEntry> outBody, final ATermAppl sub, final FreeVariableStore freeVar, final Node currentVar) { final AFun fun = sub.getAFun(); if (ATermUtils.isPrimitive(sub) || ATermUtils.isBottom(sub)) outBody.add(makeSubclassTriple(currentVar, _names.get(sub))); else if (fun.equals(ATermUtils.ANDFUN)) { ATermList list = (ATermList) sub.getArgument(0); while (!list.isEmpty()) { final ATermAppl conj = (ATermAppl) list.getFirst(); translateSub(outBody, conj, freeVar, currentVar); list = list.getNext(); } } else if (fun.equals(ATermUtils.SOMEFUN)) { final ATermAppl prop = (ATermAppl) sub.getArgument(0); final ATermAppl q = (ATermAppl) sub.getArgument(1); final Node nextVar = freeVar.next(); outBody.add(makeSubOfSomeTriple(currentVar, prop, nextVar)); translateSub(outBody, q, freeVar, nextVar); } else assert false; }
outHead.add(makeSubclassTriple(currentVar, _names.get(sup))); else if (fun.equals(ATermUtils.ANDFUN))
outHead.add(makeSubclassTriple(currentVar, _names.get(sup))); else if (fun.equals(ATermUtils.ANDFUN))
outHead.add(makeSubclassTriple(currentVar, _names.get(sup))); else if (fun.equals(ATermUtils.ANDFUN))