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


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

Submitted by:  None
Submitted on:  Thu 12 Sep 2013 08:39:19 AM UTC  
Category:  None Priority:  5 - Normal
Severity:  4 - Important Status:  None
Privacy:  Public Assigned to:  Rishabh Garg <rishabhgarg>
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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;

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.



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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    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.4