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:
(defclass A
(slot one (type INSTANCE))
(slot two (type SYMBOL))
)
(defclass B
(slot three (type INSTANCE))
)
(defclass C
(slot four (type SYMBOL))
)
(make-instance c1 of C
(four sym1)
)
(make-instance c2 of C
(four sym2)
)
(make-instace a1 of A
(one c1)
)
(make-instance b1 of B
(three c2)
)
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.
(messages from the other thread)
--------------------
Hello again, You say meta-class but you show super-class; &in
fact missed a few (you might notice the code won't load).
You might want to at least cross-post this to a CLIPS list. If
you (just) want sub-classes, there is a function for that, and you can
set it up, to call it recursively. Is that what you want?
(I replied:)
No, it's not about subclasses:
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)
> 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."
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?
Johan Lindberg <johan.h.lindb...@gmail.com> wrote:
> 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."
> 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.
Johan Lindberg <johan.h.lindb...@gmail.com> wrote:
Hi, I downloaded CLIPS_6.30_Beta_Windows_Application_Installer_R3.msi. Type: Window Installer Package
> 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.
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.
Johan Lindberg <johan.h.lindb...@gmail.com> wrote:
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
--------------------------------- 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.
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 <johan.h.lindb...@gmail.com> wrote:
Hi,
> I downloaded application installer. Which is the right one
> 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 <johan.h.lindb...@gmail.com> wrote:
> Hi,
> > I downloaded application installer. Which is the right one
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.
> 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
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 <onero...@yahoo.com> 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.
> > 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.
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?
> 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.