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

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

2013-05-21 Thread Henrique Lopes Cardoso
-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

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

2013-05-16 Thread Henrique Lopes Cardoso
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

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

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

Re: JESS: Nested not conditional element with slots referring to facts

2010-09-07 Thread Henrique Lopes Cardoso
solved? Thanks, Henrique Henrique Lopes Cardoso wrote: Hi again, In the sequel of this problem, I've fond another (possibly related) situation where the rule does not seem to compile correctly. I managed to simplify the example to the following rule: (defrule r3 (s

Re: JESS: Nested not conditional element with slots referring to facts

2010-09-07 Thread Henrique Lopes Cardoso
) ) ) (initial-fact) (test (= qwe asd)) = ... Alternatively you could move the test before the or. On Sep 7, 2010, at 5:10 AM, Henrique Lopes Cardoso wrote: Hi, Is there any update on this issue? Since I did not get any answer to my last question in the previous e-mail (below), I

Re: JESS: Nested not conditional element with slots referring to facts

2010-07-24 Thread Henrique Lopes Cardoso
- (a ?_021__blank_2) (not (b ?_0022_x = (printout t \sure thing!\ crlf)) On Jul 20, 2010, at 4:04 PM, Henrique Lopes Cardoso wrote: Actually, asserts do work, because (deffacts) are added to working memory by a call to (reset). This is wy I am calling (facts) before (run), to make sure

JESS: Java object inside slots -- checking matches

2010-07-12 Thread Henrique Lopes Cardoso
Hi, I have 2 deftemplates, each of which includes a slot with a Java object. I want to have a rule that fires when the objects inside those slots are equal. This is my implementation: (deftemplate t1 (slot o)) (deftemplate t2 (slot o)) (defrule r1 (t1 (o ?obj)) (t2 (o ?obj)) =

JESS: Checking status: backward-chaining or logical?

2010-07-02 Thread Henrique Lopes Cardoso
Hi, I was trying to figure out a way of checking the status of some system. To make things simpler, I have two kinds of facts, start and end, which are added along time: (deftemplate start) (deftemplate end) Then I want to say that I have an active system if it has started and not ended

JESS: Explicit pattern bindings when using dotted notation in slots with fact reference

2010-06-29 Thread Henrique Lopes Cardoso
Hi, I was strugling with the following code, until I remembered that rule activations are only affected when you assert/retract or modify facts that can match a rule's patterns. Anyway, I think I'd better share this problem and get further advice. ; I have 3 deftemplates: (deftemplate a (slot

Re: JESS: Explicit pattern bindings when using dotted notation in slots with fact reference

2010-06-29 Thread Henrique Lopes Cardoso
seems to provide an example where it is used in the LHS, although with a Java pattern. Henrique Ernest Friedman-Hill wrote: On Jun 29, 2010, at 6:42 AM, Henrique Lopes Cardoso wrote: Does this mean that when using dotted variables a pattern binding should always be included before

Re: JESS: Retract all facts belonging to Deftemplate

2009-02-09 Thread Henrique Lopes Cardoso
)) (deffunction retract-them-all () (bind ?result (run-query* get-them-all)) (while (?result next) (retract (?result get f)) ) ) Cheers, Henrique Wolfgang Laun wrote: On Mon, Feb 9, 2009 at 3:51 PM, Henrique Lopes Cardoso h...@fe.up.pt mailto:h...@fe.up.pt wrote: How about

Re: JESS: Test for null

2008-10-30 Thread Henrique Lopes Cardoso
], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] -- - - - - - - - - - - - - - Henrique Lopes Cardoso DEI/FEUP Rua Dr. Roberto Frias | 4200-465 Porto PORTUGAL (+351)225081400 ext

JESS: Exists CE and modify

2008-10-17 Thread Henrique Lopes Cardoso
Hi, After a whole morning struggling with what appeared to be a bug in my application, I managed to create a simple example: ;--- (deftemplate foo (slot bar) ) (defrule r (exists (foo)) = ) (reset) (assert (foo)) (printout t (run) crlf) (modify (fact-id 1) (bar 123)) (printout t

Re: JESS: Exists CE and modify

2008-10-17 Thread Henrique Lopes Cardoso
the other one). Are my thoughts correct? Cheers, Henrique Ernest Friedman-Hill wrote: On Oct 17, 2008, at 9:06 AM, Henrique Lopes Cardoso wrote: ;--- The rule fires in both runs. Is this the intended behavior? It's traditional behavior for Rete engines, yes. Is there a way to prevent

JESS: Rule comparing slot values that can be omitted

2008-07-03 Thread Henrique Lopes Cardoso
Hi, I have tried the straightforward example below. I define two simple deftemplates and a rule that compares their slots, which are assumed to be numeric. Then, I incidentally assert a fact on which I do not define a value for a slot. When the rule is evaluated (after the second assertion), I

JESS: Documentation bug for template properties

2008-06-26 Thread Henrique Lopes Cardoso
Hi, In the change history for 7.1RC1: Template properties (backchain-reactive, slot-specific) are inherited. In section 5.1 of the manual: A template inherits all the slots of its parent template, but none of its other characteristics. And in section 17.7: The backchain-reactive and

Re: JESS: Clues on the Crash-On-Save issue

2008-06-25 Thread Henrique Lopes Cardoso
7.0p2 plugins and not the betas, I have not locked-up (yet). Keep us posted on anything you find out! :-) Cheers, Jason On Mon, Mar 17, 2008 at 8:17 AM, Henrique Lopes Cardoso [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi all, After a morning starting with those annoying crashes

Re: JESS: Ruleml to Jess

2008-05-20 Thread Henrique Lopes Cardoso
Hi, I've just checked the link, which is in fact wrong. But I intuitively tried to change the target and it works: http://www.daml.org/2001/02/gedcom-ruleml/jess.xsl HTH, Henrique Juan Ondiviela wrote: I've been searching for a long time for a xsl translator from ruleml to jess rules until I

Re: JESS: Module auto-focus?

2008-03-18 Thread Henrique Lopes Cardoso
! Now in module-k Resuming focus stack in module-n 5 **/ Cheers, Jason On Fri, Mar 14, 2008 at 8:41 AM, Henrique Lopes Cardoso [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, Some time ago I discussed the possibility of using auto-focus in a module definition, instead of in each

Re: JESS: Clues on the Crash-On-Save issue

2008-03-17 Thread Henrique Lopes Cardoso
] -- - - - - - - - - - - - - - Henrique Lopes Cardoso DEI/FEUP Rua Dr. Roberto Frias | 4200-465 Porto PORTUGAL (+351)225081400 ext.1315 [EMAIL PROTECTED] | www.fe.up.pt/~hlc

JESS: Module auto-focus?

2008-03-14 Thread Henrique Lopes Cardoso
Hi, Some time ago I discussed the possibility of using auto-focus in a module definition, instead of in each single rule in a module. I was told that was not possible, but that it was a good idea. Are you planning to include this feature? This would be interesting especially when using modules

Re: JESS: jade jess example

2008-03-12 Thread Henrique Lopes Cardoso
Giannis -- --- Jason Morris Morris Technical Solutions LLC http://www.morris-technical-solutions.com -- - - - - - - - - - - - - - Henrique Lopes Cardoso DEI/FEUP Rua Dr. Roberto Frias | 4200-465 Porto PORTUGAL (+351)225081400

Re: JESS: Rules for detecting changes of a multislot

2008-02-20 Thread Henrique Lopes Cardoso
There is a small bug in the 'actually-remove-things-from-c' rule: (remove ?c ?b?) should be (remove ?c ?x) Anyway, is 'do-something-when-something-gets-removed-from-c' guaranteed to fire? If 'actually-remove-things-from-c' fires before, then 'do-something-when-something-gets-removed-from-c' will

Re: JESS: How Jess handles the time elapsed from a particular event

2008-02-20 Thread Henrique Lopes Cardoso
? Notify [EMAIL PROTECTED] -- - - - - - - - - - - - - - Henrique Lopes Cardoso DEI/FEUP Rua Dr. Roberto Frias | 4200-465 Porto PORTUGAL (+351)225081400 ext.1315 [EMAIL PROTECTED] | www.fe.up.pt/~hlc

JESS: Multiple fact or's

2008-02-15 Thread Henrique Lopes Cardoso
Hi, I have a rule looking like this: (defrule ?b1 - (t1 (s ?s1)) ?b2 - (t2 (s ?s2)) (or (test (eq ?s1 x)) (test (eq ?s2 x))) = ...) This example simplifies the general case. I may have any number of bindings, and the common slot 's' is checked to see if at least one of the bound

Re: JESS: Multiple fact or's

2008-02-15 Thread Henrique Lopes Cardoso
, at 9:28 AM, Henrique Lopes Cardoso wrote: (defrule ?b1 - (t1 (s ?s1)) ?b2 - (t2 (s ?s2)) (or (test (eq ?s1 x)) (test (eq ?s2 x))) = ...) This example simplifies the general case. I may have any number of bindings, and the common slot 's' is checked to see if at least one

JESS: Checking list equality

2008-02-13 Thread Henrique Lopes Cardoso
Hi, I was trying to test equality for lists seen as sets (elements with any order). Is there any direct function, or any solution simpler than this: (bind ?list1 (list 1 2 3)) (bind ?list2 (list 3 2 1)) (and (= (length$ ?list1) (length$ ?list2)) (= (length$ (union$ ?list1 ?list2)) (length$

Re: JESS: Checking list equality

2008-02-13 Thread Henrique Lopes Cardoso
@sandia.gov Sent: Wednesday, February 13, 2008 3:16 PM Subject: Re: JESS: Checking list equality You can apply (=) to more than 2 arguments. (= (length$ ?list1) (length$ ?list2) (length$ (union$ ?list1 ?list2))) kr Wolfgang Henrique Lopes Cardoso wrote: Hi, I was trying to test equality

JESS: Setting defaults

2008-02-11 Thread Henrique Lopes Cardoso
Hi, I was wondering if there is a way of setting a default value for a slot to be equal to another slot. Something like: (deftemplate foo (slot bar) (slot qwe (default-dynamic this.bar (assert (foo (bar 1))) Slot qwe would get the value of slot bar, that is, 1. Thanks. Henrique

JESS: Dot notation in patterns - performance issues

2008-02-06 Thread Henrique Lopes Cardoso
Hi, I am considering rewriting my rules to maximize the use of the dot notation in patterns. For instance: (deftemplate x (slot a) (slot b) (slot c)) (deftemplate y (slot a) (slot b)) (defrule r ?x - (x (a ?a) (b ?b) (c 1)) ?y - (y (a ?a) (b ?b)) = (printout t ?y matches ?x

Re: JESS: Problem with no-loop?

2007-12-21 Thread Henrique Lopes Cardoso
is activated once for each a fact, but when it fires the first time, the second activation is removed during the modify, and not put back because of the no-loop. On Dec 20, 2007 10:23 AM, Henrique Lopes Cardoso [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, This e-mail is a follow-up

JESS: Pattern matching with implicit slot variable

2007-12-21 Thread Henrique Lopes Cardoso
I just found a problem with pattern usage in rules. The following code works fine in Jess 70p1, but does not work with 71b1. Did I miss something in the change log? ;;; (deftemplate person (slot firstName) (slot lastName) (slot age)) (defrule teenager (person {age 12 age 20}

Re: JESS: Problem with no-loop?

2007-12-21 Thread Henrique Lopes Cardoso
Why does 'no-loop' have no effect in this case? :| Is there a conflict between both declarations? Henrique Lopes Cardoso wrote: I got to a possible solution, based on the answer you gave on another thread (related to pattern matching). This is what I have: ;;; (deftemplate foo (declare

JESS: Problem with no-loop?

2007-12-20 Thread Henrique Lopes Cardoso
Hi, This e-mail is a follow-up on the issue related to slot-specific that I discussed a couple of days ago. I am using Jess 71b1 I am trying to figure out how to properly use slot-specific and/or no-loop. I now got to the following simple example: ;;; (deftemplate foo (declare

JESS: Problem with slot-specific

2007-12-18 Thread Henrique Lopes Cardoso
Hi, Is the slot-specific declaration not inherited by a sub-deftemplate? I tested the following: ;;; (deftemplate D (declare (slot-specific TRUE)) (slot B)) (deftemplate D1 extends D) (defrule R1 ?d - (D1) = (printout t R1 modifying... crlf) (modify ?d (B 3))) (defmodule m)

Re: JESS: Problem with slot-specific

2007-12-18 Thread Henrique Lopes Cardoso
I would expect them to be. Henrique Ernest Friedman-Hill wrote: No, it's not inherited. Backchain-reactivity was never inheritable, either. Should they both be? On Dec 17, 2007, at 2:01 PM, Henrique Lopes Cardoso wrote: Hi, Is the slot-specific declaration not inherited by a sub

JESS: Function - documentation bug?

2007-11-09 Thread Henrique Lopes Cardoso
Hi, Using Jess 7.1a3 I get the following behaviour (the same with 7.0p1): Jess ( 1 2 3) TRUE Jess ( 1 2 2) FALSE Jess ( 1 1 2) FALSE Jess ( 1 2 1) TRUE But the documentation reads: Returns TRUE if the value of the first argument is not equal in value to all subsequent arguments; otherwise

Re: JESS: Jess editor

2007-10-12 Thread Henrique Lopes Cardoso
PROTECTED] On Behalf Of Henrique Lopes Cardoso Sent: Friday, June 29, 2007 7:29 AM To: jess-users@sandia.gov Subject: Re: JESS: Jess editor When saving a Jess file, Eclipse stops responding. I don't know if it helps, but after a forced close I get a log as attached to this e-mail

JESS: defqueries with bload - bug in Jess71a2

2007-07-20 Thread Henrique Lopes Cardoso
Hi, This problem got into my way when I upgraded to Jess71a2. There was no problem with 70p1. I have this Jess file: ;--- (deftemplate a (slot s1) (slot s2)) (defquery MAIN::q (declare (variables ?id)) ?z - (a (s1 ?id) (s2 ?s2))) (assert (a (s1 qwe) (s2 asd))) ;--- Now, if I batch() this

Re: JESS: Defmodule vs. defrule

2007-07-20 Thread Henrique Lopes Cardoso
, at 6:39 AM, Henrique Lopes Cardoso wrote: I am replying to an old post of mine. It referred to the absence of a method to undefine a module. Now I have just realized that in the JessEvent class there isn't a way of being notified of a DEFMODULE event. Why is that? It would seem to me

JESS: Userfunctions - memory leak?

2007-07-10 Thread Henrique Lopes Cardoso
Hi, I thought that this problem was solved before, but I am still getting it. I am using the stable version Jess70p1. If I remove a Userfunction and then add it again, it stops working and throws an exception. E.g.: //--- Rete jess = new Rete(); FileReader fr = new

JESS: Issues on JessEvents

2007-07-09 Thread Henrique Lopes Cardoso
Hi, 1. The JessEvent.getObject documentation is wrong: for a DEFRULE_FIRED event the object is an Activation, not a Defrule. 2. I have extended the Rete class, and have implemented both eventHappened(JessEvent) and aboutToFire(Activation). The thing is: when a rule fires, first I get the

Re: JESS: Problem with bload and System functions

2007-07-09 Thread Henrique Lopes Cardoso
of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] -- - - - - - - - - - - - - - Henrique Lopes Cardoso DEEC/FEUP Rua Dr. Roberto Frias | 4200-465

JESS: Problem with bload and System functions

2007-07-06 Thread Henrique Lopes Cardoso
(); jess.eval((System.currentTimeMillis)); It works fine if I read a .clp jess file using Jesp. Henrique -- - - - - - - - - - - - - - Henrique Lopes Cardoso DEEC/FEUP Rua Dr. Roberto Frias | 4200-465 Porto PORTUGAL (+351)225081400 ext.1315 [EMAIL PROTECTED] | www.fe.up.pt

Re: JESS: Problem with JessListener

2007-07-06 Thread Henrique Lopes Cardoso
a look at it. On Jul 5, 2007, at 8:08 AM, Henrique Lopes Cardoso wrote: No, that is not the case. I tried this: jel.assertString((qwe)); jel.retractString((qwe)); jel.assertString((qwe)); and it still doesn't work. I only get the retract event. There must

Re: JESS: Problem with JessListener

2007-07-05 Thread Henrique Lopes Cardoso
file that prevents some JessEvents from being notified? Henrique Jonathan Sewall wrote: I didn't extend Rete just to create a JessListener, but I did find that I needed to reregister my listeners after bload. Henrique Lopes Cardoso wrote: I am stumbling for some time now with the use

Re: JESS: Module and Concurrency

2007-07-05 Thread Henrique Lopes Cardoso
] -- - - - - - - - - - - - - - Henrique Lopes Cardoso DEEC/FEUP Rua Dr. Roberto Frias | 4200-465 Porto PORTUGAL (+351)225081400 ext.1315 [EMAIL PROTECTED] | www.fe.up.pt/~hlc

Re: JESS: Problem with JessListener

2007-07-05 Thread Henrique Lopes Cardoso
, Henrique Lopes Cardoso wrote: I just extended Rete to make the example simpler. I also tried it with an independent JessListener implementing class, but the problem is the same. I tried to do Rete.addJessListener() after bload, just as you suggested, but the problem remains. So, I ask again: what

JESS: Defmodule vs. defrule

2007-07-04 Thread Henrique Lopes Cardoso
about defrules, the same should be possible with defmodules. Henrique Henrique Lopes Cardoso wrote: friedman_hill ernest j wrote: I think Henrique Lopes Cardoso wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] Hello, I was looking for an undefmodule function in Jess

JESS: Problem with JessListener

2007-07-04 Thread Henrique Lopes Cardoso
I am stumbling for some time now with the use of a JessListener. After many tries, I figured out that the listener does not work properly when I bload() certain files. Since the Rete class implements JessListener, for ease of testing I extended it and got to the class below. From my experiences,

JESS: Jess editor

2007-06-28 Thread Henrique Lopes Cardoso
-- - - - - - - - - - - - - - Henrique Lopes Cardoso DEEC/FEUP Rua Dr. Roberto Frias | 4200-465 Porto PORTUGAL (+351)225081400 ext.1315 [EMAIL PROTECTED] | www.fe.up.pt/~hlc - - - - - - - - - - - - - To unsubscribe, send the words 'unsubscribe jess-users

JESS: On mark and resetToMark

2007-06-22 Thread Henrique Lopes Cardoso
Hi, I tried this at Jess prompt: (reset) (assert (a)) (bind ?m (engine mark)) (assert (b)) (engine resetToMark ?m) (facts) At the end, fact (b) is still there. Shouldn't it be retracted with resetToMark? Henrique To

JESS: Re: Real deftemplate of extended fact - Solved it!

2007-06-18 Thread Henrique Lopes Cardoso
qr = jess.runQueryStar(q, new ValueVector().add(1)); qr.next(); qr.get(x).factValue(engine.getGlobalContext()).getDeftemplate().getBaseName() Is there an easier way to do it? Henrique Henrique Lopes Cardoso wrote: Hi, I am trying to get the real deftemplate of a fact belonging to a sub

Re: [Fwd: Re: JESS: Browsing Rule LHS]

2007-06-15 Thread Henrique Lopes Cardoso
be to ask: is there an easy way of making a what-if analysis of rule-firing, i.e., of asking if this fact is asserted, what rule will fire? Henrique Henrique Lopes Cardoso wrote: Hi, I am trying to browse, through the Java API, the contents of a rule, to check when it might be applicable

JESS: Browsing Rule LHS

2007-06-14 Thread Henrique Lopes Cardoso
Hi, I am trying to browse, through the Java API, the contents of a rule, to check when it might be applicable by inspecting its LHS. This is supposed to be done before running the Rete engine, not during (i.e., I do not want to look for activations, or run-time pattern matches...). I started with

JESS: On Rete.listDefrules()

2007-06-13 Thread Henrique Lopes Cardoso
-- - - - - - - - - - - - - - Henrique Lopes Cardoso DEEC/FEUP Rua Dr. Roberto Frias | 4200-465 Porto PORTUGAL (+351)225081400 ext.1315 [EMAIL PROTECTED] | www.fe.up.pt/~hlc - - - - - - - - - - - - - To unsubscribe, send the words

JESS: JessML

2007-03-12 Thread Henrique Lopes Cardoso
Hi, I was browsing the JessML documentation. The example in 14.2.4 does not seem consistent with the explanation at 14.2.3: the value type should be an attribute, not an element. Henrique To unsubscribe, send the words

JESS: Tutorial on Integrating JADE and Jess

2007-03-07 Thread Henrique Lopes Cardoso
Hi, This is just to let you know that I prepared a tutorial on JADE and Jess integration, which is available here: http://jade.tilab.com/doc/tutorials/jade-jess/jade_jess.html Comments are welcome. Maybe a link could be added in Jess site... Cheers, Henrique

JESS: Jess editor

2007-02-09 Thread Henrique Lopes Cardoso
Hi, I have just installed Jess plugins for Eclipse, which seem to work fine. However, I also tried installing it with IBM Rational, which runs over Eclipse as well. I get an error message when I try to open a jess (.clp) file: Problems Opening Editor|Cannot open default editor on

Re: JESS: simple calculation problem

2007-01-31 Thread Henrique Lopes Cardoso
'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] -- - - - - - - - - - - - - - Henrique Lopes

Re: JESS: Jess Bug Hunt Update

2006-09-22 Thread Henrique Lopes Cardoso
Henrique Lopes Cardoso wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] Hi, Is there no way of getting (in Java) the deftemplates of a certain module? Looks like listDeftemplates() gets all deftemplates from all modules. But its jess equivalent, (list-deftemplates), includes

Re: JESS: Jess Bug Hunt Update

2006-09-21 Thread Henrique Lopes Cardoso
-- - - - - - - - - - - - - - Henrique Lopes Cardoso DEEC/FEUP Rua Dr. Roberto Frias | 4200-465 Porto PORTUGAL (+351)225574199 ext.3355 [EMAIL PROTECTED] | www.fe.up.pt/~hlc - - - - - - - - - - - - - To unsubscribe, send the words

JESS: Serializing Userfunctions

2006-09-21 Thread Henrique Lopes Cardoso
Hi, I was using bsave() and bload() with an engine that includes Java-implemented user-functions. Since these are not serializable, I was using removeUserfunction() to all Java-implemented functions before bsave()ing. The user functions would be re-defined after bload()ing. This approach got

Re: JESS: Code for my question about multiple threads and engines

2006-09-15 Thread Henrique Lopes Cardoso
] -- - - - - - - - - - - - - - Henrique Lopes Cardoso DEEC/FEUP Rua Dr. Roberto Frias | 4200-465 Porto PORTUGAL (+351)225574199 ext.3355 [EMAIL PROTECTED] | www.fe.up.pt/~hlc

JESS: Undefine a module

2006-07-31 Thread Henrique Lopes Cardoso
Hello, I was looking for an undefmodule function in Jess, but could not find it. How can I undefine a module? Does it need to be empty? That is, with no rules or facts? Thanks. Henrique -- - - - - - - - - - - - - - Henrique Lopes Cardoso DEEC/FEUP Rua Dr. Roberto Frias | 4200

Re: JESS: Ordering execution of a module

2006-07-24 Thread Henrique Lopes Cardoso
] -- - - - - - - - - - - - - - Henrique Lopes Cardoso DEEC/FEUP Rua Dr. Roberto Frias | 4200-465 Porto PORTUGAL (+351)225574199 ext.3355 [EMAIL PROTECTED] | www.fe.up.pt/~hlc

Re: JESS: String to Symbol

2005-11-03 Thread Henrique Lopes Cardoso
How about: (bind ?string (call string1 concat string2)) (bind ?symbol (sym-cat ?string)) (build (str-cat (assert ( ?symbol 10 Henrique --- [EMAIL PROTECTED] wrote: I am sorry, I should have been more detailed. What I want to do is somethink like this: (bind ?string (call string1 concat

Re: JESS: Converting from/to strings

2005-10-25 Thread Henrique Lopes Cardoso
stuff). That code is expecting a string in a particular slot, which is why I was trying to convert a certain fact to a string. Otherwise I would have to change the code... May be that is a good thing to do! Henrique [EMAIL PROTECTED] wrote: I think Henrique Lopes Cardoso wrote: (defrule r1

JESS: Converting from/to strings

2005-10-21 Thread Henrique Lopes Cardoso
Hi, I have two problems. --- The first: I have a string which contains an atom. How do I convert it to an atom? I tried this,which works: (bind ?string henrique) (nth$ 1 (explode$ ?string)) Is there a simpler way? --- The second: How do I convert a fact-id into a string? This

JESS: Using multifields in LHS

2005-10-20 Thread Henrique Lopes Cardoso
Hi, I am having trouble in getting to multifields and strings. I was trying to evaluate the contents of a string in a rule's LHS: (assert (a nice string)) (defrule r1 (a ?x) ?s - (explode$ ?x) ?s - (nice ?what) = (printout t ?what crlf) ) I know I cannot do this. But I cannot

Re: JESS: Using not and and

2005-10-19 Thread Henrique Lopes Cardoso
--- [EMAIL PROTECTED] wrote: I think Henrique Lopes Cardoso wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] Hello, I was trying to do something like this: As is often the case, details matter. There's nothing wrong with the code you've shown; if there's a problem, it's

Re: JESS: Facts and modules

2005-09-30 Thread Henrique Lopes Cardoso
definition (e.g. (deftemplate m::the-facts ...)), if that module is the current module, is irrelevant. Thanks. Henrique [EMAIL PROTECTED] wrote: I think Henrique Lopes Cardoso wrote: In the Jess documentation (more specifically in The Jess Language section) the following is written

RE: JESS: Defining rules based on facts subcontents

2005-02-11 Thread Henrique Lopes Cardoso
Yes, Timothy's solution worked out. However, Ernest's one had a small problem (corrected below): ;--- (deftemplate said (slot who) (slot content)) (deftemplate content (multislot payed)) (defrule payments (said (who ?w) (content ?content)) ?content - (content (payed ?payer ?amount

JESS: Using modules

2005-02-11 Thread Henrique Lopes Cardoso
the fact in MAIN? I would like to avoid this for organizational purposes (using modules as contexts). Thanks, Henrique Lopes Cardoso To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message

JESS: Defining rules based on facts subcontents

2005-02-10 Thread Henrique Lopes Cardoso
Hi, I want to define a rule based on the contents of a fact. For instance: (defrule payments (said ?who (payed ?payer ?amount ?receiver ?when) ?) = (assert (ifact (payment ?amount ?receiver ?time))) Can I do this? Or must I define a deftemplate: (deftemplate said (slot

JESS: Creating modules inside rules

2005-02-10 Thread Henrique Lopes Cardoso
Hi, Is it possible to create modules in the RHS of a rule? Something like: (defrule new-contract (deal ?ctid ?contents) = (defmodule ?ctid) (assert (contract ?contents)) ) Thanks. Henrique

RE: JESS: Defining rules based on facts subcontents

2005-02-10 Thread Henrique Lopes Cardoso
@sandia.gov Subject: Re: JESS: Defining rules based on facts subcontents I can't say I understand what you're asking, exactly, but I think the answer is no, you have to define a deftemplate. I think Henrique Lopes Cardoso wrote: Hi, I want to define a rule based on the contents of a fact

Re: JESS: Defining rules based on facts subcontents

2005-02-10 Thread Henrique Lopes Cardoso
Henrique Lopes Cardoso wrote: Let me simplify my question. I was trying to do something like: (deftemplate said (slot who) (slot content) ) (defrule payments (said (who ?w) (content (payed ?payer ?amount ?receiver ?when))) (authority ?w) = (assert (payment-done

Re: JESS: Defining rules based on facts subcontents

2005-02-10 Thread Henrique Lopes Cardoso
The binding does not work! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: quinta-feira, 10 de Fevereiro de 2005 19:24 To: jess-users@sandia.gov Subject: Re: JESS: Defining rules based on facts subcontents I think Henrique Lopes