JESS: Jess and automated DB management

2006-06-22 Thread Matthew J Hutchinson
Hi all,

Has anyone heard of using Jess as a knowledge base to perform automated database management? By database management I mean, regardless of what's in the database - all the little things like checking accuracy of data, looking for inconsistencies? Then storing any discovered business/process rules as rules in Jess?


I know it's a vague question - I'm just exploring this general notion in regards to an organisation.

Thanks!
Matt


-- Matthew Hutchinson Ph.D. CandidateDepartment of Spatial SciencesCurtin University of TechnologyGPO Box U1987Perth, Western Australia 6845Visiting ScholarDepartment of Geography and Planning
University of AkronAkron, Ohio USA 


RE: JESS: Jess and UML

2006-06-22 Thread Scott Moss
Could the problem be that UML describes both OO program structures and
procedures whereas, with declarative programming, the procedures emerge
at runtime?



On Wed, 2006-06-21 at 22:49 -0400, Steven Goncalo wrote:
 Turning the original question inside out, has anyone ever seen a good
 example of how to describe a rule based system in UML? All of my team's
 attempts to manually produce a set of UML diagrams to document what the rule
 based part of our system was doing have been disappointing. The diagrams
 tended to show how various subsets of the rules might have worked if
 rephrased as procedures. An automatic round-trip tool between UML and Jess
 rules would be great, but the first step would be to establish a good
 mapping between the two domains, which I have not yet seen.
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of friedman_hill ernest j
 Sent: Wednesday, June 21, 2006 10:32 AM
 To: jess-users@sandia.gov
 Subject: Re: JESS: Jess and UML
 
 I think Matthew J Hutchinson wrote:
 [Charset iso-8859-1 unsupported, filtering to ASCII...]
 
  Is it possible to convert a design in UML into a structure in JESS, using
  facts?
 
 *Everything* is possible -- that's what makes life interesting!
 
 Now, the question really is: does a tool which does what you ask
 already exist? And I think the answer is no. There are tools for
 converting other kinds of designs into Jess code: ontologies in
 Protege or OWL, for example. But not UML, to the best of my knowledge.
 
 
 
 -
 Ernest Friedman-Hill  
 Advanced Software Research  Phone: (925) 294-2154
 Sandia National LabsFAX:   (925) 294-2234
 PO Box 969, MS 9012 [EMAIL PROTECTED]
 Livermore, CA 94550 http://herzberg.ca.sandia.gov
 
 To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
 in the BODY of a message to [EMAIL PROTECTED], NOT to the list
 (use your own address!) List problems? Notify [EMAIL PROTECTED]
 
 
 To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
 in the BODY of a message to [EMAIL PROTECTED], NOT to the list
 (use your own address!) List problems? Notify [EMAIL PROTECTED]
 
 

To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]




Re: JESS: Help on Jess Rules ..plz

2006-06-22 Thread Jason Morris

Hi John,


One more silly question; is CLIPS more advanced than JESS? I see lot of
common syntax and features between them. Then why not use CLIPS?


Well, apparently there is a CLIPS Tab plugin for Protege

  http://protege.stanford.edu/plugins/CLIPSTabPages/CLIPS_tab.html ,

but if you use CLIPS with Protege, you will have to go through JNI
since Protege is a Java application.  If you are developing in Java,
then Jess is you natural choice.


Also from some sources, I heard CLIPS is more powerful and portable

to various other language.

Defending against random hearsay is impossible, so if you have actual
statements made about specific Jess performance or functionality
issues, let the Jess listserver know, and we'll gladly address them
point by point.

Cheers,
Jason

-
Morris Technical Solutions LLC
www.morristechnicalsolutions.com
[EMAIL PROTECTED]
phone/fax: 503.692.1088

To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]




Re: JESS: Help with error

2006-06-22 Thread friedman_hill ernest j
I think Krasnigor, Scott L (N-AST) wrote:
 I am getting the following exception when trying to do a bsave. It is
 occurring when the bsave method is executing oss.writeObject(m_rules). I
 don't understand what could be causing this and am looking for any
 insight into the issue. I am running Jess version 70b7 from a java
 application. I will be happy to provide more detail if needed. Thanks.

Looks like this is caused by new rules being activated during the call
to bsave, presumably because working memory is being modified on
another thread. I'm surprised this has never come up before, because
thinking of it, it seems that bsave() should probably lock the agenda
and working memory while it runs -- but it does not. Thanks for
reporting this.



 
 Jess reported an error in routine bsave
   while executing (bsave enginedata).
   Message: Error during execution.
   Program text: ( bsave enginedata )  at line 1.
   at jess.Funcall.execute(Funcall.java:328)
   at jess.Jesp.parseAndExecuteFuncall(Jesp.java:2261)
   at jess.Jesp.parseExpression(Jesp.java:436)
   at jess.Jesp.promptAndParseOneExpression(Jesp.java:291)
   at jess.Jesp.parse(Jesp.java:270)
   at jess.Rete.eval(Rete.java:2051)
   at jess.Rete.eval(Rete.java:2006)
   at control.Controller.run(Controller.java:67)
   at java.lang.Thread.run(Unknown Source)
 Caused by: java.util.ConcurrentModificationException
   at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
   at java.util.HashMap$EntryIterator.next(Unknown Source)
   at java.util.HashMap$EntryIterator.next(Unknown Source)
   at java.util.HashMap.writeObject(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
 Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
 Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.writeObject(Unknown Source)
   at java.util.TreeMap.writeObject(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
 Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
   at java.util.Collections$SynchronizedMap.writeObject(Unknown
 Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
 Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.writeObject(Unknown Source)
   at jess.Rete.bsave(Rete.java:1768)
   at jess.Dumper.call(DumpFunctions.java:43)
   at jess.FunctionHolder.call(FunctionHolder.java:31)
   at jess.Funcall.execute(Funcall.java:320)
   ... 8 more
 
 Scott L. Krasnigor
 Principal Engineer/Scientist
 Advanced Sciences  Technologies, LLC.
 Lockheed Martin - MS2
 ' 856-359-3094
 * [EMAIL PROTECTED]
 * 780-1A
 



-
Ernest Friedman-Hill  
Advanced Software Research  Phone: (925) 294-2154
Sandia National LabsFAX:   (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://herzberg.ca.sandia.gov

To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]

Re: JESS: Jess and automated DB management

2006-06-22 Thread mlo
On Thu, Jun 22, 2006 at 05:09:40PM +1000, Matthew J Hutchinson wrote:
 Hi all,
 
 Has anyone heard of using Jess as a knowledge base to perform automated
 database management? By database management I mean, regardless of what's
 in the database - all the little things like checking accuracy of data,
 looking for inconsistencies? Then storing any discovered business/process
 rules as rules in Jess?
 
 I know it's a vague question - I'm just exploring this general notion in
 regards to an organisation.

try looking for 'semantic mediation' 
Holger Wache has written a very intersting PhD thesis in that field.
maybe it's not exactly what you are looking for but only what came into MY
when reading you question...

 Ph.D. Candidate
 Department of Spatial Sciences
..another spontaneous thought:
do you happen to know of SFB/TR 8 Spatial Cognition
www.sfbtr8.uni-bremen.de


gruss
  mlo
--
Dipl.-Ing. Martin Lorenz

They that can give up essential liberty 
to obtain a little temporary safety 
deserve neither liberty nor safety.
   Benjamin Franklin

please encrypt your mail to me
GnuPG key-ID: F1AAD37D
get it here:
http://blackhole.pca.dfn.de:11371/pks/lookup?op=getsearch=0xF1AAD37D

ICQ UIN: 33588107

To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]




RE: JESS: Help with error

2006-06-22 Thread Krasnigor, Scott L (N-AST)
Not a problem. Is there a simple fix I can implement. I am trying to
prototype a failover capability and I am dead in the water without the
bsave/bload functionality working. I have the source code. I will be
happy to figure out a temporary fix if you can just point me in the
right direction. Thanks.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of friedman_hill ernest j
Sent: Thursday, June 22, 2006 9:43 AM
To: jess-users@sandia.gov
Subject: Re: JESS: Help with error

I think Krasnigor, Scott L (N-AST) wrote:
 I am getting the following exception when trying to do a bsave. It is 
 occurring when the bsave method is executing oss.writeObject(m_rules).

 I don't understand what could be causing this and am looking for any 
 insight into the issue. I am running Jess version 70b7 from a java 
 application. I will be happy to provide more detail if needed. Thanks.

Looks like this is caused by new rules being activated during the call
to bsave, presumably because working memory is being modified on
another thread. I'm surprised this has never come up before, because
thinking of it, it seems that bsave() should probably lock the agenda
and working memory while it runs -- but it does not. Thanks for
reporting this.



 
 Jess reported an error in routine bsave
   while executing (bsave enginedata).
   Message: Error during execution.
   Program text: ( bsave enginedata )  at line 1.
   at jess.Funcall.execute(Funcall.java:328)
   at jess.Jesp.parseAndExecuteFuncall(Jesp.java:2261)
   at jess.Jesp.parseExpression(Jesp.java:436)
   at jess.Jesp.promptAndParseOneExpression(Jesp.java:291)
   at jess.Jesp.parse(Jesp.java:270)
   at jess.Rete.eval(Rete.java:2051)
   at jess.Rete.eval(Rete.java:2006)
   at control.Controller.run(Controller.java:67)
   at java.lang.Thread.run(Unknown Source) Caused by: 
 java.util.ConcurrentModificationException
   at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
   at java.util.HashMap$EntryIterator.next(Unknown Source)
   at java.util.HashMap$EntryIterator.next(Unknown Source)
   at java.util.HashMap.writeObject(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
 Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
 Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.writeObject(Unknown Source)
   at java.util.TreeMap.writeObject(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
 Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
   at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
   at java.util.Collections$SynchronizedMap.writeObject(Unknown
 Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
   at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
   at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
 Source)
   at java.io.ObjectOutputStream.writeObject0(Unknown Source)
   at java.io.ObjectOutputStream.writeObject(Unknown Source)
   at jess.Rete.bsave(Rete.java:1768)
   at jess.Dumper.call(DumpFunctions.java:43)
   at jess.FunctionHolder.call(FunctionHolder.java:31)
   at jess.Funcall.execute(Funcall.java:320)
   ... 8 more
 
 Scott L. Krasnigor
 Principal Engineer/Scientist
 Advanced Sciences  Technologies, LLC.
 Lockheed Martin - MS2
 ' 856-359-3094
 * [EMAIL PROTECTED]
 * 780-1A
 



-
Ernest 

Re: JESS: Help with error

2006-06-22 Thread friedman_hill ernest j
I think Krasnigor, Scott L (N-AST) wrote:
 Not a problem. Is there a simple fix I can implement. I am trying to
 prototype a failover capability and I am dead in the water without the
 bsave/bload functionality working. I have the source code. I will be
 happy to figure out a temporary fix if you can just point me in the
 right direction. Thanks.


I am thinking of something like this (jess/Rete.java. around like 1800):

public void bsave(OutputStream os) throws IOException {
ObjectOutputStream oos = new ObjectOutputStream(os);

synchronized (getActivationSemaphore()) {
synchronized (getCompiler()) {
oos.writeObject(m_globalContext);
...

The order of the two nested locks is, of course, significant.

 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 On Behalf Of friedman_hill ernest j
 Sent: Thursday, June 22, 2006 9:43 AM
 To: jess-users@sandia.gov
 Subject: Re: JESS: Help with error
 
 I think Krasnigor, Scott L (N-AST) wrote:
  I am getting the following exception when trying to do a bsave. It is 
  occurring when the bsave method is executing oss.writeObject(m_rules).
 
  I don't understand what could be causing this and am looking for any 
  insight into the issue. I am running Jess version 70b7 from a java 
  application. I will be happy to provide more detail if needed. Thanks.
 
 Looks like this is caused by new rules being activated during the call
 to bsave, presumably because working memory is being modified on
 another thread. I'm surprised this has never come up before, because
 thinking of it, it seems that bsave() should probably lock the agenda
 and working memory while it runs -- but it does not. Thanks for
 reporting this.
 
 
 
  
  Jess reported an error in routine bsave
  while executing (bsave enginedata).
Message: Error during execution.
Program text: ( bsave enginedata )  at line 1.
  at jess.Funcall.execute(Funcall.java:328)
  at jess.Jesp.parseAndExecuteFuncall(Jesp.java:2261)
  at jess.Jesp.parseExpression(Jesp.java:436)
  at jess.Jesp.promptAndParseOneExpression(Jesp.java:291)
  at jess.Jesp.parse(Jesp.java:270)
  at jess.Rete.eval(Rete.java:2051)
  at jess.Rete.eval(Rete.java:2006)
  at control.Controller.run(Controller.java:67)
  at java.lang.Thread.run(Unknown Source) Caused by: 
  java.util.ConcurrentModificationException
  at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
  at java.util.HashMap$EntryIterator.next(Unknown Source)
  at java.util.HashMap$EntryIterator.next(Unknown Source)
  at java.util.HashMap.writeObject(Unknown Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
  Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
  at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
  at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
  Source)
  at java.io.ObjectOutputStream.writeObject0(Unknown Source)
  at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
  at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
  at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
  Source)
  at java.io.ObjectOutputStream.writeObject0(Unknown Source)
  at java.io.ObjectOutputStream.writeObject(Unknown Source)
  at java.util.TreeMap.writeObject(Unknown Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
  Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
  at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
  at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
  Source)
  at java.io.ObjectOutputStream.writeObject0(Unknown Source)
  at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
  at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
  at java.util.Collections$SynchronizedMap.writeObject(Unknown
  Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
  Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
  at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
  at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
  Source)
  at java.io.ObjectOutputStream.writeObject0(Unknown Source)
  at java.io.ObjectOutputStream.writeObject(Unknown 

JESS: SWRL built-ins

2006-06-22 Thread Dimitrios Skoutas
Hi,Does Jess support reasoning with SWRL built-ins? What I am trying to do is something like the following: I have a class Person with Datatype property hasAge (integer) and I want to have a class AdultPerson, being a person with age more than 18. From what I know, it is not possible to do this in OWL with a defined class. So I have written the following rule in SWRL:
Person(?x) /\ hasAge(?x, ?y) /\ swrlb:greaterThan(?y, 18) → AdultPerson(?x)However Jess does not seem to classify the individuals.I am using the SWRL tab in Protege.Could someone please clarify this issue or correct me if I am wrong in something?
Thank you in advance.Dimitris


Re: JESS: Jess and automated DB management

2006-06-22 Thread Matthew J Hutchinson

Thanks for both those pieces of information!

:-)

On 6/22/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
On Thu, Jun 22, 2006 at 05:09:40PM +1000, Matthew J Hutchinson wrote: Hi all, Has anyone heard of using Jess as a knowledge base to perform automated
 database management? By database management I mean, regardless of what's in the database - all the little things like checking accuracy of data, looking for inconsistencies? Then storing any discovered business/process
 rules as rules in Jess? I know it's a vague question - I'm just exploring this general notion in regards to an organisation.try looking for 'semantic mediation'Holger Wache has written a very intersting PhD thesis in that field.
maybe it's not exactly what you are looking for but only what came into MYwhen reading you question... Ph.D. Candidate Department of Spatial Sciences..another spontaneous thought:do you happen to know of SFB/TR 8 Spatial Cognition
www.sfbtr8.uni-bremen.degrussmlo--Dipl.-Ing. Martin Lorenz They that can give up essential liberty to obtain a little temporary safety
 deserve neither liberty nor safety.Benjamin Franklinplease encrypt your mail to meGnuPG key-ID: F1AAD37Dget it here:
http://blackhole.pca.dfn.de:11371/pks/lookup?op=getsearch=0xF1AAD37DICQ UIN: 33588107To unsubscribe, send the words 'unsubscribe jess-users 
[EMAIL PROTECTED]'in the BODY of a message to [EMAIL PROTECTED], NOT to the list(use your own address!) List problems? Notify 
[EMAIL PROTECTED].-- Matthew Hutchinson Ph.D. CandidateDepartment of Spatial Sciences
Curtin University of TechnologyGPO Box U1987Perth, Western Australia 6845Visiting ScholarDepartment of Geography and PlanningUniversity of AkronAkron, Ohio USA 


Re: JESS: Help on Jess Rules ..plz

2006-06-22 Thread Dona Mommsen

Hi John, Jason,

this thread seems to go in different directions with issues that I'm 
trying to sort out:
1. What is the best set of tools  and languages for John. This requires 
some more background information of what you are trying to achieve.


On Jun 21, 2006, at 11:41 PM, Jason Morris wrote:


Hi John,

One more silly question; is CLIPS more advanced than JESS? I see lot 
of

common syntax and features between them. Then why not use CLIPS?


Well, apparently there is a CLIPS Tab plugin for Protege

  http://protege.stanford.edu/plugins/CLIPSTabPages/CLIPS_tab.html ,

but if you use CLIPS with Protege, you will have to go through JNI
since Protege is a Java application.  If you are developing in Java,
then Jess is you natural choice.


Also from some sources, I heard CLIPS is more powerful and portable

to various other language.

Defending against random hearsay is impossible, so if you have actual
statements made about specific Jess performance or functionality
issues, let the Jess listserver know, and we'll gladly address them
point by point.

Cheers,
Jason



2. Combination of Jess / JessTab / Protege for John's specific example.

I'll stumbled across something when I played with John's example, so 
I'll post that in a different mail.


3. Possible improvement of  Jess / JessTab / Protege integration. This 
is a more fundamental question, and this discussion should not be led 
without Henrik Errikson, the developer of JessTab. While I'd be very 
interested in learning more about the integration and its design.  
However, given my current knowledge and experience, I wouldn't dare to 
touch JessTab itself. I consider myself a user of  Jess / JessTab / 
Protege as a set of tools, and I'll gladly contribute my input from 
that perspective.


Dona

Begin forwarded message:


From: Jason Morris [EMAIL PROTECTED]
Date: June 21, 2006 5:25:58 PM CDT
To: jess-users@sandia.gov, [EMAIL PROTECTED]
Subject: Re: JESS: Help on Jess Rules ..plz
Reply-To: jess-users@sandia.gov

Hi Dona,


I apologize for barging in. I'm just guessing that John might be using
Jess in combination with Protégé


Ernest has a point that Jess Tab is generating nasty Jess code.  If
Jess Tab is to really play well with Jess proper, perhaps somebody
from the Jess camp should volunteer to help out.  I've been lurking on
the Protégé listserver for about a year now, and I'm fairly active in
the Jess community.

Let me know what I can do to help since I'm interested in learning
more about Protege and Jess Tab.

Cheers,
Jason Morris
Co-moderator Jess Listserver/Wiki


Dona


To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]




Matching multislots with JessTab/ Protege [was: JESS: Help on Jess Rules ..plz]

2006-06-22 Thread Dona Mommsen

Hi John,

I was trying to reproduce John's small example and I was convinced that 
matching multislots with Protege is possible.


I used the model described by John (see below).
I created 4 Instances of Hello with Resource\ ID 1 through 4
I created 3 Instances of Node\ Spoof:
Behavior\ ID A Resource sequence (1 3 4)
Behavior\ ID B Resource sequence (2 3)
Behavior\ ID C Resource sequence (1 2 3 4)

These are all mapped Protege instances, so the multislot resource 
sequence is actually a list of Protege intstances.
For example, the fact for the instance with Behavior\ ID A looks like 
this:


(MAIN::object (is-a Node Spoof) (is-a-name Node Spoof) (OBJECT 
Java-Object:edu.stanford.smi.protege.model.DefaultSimpleInstance) 
(Resource sequence 
Java-Object:edu.stanford.smi.protege.model.DefaultSimpleInstance 
Java-Object:edu.stanford.smi.protege.model.DefaultSimpleInstance 
Java-Object:edu.stanford.smi.protege.model.DefaultSimpleInstance) 
(Behavior ID A))


I simplified the rule just to match multislots with instances, and I 
tried 2 alternatives, one with return value constraint and one with the 
multifield.
For each test, I bind a Protege instance to a global variable that I 
use in the rules.


  ;;
;;Example with return value constraint cf. JiA p. 106
;; Hello with Resource ID 1 is in Node Spoof A and C
;;
(defglobal ?*a* = (nth$ 1 (find-instance ((?h Hello)) (eq (slot-get 
?h Resource\ ID) 1


(defrule testnest3
 ?r2 - (MAIN::object (is-a Node\ Spoof) (Resource\ sequence 
$?r:(member$ ?*a* $?r)))

=
(printout t Node (slot-get ?r2 Behavior\ ID)  crlf))

;;
;;Example with multifields JiA p. 103
;; Hello with Resource ID 2 is in Node Spoof B and C
;;

(defglobal ?*b* = (nth$ 1 (find-instance ((?h Hello)) (eq (slot-get 
?h Resource\ ID) 2


  (defrule testnest4
 ?r2 - (MAIN::object (is-a Node\ Spoof) (Resource\ sequence $?before 
?*b* $?after))

=
(printout t Node (slot-get ?r2 Behavior\ ID)  crlf))

The rules match properly and fire, but I do get error messages in both 
cases:



Jess (defrule testnest3  ?r2 - (MAIN::object (is-a Node\ Spoof) 
(Resource\ sequence $?r:(member$ ?*a* $?r))) = (printout t 
Node (slot-get ?r2 Behavior\ ID)  crlf))

== Activation: MAIN::testnest3 :  f-4
== Activation: MAIN::testnest3 :  f-6
Jess reported an error in routine ValueVector.set
while executing rule LHS (TECT).
  Message: Bad index 5 in call to set() on this vector: (MAIN::object 
(is-a Hello) (is-a-name Hello) (OBJECT 
Java-Object:edu.stanford.smi.protege.model.DefaultSimpleInstance) 
(Neighbor Address rst uvw xyz) (Resource ID 4)).
  Program text: ( defrule testnest3 ?r2 - ( MAIN::object ( is-a Node 
Spoof ) ( Resource sequence $?r  : ( member$ ?*a* $?r ) ) ) =  ( 
printout t Node ( slot-get ?r2 Behavior ID ) crlf ) )  at line 7.

Jess (run)
FIRE 1 MAIN::testnest3 f-6
NodeC
FIRE 2 MAIN::testnest3 f-4
NodeA
2


Jess (defrule testnest4  ?r2 - (MAIN::object (is-a Node\ Spoof) 
(Resource\ sequence $?before ?*b* $?after)) = (printout t 
Node (slot-get ?r2 Behavior\ ID)  crlf))

== Activation: MAIN::testnest4 :  f-5
== Activation: MAIN::testnest4 :  f-6
Jess reported an error in routine ValueVector.set
while executing rule LHS (TECT).
  Message: Bad index 5 in call to set() on this vector: (MAIN::object 
(is-a Hello) (is-a-name Hello) (OBJECT 
Java-Object:edu.stanford.smi.protege.model.DefaultSimpleInstance) 
(Neighbor Address rst uvw xyz) (Resource ID 4)).
  Program text: ( defrule testnest4 ?r2 - ( MAIN::object ( is-a Node 
Spoof ) ( Resource sequence $?before ?*b* $?after ) ) =  ( printout t 
Node ( slot-get ?r2 Behavior ID ) crlf ) )  at line 9.

Jess (run)
FIRE 1 MAIN::testnest4 f-6
NodeC
FIRE 2 MAIN::testnest4 f-5
NodeB
2


While Jess is still able to fire the rules correctly, it is about the 
last thing it does before Protege hangs.

Any idea what is going on here?
I'm using Protege 3.1.1 Build 216, JessTab 1.4, Jess 7.0b4 on Mac OS X 
10.3.9


Thanks in advance for any hints

Dona

P.S.: I'll gladly send the Protege project to anyone interested.



On Jun 21, 2006, at 9:01 PM, John wrote:

first, thx for Dona  Jason for their valuable comments. Yes, Dona, 
your guess is right. I am using protege in combo with Jess. I see 
protege is more powerful if you combine the Jess features. As Dona 
have accurately guessed, I used JessTab to map instances and classes 
created in protege to Jess.


Jason, Assert(ion) in Jess(with protoge) is done by a GUI interface 
(Form based).  The problem is that the object variable (for the 
multislots) is a single instance address and doesnt contain the actual 
contents.


As of the contents of the Hello and Node Spoof class;

Hello class contain two slots: Resource ID and Neighbor 
Address(multislot type string)


Node Spoof: Behavior ID (string) and Resouce sequence (multislot