CreateDeffacts dynamically from C

  • Tobias Jenkner

    Tobias Jenkner - 2008-08-26


    I am looking for a way to create Deffacts through function-calls from C. Does anybody know how this could be implemented? I already created a feature request for it:

    Or is this nothing that is desirable? I think that the facts for Deffacts will be created faster when calling reset than a 'manual reset implementation' that creates the facts by calling assert.

    Can anybody comment on that?

    Thank you very much and greetings from Stuttgart/Germany,

    • Gary Riley

      Gary Riley - 2008-08-26

      You can use the Build function to create a construct from C. This is analogous to using the CLIPS build command. Since the facts in a deffacts have been pre-parsed, if you are calling reset more than once it would be faster using a deffacts than asserting the facts manually using the Assert function, but you might not see any significant difference since parsing the facts is typically faster than asserting them.

      • Tobias Jenkner

        Tobias Jenkner - 2008-08-27

        Hello Gary,

        thanks for the hint. I have not been aware of the Build function which matches all my needs.

        Cheers, Tobias.


Log in to post a comment.