But if Jess already has a Java API to access Jess constructs, is it not
a waist of time to parse JessML? JAXB would create another API to access
JessML content objects!

Again, do you not recommend the use of Jess API to access the structure
of Jess rules?

Another way of looking at my goal would 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 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 Rete.listDefrules(), then
>> HasLHS.getConditionalElements(). The ConditionalElement interface and
>> its implementing classes are very undocumented.
>>
>> 1. Is this the only approach to do what I want, or is there an  
>> easier way?
>>     
>
> You might try parsing JessML and working with that; you could use  
> JAXB to create classes representing XML elements.
>
>
>   
>> 2. Are those classes undocumented because they are likely to change?
>>     
>
> Historically, they have changed a lot. Before Jess 7 has there was no  
> public API for this at all; now that the API is public, we'll be  
> trying not to break code that uses it, at least not too often. But we  
> don't really want to encourage their use.
>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Advanced Software Research          Phone: (925) 294-2154
> Sandia National Labs                FAX:   (925) 294-2234
> PO Box 969, MS 9012                 [EMAIL PROTECTED]
> Livermore, CA 94550                 http://www.jessrules.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]
> --------------------------------------------------------------------
>
>
>
>   

-- 
----- - - - - -  -  -  -  -  -   -   -
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 [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to