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: NonePriority: 5 - Normal
Severity: 4 - ImportantStatus: None
Privacy: PublicAssigned to: Rishabh Garg <rishabhgarg>
Originator Email: -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 File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only logged-in users can vote.


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



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 Sep 2013 05:43:53 PM UTCdrt24PrivacyPrivate=>Public
      Assigned toNone=>rishabhgarg

    Back to the top

    Powered by Savane 3.1-cleanup1