Re: JESS: Building Jess in Eclipse: A Walkthrough

2004-05-31 Thread Emmanuel Lecharny
Hi !

thanks for the tutorial.

I think you can use some shortcut : you drag/drop sources when you could
have done something quicker : declare your project to point to your
source directory, then right-clik on the project, and select refresh.
Eclipse will map all your files to its internal structure.
Then, you'll have to explain eclipse that the source folder is, say,
src. So right click again on the project name and new - source
folder.

Your are really true about the fact that eclipse could be very
destructive ! Think about CVSizing your project BEFORE adding it to
eclipse. As Eclipse has a pretty good CVS capability, it will also give
you an oppoturnity to mess with your project with no trouble.

You could explain Eclipse that it must use a JRE for all your projetcs :
windows-preferences-Java-Installed JRE - set the default JRE that
you need. WARNING : this JRE will the be used by all the projects in
your workspace. I don't know if there is a way to use a specific JRE for
a simple project (I don't think so)

Sorry, I can't answer your question about Javadoc. I'm using Ant to do
it, as it's a kind of packaging task to me.

Le lun 31/05/2004 ` 10:06, Eric Wang a icrit :
 I am a relative newbie in Jess, a total newbie in Eclipse, and a
 newbie in Java.
 Still, programming is programming.  If you're good in any language,
 you're good,
 modulo syntax.
  
 Here I give a walkthrough for building Jess 6.1p7 using Eclipse.
 You'd need a Jess source license to use this.
 Apologies if this is old hat for the experts out there.  It took me 8
 whole hours
 to figure this stuff out the first day I ever laid my eyes on Eclipse
 :)
  
 One of my goals is to gain feedback on this process.  If you spot
 anything I'm
 doing wrong, or less effectively than I could, please let me know.
  
 ===
 A.  Overview: Config
 ===
  
 My current configuration is as follows.
  
 - Windows XP (also works on 2k)
 - Eclipse 3.0 M9
 - Java 2 SDK 1.4.2_04 (for Eclipse itself, per Eclipse's own
 recommendations)
 - Java 2 SDK 1.5.0 Beta 2 build 51 (what I use for all other dev,
 including Jess)
 - Jess 6.1p7
 - Emacs for Windows 21.3.1 (see section D for my fix for jess-mode.el)
  
 If you use a different Java compiler or development environment, the
 details will
 differ, but the workflow should be similar.  I am following Ernest to
 the dark side
 of Emacs and Eclipse ^_^
  
 ===
 B.  Java and Eclipse
 ===
  
 B1.   Install a stable Java 1.4.2_x.  I use the latest Sun release,
 1.4.2_04.
 Eclipse recommends that you don't use the 1.5.0 Beta for it
 (yet).
  
 (I actually did use Eclipse with 1.5.0 Beta 1 for a month,
 with no
 problems, but better to be safe.)
  
 B2.   Install Eclipse 3.0 M9.
  
 B3.   Make a shortcut to the eclipse.exe executable.
 Edit its properties, and in its Target field, append the -vm
 arg to specify
 your pre-1.5.0 Java MV, e.g.
  
 C:\Program Files\Eclipse\eclipse.exe
 -vm C:\Program Files\Java\j2re1.4.2_04\bin\javaw
  
 B4.   Move the shortcut somewhere nice.  I put it in my IE Quick
 Launch bar,
 which is in C:\Documents and Settings\$Me\Application
 Data\Microsoft\
 Internet Explorer\Quick Launch\.
  
 Note that I've already made the decision to use Java 1.5.0 for
 everything else.
 I am happy to be a guinea pig.  (Also, I love how Java 1.5 felt the
 need to add
 generic types, using essentially the same angle-bracket syntax as C++
 templates.
 Some wheels are just too good to not reinvent.)  If you prefer to use
 stable Java,
 just set your  $CLASSPATH and $PATH to point to your #B1, and skip to
 section C.
  
 B5.   Install Java 1.5.0 Beta 2.
 Edit your $CLASSPATH and $PATH to point to 1.5.0 only.
 Then you'll use 1.5.0 for everything ese, but Eclipse will
 still use 1.4.2_04
 (as long as you always launch it using the shortcut in #B4).
 My env vars are set to:
  
 CLASSPATH
 C:\Program
 Files\Java\j2re1.5.0\lib\rt.jar;D:\Develop\Sandia\Jess61p7;.
  
 PATH
 C:\Program Files\Java\j2re1.5.0\bin;C:\Program
 Files\Java\j2sdk1.5.0\bin 
  
 ===
 C.  Eclipse and Jess
 ===
 Eclipse stores local copies of .java source files in its own
 workspace.
 It can deliver its compiled .class files to a different output
 folder.
 (You can see my output folder in my $CLASSPATH variable above.)
  
 C0.   Eclipse manages a workspace, which is a hierarchy of projects
 and files. This is directly mimicked as a file hierarchy on
 your disk.
 Basically, what you see (in Eclipse) is what you get (in
 Windows
 Explorer).  File operations done in either domain tend to be
 reflected
 in the other domain automatically.
  
 Let $Eclipse/workspace denote my default Eclipse workspace.
 (By default, Eclipse will create this in its own installation
 directory,
 but I pointed mine elsewhere.)
  
 C1.   

Re: JESS: Jess IDE - Eclipse plug-in

2003-07-30 Thread emmanuel lecharny
Don't worry ! You don't have to bind anything by yourself, it's already an
Eclipse 2.1 feature (Window - preference - Workspace - Editor -Key Binding
- emacs).

Just a perfect tool!

Quoting [EMAIL PROTECTED]:

  
  emmanuel lecharny [EMAIL PROTECTED] writes:
  
   Eclipse will probably become the 21st century's emacs ...
  
  Can you bind your keystrokes to be similar to emacs' ?
  
myriam
  
  
  To unsubscribe, send the words 'unsubscribe jess-users
  [EMAIL PROTECTED]'
  in the BODY of a message to [EMAIL PROTECTED], NOT to the list
  (use your own address!) List problems? Notify
  [EMAIL PROTECTED]
  
  
  


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




Re: JESS: Jess IDE - Eclipse plug-in

2003-07-29 Thread emmanuel lecharny
Quoting [EMAIL PROTECTED]:

  That's exactly me!
  
  I'm sure Eclipse has all the bells and whistle of a good editor and
  worth knowing but I prefer to have an editor I can count on being
  there over the years and across many languages. I use the beanshell 
  in emacs to test Java snippets as an interpreter and that works well 
  for me. 

Eclipse won't change anything for you as it works directly with the files on
your filesystem. You can work on a file with emacs/vi/ed/wathever and regenerate
the workspace when/if you're back to eclipse. The Best from two differents world
for free !

Eclipse will probably become the 21st century's emacs ...


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




Re: JESS: Jess IDE - Eclipse plug-in

2003-07-23 Thread emmanuel lecharny
Hi,

consider that if you are using Jess as a part of a complete Java application
(especially if you are writing a J2EE compliant application), a Jess plugin is
just something that is very usefull. You don't have to switch to another UI to
develop/debug/tune your code, as it's fully a part of the IDE your are using
(Eclipse or WSAD, make your choice).

my .02 

Quoting [EMAIL PROTECTED]:

  Hi Folks,
  
  As you may know, Jess 7.0 (Charlemagne) is going to include a full
  complement of developer's tools -- a debugger, a smart editor, a rule
  database, an explorer, etc. I've been working on some of the
  technology that will go into these tools -- I have weak prototypes
  already, actually. Error checking as you type, smart completion,
  breakpoints, etc. It's pretty neat, actually, but really just a
  prototype.
  
  Originally, I had considered doing the Jess IDE as one or more Eclipse
  plug-ins. I weighed the advantages (lots of good tools to leverage) vs
  the disadvantages (big (60MB?) download for non-Eclipse users,
  additional support responsibilities for me, again for non-Eclipse
  users). I decided against it; although it would mean more work
  up-front to make the tools stand alone, it would require less work in
  the long run to support and maintain (or so my belief is.)
  
  Given the recent Eclipse discussions, though, I am reconsidering. Let
  me ask you all directly: Would you rather see a Jess IDE be a
  standalone thing, or an Eclipse plug-in? I'm more interested in
  hearing from people who think this is a BAD idea -- I already know
  that current Eclipse users will think it's a good one!
  
  -
  Ernest Friedman-Hill  
  Distributed Systems ResearchPhone: (925) 294-2154
  Sandia National LabsFAX:   (925) 294-2234
  PO Box 969, MS 9012 [EMAIL PROTECTED]
  Livermore, CA 94550 http://herzberg.ca.sandia.gov
  
  
  To unsubscribe, send the words 'unsubscribe jess-users
  [EMAIL PROTECTED]'
  in the BODY of a message to [EMAIL PROTECTED], NOT to the list
  (use your own address!) List problems? Notify
  [EMAIL PROTECTED]
  
  
  


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




Re: JESS: business rules: JESS v Versata v ILOG's JRules

2002-06-25 Thread emmanuel lecharny

Hi John,

I've used Jess  Ilog rules last year and found that JRules was less than 5% 
faster than Jess. Regarding that it was an old version of Jess (5.x), may be 
both products had evolved in a good direction, so it's not that easy to say 
right now which one is the best.

Ilog is bundled with an IDE and an integrated debugger, it's supposed to help 
you writing rules, but I don't think that it's an idea that is really 
important. When you're stuck in one hundred rules and ten thousands facts and 
your engine just don't give you the expected answer, a gallon of strong coffee, 
one full week-end and a clear brain are surely more helpfull! Marketing ...

I must say that I've used an abstract layer above those two products because my 
client didn't want to choose a product at the beginning of the project, so the 
rules where basically the same, and I didn't used any optimization that seems 
to be offered by Ilog.

Both of those two products are equally efficient, but I must admit that I 
prefer Jess, because its syntax is much more easy to understand, and it's 
easier to implement in a Java program. (it's cool to be able to import a txt 
file containing a rule !)

I don't know anything about Versata.

Just my 2 cents...

En réponse à John Norris [EMAIL PROTECTED]:

  Hi all,
  
  Does anyone have any observations regarding using JESS as a business
  rules engine (multi-user, on top of a SQL database)? Any thoughts on
  JESS v JRules or JESS v Versata?
  
  TIA,
  
  John
  
  
  
  
  To unsubscribe, send the words 'unsubscribe jess-users
  [EMAIL PROTECTED]'
  in the BODY of a message to [EMAIL PROTECTED], NOT to the list
  (use your own address!) List problems? Notify
  [EMAIL PROTECTED]
  
  
  



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





RE: JESS: publications / Forgy paper

2002-02-03 Thread Emmanuel Lecharny

I did made jeops work for a few semples. The way it works is that it
generates a Java program from the rules you provide. Of course, it's not
possible to add a rule on the fly, which is not cool as Jess, but it works
fine.

I'm pretty sure that I can found the sample I've compiled a year ago, and
post it to you next week.

Do you have a JRules sample of Manner 128 benchmark? It'll ease the test on
jeops.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of James C. Owen
Sent: vendredi 1 fevrier 2002 23:23
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: JESS: publications / Forgy paper


Exactamundo!  He (Dr. Forgy) is very protective about the Rete 2
algorithm.
Seems that he *had* to make the Rete algorithm public since it was funded by
the DOD when he was at CMU, but methinks that he wants to make some money
with
the Rete 2 algorithm.  The Rete 2 works on optimizing memory space thereby
increasing the speed.  Actually, he's working on a Rete 3 but I have no idea
what it is; only that it will make the process even faster than Rete 2.
Cool

However, I'll see if we can get his Rete Ph.D. thesis scanned and
published -
maybe this weekend.  If so, I'll send it to Dr. Friedman-Hill to publish on
the
PST site if he likes.  BTW, Dr. Forgy's email is [EMAIL PROTECTED], not
[EMAIL PROTECTED]  :-)

One other thing; I've been going over the various Java systems (Jess, OPSJ,
JRules, Advisor and JEOPS) the past couple of weeks and trying to run the
manners 128 benchmark on all of them using the same set of data  and,
basically, the same set of rules.  That way only the engine is the
difference
factor.  If anyone already has the JEOPS worked out, I would appreciate it
if
you would send it to me.  I got CLIPS and converted it straight over to
Jess -
which wasn't terribly difficult since they both seem to be be LISP oriented.
(Jim really hates LISP!  All those parentheses and special markers for
variables and just the jumbled way things are handled...)  And I already had
the code for OPSJ, Advisor and JRules.  JEOPS seems to be a different animal
since it is more Java-kinda oriented syntax.  Whatever.  Just a thought.

SDG
jco

-
James C. Owen
Senior KE
Knowledgebased Systems Corporation
6314 Kelly Circle
Garland, TX   75044
972.530.2895


[EMAIL PROTECTED] wrote:

 I think Oliver Hoffmann wrote:
  James,
 
  if you could scan Dr. Forgy's thesis and convert it to pdf, that would
be
  great :)
 
  is there also a publication on the Rete II algorithm?
  http://www.pst.com/
  claims that it would be much faster...

 Nope, it's unpublished and proprietary.

 -
 Ernest Friedman-Hill
 Distributed Systems ResearchPhone: (925) 294-2154
 Sandia National LabsFAX:   (925) 294-2234
 Org. 8920, MS 9012  [EMAIL PROTECTED]
 PO Box 969  http://herzberg.ca.sandia.gov
 Livermore, CA 94550

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



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




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





RE: JESS: anyboday have a free ware RETE implementation in Java

2001-11-14 Thread Emmanuel Lecharny



There 
is a free implementation (as far as I remember) called Jeops, but it's not as 
cool as jess (it's basically a pre-compiler, that generates Java 
Classes)

At 
least, it works... (I've tested it)

http://sourceforge.net/projects/jeops/

God is 
dead. Nietszche.
Nietszche is dead. God ;)

  -Original Message-From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Arman 
  AnwarSent: mardi 13 novembre 2001 21:31To: 
  [EMAIL PROTECTED]Subject: JESS: anyboday have a free ware RETE 
  implementation in Java
  Greetings, 
  I have been using JESS and CLIPS for a number of years in my academic work. 
  I have recently dicovered that one has to go through a lenghty form driven 
  process to get access to source code. 
  Annoyed by this I'm thinking of writing a barebones Rete engine that people 
  can use for writing expertsystems. It will have no-nonsense GPL type license 
  and no forms to fill out !!! 
  I waswondering if someone knew of a clean freeware RETE implementation that 
  I could use to start. I cannot use JESS as the licesnse does not permit it and 
  CLIPS is not the easiest to take inspiration from. 
  Any help would be grately appreciated. 
  Arman. 
   Bob Stewart [EMAIL PROTECTED] wrote: 
  Hi,I 
am looking for a way convert user-inputed rules into Jess rules. I am 
able to controlthe interface, but it is not trivial to convert the 
following user inputed statement:If ( (x=1) OR (fname=bo*)) Then 
(set priority=1).The problem I am having is that I am usingDr. 
Leff's XML integration, which turns XMLinto Jess facts. The facts look 
like:(Tag (TagName x) (Text 1))(Tag (TagName fname) (Text 
Bob))The rule would then need to look something 
like:(defrule Rule1(Tag (TagName x) (Text "1"))(Tag (TagName 
fname) (Text ?name:(call startswith?name "bo"))Has anyone 
worked on parsing readable user input intojess 
syntax?Thanks,Bob__Do 
You Yahoo!?Find the one for you at Yahoo! 
Personalshttp://personals.yahoo.com--! 
--To 
unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'in 
the BODY of a message to [EMAIL PROTECTED], NOT to the list(use your 
own address!) List problems? Notify 
[EMAIL PROTECTED]He, 
  Who is capable of attempting the absurd, Is capable of achieving the 
  impossible. 
  
  
  Do You Yahoo!?Find the one for you at Yahoo! Personals.


JESS: Nietzsche, was Nietszche ;(

2001-11-14 Thread Emmanuel Lecharny

Oops, sorry !!!

Quickly typed, quickly copy/pasted, what a zschame !!!

(btw, found on a wall of the Metro, in Paris)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Oliver Hoffmann
Sent: mercredi 14 novembre 2001 19:47
To: [EMAIL PROTECTED]
Subject: JESS: Nietzsche


Am 11/14/2001 7:11:45 PM, schrieb Emmanuel Lecharny [EMAIL PROTECTED]:
   God is dead. Nietszche.
   Nietszche is dead. God ;)

my personal contribution to the correct spelling of German philosophers in
international email lists: Nietzsche

;) Oliver Hoffmann (still very much alive)




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




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





RE: JESS: Creating templates with nil default value using theJAVA API

2001-07-25 Thread Emmanuel Lecharny

Just using addSlot(Id, Funcall.NIL, ANY) should work in your case (this
is the way jess do when it parses a deftemplate slot without default value)

Emmanuel Lecharny, IKTEK
06 08 33 32 61, www.iktek.com http://www.iktek.com


-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De
la part de Mathieu Bonnet
Envoye : mercredi 25 juillet 2001 11:31
A : [EMAIL PROTECTED]
Objet : JESS: Creating templates with nil default value using the JAVA
API


Hi,

I'm using the JAVA API to create templates but I can't manage to get nil
as a default value.
There isn't any example with nil as a default value in section 4 of the
user manual.

I tried to use
addSlot(Id,new Value(null, RU.INTEGER), INTEGER) or
addSlot(Id, null, INTEGER)
but both don't work.

I'm using Jess60a2.

Could you give me some hints ?
(how to get a nil atom in Java or how to create a slot with no default
value)

Thanks in advance,

Regards,

  Mathieu BONNET

--
Mathieu BONNET
NAL Intern
Tel: 2549

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


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




JESS: in strings

2001-06-20 Thread Emmanuel Lecharny

Hi,

just a question about strings and  : I want to store a string and fetch it
from a Java program. This string contains some , as it is a subset of HTML
tags (ie : a href=link ...)

I bound a variable to this string : (bind ?a a href \link\) and stored
it : (store a-tag ?a)

If I printout it : (printout t ?a t) , I get : a href=link, which is
what I'm waiting for. But in my java program, when I fetch this a-tag, I get
a href=\link\.

I must admit that I fetch somtehing that IS a string but that could be
something else, so I tried just to toString the value I got. This is the
point, as if I use the stringValue method, I just get what I expected, but
as I don't really know (in this part of my program) if it will be a String
or a float, I prefer to send the result as a String to the caller.

In the Value class, the toString transform a String by adding a \ before
each  :

  case RU.STRING:
return \ + escape((String) m_objectval) + \;

Is this a normal behavior? does it have an impact if the String is not
escaped?

Emmanuel Lecharny, IKTEK
06 08 33 32 61, www.iktek.com http://www.iktek.com


-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De
la part de [EMAIL PROTECTED]
Envoye : mercredi 20 juin 2001 16:18
A : Jess Mailing List
Objet : JESS: Progress report


Hi Folks,

Thought I would let you in on my current activities and the release
plan for Jess 6.0a7.

One of the major features in my original plan for Jess 6 was fully
nestable, tree-structured rule left-hand-sides: (and), (or), and (not)
conditional element groups could be used to build complex logical
structures. Given the way Jess is designed, this turned out to be
harder than I thought. Many of you know that there have been
undocumented (and) and (or) conditional elements in Jess 6 for several
releases now. They worked well in simple cases, but didn't work well
when combined with (not) and (exists) CEs.

For the 6.0a7 release, the original plan is finally realized. I have
fully nestable CEs working perfectly -- right now all that's left to do
is to update the documentation. This will be done in short order, so
you can expect to see Jess 6.0a7 come out next week sometime.



-
Ernest Friedman-Hill
Distributed Systems ResearchPhone: (925) 294-2154
Sandia National LabsFAX:   (925) 294-2234
Org. 8920, MS 9012  [EMAIL PROTECTED]
PO Box 969  http://herzberg.ca.sandia.gov
Livermore, CA 94550

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

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




RE: JESS: in strings

2001-06-20 Thread Emmanuel Lecharny

Well, hmm, yes, this is what I actually use, and it works pretty well. I
didn't want to use it in the first place (the dark side of the force is
always tempting ;), but I must admit that it was a mistake.

Thanks a lot for the quick answer.

Emmanuel Lecharny, IKTEK
06 08 33 32 61, www.iktek.com http://www.iktek.com


-Message d'origine-
De : friedman_hill ernest j [mailto:[EMAIL PROTECTED]]
Envoye : mercredi 20 juin 2001 20:18
A : Emmanuel Lecharny
Cc : 'Jess Mailing List'
Objet : Re: JESS:  in strings


Value.stringValue() will convert almost any kind of Value to a String,
including floats, so why not use it?

  public String stringValue(Context c) throws JessException
  {
switch (m_type)
  {
  case RU.ATOM:
  case RU.STRING:
  case RU.VARIABLE:
  case RU.MULTIVARIABLE:
  case RU.SLOT:
  case RU.MULTISLOT:
return (String) m_objectval;
  case RU.INTEGER:
return String.valueOf(m_intval);
  case RU.FLOAT:
return String.valueOf(m_floatval);
  case RU.EXTERNAL_ADDRESS:
return m_objectval.toString();
  default:
throw typeError(stringValue, Not a string);
  }
  }

The string produced by Value.toString() is meant to be suitable for
writing out to a file and later reparsed; it's employed during
save-facts, for example.


I think Emmanuel Lecharny wrote:
 Hi,

 just a question about strings and  : I want to store a string and fetch
it
 from a Java program. This string contains some , as it is a subset of
HTML
 tags (ie : a href=link ...)

 I bound a variable to this string : (bind ?a a href \link\) and
stored
 it : (store a-tag ?a)

 If I printout it : (printout t ?a t) , I get : a href=link, which is
 what I'm waiting for. But in my java program, when I fetch this a-tag, I
get
 a href=\link\.

 I must admit that I fetch somtehing that IS a string but that could be
 something else, so I tried just to toString the value I got. This is the
 point, as if I use the stringValue method, I just get what I expected, but
 as I don't really know (in this part of my program) if it will be a String
 or a float, I prefer to send the result as a String to the caller.

 In the Value class, the toString transform a String by adding a \ before
 each  :

   case RU.STRING:
 return \ + escape((String) m_objectval) + \;

 Is this a normal behavior? does it have an impact if the String is not
 escaped?



-
Ernest Friedman-Hill
Distributed Systems ResearchPhone: (925) 294-2154
Sandia National LabsFAX:   (925) 294-2234
Org. 8920, MS 9012  [EMAIL PROTECTED]
PO Box 969  http://herzberg.ca.sandia.gov
Livermore, CA 94550


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




RE: JESS: Stuck

2001-06-13 Thread Emmanuel Lecharny

D Typoes !!!

In your rule2_ReservationToCheckout rule you have days-requested instead
of days-required :

(defrule rule2_ReservationToCheckout
(current-name ?current-name)
  (reservation (start-date ?start-date)(days-required ?days-requested)
...

Emmanuel Lecharny, IKTEK
06 08 33 32 61, www.iktek.com http://www.iktek.com


-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De
la part de Michael McConnell
Envoye : mercredi 13 juin 2001 22:58
A : jess
Objet : JESS: Stuck


I know, I know -- rtfm.

I HAVE. I don't see it.

This problem probably doesn't need the scrutiny of Dr.
Friedman-Hill, but...

 I am completely mystified by whatever I am doing
wrong.

If anyone could be so kind as to degne to share a few
pearls with me, they will undoubledly attain much good
karma.


Jess (batch AVIS\\avis-proto.clp)
Jess reported an error in routine ValueVector.get
while executing (batch
AVIS\avis-rules-proto-rules.clp)
while executing (batch AVIS\avis-proto.clp).
  Message: Bad index -3 in call to get() on this
vector:  (name nil -1 loc nil -1 s
1 days-required nil -1 rate-type nil -1 res-num nil -1
car-group-name nil -1).
  Program text: ( batch AVIS\avis-proto.clp )  at line
1.
at jess.ValueVector.get(Unknown Source)
at jess.Deftemplate.getSlotType(Unknown
Source)
at jess.Jesp.a(Unknown Source)
at jess.Jesp.int(Unknown Source)
at jess.Jesp.case(Unknown Source)
at jess.Jesp.do(Unknown Source)
at jess.Jesp.char(Unknown Source)
at jess.Jesp.parse(Unknown Source)
at jess.Batch.batch(Unknown Source)
at jess.Batch.call(Unknown Source)
at jess.d2.a(Unknown Source)
at jess.Funcall.execute(Unknown Source)
at jess.Jesp.a(Unknown Source)
at jess.Jesp.char(Unknown Source)
at jess.Jesp.parse(Unknown Source)
at jess.Batch.batch(Unknown Source)
at jess.Batch.call(Unknown Source)
at jess.d2.a(Unknown Source)
at jess.Funcall.execute(Unknown Source)
at jess.Jesp.a(Unknown Source)
at jess.Jesp.char(Unknown Source)
at jess.Jesp.parse(Unknown Source)
at jess.Main.execute(Unknown Source)
at jess.Main.main(Unknown Source)
Jess

-
rules.clp file attached.

Regards.

Michael


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/


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




RE: JESS: Undefined variable referenced

2001-05-28 Thread Emmanuel Lecharny

Hi,

that's strange, because it's working on a jess 6.0a5 version. Are you using
this version? :

C:\Jessjava -classpath . jess/Main

Jess, the Java Expert System Shell
Copyright (C) 1998 E.J. Friedman Hill and the Sandia Corporation
Jess Version 6.0a5 3/12/2001

Jess (deftemplate AA (slot name) (slot n2))
TRUE
Jess (defrule tt (AA (name ?name) (n2 ?n2~?name)) = (printout t diff
crlf))
TRUE
Jess (assert (AA (name aa) (n2 bb)))
Fact-0
Jess (run)
diff
1
Jess (assert (AA (name aa) (n2 aa)))
Fact-1
Jess (run)
0
Jess

Emmanuel Lecharny, IKTEK
06 08 33 32 61, www.iktek.com http://www.iktek.com


-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De
la part de Thomas Gentsch
Envoye : samedi 26 mai 2001 14:58
A : Jess
Objet : JESS: Undefined variable referenced



Hello there,

discovered some behavior, which doesn't make sense to me:

(defrule warn-if-low
  (tank (name ?name) (another_name ?n2~?name) (low TRUE) (intact TRUE))
...

If I do this Jess complains that I use ?name before defining it (the
beans are OK) - seems to be like a parser bug (?)
Does somebody know a fix/workaround besides changing the rule by adding
a (test (neq ?n2 ?name))

Thanks a lot,
tge

--

 Thomas Gentsch



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


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




RE: JESS: Problem with if and multiple expressions with userfunction call

2001-05-11 Thread Emmanuel Lecharny

My code is throwing an exception in the If.java class.

The reason is : the updateDB-my-fact returns null, which is not allowed in
the if function.

As if is a function, it searchs for the else function in its parameters.
Of couse, as my function returns null, Jess can't compare it with else, so
I obtain an exception.

Of course, my function could have returned a Value, but as far as it just
set a flag, it didn't. And it works well in the RHS part of other rules, so
this is a special case.

Guideline : a user-defined function MUST return a Value in order to be used
in a if expression.

Emmanuel Lecharny, IKTEK
06 08 33 32 61, www.iktek.com http://www.iktek.com


-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De
la part de [EMAIL PROTECTED]
Envoye : vendredi 11 mai 2001 13:24
A : =?iso-8859-1?Q?Emmanuel_L=E9charny?=
Cc : [EMAIL PROTECTED]
Objet : Re: JESS: Problem with if and multiple expressions with user
function call


The exception message Error during execution is what the
Funcall.execute() method says when a called Java function throws an
exception. In this case, the stack trace you get from catching the
JessException and printing it out isn't necessarily the most
informative one -- you want the exception object thrown by the Java
method. That exception, thrown by your Java function, would most
likely tell you what the problem is. So, when you write Java code to
work with Jess, you should handle JessExceptions something like this:


} catch (JessException re) {
if (re.getNextException() != null) {
System.out.println(re.toString());
System.out.print(\nNested exception is:\n);

System.out.print.println(re.getNextException().getMessage());
re.getNextException().printStackTrace(System.out);

} else
re.printStackTrace(m_rete.getErrStream());

If you make these changes, you'll probably find out right away what is
going wrong.



I think =?iso-8859-1?Q?Emmanuel_L=E9charny?= wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
 Hi,

 I have a problem when I use a multiple expression, in which I call a user
 function in a if-then-else statement :

 ... (rule)
 ?my-fact - (STUFF (value ?value))
   (CONTROL (current-value ?cv) (maximum ?max))
 =
  (bind ?new-value (+ ?cv ?value)
  (if (= ?new-value ?max)
   then
(modify ?my-fact (state 4) (value ?new-value))
(updateDB-my-fact ?my-fact-id 4 ?new-value)
   else
(modify ?my-fact (state 2) (value ?new-value))
(updateDB-my-fact ?my-fact-id 2 ?new-value)
  )

 This is what I get (I don't know if I deserve it ;) :

 Jess reported an error in routine Funcall.execute
 while executing (if (= ?new-value ?max) then (modify-n ?my-fact
 External-Address:[I 4 External-Address:[I ?new-value)
 (updateDB-my-fact ?my-fact-id 4 ?new-value) else (modify-n ?my-fact
 External-Address:[I 2 External-Address:[I
  ?new-value) (updateDB-my-fact ?my-fact-id 2 ?new-value))
 while executing defrule my-rule.
   Message: Error during execution.
 at java.lang.Throwable.init(Throwable.java:84)
 at java.lang.Exception.init(Exception.java:35)
 at jess.JessException.init(JessException.java:53)
 at jess.Funcall.execute(Funcall.java:254)
 at jess.Defrule.fire(Defrule.java:205)
 at jess.Activation.fire(Activation.java:65)
 at jess.Agenda.run(Agenda.java:126)
 at jess.Agenda.run(Agenda.java:102)
 at jess.Rete.run(Rete.java:752)
 at com.Motor.treatMyStuff(Moteur.java:340)
 at java.lang.reflect.Method.invoke(Native Method)
 at
 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:242)
 at sun.rmi.transport.Transport$1.run(Transport.java:155)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:152)
 at
 sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:462)
 at

sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:6
 62)
 at java.lang.Thread.run(Thread.java:498)

 updateDB-my-fact is a Java function, which work perfectly well if I call
it
 outside the then or else part. A workaround I found is something like :

 ...
  (if (= ?new-value ?max)
   then
(modify ?my-fact (state 4) (value ?new-value))
(bind ?new-state 4)
   else
(modify ?my-fact (state 2) (value ?new-value))
(bind ?new-state 2)
  )

 (updateDB-my-fact ?my-fact-id ?new-state ?new-value)
 ...

 which works well.

 Emmanuel L_charny, IKTEK
 06 08 33 32 61, www.iktek.com




-
Ernest Friedman-Hill
Distributed Systems ResearchPhone: (925) 294-2154
Sandia National LabsFAX:   (925) 294-2234
Org. 8920, MS 9012  [EMAIL PROTECTED]
PO Box 969

RE: JESS: Error while creating new Rete() object from a servlet

2001-04-26 Thread Emmanuel Lecharny

Hi,

I think that addind c:\jess in your classpath will help (if of course Jess
has been installed on c:\).



Emmanuel Lecharny, IKTEK
06 08 33 32 61, www.iktek.com http://www.iktek.com


-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De
la part de Mona Marathe
Envoye : jeudi 26 avril 2001 08:38
A : [EMAIL PROTECTED]
Objet : JESS: Error while creating new Rete() object from a servlet


Hello!

We are new to using Jess. We have been trying to create a GUI for a
Jess-based application using a servlet. The Jess-based application is
written in Java and imports the Jess classes. For initial testing we had
written a main() function and tested it out simply. While integrating the
class (which creates a new Rete() object) with a servlet we got an initial
error at the stage
Rete a = new Rete();
Tracing through the error we discovered that the Batch function cannot
find the file LIBRARY_NAME = jess/scriptlib.clp. The file is very much
there. The problem is that the environment cannot figure out the right
path. Obviously some Jess-specific environment variable needs to be
set. Could anyone tell us what it is?

Thank you



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


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




RE: JESS: Re: Using definstance.

2001-04-12 Thread Emmanuel Lecharny

Hi,

didn't you forgot the defclass before the definstance? (8.38 in the doc :
"Creates a "shodow fact" representing the given Java objetc, according to
the named deftemplate (which SHOULD have come from defclass)"



Emmanuel Lecharny, IKTEK
06 08 33 32 61, www.iktek.com http://www.iktek.com


-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De
la part de chinnaswamy gounder
Envoye : jeudi 12 avril 2001 11:43
A : [EMAIL PROTECTED]
Cc : [EMAIL PROTECTED]
Objet : Re: JESS: Re: Using definstance.


Hi Ernest,

   I tried with the simple coding in order to use the
deinstance() method of the Rete class in Jess 6.0a5;
but resulting with errors.  Results and the coding
are:

Results:

It is dynamic

Class Name = A1obj

xxx
0
1000.0

Jess reported an error in routine
DefinstanceList.definstance.
Message: Unknown object class A1obj.

at
jess.DefinstanceList.definstance(DefinstanceList.java:149)

at jess.Rete.definstance(Rete.java:890)

at SampleDefinstance.main(SampleDefinstance.java:26)

Exception in thread "main" Process Exit...


Coding:

 import jess.Rete;
 import jess.Value;
 import jess.JessException;
 import jess.ReflectFunctions;
public class A1obj
 {

  public int kount;
  public double salary;
  public String name;

  A1obj()
  {
kount =0;
salary = 1000;
name = "xxx";
  }
 }

 public class SampleDefinstance
 {
 public static void main( String[] arg) throws
JessException
 {
boolean dynamic = true;
Rete rr = new Rete();
A1obj a1 = new A1obj();

String className   =  a1.getClass().getName();

if( dynamic )
System.out.println( "It is dynamic");
System.out.println( "Class Name = " + className );

System.out.println( a1.name + "\n"+a1.kount + "\n" +
a1.salary );

  Value vv = rr.definstance(className,a1,dynamic);

   }
}


Seeking advice on the above problem

Thanks and regards.

Chinnaswamy



--- [EMAIL PROTECTED] wrote:
 1) Section 4.6 in the Jess 6.x manual shows how to
 use a Funcall object
 to call definstance directly from Java.

 2) Starting with Jess 6.0a5, the Rete class has a
 definstance()
 function you can simply call as

 Rete r = ...
 r.definstance(tag, object, true|false);

 3) You can call definstance from Jess code, and
 instead of pushing the
 Java objects in from Java code, you can pull them in
 from Jess; for
 instance, provide a Java method for Jess to call
 which lists all the
 objects to be definstanced in a multifield.

 There are surely other ways to do it, too.


 I think chinnaswamy gounder wrote:
  Hi All,
  I have some 'objects' in java code and I
 want
  to put them into the knowledge base  using
 definstance
  Jess script function.
 
  ( definstaance tag  Java Object
 static|dynamic ).
 
  One way is tranferring the objects from java to
 jess
  by using store and fetch functions and then use
 the
  definstance function.
 
  Is there anyother means to chieve this java object
  transfer to jess.
 
  Advance thanks for your advice
 
  Chinnaswamy
 
 




-
 Ernest Friedman-Hill
 Distributed Systems ResearchPhone: (925)
 294-2154
 Sandia National LabsFAX:   (925)
 294-2234
 Org. 8920, MS 9012
 [EMAIL PROTECTED]
 PO Box 969
 http://herzberg.ca.sandia.gov
 Livermore, CA 94550


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

-



__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/

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


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




RE: JESS: User contributed software

2001-03-27 Thread Emmanuel Lecharny

Easy : just go to http://herzberg.ca.sandia.gov/jess/user.html, click on
JessWin GUI to download it.

You'll need a few steps, compiling it and launching it, but it's just a 5
minutes job, and it works perfectly well !!!

Emmanuel Lecharny, IKTEK

06 08 33 32 61, www.iktek.com http://www.iktek.com


-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De
la part de Matt Bishop
Envoye : mardi 27 mars 2001 20:01
A : Jess Mailing List; 'Bill Wheeler'
Objet : RE: JESS: User contributed software


...so where does one look at JessWin?  A url somewhere?  I am very
interested in having a look.

 __
 Matt Bishop - Engineering Manager, UpFront

 "The great thing about standards is that there are so many to choose
 from."

 --
 From: Bill Wheeler
 Reply To: Bill Wheeler
 Sent: Tuesday, March 27, 2001 9:09 AM
 To:   '[EMAIL PROTECTED]'; Jess Mailing List
 Subject:  RE: JESS: User contributed software

 Thanks Ernest!

 Shameless plug for my JessWin JessIDE: a close approximation to the
 ClipsWIN program from the Clips website.  Allows the tracking of facts,
 rules and the agenda.  Also has an editor.  Requires Jess60a5.  Enjoy!


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 27, 2001 9:19 AM
 To: Jess Mailing List
 Subject: JESS: User contributed software



 Just a quick note to say that I've posted three new entries on the
 "User Contributions" page at the Jess web site: David Li's Ant build
 file, Lawrence Leff's Jess/XML integration, and William Wheeler's
 JessWin Jess IDE.

 http://herzberg.ca.sandia.gov/jess/user.html .

 -
 Ernest Friedman-Hill
 Distributed Systems ResearchPhone: (925) 294-2154
 Sandia National LabsFAX:   (925) 294-2234
 Org. 8920, MS 9012  [EMAIL PROTECTED]
 PO Box 969  http://herzberg.ca.sandia.gov
 Livermore, CA 94550

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



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


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




Re: JESS: Persistent facts

1999-10-21 Thread Emmanuel Lecharny

It could be very usefull, specially if you are using a very big number
of facts - that's my problem, actually (30 000 facts and more). 

The 'special template' stuff, (cf  Burke message) could be a good
approach, but that drives to something like overloading every access
method of the Fact class in the engine (from getSlotValue to
getStaticSlotValue). Otherwise, extending Fact class from  something
else than ValueVector (a database access class) is another way.

The big issue is how to manage new facts: you have to be 'signaled' by
the databse when a new facts has been inserted - or modified -.
Considering you are instanciating an engine to work on a set of facts,
may be that's not a problem for you, but it's a static approach to
this problem. The database is just another way to store these facts
without experiencing memory boudary problems (java -mx1024M -ms1024M
jess/Main is not always a solution :))

Another boring point is the way the engine is working : Rules are
activated by Facts, and with a very big database, it could be very
time -and memory - consuming (you browse the whole database to
activate each eligible rule, which mean that you store this
information ( rules (R1, R2, ... Rm) have been activated by  fact (f1,
f2, ..., fn)) in memory. very very costly :(
The more you have facts, the more it costs.

Anyway, I buy the Idea.

Emmanuel Lécharny 
tel : 01 71 00 68 00
www.imediation.com

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