[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Info-gnuprologjava] Seriously stumped
From: |
Daniel Warzecha |
Subject: |
[Info-gnuprologjava] Seriously stumped |
Date: |
Tue, 22 Feb 2011 12:00:49 +0100 |
Hello,
I tried your last suggestion with the assert-Code. It throws an IllegalArgumentException and says "The goal is not currently active."
I appended the rules file, maybe I did something wrong there. Don't worry, it's not very long. Perhaps you can tell me what went wrong?
Code snippets:
prologEnv.ensureLoaded(AtomTerm.get(PATH_PROLOGRULES));
prologEnv.runInitialization(prologInterpreter);
Term [] invkeyArg = {AtomTerm.get(keyMatcher.group())}; // keyMatcher.group() is "k_c" here
CompoundTerm [] invkeyComp =
{new CompoundTerm(AtomTerm.get("inverseOf"), invkeyArg)};
CompoundTerm assertCT = new CompoundTerm("asserta",invkeyComp);
try {
prologInterpreter.runOnce(assertCT);
}
catch (PrologException e) {
System.out.println(e.toString());
}
Greetings,
Daniel Warzecha
- [Info-gnuprologjava] Seriously stumped,
Daniel Warzecha <=