Re: JESS: Defmodule vs. defrule
Isn't a (defmodule X) just a way of setting the default namespace for templates, facts, queries and rules? This, then, means that the execution of a (defmodule X) doesn't really imply that a module has come into existence. (Or does it create an empty module X and does (focus X) achieve anything useful?) Anyway, the point I'm trying to make is that only the arrival of some template/fact/query/rule of some module M really establishes that module M as a useful object. And since it is possible to override the default module name only a look at the full name of some new template/fact/query/rule will tell which module this item belongs to. Deleting a module is extremely tricky and has - in the general case - many hidden snags: - If (delete-module M) is executed on the RHS of a rule M::r, what does this mean? - What if the deleted module is on the focus stack? Remove it silently, throw an exception,...? - Any fact or template or query from some module M1 can be referenced from a rule or query of some other module M2. Apart from some complex checking, what should happen if this is detected? - What if you have a (deftemplate M2::T2 extends M1::T1)? - ... kr Wolfgang Henrique Lopes Cardoso wrote: I believe this was the second time you give me this kind of answer :). But I don't see any improvements in Jess71a2... Can I expect undefmodule and module-related events to be added in the next alpha version? Thanks. Henrique 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: Defmodule vs. defrule
Exactly. And in fact, Jess doesn't even have an undeftemplate function yet, which would be a prerequisite. But undeftemplate is on the short list of things to do, and so is undefmodule. These will *probably* make the cut for 7.1. On Jul 23, 2007, at 3:28 AM, Wolfgang Laun wrote: Isn't a (defmodule X) just a way of setting the default namespace for templates, facts, queries and rules? This, then, means that the execution of a (defmodule X) doesn't really imply that a module has come into existence. (Or does it create an empty module X and does (focus X) achieve anything useful?) Anyway, the point I'm trying to make is that only the arrival of some template/fact/query/rule of some module M really establishes that module M as a useful object. And since it is possible to override the default module name only a look at the full name of some new template/fact/query/rule will tell which module this item belongs to. Deleting a module is extremely tricky and has - in the general case - many hidden snags: - If (delete-module M) is executed on the RHS of a rule M::r, what does this mean? - What if the deleted module is on the focus stack? Remove it silently, throw an exception,...? - Any fact or template or query from some module M1 can be referenced from a rule or query of some other module M2. Apart from some complex checking, what should happen if this is detected? - What if you have a (deftemplate M2::T2 extends M1::T1)? - ... kr Wolfgang Henrique Lopes Cardoso wrote: I believe this was the second time you give me this kind of answer :). But I don't see any improvements in Jess71a2... Can I expect undefmodule and module-related events to be added in the next alpha version? Thanks. Henrique 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 owner-jess- [EMAIL PROTECTED] - Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National LabsFAX: (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]
Re: JESS: Defmodule vs. defrule
I believe this was the second time you give me this kind of answer :). But I don't see any improvements in Jess71a2... Can I expect undefmodule and module-related events to be added in the next alpha version? Thanks. Henrique Ernest Friedman-Hill wrote: That could be added. On Jul 4, 2007, 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 that just as it is possible to add/remove/be notified 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, but could not find it. How can I undefine a module? Does it need to be empty? That is, with no rules or facts? There isn't one. I could record this as a request for enhancement; can you explain why it would be useful? In my system, modules can be created at run-time in the RHS of rules, and rules are added to them. A module has a lifetime at the end of which it should be removed. Therefore, I would appreciate if I could have an undefmodule function. A shorter answer to your question would be: why is the undefrule useful? Thanks. Henrique - Ernest Friedman-Hill Advanced Software Research Phone: (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] -- - - - - - - - - - - - - - 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] - Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National LabsFAX: (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]
Re: JESS: Defmodule vs. defrule
That could be added. On Jul 4, 2007, 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 that just as it is possible to add/remove/be notified 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, but could not find it. How can I undefine a module? Does it need to be empty? That is, with no rules or facts? There isn't one. I could record this as a request for enhancement; can you explain why it would be useful? In my system, modules can be created at run-time in the RHS of rules, and rules are added to them. A module has a lifetime at the end of which it should be removed. Therefore, I would appreciate if I could have an undefmodule function. A shorter answer to your question would be: why is the undefrule useful? Thanks. Henrique - Ernest Friedman-Hill Advanced Software Research Phone: (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] -- - - - - - - - - - - - - - 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 owner-jess- [EMAIL PROTECTED] - Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National LabsFAX: (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]