ClipsNet.DLL

217 views
Skip to first unread message

Grace

unread,
Jan 24, 2008, 4:25:14 AM1/24/08
to CLIPSESG
I want to create clips dll which i can then use in c# code. I want to
create my own wrapper code. Is there any documentation which will
guide me?

I have seen code available on ProAi.com

CLIPS Support

unread,
Jan 24, 2008, 2:34:45 PM1/24/08
to CLIPSESG
The CLIPS Advanced Programming Guide will provide details of the APIs
supported by CLIPS that you'd want to expose through a DLL.

The most difficult thing you need to figure out how to do is integrate
managed and unmanaged code and that actually has very little to do
with CLIPS. The best documentation I found on the subject is the book
".NET 2.0 Interoperability Recipes: A Problem-Solution Approach." If
you search the web, you'll find some examples of managed/unmanaged
code integration, but keep in mind that half of these are invalid
because the way to do integration was changed mid-stream.

I have a skeletal unfinished framework for a .NET DLL here:
http://www.ghg.net/clips/download/other/CLIPSNet.zip.

grace cool

unread,
Jan 28, 2008, 5:05:04 AM1/28/08
to CLIP...@googlegroups.com
Thanks for the reply I have clipsNet.zip from the proAi.com
 
Now I want to assert a fact and create a rule on the its basis. Can you help me?

 

CLIPS Support

unread,
Jan 28, 2008, 1:12:56 PM1/28/08
to CLIPSESG
I can't say specifically how you'd do it using the .Net library from
ProAI, but in general you use the build function to dynamically create
a construct:

CLIPS> (reset)
CLIPS>
(defrule create
(create-construct ?string)
=>
(build ?string))
CLIPS> (assert (create-construct "(defrule hello => (printout t
\"Hello World\" crlf))"))
<Fact-1>
CLIPS> (run)
Hello World
CLIPS>

On Jan 28, 4:05 am, "grace cool" <coolgrace2...@gmail.com> wrote:
> Thanks for the reply I have clipsNet.zip from the proAi.com
>
> Now I want to assert a fact and create a rule on the its basis. Can you help
> me?
>

proai

unread,
Jan 29, 2008, 7:30:57 PM1/29/08
to CLIPSESG
I know I have been promising an Clips Object model for some time. It
is still not totally finished but I decided to release it anyway. It
is available at the proai.com down load site. My forum is pretty well
spammed to death and I haven't had the time to clean it up so I can
answer any questions you have about it here.

The new object model supports 2 way binding of .net to clips objects
(you can create a .net object bind it to clips and change it in clips
and it will notify the real object via INotifyPropertyChanged, you
can also create a .net object directly in clips and then retrieve
the .net object from the rule engine.) There is also a class importer
that will take any .net class and create a clips class that you can
write rules against. But from the discussions I have see here the
most requested feature: you can create a clips construct using
objects and have any existing rule in clips converted to a
manipulatable .net object. All Classes have a Static Parse method
that can convert clips strings into real object. The example code is
not that great (sorry) I will try to clean it up when I get a chance
but I figured anyone who wanted to play with it in the mean time is
more than welcome. I still have a bunch of stuff that I want to do
but haven't had time for a couple of months.

ProAI

fahimeh dashti

unread,
Jan 30, 2008, 4:55:13 AM1/30/08
to CLIP...@googlegroups.com
Dear all :)

I have a project with Clips, so I wrote the code, but
I need a simple interface for it,
It just need a simple Window to get the Answers.

I attached a part of my .clp code(as the last part is
the same as beginning), Actually I've read the samples
but I am not very skillfull in Java,
I will be thankful if anybody can suggest a simple
code... It just need a simple Window to get the
Answers


Thank you every body,
Love and Peace
Fahimeh

____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

test.clp

Grace

unread,
Jan 30, 2008, 11:43:51 PM1/30/08
to CLIPSESG
I asserted a fact using assertString. Now I want to create a simple
rule and want to run it from the c# code

Can anyone give some insight on it...

Thanks
Grace

On Jan 30, 2:55 pm, fahimeh dashti <diba812...@yahoo.com> wrote:
> Dear all :)
>
> I have a project with Clips, so I wrote the code, but
> I need a simple interface for it,
> It just need a simple Window to get the Answers.
>
> I attached a part of my .clp code(as the last part is
> the same as beginning), Actually I've read the samples
> but I am not very skillfull in Java,
> I will be thankful if anybody can suggest a simple
> code... It just need a simple Window to get the
> Answers
>
> Thank you every body,
> Love and Peace
> Fahimeh
>
>       ___________________________________________________________________________­_________
> Never miss a thing.  Make Yahoo your home page.http://www.yahoo.com/r/hs
>
>  test.clp
> 6KDownload
Reply all
Reply to author
Forward
0 new messages