|
From: | Suman Roy |
Subject: | [Info-gnuprologjava] problem creating queries with NOT (negation as failure) |
Date: | Fri, 27 Apr 2012 17:12:13 +0530 |
We are using gnuprolog 0.2.5 to create queries to fire onto Prolog. We are unable to create queries which involve NOT as negation as failure like, "not( bird (cat) )". In order to form such query we tried implementing in the way as you mentioned previously . Here is the code snippet : ------------------ Term t1[] = { AtomTerm.get ( " cat " ) } ; CompoundTerm ct1=new CompoundTerm ( " bird ", t1 ) ; CompoundTerm goalTerm=new CompoundTerm(CompoundTermTag.get("not",1),ct1); int rc = in.runOnce(goalTerm); But we are getting a Java Exception : “ Exception in thread "main" java.lang.IllegalArgumentException: The goal is not currently active ” . Can anybody please provide some help? We need this urgently. Suman Roy, Ph.D. Infosys Technologies Ltd., Bldg.-19, # 44 Electronics City, Hosur Road,
|
[Prev in Thread] | Current Thread | [Next in Thread] |