JESS: Announcing Jess 8.0a1

2013-11-25 Thread Friedman-Hill, Ernest
The first alpha release of Jess 8.0 is now available for licensed users: http://www.jessrules.com/jess/sourcedist/Jess80a1.zip Jess 8 includes many bug fixes since Jess 7.1p2, a new Eclipse update site-based installer for the JessDE, and support for building Jess applications for Android

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

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

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)

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

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 $?

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

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

2013-06-26 Thread Friedman-Hill, Ernest
.; 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

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

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:

RE: JESS: [EXTERNAL] Corrupted Negcnt Error

2013-05-30 Thread Friedman-Hill, Ernest
. 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

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

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

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

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.

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

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)

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

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

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

2013-01-03 Thread Friedman-Hill, Ernest
-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

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

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

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

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

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

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

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)

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

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

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

Re: JESS: [EXTERNAL] Jess Error

2012-03-06 Thread Friedman-Hill, Ernest
Jess is involved here, but this is not a Jess problem per se. As the error message says, a third-party Jess script called a Java method loadOWLResource in some third-party code, and that Java method threw an exception. Jess, in turn, throws an exception to report this. The Jess exception object

Re: JESS: [EXTERNAL] How to negate a variable when in lhs of a rule

2012-01-11 Thread Friedman-Hill, Ernest
The asterisks are part of the defglobal's name. You're not comparing to the defglobal: you're binding the value in the slot to a new variable. It's not legal to negate such a constraint in its first use, as the error message said. You need to use (unit (ID ?id) (typeID ?typeID) (player

Re: JESS: [EXTERNAL] How to negate a variable when in lhs of a rule

2012-01-11 Thread Friedman-Hill, Ernest
().setVariable(*PLAYER_ID*, new Value(player.getID()); and everything works fine. Does getGlobalContext().setVariable(...) define global variables implicitly? or do you have to include the asterisks like I did? Thanks. Hunter McMillen On Wed, Jan 11, 2012 at 3:13 PM, Friedman-Hill, Ernest ejfr

Re: JESS: Nested not/and syntax question

2012-01-06 Thread Friedman-Hill, Ernest
The difference is actually that the not in Rule1 doesn't have a preceding pattern, and therefore Jess inserts (initial-fact), so that the rule won't work unless you've executed (reset) at the beginning of the session, as described in section 6.10 of the Jess 7.1 manual. See

RE: JESS: [EXTERNAL] Iterate over a Java List in Jess

2011-12-13 Thread Friedman-Hill, Ernest
That create$ call is creating a list with one element, the ArrayList. Iterating over the Jess list returns just the ArrayList - not what you want. In recent versions of Jess, the foreach function actually knows about Iterators and the like, so you can iterate over the ArrayList directly:

RE: JESS: [EXTERNAL] Access public enum inside of a class

2011-12-07 Thread Friedman-Hill, Ernest
Nested enums, like nested classes, actually secretly have a name like UnitType$UnitTypes. I haven't tried this specifically for enums, but I suspect this would work: engine.executeCommand((import eisbot.proxy.types.UnitType$UnitTypes)); From:

RE: [EXTERNAL] Re: JESS: defquery

2011-11-29 Thread Friedman-Hill, Ernest
H. I had to head over to Nabble to find out what this was referring to. I'll quote the most recent post in that thread, which quotes the original: That URL is the manual for Jess 5.2 (from May 2001, almost ten years ago!) The current version is 7.1, and the current manual is at

RE: JESS: Scoping Question

2011-11-10 Thread Friedman-Hill, Ernest
Since control structures are functions in Jess, the ability for a function to peek from one stack frame to another is important. I could have implemented this using some kind of special form or keyword -- like the Tcl uplevel function -- but in the first go-round, I think I just took the easy

RE: JESS: Is it possible to bind a Java object directly to a Jess variable without creating a new object?

2011-11-07 Thread Friedman-Hill, Ernest
on the existence of some object with attributes x, y, and z? Hunter On Fri, Nov 4, 2011 at 4:01 PM, Friedman-Hill, Ernest ejfr...@sandia.govmailto:ejfr...@sandia.gov wrote: There are (obviously) two options: (a) put the object somewhere accessible, and run Jess code that retrieves it, or (b) use

RE: JESS: Is it possible to bind a Java object directly to a Jess variable without creating a new object?

2011-11-04 Thread Friedman-Hill, Ernest
There are (obviously) two options: (a) put the object somewhere accessible, and run Jess code that retrieves it, or (b) use Jess's Java API to set a Jess variable to contain the object. Either would work. The store/fetch mechanism is sort of an built-in easy way to do (a). Alternatively, say

JESS: RE: Performance, Java static method vs Java oject method calls.

2011-10-21 Thread Friedman-Hill, Ernest
The time difference you're looking at is the time it takes the JVM to throw an exception. Jess interprets an expression like this (?string codePointAt 0) as (assuming ?string is the symbol 'a') (call a codePointAt 0) That's actually ambiguous. We might be calling a static method codePointAt

RE: JESS: compare slots but only with the last two instances

2011-10-19 Thread Friedman-Hill, Ernest
Assuming that there's some definite ordering among your instances, you just need to make those explicit somehow -- give each instance a slot holding a serial number -- and then you can identify the next two and the last two by comparing those numbers. Otherwise it's the same as comparing any

RE: JESS: Using JESS for representing game states

2011-10-10 Thread Friedman-Hill, Ernest
It is true that the Rete algorithm (on which Jess is based) is built on the assumption that only a small fraction (usually quoted as 5-10%) of the knowledge base will change on each evaluation cycle. Populating the network from scratch is expensive and constantly resetting it does degrade

RE: JESS: Call Jess from C++ via JNI

2011-10-03 Thread Friedman-Hill, Ernest
to make my agent, using this I think I can only interact with Jess in my Java program then pass data from my Java code to C++, I was wondering if you thought this would be a better solution than invoke a JVM from C++ Thanks Hunter On Tue, Sep 27, 2011 at 12:03 PM, Friedman-Hill, Ernest ejfr

RE: JESS: Call Jess from C++ via JNI

2011-09-27 Thread Friedman-Hill, Ernest
The problem is here. The Java classpath doesn't list directories in which jar files can be found, but rather, the jar files themselves. The argument should be, e.g., -Djava.class.path=./jess.jar. options[0].optionString = (char*)-Djava.class.path=.; //the current directory is where

RE: JESS: multiple bindings of a multislot

2011-08-16 Thread Friedman-Hill, Ernest
Probably. The specialized Rete network nodes are faster than general function calls, as they have less overhead and work directly in Java. From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On Behalf Of Wolfgang Laun Sent: Monday, August 15,

JESS: RE: run-query* and rule LHS

2011-08-16 Thread Friedman-Hill, Ernest
Hi, The bottom line is that you can't run queries, directly or indirectly, from the LHS of rules. The results are unpredictable and, as you've seen, generally bad. From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On Behalf Of Nguyen, Son

RE: JESS: multiple bindings of a multislot

2011-08-15 Thread Friedman-Hill, Ernest
Yes, reopening a slot like this is an error; this behavior was inherited from CLIPS. I can't think of any particularly elegant workarounds. You can name those anonymous multifields and refer to them later in the rule, though -- i.e., (Temp (m $?first one two $?rest) ?first and ?rest can

RE: JESS: Is there a better Jess equivalent for pack.age.MyClass.class?

2011-08-10 Thread Friedman-Hill, Ernest
There's a method findClass() in jess.Rete which finds Class objects. It leverages the data from the Jess import command so that class names don't have to be fully qualified. So you could say ((engine) findClass MyClass) I love it when a question has a clear, unambiguous, helpful answer! :)

Re: JESS: Call for Demos: RuleML2011@BRF - 5th International Rule Challenge

2011-07-25 Thread Friedman-Hill, Ernest
Jess just uses java.util.Random, which you can read about in the Javadoc: http://download.oracle.com/javase/6/docs/api/java/util/Random.html On 7/25/11 4:51 AM, Nessrine Nassou kachroudi.nessr...@yahoo.com wrote: Hi all, Could anyone tell me if the random function of jess is normal or

JESS: RE: Basic questions about modules, context, and focus

2011-07-19 Thread Friedman-Hill, Ernest
Hi Russ, Facts are assigned to modules at the template level, not at the individual fact level. When you define a template using deftemplate, either the template specifies its module by using a name like modulename::factname, or if the name is unqualified, the template is placed in the current

RE: JESS: Storing rules in an excel sheet

2011-02-23 Thread Friedman-Hill, Ernest
Jess rules are textual, like program code. Typically what you're going to store in a spreadsheet is a decision table, which some simple rule engines will execute directly. That isn't what Jess does. You could write a Jess program to *implement* a decision table runner, or you could try to store

Re: JESS: Which is faster?

2010-08-17 Thread Friedman-Hill, Ernest
No, just the small overhead of parsing. From: Donald Winston [mailto:satchwins...@yahoo.com] Sent: Tuesday, August 17, 2010 07:08 AM To: jess-users Subject: JESS: Which is faster? Is there enough of a difference in performance between the following to worry about? ; from Jess (assert

Re: JESS: question about a feature in Jess 7.1

2010-04-09 Thread Friedman-Hill, Ernest
No, they're not. From: owner-jess-us...@sandia.gov owner-jess-us...@sandia.gov To: jess-users Sent: Fri Apr 09 11:54:01 2010 Subject: JESS: question about a feature in Jess 7.1 Hi all, On page 103 of Jess In Action, it says Note that in Jess 6.1, you can't use a

RE: JESS: Defglobal function.

2010-03-04 Thread Friedman-Hill, Ernest
Nothing is utterly wrong, but I'm not sure it makes sense to reuse the Rete object for each loop iteration without either (1) calling clear, to completely start over, or (2) moving some of the stuff out of the loop, like the batch file. The resetToMark() call is removing all the facts except

RE: JESS: Re: Mysterious behavior when using Java5 enums in Jess

2009-12-02 Thread Friedman-Hill, Ernest
Hi Jan, No mystery, just a few subtle things wrong. Remember that MyEnum.BIM is always just a symbol, while (MyEnum.BIM) is a function that returns the object BIM in the enumeration MyEnum (given that you've imported MyEnum). The version of the program with enums should NEVER use a bare

RE: JESS: assertion - exception out of memory

2009-09-29 Thread Friedman-Hill, Ernest
Hi, I don't know why your code isn't in the message that went out to the mailing list, but I saw it when I approved the message for the list. Basically you're seeing exactly the issue discussed in the FAQ here: http://www.jessrules.com/jess/FAQ.shtml#Q12 You've got a couple of rules with