Re: [rules-users] Expert Systems and Functional programming?
I usually try to attend RuleML meet ups and Intellifest (ex October Rules Fest) there you meet all the Expert System community. Cheers On Fri, Mar 15, 2013 at 5:43 PM, Grant Rettke gret...@acm.org wrote: Who are the primary researchers of expert-systems today? On Tue, Mar 12, 2013 at 8:21 PM, Mark Proctor mproc...@codehaus.org wrote: Actually Pamela is one of the papers I've been trying to track down, can't get it on the internet any more. As I first saw it referenced in Production matching for large learning systems. You don't by chance have the paper still? Barachini, F. (1991) The evolution of PAMELA. Expert Systems, 8(2):87-98 I'm building up a collection of relevant research papers, over at mendelay. That is one of my missing papers, that I've been unable to track: http://www.mendeley.com/groups/2918061/rule-systems/papers/ Mark On 12 Mar 2013, at 18:28, Wolfgang Laun wolfgang.l...@gmail.com wrote: Mark, no, the system I'm talking about is PAMELA, developed here in Vienna. You may find references to papers citing PAMELA, authored by F.Barachini and N.Theuretzbacher (one is referenced in the thesis you quoted, see [13]), but I doubt that you'l find one of the papers on the web. It was pre-internet days way back then :-) If you could produce an RBS ranking based on rules fired in production, I think that PAMELA would be in an excellent position. There's a three-digit number of installations by now, but they're running 24/7. -W On 12/03/2013, Mark Proctor mproc...@codehaus.org wrote: OPS83? http://repository.cmu.edu/cgi/viewcontent.cgi?article=2478context=compsci or YES/L1? (seems information on this is out of print and not online either) http://www.amazon.com/dp/B00070YQSU/ref=r_soa_w_d YES/L1: Integrating expert systems technology with traditional programming languages (Research Report RC. International Business Machines Inc. Research Division) I definitely find linq interesting, as it's straight out of the research pages from these projects - I wonder if the linq/database propel know about these... The first time I saw it was in this paper procedural match augments data-driven match http://www.aaai.org/Papers/AAAI/1986/AAAI86-037.pdf They move the lhs logic into the consequence block, using the actual when part as a simple goal trigger - allowing the 'lhs' to be used procedurally, like linq. This allows them to control when a rule is evaluated and that it's evaluation is atomic, and can have cleanup work done. Mark On 12 Mar 2013, at 06:04, Wolfgang Laun wolfgang.l...@gmail.com wrote: Indeed, this thesis mentions a few features of the system I was talking about :-) ([13]) -W On 11/03/2013, Mark Proctor mproc...@codehaus.org wrote: There were a number of research efforts that looked at combining procedural and rule base programming. This one is quite interesting: Combining Rule-Based and Procedural Programming in the XC and XE Programming Lanaugages http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.9.1106rep=rep1type=pdf Mark On 11 Mar 2013, at 18:03, Wolfgang Laun wolfgang.l...@gmail.com wrote: On 11 March 2013 16:19, Mark Proctor mproc...@codehaus.org wrote: So thinking really long term here. Can we build a java layer that provide all the rule functionality we need - but fit ontop of the java language neatly. We'd probably need to allow rule keyword and have it in Classes, at the method level. All class members and methods would be available to the rules in that class. There is this production rule system where you can write your rules embedded in compiling units, and alongside the legacy program units, of a procedural, modular, strongly type HLL, and where you use expressions in the language's own syntax in constraints... We've been using it ever since 1986. Rabbi Akiva was right, wasn't he ;-) -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Grant Rettke | ACM, AMA, COG, IEEE gret...@acm.org | http://www.wisdomandwonder.com/ Wisdom begins in wonder. ((λ (x) (x x)) (λ (x) (x x)))
Re: [rules-users] Expert Systems and Functional programming?
There hasn't been a lot of expert system engine research since 1995: http://blog.athico.com/2012/05/drools-54-artificial-intelligence.html In general academics have focused more on the logic programming side, referred to as knowledge representation and reasoning. Developing formalised semantics to represent the world around us, and mappings between those representations. The mapping/layered aspect was a key aspect of he RIF standard. Examples of formalised representations would be Defeasible Logic, http://en.wikipedia.org/wiki/Defeasible_logic, and Description Logic, http://en.wikipedia.org/wiki/Description_logic. The engine which implements this is just a side note, and typically they target prolog. Take a look at the last 5 years of RuleML published papers, and you'll get a good idea. Academic engines of interest: Flora-2/XSB, jDrew, silk, opencyc, jess, openrdf, jena. I inlcude Jess in the above, which is actually still more popular than Drools in Academia - although it's not open source (only free for non-commercial use). OWL and semantic ontologies drives a lot of the engine implementation research these days. Mark On 15 Mar 2013, at 20:43, Grant Rettke gret...@acm.org wrote: Who are the primary researchers of expert-systems today? On Tue, Mar 12, 2013 at 8:21 PM, Mark Proctor mproc...@codehaus.org wrote: Actually Pamela is one of the papers I've been trying to track down, can't get it on the internet any more. As I first saw it referenced in Production matching for large learning systems. You don't by chance have the paper still? Barachini, F. (1991) The evolution of PAMELA. Expert Systems, 8(2):87-98 I'm building up a collection of relevant research papers, over at mendelay. That is one of my missing papers, that I've been unable to track: http://www.mendeley.com/groups/2918061/rule-systems/papers/ Mark On 12 Mar 2013, at 18:28, Wolfgang Laun wolfgang.l...@gmail.com wrote: Mark, no, the system I'm talking about is PAMELA, developed here in Vienna. You may find references to papers citing PAMELA, authored by F.Barachini and N.Theuretzbacher (one is referenced in the thesis you quoted, see [13]), but I doubt that you'l find one of the papers on the web. It was pre-internet days way back then :-) If you could produce an RBS ranking based on rules fired in production, I think that PAMELA would be in an excellent position. There's a three-digit number of installations by now, but they're running 24/7. -W On 12/03/2013, Mark Proctor mproc...@codehaus.org wrote: OPS83? http://repository.cmu.edu/cgi/viewcontent.cgi?article=2478context=compsci or YES/L1? (seems information on this is out of print and not online either) http://www.amazon.com/dp/B00070YQSU/ref=r_soa_w_d YES/L1: Integrating expert systems technology with traditional programming languages (Research Report RC. International Business Machines Inc. Research Division) I definitely find linq interesting, as it's straight out of the research pages from these projects - I wonder if the linq/database propel know about these… The first time I saw it was in this paper procedural match augments data-driven match http://www.aaai.org/Papers/AAAI/1986/AAAI86-037.pdf They move the lhs logic into the consequence block, using the actual when part as a simple goal trigger - allowing the 'lhs' to be used procedurally, like linq. This allows them to control when a rule is evaluated and that it's evaluation is atomic, and can have cleanup work done. Mark On 12 Mar 2013, at 06:04, Wolfgang Laun wolfgang.l...@gmail.com wrote: Indeed, this thesis mentions a few features of the system I was talking about :-) ([13]) -W On 11/03/2013, Mark Proctor mproc...@codehaus.org wrote: There were a number of research efforts that looked at combining procedural and rule base programming. This one is quite interesting: Combining Rule-Based and Procedural Programming in the XC and XE Programming Lanaugages http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.9.1106rep=rep1type=pdf Mark On 11 Mar 2013, at 18:03, Wolfgang Laun wolfgang.l...@gmail.com wrote: On 11 March 2013 16:19, Mark Proctor mproc...@codehaus.org wrote: So thinking really long term here. Can we build a java layer that provide all the rule functionality we need - but fit ontop of the java language neatly. We'd probably need to allow rule keyword and have it in Classes, at the method level. All class members and methods would be available to the rules in that class. There is this production rule system where you can write your rules embedded in compiling units, and alongside the legacy program units, of a procedural, modular, strongly type HLL, and where you use expressions in the language's own syntax in constraints... We've been using it ever since 1986. Rabbi Akiva was right, wasn't he ;-) -W ___ rules-users mailing
Re: [rules-users] Expert Systems and Functional programming?
Indeed, this thesis mentions a few features of the system I was talking about :-) ([13]) -W On 11/03/2013, Mark Proctor mproc...@codehaus.org wrote: There were a number of research efforts that looked at combining procedural and rule base programming. This one is quite interesting: Combining Rule-Based and Procedural Programming in the XC and XE Programming Lanaugages http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.9.1106rep=rep1type=pdf Mark On 11 Mar 2013, at 18:03, Wolfgang Laun wolfgang.l...@gmail.com wrote: On 11 March 2013 16:19, Mark Proctor mproc...@codehaus.org wrote: So thinking really long term here. Can we build a java layer that provide all the rule functionality we need - but fit ontop of the java language neatly. We'd probably need to allow rule keyword and have it in Classes, at the method level. All class members and methods would be available to the rules in that class. There is this production rule system where you can write your rules embedded in compiling units, and alongside the legacy program units, of a procedural, modular, strongly type HLL, and where you use expressions in the language's own syntax in constraints... We've been using it ever since 1986. Rabbi Akiva was right, wasn't he ;-) -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Expert Systems and Functional programming?
On 12 Mar 2013, at 02:10, Grant Rettke gret...@acm.org wrote: On Mon, Mar 11, 2013 at 10:19 AM, Mark Proctor mproc...@codehaus.org wrote: For instance here is an idea I've been mulling over recently (note just random ideas, not roadmap). We don't have the resources to completely compete against other languages, and I'm not sure we should do. With Java8 and 9 it starts to become a more compelling language. Java8 brings lambs and java9 solve the perm gen issue (so we can stop using MVEL, and just go pure code generation and not worry about blowing the perm gen). Could we create a system that better layers with java9? Any other JVM languages that would serve you well right now? Anyone that offers type safety. So Scala, Ceylon, Koitlin would all be contenders. Java is simply the lowest common denominator that reaches the widest possible mark. But as mentioned, base java is not enough - we'd need to layer property accessors on it. Mark ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Expert Systems and Functional programming?
OPS83? http://repository.cmu.edu/cgi/viewcontent.cgi?article=2478context=compsci or YES/L1? (seems information on this is out of print and not online either) http://www.amazon.com/dp/B00070YQSU/ref=r_soa_w_d YES/L1: Integrating expert systems technology with traditional programming languages (Research Report RC. International Business Machines Inc. Research Division) I definitely find linq interesting, as it's straight out of the research pages from these projects - I wonder if the linq/database propel know about these… The first time I saw it was in this paper procedural match augments data-driven match http://www.aaai.org/Papers/AAAI/1986/AAAI86-037.pdf They move the lhs logic into the consequence block, using the actual when part as a simple goal trigger - allowing the 'lhs' to be used procedurally, like linq. This allows them to control when a rule is evaluated and that it's evaluation is atomic, and can have cleanup work done. Mark On 12 Mar 2013, at 06:04, Wolfgang Laun wolfgang.l...@gmail.com wrote: Indeed, this thesis mentions a few features of the system I was talking about :-) ([13]) -W On 11/03/2013, Mark Proctor mproc...@codehaus.org wrote: There were a number of research efforts that looked at combining procedural and rule base programming. This one is quite interesting: Combining Rule-Based and Procedural Programming in the XC and XE Programming Lanaugages http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.9.1106rep=rep1type=pdf Mark On 11 Mar 2013, at 18:03, Wolfgang Laun wolfgang.l...@gmail.com wrote: On 11 March 2013 16:19, Mark Proctor mproc...@codehaus.org wrote: So thinking really long term here. Can we build a java layer that provide all the rule functionality we need - but fit ontop of the java language neatly. We'd probably need to allow rule keyword and have it in Classes, at the method level. All class members and methods would be available to the rules in that class. There is this production rule system where you can write your rules embedded in compiling units, and alongside the legacy program units, of a procedural, modular, strongly type HLL, and where you use expressions in the language's own syntax in constraints... We've been using it ever since 1986. Rabbi Akiva was right, wasn't he ;-) -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Expert Systems and Functional programming?
Mark, no, the system I'm talking about is PAMELA, developed here in Vienna. You may find references to papers citing PAMELA, authored by F.Barachini and N.Theuretzbacher (one is referenced in the thesis you quoted, see [13]), but I doubt that you'l find one of the papers on the web. It was pre-internet days way back then :-) If you could produce an RBS ranking based on rules fired in production, I think that PAMELA would be in an excellent position. There's a three-digit number of installations by now, but they're running 24/7. -W On 12/03/2013, Mark Proctor mproc...@codehaus.org wrote: OPS83? http://repository.cmu.edu/cgi/viewcontent.cgi?article=2478context=compsci or YES/L1? (seems information on this is out of print and not online either) http://www.amazon.com/dp/B00070YQSU/ref=r_soa_w_d YES/L1: Integrating expert systems technology with traditional programming languages (Research Report RC. International Business Machines Inc. Research Division) I definitely find linq interesting, as it's straight out of the research pages from these projects - I wonder if the linq/database propel know about these… The first time I saw it was in this paper procedural match augments data-driven match http://www.aaai.org/Papers/AAAI/1986/AAAI86-037.pdf They move the lhs logic into the consequence block, using the actual when part as a simple goal trigger - allowing the 'lhs' to be used procedurally, like linq. This allows them to control when a rule is evaluated and that it's evaluation is atomic, and can have cleanup work done. Mark On 12 Mar 2013, at 06:04, Wolfgang Laun wolfgang.l...@gmail.com wrote: Indeed, this thesis mentions a few features of the system I was talking about :-) ([13]) -W On 11/03/2013, Mark Proctor mproc...@codehaus.org wrote: There were a number of research efforts that looked at combining procedural and rule base programming. This one is quite interesting: Combining Rule-Based and Procedural Programming in the XC and XE Programming Lanaugages http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.9.1106rep=rep1type=pdf Mark On 11 Mar 2013, at 18:03, Wolfgang Laun wolfgang.l...@gmail.com wrote: On 11 March 2013 16:19, Mark Proctor mproc...@codehaus.org wrote: So thinking really long term here. Can we build a java layer that provide all the rule functionality we need - but fit ontop of the java language neatly. We'd probably need to allow rule keyword and have it in Classes, at the method level. All class members and methods would be available to the rules in that class. There is this production rule system where you can write your rules embedded in compiling units, and alongside the legacy program units, of a procedural, modular, strongly type HLL, and where you use expressions in the language's own syntax in constraints... We've been using it ever since 1986. Rabbi Akiva was right, wasn't he ;-) -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Expert Systems and Functional programming?
Actually Pamela is one of the papers I've been trying to track down, can't get it on the internet any more. As I first saw it referenced in Production matching for large learning systems. You don't by chance have the paper still? Barachini, F. (1991) The evolution of PAMELA. Expert Systems, 8(2):87-98 I'm building up a collection of relevant research papers, over at mendelay. That is one of my missing papers, that I've been unable to track: http://www.mendeley.com/groups/2918061/rule-systems/papers/ Mark On 12 Mar 2013, at 18:28, Wolfgang Laun wolfgang.l...@gmail.com wrote: Mark, no, the system I'm talking about is PAMELA, developed here in Vienna. You may find references to papers citing PAMELA, authored by F.Barachini and N.Theuretzbacher (one is referenced in the thesis you quoted, see [13]), but I doubt that you'l find one of the papers on the web. It was pre-internet days way back then :-) If you could produce an RBS ranking based on rules fired in production, I think that PAMELA would be in an excellent position. There's a three-digit number of installations by now, but they're running 24/7. -W On 12/03/2013, Mark Proctor mproc...@codehaus.org wrote: OPS83? http://repository.cmu.edu/cgi/viewcontent.cgi?article=2478context=compsci or YES/L1? (seems information on this is out of print and not online either) http://www.amazon.com/dp/B00070YQSU/ref=r_soa_w_d YES/L1: Integrating expert systems technology with traditional programming languages (Research Report RC. International Business Machines Inc. Research Division) I definitely find linq interesting, as it's straight out of the research pages from these projects - I wonder if the linq/database propel know about these… The first time I saw it was in this paper procedural match augments data-driven match http://www.aaai.org/Papers/AAAI/1986/AAAI86-037.pdf They move the lhs logic into the consequence block, using the actual when part as a simple goal trigger - allowing the 'lhs' to be used procedurally, like linq. This allows them to control when a rule is evaluated and that it's evaluation is atomic, and can have cleanup work done. Mark On 12 Mar 2013, at 06:04, Wolfgang Laun wolfgang.l...@gmail.com wrote: Indeed, this thesis mentions a few features of the system I was talking about :-) ([13]) -W On 11/03/2013, Mark Proctor mproc...@codehaus.org wrote: There were a number of research efforts that looked at combining procedural and rule base programming. This one is quite interesting: Combining Rule-Based and Procedural Programming in the XC and XE Programming Lanaugages http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.9.1106rep=rep1type=pdf Mark On 11 Mar 2013, at 18:03, Wolfgang Laun wolfgang.l...@gmail.com wrote: On 11 March 2013 16:19, Mark Proctor mproc...@codehaus.org wrote: So thinking really long term here. Can we build a java layer that provide all the rule functionality we need - but fit ontop of the java language neatly. We'd probably need to allow rule keyword and have it in Classes, at the method level. All class members and methods would be available to the rules in that class. There is this production rule system where you can write your rules embedded in compiling units, and alongside the legacy program units, of a procedural, modular, strongly type HLL, and where you use expressions in the language's own syntax in constraints... We've been using it ever since 1986. Rabbi Akiva was right, wasn't he ;-) -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Expert Systems and Functional programming?
There is, but you have to look at things slightly differently - and we have to really work on a new DRL to better support it, so it's all very experimental and bleeding edge. It's also probably more lambdas and closures than pure functions. Where I see lambdas helping is in creating meta control systems for expert systems, attaching functions to events handlers. I'd quite like to see C# style delegator operators, for compact ways of assigning event handlers. I'd then like to start exposing subsystems event models and life cycles in DRL, to have handlers added. These functions can have state (closures) and control how execution happens. I sketched a document some time ago on ideas going on in my head - it's very rough and much is already out of date on how I'd like to do it: https://community.jboss.org/wiki/RuleModule So for instance at the moment Drools has activation-group, which provides hard coded behaviour. What if instead we exposed the RuleModule (group) and it had events you could attach to onRuleAdded onRuleRemoved onBeforeRuleFired onAfterRuleFired I could add a function to onAfterRuleFired which would cancel all the other waiting rules. So I'd like to actually expose a RuleModule in DRL as declarable artefact (just a sketch, not working or compilable code) module MyModule { onAfterRuleFire() { conflictSet.cancelAll(); } } While the above is declaration based approach, it could use an api approach too getRuleModule( MyModule ).onAfterRuleFire += new RuleModuleEvent() { conflictSet.cancelAll(); } I'd more recently sketch out some ideas on controlling rule execution semantics - based on the DADO research paper for all instances to be fired. If you scroll down to the bottom, you can see a suggested life cycle for rule firings: https://community.jboss.org/wiki/RuleExecutionSemantics Other proposed life cycles: OnBeforeMatchFire Before a single Match instance is executed OnAfterMatchFire After a single Match instance is executed onBeforeAllFire Before any Matches in the set have fired onAfterAllFire After all Matches in the set have fired onDeleteMatch invoked when a Match is deleted (no longer true) onUpdateMatch invoked when a Match is updated onChangeMatch invoked when a Match is either updated or deleted I'm also starting to prefer the C# on prefix notation for events. I think as well instead of doing it initially in DRL, a lot can be done in pure Java with annotations used for wiring and discovery. We can replace or atleast more easily expose conflict handling and all the group stuff we have now. Note a lot of these events already exist, but they are more for observing. So it's all about re-looking at our events, and our sub systems, thinking about how they can be better exposed to create a meta system. @RuleModule( MyModule ) // RuleModule can be optional and inferred from class name. public class MyClassName { @ConflictSet private ConflictSet set; // Tells it to inject the conflict on instiation public void onAfterRuleFired(Match match) { set.canceAll() } } So over all our longer term research is looking into a meta expert system - that looks at better ways to expose sub systems and their life cycles and using event handlers to allow the user to control the behaviour. I also think we'll need a sort of macro system, to make this easily re-usable. If this is work you are interested in research, then please pop onto irc - we'll be happy to mentor. http://www.jboss.org/drools/irc Mark On 7 Mar 2013, at 20:44, Matteo Mortari matteo.mort...@gmail.com wrote: Ciao everybody, I have a question I would like to submit to this community, given Drools is my preferred choice for Expert Systems :) A quick background: I'm not an Expert Systems / Rule engines expert, but I'm a happy power user of Rules since my CS Engineering thesis, a paper published, and used it with happy results at work and hobby projects. Currently boarded on a new project with Rules+Processes at work, and still very happy, so happy, I'm using Drools again in a new hobby project. [semi-brag-mode off] Now, in recent times, I cannot ignore what (apparently) is a strong renaissance of Functional Programming, specifically all this momentum which Scala and Java 8's Lambda's are getting. The Question I'm asking myself: is there a specific, or few, areas where Functional Programming could actually benefit Expert Systems so much to actually spawn new paradigms of writing Rules? Or benefit in a new generation of the Rete algorithm? Or actually, Functional Programming will spawn a completely different paradigm of system which will go beyond Expert Systems the way are designed today? Ignore my rant if you feel it's too generic, but I really wanted to seize a chance to ask the question to this community :) Thank you for your feedback, Ciao, Matteo ___ rules-users
Re: [rules-users] Expert Systems and Functional programming?
On 11 Mar 2013, at 03:10, Grant Rettke gret...@acm.org wrote: On Thu, Mar 7, 2013 at 2:44 PM, Matteo Mortari matteo.mort...@gmail.com wrote: The Question I'm asking myself: is there a specific, or few, areas where Functional Programming could actually benefit Expert Systems so much to actually spawn new paradigms of writing Rules? Or benefit in a new generation of the Rete algorithm? Or actually, Functional Programming will spawn a completely different paradigm of system which will go beyond Expert Systems the way are designed today? Great question, very inspiring just to think of the possibilities. The biggest opportunity out there right now is for rules-engines to help bridge the artificial gap that exists between the so called fundamental models of computation for the different camps. For example, Java is a Turing style sequential language and Lisp is a Church style functional language. This shoe-horning of languages into different camps is arbitrary, boring, mentally restrictive, totally artificial, and offers little more benefits than easily separating books on a bookshelf at the bookstore. It is really, really sad to see the quelling of creativity and reduction of the beautiful parts of different computational models reduced into tiny, little, lonely camps that must live in isolation. Digging into rules engines is a pathway, albeit deeply unpopular, into another important form computational expression that never really got it's day in the sun like the biggies today. +1 :) I think the work in expert system tools is the only real paradigm shift going on. All others are just cross pollination of the same ideas. The downside is to get expert system tools to a level where we can compete easily, as a more general purpose tool, is very hard. Research expert system tools stopped in the mid 90s, due to the AI winter: http://blog.athico.com/2012/05/drools-54-artificial-intelligence.html We have plenty of ideas, the problem is in balancing trying to build a system suitable for production use - where people are conservative and don't like change - and a system which is constantly innovating. The other issue is in finding people willing to research these ideas with us. It's very easy for someone to get into scala or jruby or what ever and just start adding features. It's very hard in our case, because the change is too much, it's very hard for people to see how to apply what they already know to this new paradigm. For instance here is an idea I've been mulling over recently (note just random ideas, not roadmap). We don't have the resources to completely compete against other languages, and I'm not sure we should do. With Java8 and 9 it starts to become a more compelling language. Java8 brings lambs and java9 solve the perm gen issue (so we can stop using MVEL, and just go pure code generation and not worry about blowing the perm gen). Could we create a system that better layers with java9? We already want to drop dialects for DRL (it just makes things too hard to explain and write IDE tooling for). So the idea is to have a single language. This made me think of the Pizza language, which layered neatly ontop of java, and eventually became scala. http://pizzacompiler.sourceforge.net So thinking really long term here. Can we build a java layer that provide all the rule functionality we need - but fit ontop of the java language neatly. We'd probably need to allow rule keyword and have it in Classes, at the method level. All class members and methods would be available to the rules in that class. Can probably think of that containing class as a RuleModule. We'd have to rely on CDI and annotations for declarative wiring of member fields ( http://java.dzone.com/articles/cdi-di-p1). The biggest challenge would be in extending the java language to support LHS literals too (something I've wanted to do anyway) to provide LinQ style features, backed underneath by the Drools engine. A list of layered features might look like: 1) PropertyAccessors (doesn't look like java will ever add this, but DRL needs it to remain compact) 2) Type Inference (same as above, some argue that lack of contract design is a bad thing…..) 3) inline casts (needed for units, and keeps DRL compact) 4) when literals, like linq - but supports our entire LHS language. 5) rule keyword (similar at method level). We can use CDI to provide declarative injection of member variables. public class MyClass { @Inject public MyService service; // CDI injected service public void someMethod() { } rule xxx when { …. // normal LHS here. } then { service.call(…..) someMethod(); } } I won't cover LHS literals here, but look at reactive LinkQ, to get some ideas. There is a lot more to this idea of a layered language, and we can exploit annotations in all sorts of ways. Similar to my previous email on meta approach to building rule systems. We
Re: [rules-users] Expert Systems and Functional programming?
On 11 March 2013 16:19, Mark Proctor mproc...@codehaus.org wrote: So thinking really long term here. Can we build a java layer that provide all the rule functionality we need - but fit ontop of the java language neatly. We'd probably need to allow rule keyword and have it in Classes, at the method level. All class members and methods would be available to the rules in that class. There is this production rule system where you can write your rules embedded in compiling units, and alongside the legacy program units, of a procedural, modular, strongly type HLL, and where you use expressions in the language's own syntax in constraints... We've been using it ever since 1986. Rabbi Akiva was right, wasn't he ;-) -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Expert Systems and Functional programming?
There were a number of research efforts that looked at combining procedural and rule base programming. This one is quite interesting: Combining Rule-Based and Procedural Programming in the XC and XE Programming Lanaugages http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.9.1106rep=rep1type=pdf Mark On 11 Mar 2013, at 18:03, Wolfgang Laun wolfgang.l...@gmail.com wrote: On 11 March 2013 16:19, Mark Proctor mproc...@codehaus.org wrote: So thinking really long term here. Can we build a java layer that provide all the rule functionality we need - but fit ontop of the java language neatly. We'd probably need to allow rule keyword and have it in Classes, at the method level. All class members and methods would be available to the rules in that class. There is this production rule system where you can write your rules embedded in compiling units, and alongside the legacy program units, of a procedural, modular, strongly type HLL, and where you use expressions in the language's own syntax in constraints... We've been using it ever since 1986. Rabbi Akiva was right, wasn't he ;-) -W ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Expert Systems and Functional programming?
On Mon, Mar 11, 2013 at 10:19 AM, Mark Proctor mproc...@codehaus.org wrote: For instance here is an idea I've been mulling over recently (note just random ideas, not roadmap). We don't have the resources to completely compete against other languages, and I'm not sure we should do. With Java8 and 9 it starts to become a more compelling language. Java8 brings lambs and java9 solve the perm gen issue (so we can stop using MVEL, and just go pure code generation and not worry about blowing the perm gen). Could we create a system that better layers with java9? Any other JVM languages that would serve you well right now? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Expert Systems and Functional programming?
On Thu, Mar 7, 2013 at 2:44 PM, Matteo Mortari matteo.mort...@gmail.com wrote: The Question I'm asking myself: is there a specific, or few, areas where Functional Programming could actually benefit Expert Systems so much to actually spawn new paradigms of writing Rules? Or benefit in a new generation of the Rete algorithm? Or actually, Functional Programming will spawn a completely different paradigm of system which will go beyond Expert Systems the way are designed today? Great question, very inspiring just to think of the possibilities. The biggest opportunity out there right now is for rules-engines to help bridge the artificial gap that exists between the so called fundamental models of computation for the different camps. For example, Java is a Turing style sequential language and Lisp is a Church style functional language. This shoe-horning of languages into different camps is arbitrary, boring, mentally restrictive, totally artificial, and offers little more benefits than easily separating books on a bookshelf at the bookstore. It is really, really sad to see the quelling of creativity and reduction of the beautiful parts of different computational models reduced into tiny, little, lonely camps that must live in isolation. Digging into rules engines is a pathway, albeit deeply unpopular, into another important form computational expression that never really got it's day in the sun like the biggies today. New and interesting things will benefit all camps when they dig into the world of production systems and welcome it as a first class citizen to their programming toolbox. Would it result in new and great things? Who knows :). ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Expert Systems and Functional programming?
Ciao everybody, I have a question I would like to submit to this community, given Drools is my preferred choice for Expert Systems :) A quick background: I'm not an Expert Systems / Rule engines expert, but I'm a happy power user of Rules since my CS Engineering thesis, a paper published, and used it with happy results at work and hobby projects. Currently boarded on a new project with Rules+Processes at work, and still very happy, so happy, I'm using Drools again in a new hobby project. [semi-brag-mode off] Now, in recent times, I cannot ignore what (apparently) is a strong renaissance of Functional Programming, specifically all this momentum which Scala and Java 8's Lambda's are getting. The Question I'm asking myself: is there a specific, or few, areas where Functional Programming could actually benefit Expert Systems so much to actually spawn new paradigms of writing Rules? Or benefit in a new generation of the Rete algorithm? Or actually, Functional Programming will spawn a completely different paradigm of system which will go beyond Expert Systems the way are designed today? Ignore my rant if you feel it's too generic, but I really wanted to seize a chance to ask the question to this community :) Thank you for your feedback, Ciao, Matteo ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Expert Systems and Functional programming?
There is no way the irreconcilable difference between a production rule system (PRS) and functional programming (FP). The former is based on state and mutable data, in facts and even temporary objects resulting from evaluation (no matter how the underlying engine works). There is one (frequently repeated) step in the PRS execution logic that benefits from FP ideas: RHS evaluation. It's best practice, even mandatory, to avoid side effects in any methods invoked during this step. OO programming (as in Java) invites (nominal) violations of this rule, e.g., during an accumulate that isn't written recursively (and the current interface prescribes otherwise), but they don't matter since it is below the counter. Removing state and mutability is frequently acceptable - Drools has sequential mode where facts cannot be changed. However, with all the apps I've seen and written, the rule design patterns I've identified and documented state in facts is too valuable. -W On 07/03/2013, Matteo Mortari matteo.mort...@gmail.com wrote: Ciao everybody, I have a question I would like to submit to this community, given Drools is my preferred choice for Expert Systems :) A quick background: I'm not an Expert Systems / Rule engines expert, but I'm a happy power user of Rules since my CS Engineering thesis, a paper published, and used it with happy results at work and hobby projects. Currently boarded on a new project with Rules+Processes at work, and still very happy, so happy, I'm using Drools again in a new hobby project. [semi-brag-mode off] Now, in recent times, I cannot ignore what (apparently) is a strong renaissance of Functional Programming, specifically all this momentum which Scala and Java 8's Lambda's are getting. The Question I'm asking myself: is there a specific, or few, areas where Functional Programming could actually benefit Expert Systems so much to actually spawn new paradigms of writing Rules? Or benefit in a new generation of the Rete algorithm? Or actually, Functional Programming will spawn a completely different paradigm of system which will go beyond Expert Systems the way are designed today? Ignore my rant if you feel it's too generic, but I really wanted to seize a chance to ask the question to this community :) Thank you for your feedback, Ciao, Matteo ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users