mainGNU Prolog for Java - Support: sr #108389, GNU Prolog for Java - adding...

 
 

sr #108389: GNU Prolog for Java - adding fact(s) at runtime?

Submitter:  None
Submitted:  Thu 12 Sep 2013 08:39:19 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  4 - Important Status:  None
Privacy:  Public Assigned to:  rishabhgarg
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Thu 12 Sep 2013 08:39:19 AM UTC, original submission:  

Hi there. I'd love to know if it is possible to add facts to the knowledgebase during run-time with GNU Prolog for Java, and if so how it is done.

For example, let's say I load a file that has simply;
hungry(bill).
hungry(bob).

Might I, during runtime, add the fact 'hungry(dave)'.
A primitive way to do this would be to append to the string to  the file the facts are loaded from, but that seems rather ridiculous.

I imagine I'd need to build a CompoundTerm with hungry as the functor and dave as a single argument but I don't know  I can add this as a fact to the environment.

Thanks for any help you can give me.

Anonymous

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-16 drt24 PrivacyPrivate Public
        Assigned toNone rishabhgarg

    Back to the top

    Powered by Savane 3.16-598c.
    Corresponding source code