info-gnuprologjava
[Top][All Lists]
Advanced

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

Re: [Info-gnuprologjava] Problem of Creating queries having a term invol


From: Suman Roy
Subject: Re: [Info-gnuprologjava] Problem of Creating queries having a term involving function symbols
Date: Thu, 12 Apr 2012 13:25:26 +0100

Hello,

There shouldn't be any problem here, you construct brother(Paul) and
then use that when constructing isSonOf(brother(Paul), John). The
relevant documentation is:
http://www.gnu.org/software/gnuprologjava/manual/Constructing-Terms.html#Constructing-Terms
and
http://www.gnu.org/software/gnuprologjava/api/gnu/prolog/term/CompoundTerm.html#CompoundTerm(gnu.prolog.term.AtomTerm,
 gnu.prolog.term.Term[]) (or one of the similar constructors).

If you are having problems it would be helpful to know what it is you
are trying to do. What is the code you have written that does not work?
There should not be any problems as the API does support what you are
trying to do - just possibly not the way you are trying to do it.

I hope that helps,

Daniel

On Thu, 2012-04-12 at 16:59 +0530, Suman Roy wrote:
> Hello,
> 
>  
> 
> We have created some rule base in Prolog for some industrial
> application. Now we want to create queries through Java APIs and
> subsequently fire them to Prolog interpreter on this rule base.
> Specifically, we are using  “gnuprologjava-0.2.5 “ API .  However, we
> are having problem creating queries which has a term involving
> function symbol inside a query predicate by using this API. For
> example, consider the following query,  
> 
> :- isSonOf(brother(Paul), John). 
> 
> We cannot create the term brother(Paul) using this API, where
> `brother’ is a function symbol in the vocabulary. 
> 
> Can you please suggest us how to create such terms using the above
> API? 
> 
>  
> 
> Regards,
> 
> --Suman
> 
> 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***

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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