info-gnuprologjava
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Info-gnuprologjava] problem creating queries with NOT (negation as fail


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 LABS,

Infosys Technologies Ltd.,

Bldg.-19, # 44 Electronics City, Hosur Road,
Bangalore 560 100, India.
Tel. +91 80 2852 0261 x 50850
     +91 80 4116 3850 (D)
     +91 80 2351 2373 (R)
     +91 98860 23203 (M)
Fax. +91 80 2852 0362
E-mail address@hidden <mailto:address@hidden>
       address@hidden <mailto:address@hidden>

 

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

reply via email to

[Prev in Thread] Current Thread [Next in Thread]