> I have a huge ontology represented in clips (it was built with
> protege). It is a hierarchical structure made of COOL objects. I want
> to filter out references to instances.
>
> So the problem would look like I have a pattern to match where I only
> know the slot type, but not the slot name.
> A little example of what I'm thinking of:
> ...
> I need a rule which would give back c1 and c2, because it is
> referenced by other classes. I have of course a lot more classes (with
> a lot of differently named slots) , and I don't want to write a rule
> for each.
> ...
> I need a rule which matches the pattern
> (slot .... (type INSTANCE))
>
> and gives back slot names
> (or gives back instances which classes are like that)
You can do what you describe with the test-CE using a deffunction to
filter out slots of the right type. Something along the lines of:
CLIPS> (deffunction get-instance-slots (?instance)
"Returns a Multifield containing the slots in ?instance
that has the type INSTANCE-ADDRESS. Returns
FALSE if none are found."
(bind $?result (create$))
(progn$ (?slot (class-slots (class ?instance)))
(if (member$ INSTANCE-ADDRESS (slot-types (class ?instance) ?slot))
then (bind $?result (create$ $?result ?slot))))
(if (eq 0 (length$ $?result))
then (return FALSE)
else (return $?result)))
And using it in a rule could look something like this:
CLIPS> (defrule match-instances
?o <- (object (is-a USER))
(test (neq FALSE (get-instance-slots ?o)))
=>
(printout t ?o " " (get-instance-slots ?o) crlf))
Which gives the following output (using your example code):
CLIPS> (run)
<Instance-b1> (three)
<Instance-a1> (one)
CLIPS>
HTH
Johan Lindberg
jo...@pulp.se
(three)
(one)
CLIPS>
HTH
Johan Lindberg
jo...@pulp.se
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
> I downloaded CLIPS 6.30 for windows but it does not contain the
> CLIPS.bdsgroup file which can be used to build projects using Borland Turbo
> C++ 2006. What can i do?
Did you download the source code distro
CLIPS_6.30_Beta_Windows_Source_Code_Installer_R3.msi or did you get
the binary installer
CLIPS_6.30_Beta_Windows_Application_Installer_R3.msi? IIRC it is only
included in the source code distro.
HTH
Johan Lindberg
johan@pulp.
Hi,
I downloaded CLIPS_6.30_Beta_Windows_Application_Installer_R3.msi.Type: Window Installer Package
align=center>If i have seen further its by standing on the shoulders of the great
Hi,
wnloaded CLIPS 6.30 for windows but it does not contain the
> CLIPS.bdsgroup file which can be used to build projects using Borland Turbo
> C++ 2006. What can i do?
Did you download the source code distro
CLIPS_6.30_Beta_Windows_Source_Code_Installer_R3.msi or did you get
the binary installer
CLIPS_6.30_Beta_Windows_Application_Installer_R3.msi? IIRC it is only
included in the source code distro.
HTH
Johan Lindberg
johan@pulp.
align=center>If i have seen further its by standing on the shoulders of the great
> I downloaded application installer. Which is the right one
The source code installer is the one you want.
BR
Johan Lindberg
jo...@pulp.se
What specifically went wrong?
On May 10, 6:03 pm, rodrick chalwe wrote:
> I have downloaded the source code installer and installed it. However, am failing to build projects using c++. I have tried to follow instructions on page 200 of the advanced programming guide but i just don't seem to get there. will you please assist.
>
> Johan Lindberg wrote:
>
> Hi,
>
> > I downloaded application installer. Which is the right one
>
> The source code installer is the one you want.
>
> BR
> Johan Lindberg
> jo...@pulp.se
>
> If i have seen further its by standing on the shoulders of the great
>
> ---------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
What do you mean you only see the code? Did Turbo C launch? If so
which version are you using? What menu items do you see? Have you used
Turbo C before?
On May 10, 6:20 pm, rodrick chalwe wrote:
> When i double click on CLIPS.bdsgroup, ican only see the code and not project menu nor the menu item make all projects. And how do write a program in c++ and execute it using clips. If possible give an example.
>
> CLIPS Support wrote:
>
> What specifically went wrong?
>
> On May 10, 6:03 pm, rodrick chalwe wrote:
>
>
>
> > I have downloaded the source code installer and installed it. However, am failing to build projects using c++. I have tried to follow instructions on page 200 of the advanced programming guide but i just don't seem to get there. will you please assist.
>
> > Johan Lindberg wrote:
>
> > Hi,
>
> > > I downloaded application installer. Which is the right one
>
> > The source code installer is the one you want.
>
> > BR
> > Johan Lindberg
> > jo...@pulp.se
>
> > If i have seen further its by standing on the shoulders of the great
>
> > ---------------------------------
> > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
>
> If i have seen further its by standing on the shoulders of the great
>
> ---------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
It sounds like you don't have Turbo C installed on your machine and
some other program is launching to display the project file when you
double-click on it.
On May 11, 12:32 am, rodrick chalwe wrote:
> I have never used turbo c before. The code look like html.
>
shoulders of the great
pleaze i really need your help, i'm building an application and i have many problem about how to connect CLIPS and java. if you can help me to find some pdf book i really be so gland thank for all you'll do for me |
> pleaze i really need your help, i'm building an application and i have many
> problem about how to connect CLIPS and java. if you can help me to find some
> pdf book i really be so gland
Have you written any code yet? If so, could you be more specific as to
what is giving you problems? If you haven't written any code yet I
think that looking at the examples in the CLIPSJNI package[1] might be
a good way to jump-start your efforts.
HTH
Johan Lindberg
jo...@pulp.se