Embedding CLIPS

77 views
Skip to first unread message

Sherjil Ozair

unread,
May 24, 2012, 5:04:02 AM5/24/12
to clip...@googlegroups.com
Hi,

I'm implementing a simulation system, and so, I'm using CLIPS as the rules engine. But, since I want my system to be dynamic, I want CLIPS to take the program from a string function argument, and NOT using (load <.clp>), since in a single simulation, there would be multiple changes to the CLIPS source code, and reading files would be computationally expensive.

Thus, my idea was to just change parts of the code, so that instead of taking in the string from a file, it takes the string from the argument of a function, that would be called by my simulation system.

Could you guys help me with this?

Thank you for your time,
Sherjil Ozair
Sophomore Undergraduate
Computer Science & Engineering
Indian Institute of Technology, Delhi

Lode Hoste

unread,
May 25, 2012, 7:14:48 AM5/25/12
to clip...@googlegroups.com
Hi Sherijl,

I'm afraid I didn't really get your question(s), so before I can help
you, please answer the following:

1) Can't you split up your rules into multiple files?
2) Are you trying to generate rules dynamically?
3) In what language are you embedding CLIPS?

Lode


2012/5/24 Sherjil Ozair <sherji...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "CLIPSESG" group.
> To post to this group, send email to CLIP...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/CLIPSESG?hl=en
>
> --> IF YOU NO LONGER WANT TO RECEIVE EMAIL <--
> Visit this group at http://groups.google.com/group/CLIPSESG?hl=en
> Click on "Edit my membership" link.
> Select the "No Email" radio button.
> Click the "Save these settings" button.
>
> --> IF YOU WANT TO UNSUBSCRIBE <--
> Visit this group at http://groups.google.com/group/CLIPSESG?hl=en
> Sign in
> Click on "Edit my membership" link.
> Click the "Unsubscribe" button.
> Note: This appears to be the most reliable way to unsubscribe
>
> Alternately, send email to CLIPSESG-u...@googlegroups.com. You will
> receive an email which you must respond to as well to unsubscribe. Clicking
> the link mentioned in the unsubscribe reply does not appear to work
> reliably.

Artem Novikov

unread,
May 25, 2012, 12:25:01 PM5/25/12
to clip...@googlegroups.com
Do you want to do something like this?

---- Qt code ---

void QClips::load(QByteArray str)
{
OpenStringSource(theEnv, "clipread", str.data(), 0);
SetPrintWhileLoading(theEnv, true);
LoadConstructsFromLogicalName(theEnv, "clipread");
SetPrintWhileLoading(theEnv, false);
CloseStringSource(theEnv, "clipread");
}



четверг, 24 мая 2012 г., 17:04:02 UTC+8 пользователь Sherjil Ozair написал:
Reply all
Reply to author
Forward
0 new messages