JESS: [EXTERNAL] Difficulty with the Jess 8.01 eclipse editor

2014-03-14 Thread Craig Cunningham
Hi All,

I am having difficulty with the new version of the eclipse editor.  The editor 
works fine, unless I try to save a .clp file that has warnings or errors in the 
file.  It hangs up and I have to force quit eclipse.

I am running mac os 10.8.5 and 
eclipse version: Kepler Service Release 2

Has anyone else seen this problem?

Thanks,
Craig

JESS: [EXTERNAL] Re: Limit on number of rules tried?

2013-12-20 Thread northparkjamie
My apologies for the lousy formatting of my original message. Please see
properly formatted version below.


northparkjamie wrote
 Hi, can you please help me?
 
 I'm relatively new to Jess (and using it with 
 CTAT http://ctat.pact.cs.cmu.edu/  
 , so my question may need to be redirected to them).
 
 I am trying to build a sudoku tutor (just to improve my skills) and I'm
 having a problem with my very first rule (below). This rule fires if one
 cell is empty and another in the same row is not. On the RHS, the predict
 function (from CTAT) checks whether the number entered by the user into
 the first cell is the same as the number in the second cell. If it is the
 same, the construct-message function displays the given message. If it is
 different, anything that has happened on the RHS is or remains undone. For
 example, if the row is {nil nil 6 nil nil nil 2 3 nil} and the user enters
 6 in any of the nil cells, the rule should fire and the predict should
 match and the message should be shown. But, if the user enters 8, the rule
 should still fire, but the predict function should fail, so nothing should
 happen.
 
 If I test this rule on the first row of the 9x9 grid, it behaves as
 expected. But if I test it on any other row, the engine only tries it 20
 times and never finds the cell in which the input was placed.
 
 Is there something in Jess that is limiting the number of trials or should
 I be talking to the CTAT people? If it is Jess, is there a way I can
 modify this limitation?
 
 Thanks in advance for your time and wisdom,
 Jamie
 
 (defrule bug-num-is-in-row 
 nbsp;nbsp;nbsp;nbsp;?prob - (problem 
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;(interface-elements $?
 ?grid $?))
 nbsp;nbsp;nbsp;nbsp;?grid - (grid (rows $? ?row $?))
 nbsp;nbsp;nbsp;nbsp;?row - (row (cells $? ?cell $?))
 nbsp;nbsp;nbsp;nbsp;?cell - (cell 
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;(name ?name)
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;(value nil)
 nbsp;nbsp;nbsp;nbsp;(row-number ?row-num))
 nbsp;nbsp;nbsp;nbsp;?cell2 - (cell 
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;(value ?number~nil)
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;(row-number ?row-num2))
 nbsp;nbsp;nbsp;nbsp;(test (= ?row-num ?row-num2))
 nbsp;nbsp;nbsp;nbsp;=
 nbsp;nbsp;nbsp;nbsp;(predict ?name UpdateTextField ?number)
 nbsp;nbsp;nbsp;nbsp;(construct-message 
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;[The row already has a
 ?number.])
 nbsp;nbsp;nbsp;nbsp;)





--
View this message in context: 
http://jess.2305737.n4.nabble.com/Limit-on-number-of-rules-tried-tp4654204p4654205.html
Sent from the Jess mailing list archive at Nabble.com.

Re: JESS: [EXTERNAL] Re: Limit on number of rules tried?

2013-12-20 Thread Wolfgang Laun
The rule is somewhat overengineered. Let's look at it, blow by blow.

?cell - (cell ... (row-number ?row-num))
?cell2 - (cell ... (row-number ?row-num2))
;   (test (= ?row-num ?row-num2))
You can simply use
   ?cell - (cell ... (row-number ?row-num))
?cell2 - (cell ... (row-number ?row-num))
to ascertain equal row numbers.

   ?cell - (cell ... (value nil) ...)
   ?cell2 - (cell ... (value ?number~nil) ...)
This doesn't detect two equal values in two cells - it ascertains one
cell being nil and another one not nil.

Now this here:
?cell - (cell ... (value ?number~nil) (row-number ?row-num))
?cell2 - (cell ... (value ?number) (row-number ?row-num))
matches if we have a cell, and another one, with the same number, and
the same row-number, BUT it also matches for any single cell with a
value != nil. You can use the name to ensure they're different:
   ?cell - (cell (name ?n) (value ?number~nil) (row-number ?row-num))
?cell2 - (cell  (name ?n2~?n) (value ?number) (row-number ?row-num))
But this has the unpleasant effect to fire twice. But we can use the
row fact to ensure two different cells in a row:

?row - (row (cells $? ?cell1 $? ?cell2 $?))
?cell1 - (cell (value ?number~nil))
?cell2 - (cell (value ?number))

That's about all you need, and it should work for any row.

-W




On 20/12/2013, northparkjamie consumingja...@gmail.com wrote:
 My apologies for the lousy formatting of my original message. Please see
 properly formatted version below.


 northparkjamie wrote
 Hi, can you please help me?

 I'm relatively new to Jess (and using it with
 CTAT http://ctat.pact.cs.cmu.edu/
 , so my question may need to be redirected to them).

 I am trying to build a sudoku tutor (just to improve my skills) and I'm
 having a problem with my very first rule (below). This rule fires if one
 cell is empty and another in the same row is not. On the RHS, the predict
 function (from CTAT) checks whether the number entered by the user into
 the first cell is the same as the number in the second cell. If it is the
 same, the construct-message function displays the given message. If it is
 different, anything that has happened on the RHS is or remains undone.
 For
 example, if the row is {nil nil 6 nil nil nil 2 3 nil} and the user
 enters
 6 in any of the nil cells, the rule should fire and the predict should
 match and the message should be shown. But, if the user enters 8, the
 rule
 should still fire, but the predict function should fail, so nothing
 should
 happen.

 If I test this rule on the first row of the 9x9 grid, it behaves as
 expected. But if I test it on any other row, the engine only tries it 20
 times and never finds the cell in which the input was placed.

 Is there something in Jess that is limiting the number of trials or
 should
 I be talking to the CTAT people? If it is Jess, is there a way I can
 modify this limitation?

 Thanks in advance for your time and wisdom,
 Jamie

 (defrule bug-num-is-in-row
 nbsp;nbsp;nbsp;nbsp;?prob - (problem
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;(interface-elements $?
 ?grid $?))
 nbsp;nbsp;nbsp;nbsp;?grid - (grid (rows $? ?row $?))
 nbsp;nbsp;nbsp;nbsp;?row - (row (cells $? ?cell $?))
 nbsp;nbsp;nbsp;nbsp;?cell - (cell
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;(name ?name)
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;(value nil)
 nbsp;nbsp;nbsp;nbsp;(row-number ?row-num))
 nbsp;nbsp;nbsp;nbsp;?cell2 - (cell
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;(value ?number~nil)
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;(row-number ?row-num2))
 nbsp;nbsp;nbsp;nbsp;(test (= ?row-num ?row-num2))
 nbsp;nbsp;nbsp;nbsp;=
 nbsp;nbsp;nbsp;nbsp;(predict ?name UpdateTextField ?number)
 nbsp;nbsp;nbsp;nbsp;(construct-message
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;[The row already has a
 ?number.])
 nbsp;nbsp;nbsp;nbsp;)





 --
 View this message in context:
 http://jess.2305737.n4.nabble.com/Limit-on-number-of-rules-tried-tp4654204p4654205.html
 Sent from the Jess mailing list archive at Nabble.com.

To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.



JESS: [EXTERNAL] Docstrings in from-class deftemplates

2013-11-26 Thread Henrique Lopes Cardoso
Hi,

Is there a limitation on the use of documentation strings on deftemplates
using the from-class declaration?
I have something like:

(deftemplate Foo extends Bar
Documentation string for Foo
(declare (from-class Foo)) )

Whe accessing the docstring as per Deftemplate.getDocstring(), I am getting
something like $JAVA-OBJECT$ Foo, instead of the documentation string
proper.

Am I missing something?

Thanks.

Henrique


JESS: [EXTERNAL] bsave fails after defquery execution [was: Dynamic rule-base analysis]

2013-09-30 Thread Jonathan Sewall

[Apologies for the incorrect Subject: on this report yesterday, 9/29.]

The trouble with bsave after executing a defquery appears to happen when 
serializing the Map Context.m_variables in Rete.m_globalContext: at this 
point in the script, the map holds the QueryResult variable ?qr:


(bind ?qr (run-query* all-cars))

Hence, if I execute

(bind ?qr not a QueryResult)

before the 2nd bsave, then the script runs without error. Could 
QueryResult be made Serializable? Revised script and results below. 
Thanks again,


Jonathan Sewall

--- Original Message 
Subject:Re: JESS: [EXTERNAL] Dynamic rule-base analysis
Date:   Sun, 29 Sep 2013 18:04:11 -0400
From:   Jonathan Sewall sew...@cs.cmu.edu
Reply-To:   jsew...@cmu.edu, jess-users@sandia.gov
To: jess-users@sandia.gov

...

Contents of script.clp:

(deftemplate car (slot make) (slot model))
(defquery all-cars Get all cars. ?car - (car))
(defquery cars-of-make Get cars of the given make. (declare (variables 
?want-make)) ?car - (car (make ?m:(= ?m ?want-make

(reset)
(bind ?pickup (assert (car (make Ford) (model F100
(bind ?sedan (assert (car (make Honda) (model Civic
(bind ?suv (assert (car (make Ford) (model Explorer
(printout t *** Before 1st bsave *** crlf)
(printout t globalContext  (((engine) getGlobalContext) toString) crlf)
(bsave s1.bsave)
(bind ?qr (run-query* all-cars))
(while (?qr next) (bind ?car (?qr getObject car)) (printout t (?car 
toString) crlf))

(?qr close)
(printout t *** Before 2nd bsave *** crlf)
(printout t globalContext  (((engine) getGlobalContext) toString) crlf)
;; (bind ?qr not a QueryResult) ;; uncomment to make script run ok
(bsave s2.bsave)

Results:

$ java -cp lib/jess.jar jess.Main

Jess, the Rule Engine for the Java Platform
Copyright (C) 2008 Sandia Corporation
Jess Version 7.1p2 11/5/2008

Jess (batch script.clp)
*** Before 1st bsave ***
globalContext [Context, 3 variables: 
pickup=Fact-1;sedan=Fact-2;suv=Fact-3;]

(MAIN::car (make Ford) (model F100))
(MAIN::car (make Honda) (model Civic))
(MAIN::car (make Ford) (model Explorer))
*** Before 2nd bsave ***
globalContext [Context, 5 variables: 
car=Java-Object:jess.Fact;pickup=Fact-1;sedan=Fact-2;suv=Fact-3;qr=Java-Object:jess.QueryResult;]

Jess reported an error in routine bsave
while executing (bsave s2.bsave)
while executing (batch script.clp).
  Message: IO Exception.
  Program text: ( bsave s2.bsave )  at line 17 in file script.clp.

Nested exception is:
jess.QueryResult
Jess

To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.



RE: JESS: [EXTERNAL] bsave fails after defquery execution [was: Dynamic rule-base analysis]

2013-09-30 Thread Friedman-Hill, Ernest
It would certainly make sense for this class to be Serializable, as most other 
classes in Jess are. The current implementation in practice contains an 
instance of java.util.ArrayList.Itr, which is not Seriaizable, so a certain 
amount of coding would be involved in making this change. Worth doing, though, 
so I'll see if we can work it in.

-Original Message-
From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Jonathan Sewall
Sent: Monday, September 30, 2013 9:49 AM
To: jess-users
Subject: JESS: [EXTERNAL] bsave fails after defquery execution [was: Dynamic 
rule-base analysis]

[Apologies for the incorrect Subject: on this report yesterday, 9/29.]

The trouble with bsave after executing a defquery appears to happen when 
serializing the Map Context.m_variables in Rete.m_globalContext: at this point 
in the script, the map holds the QueryResult variable ?qr:

 (bind ?qr (run-query* all-cars))

Hence, if I execute

 (bind ?qr not a QueryResult)

before the 2nd bsave, then the script runs without error. Could QueryResult be 
made Serializable? Revised script and results below. 
Thanks again,

Jonathan Sewall

--- Original Message 
Subject:Re: JESS: [EXTERNAL] Dynamic rule-base analysis
Date:   Sun, 29 Sep 2013 18:04:11 -0400
From:   Jonathan Sewall sew...@cs.cmu.edu
Reply-To:   jsew...@cmu.edu, jess-users@sandia.gov
To: jess-users@sandia.gov

...

Contents of script.clp:

(deftemplate car (slot make) (slot model)) (defquery all-cars Get all cars. 
?car - (car)) (defquery cars-of-make Get cars of the given make. (declare 
(variables
?want-make)) ?car - (car (make ?m:(= ?m ?want-make
(reset)
(bind ?pickup (assert (car (make Ford) (model F100 (bind ?sedan (assert 
(car (make Honda) (model Civic (bind ?suv (assert (car (make Ford) 
(model Explorer (printout t *** Before 1st bsave *** crlf) (printout t 
globalContext  (((engine) getGlobalContext) toString) crlf) (bsave 
s1.bsave) (bind ?qr (run-query* all-cars)) (while (?qr next) (bind ?car (?qr 
getObject car)) (printout t (?car
toString) crlf))
(?qr close)
(printout t *** Before 2nd bsave *** crlf) (printout t globalContext  
(((engine) getGlobalContext) toString) crlf) ;; (bind ?qr not a QueryResult) 
;; uncomment to make script run ok (bsave s2.bsave)

Results:

$ java -cp lib/jess.jar jess.Main

Jess, the Rule Engine for the Java Platform Copyright (C) 2008 Sandia 
Corporation Jess Version 7.1p2 11/5/2008

Jess (batch script.clp)
*** Before 1st bsave ***
globalContext [Context, 3 variables: 
pickup=Fact-1;sedan=Fact-2;suv=Fact-3;]
(MAIN::car (make Ford) (model F100)) (MAIN::car (make Honda) (model 
Civic)) (MAIN::car (make Ford) (model Explorer))
*** Before 2nd bsave ***
globalContext [Context, 5 variables: 
car=Java-Object:jess.Fact;pickup=Fact-1;sedan=Fact-2;suv=Fact-3;qr=Java-Object:jess.QueryResult;]
Jess reported an error in routine bsave
while executing (bsave s2.bsave)
while executing (batch script.clp).
   Message: IO Exception.
   Program text: ( bsave s2.bsave )  at line 17 in file script.clp.

Nested exception is:
jess.QueryResult
Jess

To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list (use your own 
address!) List problems? Notify owner-jess-us...@sandia.gov.



To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.



Re: JESS: [EXTERNAL] Dynamic rule-base analysis

2013-08-17 Thread Przemyslaw Woznowski
Thanks Wolfgang, this helps a lot! I must have missed the
getConditionalElements in the API. The analysis of the rule's LHS is
working great and it's RHS is more complex but do-able.

Once again, thanks for the advice,
Pete


On Thu, Aug 15, 2013 at 6:51 PM, Wolfgang Laun wolfgang.l...@gmail.comwrote:

 Rete has listDefrules and Defrule has getConditionalElements, which
 lets you retrieve its constituents, depending on it being a Pattern or
 Accumulate; if it is a Group you must recurse down... It's like
 walking an AST

 RHS is similar. But note that fact modifications are possible in
 functions, so if one of these is called on the RHS, you'll have to
 investigate in depth.

 Expect to have some fun ;-)

 Cheers
 Wolfgang


 On 14/08/2013, Przemyslaw Woznowski p.r.woznow...@cs.cf.ac.uk wrote:
  Dear Jess users.
 
  What I am trying to do is to dynamically list all the defrules together
  with their LHS and RHS facts excluding any conditions. Basically what I
  mean is that, for example, if there are Person and Car facts on the
 rule's
  LHS and the rule asserts an Owner fact, deletes the Car fact and modifies
  the Person fact. I would like to create a data structure that would, for
  each rule, carry it's name and the facts it needs to fire (excluding any
  conditions just deftemplate's name) and any deftemplates that appear on
 the
  rule's RHS. So for the example above, something like:
  Rule_1
   needs: Person, Car
   asserts: Owner
   modifies: Person
   deletes: Car
 
  I can get a list of all defrules via the listDefrules() method called on
  the Rete object but then it gets tricky. The listNodes() method called on
  the HasLHS object gives a textual description of the rule's LHS but I
  cannot find a method that would simply return name of facts on the LHS.
  Some text processing would solve the rule's LHS problem as I can look for
  occurrences of :: to find facts. However, the rule's RHS is more
  problematic as I cannot find a method that would give me what I want.
 
  I would appreciate your help with this one.
 
  Best regards,
  Pete
 
  --
  Przemyslaw (Pete) Woznowski, PhD candidate  RA
  Email: p.r.woznow...@cs.cardiff.ac.uk
  Room C/2.06, Desk 8
  Cardiff School of Computer Science  Informatics,
  Cardiff University,
  Queen's Buildings,
  5 The Parade, Roath,
  Cardiff, CF24 3AA, UK
   School of Healthcare Studies,
  Cardiff University
  Cardigan House
  Heath Park Campus
  Cardiff, CF14 4XN, UK
 
 
 To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
 in the BODY of a message to majord...@sandia.gov, NOT to the list
 (use your own address!) List problems? Notify owner-jess-us...@sandia.gov.
 




-- 
Przemyslaw (Pete) Woznowski, PhD candidate  RA
Email: p.r.woznow...@cs.cardiff.ac.uk
Room C/2.06, Desk 8
Cardiff School of Computer Science  Informatics,
Cardiff University,
Queen's Buildings,
5 The Parade, Roath,
Cardiff, CF24 3AA, UK
 School of Healthcare Studies,
Cardiff University
Cardigan House
Heath Park Campus
Cardiff, CF14 4XN, UK


JESS: [EXTERNAL] Dynamic rule-base analysis

2013-08-15 Thread Przemyslaw Woznowski
Dear Jess users.

What I am trying to do is to dynamically list all the defrules together
with their LHS and RHS facts excluding any conditions. Basically what I
mean is that, for example, if there are Person and Car facts on the rule's
LHS and the rule asserts an Owner fact, deletes the Car fact and modifies
the Person fact. I would like to create a data structure that would, for
each rule, carry it's name and the facts it needs to fire (excluding any
conditions just deftemplate's name) and any deftemplates that appear on the
rule's RHS. So for the example above, something like:
Rule_1
 needs: Person, Car
 asserts: Owner
 modifies: Person
 deletes: Car

I can get a list of all defrules via the listDefrules() method called on
the Rete object but then it gets tricky. The listNodes() method called on
the HasLHS object gives a textual description of the rule's LHS but I
cannot find a method that would simply return name of facts on the LHS.
Some text processing would solve the rule's LHS problem as I can look for
occurrences of :: to find facts. However, the rule's RHS is more
problematic as I cannot find a method that would give me what I want.

I would appreciate your help with this one.

Best regards,
Pete

-- 
Przemyslaw (Pete) Woznowski, PhD candidate  RA
Email: p.r.woznow...@cs.cardiff.ac.uk
Room C/2.06, Desk 8
Cardiff School of Computer Science  Informatics,
Cardiff University,
Queen's Buildings,
5 The Parade, Roath,
Cardiff, CF24 3AA, UK
 School of Healthcare Studies,
Cardiff University
Cardigan House
Heath Park Campus
Cardiff, CF14 4XN, UK


RE: JESS: [EXTERNAL] Issue with static methods (or generics?)

2013-08-07 Thread Friedman-Hill, Ernest
Java syntax like DefaultEdge.class is (more or less) just syntactic sugar for 
'java.lang.Class.forName(org.jgrapht.graph.DefaultEdge);' which in Jess will 
come out like (Class.forName org.jgrapht.graph.DefaultEdge)  (taking 
advantage of the default static imports from the java.lang package.) So you 
want to do something like

(bind ?edge-class (Class.forName org.jgrapht.graph.DefaultEdge))
(bind ?graph (new org.jgrapht.graph.DefaultDirectedGraph ?edge-class))

From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Aurélien Mazurie
Sent: Wednesday, August 07, 2013 7:11 PM
To: jess-users
Subject: JESS: [EXTERNAL] Issue with static methods (or generics?)

Dear Jess users,
I am having trouble instantiating a Java class from within a rule's RHS, and 
cannot figure out how to solve this problem.

The code in my RHS creates an instance of a class from the JGraphT library. As 
seen in  
https://github.com/jgrapht/jgrapht/blob/master/jgrapht-demo/src/main/java/org/jgrapht/demo/HelloJGraphT.java
 (lines 91-92), the creation of a DefaultDirectedGraph instance require another 
class as argument; here, DefaultEdge.

I couldn't find an example in the Jess documentation about how to do that. For 
example, I tried the following:

(bind ?edge-class org.jgrapht.graph.DefaultEdge)
(bind ?graph (new org.jgrapht.graph.DefaultDirectedGraph 
?edge-class))

I also tried variations such as

(bind ?edge-class org.jgrapht.graph.DefaultEdge)
(bind ?graph (new org.jgrapht.graph.DefaultDirectedGraph 
(?edge-class getClass))

or

(bind ?edge-class (new org.jgrapht.graph.DefaultEdge))
(bind ?graph (new org.jgrapht.graph.DefaultDirectedGraph 
?edge-class))

Any idea about what the syntax should be to properly instantiate the 
DefaultDirectedGraph class? For information (but not certain how relevant it is 
here), I succeeded in the past in using java.util.regex.Pattern and its static 
method 'compile' by typing

(bind ?pattern-class java.util.regex.Pattern)
(bind ?matches ((?pattern-class compile ...) matcher ?string))

Best,
Aurélien


Re: JESS: [EXTERNAL] Dynamic rule matching in the LHS

2013-07-31 Thread Aurelien Mazurie
Thank you for this tip. It is not what I am trying to achieve, however. I must 
apologize if my original email was misunderstood.

My goal is to write a rule that would fire for any 'bag-of-items' fact whose 
item names, as listed in a multislot, are all represented by 'item' facts. The 
rule should not fire if one or more of these items are absent from the fact 
list:

(item (name A))
(item (name B))
(bag-of-items (item-names A))
(bag-of-items (item-names A B))
(bag-of-items (item-names A B C))

In this example the two first 'bag-of-items' facts would fire my hypothetical 
rule, while the third would not, because there is no 'item' fact with name C.

The 'forall' approach suggested by M. Friedman-Hill is quite close to this, 
however it seems that the rule will fire only if _all_ the 'bag-of-items' facts 
have all of their items represented by facts. I.e., in my example above it 
would not fire until I remove the third bag-of-items fact. Once again, it is 
close but no cigar.

Best,
Aurélien

On Jul 30, 2013, at 10:54 AM, Jason Morris jason.c.mor...@gmail.com wrote:

 Another old skool way of doing it using predicate constraints is...
 
 (clear)
 (deftemplate item (slot name))
 (deftemplate bag-of-items (multislot item-names))
 
 (defrule fire-for-all-members-in-bag
  ; If you have a bag of item names ...
  (bag-of-items (item-names $?item-names))
  ; and there is an item whose name is member of this bag ...
  ?item -(item (name ?name:(member$ ?name $?item-names)))
 =
  ; ...then do something interesting
  (printout t ?name  is in the bag! crlf))
 
 ;; Program
 (reset)
 (assert (item (name A)))
 (assert (item (name B)))
 (assert (item (name C)))
 (assert (bag-of-items (item-names A B C)))
 (run)
 
 *Jason C. Morris*
 President, Principal Consultant
 Morris Technical Solutions LLC
 President, Rules Fest Association
 Chairman, IntelliFest 2013: International Conference on Reasoning
 Technologies




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Dynamic rule matching in the LHS

2013-07-31 Thread Wolfgang Laun
On 30/07/2013, Aurelien Mazurie ajmazu...@oenone.net wrote:
 Thank you very much for this answer. It seems like 'forall' will fire the
 rule only if all the 'bag-of-items' facts are validated (i.e., if all of
 them have 'item' facts with the names listed in their 'names' slot). Is that
 correct?

Yes.


 If yes, then what I am trying to do is slightly different. I do expect to
 have some of the 'bag-of-items' facts failing the validation. What I want is
 to act upon those who pass (and also, incidentally, on those who do not
 pass).

Ernest's rule fires on the pass set.


 Is there a way to keep track of which, among all the 'bag-of-items' facts,
 are validated by the 'forall' CE?

The negation of the forall is the negated existential quantifier, thus:

(defrule check-bag-NOT-valid
  (bag-of-items (names $?   ?name   $?))
  (not (item (name ?name)))
=
  (printout t The bag contains invalid  ?name crlf))

The rule fires for each of the bad items in a bag. Sometimes this is
desired. If not, the bad bag might be retracted or marked as bad in
an additional slot.

-W


 Best,
 Aurélien

 ps: 'dynamic' may be a poor choice of words. I meant that the LHS had to
 dynamically adapt to the content of a fact's multislot, different from one
 fact to another

 On Jul 30, 2013, at 8:21 AM, Friedman-Hill, Ernest [via Jess]
 ml-node+s2305737n4654179...@n4.nabble.com wrote:

 Not sure what dynamic means in this context. But you can use the
 forall conditional element to implement this rule. You could read the
 LHS here as For all values of ?name in bag-of-items, there's a
 corresponding item fact.

 (defrule check-bag-valid
 (forall
 (bag-of-items (names $??name   $?))
 (item (name ?name)))
 =
 (printout t The bag is valid crlf))

 NOTE: Like many complex Jess rules, this one won't fire unless before
 adding your facts you've executed the (reset) command to asset
 (initial-fact).





 --
 View this message in context:
 http://jess.2305737.n4.nabble.com/Dynamic-rule-matching-in-the-LHS-tp4654176p4654180.html
 Sent from the Jess mailing list archive at Nabble.com.



To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




RE: JESS: [EXTERNAL] Dynamic rule matching in the LHS

2013-07-31 Thread Friedman-Hill, Ernest
You can slightly augment my forall version to fire once for each good set, 
given that bag-of-items has some kind of identifier; I'll assume a slot named 
id. It doesn't matter what the contents are:

(defrule check-bag-valid
(bag-of-items (id ?id) ))
(forall
(bag-of-items (id ?id) (names $??name   $?))
(item (name ?name)))
=
(printout t The bag is valid crlf))

This rule could be read as For some bag with some id, every value in the names 
slot has a matching item fact. It will fire once for every bag for which this 
condition holds.

-Original Message-
From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Aurelien Mazurie
Sent: Wednesday, July 31, 2013 1:13 AM
To: jess-users
Subject: Re: JESS: [EXTERNAL] Dynamic rule matching in the LHS

Thank you for this tip. It is not what I am trying to achieve, however. I must 
apologize if my original email was misunderstood.

My goal is to write a rule that would fire for any 'bag-of-items' fact whose 
item names, as listed in a multislot, are all represented by 'item' facts. The 
rule should not fire if one or more of these items are absent from the fact 
list:

(item (name A))
(item (name B))
(bag-of-items (item-names A))
(bag-of-items (item-names A B))
(bag-of-items (item-names A B C))

In this example the two first 'bag-of-items' facts would fire my hypothetical 
rule, while the third would not, because there is no 'item' fact with name C.

The 'forall' approach suggested by M. Friedman-Hill is quite close to this, 
however it seems that the rule will fire only if _all_ the 'bag-of-items' facts 
have all of their items represented by facts. I.e., in my example above it 
would not fire until I remove the third bag-of-items fact. Once again, it is 
close but no cigar.

Best,
Aurélien

On Jul 30, 2013, at 10:54 AM, Jason Morris jason.c.mor...@gmail.com wrote:

 Another old skool way of doing it using predicate constraints is...
 
 (clear)
 (deftemplate item (slot name))
 (deftemplate bag-of-items (multislot item-names))
 
 (defrule fire-for-all-members-in-bag
  ; If you have a bag of item names ...
  (bag-of-items (item-names $?item-names))  ; and there is an item 
 whose name is member of this bag ...
  ?item -(item (name ?name:(member$ ?name $?item-names))) =  ; 
 ...then do something interesting  (printout t ?name  is in the bag! 
 crlf))
 
 ;; Program
 (reset)
 (assert (item (name A)))
 (assert (item (name B)))
 (assert (item (name C)))
 (assert (bag-of-items (item-names A B C)))
 (run)
 
 *Jason C. Morris*
 President, Principal Consultant
 Morris Technical Solutions LLC
 President, Rules Fest Association
 Chairman, IntelliFest 2013: International Conference on Reasoning 
 Technologies




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list (use your own 
address!) List problems? Notify owner-jess-us...@sandia.gov.




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] Matching facts based on a slot, but not the fact's type

2013-07-30 Thread Aurelien Mazurie
Dear Jess users,
I am still learning the ropes, and cannot find an answer to the following
question either online or in the 'Jess in action' book. Is there a way to
match facts in a LHS based on the presence of a slot?

For example, I have two templates:

(deftemplate A (slot score))
(deftemplate B (slot score))

I would like my rule to be triggered if any fact (either from template A,
B, or others) have a 'score' slot with a specific value. For now I can do
it by manually adding references to A and B in the LHS, but this will not
scale well. I'm looking for a solution that can just work on any fact,
regardless of the template they are defined from.

Best,
Aurelien


JESS: [EXTERNAL] Dynamic rule matching in the LHS

2013-07-30 Thread Aurelien Mazurie
Dear Jess users,
I am wondering how to write a rule that would dynamically match multiple
facts based on their names.

Let say I have two types of facts; one representing the information that an
item (with a given name) exists, and the other one representing a list of
items (e.g., as a list of names in a multislot). It could be something like
this:

  (deftemplate item (slot name))
  (deftemplate bag-of-items (multislot names))

  (assert (item (name A))
  (assert (bag-of-items (names A B))

What I am trying to write is a rule that would, for any bag-of-items fact,
fire if all the items listed in the multislot 'name' are item facts that
have been asserted.

I am wondering if there is an easy way to do that, or if I'll need to hack
my way through it with loops and tests in the LHS of my rule.

Any suggestion?
Best,
Aurélien



--
View this message in context: 
http://jess.2305737.n4.nabble.com/Dynamic-rule-matching-in-the-LHS-tp4654176.html
Sent from the Jess mailing list archive at Nabble.com.



To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




RE: JESS: [EXTERNAL] Matching facts based on a slot, but not the fact's type

2013-07-30 Thread Friedman-Hill, Ernest
The short answer is no. Templates are like Java classes, and so this is akin 
to asking if you can write Java code that reads the value of a score member 
variable in any class.

But you can use template inheritance to achieve your goal. Templates can extend 
other templates; just put your score slot in a base template, and extend 
everything else that needs a score slot from that common base, and write your 
patterns to match the base template. Read about the use of extends in 
templates here:

http://www.jessrules.com/jess/docs/71/memory.html


From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Aurelien Mazurie
Sent: Friday, July 26, 2013 4:43 PM
To: jess-users
Subject: JESS: [EXTERNAL] Matching facts based on a slot, but not the fact's 
type

Dear Jess users,
I am still learning the ropes, and cannot find an answer to the following 
question either online or in the 'Jess in action' book. Is there a way to match 
facts in a LHS based on the presence of a slot?

For example, I have two templates:

(deftemplate A (slot score))
(deftemplate B (slot score))

I would like my rule to be triggered if any fact (either from template A, B, or 
others) have a 'score' slot with a specific value. For now I can do it by 
manually adding references to A and B in the LHS, but this will not scale well. 
I'm looking for a solution that can just work on any fact, regardless of the 
template they are defined from.

Best,
Aurelien


RE: JESS: [EXTERNAL] Dynamic rule matching in the LHS

2013-07-30 Thread Friedman-Hill, Ernest
Not sure what dynamic means in this context. But you can use the forall 
conditional element to implement this rule. You could read the LHS here as For 
all values of ?name in bag-of-items, there's a corresponding item fact.

(defrule check-bag-valid
(forall
(bag-of-items (names $??name   $?))
(item (name ?name)))
=
(printout t The bag is valid crlf))

NOTE: Like many complex Jess rules, this one won't fire unless before adding 
your facts you've executed the (reset) command to asset (initial-fact).


-Original Message-
From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Aurelien Mazurie
Sent: Friday, July 26, 2013 4:56 PM
To: jess-users
Subject: JESS: [EXTERNAL] Dynamic rule matching in the LHS

Dear Jess users,
I am wondering how to write a rule that would dynamically match multiple facts 
based on their names.

Let say I have two types of facts; one representing the information that an 
item (with a given name) exists, and the other one representing a list of items 
(e.g., as a list of names in a multislot). It could be something like
this:

  (deftemplate item (slot name))
  (deftemplate bag-of-items (multislot names))

  (assert (item (name A))
  (assert (bag-of-items (names A B))

What I am trying to write is a rule that would, for any bag-of-items fact, fire 
if all the items listed in the multislot 'name' are item facts that have been 
asserted.

I am wondering if there is an easy way to do that, or if I'll need to hack my 
way through it with loops and tests in the LHS of my rule.

Any suggestion?
Best,
Aurélien



--
View this message in context: 
http://jess.2305737.n4.nabble.com/Dynamic-rule-matching-in-the-LHS-tp4654176.html
Sent from the Jess mailing list archive at Nabble.com.



To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list (use your own 
address!) List problems? Notify owner-jess-us...@sandia.gov.




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Dynamic rule matching in the LHS

2013-07-30 Thread Jason Morris
Another old skool way of doing it using predicate constraints is...

(clear)
(deftemplate item (slot name))
(deftemplate bag-of-items (multislot item-names))

(defrule fire-for-all-members-in-bag
  ; If you have a bag of item names ...
  (bag-of-items (item-names $?item-names))
  ; and there is an item whose name is member of this bag ...
  ?item -(item (name ?name:(member$ ?name $?item-names)))
 =
  ; ...then do something interesting
  (printout t ?name  is in the bag! crlf))

;; Program
(reset)
(assert (item (name A)))
(assert (item (name B)))
(assert (item (name C)))
(assert (bag-of-items (item-names A B C)))
(run)

*Jason C. Morris*
President, Principal Consultant
Morris Technical Solutions LLC
President, Rules Fest Association
Chairman, IntelliFest 2013: International Conference on Reasoning
Technologies

phone: +01.517.376.8314
skype: jcmorris-mts
email: consult...@morris-technical-solutions.com
mybio: http://www.linkedin.com/in/jcmorris



www.intellifest.org
Invent * Innovate * Implement at IntelliFest!


On Fri, Jul 26, 2013 at 4:55 PM, Aurelien Mazurie ajmazu...@oenone.netwrote:

 Dear Jess users,
 I am wondering how to write a rule that would dynamically match multiple
 facts based on their names.

 Let say I have two types of facts; one representing the information that an
 item (with a given name) exists, and the other one representing a list of
 items (e.g., as a list of names in a multislot). It could be something like
 this:

   (deftemplate item (slot name))
   (deftemplate bag-of-items (multislot names))

   (assert (item (name A))
   (assert (bag-of-items (names A B))

 What I am trying to write is a rule that would, for any bag-of-items fact,
 fire if all the items listed in the multislot 'name' are item facts that
 have been asserted.

 I am wondering if there is an easy way to do that, or if I'll need to hack
 my way through it with loops and tests in the LHS of my rule.

 Any suggestion?
 Best,
 Aurélien



 --
 View this message in context:
 http://jess.2305737.n4.nabble.com/Dynamic-rule-matching-in-the-LHS-tp4654176.html
 Sent from the Jess mailing list archive at Nabble.com.


 
 To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
 in the BODY of a message to majord...@sandia.gov, NOT to the list
 (use your own address!) List problems? Notify owner-jess-us...@sandia.gov

Re: JESS: [EXTERNAL] Dynamic rule matching in the LHS

2013-07-30 Thread Aurelien Mazurie
Thank you very much for this answer. It seems like 'forall' will fire the rule 
only if all the 'bag-of-items' facts are validated (i.e., if all of them have 
'item' facts with the names listed in their 'names' slot). Is that correct?

If yes, then what I am trying to do is slightly different. I do expect to have 
some of the 'bag-of-items' facts failing the validation. What I want is to act 
upon those who pass (and also, incidentally, on those who do not pass).

Is there a way to keep track of which, among all the 'bag-of-items' facts, are 
validated by the 'forall' CE?

Best,
Aurélien

ps: 'dynamic' may be a poor choice of words. I meant that the LHS had to 
dynamically adapt to the content of a fact's multislot, different from one fact 
to another

On Jul 30, 2013, at 8:21 AM, Friedman-Hill, Ernest [via Jess] 
ml-node+s2305737n4654179...@n4.nabble.com wrote:

 Not sure what dynamic means in this context. But you can use the forall 
 conditional element to implement this rule. You could read the LHS here as 
 For all values of ?name in bag-of-items, there's a corresponding item fact. 
 
 (defrule check-bag-valid 
 (forall 
 (bag-of-items (names $??name   $?)) 
 (item (name ?name))) 
 = 
 (printout t The bag is valid crlf)) 
 
 NOTE: Like many complex Jess rules, this one won't fire unless before adding 
 your facts you've executed the (reset) command to asset (initial-fact). 





--
View this message in context: 
http://jess.2305737.n4.nabble.com/Dynamic-rule-matching-in-the-LHS-tp4654176p4654180.html
Sent from the Jess mailing list archive at Nabble.com.

JESS: [EXTERNAL] Fwd: Problems with fuzzy jess implementations

2013-07-11 Thread Martín Rodríguez
Hi, I could overcome some problems with FuzzyJess implementation, and now I
have a fuzzy rule that never executes when it should.
My Clip run using BackwardChaining, Im sure that the *intensidad_tos *rule
assert the gripe fuzzyvalue fine, but the *global_influenza *rule never
trigger,

Somebody can help me with that??

Thanks

The code is the next:

*(defglobal ?*fuzzyDiagnosticoGripe* = (new FuzzyVariable
Diagnostico_gripal 0.0 5.0 integer))*
*
*
*
(defrule diagnostico_init
=
;; the nrc FuzzyJess functions are loaded
(load-package nrc.fuzzy.jess.FuzzyFunctions)
(bind ?rlf (new RightLinearFunction))
(bind ?llf (new LeftLinearFunction))
;; terms
(?*fuzzyDiagnosticoGripe* addTerm Comun (new RFuzzySet 0.0 2.5
?rlf))
(?*fuzzyDiagnosticoGripe* addTerm N1H1 (new LFuzzySet 2.5 5.0
?llf))
)

(defrule intensidad_tos
(declare (auto-focus TRUE))
(check diagnostico-b)
(answer (ident fuzzy_tos) (text yes))
=
(assert (gripe (new nrc.fuzzy.FuzzyValue ?*fuzzyDiagnosticoGripe*
N1H1)))
)

(defrule global_influenza
(gripeGlobal ?gg:(fuzzy-match ?gg N1H1))
 =
   (MAIN::recommend-action N1H1)
   (halt)
)
*


Motor_Diagnostico_General.clp
Description: Binary data


JESS: [EXTERNAL] Problems with fuzzy jess implementations

2013-07-03 Thread Martín Rodríguez
Dear Doctor Orchar,

Hi my name is Martin Rodriguez and Im studen of engineering. As final
project Im developing a system with Jade, Jess and fuzzy jess.
The purpose of the system is to provide medical diagnosis.
Thats why i needed a rules based system with backward chaining, and I
choose Jess.

Well, my problem is when I begin to use FuzzyJ on my Jess files.

I send you as an attachment, a short file with the code complete.

My first problem occurs when I write the next rule:

*(defrule intensidad_tos*
* (declare (auto-focus TRUE))*
*(check diagnostico-b)*
*(answer (ident fuzzy_tos) (text ?ht:(fuzzy-match ?ht
secaContinua)))*
*=*
*(assert (tos (new nrc.fuzzy.FuzzyValue ?*fuzzyTos*
secaContinua)))*
*)*
*
*
this code does not even compile and send me the next error message:

*Jess reported an error in routine ReteCompiler.addRule.**  Message: Can't
use funcalls in backchained patterns text.*

Well, my next and last problem is when I remove de line * (answer (ident
fuzzy_tos) (text ?ht:(fuzzy-match ?ht secaContinua))) *on the rule
before, and I replace with
*(answer (ident fuzzy_tos) (text 5)).*
I response with a number 5 and the rule asserts the *tos FuzzyValue. *That
trigger the next rule:

*(defrule intensidad_dolor_cabeza*
* (declare (auto-focus TRUE))*
*(check diagnostico-b)*
*(tos ?t:(fuzzy-match ?t secaContinua))*
*(answer (ident fuzzy_dolor_cabeza) (text 5))*
*=*
*(assert (dolor_de_cabeza (new nrc.fuzzy.FuzzyValue
?*fuzzyDolorCabeza* intenso)))*
*)*
*
*
but when this rule trigger, send me the next error:

*Jess reported an error in routine fuzzy-match*
* while executing (fuzzy-match ?t(0,0,0) secaContinua)*
* while executing rule LHS (MTEQ)*
* while executing rule LHS (MTELN)*
* while executing rule LHS (TECT)*
* while executing (assert (interview::tos (new nrc.fuzzy.FuzzyValue
?*fuzzyTos* secaContinua)))*
* while executing defrule interview::intensidad_tos.*
*  Message: Error during execution.*
*
*
Please, I send you the clp file complete on the attachment, and if you can
help me I'll be very grateful, because Im stuck with this problem.
Thanks again for your time!!

regards!!

Martin Rodriguez


Motor_Diagnostico_General.clp
Description: Binary data


RE: JESS: [EXTERNAL] Question on QueryResult close() function

2013-06-28 Thread Friedman-Hill, Ernest
Hi Daniel,

Closing a QueryResult doesn't really do anything important; normal garbage 
collection will free all of its resources.

I used Google to see if there was a standard Jess/Matlab integration that I 
didn't know about, but I didn't find one; I'm afraid I don't know anything 
about how Jess and Matlab are typically used together. Jess does warm up for 
a few iterations if run repeatedly with the same rules - i.e., (reset) won't 
necessarily get you back to the same memory usage as before the first run - but 
this levels off quickly. It would be a good idea to run a heap analyzer tool to 
see what kind of objects are being leaked; that might give us a clue as to 
what's happening.

From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Daniel Selva
Sent: Thursday, June 27, 2013 12:53 PM
To: jess-users
Subject: JESS: [EXTERNAL] Question on QueryResult close() function

Hi,

I am experiencing a memory leak problem in a Matlab-Jess application and I am 
trying to locate the leak. I came across the definition of the close() method 
of the QueryResult class. I have never called this method after using queries.

1) Should I call close() after using a query?
2) Could not calling close() be the cause of the leak?

If not, I would appreciate any tips on typical causes of leaks in Matlab-Jess 
applications.

Thanks in advance,

Daniel


Re: JESS: [EXTERNAL] Question on QueryResult close() function

2013-06-28 Thread Peter Lin
Hi Daniel,

How are you measuring the leak?

It is important to look at the heap used and not the total heap allocated
to the JVM process. What I've done in the past with JESS is write a
function that uses java's runtime class to get actual memory used stats.

Runtime rt = Runtime.getRuntime();
long free = rt.freeMemory();
long total = rt.totalMemory();

If you have concerns about JVM heap getting to big, then set -Xmx to the
value you desire. If runtime stats don't help, your only viable option is
to use a profiling tool like YourKit, JProbe or some other profiler to
track down the leak.

peter


On Fri, Jun 28, 2013 at 9:21 AM, Friedman-Hill, Ernest
ejfr...@sandia.govwrote:

  Hi Daniel,

 ** **

 Closing a QueryResult doesn’t really do anything important; normal garbage
 collection will free all of its resources.

 ** **

 I used Google to see if there was a standard Jess/Matlab integration that
 I didn’t know about, but I didn’t find one; I’m afraid I don’t know
 anything about how Jess and Matlab are typically used together. Jess does
 “warm up” for a few iterations if run repeatedly with the same rules –
 i.e., “(reset)” won’t necessarily get you back to the same memory usage as
 before the first run – but this levels off quickly. It would be a good idea
 to run a heap analyzer tool to see what kind of objects are being leaked;
 that might give us a clue as to what’s happening.

 ** **

 *From:* owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] *On
 Behalf Of *Daniel Selva
 *Sent:* Thursday, June 27, 2013 12:53 PM
 *To:* jess-users
 *Subject:* JESS: [EXTERNAL] Question on QueryResult close() function

 ** **

 Hi,

 ** **

 I am experiencing a memory leak problem in a Matlab-Jess application and I
 am trying to locate the leak. I came across the definition of the close()
 method of the QueryResult class. I have never called this method after
 using queries. 

 ** **

 1) Should I call close() after using a query?

 2) Could not calling close() be the cause of the leak? 

 ** **

 If not, I would appreciate any tips on typical causes of leaks in
 Matlab-Jess applications. 

 ** **

 Thanks in advance,


 Daniel



Re: JESS: [EXTERNAL] Creating an eLearning system following TekMart example

2013-06-27 Thread Rejaul Barbhuiya
Thanks,

runQueryStar() needs at least 2 args - query name and a variable of
valuevector type.
I don't want to pass any variable as shown in TekMark example in  Jess in
Action

Iterator result = engine.runQuery(all-products, new ValueVector());

When I pass the same blank valuevector(), it doesn't work.

QueryResult result =
engine.runQueryStar(list-courses, new ValueVector());


My query is as follows:

(defquery list-courses
(subject (sub-name ?subname))
(module (parent-subject ?subname) (mod-name ?modname))
(topic (parent-module ?modname) (topic-name ?topicname))
(concept (parent-topic ?topicname) (concept-name ?conceptname))
(learning-object (parent-concept ?conceptname) (lo-name ?LOname))
)



On Wed, Jun 26, 2013 at 7:22 PM, Friedman-Hill, Ernest
ejfr...@sandia.govwrote:

  Don’t try to get the Token – hiding that sort of ugliness is the whole
 reason run-query* exists. Use a pattern binding instead:

 ** **

 (defquery my-query

 (declare (variables ?n))

 ?f - (room (number ?n)))

 ** **

 (bind ?r (run-query* my-query 100))

 (while (?r next)

 (bind ?fact (?r getObject f))

;; … now do something with your fact 

 ** **

 *From:* owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] *On
 Behalf Of *Rejaul Barbhuiya
 *Sent:* Wednesday, June 26, 2013 6:22 AM
 *To:* jess-users
 *Subject:* Re: JESS: [EXTERNAL] Creating an eLearning system following
 TekMart example

 ** **

 Thanks Ernest.

 ** **

 In my program, I was using runQuery(arg0, arg1) and storing the result in
 a Iterator as shown below. Then I am storing the result in token and from
 token to fact.

 ** **

 Iterator sno = engine.runQuery(session-number,new
 ValueVector().add(sidValue));

 if (sno.hasNext()) {

 Token token = (Token) sno.next();

 Fact fact = token.fact(1);

 ** **

 Now, I want to use runQueryStar(). But I don't know how to read the Query
 Result.

 ** **

 QueryResult sno = engine.runQueryStar(session-number,new
 ValueVector().add(sidValue));

 if (sno.next()) {

 Token token = (Token) sno.**;  *what function should I use here?*

 Fact fact = token.fact(1);

 ** **

 ** **

 ** **

 On Mon, Jun 24, 2013 at 11:06 PM, Friedman-Hill, Ernest 
 ejfr...@sandia.gov wrote:

 You can use a query to easily find your facts; see
 http://www.jessrules.com/jess/docs/71/queries.html and in particular,
 http://www.jessrules.com/jess/docs/71/queries.html#in_java




 
 To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
 in the BODY of a message to majord...@sandia.gov, NOT to the list
 (use your own address!) List problems? Notify owner-jess-us...@sandia.gov

Re: JESS: [EXTERNAL] Creating an eLearning system following TekMart example

2013-06-27 Thread Rejaul Barbhuiya
I have four *deftemplate*s - Subject, where each subject can have multiple
modules and each module can have multiple topics.
Now I want to create a table of contents (or a tree structure) so that all
topics belonging to same Module can be listed together, while those of
other module will be listed under that module. same will for listing of
Modules.

So my question basically is how should I write the queries and how should I
retrieve them. I have tried following:
(defquery sub-name
(subject (sub-name ?subname)))

(defquery module-name
(subject (sub-name ?subname))
(module (parent-subject ?subname) (mod-name ?modname)))

(defquery topic-name
(module (mod-name ?subname))
(topic (parent-module ?modname) (topic-name ?topicname)))

I am triggering the queries as:
QueryResult subject = engine.runQueryStar(sub-name, new ValueVector());
QueryResult module = engine.runQueryStar(module-name, new ValueVector());
QueryResult topic = engine.runQueryStar(topic-name, new ValueVector());
QueryResult concept = engine.runQueryStar(concept-name, new
ValueVector());

and want to display the tree in for example in Java as :

while(subject.next())
{
   print (subject name here)
while(module.next())
{
  print (Module name here)
while(topic.next())
   {
 print (Topic name here)
   }
}
}

So kindly suggest me how to control the queries.

Many thanks again,



On Wed, Jun 26, 2013 at 7:22 PM, Friedman-Hill, Ernest
ejfr...@sandia.govwrote:

  Don’t try to get the Token – hiding that sort of ugliness is the whole
 reason run-query* exists. Use a pattern binding instead:

 ** **

 (defquery my-query

 (declare (variables ?n))

 ?f - (room (number ?n)))

 ** **

 (bind ?r (run-query* my-query 100))

 (while (?r next)

 (bind ?fact (?r getObject f))

;; … now do something with your fact 

 ** **

 *From:* owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] *On
 Behalf Of *Rejaul Barbhuiya
 *Sent:* Wednesday, June 26, 2013 6:22 AM
 *To:* jess-users
 *Subject:* Re: JESS: [EXTERNAL] Creating an eLearning system following
 TekMart example

 ** **

 Thanks Ernest.

 ** **

 In my program, I was using runQuery(arg0, arg1) and storing the result in
 a Iterator as shown below. Then I am storing the result in token and from
 token to fact.

 ** **

 Iterator sno = engine.runQuery(session-number,new
 ValueVector().add(sidValue));

 if (sno.hasNext()) {

 Token token = (Token) sno.next();

 Fact fact = token.fact(1);

 ** **

 Now, I want to use runQueryStar(). But I don't know how to read the Query
 Result.

 ** **

 QueryResult sno = engine.runQueryStar(session-number,new
 ValueVector().add(sidValue));

 if (sno.next()) {

 Token token = (Token) sno.**;  *what function should I use here?*

 Fact fact = token.fact(1);

 ** **

 ** **

 ** **

 On Mon, Jun 24, 2013 at 11:06 PM, Friedman-Hill, Ernest 
 ejfr...@sandia.gov wrote:

 You can use a query to easily find your facts; see
 http://www.jessrules.com/jess/docs/71/queries.html and in particular,
 http://www.jessrules.com/jess/docs/71/queries.html#in_java




 
 To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
 in the BODY of a message to majord...@sandia.gov, NOT to the list
 (use your own address!) List problems? Notify owner-jess-us...@sandia.gov

JESS: [EXTERNAL] Question on QueryResult close() function

2013-06-27 Thread Daniel Selva
Hi,

I am experiencing a memory leak problem in a Matlab-Jess application and I
am trying to locate the leak. I came across the definition of the close()
method of the QueryResult class. I have never called this method after
using queries.

1) Should I call close() after using a query?
2) Could not calling close() be the cause of the leak?

If not, I would appreciate any tips on typical causes of leaks in
Matlab-Jess applications.

Thanks in advance,

Daniel


Re: JESS: [EXTERNAL] Creating an eLearning system following TekMart example

2013-06-26 Thread Rejaul Barbhuiya
Thanks Ernest.

In my program, I was using runQuery(arg0, arg1) and storing the result in a
Iterator as shown below. Then I am storing the result in token and from
token to fact.

Iterator sno = engine.runQuery(session-number,new
ValueVector().add(sidValue));
if (sno.hasNext()) {
Token token = (Token) sno.next();
Fact fact = token.fact(1);

Now, I want to use runQueryStar(). But I don't know how to read the Query
Result.

QueryResult sno = engine.runQueryStar(session-number,new
ValueVector().add(sidValue));
if (sno.next()) {
Token token = (Token) sno.**;  *what function should I use here?*
Fact fact = token.fact(1);




On Mon, Jun 24, 2013 at 11:06 PM, Friedman-Hill, Ernest
ejfr...@sandia.govwrote:

 You can use a query to easily find your facts; see
 http://www.jessrules.com/jess/docs/71/queries.html and in particular,
 http://www.jessrules.com/jess/docs/71/queries.html#in_java




 
 To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
 in the BODY of a message to majord...@sandia.gov, NOT to the list
 (use your own address!) List problems? Notify owner-jess-us...@sandia.gov.
 




-- 
*Rejaul Karim Barbhuiya*
Senior Research Fellow

Department of Computer Science
Jamia Millia Islamia
New Delhi, India
Phone: +91-9891430568


RE: JESS: [EXTERNAL] Creating an eLearning system following TekMart example

2013-06-26 Thread Friedman-Hill, Ernest
Don't try to get the Token - hiding that sort of ugliness is the whole reason 
run-query* exists. Use a pattern binding instead:

(defquery my-query
(declare (variables ?n))
?f - (room (number ?n)))

(bind ?r (run-query* my-query 100))
(while (?r next)
(bind ?fact (?r getObject f))
   ;; ... now do something with your fact

From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Rejaul Barbhuiya
Sent: Wednesday, June 26, 2013 6:22 AM
To: jess-users
Subject: Re: JESS: [EXTERNAL] Creating an eLearning system following TekMart 
example

Thanks Ernest.

In my program, I was using runQuery(arg0, arg1) and storing the result in a 
Iterator as shown below. Then I am storing the result in token and from token 
to fact.

Iterator sno = engine.runQuery(session-number,new 
ValueVector().add(sidValue));
if (sno.hasNext()) {
Token token = (Token) sno.next();
Fact fact = token.fact(1);

Now, I want to use runQueryStar(). But I don't know how to read the Query 
Result.

QueryResult sno = engine.runQueryStar(session-number,new 
ValueVector().add(sidValue));
if (sno.next()) {
Token token = (Token) sno.;  what function should I use here?
Fact fact = token.fact(1);



On Mon, Jun 24, 2013 at 11:06 PM, Friedman-Hill, Ernest 
ejfr...@sandia.govmailto:ejfr...@sandia.gov wrote:
You can use a query to easily find your facts; see 
http://www.jessrules.com/jess/docs/71/queries.html and in particular,
http://www.jessrules.com/jess/docs/71/queries.html#in_java





To unsubscribe, send the words 'unsubscribe jess-users 
y...@address.commailto:y...@address.com'
in the BODY of a message to majord...@sandia.govmailto:majord...@sandia.gov, 
NOT to the list
(use your own address!) List problems? Notify 
owner-jess-us...@sandia.govmailto:owner-jess-us...@sandia.gov.




--
Rejaul Karim Barbhuiya
Senior Research Fellow

Department of Computer Science
Jamia Millia Islamia
New Delhi, India
Phone: +91-9891430568


JESS: [EXTERNAL] Creating an eLearning system following TekMart example

2013-06-24 Thread Rejaul Barbhuiya
Kindly bear with me as I explain my query...

I am developing an Intelligent Tutoring System using Jess + Servlet + Jsp.
It will perform following actions (implemented as rules):

1. if student has completed a given task within specified time then give
him next task. else jess rules will decide a suitable feedback message for
the student (e.g., hurry up!).

2. a student while solving a multiple choice question (maintained as a
question fact) can attempt more than once till answers correctly. Here
number of attempts will be passes from a JSP page to a servlet page. The
servlet will modify the attempt_count SLOT in jess fact and the engine will
run and decide next suitable action.

a question fact initially is:

(deffacts question_objects
(question (object-name eaxmple1.html) (type question) (lo-id 10302)
(reqd-time 25) (prev-lo-id 10301) (next-lo-id 10303) (diff-level medium)
(attempt-count (default 0)))

(theory (object-name theory1.html) (type theory) (lo-id 103) (reqd-time
45) (prev-lo-id 102) (next-lo-id 104) (diff-level easy) (status incomplete))
)

Now, dynamically, i want to update the first fact's attempt-count slot
value.

But I have no clue how to get hold of that particular fact to call modify()
from Java?

Please let me know if I should be more detailed.

Thanking you,
-- 
*Rejaul Karim Barbhuiya*
Senior Research Fellow

Department of Computer Science
Jamia Millia Islamia
New Delhi, India
Phone: +91-9891430568


RE: JESS: [EXTERNAL] Creating an eLearning system following TekMart example

2013-06-24 Thread Friedman-Hill, Ernest
You can use a query to easily find your facts; see 
http://www.jessrules.com/jess/docs/71/queries.html and in particular, 
http://www.jessrules.com/jess/docs/71/queries.html#in_java





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Jess rule validation algorithm

2013-06-06 Thread Peter Lin
the literature on rule validation and ruleset validation is pretty deep.
Check on ACMQueue for old papers on the subject dating back to 80's and
90's.

There's too much prior art to attempt any sort of explanation on a mailing
list. I've been studying the topic since 2000 and the bottom line is it's
very tough. The simplest approach is to generate facts for each rule,
assert those facts and check the rule fired. Beyond that, you'd have to
analyze the RETE network to calculate the rule dependency graph and compare
the rules fired against the dependency graph.

peter lin


On Thu, Jun 6, 2013 at 10:52 AM, Wessel, Alexander a.wes...@itcampus.dewrote:

  Hi Jess-users,

 I’ m a german computer senice student working on my master thesis.  The
 topic is rule verification in rule based systems. We are using Jess as
 rule engine. Currently I’m looking for an implementation of a rule checker
 for Jess.  Alternative I’m looking for an algorithm to recognize rule
 errors like subsumed rules, circular rules, conflicting rules and so one.
 

 ** **

 I would appreciate if you can me give me an advice where I can find an
 implementation or an algorithm for further research?

 ** **

 Thanks for your help.

 ** **

 best regards

 ** **

 Alexander Wessel

 ** **

 Email: a.wes...@itcampus.de
 Phone: +49 341 49287-0 | Fax: +49 341 49287-790

 itCampus Software- und Systemhaus GmbH | a Software AG Company
 Nonnenstrasse 37 | 04229 Leipzig | Germany | http://www.itcampus.de
 Amtsgericht Leipzig HRB 15872 | Managing Director: Guido Laures
 USt-IdNr DE202041156

 ** **

 ** **



JESS: [EXTERNAL] Corrupted Negcnt Error

2013-05-30 Thread Dwight Hare
During a run I started getting the error

Jess reported an error in routine NodeNot2.tokenMatchesRight
while executing rule LHS (Node2)
while executing rule LHS (TECT).
  Message: Corrupted Negcnt ( 0) .

Any idea what this means?

Dwight



RE: JESS: [EXTERNAL] Corrupted Negcnt Error

2013-05-30 Thread Friedman-Hill, Ernest
It's an internal consistency check. Usually it means that a non-value class (a 
class whose identity, defined by hashCode()/equals(), changes during a run) is 
being used in an indexed field. Look at this section of the manual and see if 
you can use it to fix the problem:

http://www.jessrules.com/jess/docs/71/functions.html#set-value-class

In the past, very rarely, this message indicated a bug in Jess. I don't think 
this will be the case here - I think any bugs that trigger this assert were 
found and fixed long ago.


From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Dwight Hare
Sent: Wednesday, May 29, 2013 5:05 PM
To: jess-users
Subject: JESS: [EXTERNAL] Corrupted Negcnt Error

During a run I started getting the error

Jess reported an error in routine NodeNot2.tokenMatchesRight
while executing rule LHS (Node2)
while executing rule LHS (TECT).
  Message: Corrupted Negcnt ( 0) .

Any idea what this means?

Dwight



RE: JESS: [EXTERNAL] Corrupted Negcnt Error

2013-05-30 Thread Dwight Hare
By indexed field do you mean slot values? I don't use any Java objects other 
than simple primitives (Integer, Float, Boolean, String). I've looked at all my 
calls to the Value constructor.

Dwight

From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Friedman-Hill, Ernest
Sent: Thursday, May 30, 2013 7:36 AM
To: jess-users
Subject: RE: JESS: [EXTERNAL] Corrupted Negcnt Error

It's an internal consistency check. Usually it means that a non-value class (a 
class whose identity, defined by hashCode()/equals(), changes during a run) is 
being used in an indexed field. Look at this section of the manual and see if 
you can use it to fix the problem:

http://www.jessrules.com/jess/docs/71/functions.html#set-value-class

In the past, very rarely, this message indicated a bug in Jess. I don't think 
this will be the case here - I think any bugs that trigger this assert were 
found and fixed long ago.


From: owner-jess-us...@sandia.govmailto:owner-jess-us...@sandia.gov 
[mailto:owner-jess-us...@sandia.gov] On Behalf Of Dwight Hare
Sent: Wednesday, May 29, 2013 5:05 PM
To: jess-users
Subject: JESS: [EXTERNAL] Corrupted Negcnt Error

During a run I started getting the error

Jess reported an error in routine NodeNot2.tokenMatchesRight
while executing rule LHS (Node2)
while executing rule LHS (TECT).
  Message: Corrupted Negcnt ( 0) .

Any idea what this means?

Dwight



RE: JESS: [EXTERNAL] Corrupted Negcnt Error

2013-05-30 Thread Friedman-Hill, Ernest
Yes, that's what I mean, mutable Java objects in your slots. If that's not the 
problem, then a bug is a possibility. Can you provide me a 
SSCCEhttp://sscce.org/ that displays the error? (Off-list)

From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Dwight Hare
Sent: Thursday, May 30, 2013 1:00 PM
To: jess-users
Subject: RE: JESS: [EXTERNAL] Corrupted Negcnt Error

By indexed field do you mean slot values? I don't use any Java objects other 
than simple primitives (Integer, Float, Boolean, String). I've looked at all my 
calls to the Value constructor.

Dwight

From: owner-jess-us...@sandia.govmailto:owner-jess-us...@sandia.gov 
[mailto:owner-jess-us...@sandia.gov] On Behalf Of Friedman-Hill, Ernest
Sent: Thursday, May 30, 2013 7:36 AM
To: jess-users
Subject: RE: JESS: [EXTERNAL] Corrupted Negcnt Error

It's an internal consistency check. Usually it means that a non-value class (a 
class whose identity, defined by hashCode()/equals(), changes during a run) is 
being used in an indexed field. Look at this section of the manual and see if 
you can use it to fix the problem:

http://www.jessrules.com/jess/docs/71/functions.html#set-value-class

In the past, very rarely, this message indicated a bug in Jess. I don't think 
this will be the case here - I think any bugs that trigger this assert were 
found and fixed long ago.


From: owner-jess-us...@sandia.govmailto:owner-jess-us...@sandia.gov 
[mailto:owner-jess-us...@sandia.gov] On Behalf Of Dwight Hare
Sent: Wednesday, May 29, 2013 5:05 PM
To: jess-users
Subject: JESS: [EXTERNAL] Corrupted Negcnt Error

During a run I started getting the error

Jess reported an error in routine NodeNot2.tokenMatchesRight
while executing rule LHS (Node2)
while executing rule LHS (TECT).
  Message: Corrupted Negcnt ( 0) .

Any idea what this means?

Dwight



JESS: [EXTERNAL] nested foreach to return from the inner loop

2013-05-23 Thread Przemyslaw Woznowski
Hi Jess users,

I have the following function:

(deffunction similarity-score (?base ?other)
(bind ?score 0)
(bind ?totalDistance 0)
(bind ?counter 0)
(foreach ?x ?base
(bind ?counter (+ ?counter 1))
(printout t counter is: ?counter)
(bind ?partialDistance 0)
(printout t partialDist is: ?partialDistance)
(foreach ?y ?other
(bind ?partialDistance (+ ?partialDistance 1))
(printout t foreach partialDist is: ?partialDistance)
(if (eq ?x ?y) then
(bind ?score (+ ?score 1))
(printout t score is: ?score)
(return)
)
)
(bind ?totalDistance (/ ?counter ?partialDistance))
)
(return (- (/ ?score (length$ ?base)) (* (- 1 (/ (length$ ?base)
?totalDistance)) 0.1) ))
)

As you can see, the above function has a nested foreach loop, which upon
finding equal values in both list should skip to the next iteration of the
outer loop. In java, instead of (return) one would normally put a break
statement. As far as the documentation of the (foreach) construct reads, it
says: The return function can be used to break the iteration. However,
what I am finding is that the (return) function terminates the outer loop
too - unless I seriously messed up the code - but this is the result of my
observation of the (printout t) function. Moreover, when I remove the
(return) function, the function iterates over the outer and inner loops
just fine.

Any advice on how can I break the inner's loop iteration? I know I can use
a variable to flag that the match has been found and add it to the if
statement, but I am hoping that there is an equivalent of break in Jess.


Cheers,
Pete


Re: JESS: [EXTERNAL] nested foreach to return from the inner loop

2013-05-23 Thread Jason Morris
Did you try the
(break)http://www.jessrules.com/jess/docs/71/functions.html#breakfunction?

Arguments:NoneReturns:N/ADescription: Immediately exit any enclosing loop
or control scope. Can be used inside of
forhttp://www.jessrules.com/jess/docs/71/functions.html#for,
while http://www.jessrules.com/jess/docs/71/functions.html#while, and
foreach http://www.jessrules.com/jess/docs/71/functions.html#foreachloops,
as well as within the body of a
deffunctionhttp://www.jessrules.com/jess/docs/71/constructs.html#deffunctionor
the right hand side of a
defrule http://www.jessrules.com/jess/docs/71/constructs.html#defrule. If
called anywhere else, will throw an exception.

*Jason C. Morris*
President, Principal Consultant
Morris Technical Solutions LLC
President, Rules Fest Association
Chairman, IntelliFest 2012: International Conference on Reasoning
Technologies

phone: +01.517.376.8314
skype: jcmorris-mts
email: consult...@morris-technical-solutions.com
mybio: http://www.linkedin.com/in/jcmorris



www.intellifest.org
Invent * Innovate * Implement at IntelliFest!


On Thu, May 23, 2013 at 12:43 PM, Przemyslaw Woznowski 
p.r.woznow...@cs.cf.ac.uk wrote:

 Hi Jess users,

 I have the following function:

 (deffunction similarity-score (?base ?other)
 (bind ?score 0)
 (bind ?totalDistance 0)
 (bind ?counter 0)
 (foreach ?x ?base
 (bind ?counter (+ ?counter 1))
 (printout t counter is: ?counter)
 (bind ?partialDistance 0)
 (printout t partialDist is: ?partialDistance)
 (foreach ?y ?other
 (bind ?partialDistance (+ ?partialDistance 1))
 (printout t foreach partialDist is: ?partialDistance)
 (if (eq ?x ?y) then
 (bind ?score (+ ?score 1))
 (printout t score is: ?score)
 (return)
 )
 )
 (bind ?totalDistance (/ ?counter ?partialDistance))
 )
 (return (- (/ ?score (length$ ?base)) (* (- 1 (/ (length$ ?base)
 ?totalDistance)) 0.1) ))
 )

 As you can see, the above function has a nested foreach loop, which upon
 finding equal values in both list should skip to the next iteration of the
 outer loop. In java, instead of (return) one would normally put a break
 statement. As far as the documentation of the (foreach) construct reads, it
 says: The return function can be used to break the iteration. However,
 what I am finding is that the (return) function terminates the outer loop
 too - unless I seriously messed up the code - but this is the result of my
 observation of the (printout t) function. Moreover, when I remove the
 (return) function, the function iterates over the outer and inner loops
 just fine.

 Any advice on how can I break the inner's loop iteration? I know I can use
 a variable to flag that the match has been found and add it to the if
 statement, but I am hoping that there is an equivalent of break in Jess.


 Cheers,
 Pete



RE: JESS: [EXTERNAL] Adding facts that are instances of from-class deftemplates

2013-05-21 Thread Friedman-Hill, Ernest
The thing is that after this code:

  (deftemplate Person (declare (from-class Person)))
  (bind ?f (assert (Person (name Henrique) (age 38

There's no way to transfer those property values to a Person object; i.e., if 
you then said

(modify ?f (OBJECT (new Person)))

Then the Person's name and age would NOT be Henrique and 38; they'd be 
something else. The only way to get a shadow fact and a Java object synced up 
automatically is to let Jess copy the properties to the fact from the object.







To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




RE: JESS: [EXTERNAL] Usage of abstract classes in rules

2013-05-21 Thread Friedman-Hill, Ernest
Typically slots come from JavaBeans properties, not fields – i.e., accessor 
methods like getEventID(). But if you specify “include-variables” when you 
create a deftemplate from a class, then public (and only public!) member fields 
will be used as well. See  
http://www.jessrules.com/jess/docs/71/memory.html#shadow_facts  .

From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Tom De Costere
Sent: Tuesday, May 21, 2013 6:24 AM
To: jess-users
Subject: JESS: [EXTERNAL] Usage of abstract classes in rules

Hello,

I currently have some abstract classes which are then implemented in various 
other classes extending those abstract classes. Now I’ve been trying to get 
Jess to work with both the abstract class as the implementation class, but 
somehow Jess cannot reach to the fields/methods specified in the abstract 
classes?

Is this normal functionality of Jess or must I make such a conversion object 
that contains both the fields from the abstract class as the fields from the 
implementation class?


Example:

My abstract class AbstractApplicationEvent contains following protected fields:
- eventID
- eventName
- eventTimestamp

My subclass ConnectionMadeEvent extending the abstract class above no extra 
fields, but can be extended in the future.

Rule:

(defrule connection_established
(declare (salience 50))
?f1 - (ConnectionMadeEvent (eventID ?id) (eventTimestamp ?eventTimestamp))
=
(assert (Notification (icon ICON_CONNECTION_ACTIVE) (generationTime 
?eventTimestamp) (event ?f1)))
)

Error message:

SEVERE: Error loading Ruleset from: rules/global_rules.clp
Jess reported an error in routine Jesp.parsePattern.
  Message: No such slot eventTimestamp in template MAIN::ConnectionMadeEvent at 
token 'eventTimestamp'.
  Program text: ( defrule connection_established ( declare ( salience 50 ) ) 
?f1 - ( ConnectionMadeEvent ( eventID ?id ) ( eventTimestamp  at line 110 in 
file rules/global_rules.clp.
...


Thanks in advance!

Tom DC



Re: JESS: [EXTERNAL] Adding facts that are instances of from-class deftemplates

2013-05-21 Thread Henrique Lopes Cardoso
Got that, thanks a lot.

Henrique



On Thu, May 16, 2013 at 3:24 PM, Friedman-Hill, Ernest
ejfr...@sandia.govwrote:

 The thing is that after this code:

   (deftemplate Person (declare (from-class Person)))
   (bind ?f (assert (Person (name Henrique) (age 38

 There's no way to transfer those property values to a Person object; i.e.,
 if you then said

 (modify ?f (OBJECT (new Person)))

 Then the Person's name and age would NOT be Henrique and 38; they'd be
 something else. The only way to get a shadow fact and a Java object synced
 up automatically is to let Jess copy the properties to the fact from the
 object.






 
 To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
 in the BODY of a message to majord...@sandia.gov, NOT to the list
 (use your own address!) List problems? Notify owner-jess-us...@sandia.gov.
 




-- 

- - - - - -  -  -  -  -  -   -   -

Henrique Lopes Cardoso
DEI/FEUP
Rua Dr. Roberto Frias | 4200-465 Porto
PORTUGAL
 VoIP: (+351) 220413355
Phone: (+351) 225081400 ext.1315...@fe.up.pt | www.fe.up.pt/~hlc
- - - - - -  -  -  -  -  -   -   -


JESS: [EXTERNAL] Semantic network implementations

2013-05-21 Thread Ahmed Abdeen Hamed
Hello respected scientists,

Is JESS the best environment to implement a semantic network? If it is
indeed, is there an example I can follow? There isn't any in the JESS in
Action book.

Sincerely,

-Ahmed


JESS: [EXTERNAL] need help on Learning content management for JESS based Tutoring System

2013-05-16 Thread Rejaul Barbhuiya
Please bear with me as I am explaining in a bit details about my problem
status.

I am designing an Intelligent Tutoring System using JESS and J2EE.
My ITS's teaching cycle is as follows:
present learning material - present one/more examples - assess learning
outcome through MCQ or fill_in_gap type questions. In between there will be
feedbacks to maintain learner's positive motivation level.

My domain knowledge will structured hierarchically as
domain_subject - module- topic- concept. each concept consists of 3
types of Learning objects (theory, example and question).

The jess rules will decide the next learning object, which feedback message
to display and when, etc.

Below I am giving in brief some of my templates and jess rules in textual
format:

(deftemplate student
(slot stud-id) (multislot stud-name) (slot performance-history)
(multislot stud-clas) (slot session-no))

(deftemplate concept
(slot parent-topic) (multislot lo-names) (multislot lo-ids) (multislot
concept-name) (slot concept-id) (slot status) (slot stud-id) (multislot
pre-req-concept) (slot next-concept) (slot prev-concept))

(deftemplate learning-object
(slot parent-concept) (multislot lo-name) (slot lo-type) (slot lo-id)
(slot reqd-time)
(slot elapsed-time) (slot diff-level) (slot status) (slot attempt-count
(default 0))  (slot stud-id) (slot prev-lo) (slot next-lo))

Some of the rules in textual form
1. if learner succeeds in a problem of difficulty-level 'EASY', next
select a problem of difficulty-level 'MEDIUM'
2. if learner succeeds in a problem of difficulty-level 'MEDIUM', next
select a problem of difficulty-level 'TOUGH'
3. if learner fails in a problem of difficulty-level 'MEDIUM', next select
a problem of difficulty-level 'EASY'
4. if learner fails in a problem of difficulty-level 'TOUGH', next select
a problem of difficulty-level 'MEDIUM'


Now given this, I am not sure whether my approach is correct in terms of
tool selection or not? Also, how should I represent the learning materials?

Thanks,
-- 
*Rejaul Karim Barbhuiya*
Senior Research Fellow

Department of Computer Science
Jamia Millia Islamia
New Delhi, India
Phone: +91-9891430568


Re: JESS: [EXTERNAL] Adding facts that are instances of from-class deftemplates

2013-05-16 Thread Henrique Lopes Cardoso
Thanks for the dog analogy...

But going back to practical uses, one aspect that I like when creating a
fact directly from a from-class template (i.e., a doghouse without a dog --
I can still make some reasoning over the doghouse) is that the Jess code to
do it is much more readable and compact, since you provide values for named
slots.
Something like:


(deftemplate Person (declare (from-class Person)))
(assert (Person (name Henrique) (age 38)))

When using definstance, I would have to go:
(bind ?p (new Person Henrique 38)); assuming there is such a
constructor
(definstance Person ?p)

or
(bind ?p (new Person))
(?p setName Henrique)
(?p setAge 38)
(definstance Person ?p)

Now, when you have a class with many data members this becomes quite
complex.

Any comments? Thanks!

Henrique



On Fri, May 10, 2013 at 3:21 PM, Friedman-Hill, Ernest
ejfr...@sandia.govwrote:

  The **real** way to add shadow facts is using the “definstance”
 function. It has a number of options that aren’t available with “add”. The
 “add” function was added to Jess to support the simplified semantics of
 JSR-94 (the javax.rules API) but the intent is that most Jess users will
 use “definstance.”

 ** **

 Asserting a fact directly from a from-class template is like buying a
 doghouse; you don’t expect to go out the next morning and find that somehow
 it has a dog in it, right? It’s certainly something you can do, but in
 normal life it’s not very useful; usually you get a doghouse when you buy a
 dog, and “add” and “definstance” will both get you a doghouse for your Java
 object “dog” automatically.

 ** **

 *From:* owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] *On
 Behalf Of *Henrique Lopes Cardoso
 *Sent:* Friday, May 10, 2013 4:54 AM
 *To:* jess-users
 *Subject:* JESS: [EXTERNAL] Adding facts that are instances of from-class
 deftemplates

 ** **

 Hi,

 ** **

 I am concerned with the at least two different ways in which you can add,
 to working memory, facts that are instances of from-class deftemplates.***
 *

 Lets say I have:

 ** **

 (deftemplate FC (declare (from-class FC)))

 ** **

 I can add a shadow fact like this:

 ** **

 (bind ?fc (new FC))

 (add ?fc)

 ** **

 This is the general approach described in Section 5.3.2 of the Jess manual.
 

 But I can also simply go like:

 ** **

 (assert (FC))

 ** **

 I guess in this case I do not get a shadow fact, since the OBJECT slot is
 nil.

 ** **

 So, my question is: if my facts are not supposed to be changed from Java
 code, is there any difference in using each of these approaches?

 Section 5.3 from the Jess manual does not even mention that instances of
 from-class deftemplates can be created using the second approach above.***
 *

 ** **

 Thanks!

 ** **

 Henrique

 ** **




-- 

- - - - - -  -  -  -  -  -   -   -

Henrique Lopes Cardoso
DEI/FEUP
Rua Dr. Roberto Frias | 4200-465 Porto
PORTUGAL
 VoIP: (+351) 220413355
Phone: (+351) 225081400 ext.1315...@fe.up.pt | www.fe.up.pt/~hlc
- - - - - -  -  -  -  -  -   -   -


JESS: [EXTERNAL] No cast needed when inspecting shadow facts' data members?

2013-05-10 Thread Henrique Lopes Cardoso
Hi,

I've just noticed an interesting behavior of Jess.
I was working with a couple of classes like this:

public class X {
Object obj;
// getter and setter for obj
...
}

public class Y {
int i;
// getter and setter for i
...
}

Then in Jess I wrote:

(deftemplate X (declare (from-class X)))
(deftemplate a (slot s))

(defrule r
(X (obj ?o))
(test (eq ((?o getClass) getSimpleName) Y))
(a (s ?o.i))
=
(printout t ?o.i crlf))

(bind ?x (new X))
(bind ?y (new Y))
(?y setI 123)
(?x setObj ?y)
(add ?x)
(run)

This actually works! My surprise is related with the fact that the obj data
member is declared as an Object, and the _i_ data member only exists for
instances of Y. Despite this, the rule is able to get ?o.i in both the LHS
adn the RHS (no cast needed). Of course if I remove the test in the rule
and add to working memory an instance of X for which the obj is not an Y, I
get a runtime exception.

Is there anything I should know about the appropriateness of
implementations such as this? Best practices?

Thank you in advance.

Henrique


JESS: [EXTERNAL] Adding facts that are instances of from-class deftemplates

2013-05-10 Thread Henrique Lopes Cardoso
Hi,

I am concerned with the at least two different ways in which you can add,
to working memory, facts that are instances of from-class deftemplates.
Lets say I have:

(deftemplate FC (declare (from-class FC)))

I can add a shadow fact like this:

(bind ?fc (new FC))
(add ?fc)

This is the general approach described in Section 5.3.2 of the Jess manual.
But I can also simply go like:

(assert (FC))

I guess in this case I do not get a shadow fact, since the OBJECT slot is
nil.

So, my question is: if my facts are not supposed to be changed from Java
code, is there any difference in using each of these approaches?
Section 5.3 from the Jess manual does not even mention that instances of
from-class deftemplates can be created using the second approach above.

Thanks!

Henrique


RE: JESS: [EXTERNAL] No cast needed when inspecting shadow facts' data members?

2013-05-10 Thread Friedman-Hill, Ernest
Jess doesn't actually try to look for the I member until the code actually 
runs, so it really has no choice but to accept the code as written. This really 
isn't any different from how other dynamically typed languages behave; Java, 
being a strongly/statically typed language that would not allow this kind of 
code is actually unusual these days. Ruby, Python, Scala, Groovy, etc would all 
allow this sort of thing, no casting needed.

From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Henrique Lopes Cardoso
Sent: Friday, May 10, 2013 9:16 AM
To: jess-users
Subject: JESS: [EXTERNAL] No cast needed when inspecting shadow facts' data 
members?

Hi,

I've just noticed an interesting behavior of Jess.
I was working with a couple of classes like this:

public class X {
Object obj;
// getter and setter for obj
...
}

public class Y {
int i;
// getter and setter for i
...
}

Then in Jess I wrote:

(deftemplate X (declare (from-class X)))
(deftemplate a (slot s))

(defrule r
(X (obj ?o))
(test (eq ((?o getClass) getSimpleName) Y))
(a (s ?o.i))
=
(printout t ?o.i crlf))

(bind ?x (new X))
(bind ?y (new Y))
(?y setI 123)
(?x setObj ?y)
(add ?x)
(run)

This actually works! My surprise is related with the fact that the obj data 
member is declared as an Object, and the _i_ data member only exists for 
instances of Y. Despite this, the rule is able to get ?o.i in both the LHS adn 
the RHS (no cast needed). Of course if I remove the test in the rule and add to 
working memory an instance of X for which the obj is not an Y, I get a runtime 
exception.

Is there anything I should know about the appropriateness of implementations 
such as this? Best practices?

Thank you in advance.

Henrique



RE: JESS: [EXTERNAL] Adding facts that are instances of from-class deftemplates

2013-05-10 Thread Friedman-Hill, Ernest
The *real* way to add shadow facts is using the definstance function. It has 
a number of options that aren't available with add. The add function was 
added to Jess to support the simplified semantics of JSR-94 (the javax.rules 
API) but the intent is that most Jess users will use definstance.

Asserting a fact directly from a from-class template is like buying a doghouse; 
you don't expect to go out the next morning and find that somehow it has a dog 
in it, right? It's certainly something you can do, but in normal life it's not 
very useful; usually you get a doghouse when you buy a dog, and add and 
definstance will both get you a doghouse for your Java object dog 
automatically.

From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Henrique Lopes Cardoso
Sent: Friday, May 10, 2013 4:54 AM
To: jess-users
Subject: JESS: [EXTERNAL] Adding facts that are instances of from-class 
deftemplates

Hi,

I am concerned with the at least two different ways in which you can add, to 
working memory, facts that are instances of from-class deftemplates.
Lets say I have:

(deftemplate FC (declare (from-class FC)))

I can add a shadow fact like this:

(bind ?fc (new FC))
(add ?fc)

This is the general approach described in Section 5.3.2 of the Jess manual.
But I can also simply go like:

(assert (FC))

I guess in this case I do not get a shadow fact, since the OBJECT slot is nil.

So, my question is: if my facts are not supposed to be changed from Java code, 
is there any difference in using each of these approaches?
Section 5.3 from the Jess manual does not even mention that instances of 
from-class deftemplates can be created using the second approach above.

Thanks!

Henrique



JESS: [EXTERNAL] Linking rule actions to the execution of other rules

2013-04-23 Thread Tom De Costere
Hello,

I’m currenly trying to link the actions of rules to the possible execution of 
other rules.
Now I was wondering if anybody has any ideas how this can be done?

I’ve already succeeded in reading out the actions and the conditions, but when 
looking at the current results I can only see the following thing:  (piece of 
output of the loaded miss manners benchmark)

- Rule: MAIN::continue
- Number of conditions [1]:
-- MAIN::Context
- Number of actions [1]:
modify ?f1 state assign_seats

- Rule: MAIN::find_Seating
- Number of conditions [7]:
-- MAIN::Context
-- MAIN::Seating
-- MAIN::Guest
-- MAIN::Guest
-- MAIN::Count
-- not
-- not
- Number of actions [5]:
assert Fact--1
assert Fact--1
assert Fact--1
modify ?f5 c (+ ?c 1)
modify ?f1 state make_path

The problem I’m encountering is the part of the “assert Fact—1”.

Does anybody know how to extract the exact fact it’s going to produce + how I 
could possible find out what rules can be executed after the actions of a rule 
have been executed?

Thanks in advance

Tom DC

RE: JESS: [EXTERNAL] Linking rule actions to the execution of other rules

2013-04-23 Thread Friedman-Hill, Ernest
Hi Tom,

What you’re asking is basically an example of the famous Halting Problem in 
computer science, which I can paraphrase as “determining what a program is 
going to do without running the program.” You can’t tell what rules a fact 
could activate without doing all the pattern matching that Jess does, and 
unless you write something as complex as Jess, you will do it more slowly than 
Jess would.

That said, the best way to determine what rules can fire as a result of a fact 
assertion would be to use Jess itself to find out. Add a JessEventListener that 
listens for ACTIVATION events, and then whenever you assert a fact, watch and 
see what events you get back. Each combination of rule/fact-tuple that could be 
fired as a result of the assertion will generate one event, so you may get many.

Here is some documentation on JessEvents: 
http://www.jessrules.com/jess/docs/71/library.html#events

Here’s a relevant page from the Javadocs: 
http://www.jessrules.com/jess/docs/71/api/jess/JessEvent.html


From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Tom De Costere
Sent: Tuesday, April 23, 2013 5:08 PM
To: jess-users
Subject: JESS: [EXTERNAL] Linking rule actions to the execution of other rules

Hello,

I’m currenly trying to link the actions of rules to the possible execution of 
other rules.
Now I was wondering if anybody has any ideas how this can be done?

I’ve already succeeded in reading out the actions and the conditions, but when 
looking at the current results I can only see the following thing:  (piece of 
output of the loaded miss manners benchmark)

- Rule: MAIN::continue
- Number of conditions [1]:
-- MAIN::Context
- Number of actions [1]:
modify ?f1 state assign_seats

- Rule: MAIN::find_Seating
- Number of conditions [7]:
-- MAIN::Context
-- MAIN::Seating
-- MAIN::Guest
-- MAIN::Guest
-- MAIN::Count
-- not
-- not
- Number of actions [5]:
assert Fact--1
assert Fact--1
assert Fact--1
modify ?f5 c (+ ?c 1)
modify ?f1 state make_path

The problem I’m encountering is the part of the “assert Fact—1”.

Does anybody know how to extract the exact fact it’s going to produce + how I 
could possible find out what rules can be executed after the actions of a rule 
have been executed?

Thanks in advance

Tom DC


Re: JESS: [EXTERNAL] Multislot and queries

2013-04-09 Thread Friedman-Hill, Ernest
Use QueryResult.get(visites) and then call listValue() on the result.

On 4/8/13 1:05 PM, mike donald mikedoni...@yahoo.fr wrote:

hello,
I am a beginner in jess, I'm stuck on my application since
I have two deftemplates

(deftemplate Individu
 (slot age)
(slot sexe) 
 (multislot visites (default (create$) ) )
)

(deftemplate Visite
(slot id_visite)
(slot nom)
(slot pr)
)

I have the following query:

(defquery objetHistogramme
   ?i - (Individu {sexe != F } (age ?ag) (sexe ?sex) (visites
$?visites))
)

In my java program, I call my query as follows:

QueryResult result = engine.runQueryStar(objetHistogramme, new
ValueVector());
   while (result.next()) {
int x  = result.getInt(ag);//age

Object v = result.getObject(visites); //
Erroorr is it

 }

I get an error when I want to retrieve the elements of multislot visit
to
the display.
How to recover the multislot?


Mike




--
View this message in context:
http://jess.2305737.n4.nabble.com/Multislot-and-queries-tp4654137.html
Sent from the Jess mailing list archive at Nabble.com.

To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] How to configure Eclipse JessDE to recognize Userfunctions?

2013-04-04 Thread Samson Tu


Hi,

Perhaps I can clarify that my question is more general than JessTab. It 
is really about how to make Eclipse JessDE recognize Jess user functions 
and templates. The value of Eclipse JessDE is much diminished if it 
cannot recognize user functions.


Thank you.

With best regards,
Samson


On 3/29/2013 5:06 PM, Samson Tu wrote:

Hi,

I am writing Jess rules for use in Protege's JessTab. I would like to 
use the Eclipse JessDE, but it doesn't recognize any of the JessTab 
functions, which were implemented as Jess user functions (accessible 
in jesstab.jar). What do I need to do to make JessDE recognize JessTab 
functions?


Thanks.

With best regards,
Samson



--
Samson Tu   email: s...@stanford.edu
Senior Research Scientist   web: www.stanford.edu/~swt/
Center for Biomedical Informatics Research  phone: 1-650-725-3391
Stanford University fax: 1-650-725-7944


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] [CFP] 3rd CHR Summer School in Berlin

2013-04-04 Thread Thom Fruehwirth


3rd CHR Summer School in Berlin

Third time's the charm
Programming and Reasoning with Rules and Constraints
http://met.guc.edu.eg/CHR2013/

After going to Belgium and Egypt, and having attracted over 50
participants to learn about and to discuss engaging topics related to
Constraint Programming (CP) and Constraint Handling Rules(CHR),
the third summer school will take place this year in Germany.

Where? - GUC Berlin, Germany

When?  - 8th to 12th of July, 2013

Why? - To introduce rule-based and constraint-based high-level
   declarative programming, and to provide insights based on
   these concepts for the analysis of programs, whilst
   covering a wide range of topics of varying difficulty
   from theory to practice

Who? - For students, researchers, interested practitioners around the
   world who wish to learn about CP and CHR, the only prerequisites
   are a working knowledge of English and basic knowledge of logic
   and Prolog (typically covered in undergraduate classes)

Topics?
1. Introduction to Constraint Programming and Modeling a Constraint 
Problem

2. Consistency Techniques and Constraint Reasoning
3. Constraint-Based Scheduling
4. Introduction to Constraint Handling Rules (CHR)
5. Implementing Constraint Solvers using CHR
6. Analysis of CHR Solvers
7. Abductive Reasoning and language processing with CHR
8. Probabilistic CHR: CHRiSM
9. Source to Source Transformation for CHR
   10. Parallel Execution of CHR on a Graphical Processing Unit
   11. Confluence Analysis of CHR Programs
   12. Optimizing Compilation of CHR
   13. ASV Roboat - an autonomous sailing boat for ocean monitoring and 
its long-term routing



Early Registration deadline   - April 30, 2013

Normal Registration deadline  - June 15, 2013

http://met.guc.edu.eg/CHR2013/

With support from GUC Egypt and DAAD Germany





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] How to configure Eclipse JessDE to recognize Userfunctions?

2013-04-04 Thread Friedman-Hill, Ernest
Hi Samson,

As you probably know, Jess learns about Userfunctions via method calls. As
you may not realize, when the JessDE is running, there's a copy of the
Jess engine in there that's used to parse and interpret Jess code. If the
code you're editing makes that copy of Jess aware of the Userfunctions you
want to refer to, then they'll be available.

So, a very simple example: let's say there's is a Userfunction named foo
implemented in a class named com.foo.FooFunction that's in a jar named
foo.jar . You want to edit Jess code that calls this function. One way to
accomplish this would be to add foo.jar to the project's Java build path,
then simply have this Jess function call in your file of Jess code:

(load-function com.foo.FooFunction)

If there's a com.foo.FooPackage that adds a whole bunch of functions, you
could add the jar and call

(load-function com.foo.FooPackage)

Now, the problem is that this will actually load the classes in foo.jar
into Eclipse. Sometimes this is innocuous, but sometimes -- and Protégé is
probably one of those times -- that would bring too much baggage with it.
So instead, you can fake the editor out. For example, just adding a line
like

(deffunction foo () )

To your source file will define a function foo; you could have a whole
bunch of these lines to define all the functions in a package.

But of course, that litters your source file, and nobody wants that. So
you move all those functions info another Jess file called, say,
development.clp, and load it like this:

(require development)

And development.clp can include (provide development) and this will work
great. But what about when you deploy, won't this file cause problems? Not
if instead you use require*, which silently deals with missing files. At
deployment time, you simply don't include development.clp in your deployed
package, Jess will ignore the require*, and everything will work normally.

So, long story short, the best way to edit protégé code would be to create
a protégé-development.clp containing all the needed function
declarations, and use it as described.


On 4/3/13 7:03 PM, Samson Tu s...@stanford.edu wrote:


Hi,

Perhaps I can clarify that my question is more general than JessTab. It
is really about how to make Eclipse JessDE recognize Jess user functions
and templates. The value of Eclipse JessDE is much diminished if it
cannot recognize user functions.

Thank you.

With best regards,
Samson


On 3/29/2013 5:06 PM, Samson Tu wrote:
 Hi,

 I am writing Jess rules for use in Protege's JessTab. I would like to
 use the Eclipse JessDE, but it doesn't recognize any of the JessTab
 functions, which were implemented as Jess user functions (accessible
 in jesstab.jar). What do I need to do to make JessDE recognize JessTab
 functions?

 Thanks.

 With best regards,
 Samson


-- 
Samson Tu   email: s...@stanford.edu
Senior Research Scientist   web: www.stanford.edu/~swt/
Center for Biomedical Informatics Research  phone: 1-650-725-3391
Stanford University fax: 1-650-725-7944


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] How to configure Eclipse JessDE to recognize Userfunctions?

2013-04-02 Thread Samson Tu

Hi,

I am writing Jess rules for use in Protege's JessTab. I would like to 
use the Eclipse JessDE, but it doesn't recognize any of the JessTab 
functions, which were implemented as Jess user functions (accessible in 
jesstab.jar). What do I need to do to make JessDE recognize JessTab 
functions?


Thanks.

With best regards,
Samson

--
Samson Tu   email: s...@stanford.edu
Senior Research Scientist   web: www.stanford.edu/~swt/
Center for Biomedical Informatics Research  phone: 1-650-725-3391
Stanford University fax: 1-650-725-7944


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Certainty factors in FuzzyJess

2013-03-28 Thread Bob Orchard
Hello Horatio,

I'm out of town right now but can address this next week when I return. There 
are a couple of issues ... 1 . I have to review things and think about this 
proposal.
2. I have to see if I can get the source code released to you (been working on 
this for a long time but some progress has been made recently).

Bob Orchard


On 2013-03-09, at 8:13 AM, Horacio Paggi wrote:

 Dear Sirs:
 In the docs attached to the FuzzyJess Toolkit it is mentioned the use of 
 certainty factors in the rules' specifications.   As long as I understand, to 
 allow the  processing of the rules, these values should be static in order to 
 be be determined prior the execution of any rule. However, it's very luring 
 to have VARIABLE  CFs so they can be changed automatically as long the system 
 is used (so it learns in some way).  Do you think that this is possible?In 
 your opinion, what would be the required effort  to implement this change? 
 I'm asking this because I have to mentor a degree student, in his final 
 engineering project (comprising a whole year) and I was thinking in yo have 
 him implement it and build a brief application of the  modified FuzzyJess, 
 but I do not want to overwhelm him.
 Thank you in advance for your advice,
 Horacio Paggi





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] Anyone ran JESS on a realtime NIX?

2013-03-28 Thread Grant Rettke
Hi,

I'm curious about setting up a balancing robot just for the fun of it.

I'm wondering if any of you have any knowledge of people using JESS on a
realtime UNIXes, or for that matter, doing anything hardware control wise?

Best wishes,

Grant


Re: JESS: [EXTERNAL] Certainty factors in FuzzyJess

2013-03-28 Thread Jason Morris
Hi Bob,

I can't believe it's been nine years since I traveled out to IEA/AIE 2004!
I trust you and yours are doing well.

Did I understand correctly that you are you actively working on Fuzzy Jess
again?
Will the NRCC be re-releasing the Fuzzy-J tool kit to the public?

Cheers,
Jason

On Tue, Mar 12, 2013 at 11:20 PM, Bob Orchard orcha...@rogers.com wrote:

 Hello Horatio,

 I'm out of town right now but can address this next week when I return.
 There are a couple of issues ... 1 . I have to review things and think
 about this proposal.
 2. I have to see if I can get the source code released to you (been
 working on this for a long time but some progress has been made recently).

 Bob Orchard


 On 2013-03-09, at 8:13 AM, Horacio Paggi wrote:

  Dear Sirs:
  In the docs attached to the FuzzyJess Toolkit it is mentioned the use of
 certainty factors in the rules' specifications.   As long as I understand,
 to allow the  processing of the rules, these values should be static in
 order to be be determined prior the execution of any rule. However, it's
 very luring to have VARIABLE  CFs so they can be changed automatically as
 long the system is used (so it learns in some way).  Do you think that this
 is possible?In your opinion, what would be the required effort  to
 implement this change? I'm asking this because I have to mentor a degree
 student, in his final engineering project (comprising a whole year) and I
 was thinking in yo have him implement it and build a brief application of
 the  modified FuzzyJess, but I do not want to overwhelm him.
  Thank you in advance for your advice,
  Horacio Paggi




 
 To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
 in the BODY of a message to majord...@sandia.gov, NOT to the list
 (use your own address!) List problems? Notify owner-jess-us...@sandia.gov.
 




-- 
*Jason C. Morris*
President, Principal Consultant
Morris Technical Solutions LLC
President, Rules Fest Association
Chairman, IntelliFest 2012: International Conference on Reasoning
Technologies

phone: +01.517.376.8314
skype: jcmorris-mts
email: consult...@morris-technical-solutions.com
mybio: http://www.linkedin.com/in/jcmorris



www.intellifest.org
Invent * Innovate * Implement at IntelliFest!


Re: JESS: [EXTERNAL] Anyone ran JESS on a realtime NIX?

2013-03-28 Thread Friedman-Hill, Ernest
Jess, like anything Java-based, can do soft real time at best, due to 
nondeterministic garbage collection.  I've done control algorithms for 
simulated hardware, but never anything on real machinery.

From: Grant Rettke gret...@acm.orgmailto:gret...@acm.org
Reply-To: jess-users 
jess-us...@mailgate.sandia.govmailto:jess-us...@mailgate.sandia.gov
Date: Thursday, March 28, 2013 3:39 PM
To: jess-users 
jess-us...@mailgate.sandia.govmailto:jess-us...@mailgate.sandia.gov
Subject: JESS: [EXTERNAL] Anyone ran JESS on a realtime NIX?

Hi,

I'm curious about setting up a balancing robot just for the fun of it.

I'm wondering if any of you have any knowledge of people using JESS on a 
realtime UNIXes, or for that matter, doing anything hardware control wise?

Best wishes,

Grant


JESS: [EXTERNAL]

2013-02-19 Thread Ernest Friedman-Hill
7])
by mailgate2.sandia.gov (8.14.4/8.14.4) with ESMTP id r0559c8F004910
for jess-users@sandia.gov; Fri, 4 Jan 2013 22:09:38 -0700
Received: from sentry-four.sandia.gov (localhost.localdomain [127.0.0.1])
by localhost (Email Security Appliance) with SMTP id 
B61E913EE057_E7B592B
for jess-users@sandia.gov; Sat,  5 Jan 2013 05:09:38 + (GMT)
Received: from sentry.sandia.gov (mm03snlnto.sandia.gov [132.175.109.20])
by sentry-four.sandia.gov (Sophos Email Appliance) with ESMTP id 
8F5EB13EB=
683_E7B592F
for jess-users@sandia.gov; Sat,  5 Jan 2013 05:09:38 + (GMT)
Received: from [132.175.109.17] by sentry.sandia.gov with ESMTP (SMTP
 Relay 01 (Email Firewall v6.3.2)); Fri, 04 Jan 2013 22:09:29 -0700
X-Server-Uuid: AF72F651-81B1-4134-BA8C-A8E1A4E620FF
X-WSS-ID: 0MG4ZNQ-0C-0P1-02
X-TMWD-Spam-Summary: TS=3D20130105050926; ID=3D1; SEV=3D2.4.4;
 DFV=3DB2013010506; IFV=3DNA; AIF=3DB2013010506; RPD=3D7.03.0049; ENG=3DNA;
 RPDID=3D7374723D303030312E30413031303230322E35304537423538382E303033432C73=
733D312C72653D302E3030302C6667733D30;
 CAT=3DNONE; CON=3DNONE; SIG=3D0VXSqwAAAg=3D=3D
X-TMWD-IP-Reputation: SIP=3D209.85.210.171;
 IPRID=3D7469643D303030312E30413031303330322E35304537423538372E30303146;
 CTCLS=3DR5; CAT=3DUnknown
Received: from mail-ia0-f171.google.com (mail-ia0-f171.google.com
 [209.85.210.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No
 client certificate requested) by sentry-three.sandia.gov ( Postfix)
 with ESMTP id 2B0E84643FF for jess-users@sandia.gov; Fri, 4 Jan 2013
 22:09:25 -0700 ( MST)
Received: by mail-ia0-f171.google.com with SMTP id k27so14445348iad.16
 for jess-users@sandia.gov; Fri, 04 Jan 2013 21:09:27 -0800 (PST)
DKIM-Signature: v=3D1; a=3Drsa-sha256; c=3Drelaxed/relaxed; d=3Dgmail.com;
 s=3D20120113;
 h=3Dmime-version:x-received:sender:date:x-google-sender-auth:message-id :
 subject:from:to:content-type;
 bh=3DNbWHpPWjsr1y3psWS5nSuCyIanVTGrw/ueEn4B3ZJ30=3D;
 b=3DcVyPc3IMqmwgJkt5lk+Znbf16baGRo0KZj5VNxwmKZyeNz9Wa1O1LOiJewL99QrV3W
 oLr6QKuTmzFllAncgeNZ4T8bC74wtC7qj/fNsxdES29w/fpJIS6JeFoX0Q3SbxaRuCRu
 iDOJeyVr5YbQFLPjI26LuzNXmJ5wrS7CSjbzlSAzmaCjy+GKjcRfAH+h8XPs9/0LEH/h
 3AUjltDhtX64K02XlIl6GP1tMp21ZLb+uSXFflStUNnyNzPAm1aRtRlHwkHPQyd25j/9
 VYJGRoEwqjLuc0Yu35h1U9K4OK7+OOcrPNO2ek60E7USjW62BYa15lVdX1WclXKMIfm8
 YDjQ=3D=3D
MIME-Version: 1.0
X-Received: by 10.50.163.98 with SMTP id yh2mr782401igb.2.1357362567526;
 Fri, 04 Jan 2013 21:09:27 -0800 (PST)
Sender: gret...@gmail.com
Received: by 10.64.45.201 with HTTP; Fri, 4 Jan 2013 21:09:27 -0800 (
 PST)
Date: Fri, 4 Jan 2013 23:09:27 -0600
X-Google-Sender-Auth: bGz_8nfUup2r7jFexVK35HW9BME
Message-ID: CAAjq1mffGb0CD11w+VTSjCXCb6oSM9_rtw0BjPj0vPOPqDn--g@mail.gmail=
.com
Subject: Slowly documenting project setup steps
From: Grant Rettke gret...@acm.org
To: jess-users@sandia.gov
X-TMWD-Spam-Summary: TS=3D20130105050932; ID=3D2; SEV=3D2.3.1;
 DFV=3DB2012110920; IFV=3DNA; AIF=3DB2012110920; RPD=3D5.03.0010; ENG=3DNA;
 RPDID=3D7374723D303030312E30413031303230322E35304537423538422E303032302C73=
733D312C6667733D30;
 CAT=3DNONE; CON=3DNONE; SIG=3DfQ=3D=3D
X-MMS-Spam-Filter-ID: B2012110920_5.03.0010
X-WSS-ID: 7CF96A030I89503247-01-01
Content-Type: multipart/alternative;
 boundary=3De89a8f642ec6ab384004d2839972
X-Sophos-ESA: [sentry-four.sandia.gov] 3.7.6.0, Antispam-Engine: 2.7.2.1390=
750, Antispam-Data: 2013.1.5.45414


--e89a8f642ec6ab384004d2839972
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
 charset=3Dutf-8

http://www.wisdomandwonder.com/article/6891/jess-sample-java-setup-project-=
mission-statement

--e89a8f642ec6ab384004d2839972
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
 charset=3Dutf-8

a href=3Dhttp://www.wisdomandwonder.com/article/6891/jess-sample-java-set=
up-project-mission-statementhttp://www.wisdomandwonder.com/article/6891/j=
ess-sample-java-setup-project-mission-statement/a

--e89a8f642ec6ab384004d2839972--


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] Re: Slowly documenting project setup steps

2013-02-19 Thread Grant Rettke
Hi Jessers,

Sorry for just sending a link.

What is going is that I'm blogging the set-up of a Jess+Java project using
my preferred setup.

My goal is to provide a Maven managed project that makes it real easy to
play with Java and Jess together, and figured if anyone might be interested
then they would be on this list.

If it is OK then I will keep posting whenever I put something new out there

JESS: [EXTERNAL] Rete network visualization

2013-02-19 Thread Grant Rettke
Hi,

I'm learning rules engines with JESS. The (view) popup is interesting.

While learning about the network itself and how to understand it, I got
curious about visualizing it differently.

I've been looking for an excuse to learn a nice GUI graphing framework, and
maybe this is it.

Is all of that information available at runtime using JESS commands?
Or programmatic ally?

Best wishes,

-- 
Grant Rettke | ACM, AMA, COG, IEEE
gret...@acm.org | http://www.wisdomandwonder.com/
Wisdom begins in wonder.
((λ (x) (x x)) (λ (x) (x x)))


WG: JESS: [EXTERNAL] Jess in a multithreaded environment

2013-01-03 Thread Henschel, Joerg
Yes, we (Software AG) have a source license, so it'd be great if you could 
provide a patch for this.

Thanks!

Jörg Henschel
Director Research  Development

Email: j.hensc...@itcampus.de
Phone: +49 341 49287-700 | Fax: +49 341 49287-01

itCampus Software- und Systemhaus GmbH | a Software AG Company
Nonnenstrasse 37 | 04229 Leipzig | Germany | http://www.itcampus.de
Amtsgericht Leipzig HRB 15872 | Managing Director: Guido Laures



-Ursprüngliche Nachricht-
Von: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] Im 
Auftrag von Friedman-Hill, Ernest
Gesendet: Dienstag, 18. Dezember 2012 19:50
An: jess-users
Betreff: Re: JESS: [EXTERNAL] Jess in a multithreaded environment

Are you adding non-value classes to the list yourself, or is this just with the 
small number of default listings?

This method will get called when you evaluate the hash code of a Java object in 
the Rete memory; this will happen often during pattern matching. There's 
actually enough room to cache the hash code in the members of the Value class 
that are unused for Java object values, so we could try that as a performance 
improvement.  Do you have a source license, so I could send you a patch to try?

From: Nguyen, Son Nguyen 
son.ngu...@softwareag.commailto:son.ngu...@softwareag.com
Reply-To: jess-users 
jess-us...@mailgate.sandia.govmailto:jess-us...@mailgate.sandia.gov
Date: Thursday, December 13, 2012 11:04 AM
To: jess-users 
jess-us...@mailgate.sandia.govmailto:jess-us...@mailgate.sandia.gov
Subject: JESS: [EXTERNAL] Jess in a multithreaded environment



Hi Jess experts,

We use Jess in a multi-threaded environment and have experienced some 
performance degradation when going from a single thread to multiple threads.

Our implementation uses the Slot Specific feature.

Using a Java profiler, HashCodeComputer.isValueObject() stood out as one of the 
main contributing factors, if not the most likely,  to the degradation




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] passing by reference ?

2013-01-03 Thread Grant Rettke
On Sat, Dec 22, 2012 at 10:19 AM, burama gwkuk.1993b...@gmail.com wrote:

 how to do passing by reference in jess ?


May you give more context and maybe an example of what you want to do?


Re: JESS: [EXTERNAL] Jess in a multithreaded environment

2013-01-03 Thread Wolfgang Laun
Warning: I may have misunderstood the issue completely.

If there is a list (or any other collection) maintaining the set of
value classes, it stands to reason that it is synchronized for use in
a multithreaded environment, and the contention for its lock may very
well cause a performance hit.  If a lookup using this list is
necessary for distinguishing between constant and non-constant hash
codes, I don't see how caching a constant hash code may improve the
situation.

-W


On 03/01/2013, Henschel, Joerg j.hensc...@itcampus.de wrote:
 Yes, we (Software AG) have a source license, so it'd be great if you could
 provide a patch for this.

 Thanks!

 Jörg Henschel
 Director Research  Development

 Email: j.hensc...@itcampus.de
 Phone: +49 341 49287-700 | Fax: +49 341 49287-01

 itCampus Software- und Systemhaus GmbH | a Software AG Company
 Nonnenstrasse 37 | 04229 Leipzig | Germany | http://www.itcampus.de
 Amtsgericht Leipzig HRB 15872 | Managing Director: Guido Laures



 -Ursprüngliche Nachricht-
 Von: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] Im
 Auftrag von Friedman-Hill, Ernest
 Gesendet: Dienstag, 18. Dezember 2012 19:50
 An: jess-users
 Betreff: Re: JESS: [EXTERNAL] Jess in a multithreaded environment

 Are you adding non-value classes to the list yourself, or is this just with
 the small number of default listings?

 This method will get called when you evaluate the hash code of a Java object
 in the Rete memory; this will happen often during pattern matching. There's
 actually enough room to cache the hash code in the members of the Value
 class that are unused for Java object values, so we could try that as a
 performance improvement.  Do you have a source license, so I could send you
 a patch to try?

 From: Nguyen, Son Nguyen
 son.ngu...@softwareag.commailto:son.ngu...@softwareag.com
 Reply-To: jess-users
 jess-us...@mailgate.sandia.govmailto:jess-us...@mailgate.sandia.gov
 Date: Thursday, December 13, 2012 11:04 AM
 To: jess-users
 jess-us...@mailgate.sandia.govmailto:jess-us...@mailgate.sandia.gov
 Subject: JESS: [EXTERNAL] Jess in a multithreaded environment



 Hi Jess experts,

 We use Jess in a multi-threaded environment and have experienced some
 performance degradation when going from a single thread to multiple
 threads.

 Our implementation uses the Slot Specific feature.

 Using a Java profiler, HashCodeComputer.isValueObject() stood out as one of
 the main contributing factors, if not the most likely,  to the degradation



 
 To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
 in the BODY of a message to majord...@sandia.gov, NOT to the list
 (use your own address!) List problems? Notify owner-jess-us...@sandia.gov.
 






To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Jess in a multithreaded environment

2013-01-03 Thread Friedman-Hill, Ernest
Hi Wolfgang, 

Jess needs a constant hashcode for any given object, so this mechanism
distinguishes between objects that provide their own constant hashcode and
objects that can't be trusted to do so. The caching I was talking about
would be actually sorting objects into these categories right when the
jess.Value object is created, and storing the (constant) hashcode that was
determined. The only weak point in this is that it would force the user to
establish that a class is a value class before any objects of that type
are referred to.

Another approach would be to use a lock-free container for that list of
classes (i.e., ConcurrentLinkedQueue) which retains that flexibility;
that's what we're actually trying first.


On 1/3/13 12:28 PM, Wolfgang Laun wolfgang.l...@gmail.com wrote:

Warning: I may have misunderstood the issue completely.

If there is a list (or any other collection) maintaining the set of
value classes, it stands to reason that it is synchronized for use in
a multithreaded environment, and the contention for its lock may very
well cause a performance hit.  If a lookup using this list is
necessary for distinguishing between constant and non-constant hash
codes, I don't see how caching a constant hash code may improve the
situation.

-W


On 03/01/2013, Henschel, Joerg j.hensc...@itcampus.de wrote:
 Yes, we (Software AG) have a source license, so it'd be great if you
could
 provide a patch for this.

 Thanks!

 Jörg Henschel
 Director Research  Development

 Email: j.hensc...@itcampus.de
 Phone: +49 341 49287-700 | Fax: +49 341 49287-01

 itCampus Software- und Systemhaus GmbH | a Software AG Company
 Nonnenstrasse 37 | 04229 Leipzig | Germany | http://www.itcampus.de
 Amtsgericht Leipzig HRB 15872 | Managing Director: Guido Laures



 -Ursprüngliche Nachricht-
 Von: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] Im
 Auftrag von Friedman-Hill, Ernest
 Gesendet: Dienstag, 18. Dezember 2012 19:50
 An: jess-users
 Betreff: Re: JESS: [EXTERNAL] Jess in a multithreaded environment

 Are you adding non-value classes to the list yourself, or is this just
with
 the small number of default listings?

 This method will get called when you evaluate the hash code of a Java
object
 in the Rete memory; this will happen often during pattern matching.
There's
 actually enough room to cache the hash code in the members of the Value
 class that are unused for Java object values, so we could try that as a
 performance improvement.  Do you have a source license, so I could send
you
 a patch to try?

 From: Nguyen, Son Nguyen
 son.ngu...@softwareag.commailto:son.ngu...@softwareag.com
 Reply-To: jess-users
 jess-us...@mailgate.sandia.govmailto:jess-us...@mailgate.sandia.gov
 Date: Thursday, December 13, 2012 11:04 AM
 To: jess-users
 jess-us...@mailgate.sandia.govmailto:jess-us...@mailgate.sandia.gov
 Subject: JESS: [EXTERNAL] Jess in a multithreaded environment



 Hi Jess experts,

 We use Jess in a multi-threaded environment and have experienced some
 performance degradation when going from a single thread to multiple
 threads.

 Our implementation uses the Slot Specific feature.

 Using a Java profiler, HashCodeComputer.isValueObject() stood out as
one of
 the main contributing factors, if not the most likely,  to the
degradation



 
 To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
 in the BODY of a message to majord...@sandia.gov, NOT to the list
 (use your own address!) List problems? Notify
owner-jess-us...@sandia.gov.
 






To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] Jess in a multithreaded environment

2012-12-18 Thread Nguyen, Son

Hi Jess experts,

We use Jess in a multi-threaded environment and have experienced some
performance degradation when going from a single thread to multiple
threads.
Our implementation uses the Slot Specific feature. 

Using a Java profiler, HashCodeComputer.isValueObject() stood out as one
of the main contributing factors, if not the most likely,  to the
degradation.
This method is synchronized using the static List m_nonValueClasses
member. The averege time of this method execution is
0,2022 microsec for one thread and 1,2192 microsec for two threads.
Basically, 0.2 microsec for one threads and 1 microsec for 2 and 4
threads.
There are hundreds of thousands of these calls for a single Rete.run.

Is it possible that HashCodeComputer.isValueObject() has such an effect
on scalability and performance?
If so, what can be done about it?

I am looking forward to hearing any feedback.

Son Nguyen


Re: JESS: [EXTERNAL] Jess in a multithreaded environment

2012-12-18 Thread Friedman-Hill, Ernest
Are you adding non-value classes to the list yourself, or is this just with the 
small number of default listings?

This method will get called when you evaluate the hash code of a Java object in 
the Rete memory; this will happen often during pattern matching. There's 
actually enough room to cache the hash code in the members of the Value class 
that are unused for Java object values, so we could try that as a performance 
improvement.  Do you have a source license, so I could send you a patch to try?

From: Nguyen, Son Nguyen 
son.ngu...@softwareag.commailto:son.ngu...@softwareag.com
Reply-To: jess-users 
jess-us...@mailgate.sandia.govmailto:jess-us...@mailgate.sandia.gov
Date: Thursday, December 13, 2012 11:04 AM
To: jess-users 
jess-us...@mailgate.sandia.govmailto:jess-us...@mailgate.sandia.gov
Subject: JESS: [EXTERNAL] Jess in a multithreaded environment



Hi Jess experts,

We use Jess in a multi-threaded environment and have experienced some 
performance degradation when going from a single thread to multiple threads.

Our implementation uses the Slot Specific feature.

Using a Java profiler, HashCodeComputer.isValueObject() stood out as one of the 
main contributing factors, if not the most likely,  to the degradation

Re: JESS: [EXTERNAL] How to persist the fact and rule base from a given session?

2012-12-03 Thread Ernest Friedman-Hill
Hi Grant,

Sorry nobody answered this earlier. The bsave and bload commands save
and restore the binary state of a Jess engine to a file, and they're
probably just what you're looking for.


On Mon, Nov 26, 2012 at 5:21 PM, Grant Rettke gret...@acm.org wrote:

 Hi,

 I would like to be able to turn off a Jess session so that all of its
 rules and facts would be persisted so that later I could start it up again.

 The scenario is something like... there are things we want to handle but
 the user has stopped the program, so we turn it off, but when we turn it
 back on, those events should be handled.

 I did read the docs but just didn't... maybe I missed something.

 Best wishes,

 --
 Grant Rettke | ACM, AMA, COG, IEEE
 gret...@acm.org | http://www.wisdomandwonder.com/
 Wisdom begins in wonder.
 ((λ (x) (x x)) (λ (x) (x x)))



JESS: [EXTERNAL] How to persist the fact and rule base from a given session?

2012-11-27 Thread Grant Rettke
Hi,

I would like to be able to turn off a Jess session so that all of its
rules and facts would be persisted so that later I could start it up again.

The scenario is something like... there are things we want to handle but
the user has stopped the program, so we turn it off, but when we turn it
back on, those events should be handled.

I did read the docs but just didn't... maybe I missed something.

Best wishes,

-- 
Grant Rettke | ACM, AMA, COG, IEEE
gret...@acm.org | http://www.wisdomandwonder.com/
Wisdom begins in wonder.
((λ (x) (x x)) (λ (x) (x x)))


Re: JESS: [EXTERNAL] What does the .CLP extension stand for?

2012-11-16 Thread Wolfgang Laun
CLP = CLIPS = C Language Integrated Production System :-)
-W

On 15/11/2012, Grant Rettke gret...@acm.org wrote:
 What does the .CLP extension stand for?

 --
 Grant Rettke | ACM, AMA, COG, IEEE
 gret...@acm.org | http://www.wisdomandwonder.com/
 Wisdom begins in wonder.
 ((λ (x) (x x)) (λ (x) (x x)))





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] Jess on Android Revisited 2012-11-15T07:45:43-0600

2012-11-15 Thread Grant Rettke
Hi,

Curious about running Jess on Android I first read up and found the
issues with JavaBeans on Android. Geez, yuck!

Wondered if there was already a legal alternative implementation of
those beans maybe from Harmony, Classpath, or OpenJDK.

GNU Classpath is GPL but gives a linking exception so a port of
java.beans to a new namespace might work:
https://www.gnu.org/software/classpath/license.html

Harmony is Apache licensed so you can link it with commercial software
as long as you give attribution:
https://www.apache.org/foundation/license-faq.html#WhatDoesItMEAN

And there is already a port here: https://code.google.com/p/openbeans/

OpenJDK is the most mainstream open implementation backed by Oracle
among others. It has the classpath same GNU Classpath exception on
linking: http://openjdk.java.net/faq/

OpenJDK seems like the best bet to me.

Not sure how best to proceed but as a developer myself I would like to
volunteer to:
1. Port OpenJDK's java.beans
2. Find as many test suites as possible utilizing java.beans to
include here to test it.
3. Put it on github or something.
4. Possibly test out migrating Jess source code (I would need to get a license).
5. Test out Jess on it on a pc.
6. Test out Jess on it on android.

Not sure whether other folks are interested in this or not but if so
please reply so we can coordinate our efforts.

Best wishes,

--
Grant Rettke | ACM, AMA, COG, IEEE
gret...@acm.org | http://www.wisdomandwonder.com/
Wisdom begins in wonder.
((λ (x) (x x)) (λ (x) (x x)))




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Jess on Android Revisited

2012-11-15 Thread Friedman-Hill, Ernest
Grant -- 

Your message is *very* timely. We've just started working on an official,
supported Android port, and hope to make it available in the first months
of 2013. This will be in conjunction with the Jess 8.0 release, which will
include a rollup of tons of bug fixes and other patches accumulated since
7.1p2.

On 11/15/12 9:08 AM, Grant Rettke gret...@acm.org wrote:

Hi,

Curious about running Jess on Android 




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] What does the .CLP extension stand for?

2012-11-15 Thread Grant Rettke
What does the .CLP extension stand for?

-- 
Grant Rettke | ACM, AMA, COG, IEEE
gret...@acm.org | http://www.wisdomandwonder.com/
Wisdom begins in wonder.
((λ (x) (x x)) (λ (x) (x x)))


JESS: [EXTERNAL] Code to convert a POJO to a template assertion?

2012-11-15 Thread Grant Rettke
Hi,

For whatever reason I don't want to use defclass and instead want to be
able to convert a POJO to a template assertion. There are helpers to write
converters like this but I'm wondering if someone has done it? Maybe it
could even define the deftemplate given the class.

It would be like:

class Person {
String name;
int age;
public void getName() { return name; }
public void getAge() {return age; }

The functions might do this:

pojoToTemplate(Object o) - string

pojoToAssertion(Object o) - string

Person p = new Person(Joe, 10);

pojoToTemplate(p) - (deftemplate (slot name) (slot age))

pojoToAssertion(p) - (assert (Person (name Joe) (age 10))

Ok the reason is that I don't want or plan to deal with modifying any state
outside of the engine environment :).

Best wishes,

-- 
Grant Rettke | ACM, AMA, COG, IEEE
gret...@acm.org | http://www.wisdomandwonder.com/
Wisdom begins in wonder.
((λ (x) (x x)) (λ (x) (x x)))


Re: JESS: [EXTERNAL] Emacs Jess Users?

2012-10-11 Thread Grant Rettke
On Wed, Oct 10, 2012 at 9:04 AM, Friedman-Hill, Ernest
ejfr...@sandia.gov wrote:
 If you have a patch, let me know and I can post it for other people to use.

Someone already posted describing the fix here but with a patch for it:

http://planetjava.org/java-jess/2004-05/msg6.html

Here is my patch with their fix:

http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2012/10/jess-mode-1.2-emacs-24.patch_.gz

Thanks!


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] What is your preferred Eclipse version, distribution, and bitness for Jess 7*?

2012-10-11 Thread Grant Rettke
On Wed, Oct 10, 2012 at 9:06 AM, Friedman-Hill, Ernest
ejfr...@sandia.gov wrote:
 Jess doesn't care, being a pure Java library. The 32 vs 64-bit question
 depends entirely on your own machine's architecture, and then the proper
 Eclipse distribution depends on what sort of code you intend to write: for
 example, the RCP/RAP developer package is for people who are writing
 Eclipse plugins, while Eclipse Classic is a good all around distribution
 for general Java programming.

Good to know. Everything installed perfectly. Here are my notes:

http://www.wisdomandwonder.com/article/6449/installing-jess-71p2-in-eclipse-4-2


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Emacs Jess Users?

2012-10-11 Thread Andre Luiz Tietbohl Ramos
Hello,

I'm having a problem to start Jess in ubuntu 12.04.  I have jess-mode
installed in /usr/share/emacs/site-lisp/jess-mode and when I try M-x
jess-mode I receive the error below:

setq: Symbol's value as variable is void: shared-lisp-mode-map

Would anyone know how to solve this please?  Jess works fine in a
terminal.

Thanks,

Andre Luiz


On Tue, 2012-10-09 at 22:57 -0500, Grant Rettke wrote:

 Hi,
 
 Emacs v24 jess-mode users, are you out there?
 
 I just found a fix to make jess-mode play nice with Emacs 24 was
 wondering if anyone else is using it.
 
 Everything just works so far and I wanted to have someone to bounce
 ideas off of.
 
 Best wishes,
 
 Grant Rettke
 




Re: JESS: [EXTERNAL] Emacs Jess Users?

2012-10-11 Thread Grant Rettke
On Wed, Oct 10, 2012 at 8:33 PM, Andre Luiz Tietbohl Ramos
andreltra...@gmail.com wrote:
 I'm having a problem to start Jess in ubuntu 12.04.  I have jess-mode
 installed in /usr/share/emacs/site-lisp/jess-mode and when I try M-x
 jess-mode I receive the error below:

 setq: Symbol's value as variable is void: shared-lisp-mode-map

 Would anyone know how to solve this please?  Jess works fine in a terminal.

I had the same problem described here
http://www.wisdomandwonder.com/link/6442/making-jess-mode-v1-2-work-on-emacs-24
and patched here

http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2012/10/jess-mode-1.2-emacs-24.patch_.gz

I run Emacs 24 on Lubuntu 12.04 and it seems to work fine so far.


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] Ordered facts question

2012-10-11 Thread Grant Rettke
Hi,

I'm working on

5.4. Ordered facts

in

file:///C:/x86/Jess71p2/docs/memory.html

with Jess Jess Version 7.1p2 11/5/2008

where there is an example

Jess (number (value 6))

I expected the ordered fact number to get created on-demand but instead got:

Jess reported an error in routine Funcall.execute
while executing (number (value 6)).
  Message: Undefined function number.
  Program text: ( number ( value 6 ) )  at line 1.

What am I doing wrong?

Best wishes,

Grant

--
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Ordered facts question

2012-10-11 Thread Friedman-Hill, Ernest
You can't type a fact directly at the prompt. You can add a fact to
working memory using the (assert) function (as shown in section 5.2) or
you can use the (deffacts) construct to create a group of facts that will
then be added to working memory on reset events (as in section 5.5) .

As a general rule, in the HTML manual, the light red blocks show
interactive sessions with Jess -- things you can type directly at the
prompt -- while the green ones do not. The red ones show the actual
Jess prompt; the number fact you typed in below is from a green
block, and is meant to indicate how the fact data structures look.  There
are also violet-colored blocks: those are compilable Java code.
 
I'm actually rather proud of what the Jess test suite does to verify the
manual. The dialogs in the red blocks are actually parsed from the XML
source of the manual and verified: if one of the red blocks says that Jess
gives a particular response to a given input, that is actually verified in
the test suite. Likewise, the code in the violet blocks is compiled, and
if output is shown in the manual, the output is verified correct. The
green boxes are the escape mechanism: they can contain pretty much
anything, and no validation is done on them.


On 10/11/12 4:43 PM, Grant Rettke gret...@acm.org wrote:

Hi,

I'm working on

5.4. Ordered facts

in

file:///C:/x86/Jess71p2/docs/memory.html

with Jess Jess Version 7.1p2 11/5/2008

where there is an example

Jess (number (value 6))

I expected the ordered fact number to get created on-demand but instead
got:

Jess reported an error in routine Funcall.execute
   while executing (number (value 6)).
  Message: Undefined function number.
  Program text: ( number ( value 6 ) )  at line 1.

What am I doing wrong?

Best wishes,

Grant

--
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Fuzzy Jess available anywhere?

2012-10-10 Thread Friedman-Hill, Ernest
The FuzzyJ Toolkit is now available at
http://www.jessrules.com/user.programs/FuzzyJToolkit.zip .

On 10/8/12 11:44 AM, Friedman-Hill, Ernest ejfr...@sandia.gov wrote:

Sandia has a license from NRC to redistribute the FuzzyJ toolkit. I will
put it up on the Jess web site as soon as the site comes back from system
time.

On 10/7/12 5:55 AM, dselva80 dse...@mit.edu wrote:

Hi,

Can I find Bob Orchard's fuzzy Jess toolkit for download anywhere?




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Emacs Jess Users?

2012-10-10 Thread Friedman-Hill, Ernest
I still use Emacs 22 on my MacBook, so I didn't realize there was a
problem. If you have a patch, let me know and I can post it for other
people to use.

On 10/9/12 11:57 PM, Grant Rettke gret...@acm.org wrote:

Hi,

Emacs v24 jess-mode users, are you out there?

I just found a fix to make jess-mode play nice with Emacs 24 was
wondering if anyone else is using it.

Everything just works so far and I wanted to have someone to bounce
ideas off of.

Best wishes,

Grant Rettke




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] What is your preferred Eclipse version, distribution, and bitness for Jess 7*?

2012-10-10 Thread Friedman-Hill, Ernest
Jess doesn't care, being a pure Java library. The 32 vs 64-bit question
depends entirely on your own machine's architecture, and then the proper
Eclipse distribution depends on what sort of code you intend to write: for
example, the RCP/RAP developer package is for people who are writing
Eclipse plugins, while Eclipse Classic is a good all around distribution
for general Java programming.

On 10/9/12 7:05 PM, Grant Rettke gret...@acm.org wrote:

Hi,

There are different version numbers, distribution types (eg for java,
for C/C++, for...), and 32 or 64 bit.

For Jess 7 users, what combination do you prefer?

I'm going to set it up for the first time and would like to avoid the
usual Eclipse headaches! :)

Best wishes,

Grant




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] Fuzzy Jess available anywhere?

2012-10-08 Thread dselva80
Hi,

Can I find Bob Orchard's fuzzy Jess toolkit for download anywhere? (academic
license) All links to the toolkit seem to be broken since Bob retired, and I
don't really want to reimplement all this functionality from scratch...

Thanks in advance,

Daniel



--
View this message in context: 
http://jess.2305737.n4.nabble.com/Fuzzy-Jess-available-anywhere-tp4654087.html
Sent from the Jess mailing list archive at Nabble.com.


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Fuzzy Jess available anywhere?

2012-10-08 Thread Friedman-Hill, Ernest
Sandia has a license from NRC to redistribute the FuzzyJ toolkit. I will
put it up on the Jess web site as soon as the site comes back from system
time.

On 10/7/12 5:55 AM, dselva80 dse...@mit.edu wrote:

Hi,

Can I find Bob Orchard's fuzzy Jess toolkit for download anywhere?
(academic
license) All links to the toolkit seem to be broken since Bob retired,
and I
don't really want to reimplement all this functionality from scratch...

Thanks in advance,

Daniel



--
View this message in context:
http://jess.2305737.n4.nabble.com/Fuzzy-Jess-available-anywhere-tp4654087.
html
Sent from the Jess mailing list archive at Nabble.com.


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Fuzzy Jess available anywhere?

2012-10-08 Thread Bob Orchard
Send me an email at orcha...@rogers.com and I'll see what I can do.

Bob Orchard.

On 2012-10-07, at 5:55 AM, dselva80 wrote:

 Hi,
 
 Can I find Bob Orchard's fuzzy Jess toolkit for download anywhere? (academic
 license) All links to the toolkit seem to be broken since Bob retired, and I
 don't really want to reimplement all this functionality from scratch...
 
 Thanks in advance,
 
 Daniel
 
 
 
 --
 View this message in context: 
 http://jess.2305737.n4.nabble.com/Fuzzy-Jess-available-anywhere-tp4654087.html
 Sent from the Jess mailing list archive at Nabble.com.
 
 
 To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
 in the BODY of a message to majord...@sandia.gov, NOT to the list
 (use your own address!) List problems? Notify owner-jess-us...@sandia.gov.
 
 





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] Invitation to IntelliFest 2012 for Jess Users

2012-07-27 Thread Jason Morris
 http://www.intellifest.org%20
www.intellifest.org

Invent * Innovate * Implement at IntelliFest!

Dear Jess User Group Members,

You are cordially invited to attend this year's IntelliFest: Intenational
Conference on Reasoning Technologies http://intellifest.org, October
22-26, at the Bahia Resort Hotel in San Diego, CA. IntelliFest is the next
evolution beyond Rules Fest, and the premier conference for developers who
use applied AI.

This year, we're offering a dual track format featuring a new
business/managerial track in addition to our core developer/technical
track.  Our keynotes feature Dr. Douglas Lenat, the originator of the Cyc
Project and CEO of Cycorp.  Our boot camps are back with a full day of
hands-on Drools, and we're adding a whole day-long session on rules
technologies in Healthcare led by Dr. David Sottara and Dr. Emory Fry.

For all the information, go to our website:  http://intellifest.org  and
please contact us at i...@intellifest.org if you have any questions.

 Special Offer For Jess User Group **Members 

Use the code *IF2012_4_JESSUSERS* when you register and receive 10% off
your total invoice!

Hope to see you there!
Cheers,
Jason

-- 
*Jason C. Morris*
President, Principal Consultant
Morris Technical Solutions LLC
President, Rules Fest Association
Chairman, IntelliFest 2012: International Conference on Reasoning
Technologies

phone: +01.517.376.8314
skype: jcmorris-mts
email: consult...@morris-technical-solutions.com
mybio: http://www.linkedin.com/in/jcmorris


Re: JESS: [EXTERNAL] Activate a Behaviour Jade from Jess

2012-07-12 Thread Wolfgang Laun
You cannot call the action() method of a Behaviour subtype. One of the
paradigms to make an Agent do some useful work is to send it messages,
and the agent's behaviour (typically a CyclingBehaviour) processes
these messages. The message contents could be processed by a Jess
engine.

Develop an Agent capable of receiving and printing messages, without
Jess. Make sure that it works.

Separately, develop a Java program running Jess and inserting facts
from Java, and observe that your rules fire. If you have any problems,
post *full* code on this list.

-W


On 11/07/2012, lyes clarke_ste...@hotmail.com wrote:

 Hello,
 Sorry To disturb you,

 My Objective with jess is to run the behaviours of agent.

 in méthode setup () i insert in the template information as contenu ..etc,
 and i make rules to resound.

 in my class Test1 i have :

 public class Test1 extends Agent{



 protected void setup() {


   (insertion into template).
 }


 And i have somme behavours as fo exemple behaviour to make addition.

  public class Addition extends OneShotBehaviour {


 @Override

 public void action() {



 // TODO Auto-generated method stub


 Make (A + B).


 }



 in jess :
 --
 I make rule to run behaviours. For exemple :
 (deftemplate ACLMessage  (slot contenu))

 (defrule test (ACLMessage (contenu A)) = ( rune behaviour addition ).

 But i have 2 problem : when a assert into template from java, he don't make
 it. the seconde problem is to rune behaviour.

 Thank's for all
 Date: Wed, 11 Jul 2012 06:22:11 -0700
 From: ml-node+s2305737n4654079...@n4.nabble.com
 To: clarke_ste...@hotmail.com
 Subject: Re: JESS: [EXTERNAL] Activate a Behaviour Jade from Jess



   In your setup() method, do something like


 Rete engine = new Rete();

 try {

 engine.store(AGENT, this);

 engine.batch(ex.clp);

 Value v = engine.executeCommand((assert(ACLMessage(contenu A;

 engine.executeCommand((run));

 ...


 Then in Jess code, you can get access to the Test1 object by calling


 (fetch AGENT)


 And call Java methods on that object as needed. I'm afraid I can't help

 any more than that, since you haven't told us anything about what

 activating a behavior might entail.




 On 7/11/12 7:36 AM, lyes [hidden email] wrote:


Hello,



I wish activate a behavior of agent from jess.



Exemple :



My class Agent

--

public class Test1 extends Agent{

  

  protected void setup() {



   System.out.println (Agent  + getLocalName()+  I am here

);



   Rete engine = new Rete();

  try {

   engine.batch(ex.clp);

  Value v = 
 engine.executeCommand((assert(ACLMessage(contenu A;

  engine.executeCommand((run));

  

  } catch (JessException e) {

  // TODO Auto-generated catch block

  e.printStackTrace();

  }

}





public class MyAction extends OneShotBehaviour {



  @Override

  public void action() {

  

  // TODO Auto-generated method stub



 System.out.println (Agent  +

getLocalName()+

 I am here );

  

  }

  

  }

}



My file ex.clp

--

(deftemplate ACLMessage  (slot contenu))

(defrule test (ACLMessage (contenu A)) = [// i wish activate behaviour

MyAction Defined in Agent java  for excute instructions//])



Please Help me.

Thank's





--

View this message in context:

http://jess.2305737.n4.nabble.com/Activate-a-Behaviour-Jade-from-Jess-tp46
54077.html

Sent from the Jess mailing list archive at Nabble.com.





To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'

in the BODY of a message to [hidden email], NOT to the list

(use your own address!) List problems? Notify [hidden email].





 

 To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'

 in the BODY of a message to [hidden email], NOT to the list

 (use your own address!) List problems? Notify [hidden email].

 



   
   

   

   
   
   If you reply to this email, your message will be added to the 
 discussion
 below:
   
 http://jess.2305737.n4.nabble.com/Activate-a-Behaviour-Jade-from-Jess-tp4654077p4654079.html
   
   
   
   To unsubscribe from

JESS: [EXTERNAL] Activate a Behaviour Jade from Jess

2012-07-11 Thread lyes
Hello,

I wish activate a behavior of agent from jess.

Exemple : 

My class Agent
--
public class Test1 extends Agent{

protected void setup() {

   System.out.println (Agent  + getLocalName()+  I am here
);

   Rete engine = new Rete();
try {
 engine.batch(ex.clp);
Value v = 
engine.executeCommand((assert(ACLMessage(contenu A;
engine.executeCommand((run));

} catch (JessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}


public class MyAction extends OneShotBehaviour {

@Override
public void action() {

// TODO Auto-generated method stub

 System.out.println (Agent  + getLocalName()+
 I am here );

}

}
}

My file ex.clp
--
(deftemplate ACLMessage  (slot contenu))
(defrule test (ACLMessage (contenu A)) = [// i wish activate behaviour
MyAction Defined in Agent java  for excute instructions//])

Please Help me.
Thank's 


--
View this message in context: 
http://jess.2305737.n4.nabble.com/Activate-a-Behaviour-Jade-from-Jess-tp4654077.html
Sent from the Jess mailing list archive at Nabble.com.


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] Jess and negation

2012-07-11 Thread André Lämmer
Hello,

 

Do I have the same problems in Jess with negation and disjunction like with
horn clauses in prolog?

 

Best regards,

 

André Lämmer



Re: JESS: [EXTERNAL] Activate a Behaviour Jade from Jess

2012-07-11 Thread Friedman-Hill, Ernest
In your setup() method, do something like

Rete engine = new Rete();
try {
engine.store(AGENT, this);
engine.batch(ex.clp);
Value v = engine.executeCommand((assert(ACLMessage(contenu A;
engine.executeCommand((run));
...

Then in Jess code, you can get access to the Test1 object by calling

(fetch AGENT)

And call Java methods on that object as needed. I'm afraid I can't help
any more than that, since you haven't told us anything about what
activating a behavior might entail.



On 7/11/12 7:36 AM, lyes clarke_ste...@hotmail.com wrote:

Hello,

I wish activate a behavior of agent from jess.

Exemple : 

My class Agent
--
public class Test1 extends Agent{
   
   protected void setup() {

   System.out.println (Agent  + getLocalName()+  I am here
);

   Rete engine = new Rete();
   try {
engine.batch(ex.clp);
   Value v = 
 engine.executeCommand((assert(ACLMessage(contenu A;
   engine.executeCommand((run));
   
   } catch (JessException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   }
}


public class MyAction extends OneShotBehaviour {

   @Override
   public void action() {
   
   // TODO Auto-generated method stub

 System.out.println (Agent  +
getLocalName()+
 I am here );
   
   }
   
   }
}

My file ex.clp
--
(deftemplate ACLMessage  (slot contenu))
(defrule test (ACLMessage (contenu A)) = [// i wish activate behaviour
MyAction Defined in Agent java  for excute instructions//])

Please Help me.
Thank's 


--
View this message in context:
http://jess.2305737.n4.nabble.com/Activate-a-Behaviour-Jade-from-Jess-tp46
54077.html
Sent from the Jess mailing list archive at Nabble.com.


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Jess and negation

2012-07-11 Thread Wolfgang Laun
On 09/07/2012, André Lämmer andre.laem...@htwg-konstanz.de wrote:

 Do I have the same problems in Jess with negation and disjunction like with
 horn clauses in prolog?


Why do you have problems with horn clauses in Prolog?
-W




To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




RE: JESS: [EXTERNAL] Activate a Behaviour Jade from Jess

2012-07-11 Thread lyes

Hello, 
Sorry To disturb you,

My Objective with jess is to run the behaviours of agent.

in méthode setup () i insert in the template information as contenu ..etc, and 
i make rules to resound.

in my class Test1 i have :

public class Test1 extends Agent{



protected void setup() {


  (insertion into template).
}


And i have somme behavours as fo exemple behaviour to make addition.

 public class Addition extends OneShotBehaviour {


@Override

public void action() {



// TODO Auto-generated method stub


Make (A + B).


}



in jess :
--
I make rule to run behaviours. For exemple : 
(deftemplate ACLMessage  (slot contenu))

(defrule test (ACLMessage (contenu A)) = ( rune behaviour addition ).

But i have 2 problem : when a assert into template from java, he don't make it. 
the seconde problem is to rune behaviour.

Thank's for all 
Date: Wed, 11 Jul 2012 06:22:11 -0700
From: ml-node+s2305737n4654079...@n4.nabble.com
To: clarke_ste...@hotmail.com
Subject: Re: JESS: [EXTERNAL] Activate a Behaviour Jade from Jess



In your setup() method, do something like


Rete engine = new Rete();

try {

engine.store(AGENT, this);

engine.batch(ex.clp);

Value v = engine.executeCommand((assert(ACLMessage(contenu A;

engine.executeCommand((run));

...


Then in Jess code, you can get access to the Test1 object by calling


(fetch AGENT)


And call Java methods on that object as needed. I'm afraid I can't help

any more than that, since you haven't told us anything about what

activating a behavior might entail.




On 7/11/12 7:36 AM, lyes [hidden email] wrote:


Hello,



I wish activate a behavior of agent from jess.



Exemple : 



My class Agent

--

public class Test1 extends Agent{

   

   protected void setup() {



   System.out.println (Agent  + getLocalName()+  I am here

);



   Rete engine = new Rete();

   try {

engine.batch(ex.clp);

   Value v = 
 engine.executeCommand((assert(ACLMessage(contenu A;

   engine.executeCommand((run));

   

   } catch (JessException e) {

   // TODO Auto-generated catch block

   e.printStackTrace();

   }

}





public class MyAction extends OneShotBehaviour {



   @Override

   public void action() {

   

   // TODO Auto-generated method stub



 System.out.println (Agent  +

getLocalName()+

 I am here );

   

   }

   

   }

}



My file ex.clp

--

(deftemplate ACLMessage  (slot contenu))

(defrule test (ACLMessage (contenu A)) = [// i wish activate behaviour

MyAction Defined in Agent java  for excute instructions//])



Please Help me.

Thank's 





--

View this message in context:

http://jess.2305737.n4.nabble.com/Activate-a-Behaviour-Jade-from-Jess-tp46
54077.html

Sent from the Jess mailing list archive at Nabble.com.





To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'

in the BODY of a message to [hidden email], NOT to the list

(use your own address!) List problems? Notify [hidden email].







To unsubscribe, send the words 'unsubscribe jess-users [hidden email]'

in the BODY of a message to [hidden email], NOT to the list

(use your own address!) List problems? Notify [hidden email].












If you reply to this email, your message will be added to the 
discussion below:

http://jess.2305737.n4.nabble.com/Activate-a-Behaviour-Jade-from-Jess-tp4654077p4654079.html



To unsubscribe from Activate a Behaviour Jade from Jess, click 
here.

NAML
  

--
View this message in context: 
http://jess.2305737.n4.nabble.com/Activate-a-Behaviour-Jade-from-Jess-tp4654077p4654081.html
Sent from the Jess mailing list archive at Nabble.com.

Re: JESS: [EXTERNAL] Jess asserts fact that is not true

2012-06-27 Thread Wolfgang Laun
On 26/06/2012, Dwight Hare d.h...@paritycomputing.com wrote:
 I am trying to reason about the passage of time in my rules. I would like to
 write the following rule:

 (defrule Test
 ?r - (logical (CurrentTime))
 (logical (Condition (time ?time:( (+ ?time 5)
 ?r.t
 =
 (assert (Condition-met))
 )

 Where CurrentTime is a fact that holds the current time, and I change the
 slot value t as time progresses. The rule fires if the time slot in the
 Condition plus 5 is greater than the current time (that is, is true within
 the last 5 time increments). But this syntax is not allowed because you
 cannot access a dotted variable (the ?r.t) here.

Why not simply

(defrule Test
(logical (CurrentTime ?ct))
(logical (Condition (time ?time:( (+ ?time 5) ?ct
=
(assert (Condition-met))
)

which avoids all that global rigmarole?

More below.


 My first alternative was to declare a defglobal called *time* and have
 that change value as time progresses. But there is no way to make the global
 a logical dependency of the asserted condition-met so it doesn't get
 retracted when the global changes in value sufficient to make the rule no
 longer be true.

 I came up with a workaround where in addition to the defglobal *time* I
 assert a Fact called CurrentTime that holds the same value in the t slot.
 Now my rule is:

 (defrule Test
 ?r - (logical (CurrentTime (t ?t:(= ?t ?*time*
 (logical (Condition (time ?time:( (+ ?time 5)  
 ?*time*  ; Note I use the global here instead of the dotted var but the
 value is the same
 =
 (assert (Condition-met (globtime ?*time*)(facttime
 ?r.t)))
 )

The fallacy is buried in the second pattern which compares the
(unchanged) Condition with the value in the global *time*. You know
that this has changed, but the Jess Engine doesn't. It works in the
first pattern because you change the CurrentTime fact, and so this
pattern is re-evaluated.

Don't use globals in LHS patterns unless they are immutable.

-W


 This says that if there is a CurrentTime fact whose slot t has the same
 value as the global *time* and there is a Condition whose time slot plus
 5 is greater than that time, then assert the Condition-met. My java code
 sets the global to 4, asserts the fact (CurrentTime (t 4)), and then
 asserts the fact (Condition (time 0)). Since all the conditions are met
 the rules engine asserts the fact (MAIN::Condition-met (globtime 4)
 (facttime 4)). All is well though a bit clumsy. Now I want to move time
 forward where the Condition-met should no longer be true. I change the
 global to 10 and modify the CurrentTime fact and set the t slot to 10
 too.

 Then I run the rules engine and it retracts the (MAIN::Condition-met
 (globtime 4) (facttime 4)) but then mysteriously asserts
 (MAIN::Condition-met (globtime 10) (facttime 10)). Since the Condition
 time of 0 plus 5 is not greater than 10, it should not have asserted this.
 Here is a dump of the facts in the rules engine at the end:

 0: (MAIN::CurrentTime (t 10))
 1: (MAIN::Condition (time 0))
 3: (MAIN::Condition-met (globtime 10) (facttime 10))

 I see no justification for the 3rd fact given the only rule I have.

 Is there a better way of accomplishing this?

 Dwight



To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




RE: JESS: [EXTERNAL] Jess asserts fact that is not true

2012-06-27 Thread Dwight Hare
Duh. I had early on gotten into the habit of assigning the LHS clause to a 
variable (as I did below in ?r - ...) and then accessing the slots using 
dotted vars that I had completely forgotten this alternative way of assigning a 
slot value to a var in a rule. It works correctly now without the global and it 
retracts the fact when I change the value representing the current time.

Apologies for wasting everyone's time with this stupid question.

Dwight

-Original Message-
From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On 
Behalf Of Wolfgang Laun
Sent: Tuesday, June 26, 2012 9:59 PM
To: jess-users@sandia.gov
Subject: Re: JESS: [EXTERNAL] Jess asserts fact that is not true

On 26/06/2012, Dwight Hare d.h...@paritycomputing.com wrote:
 I am trying to reason about the passage of time in my rules. I would 
 like to write the following rule:

 (defrule Test
 ?r - (logical (CurrentTime))
 (logical (Condition (time ?time:( (+ ?time 5)
 ?r.t
 =
 (assert (Condition-met))
 )

 Where CurrentTime is a fact that holds the current time, and I 
 change the slot value t as time progresses. The rule fires if the 
 time slot in the Condition plus 5 is greater than the current time 
 (that is, is true within the last 5 time increments). But this syntax 
 is not allowed because you cannot access a dotted variable (the ?r.t) here.

Why not simply

(defrule Test
(logical (CurrentTime ?ct))
(logical (Condition (time ?time:( (+ ?time 5) ?ct
=
(assert (Condition-met))
)

which avoids all that global rigmarole?

More below.


 My first alternative was to declare a defglobal called *time* and 
 have that change value as time progresses. But there is no way to make 
 the global a logical dependency of the asserted condition-met so it 
 doesn't get retracted when the global changes in value sufficient to 
 make the rule no longer be true.

 I came up with a workaround where in addition to the defglobal 
 *time* I assert a Fact called CurrentTime that holds the same value in the 
 t slot.
 Now my rule is:

 (defrule Test
 ?r - (logical (CurrentTime (t ?t:(= ?t ?*time*
 (logical (Condition (time ?time:( (+ ?time 5)  
 ?*time*  ; Note I use the global here instead of the dotted var but the 
 value is the same
 =
 (assert (Condition-met (globtime ?*time*)(facttime
 ?r.t)))
 )

The fallacy is buried in the second pattern which compares the
(unchanged) Condition with the value in the global *time*. You know that this 
has changed, but the Jess Engine doesn't. It works in the first pattern because 
you change the CurrentTime fact, and so this pattern is re-evaluated.

Don't use globals in LHS patterns unless they are immutable.

-W


 This says that if there is a CurrentTime fact whose slot t has the 
 same value as the global *time* and there is a Condition whose 
 time slot plus
 5 is greater than that time, then assert the Condition-met. My java 
 code sets the global to 4, asserts the fact (CurrentTime (t 4)), 
 and then asserts the fact (Condition (time 0)). Since all the 
 conditions are met the rules engine asserts the fact 
 (MAIN::Condition-met (globtime 4) (facttime 4)). All is well though 
 a bit clumsy. Now I want to move time forward where the 
 Condition-met should no longer be true. I change the global to 10 
 and modify the CurrentTime fact and set the t slot to 10 too.

 Then I run the rules engine and it retracts the (MAIN::Condition-met 
 (globtime 4) (facttime 4)) but then mysteriously asserts 
 (MAIN::Condition-met (globtime 10) (facttime 10)). Since the 
 Condition time of 0 plus 5 is not greater than 10, it should not have 
 asserted this.
 Here is a dump of the facts in the rules engine at the end:

 0: (MAIN::CurrentTime (t 10))
 1: (MAIN::Condition (time 0))
 3: (MAIN::Condition-met (globtime 10) (facttime 10))

 I see no justification for the 3rd fact given the only rule I have.

 Is there a better way of accomplishing this?

 Dwight



To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list (use your own 
address!) List problems? Notify owner-jess-us...@sandia.gov.






To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] Jess asserts fact that is not true

2012-06-26 Thread Dwight Hare
I am trying to reason about the passage of time in my rules. I would like to 
write the following rule:

(defrule Test
?r - (logical (CurrentTime))
(logical (Condition (time ?time:( (+ ?time 5) ?r.t
=
(assert (Condition-met))
)

Where CurrentTime is a fact that holds the current time, and I change the 
slot value t as time progresses. The rule fires if the time slot in the 
Condition plus 5 is greater than the current time (that is, is true within the 
last 5 time increments). But this syntax is not allowed because you cannot 
access a dotted variable (the ?r.t) here.

My first alternative was to declare a defglobal called *time* and have that 
change value as time progresses. But there is no way to make the global a 
logical dependency of the asserted condition-met so it doesn't get retracted 
when the global changes in value sufficient to make the rule no longer be true.

I came up with a workaround where in addition to the defglobal *time* I 
assert a Fact called CurrentTime that holds the same value in the t slot. Now 
my rule is:

(defrule Test
?r - (logical (CurrentTime (t ?t:(= ?t ?*time*
(logical (Condition (time ?time:( (+ ?time 5) ?*time* 
 ; Note I use the global here instead of the dotted var but the value is the 
same
=
(assert (Condition-met (globtime ?*time*)(facttime ?r.t)))
)

This says that if there is a CurrentTime fact whose slot t has the same value 
as the global *time* and there is a Condition whose time slot plus 5 is 
greater than that time, then assert the Condition-met. My java code sets the 
global to 4, asserts the fact (CurrentTime (t 4)), and then asserts the 
fact (Condition (time 0)). Since all the conditions are met the rules engine 
asserts the fact (MAIN::Condition-met (globtime 4) (facttime 4)). All is well 
though a bit clumsy. Now I want to move time forward where the Condition-met 
should no longer be true. I change the global to 10 and modify the CurrentTime 
fact and set the t slot to 10 too.

Then I run the rules engine and it retracts the (MAIN::Condition-met (globtime 
4) (facttime 4)) but then mysteriously asserts (MAIN::Condition-met (globtime 
10) (facttime 10)). Since the Condition time of 0 plus 5 is not greater than 
10, it should not have asserted this. Here is a dump of the facts in the rules 
engine at the end:

0: (MAIN::CurrentTime (t 10))
1: (MAIN::Condition (time 0))
3: (MAIN::Condition-met (globtime 10) (facttime 10))

I see no justification for the 3rd fact given the only rule I have.

Is there a better way of accomplishing this?

Dwight


JESS: [EXTERNAL] Using Jess from Java

2012-06-07 Thread Cecilia Zanni-Merk (INSA de Strasbourg)

Dear colleagues

I'm absolutely new to using Jess from a Java program,
When I try to test a software done by someone at my team a couple of 
years ago, Eclipse gives me these errors


!ENTRY org.eclipse.osgi 4 0 2012-06-07 21:29:27.775
!MESSAGE Application error
!STACK 1
java.lang.ThreadDeath
at jess.Jesp.init(Unknown Source)
at jess.Rete.g(Unknown Source)
at jess.Rete.init(Unknown Source)
at jess.Rete.init(Unknown Source)
at 
fr.insa.mamas.Initialization.createAgents(Initialization.java:356) -- 
where Initialization is one of the classes of our project.


Everything is imported correctly, son I do not understand why I get 
jess.Rete.init (Unknown Source)


Any suggestion is more than welcome

Thank you very much in advance

Regards

Cecilia


--
===
Cecilia Zanni-Merk
INSA de Strasbourg
24 Bd de la Victoire - 67084 Strasbourg - France
Phone: +33 3 88 14 47 00 (4864)

Beware of bugs in the above code; I have only proved
it correct, not tried it. Donald Knuth



To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Using Jess from Java

2012-06-07 Thread Friedman-Hill, Ernest
The Unknown Source just means that line number info isn't stored in the
binary (non-source code) distribution you are using; that's not a problem
at all. The problem is the ThreadDeath message -- it means that you're
using a  trial or time-limited licensed version, and the trial period or
license period has expired. You'll need to contact Craig Smith,
casm...@sandia.gov, to obtain a current license.



On 6/7/12 3:31 PM, Cecilia Zanni-Merk (INSA de Strasbourg)
cecilia.zanni-m...@insa-strasbourg.fr wrote:

Dear colleagues

I'm absolutely new to using Jess from a Java program,
When I try to test a software done by someone at my team a couple of
years ago, Eclipse gives me these errors

!ENTRY org.eclipse.osgi 4 0 2012-06-07 21:29:27.775
!MESSAGE Application error
!STACK 1
java.lang.ThreadDeath
 at jess.Jesp.init(Unknown Source)
 at jess.Rete.g(Unknown Source)
 at jess.Rete.init(Unknown Source)
 at jess.Rete.init(Unknown Source)
 at 
fr.insa.mamas.Initialization.createAgents(Initialization.java:356) --
where Initialization is one of the classes of our project.

Everything is imported correctly, son I do not understand why I get
jess.Rete.init (Unknown Source)

Any suggestion is more than welcome

Thank you very much in advance

Regards

Cecilia


-- 
===
Cecilia Zanni-Merk
INSA de Strasbourg
24 Bd de la Victoire - 67084 Strasbourg - France
Phone: +33 3 88 14 47 00 (4864)

Beware of bugs in the above code; I have only proved
it correct, not tried it. Donald Knuth



To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Jess Rules and CMD Prompt

2012-04-20 Thread Dusan Sormaz
Show us what you tried to do and error that is displayed, and somebody 
may be able to help you.


Dusan Sormaz

On 4/20/2012 10:10 AM, Gianluigi Loffreda wrote:

I have a problem with the Jess Installation.
Following the jess installation instructions I read that right after the
unzip I could create an environment variable JAVA_HOME with the path of the
java.exe to use the Jess also from the Command Prompt.

I created the variable and set it with the correct path but I get a message
that states that the path is uncorrect because it is not a J2SDK
installation.

Does anybody have any idea on how to fix this issue?

Many thanks.

Gianluigi

--
View this message in context: 
http://jess.2305737.n4.nabble.com/Jess-Rules-and-CMD-Prompt-tp4574100p4574100.html
Sent from the Jess mailing list archive at Nabble.com.


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2127 / Virus Database: 2411/4947 - Release Date: 04/19/12



--
***
* Dusan Sormaz, PhD, Associate Professor
* Ohio University
* Department of Industrial and Systems Engineering
* 284 Stocker Center, Athens, OH 45701-2979
* phone: (740) 593-1545
* fax: (740) 593-0778
* e-mail: sor...@ohio.edu
* url: http://www.ohio.edu/people/sormaz
***



To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




Re: JESS: [EXTERNAL] Jess Rules and CMD Prompt

2012-04-20 Thread Friedman-Hill, Ernest
JAVA_HOME isn't the path to java.exe; it's the path to bin/java.exe. In
other words, JAVA_HOME will be something like

C:\Program Files\jdk1.6.0_23



On 4/20/12 10:10 AM, Gianluigi Loffreda gianluigiloffr...@gmail.com
wrote:

I have a problem with the Jess Installation.
Following the jess installation instructions I read that right after the
unzip I could create an environment variable JAVA_HOME with the path of
the
java.exe to use the Jess also from the Command Prompt.

I created the variable and set it with the correct path but I get a
message
that states that the path is uncorrect because it is not a J2SDK
installation. 

Does anybody have any idea on how to fix this issue?

Many thanks. 

Gianluigi

--
View this message in context:
http://jess.2305737.n4.nabble.com/Jess-Rules-and-CMD-Prompt-tp4574100p4574
100.html
Sent from the Jess mailing list archive at Nabble.com.


To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.





To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.




JESS: [EXTERNAL] jess editor crashed under 64bit Eclipse running on Ubuntu

2012-04-16 Thread Przemyslaw Woznowski
Hi everyone,

I've a freshly installed 64bit Ubuntu and the latest Eclipse (Indigo 64 bit
for Linux). I have transfered my Java + Jess code from a windows machine
and tried running it and came across two problems:

1) Whenever I want to open a .clp file in the Jess Editor in Eclipse,
Eclipse crashes/exits.

2) My code runs fine, except that the rules don't fire at all. Facts are
asserted into the WM, my file with rules loads up fine but then none of the
rules fire.

Has any of you experienced something like this on a 64bit Linux? Or maybe
there is somebody who has it running on such an OS without any problems?
Any help would be much appreciated.

Attached is the eclipse log file - comes from a fresh copy of Eclipse,
newly created project with just one .clp file added.

Best regards,
Pete

-- 
Przemyslaw (Pete) Woznowski, PhD candidate
Email: p.r.woznow...@cs.cardiff.ac.uk
Room C/2.06, Desk 8
Cardiff School of Computer Science  Informatics,
Cardiff University,
Queen's Buildings,
5 The Parade, Roath,
Cardiff, CF24 3AA, UK


.log
Description: Binary data


  1   2   >