Re: JESS: Re: calculating benefit costs
Although most folks won't complain, my only comment here is that the logic is all contained in the action side (RHS) of the rule in the form of if-then-else statements (basic Java) followed by more if-then-else (more basic Java) statements. This is basically procedural code put into a rulebase in a procedural manner. This begs the question, Is a rulebase actually needed for this problem? Not the way is has been solved here. I kind of like Wolfgang's original solution on 5 Jan which would be more of a rulebase approach and would make maintenance at a later date much easier. Yes, it has more rules (which is the object of a rulebase), BUT the logic is properly defined on the LHS where it belongs and each rule is independently incremental as it should be. Also, using the rulebase approach would allow expansion of the basic problem into more complex problems later on. SDG jco On Jan 7, 2011, at 8:15 AM, Derek Adams wrote: Thanks for the help guys. Here is what I ended up with. This works, but I'm sure it's not the most efficient way to solve the problem. (defrule setCalculatedCostGCI20k5k (HrBenefitJoin (hrBenefitConfigId 1-76)(benefitJoinId ?bjid)(calculatedCost ?cost)(OBJECT ?obj)(coveredPersonId ?cPer)(payingPersonId ?pPer)(relationshipId ?rel)) (Person (personId ?cPer)(dob ?dob)(OBJECT ?objP)) = (printout t age = (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) for ?bjid crlf) (if (eq ?rel nil) then (if ( (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) 30) then (call ?obj overrideAgeCost 11.55) else (if ( (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) 40) then (call ?obj overrideAgeCost 18.95) else (if ( (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) 50) then (call ?obj overrideAgeCost 38.35) else (if ( (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) 60) then (call ?obj overrideAgeCost 65.95) else (if ( (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) 70) then (call ?obj overrideAgeCost 104.35) else (printout t age greater than 69 ... (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) for ?bjid crlf)) else (if (neq ?rel nil) then (if ( (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) 30) then (call ?obj overrideAgeCost 4.20) else (if ( (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) 40) then (call ?obj overrideAgeCost 6.05) else (if ( (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) 50) then (call ?obj overrideAgeCost 10.90) else (if ( (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) 60) then (call ?obj overrideAgeCost 17.80) else (if ( (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) 70) then (call ?obj overrideAgeCost 27.40) else (printout t age greater than 69 ... (call ?objP calcAgeAsOf(call com.arahant.utils.DateUtils now )) for ?bjid crlf (printout t setCalculatedCostGCI function fired for ?bjid . overrideAgeCost = (call ?obj overrideAgeCost) crlf) ;(printout t setCalculatedCostGCI function fired for ?bjid crlf) ) On Thu, Jan 6, 2011 at 10:32 AM, Wolfgang Laun wolfgang.l...@gmail.com wrote: This additional information does not require a fundamentally different approach. Using the same set of facts CostEmployee/CostSpouse, we can now use two rules, one calculating the cost for the employee, and the other one for the spouse. (defrule calc-self ?hbj - (HrBenefitJoin (hrBenefitConfigId 1-73) (calculatedCost 0) {relationshipId == nil} (payingPersonId ?pPer) (coveredPersonId ?cPer) ) (Person(personId?cPer) (dob ?dob) ) (CostEmployee (lo ?lo:(= ?lo (yrs ?dob))) (hi ?hi:(= ?hi (yrs ?dob)))(cost ?cost)) = (printout t Cost for ?cPer paid by himself: ?cost crlf ) ) (defrule calc-other ?hbj - (HrBenefitJoin (hrBenefitConfigId 1-73) (calculatedCost 0) {relationshipId != nil} (payingPersonId ?pPer) (coveredPersonId ?cPer) ) (Person(personId?cPer) (dob ?dob) ) (CostSpouse(lo ?lo:(= ?lo (yrs ?dob)))
Re: JESS: Hello To Jess User Group and How Is Jess Doing?
Ernest et al: Sorry for the confusion on my part - which is why I included all of the email lists. However, at one time (unless I have a really faulty memory chip) programmers outside of the USA used to complain because they could not get the source code (and sometimes the binary) because of the BATF regulations that considered computer source code as some kind of munitions. Also, I personally did have to pay $100 for the source code way back when (about 2001 or 2002) unless I just wanted the binary version. But, I have been allowed to download all of the upgrades since that time for free. However, thanks for clarifying today's pricing options and showing that Jess is available world-wide, even with source. That's great news! Thanks, Rose Bowl Results TCU Horned Frogs, 21 Michigan Badgers, 19 TCU, a small private university, is located in little old Fort Worth, Texas - where the West begins. :-) SDG jco j...@kbsc.com CoFounder DRG 2000 CoFounder ORF-2008/ORF-2009 CoFounder and Speaker (O)RF 2010 http://www.DallasRulesGroup.org http://www.RulesFest.org On Jan 2, 2011, at 5:45 PM, Ernest Friedman-Hill wrote: Jess is available under one of four main licensing agreements. Three of these options are available worldwide -- it is not true that Jess is unavailable outside the US. Source code is indeed available as part of many agreements, but in no case is it specifically available for $100.
Re: JESS: Hello To Jess User Group and How Is Jess Doing?
Edson et al: I rarely get involved with this kind of thing but since there are more than 10 emails on the same subject and since Mark Proctor, Edson Tirelli and Dr. Friedman-Hill really shouldn't be drawn into the discussion due to a conflict of interest matter, and my friend and fellow instigator PL/ (woolfel) has not commented, may I be so bold as to interject these few thoughts: 1. There are about 25 or more BRMS/rulebased systems presently being used throughout the world. In this space they seem to be grouped into commercial and free, or almost free for personal use. Commercial systems can range from a few thousand to a few million US Dollars. Free (or almost free systems - no such thing as a free lunch) systems will require lots of time and study to learn what the commercial guys can provide in a short period of time. Also, most commercial vendors usually have schools for training purposes. 2a. EJFH has frequently mentioned that Jess is for programmers. But, he has written a book, Jess In Action, (a bit out of date by now but still spot-on applicable in most cases) and the on-line user's manual that is kept up to date really is quite good. Read it! Also, the Jess email list is quite as active as the Drools Users list and you can normally get a response within a few hours there. In addition, there is a 3rd party Fuzzy Jess for those who want a bit more expert system approach to their system. Jess comes with source code for an extra $100 but commercial applications have to be worked out with Sandia Labs. Unfortunately, Jess is NOT available (legally) outside the USA but is totally free (with source code) to military, government and/or students/teachers at approved universities. 2b. If you are using C/C++ as your main system, then CLIPS (C Language Interface to Production Systems) is quite good and could be considered a superset of Jess. In addition to the quite-excellent on-line manuals, they also have a book out by Dr. Joseph Girratano (University of Houston) and Gary Riley (formerly NASA but now independent) that is updated frequently and is on version 4 at the time of this email - I use the book for teaching CLIPS, CLIPS/R2 and, sometimes, to supplement the Jess In Action book By Dr. Friedman-Hill. Unfortunately, I haven't found a similar email list to the ones maintained by Drools or Jess. The latest version of CLIPS 6.3 compares quite favorably with OPSJ using Rete-2 on my performance testing. CLIPS also allows various optimization conflict resolution strategies and comes with source code if you want to change things up a bit. 3. Mark Proctor et cie developed Drools for the past few years and it was (years ago) a programmers-only language as well. Recently however they are moving more toward the BRMS space with Guvnor and other tools to make it easier for the business user to use, create and/or modify the rules; and to compete with ILOG and Advisor. They also have an active users email list and a developers email list. (PLEASE - do not take user questions to the developer list.) They still lack factory consulting but you can purchase factory phone-in tech support from Red Hat, their parent company, or advertise for a Drools consultant on their home page. In addition, there are two books on Drools (in addition to their on-line manual) available through Amazon, Barnes Noble, Nerd Books, etc. 4 Commercial, Rete-based systems normally have an evaluation copy (usually a full working version that is time-bombed to quit working after an appropriate period of time.) The biggies here are FICO Blaze Advisor (COBOL and .NET as well), IBM/ILOG JRules (COBOL and .NET as well), Pega Rules as part of the PegaSystems, MindBox for Mortgage Systems, and many others. In addition to some kind of text rules, these tools usually employ highly sophisticated Decision Tables (spreadsheets), Decision Trees, Reporting tools, Trouble Shooting tools, Professional Services (Consulting), Factory technical support (of various levels), etc. They are not cheap (usually $25K per developer seat) but, then, nobody ever got fired for using one of them. Most use some form of enhanced Rete and Blaze Advisor uses Rete 2 licensed from Dr. Forgy discussed below. 5. Non-Rete Commercial systems that might be considered could be Rule Burst (now owned by Oracle that also owns the Rete-based Haley Expert Systems), Visual Rules or Corticon (and others) that are, more or less, spreadsheet-based rule maintenance tools. All of them have some kind of rule optimization in place. These eye-catching models are far more familiar to the business users - and probably to your IT group and would compare to the Decision Tables from FICO, ILOG or Drools. In addition, these companies also have Professional Services and/or telephone technical support available for a cost. I have found that 75% or more of most business applications do not actually need Rete but
JESS: [Jess] ORF 2009 Keynote Speaker Announcement
[With Permission, of course]Greetings:This will be our penultimate email about October Rules Fest 2009 - but, even though it follows closely on the heels of the previous email, it's necessary. And it's a goodie. OurKeynote Speakerfor ORF 2009 isTom Cooper, co-author of "Rule-Based Programming in OPS5" by Tom Cooper and Nancy Wogrin. (Thanks to Luke Voss and Andrew Waterman for making a last-minute agenda shuffle possible.) The book is long since out-of-print but is still available in slightly used condition by many of Amazon's associated book resellers. (I saw only four "used but in good condition" copies at Amazon itself.) When Dr. Forgy and I were working on our first project together back in 1998, I asked him what would be the one book that a person might buy to get a good foundation on rulebased programming. This was it and I have used it many times in my classes that I teach on the subject. Side note: I also use Gary Riley's book - still in publication - to teach CLIPS (and Jess) and many others for reference; such as "Jess In Action" by Dr. Ernest Friedman-Hill or the Buchanan-Shortliffe magnum opus on the MYCIN project. You can see my comlete list athttp://www.kbsc.com/aibooks.htmlfor more of them. Even though some (most?) of the books are out-of-print none are really out-of-date.STUDENTScan now register for ORF 2009 for only$150per personWITH a valid photo ID and a CURRENT student photo ID card.Last year we priced the whole thing at student rates and did not get a single student registeration from the USA. (We had one from the UK.) We have had several inquiries this year, some from as far away as California, and decided to put the student rate back online. Just click on the regular ORF registration link and it will give you the instructions for the special student registration process.We have two (yep, 2 of them)BOOT CAMPSthat are co-located with ORF in The Adolphus Hotel. There will be theJess Boot Camp(taught by Jason Morris) and theDrools Boot Camp(taught by Mark Proctor and Edson Tirelli). Even though both boot camps are headed by their individual instructors, we are posting the curriculum of both on-line with the ORF agenda. (Topics are subject to change.) Both camps have done a lot of work the past few days one defining what to expect from each of them. If you like, you really CAN attend just one of the boot camps (for a small fee to cover the cost of the meeting room and catered coffee) and not attend ORF - but why??? ORF attendees can attend either one of the boot camps free of charge.I will try and send another email before the 15th but in case that I don't, remember that thespecial $129 / night room rateforOctober Rules Fest 2009 attendeesat The Adolphus willEXPIREon the 16th !!So I urge that if you have not already registered for ORF as well as reserved a room at The Adolphus, please do so this week if possible.BTW, thanks to ALL of you who have already signed up and/or have registered at The Adolphus. The rooms are filling up. Boot Camps are filling up. And, thankfully, October Rules Fest is filling up with some great folks looking for answers to some really perplexing problems. So, if you have NOT registered, do so now. If you know of some students who want to attend, put them in touch with Chelanie who can get them registered. If all you want is one of the two greatest boot camps in the world, you can sign up just for that. But you need to sign up now!!SDGJames OwenFounder October Rules FestSenior Consultant / Architect KBSChttp://www.kbsc.comhttp://www.OctoberRulesFest.orgTwitter: OctRulesFestBlogs:http://JavaRules.blogspot.com[Rulebased Systems Blog]http://ORF2009.blogspot.com[October Rules Fest Blog]http://exscg.blogspot.com/[Expert Systems Consulting Group Blog]"If I have seen a little further it is by standing on the shoulders of giants."Sir Isaac Newton in a letter to Robert Hooke, 5 Feb 1676Come to October Rules Fest and stand on the shoulders of the Giants of the industry; if only for a week.
JESS: ORF 2009 Jess Boot Camp
Greetings: [With Permission] October Rules Fest is honored to once again have Jason Morris as one of our speakers this year. As always, Jason is well prepared and has a topic of great interest to all concerned. IN ADDITION, this year Jason is Co-Locating the Jess Boot Camp at The Adolphus Hotel with ORF 2009. For those who don't know, Jason is a excellent instructor as well and is the official Jess instructor for Sandia Labs. If you want to attend ONLY the boot camp, that is possible for a small fee to help pay for the room, coffee, etc. ORF 2009 attendees will be able to attend JBC for FREE. Below is the proable syllabus even though it might change slightly between now and October 25th: Day 1 Hour Topic - 1 Jess Language Fundamentals 2 Creating Facts, Patterns, and Rules I 3 Creating Facts, Patterns, and Rules II 4 Jess API Fundamentals 5 Controlling Rule-Based Applications 6 Designing a Simple Diagnostic Expert System 7 Writing the Diagnostic Knowledge Base 8 Writing the Control Knowledge Base Day 2 Hour Topic - 1 Writing the Application Code I 2 Writing the Application Code II 3 Attaching a User Interface 4 Question and Answers If you have any problems with registering for JBC, ORF 2009 or getting registered at the hotel, please let Chelanine or me know right away. SDG James Owen Founder October Rules Fest Senior Consultant / Architect KBSC http://www.kbsc.com http://www.OctoberRulesFest.org Twitter: OctRulesFest Blogs: http://JavaRules.blogspot.com [Rulebased Systems Blog] http://ORF2009.blogspot.com [October Rules Fest Blog] http://exscg.blogspot.com/ [Expert Systems Consulting Group Blog] If I have seen a little further it is by standing on the shoulders of giants. Sir Isaac Newton in a letter to Robert Hooke, 5 Feb 1676 Come to October Rules Fest and stand on the shoulders of the Giants of the industry; if only for a week.
Re: JESS: Exception in thread main java.lang.OutOfMemoryError: Java heap space
Just one more thought - if your rules are taking 30 MINUTES rather than 30 seconds then it sounds like you have some kind of loop going on that is building (adding to) memory over and over and over. The Miss Manners benchmark does this intentionally to stress the rule engine and, in particular, the Agenda matching table, to see if the engine can handle overloads such as this. Check to see which rule is firing the most and you will probably find your problem child somewhere in that general area. SDG James Owen Founder October Rules Fest Senior Consultant / Architect KBSC http://www.kbsc.com http://www.OctoberRulesFest.org Twitter: OctRulesFest Blogs: http://JavaRules.blogspot.com [Rulebased Systems Blog] http://ORF2009.blogspot.com [October Rules Fest Blog] http://exscg.blogspot.com/ [Expert Systems Consulting Group Blog] If I have seen a little further it is by standing on the shoulders of giants. Sir Isaac Newton in a letter to Robert Hooke, 5 Feb 1676 Come to October Rules Fest and stand on the shoulders of the Giants of the industry; if only for a week. On Sep 14, 2009, at 8:42 AM, jo wrote: Hi I got following error, which surprises me as I try to keep the amount of facts to a minimum. Can I detect this condition *before* it is about to happen ? Any ideas on how to prevent this ? 30m is really not that long :( Exception in thread main java.lang.OutOfMemoryError: Java heap space at jess.factory.FactoryImpl.newToken(FactoryImpl.java:27) at jess.Node2.tokenMatchesLeft(Node2.java:326) at jess.Node2.doRunTestsVaryRight(Node2.java:314) at jess.Node2.doRunTestsVaryRight(Node2.java:299) at jess.Node2.runTestsVaryRight(Node2.java:292) at jess.Node2.callNodeLeft(Node2.java:156) at jess.NodeJoin.passAlong(NodeJoin.java:99) at jess.Node2.tokenMatchesLeft(Node2.java:328) at jess.Node2.doRunTestsVaryRight(Node2.java:314) at jess.Node2.doRunTestsVaryRight(Node2.java:299) at jess.Node2.runTestsVaryRight(Node2.java:292) at jess.Node2.callNodeLeft(Node2.java:156) at jess.NodeJoin.passAlong(NodeJoin.java:99) at jess.Node2.tokenMatchesLeft(Node2.java:328) at jess.Node2.doRunTestsVaryRight(Node2.java:314) at jess.Node2.doRunTestsVaryRight(Node2.java:299) at jess.Node2.runTestsVaryRight(Node2.java:292) at jess.Node2.callNodeLeft(Node2.java:156) at jess.Node1RTL.passAlong(Node1RTL.java:46) at jess.Node1RTL.callNodeRight(Node1RTL.java:28) at jess.Node1.passAlong(Node1.java:49) at jess.Node1MTELN.callNodeRight(Node1MTELN.java:35) at jess.Node1.passAlong(Node1.java:49) at jess.Node1TECT.callNodeRight(Node1TECT.java:40) at jess.NodeRoot.passAlong(NodeRoot.java:39) at jess.NodeRoot.callNodeRight(NodeRoot.java:14) at jess.FactList.processToken(FactList.java:31) at jess.FactList._assert(FactList.java:210) at jess.FactList.assertFact(FactList.java:181) at jess.Rete.assertFact(Rete.java:548) at jess.FactFunctions$Assert.call(FactFunctions.java:50) at jess.FunctionHolder.call(FunctionHolder.java:35) real30m12.867s user27m48.316s tx J To unsubscribe, send the words 'unsubscribe jess-users y...@address.com' in the BODY of a message to majord...@sandia.gov, NOT to the list (use your own address!) List problems? Notify owner-jess-us...@sandia.gov .
JESS: ORF 2009
Greetings to the Jess Users Group: To those who attended October Rules Fest last year, and those who did not, we're doing it all over again - only better. Counting the half- day of tutorials on Monday (if we have enough sign up for it) this year will be four full days of top-notch speakers, the absolute best- of-breed that can be found in the rulebase world. For example, returning to ORF this year will be Dr. Charles Forgy (inventor of Rete, Rete 2 and Rete III), Gary Riley (inventor of CLIPS), Mark Proctor (inventor of Drools), Carlos Serrano-Morales (inventor of Advisor), Carole Ann Berlioz-Matignon (Early Advisor designer), Jason Morris (Jess guru and advisor on the Jess mailing list), Dr. Leon Kappelman (University North Texas, Enterprise Architecture), Dr. Daniel Levine (University Texas Arlington, Neural Networks), Dr. Rick Hicks (Texas AM, Validation Verification), Greg Barton (Testing and applications), Rolando Hernandez (Model Driven Approach to Rules), Dr. Jacob Feldman (CBP using OpenRules) and Dr. Gopal Gupta (University Texas Dallas, Constraint Based Programming). New to the group of ORF speakers this year will be John Zachman (Zachman Enterprise Architecture), Daniel Brookshier (UML Guru from No Magic), Eric Charpentier (Ruebase expert) and Dr. Hafedh Mili (Rulebase Consultant and professor at UQAM) from Canada, Paul Vincent (Tibco CEP guru), Charles Young (CEP guru from the UK), Luke Voss (Rulebase guru), Manny Gandarillas (applications), David Holz (Rulebase Patterns) and Andrew Waterman (Modeling and Network Gaming using Rules). The Agenda has been set. We are negotiating with two hotels, both of which are located in the middle of the downtown-Dallas restaurant district, in order to get the best deal for you - meaning the speakers and the attendees. For either location, we already have selected a pub-night location for Tuesday, Wednesday and Thursday. We should have that resolved within the week and it will be posted to the web site. Considering that you will be able to chat with the founders of the rulebased world as well as those who contribute to its advancements every day, you would get more in the way of training than if you attended ten vendor schools. Not that the vendor schools are not necessary - but this is a once-a-year adventure that crosses all lines of rulebase theory, tools and applications. This is where you will discover and discuss radically new advances in rulebased systems and have the God-Fathers and God-Mothers of the rulebased world over the past 40 years to help you understand how we got here. There is only one drawback - by getting a first class, quality hotel in the middle of the restaurant district for the same room price that we had last year, we will have a limited number of seats. Considering that we have 30 speakers, we will be able to accommodate only 170 attendees or so. Therefore, it will have to be first come, first served on attendee registration. Remember, you still get the 20% discount for early sign-up. AND, there is no charge for the tutorials - I think that we are the only conference NOT to charge for tutorials and I would like to keep it that way. But, we still need for you to sign up for tutorials IF AND ONLY IF you actually are going to attend them. Remember, we will have to rent the room and provide refreshments for the tutorials just like the main conference so, if you are not going to be there, please don't sign up for them. Finally I would like to point out that we are NOT professional conference people - just rulebase consultants getting together with rulebase vendors, rulebase customers and other rulebase consultants to share what we know with each other, to better understand the inner workings of a rulebase and to help make cutting-edge, technological advances in the industry more easily understood by all. Last year you asked us for more QA time - so we have allocated daily QA sessions at the end of each day. Last year you asked us to find a quieter place for pub nights because there was more QA (and lots more A) at the pub than in the conference itself. So, we did. Last year you asked us to find a hotel closer to the restaurants. Well, point your Google Earth to 1400 Commerce Street in Dallas and just look at the restaurants close by. And that does not include all the ones that we will post later on the ORF web site after we have visited them and added them to the list. Anything from MacDonalds to The French Room (a five-star - three Michelin stars - restaurant). BTW, the trolley runs down the street of the hotel and connects to off- site parking so you don't have to negotiate downtown traffic. And there is a shuttle from the airport to the hotel. SDG James Owen Senior Consultant / Architect http://www.kbsc.com http://www.OctoberRulesFest.org This above all: to thine own self be true, And it must follow, as the night the day, Thou canst not then be false to any man. Hamlet, Act 1, Scene III http://www
Re: JESS: ORF 2009
We'll have to shut down registration and tell them that we're full. What a nice problem to have after last year. SDG jco This above all: to thine own self be true, And it must follow, as the night the day, Thou canst not then be false to any man. Hamlet, Act 1, Scene III http://www-tech.mit.edu/Shakespeare/hamlet/hamlet.1.3.html On May 28, 2009, at 6:21 AM, Jason Morris wrote: BTW -- what are you going to do if you get more than 170 people wanting to sign up? On Mon, May 25, 2009 at 3:25 PM, James Owen jco2...@att.net wrote: Greetings to the Jess Users Group: To those who attended October Rules Fest last year, and those who did not, we're doing it all over again - Cheers, Jason -- --- Morris Technical Solutions LLC consult...@morris-technical-solutions.com (517) 304-5883
Re: JESS: ORF 2009 - question on dates
YIKES!! In all of our meddling with the page over and over and over, we must have omitted that. It will be there tonight. Thanks for catching that so obvious error that our pernicious, picayune panel of picky programmers missed. :-) Tutorials on Monday, October 26th, 2009 Conference on Tuesday, October 27, 2009, through Friday, October 30, 2009 SDG jco This above all: to thine own self be true, And it must follow, as the night the day, Thou canst not then be false to any man. Hamlet, Act 1, Scene III http://www-tech.mit.edu/Shakespeare/hamlet/hamlet.1.3.html On May 28, 2009, at 1:09 PM, Taylor, Ronald C wrote: Hello Mr. Owen, Checked your web site - didn't see the exact dates for the Fest. On which Monday does it start in October? Cheers, Ron Taylor ___ Ronald Taylor, Ph.D. Computational Biology Bioinformatics Group Pacific Northwest National Laboratory 902 Battelle Boulevard P.O. Box 999, MSIN K7-90 Richland, WA 99352 USA Office: 509-372-6568 Email: ronald.tay...@pnl.gov www.pnl.gov From: owner-jess-us...@sandia.gov [mailto:owner-jess- us...@sandia.gov] On Behalf Of James Owen Sent: Monday, May 25, 2009 12:26 PM To: jess-users@sandia.gov Subject: JESS: ORF 2009 Importance: High Greetings to the Jess Users Group: To those who attended October Rules Fest last year, and those who did not, we're doing it all over again - only better. Counting the half-day of tutorials on Monday (if we have enough sign up for it) this year will be four full days of top-notch speakers, the absolute best-of-breed that can be found in the rulebase world. For example, returning to ORF this year will be Dr. Charles Forgy (inventor of Rete, Rete 2 and Rete III), Gary Riley (inventor of CLIPS), Mark Proctor (inventor of Drools), Carlos Serrano-Morales (inventor of Advisor), Carole Ann Berlioz-Matignon (Early Advisor designer), Jason Morris (Jess guru and advisor on the Jess mailing list), Dr. Leon Kappelman (University North Texas, Enterprise Architecture), Dr. Daniel Levine (University Texas Arlington, Neural Networks), Dr. Rick Hicks (Texas AM, Validation Verification), Greg Barton (Testing and applications), Rolando Hernandez (Model Driven Approach to Rules), Dr. Jacob Feldman (CBP using OpenRules) and Dr. Gopal Gupta (University Texas Dallas, Constraint Based Programming). New to the group of ORF speakers this year will be John Zachman (Zachman Enterprise Architecture), Daniel Brookshier (UML Guru from No Magic), Eric Charpentier (Ruebase expert) and Dr. Hafedh Mili (Rulebase Consultant and professor at UQAM) from Canada, Paul Vincent (Tibco CEP guru), Charles Young (CEP guru from the UK), Luke Voss (Rulebase guru), Manny Gandarillas (applications), David Holz (Rulebase Patterns) and Andrew Waterman (Modeling and Network Gaming using Rules). The Agenda has been set. We are negotiating with two hotels, both of which are located in the middle of the downtown-Dallas restaurant district, in order to get the best deal for you - meaning the speakers and the attendees. For either location, we already have selected a pub-night location for Tuesday, Wednesday and Thursday. We should have that resolved within the week and it will be posted to the web site. Considering that you will be able to chat with the founders of the rulebased world as well as those who contribute to its advancements every day, you would get more in the way of training than if you attended ten vendor schools. Not that the vendor schools are not necessary - but this is a once-a-year adventure that crosses all lines of rulebase theory, tools and applications. This is where you will discover and discuss radically new advances in rulebased systems and have the God-Fathers and God-Mothers of the rulebased world over the past 40 years to help you understand how we got here. There is only one drawback - by getting a first class, quality hotel in the middle of the restaurant district for the same room price that we had last year, we will have a limited number of seats. Considering that we have 30 speakers, we will be able to accommodate only 170 attendees or so. Therefore, it will have to be first come, first served on attendee registration. Remember, you still get the 20% discount for early sign-up. AND, there is no charge for the tutorials - I think that we are the only conference NOT to charge for tutorials and I would like to keep it that way. But, we still need for you to sign up for tutorials IF AND ONLY IF you actually are going to attend them. Remember, we will have to rent the room and provide refreshments for the tutorials just like the main conference so, if you are not going to be there, please don't sign up for them. Finally I would like to point out that we are NOT professional conference people - just rulebase consultants getting together with rulebase vendors, rulebase customers and other rulebase consultants to share what we know with each other, to better understand
JESS: October Rules Fest
Greetings: Just a reminder that if you want to attend the October Rules Fest (ORF) on the 22nd - 24th of October in Dallas, you might should make your reservation now if you have not done so already. The students from the DFW area (10 major universities plus lots of colleges) will find out in late August about the conference and since it's only $150 to meet the cream of the crop in rulebased technology (excluding only one outstanding developer) they will probably swamp the attendee list as soon as they get back to classes in late August or early September. http://www.rulesfest.org/OctoberRulesFest/Register.html -- [Do NOT reply to this GMail EMail Reply to [EMAIL PROTECTED] since this is my emergency email account.] SDG jco
Re: JESS: JessDE and Java
Thanks - I'll try that tomorrow when I get back to the office. Jess wasn't able to find the Java classes and then someone found an old email and said that I was spinning my wheels since it would never work. So, now that I know it really IS supposed to work, I'll make it work. :-) SDG jco friedman_hill ernest j wrote: I think James Owen wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] I "think" that one of the older emails (about November 2005) said that we could NOT integrate Jess with Java. Is that correct and does it still apply to the latest editions. That one is kind of giving me fits right now. I thought it was my mistake until one of my co-workers pointed out the old email. What's that now? The JessDE *expects* you to be integrating Jess with Java, so much so that it requires that the projects in which you keep your Jess code be Eclipse Java projects. What are you having a problem with exactly? The only thing I can think of that you might mean is debugging. Eclipse doesn't offer a cross-language debugging framework, so the JessDE debugger doesn't integrate with the Java debugger; you can either debug only Java code, or only Jess code, at one time. You can't step from one into the other. - 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].
JESS: JessDE and Java
I think that one of the older emails (about November 2005) said that we could NOT integrate Jess with Java. Is that correct and does it still apply to the latest editions. That one is kind of giving me fits right now. I thought it was my mistake until one of my co-workers pointed out the old email. SDG jco 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: Design and Documentation of Declarative Programs (was Jess and UML)
Steven: Some BRMS (Business Rule Management System - fancy way to say rulebase) use rulebase documentation much like JavaDoc and export to XML - MS Word - etc. It shouldn't be too terribly difficult to write a Perl script to go through the rules, pick out the /** begin and */ end commands to use for rule documentation. Also, you can use XML (see chapter 20 in JIA book) to expresss the rules in XML. Comments for documentation purposes can be used there as well. Actually, I remember (way back in 2000) that Arun Indurti did a Perl Script to build rules from a CSV file generated from a spreadsheet and Eric Charpentier did the (was it Perl?) script that allowed us to generate documentation using Java Doc /** */ comments in ILOG JRules. Both on the same monstrous Bell South project. SDG jco Steven Goncalo wrote: I am reluctant to say it can not be done, but so far I have been unable to find or produce an example of how UML can be used to effectively describe the design of a large declarative program. My software team is pretty comfortable with the use of UML to aid in the up front design and final documentation for most of our software, but UML has not been a good fit to the Jess code in our design. UML does well at describing data structures like fact templates, and can do a passable job at describing any individual rule in isolation. I have not found any UML constructs that serve well to describe how groups of rules are organized or what kind of high level behavior emerges from the low level interaction of the rules. If someone else has to pick up the maintenance of this program a few years from now, they are going to want some description of the program organization and emergent behavior. Has anyone else seen or developed an effective way to use UML to document a rule base design? If not, what alternate types of design documentation have people found effective for documenting a rule based design? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Scott Moss Sent: Thursday, June 22, 2006 1:48 AM To: jess-users@sandia.gov Subject: RE: JESS: Jess and UML Could the problem be that UML describes both OO program structures and procedures whereas, with declarative programming, the procedures emerge at runtime? On Wed, 2006-06-21 at 22:49 -0400, Steven Goncalo wrote: Turning the original question inside out, has anyone ever seen a good example of how to describe a rule based system in UML? All of my team's attempts to manually produce a set of UML diagrams to document what the rule based part of our system was doing have been disappointing. The diagrams tended to show how various subsets of the rules might have worked if rephrased as procedures. An automatic round-trip tool between UML and Jess rules would be great, but the first step would be to establish a good mapping between the two domains, which I have not yet seen. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of friedman_hill ernest j Sent: Wednesday, June 21, 2006 10:32 AM To: jess-users@sandia.gov Subject: Re: JESS: Jess and UML I think Matthew J Hutchinson wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] Is it possible to convert a design in UML into a structure in JESS, using facts? *Everything* is possible -- that's what makes life interesting! Now, the question really is: does a tool which does what you ask already exist? And I think the answer is "no." There are tools for converting other kinds of designs into Jess code: ontologies in Protege or OWL, for example. But not UML, to the best of my knowledge. - 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]. 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
Re: JESS: Reversing logic
Normally I don't get into long-winded discussions on the Jess group because it is, and should be, devoted to answering questions about Jess. After all, it is the Jess User's Group, not the Long-Winded-Rambling-What-About-That Group. However, Mitch wanted to open up the following to discussion by the Jess group so I'm posting my private answer in the public forum. Then I'm going back to work. :-) I've been doing rulebased systems (RBS) since 1989. I even worked for Neuron Data way back when the only real tool that they had was Nexpert, a full opportunistic backward chaining system. Anyway, I've picked up a few tricks along the way. Jess (along with OPSJ, drools, Mandarex, JEOPS and others) are tools for programmers, not for business analysts; much like C++ and Java. There are other, must more expensive systems, that have extensive debugging tools, GUI screens for business analysts and special language processors for the business analysts. Some are scalable; some are not. Also, the thought process jump from OO to declarative languages is akin to the thought process jump from procedural to OO. It's still bits and bytes on the computer, the change is the approach and the view of the logic. The Jess In Action book is good and does an excellent job of teaching Jess, but it only goes so far. There are many other books that might help, but not many programmers have the time to read and understand these books. See http://www.kbsc.com/aibooks.html for a suggested list. Many of these go more into the technical, statistical, theory, etc. than most programmers or users have a need. I suppose that the main thing to consider is that the rules are declarative and each rule must be incrementally independent; it must contain the logic that it needs and not depend on another rule to fire first before it fires. We get around that by using either goal-driven rules or priorities, but priorities are something that should be used with great discretion - no more than three levels if possible. Setup priority rules, logic priority rules and clean-up priority rules. Take care and remember, it's a long, long road with lots of study on your own. The time problem is something that management rarely understands so you have to sell that concept to the management. Working with rules is 70% thought and design and only 30% implementation. I just go off the phone with the Maricopa County Attorney's office who have implemented a rulebased system over a three year period, but they spend a lot of time up front considering all of the requirements, constraints, etc. BEFORE writing the first line of code. And they follow that same process for any new project that comes along that needs rules. Something well worth thinking about. SDG jco Mitch Christensen wrote: Thanks All. DeMorgan's laws is what I was trying to remember last night (and couldn't). I knew there was a way to transpose/normalize logic, but couldn't recall the specifics. However, ;) I did do a truth table, and I did change the logic to fix my rule before posting my question. My problem is that now I am having a hard time explaining *why* it works. In other words, it works now, but looking at the rule, I would insist that it shouldn't. Here is my truth table. StmtA : (not (and A B)) which is equivalent to (or (not A)(not B)) StmtB : (and (not A)(not B)) +---+---+---+---+ | A | B | StmtA | StmtB | +---+---+---+---+ | 0 | 0 | 1 | 1 | +---+---+---+---+ | 1 | 0 | 1 | 0 | +---+---+---+---+ | 0 | 1 | 1 | 0 | +---+---+---+---+ | 1 | 1 | 0 | 0 | +---+---+---+---+ Now, whenever my CE is true (i.e. StmtX is 1), my rule should fire. Since I was incorrectly using StmtA instead of StmtB, I would expect my rule to fire occasionally when it shouldn't (i.e. false positives). The symptom I was getting was that my rule wasn't firing when it otherwise should as all the previous patterns were matched. I simply converted to the StmtB form and the rule fired. How can that be? To address Ernest's warning, this CE is the last statement prior to the =, so ?rowAmt is declared outside of the CE. I apologize if I'm just noising up the list. It's great that it works, but it worries me that I can't explain why. -Mitch P.S. Here is the complete rule in case that helps: (defrule find-ncp-row-partic-name Find all NCP records (column (type amount)(x ?xc)(y ?yc)(width ?wc)(height ?hc)) ?amt - (word (text ?tAmt:(not (regex-match ?tAmt ^\\p{Punct}+$))) (x ?xAmt:(and (= ?xAmt ?xc)( ?xAmt (+ ?xc ?wc (y ?rowAmt:(and (= ?rowAmt ?yc)( ?rowAmt (+ ?yc ?hc (width ?wAmt:(and ( ?wAmt 5)(= ?wAmt ?wc ?name1 - (word (text ?tName1:(regex-match (upcase ?tName1) ^[A-Z][A-Z\\-]+,?$)) (x ?xName1) (y ?rowName1:(same-row ?rowName1 ?rowAmt))) ?name2 - (word
Re: JESS: Reversing logic
Best answer is always the easiest. But one other heuristic that I like to follow is to always express things in a positive manner rather than a negated manner. If it works in the positive manner, reversing can lead to incredibly long and complicated errors in logic. The other answer about a truth table is always good as well. Also, building a spread sheet wherever possible also helps to expose poor logical conclusions and hypotheses. Dusan Sormaz wrote: First morning shot on it: De Morgan's laws: (not ( and a b)) == (or (not a) (not b)) Dusan Sormaz At 08:17 PM 3/8/2005, you wrote: Ok, I know that I should know this, but Im having trouble reasoning through it. Why do the following two CEs versions produce significantly different results? The only difference is that Im reversing the and/not order, but this results significantly different activation results. (not (and (allocation-amount (page ?p)(row ?rowAa:(same-row ?rowAa ?rowAmt))(x ?xAmt)) (word (x ?xOther:( ?xOther ?xName1))(y ?yOther:(same-row ?yOther ?rowAmt) (and (not (allocation-amount (page ?p)(row ?rowAa:(same-row ?rowAa ?rowAmt))(x ?xAmt))) (not (word (x ?xOther:( ?xOther ?xName1))(y ?yOther:(same-row ?yOther ?rowAmt) Thanks. -Mitch * * Duan ormaz, PhD, Associate Professor * Ohio University * Industrial and Manufacturing Systems Engineering Department * 277 Stocker Center, Athens, OH 45701-2979 * phone: (740) 593-1545 * fax: (740) 593-0778 * e-mail: [EMAIL PROTECTED] * url: http://www.ent.ohiou.edu/~sormaz http://www.ent.ohiou.edu/%7Esormaz * -- SDG jco Do No Evil. Do Only Good Things. See the good in every one. Always keep learning. Teach those who want to be taught. Avoid fools at all costs. Harm No One, Except to Defend Yourself, Or to Defend Another. Kill No One, Except to Keep From Being Killed, Or to Keep Another From Being Killed. CafeBabe 1210151411101114 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: performance experiment
Has anyone ever thought about using the Sting.intern() method? It's been used with other rulebased systems to ensure string location. I have an example somewhere that I'll try and look up when I get back from supper. If I don't do it tonight, someone remind me. Terrible memory problems at my youngish years. SDG jco [EMAIL PROTECTED] wrote: I think Timothy Redmond wrote: But it isn't obvious to me why the rule was so bad. I constructed a small experiment. It appears that Jess is not as efficient if it has a rule where a java object is getting matched with another java object. OK, I remember now what's going on here. The problem is that the hashCode() of some Java objects (Collections are one famous offender) can change, meaning that the method isn't really available for use in indexing. To be safe, later versions of Jess 6 simply don't do indexing on Java object fields -- better slow and correct than fast and wrong! Jess 7 will (eventually) have a scheme whereby you can tell Jess which of your classes have mutable hashCodes. Jess will know about many common cases, and you can provide additional information. This will let you have both correctness and speed. - 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]. -- SDG jco "Do No Evil. Do Only Good Things. See the good in every one. Always keep learning. Teach those who want to be taught. Avoid fools at all costs. Harm No One, Except to Defend Yourself, Or to Defend Another. Kill No One, Except to Keep From Being Killed, Or to Keep Another From Being Killed." CafeBabe 1210151411101114
Re: JESS: performance experiment
thanks --- I do know that it does ensure the proper String object when used in a rulebase. Do you have any idea about what kind of performance hit you get compared to a Hashtable lookup? [EMAIL PROTECTED] wrote: I think James Owen jco wrote: Has anyone ever thought about using the Sting.intern() method? It's been used with other rulebased systems to ensure string location. I have an example somewhere that I'll try and look up when I get back from supper. If I don't do it tonight, someone remind me. Terrible memory problems at my youngish years. Early versions of Jess did actually use String.intern(). It was a performance boost back in the day. But it was a real problem if you had an app that generated lots of unique Strings, like, for example, XML processing -- you would use an enormous amount of memory needlessly. I eventually took it out. But nowadays, it's a performance loss, anyway: a simple string comparison is faster than the hashtable lookup inside intern(). - 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]. -- SDG jco "Do No Evil. Do Only Good Things. See the good in every one. Always keep learning. Teach those who want to be taught. Avoid fools at all costs. Harm No One, Except to Defend Yourself, Or to Defend Another. Kill No One, Except to Keep From Being Killed, Or to Keep Another From Being Killed." CafeBabe 1210151411101114
Re: JESS: looking for JessWin
http://herzberg.ca.sandia.gov/jess/user.shtml sivan k wrote: Hello I would like to know where I can get JessWin. Thanks Jenny __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- SDG jco Do No Evil. Do Only Good Things. See the good in every one. Always keep learning. Teach those who want to be taught. Avoid fools at all costs. Harm No One, Except to Defend Yourself, Or to Defend Another. Kill No One, Except to Keep From Being Killed, Or to Keep Another From Being Killed. CafeBabe 1210151411101114 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 Manners Benchmark with Java Implementation
Attached... I ran these quite some time ago for most rulebased Java engines. Kochhar, Gaurav wrote: Hi, I am trying to create a Benchmark for finalizing a Rule Engine in our Company. We need rule engine for a J2EE based application. I already ran the pumps application in Jess examples. As a standard Benchmark with couple of other rule engines we chose Miss Manners. Could you point me to a JAVA implementation of Miss Manners in Jess? I did find a Miss Manners implementation using C but I need it for Java. Thanks Gaurav -Original Message- From: friedman_hill ernest j [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 02, 2004 3:46 PM To: Kochhar, Gaurav Subject: Re: Welcome to jess-users To post to the list, send mail to [EMAIL PROTECTED]. I think Kochhar, Gaurav wrote: I just subscribed to the jess-mailing list. How do I post a question on this mailing list?? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 02, 2004 2:54 PM To: Kochhar, Gaurav Subject: Welcome to jess-users -- Welcome to the jess-users mailing list! Please save this message for future reference. Thank you. If you ever want to remove yourself from this mailing list, you can send mail to [EMAIL PROTECTED] with the following command in the body of your email message: unsubscribe jess-users or from another account, besides [EMAIL PROTECTED]: unsubscribe jess-users [EMAIL PROTECTED] If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to [EMAIL PROTECTED] . This is the general rule for most mailing lists when you need to contact a human. Here's the general information for the list you've subscribed to, in case you don't already have it: [Last updated on: Fri Nov 9 9:00:29 2001] The jess-users list is for discussion of Jess, the rule engine for the Java platform, from Sandia National Laboratories. - 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]. -- SDG jco "Do No Evil. Do Only Good Things. See the good in every one. Always keep learning. Teach those who want to be taught. Avoid fools at all costs. Harm No One, Except to Defend Yourself, Or to Defend Another. Kill No One, Except to Keep From Being Killed, Or to Keep Another From Being Killed." CafeBabe 1210151411101114 CLASSPATH=/home/ejfried/Jess61p5 java -server -XX:NewSize=16m -Xms32m -Xmx32m jess.Main manners.clp ( guest (name 1 ) (sex m ) (hobby 2) ) ( guest (name 1 ) (sex m ) (hobby 1) ) ( guest (name 1 ) (sex m ) (hobby 4) ) ( guest (name 1 ) (sex m ) (hobby 5) ) ( guest (name 2 ) (sex f ) (hobby 3) ) ( guest (name 2 ) (sex f ) (hobby 2) ) ( guest (name 2 ) (sex f ) (hobby 1) ) ( guest (name 2 ) (sex f ) (hobby 4) ) ( guest (name 2 ) (sex f ) (hobby 5) ) ( guest (name 3 ) (sex f ) (hobby 5) ) ( guest (name 3 ) (sex f ) (hobby 4) ) ( guest (name 3 ) (sex f ) (hobby 2) ) ( guest (name 4 ) (sex m ) (hobby 3) ) ( guest (name 4 ) (sex m ) (hobby 2) ) ( guest (name 4 ) (sex m ) (hobby 1) ) ( guest (name 4 ) (sex m ) (hobby 4) ) ( guest (name 5 ) (sex m ) (hobby 2) ) ( guest (name 5 ) (sex m ) (hobby 5) ) ( guest (name 5 ) (sex m ) (hobby 3) ) ( guest (name 6 ) (sex f ) (hobby 1) ) ( guest (name 6 ) (sex f ) (hobby 4) ) ( guest (name 6 ) (sex f ) (hobby 2) ) ( guest (name 6 ) (sex f ) (hobby 5) ) ( guest (name 6 ) (sex f ) (hobby 3) ) ( guest (name 7 ) (sex f ) (hobby 1) ) ( guest (name 7 ) (sex f ) (hobby 2) ) ( guest (name 7 ) (sex f ) (hobby 3) ) ( guest (name 7 ) (sex f ) (hobby 5) ) ( guest (name 8 ) (sex m ) (hobby 3) ) ( guest (name 8 ) (sex m ) (hobby 5) ) ( guest (name 9 ) (sex m ) (hobby 3) ) ( guest (name 9 ) (sex m ) (hobby 5) ) ( guest (name 9 ) (sex m ) (hobby 2) ) ( guest (name 9 ) (sex m ) (hobby 4) ) ( guest (name 10 ) (sex m ) (hobby 2) ) ( guest (name 10 ) (sex m ) (hobby 3) ) ( guest (name 10 ) (sex m ) (hobby 4) ) ( guest (name 10 ) (sex m ) (hobby 5) ) ( guest (name 10 ) (sex m ) (hobby 1) ) ( guest (name 11 ) (sex m ) (hobby 2) ) ( guest (name 11 ) (sex m ) (hobby 4) ) ( guest (name 11 ) (sex m ) (hobby 5) ) ( guest (name 11 ) (sex m ) (hobby 1) ) ( guest (name 12 ) (sex f )
Re: JESS: again: jess-performance
I did that once. Long, long ago in a land far, far away. A place called VEA at FedEx. Virtual Enterprise Architecture. A time before J2EE. J2EE solved the problem that I had solved way back then using the pre-alpha version of Advisor, now called Blaze Advisor. By the time you get through with it, use JOnAS or JBoss - one of the freebies unless you want some KA performance - or Web Sphere, Web Logic or Oracle - along with Jess. Again, Ernest has covered this in his monumental opus, Jess in Action. (Yes, I hate J2EE as well, but it's by far the easier solution. Believe me.) SDG jco [EMAIL PROTECTED] wrote: I think Marcus Schlappa wrote: To save time for building the rete network each time, I'd like to cache the engine state with the rules already loaded as you said before ... 1) At application startup, create a bunch of jess.Rete objects. 2) Load the rules into each one. 3) Store them in an object pool. 4) When you need one, take it out of the pool, call reset(), and use it. When you're done with it, put it back in the pool. You can certainly try using Rete.clone() to create multiple engines, but you'll find that just loading the rules into each engine isn't measurably slower. - 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]. -- SDG jco Note: Please change my email address to [EMAIL PROTECTED] - I seem to get 500+ junk emails everyday so, for the next 30-45 days I'll check both but, eventually, I'll turn off the [EMAIL PROTECTED] that I have had since about 1985. It seems to be on the mailing list of everyone, including some of the grossest porno sites. sigh Thanks.
Re: JESS: new to jess
Thanks. I probably shouldn't be allowed to play with computers right now. Not even email. I pulled my back out again and I'm taking muscle relaxers and mild pain killers (ala Rush L.) and I hope I'm not "hooked" by the time that I get well. :-) Anyway, thanks for the correction and that really IS what I meant in the earlier email. Thanks for keeping me "straight." [EMAIL PROTECTED] wrote: I think James Owen wrote: One other thing, something that most "old timers" even forget. :-) If you re-write equals for a class that already exists or one that you inherit then you have to re-write the hash map table. Of course what jco means is that if you override equals(), you should override hashCode() as well; the details of doing this correctly are spelled out quite clearly in the Javadocs for the Object class. Joshua Bloch's book is, indeed, good as well. - 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].
Re: JESS: How to evaluate the required memory?
Something that I've found that works for long (time wise, that is) problems is to just physically watch memory. On "some" Unix systems you can watch memory load, CPU load, etc., etc. as it is happening since it uses some low level routines and presents them graphically. I know that you can on Solaris, I'm not sure about Linux, Mac OS X or BSD. Check with your SysAdmin if you have one. If not, check the SysAdmin guide for your Unix system. If you're not using Unix, well, I guess you just have to watch the task monitor performance while you run the program. I'm sure that someone else has a better answer but may that will help for now. SDG jco [EMAIL PROTECTED] wrote: I think Ahmed Mohombe wrote: Hi, Is there a way, (best practice, procedure) to evaluate how much memory will the RuleEngine require? It must not be very precise, but it should show at least the magnitude order. This is something like asking about the memory consumption of an arbitrary Java program: the answer is, simply enough, that you have to closely examine the program. To do this for a Jess program, you have to understand the concept of "partial matches", as explained in chapter 10 of the manual (or chapter 8 of "Jess in Action") and then look at your rules and data and do the math. - 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]. -- SDG jco Note: Please change my email address to [EMAIL PROTECTED] - I seem to get 500+ junk emails everyday so, for the next 30-45 days I'll check both but, eventually, I'll turn off the [EMAIL PROTECTED] that I have had since about 1985. It seems to be on the mailing list of everyone, including some of the grossest porno sites. sigh Thanks.
Re: JESS: breaking complex rules
Ernest would not say this. Read The Fabulous Manual. Read "Jess In Action" - commonly known as JIA. Try the examples. Read another book or two. Honestly, all of this is explained in exquisite detail in both the manual that comes with Jess and in JIA. Your thinking must be changed such that you are asking the question, Is there any X such that X.a == n AND X.b == m THEN do something really cool Rather than thinking of an inference engine as a series of IF-THEN-ELSE statements, write the code like you actually think about a situation. Non-technical people find using an inference engine "relatively" easy because they don't have to un-learn procedural thinking of the normal programming paradigm. Just my 2p. :-) SDG jco bhaskar yallala wrote: Hi folks, Is there a way to break a complex rule in to simpel rules JESS? How can I make it to fire a rule LHS of defrule? Is it by assert? I was trying this but it says bad slot value! Any ideas? Thanks Bhaskar Thanks and regards, Bhaskar [EMAIL PROTECTED] [EMAIL PROTECTED] Do you Yahoo!? Yahoo! Mail is new and improved - Check it out!
Re: JESS: The Potton's weight formula
Wouldn't this be a perfect example of when NOT to use a rulebased system? Meaning, that this is nothing more than a mathematical calculation, get a user input, calculate and answer, display the output. Static. No "real" intelligence? It "can" be done this way but "should" it be done this way? Methinks not. SDG jco [EMAIL PROTECTED] wrote: I think [EMAIL PROTECTED] wrote: NORMAL WEIGHT = HEIGHT - 100 - (HEIGHT - 100) /a ... (deffunction pottons-formula (?height ?a) (-(- ?height 100)(/ ?a(- ?height 100 ...but the result is incorrect (program returns: 59.666..., and should return: 72.0). I don't get where is my mistake (in formula??)? You've got the arguments to "/" in reverse order; they should appear in the same order they appear in the original infix _expression_. Also, although your use of two "-" operators isn't incorrect, you can combine the expressions into one for a more natural effect, like (deffunction pottons-formula (?height ?a) (- ?height 100 (/ (- ?height 100) ?a))) And how to take inputs (using read command) from user (?YOUR-WEIGHT ?YOUR-HEIGHT ?ARE YOU WOMEN OR MEN)? (printout t "Your height? ") (bind ?height (read)) - Ernest Friedman-Hill Science and Engineering PSEsPhone: (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].
Re: JESS: Compare predicate function problem
Ernest: If you have even a pre-alpha version of the Eclipse plug-in for Jess and would put it out for the group, I would re-name my first-born from James C. Owen, II to Ernest Friedman-Hill-Owen. Maybe :-) SDG jco [EMAIL PROTECTED] wrote: I think Michael Knapik wrote: (subject (caseStatus ?caseStatus:(= (?caseStatus "Suspect")) (OBJECT ?p)) = ... There are a whole bunch of things going on here. First, the error being reported that caseStatus is not a multislot. This is happening because the parenthesis that should be closing the caseStatus slot is missing; therefore the parenthesis after (OBJECT ?p) (the one that is intended to be the end of the "subject" fact) is seen as being the end of caseStatus, and therefore there are two separate test items inside the slot description (the second one is the "(OBJECT ?p)"). Since this is a single slot and not a multislot, Jess complains, rightly. Matching parentheses by eye is hard -- but matching brackets in Java is hard, too. Good tools can help a lot. I've always used Emacs to edit Jess code, which works great. The Charlemagne IDE will be even better at this. Anyway, there are three other things wrong in this little line of code. One is an extra set of parentheses around the arguments to "=". A proper call to "=" would look like (= ?caseStatus "Suspect"). Second, the "=" function is for comparing numerics only, and you'll get a runtime error if you use it to compare Strings like this. You can use "eq" to compare arbitrary items -- (eq ?caseStatus "Suspect"). Finally (and it seems like I've been saying this on the list every day, lately:) when you can match directly, without using a function call, do so -- it's more efficient, less typing, and easier to understand. So I'd write this whole pattern, corrected, as (subject (caseStatus "Suspect") (OBJECT ?p)) or if you really wanted the variable ?caseStatus bound to the constant "Suspect" you could write (subject (caseStatus ?caseStatus"Suspect") (OBJECT ?p)) - Ernest Friedman-Hill Science and Engineering PSEsPhone: (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].
Re: JESS: Re: your mail
As I recall, salience in rulebased programming is akin to goto statements in BASIC; a crutch for poor programing. In several books on the subject (JIA ?) the comment usually is that while salience is sometimes necessary more than three levels of salience should have a really, really good reason. Much like inheritance in OO programming. That's my blurb for the month. Going back to sleep now. :-) SDG jco [EMAIL PROTECTED] wrote: I think Simon Harris wrote: Ahh. Quite right you are. I'm a fool! When JESS complained about "Logical CEs can't follow non-logical" what it really means is "Logical CEs can't follow non-logical" :-). I'll remember to read the messages more carefully next time. Comprehensible error messages aren't one of Jess's best features. So I guess the question becomes: is it more effecient to use salience? It could go either way, depending on the program. If you tend to have large conflict sets -- i.e., many rules activated at once -- then salience adds noticeably to the overhead of managing the agenda. If you have very small conflict sets, then salience is fairly cheap. (logical), on the other hand, is more of a constant overhead, independent of problem size. - Ernest Friedman-Hill Science and Engineering PSEsPhone: (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].
Re: JESS: Re: your mail [REGARDING SALIENCE IN JESS]
Just a side note here: It is most refreshing to see the big guns weigh in with their thoughts and references. While some of it may be extraneous rabbit trails it is, nevertheless, enlightening. I realize that the Jess email list is supposed to be dedicated to solving the so-called real world problems, but when folks like Bob, Jason, Rich and Ernest begin to philosophize and wax rhetoric - well, I think it gives us a sense of history that, in the words of (was it Einstein?) We stand on the shoulders of Giants. So much has gone before us that is still valid and, in effect, gives us the insight, sometimes, to help mold our minds to the process, or the why, rather than the how. And, while I love just to sit in the background and read these insightful discourses, it's back to work to work for the plebeians such as me. (Such as I?) whatever... :-) SDG jco 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: on creating test harnesses dev automation with Jess
Not to be a name-dropper (don't you just hate those guys?) but when working with a large bank in England (OK, it was Lloyds) we ran 65,000 test cases against about 785 rules that dealt with pricing. Also, at a major insurance company, I ran about 5,500 test cases against less than 10,000 rules dealing with driver problems. How? (Why is later) Simple: Build a spreadsheet with the all of the conditions, i.e., the slots, on the left. On the right, identify which rule should fire, either name(s) or have a column for each rule labeled true/false, yes/no or something like that. Using Java main file, load up each row, set the slots (attributes) and fire the rules. Rules that should fire should match the rules that should fire. That's OI. Rule's that should not fire should match rules that should not fire. That's OK as well. However, a rule that does not fire that should fire is an alpha error. A rule that fires that should not fire is a beta error. This is 100% verification. Why? Because the loan application MUST have 100% verification if it's on the internet. Thousands and thousands of hits per day will be floating in through the net. An error that allows a loan that should not be allowed will be quickly detected by users and thousands of dollars (pounds sterling) would be lost. An error that does not allow a loan that should have been allowed will also cause the loan to go to the competition and, again, thousands of pounds sterling would be lost. Once the base-line was established, the 65,000 rules took just over six hours to run whenever ANY change was made to the rules. If only one rule changed, we discovered that it could generate unknown effects, unexpected things that should not have happened. Lloyds could not permit that. The same way with the insurance company. The 5,500 test cases took only an hour or so to run. So, whatever you do, NEVER use the 80/20 JUnit testing principle in financial environments, medical applications or processing plants. Failure is NOT an option. :-) SDG jco -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Morris Sent: Tuesday, February 17, 2004 6:15 PM To: Jess-Users Subject: JESS: on creating test harnesses dev automation with Jess Hi All, One of my Outlook rules my have zapped someone's reply, so please forgive me for asking my question again - albeit a shorter version this time: On pg. 169 of JIA, Ernest makes the comment ...You should be thinking about putting together a complete test harness now.., so I have been structuring my Jess scripting code in modules, placing them in separate files, and calling them from a master *.clp file like so: ;;=== pat.clp ;; Application batch script (clear) (watch all) (batch pat_main.clp) (batch pat_ask.clp) (batch pat_startup.clp) (batch pat_survey.clp) (batch pat_recommend.clp) (batch pat_report.clp) (batch pat_run.clp) (start-pat) Q. Though it seems to run fine now, I'm wondering if there are any pitfalls to calling batch files from batch files in Jess like this; and, is there a better/preferred/best-practice way to automate this kind of code/run/debug cycle? Thanks! -JM --- Jason Morris Morris Technical Solutions [EMAIL PROTECTED] www.morristechnicalsolutions.com fax/phone: 503.692.1088 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: Answer to one question should eliminate others.
Try a goal-driven approach. Group the rules into what you would ask if you had this goal or that goal or another goal. In your short example the goals might be Determine Food Types (Tofu, meat, fish, veggies only) Determine Tofu Types (meat simulations, non-meat simulations) Determine Meat Types (Beef, lamb, chicken, turkey) Determine Cooking (if beef: well done... or if chicken: fried, baked...) Each goal would be asserted (inserted) depending on the answer to a rule that was instantiated and the questions asked. This, of course, is an interactive, kind-of backward chaining type system, not what is normally done in forward chaining scenarios where all of the data are gathered then an answer is formulated. Just a thought... :-) SDG jco -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peder Jakobsen Sent: Tuesday, February 17, 2004 10:22 AM To: [EMAIL PROTECTED] Subject: JESS: Answer to one question should eliminate others. Hi, I'm going through the first Tax Advisor example in the Jess in Action. The first question that comes to mind is this: Many systems I can think of would not ask the same list of questions again and again, but rather change the list of remaining questions depending on the answer to former questions. Q: Do you prefer beef or tofu? A: Tofu. Q: Do you like firm or soft tofu? A: Firm etc. etc. I don't want to aks the user questions that are not relevant, like do you prefer your beef well done? What is the basic strategy for aksing the right questions at the right time while gathering information from the user? Thanks, Peder :) 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: Restricted Language Query/ Natural Language Parsing in Jess
Jason, Rich and Ernest: Actually, quite a bit of work has been done in this area. It followed shortly after all of the speech-pattern-recognition stuff started. A fellow named Sankar K. Pal started a program named MyPal wherein he would be able to retrieve sense from nonsense typed in from the keyboard. He gave a presentation way back in 1989 at UT Dallas in one of the M.I.N.D. conferences co-hosted by UT Arlington. Dr. Daniel S. Levine and Dr. Alice O'Toole from UTA were the moderators. They had top name guys from all over the world at the conference. [Gail Carpenter and Steve Grossberg were the top two names there but the US Naval Surface Warfare Depart was also well represented.] Dr. Levine is now in the Department of Psychology at UTA because that was the only department willing to fund his research. Anyway, Dr. Pal co-authored a book with Paul P. Wang. Amazon link is http://www.amazon.com/exec/obidos/ASIN/0849394678/inktomi-bkasin-20/ref% 3Dnosim/102-1084313-6504134 I found another book at (of all places) WalMart.com on Pattern Recognition software. http://www.walmart.com/catalog/product.gsp?product_id=1072257sourceid=1 500040820 Some earlier works by Sankar are available from the Indian Statistical Institute in Calcutta. http://www.wspc.com/books/compsci/4755.htm but, for some reason, this one is cheaper. Go figure... I guess that a Microsoft like costs more to put up than a Unix link. :-) http://www.wspc.com/books/compsci/4755.html Finally, if you act now, you can get one for only $9.95 (or so) on EBay http://half.ebay.com/cat/buy/prod.cgi?cpid=805831domain_id=1856ad=5398 3 enjoy. SDG jco James C. Owen Knowledgebased Systems Corporation Senior Consultant -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Morris Sent: Thursday, February 05, 2004 10:44 AM To: [EMAIL PROTECTED] Subject: RE: JESS: Re: Restricted Language Query/ Natural Language Parsing in Jess Hi Rich , Sort of. :-D If you look at the article in the link, you'll see how the researchers approached the problem. Basically, I would like to start a Jess application (that follows the Tax Advisor pattern, but isn't a Tax Advisor!) by allowing the users to enter a free-text problem statement -- like when you tell your doctor where it hurts. The doctor can then begin to make inferences about what type of problem you may have by parsing your input and pattern-matching it to syntactically similar, pre-parsed phrases that share the distilled semantics of the original input (if that makes sense), and then ask more leading questions to heuristically home-in on the solution. As an example, in a typical BNF production, I might have a definition problem_statement::= subjectverbend-mark so that a problems_statement is composed of a the non-terminals subjectverbend-mark in that order. And I might have a vocabulary like subject - I | You | We verb - ran | jumped | cried end-mark - . | ? | ! For all the possible combinations of these non-terminals and terminals (all productions), I'd have to construct a rule to deal with that production. If I understand the article right, what they did was to map the set of all the synonyms of each of the non-terminals to a key, and after doing this they composed phrases of these keys to store the generic semantics of the input, thereby collapsing the number of patterns for which they need to store a meaning. I just thought that it was a novel approach instead of parsing the string by brute force and trying to process the results with a gazillion rules. Hope that clarifies a bit. Regards, Jason Morris --- Morris Technical Solutions [EMAIL PROTECTED] www.morristechnicalsolutions.com fax/phone: 503.692.1088 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rich Halsey Sent: Thursday, February 05, 2004 4:06 AM To: [EMAIL PROTECTED] Subject: JESS: Re: Restricted Language Query/ Natural Language Parsing in Jess Hi Jason, In trying to reduce the description of your problem, I came up with the following: Use a Natural Language front-end for the user to interact with a rule-based Tax Advisor where the rules derive a solution to a query based on data derived from a free form input. Does this sound even close to what you want to do ?? Rich Halsey - Original Message - From: Jason Morris [EMAIL PROTECTED] To: Jess-Users [EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 7:07 PM Subject: JESS: Restricted Language Query/ Natural Language Parsing in Jess Hi All, Sorry for the long post, but this is an esoteric question... I am interested in adapting the Tax Form Advisor (using it almost like a OO design-pattern) by adding a component that can reason about information drawn from natural-language input as well as using restricted answers to hard-coded questions. To make the parsing problem more tractable, I began thinking of different ways that I could derive meaning
RE: JESS: Re: Restricted Language Query/ Natural Language Parsing in Jess
Jason: I think that what you might want to do is link the ANN parser, or a GA parser if you like, with the rules so that whatever was typed would make sense to the rules in the format that they were expecting. i.e., the parser would do the listening and the rules would do the thinking. :-) SDG jco James C. Owen Knowledgebased Systems Corporation Senior Consultant -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Morris Sent: Thursday, February 05, 2004 1:58 PM To: [EMAIL PROTECTED] Subject: RE: JESS: Re: Restricted Language Query/ Natural Language Parsing in Jess James, Thank you for all the good links! I figured that there was a lot more out there, and I feared that I wasn't making myself clear. Regards, Jason Morris - Morris Technical Solutions [EMAIL PROTECTED] www.morristechnicalsolutions.com fax/phone: 503.692.1088 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of James Owen Sent: Thursday, February 05, 2004 11:25 AM To: [EMAIL PROTECTED] Subject: RE: JESS: Re: Restricted Language Query/ Natural Language Parsing in Jess Jason, Rich and Ernest: Actually, quite a bit of work has been done in this area. It followed shortly after all of the speech-pattern-recognition stuff started. A fellow named Sankar K. Pal started a program named MyPal wherein he would be able to retrieve sense from nonsense typed in from the keyboard. He gave a presentation way back in 1989 at UT Dallas in one of the M.I.N.D. conferences co-hosted by UT Arlington. Dr. Daniel S. Levine and Dr. Alice O'Toole from UTA were the moderators. They had top name guys from all over the world at the conference. [Gail Carpenter and Steve Grossberg were the top two names there but the US Naval Surface Warfare Depart was also well represented.] Dr. Levine is now in the Department of Psychology at UTA because that was the only department willing to fund his research. Anyway, Dr. Pal co-authored a book with Paul P. Wang. Amazon link is http://www.amazon.com/exec/obidos/ASIN/0849394678/inktomi-bkasin-20/ref% 3Dnosim/102-1084313-6504134 I found another book at (of all places) WalMart.com on Pattern Recognition software. http://www.walmart.com/catalog/product.gsp?product_id=1072257sourceid=1 500040820 Some earlier works by Sankar are available from the Indian Statistical Institute in Calcutta. http://www.wspc.com/books/compsci/4755.htm but, for some reason, this one is cheaper. Go figure... I guess that a Microsoft like costs more to put up than a Unix link. :-) http://www.wspc.com/books/compsci/4755.html Finally, if you act now, you can get one for only $9.95 (or so) on EBay http://half.ebay.com/cat/buy/prod.cgi?cpid=805831domain_id=1856ad=5398 3 enjoy. SDG jco James C. Owen Knowledgebased Systems Corporation Senior Consultant -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Morris Sent: Thursday, February 05, 2004 10:44 AM To: [EMAIL PROTECTED] Subject: RE: JESS: Re: Restricted Language Query/ Natural Language Parsing in Jess Hi Rich , Sort of. :-D If you look at the article in the link, you'll see how the researchers approached the problem. Basically, I would like to start a Jess application (that follows the Tax Advisor pattern, but isn't a Tax Advisor!) by allowing the users to enter a free-text problem statement -- like when you tell your doctor where it hurts. The doctor can then begin to make inferences about what type of problem you may have by parsing your input and pattern-matching it to syntactically similar, pre-parsed phrases that share the distilled semantics of the original input (if that makes sense), and then ask more leading questions to heuristically home-in on the solution. As an example, in a typical BNF production, I might have a definition problem_statement::= subjectverbend-mark so that a problems_statement is composed of a the non-terminals subjectverbend-mark in that order. And I might have a vocabulary like subject - I | You | We verb - ran | jumped | cried end-mark - . | ? | ! For all the possible combinations of these non-terminals and terminals (all productions), I'd have to construct a rule to deal with that production. If I understand the article right, what they did was to map the set of all the synonyms of each of the non-terminals to a key, and after doing this they composed phrases of these keys to store the generic semantics of the input, thereby collapsing the number of patterns for which they need to store a meaning. I just thought that it was a novel approach instead of parsing the string by brute force and trying to process the results with a gazillion rules. Hope that clarifies a bit. Regards, Jason Morris --- Morris Technical Solutions [EMAIL PROTECTED] www.morristechnicalsolutions.com fax/phone: 503.692.1088 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rich
JESS: Question on Rete
First, my deepest and most humble apologies to Ernest. You know how you always mean to do something but you keep putting it on the back burner because it doesn't produce income and has very few repercussions if you don't do it? Well, that's what happened when Ernest and I were discussing the 1982 article on Rete. I finally went and looked up the article and Ernest was right. 20+ pages and it was a fairly good presentation. Again, my apologies. Second, Question on JIA: On page 141 you state, The runtime will be proportional to something like R'F'^P', where R' is a number less than R, the number of rules; F' is the number of facts that change on each iteration; and P' is a number greater than one but less than the average number of patterns per rule. So, let's say that we have 1,000 rules, an average of 10 facts change on each cycle (that's a lot from my experience) and the average number of patterns per rule is 10; again, a fairly high number but not unreasonable. (We could just say that the rules were written by a BA rather than a KE.) And let's say that my computer is a 2GHz P4, single CPU. What will be the run-time? Just as a guess, let's say that 18,000 rules will fire; which should probably figure in there somewhere. What number should we use for R'? What number should we use for P'? Just curious. Finally, have you done any tests with Jess using multiple processors? Such as a dual G5 Mac or a Sun? SDG jco James C. Owen Knowledgebased Systems Corporation Senior Consultant 6314 Kelly Circle Garland, TX 75044 972.530.2895 214.684.5272 (cell) 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: Help on Jess under the hood! :) ..
Not to be a nit-picker, but the Ph.D. dissertation was 1979. The 1982 reference is a four-pager in AI magazine that had, basically, the same title. Since then, to my knowledge, Dr. Forgy has not published anything on the subject of the Rete algorithm. SDG jco -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dusan Sormaz Sent: Wednesday, November 05, 2003 6:40 PM To: [EMAIL PROTECTED] Subject: Re: JESS: Help on Jess under the hood! :) .. Mechanism for saving patterns and matchings is rete network. Done by Charels Forgy in his dissertation (1982-3). Good explanation in JIA book, chapter 8. Dusan Sormaz At 05:56 PM 11/5/2003 -0600, you wrote: Hi everybody ... Let assume the following rule base rb, function save, and working memory wm: rb = { (defrule r1 (foo ?x ?y) (bar ?y ?z) = (save ?x ?y ?z)) } wm = {(foo p q), (bar q w), (bar q t)}. Now, it is easy to see that the first and second facts in wm, (foo p q) (bar q w), filter all the way down to the bottom of the rete network, associated to this example, and then become a new activation record. In other words when rule r1 fires, then the tuple {p,q,w} is going to be saved. Right ... based on the current example: Q1. What kind of data structure Jess uses for partially storing the facts (foo p q) (bar q w) activating r1? Q2. Given that the facts (foo p q) (bar q t) activate r1 as well, which Jess' method (class) is in charge of iterating over the working memory for finding more facts, like (bar q t), that activate r1 as well? Q3. How, tecnically speaking, Jess manages for not testing again facts which were already used for activating a rule? Q4. By looking at this example one can see that the fact (foo p q) is in some sense partially kept in Jess' mind in order to test facts like (bar q w) and (bar q t) which can activate rule r1. Therefore my question is which strategy, tecnically speaking, is implemented in Jess for partially keeping in mind facts such as (foo p q) in order to test complementary facts such as (bar q w), (bar q t) that could potencially activate a given rule? Finally, regarding Q4 I know that the overall proccess can be explained via a forward chaining. Nevertheless, how Jess under the hood deals with this issues? thank you Jose Antonio 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] *** * Duan ormaz, PhD, Associate Professor * Ohio University * Industrial and Manufacturing Systems Engineering Department * 277 Stocker Center, Athens, OH 45701-2979 * phone: (740) 593-1545 * fax: (740) 593-0778 * e-mail: [EMAIL PROTECTED] * url: http://www.ent.ohiou.edu/~sormaz ***
RE: JESS: Retractions through Rete object trouble!
Or, maybe you can intern() the String(s) that you created you can probably find the problem. Maybe. SDG jco -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, October 10, 2003 7:57 PM To: [EMAIL PROTECTED] Subject: Re: JESS: Retractions through Rete object trouble! Well, the thing to do ies to get an instance of both an apparently good and bad Java string together, and compare them one character at a time, like String good = ... String bad = ... for (int i=0; igood.length(); ++i) if (good.charAt(i) != bad.charAt(i)) System.out.println(DIFF: + (int) good.charAt(i) + + (int) bad.charAt(i)); and see if you can figure out the mismatch that way. I think Jordan Willms wrote: Hi there. I am communicating with the Jess engine using Java, and I've noticed some altogether strange behaviour with Fact retractions (which I have no doubt is my fault). I come to the mailing list as a last resort. I am quite experienced with Jess/Java integration, which is why this problem is very confusing to me. Firstly, take the following retraction string, I run it in WinJess with no problems : (retract-string (PropertyValue http://echo.iat.sfu.ca/owl/psychoacoustics.daml#hasDirectionality http://echo.iat.sfu.ca/owl/psychoacoustics.daml#AShok http://echo.iat.sfu.ca/owl/psychoacoustics.daml#DirectionalityPointSourc e) ) But, the same string, generated from a rdf file : ?xml version=1.0 encoding=ISO-8859-1? rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns:daml=http://www.daml.org/2001/03/daml+oil#; xmlns:ns1=http://echo.iat.sfu.ca/owl/psychoacoustics.daml#; xmlns:rdfs=http://www.w3.org/2000/01/rdf-schema#; xmlns:xsd=http://www.w3.org/2000/10/XMLSchema#; rdf:Description rdf:about=http://echo.iat.sfu.ca/owl/psychoacoustics.daml#AShok; ns1:hasDirectionality /rdf:Description /rdf:RDF which looks exactly the same (here is my debug) window (does not work?): [echoEdit] Retract String: (retract-string (PropertyValue http://echo.iat.sfu.ca/owl/psychoacoustics.daml#hasDirectionality http://echo.iat.sfu.ca/owl/psychoacoustics.daml#AShok http://echo.iat.sfu.ca/owl/psychoacoustics.daml#DirectionalityPointSourc e) ) when I do : Value v = rete.executeCommand(retractString); // retractString is the above string System.out.println(v.toString()); prints FALSE! PART 3 : The real wierdness : I put together the following code: Rete rete = myThread.getJessEngine(); Value v = rete.executeCommand((retract-string \(PropertyValue http://echo.iat.sfu.ca/owl/psychoacoustics.daml#hasDirectionality http://echo.iat.sfu.ca/owl/psychoacoustics.daml#AShok System.out.println(value v : + v.toString()); // Prints out TRUE! So, obviously something is wrong with the fact string that I am trying to create from the RDF file. BUT -- IT'S EXACTLY THE SAME! So, why is this happening? Can anyone shed any light on this problem. I feel like I'm taking crazy pills. Thank you very much. ..Jordan Willms. rdf:resource=http://echo.iat.sfu.ca/owl/psychoacoustics.daml#Directio nality PointSource / http://echo.iat.sfu.ca/owl/psychoacoustics.daml#DirectionalityPointSou rce)\ )); 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 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: Aspects and rules (was RE: JESS: Jason Morris interview)
Yo Richard et. al. You said-- Is it not true that a rules-based system (while even running the same rules and the same data) can have the facts (data) asserted in a different order ?? This could (possibly) lead to (the same) rules triggering in a different order. Is this not called non-determinism ? I say-- NO. Same data, same rules, same engine, same result. State machine. Change the data, change the rules, change the engine and you might/probably will get a different result. For example, LEX and MEA do NOT fire the same rules necessarily and, ergo, will not reach the same conclusion necessarily. JRules is LEX while most others are MEA so you might or might not get the same result with a different engine. But, back to the original supposition (Same data, same rules, same engine) if you don't get the same result then you have a real problem. SDG jco -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rich Halsey Sent: Tuesday, October 07, 2003 2:04 PM To: [EMAIL PROTECTED] Subject: Re: Aspects and rules (was RE: JESS: Jason Morris interview) Yo James. With respect to the part below: Another email is coming concerning that procedural vs. declarative programming paradigm part of this thread later today. Richard Halsey calls it deterministic vs. non-deterministic but I think that all computer programs are state machines (well, they ARE!) and that any program is deterministic such that with the same rules and the same data you get the same result, otherwise it would be chaos and I don't subscribe to the chaos theory. (Mostly because I don't understand it. :-) Is it not true that a rules-based system (while even running the same rules and the same data) can have the facts (data) asserted in a different order ?? This could (possibly) lead to (the same) rules triggering in a different order. Is this not called non-determinism ? A procedural (deterministic) system would probably march through the same procedures (in the same order) no matter how the data was presented. Of course, the data has to be presented in a usable fashion at the time of execution. With respect to AspectJ (and rules), I want to look at how certain concerns may be related simultaneously to different rule sets (via the conditional testing of a data relationship) and learn to apply the cross-cutting they speak of in AspectJ. Do we do it by the sequential execution of the different rule sets or do we do it by the joins/joinpoints of data ?? It may add yet another dimension to rules engineering that has not yet been addressed by the community. I don't think this is a see spot run problem. I be go back to sleep now ! Bubba - Original Message - From: James Owen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 07, 2003 10:20 AM Subject: RE: Aspects and rules (was RE: JESS: Jason Morris interview) I stands all I can stands and I can't stands no more! (Popeye the Sailor Man) As most of you may (or may not) know, we have a fairly active Java Metroplex User Group (http://www.JavaMUG.org) here in the DFW area. One of our members (George Lawniczak)is totally sold on Aspect Oriented Programming (AOP) and gave a two hour talk way back on August 27th on the advantages and benefits of AOP. George is also a MicroSoft Maven but, then, we all have our skeletons in the closet. Some of the advantages that he covered were 1. Multiple Inheritance, even allowing the dreaded diamond effect 2. Removing objects from scope or putting them into scope willy nilly 3. The power to not inherit some attributes from a parent class 4. Changing inheritance of a class from one to another 5. Making all or some of the AOP advantages available to all members of the project 6. Event-driven type programming, i.e., triggers 7. Dynamically have classes/objects inherit or not inherit on the fly 8. Rules don't care what happens outside of the rules. When we get the stuff it's static. etc., etc., etc. One of the selling features of Java, originally, was getting rid of multiple inheritance and moving it over, or up, to an interface. An interface is, after all, a design concept rather than a construction concept. (Thanks, Hafedh.) The other advantages really went out into the Twilight Zone, taking over from the basic Java compiler and saying that, from now on (for this project) we will have thus and so, thereby putting these things in the hand of all programmers on the project. On the positive side: On a small, tightly-coupled project, I could see using that kind of power. Maybe. If we really needed it. On a large project with lots of newbies all I could see was disaster and mayhem. Didn't we have lots of power with C/C++ programming? And wasn't it really tough to get newbies to learn to code properly? After all, most of us had to memorize Scott Meyers 85 rules (contained in two books) in order to properly code a C++ project
RE: Aspects and rules (was RE: JESS: Jason Morris interview)
Ernest et. al. I must not have made myself clear. Same rules (in the same order), same data (in the same order), same engine (same version and release date) THEN results should be the same. A state machine, by definition, returns the same result for the same set of circumstances. Change the rules, change the data, change the order, then you do NOT have the same beginning state. Arrival time of facts or data is part of the data state. Besides, in a computer there is no such thing as a random number. Given the same seed and the same algorithm you will always get the same number. Randomness is a human thing, not a machine thing. :-) BTW, some rule engines do NOT use threads. This is so that they can be used without change as a J2EE bean in an EJB environment. JRules is (I think) threaded while OPSJ definitely isn't. Neither is (I think) Advisor. I can check on all of this if necessary. Just depends on the guy(s) who wrote the stuff as to what they wanted to do and how. SDG jco -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, October 07, 2003 4:23 PM To: [EMAIL PROTECTED] Subject: Re: Aspects and rules (was RE: JESS: Jason Morris interview) I think James Owen wrote: ... But, back to the original supposition (Same data, same rules, same engine) if you don't get the same result then you have a real problem. Only if time is part of the data. In a multithreaded environment (a.k.a. a real-world environment) this isn't true. As long as data is arriving asynchronously from rule execution, the ordering of arrival of facts can change the outcome. Only if a rule engine is running in a single, self-contained thread can this be considered to be true. Otherwise, any rule like if X and not Y will fire differently depending on the order in which X and Y arrive, because if X gets there first, then at one point, X is true, but not Y. This is how the real world works. Remember the TV commercials in which the hapless diner eats something nasty and then whacks herself on the forehead in realization and exclaims, I could have had a V8! If the V8 cart had arrived before the hot-dog cart, the outcome would have been different; but in the real world, either outcome is equally likely. There's also the old puzzle about the man with two girlfriends who live at opposite ends of town, and he takes the first train that arrives randomly to visit either girlfriend. But he sees one 9 times more often than the other. Why? Because the trains run ten minutes apart, one on the nines, the other on the tens. He's only got a one-minute window in which he'll get on the tens train. In a static production-system world, he'd visit both equally often. In the real world, not so much. Now, this single, self-contained thread model is actually very common in the rule-engine biz; most commercial rule engines assume that you'll stuff in some objects, run the engine, and then extract the results. You can use Jess this way, but you can also have the data arrive continuously and asynchronously while processing continues. This isn't the classical model of a production system anymore, but it's a much more useful model in real software. - 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: AspectJ and Rules
Title: Message I know that we've beaten this to death, so I'm going to send this and I will NOT reply to any more email on the subject.. Is it not true that a rules-based system (while even running the same rules and the same data) can have the facts (data) asserted in a different order ?? This could (possibly) lead to (the same) rules "triggering" in a different order. Is this not called "non-determinism"? If the facts (data) are asserted in a different order THEN YOU HAVE CHANGED THE BEGINNING STATE OF THE PROBLEM. I don't know how else to say that a state machine MUST produce the same result if the beginning state is the same. Must. No other answer. Must. By definition. And a rulebased system and any other computer program is, by definition, a state machine. SDG jco -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rich HalseySent: Tuesday, October 07, 2003 5:27 PMTo: [EMAIL PROTECTED]Subject: JESS: AspectJ and Rules w/r/t the following, I think Dr. Friedman-Hill said all that needs to be said on the subject. You said--Is it not true that a rules-based system (while even running the samerules and the same data) can have the facts (data) asserted in adifferent order ?? This could (possibly) lead to (the same) rules"triggering" in a different order. Is this not called "non-determinism"?I say--NO. Same data, same rules, same engine, same result. State machine.Change the data, change the rules, change the engine and youmight/probably will get a different result. For example, LEX and MEA do NOT fire the same rules necessarily and,ergo, will not reach the same conclusion necessarily. JRules is LEXwhile most others are MEA so you might or might not get the same resultwith a different engine. But, back to the original supposition (Samedata, same rules, same engine) if you don't get the same result then youhave a real problem.
RE: JESS: Subrules
I'm thinking that this isn't declarative programming but more of a procedural approach to problem solving. In declarative programming, theoretically anyway, each rule should be incrementally independent as much as possible. By putting the rules in a situation like that shown below usually shows that the solution is not declarative but procedural. If ruleA is true then check ruleB means that ruleB is dependent on ruleA. Rather the data of ruleB might have some data that is modified by ruleA, then that would be declarative. Maybe what you really want here is rule sets where a rule set is activated only during the firing of certain rules. Yes, I know: That isn't much different in practice but the thinking behind it is significantly different. SDG jco -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Judson, Ross Sent: Tuesday, August 26, 2003 10:10 AM To: [EMAIL PROTECTED] Subject: JESS: Subrules From the wish-list department: I'd sure like it if, in the action portion of a rule definition, I could define new rules. Sort of like this: (defrule i-am-a-rule (condition 1) (condition 2) = (defrule subrule-1 (condition) = (action)) (action) ) or (defrule subrule-2 extends i-am-a-rule (condition) = (action)) When you're dealing with a lot of rules, this kind of thing can really help set up more complex nested if-then-if-then type stuff. In addition, it would be cool (don't you love hearing that ;) if you could do this, instead of using salience: (defrule rule-3 (declare (overrides i-am-a-rule)) (condition) = (action)) The effect of that would be that for any given set of facts, if both rule-3 and i-am-a-rule are activated, rule-3 fires, eliminating the activation of i-am-a-rule. For a general and somewhat more specific rule that can match on the same set of facts, there is no way to avoid using salience to perform the discrimination, unless you break the matching up and use signaling facts. This is somewhat undesirable. RJ 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 Java
I am going to storm this mailing list with questions. Please don't. RTFM (Read the Fabulous Manual) first. Got through some old emails. Hire a tutor. Anything but a firestorm of newbie questions that have been answered already. Look here first for the answer http://herzberg.ca.sandia.gov/jess/FAQ.shtml . :-) SDG jco -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jagadeesan,Sivakumar Sent: Monday, August 25, 2003 11:21 AM To: '[EMAIL PROTECTED]' Subject: RE: JESS: Jess Java Hey All: This is my first Post. I never had any experience with Rules Engine. The project that I am currently working is using Home Grown Rules Engine. My Friend Prasath ([EMAIL PROTECTED]) developed the Rules Engine single handedly. His Rules Engine uses Excel for defining Rules. I was very much interested in knowing about Rules Engine. After searching in Net , I found about Jess. So I went to borders (Bookstore in US) and got JIA. It was great book for beginners like me. It gave a very good introduction about Rules Engine.I am half way through the book. So be ready people, I am going to storm this mailing list with questions. But importantly I will do my best to help others in this mailing list. Rgds, --Siva Jagadeesan http://java2simple.blog-city.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, August 24, 2003 7:52 PM To: [EMAIL PROTECTED] Subject: Re: JESS: Jess Java I think [EMAIL PROTECTED] wrote: I am working with Jess and Java code together, and have created a string in Java, with the highly original name string1 which is defined as foo. How do I assert, working from Java, a fact in Jess based on the value of the string? If I was working in Jess, this particular case would be equivalent to: (assert (stringfact foo)) This is an ordered fact. Constructing and asserting them from Java is covered in JIA on pages 313-314, and in the Jess 6.1 manual in section 4.7.3 . Thanks in advance. Ed Wysocki - 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] 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: Handling Time
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Instead of using java.util.Date, you might try java.util.Calendar. Calendar allows after(), before() or equals(), all of which return a boolean. Calendar also has returns Date getTime() and setTime(Date) if those are already in your code somewhere. Just a thought. :-) SDG jco - -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Judson, Ross Sent: Thursday, August 14, 2003 12:13 PM To: [EMAIL PROTECTED] Subject: JESS: Handling Time It's a little frustrating working with time in Jess. You can store a time as a java.util.Date, but then you can't compare it with , , etc...if you work with it as a long, then you can't call + and other math functions; they change the number into INTEGER. If you work with time as ms/1000, then you lose a lot of accuracy. Any suggestions on how best to handle time? I have a few specific ones: 1. Extend , , etc. to work with Comparable objects. 2. Instead of printing ExternalAddress and so forth when printing out fact lists, use an extra slot descriptor to indicate that toString() should be called on the object in the fact slot, and that used as the text to represent the object. 3. Extend + and other math functions to work with LONG values. RJ - 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] - -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.8 for non-commercial use http://www.pgp.com iQA/AwUBPz0Gd9xsw6qfZxRLEQLZ4wCfTI/sPGW9tcqKE7F7TsWYYF+d3CIAmwcV 3xDdHIvsC4+LSJeZpFlNpHDx =0ULf -END PGP SIGNATURE- 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: Querying a fact
Excuse my buttinsky but I haven't responded to a Jess email in a really long time and I was having withdrawal symptoms. ;-) Anyway, it would seem that a rulebase is the wrong tool to use for your problem UNLESS you just want to prove your point. (I once had a friend who wrote a word processor in COBOL just to prove that he could do it.) Normally a rulebase is used when the code is not procedural, when the problem set is extremely complex, when the rules are subject to frequent change, etc., etc. (See the book.) What you have described *_seems_* to be more of a procedural problem that is normally best solved using procedural code, such as C, Pascal, C++ or Java rather than a declarative language, such as Jess. (I know: C++ and Java are OO. But they are not declarative.) This is something that I see quite often. A rulebase is a really cool tool so I've seen it used for GUI data validation, small sets of rules to manage data flow that was static in nature, and lots of other poor uses. Usually with lots of priorities (more than three is lots) because the solution to the problem really was procedural in nature, not declarative. The very fact that you will have to add an extra condition to the rules should not dramatically affect the performance. I you time it both ways, you will probably find that this adds very little to the overall time used. SDG jco -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Raoul Jdrvis Sent: Wednesday, August 06, 2003 8:48 AM To: [EMAIL PROTECTED] Subject: RE: JESS: Querying a fact Thank you for your reply. Unfortunately I cannot use this method since there are cases when a rule has to be fired more than once. There are cases when there are cycles in the graph with cycle length bigger than one (i.e. no node will point to itself directly). Rules have stop conditions to prevent them looping indefinetly. So I've used timestamp slot in facts that are updated when the fact is (re)evaluated and have a test condition on the LHS that checks that the fact's arguments' timestamps must be bigger than the fact's own timestamp. It means an extra condition to check but I guess it's the only way to achieve what I am trying to do ? (and at least the test evaluation should be faster than the extra firing of the rule). Best regards, Raoul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 4:37 PM To: [EMAIL PROTECTED] Subject: Re: JESS: Querying a fact The general trick is to write the rule such that it doesn't match after the value is set; i.e., ;; default value is the symbol UNDEFINED (deftemplate formula (slot ...) (slot value (default UNDEFINED))) (defrule set-value ?f - (formula ... (value UNDEFINED)) = ;; Fact won't match this rule anymore (modify ?f (value 37))) Jess 7 is going to provide other ways of dealing with this particular situation. I think =?iso-8859-4?Q?Raoul_J=E4rvis?= wrote: [Charset iso-8859-4 unsupported, filtering to ASCII...] Hello, I have the following small problem: I am using rules to perform computation on a set of formulas. Basically for every fact I have a rule that specifies how to calculate the value (slot) for this fact. So on the LHS of the rule I am binding the facts whose values are used/needed as arguments for calculating the fact's value. Once the value is calculated I need to modify the fact to update its value. So my question is, how can I bind the fact to be calculated on the RHS? If I bind it on the LHS of the rule, then the modification of the fact by the same rule will put the rule back on the agenda and it will be fired again, although the argument facts that would affect the calculation result have not changed. So basically every rule is fired one extra time. How can I prevent that. Can I bind the fact that I'm calculating on the RHS or are there any other solutions for this problem? Thank you in advance, Raoul - 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: Jess IDE - Eclipse plug-in
Well, one final bleat and then I'm going back to work. :-) Being an advocate of vi on Unix and Slick Edit on WinDoze, I was forced (almost at gun point) to use Eclipse the first time. I hated it so much that I refused to find anything good about for the first two or three weeks. Constantly harping about this and that and the other to no end. And to no avail, I might add. HOWEVER - after that period of initial rebellion, I found that Eclipse was better than ANY other IDE that I had used previously. The really tight integration with Ant and CVS convinced me. Also, I can have a plug-in for Jess, OPSJ, CLIPS or any other rule engine (or all) without charge. Today, it's my editor of choice. Yes, I'm Java-centric. And I like it that way and I intend to stay that way. SDG jco James C. Owen Knowledgebased Systems Corporation Senior Consultant -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brad Cox, Ph.D. Sent: Tuesday, July 29, 2003 11:17 AM To: [EMAIL PROTECTED] Subject: Re: JESS: Jess IDE - Eclipse plug-in On Tue, 2003-07-29 at 11:11, un ethix wrote: My personal thoughts on this are, not knowing what eclipse is (apart from a 'general IDE'), and not wanting to use Jess for large scale development efforts, I am naturally against being constrained to having to learn how to use and download something like Eclipse in order to have a Jess IDE. Mind some advice from someone who was making the very same arguments a very short while ago? Don't waste another minute believing (as I did) that tools like vi/emacs/make/ant are good enough. Download it and learn it. Do it now. The benefits are huge but hard to describe concisely so I won't even try. The costs are roughly these: (1) telephone charges for a one-time overnight download which needn't be supervised; just let 'er rip while you sleep (not sure what those are in the UK, zero in my case via cable modem), (2) a RAM upgrade to around 500mb at about $200; don't try with much less, and (3) about a week of learning time, mostly spent convincing yourself that eclipse terminology (ie. workspace) maps directly to stuff you already know (project directory). 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: Newbie needs help
Brad: Using Jess to test Java code is significantly different than using JUnit to test Jess rules. It should prove interesting, to say the least. :-) SDG jco James C. Owen Knowledgebased Systems Corporation Senior Consultant -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brad Cox, Ph.D. Sent: Friday, July 25, 2003 12:38 PM To: [EMAIL PROTECTED] Subject: RE: JESS: Newbie needs help On Fri, 2003-07-25 at 11:43, James Owen wrote: As one who has used JUnit to test rules in a production environment: Yes, you can write JUnit classes for testing purposes to test the rules. However, as the number of rules and the number of variable increase the number of test cases rise dramatically. Geometrically to be more specific. Or is that exponentially? Either way, it's a TON of test cases. Yes, but I'm going at it the other way around, using Jess rules to organize/apply test cases to Java code, not using Java test cases to test a rule base. Arguably the same thing in the long run but it still seems different somehow. Think of inspection gauges in musket manufacturing. There was a rules base (the inspector), a box of unorganized test cases (box of inspection gauges), and a stream of implementations (musket parts) that might or might not comply with their specification. They never tried to build gauges to test every possible dimension; just critical dimensions, intelligently selected, relying on inspectors common sense for everything else. If it was feasible to build life-critical systems that way (things that can literally blow up in your face), seems like we (software) might give it a shot too. 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: Open Source Java IDE
Well, a month later someone reads his back email and replies. (moi) Never having used IDEA (but having used many, many other IDE programs and editors) I found that paying $500 for some of these just to throw them away a couple of years later OR to not be able to use them on the next job because everyone had standardized on another tool, was not really financially feasible. Let's see: IDEA is $499. Eclipse is free. Guess which wannabe I'll use next time? :-) BTW, for those looking around, Eclipse is not really intuitive. It takes a bit of getting used to in order to use effectively. However, once you get the basics down, it's great. I was forced to use Eclipse on a recent job where they used all of the free software that they could get (yes, Richard, that one) and after a month or so, I really liked it. Still use it for my personal projects. SDG jco -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, June 30, 2003 9:39 AM To: [EMAIL PROTECTED] Subject: Re: JESS: Open Source Java IDE I think sorokinru wrote: Hello jess-users, I understand that this question is not quite correct, but I whant to know jess-users opinion that I rate much highly. Shortly, what is a best free open-source Java IDE? Eclipse (www.eclipse.org) is the best open-source IDE, without question. The editor is very nice and very smart, and it has good integration with JUnit, Ant, and CVS right out of the box. Eclipse is, however, really just a wan imitation of IntelliJ IDEA (www.intellij.com.) The one place where Eclipse is better than IDEA is in the availability of third-party extensions (plug-ins) -- there are many more available for Eclipse. But in terms of core functionality, IDEA reigns. - 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: not CE
Just to amplify what Ernest said below, let's assume that you are checking to see if something does not exist. For example, we are asking if there are NO red sports cars in the lot that have a 300hp or greater motor. If there are no red sports cars like that, does the car have a radio? Or, if there are no red sports cars like that, what is the hp of the motor? Either question is nonsense since there are not red sports cars to check. :-) SDG jco James C. Owen Senior Knowledgebase Consultant 6314 Kelly Circle Garland, TX 75044 972.530.2895 214.684.5272 (cell) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, June 17, 2003 10:40 AM To: [EMAIL PROTECTED] Subject: Re: JESS: not CE I think Maxim Tretyak wrote: Hi 1. This is rather suggestion. I am frequently use fact ID as a slot value to refer to fact (looks like foreign key). But in cases when there is need to check an absence of referred fact I can't do this in LHS due to a not CE incapacity to binding to a variable. So I'd like to have this opportunity. When a pattern has a pattern binding, it is a fact that matches the pattern that is bound to the variable. In the scenario you're describing, what would the variable be bound -to-? 2. Why after retracting the (a) a test rule have not turn to agenda? Sorry, I don't have access to a copy of Jess to test this today; I'll get to it later this week. - 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: Refraction
w.r.t. the statement below, [Don't think there's such a thing as The Refraction Principle; Jess has a particular behavior w.r.t. refraction, and other such behaviors have been proposed.] Hmmm... This is something that I had not realized until now. However, section 2.8.1.3 of the Jess manual explains that there are two available conflict resolution strategies, basically LIFO and FIFO. Refraction, MEA and/or LEX are not discussed. Only breadth and depth strategies, along with salience (sometimes called priority in other systems) are discussed. However, most of the AI books at my disposal (and most commercial inference engines) implement either LEX (Lexical) or MEA (Means Ends Analysis) conflict resolution strategies. Most of them, with one notable exception, use MEA. If anyone want a listing of those books I would be happy to provide them. Both MEA and LEX have as their first item on the conflict resolution table the refraction principle, in that a rule (where a rule = logic+data) that has fired is removed from the agenda table and never returned. This seems to be a basic principle even in such older systems as Expert (a backward-chaining system from Neuron Data) as well as the newer incarnations such as OPSJ, JRules and Blaze Advisor. I know it was the first principle for all of the OPS systems from which our present-day engines seem to have been derived. So. My question is this: Considering that most inference engines do have refraction as the first item on the conflict resolution, is there a reason that the conflict resolution in Jess does NOT include refraction as the first principle? Or at all? I would say all other inference engines but I'm not intimately familiar with all of them - but all of the ones with which I do have experience use refraction as the first item on the conflict resolution system. One last thing: I took the survey indicated without reading the line below that says (or seems to indicate) that per slot activation is the same thing as refraction - Maybe I'm dense (Shut up Richard! You too Joe!) but I can't see the relationship between per slot activation and refraction as a means of conflict resolution. SDG jco James C. Owen Senior Knowledgebase Consultant 6314 Kelly Circle Garland, TX 75044 972.530.2895 214.684.5272 (cell) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, June 16, 2003 11:08 AM To: [EMAIL PROTECTED] Subject: Re: JESS: Refraction I think Emmanuel Bonnet wrote: Hi, It seems that the refraction principle is not implemented yet in Jess. I have seen it as a Proposed Feature in the archives ( JESS: Proposed feature , 6 Jan 2003). Don't think there's such a thing as The Refraction Principle; Jess has a particular behavior w.r.t. refraction, and other such behaviors have been proposed. Does anybody knows : . if it will be implemented in the near future ? Take the Jess Development Roadmap survey (see link on home page at http://herzberg.ca.sandia.gov/jess). The feature you're interested in is called per-slot activations in that survey. . how I can simulate that behavior in the current Jess Version ? You can't, really. Regards, Emmanuel - 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: when functional language is better that structuredlanguage ?
Just to add fuel to the fire. :-) Jess (et. al.) are (as has been stated here earlier) a declarative language, not a procedural language. Back in 1999 I had a friend who was trying to write a program for a lawyer to do jury selection. His problem with using Java was that he was trying to do an iterative loop around either if-then-else or case statements so that he could re-evaluate some clauses (Conditional Elements) that might change after the initial evaluation (firing) of the clause. When I explained that a rulebase was, by nature, non-monotonic (unlike Java) he was thrilled and immediately began using that because it suited his purposes much better. That's one. Secondly, most business analysts give a problem to the witches and warlocks in the IT department and hope that whatever magic spell that they can cast or cauldron of brew will cure their ills. Because the BA's normally cannot read code, their only recourse to see if the IT department was successful is to try and write enough test cases to see if it will do what they wanted. Some rulebased systems are fairly self-explanatory in nature - to the extent that a non-technical BA can actually read the code; and change the code, if necessary, without having to get help from IT. (No, I do NOT recommend that BA's write a rulebase; not more than I would recommend that a BA write a database which is a much easier job.) So, there you have two good reasons. I need more coffee and I have to mow the yard this afternoon and I really should let the rest of the Jess users say something... :-) SDG jco James C. Owen Senior Knowledgebase Consultant 6314 Kelly Circle Garland, TX 75044 972.530.2895 214.684.5272 (cell) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Saturday, June 07, 2003 12:38 AM To: [EMAIL PROTECTED] Subject: JESS: when functional language is better that structured language ? Hi, I have a basic question could u please tell me that what kind of problems can be easily solved using functional languages like Lisp or Jess rather than using a structured language like C or Java. Thanks and Regards, Kaushik Dutta * * * The information contained in this message is legally privileged and confidential information intended only for the use of the addressed individual or entity indicated in this message (or responsible for delivery of the message to such person). It must not be read, copied, disclosed, distributed or used by any person other than the addressee. Unauthorised use, disclosure or copying is strictly prohibited and may be unlawful. Opinions, conclusions and other information on this message that do not relate to the official business of any of the constituent companies of the TATA CONSULTANCY SERVICES shall be understood as neither given nor endorsed by the Group. If you have received this message in error, you should destroy this message and kindly notify the sender by e-mail. 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]
RE: JESS: more efficient jess debugging
Please forgive me if I seemed to dis the XP concepts. Unfortunately for me, most of the guys with whom I work are part of the XP world. I think one of the major XP proponents includes Dr. Martin Fowler of Thoughtworks and most of the MicroSoft Mavens. Some of the older Unix guys tend to be isolationists, know-it-alls and grouchy old curmudgeons. We shouldn't be, but we are. I seem to work best with four walls, no windows, the door shut and some classical guitar music. I've been known to work for three or four hours straight before getting another cup of coffee. There are times when I reach a state of concentration that it feels like I am actually part of the code - I know every variable, every method, every class - and I can almost feel the ripple effect when I change any part. Spooky. :-) Yes, I still firmly believe that full requirements and architectural design should precede any coding efforts. Resist the urge to code. I guess XP is OK for a team concept, but I find it difficult to think with someone constantly yammering in my ear. :-) And you're right about the testing concept. (Of course!) You should write one test then write the code and then refactor mercilessly until it's as close as you can get it. Per XP. Unfortunately, on a previous project, the approach was that we would write the tests (bunches of them) and then start writing code to match the tests. Before the rules were actually written. (Now that was spooky!) Problem: The guys who wanted to write the tests (the testing team using JUnit) had no idea of how to write a test for a rule. So, they just started writing stuff that looked right based on some sample code that worked. And, of course, it was all wrong the next day. Having a testing team who does not understand declarative code (and very little about Java) is definitely a prescription for failure. Having a testing team who has the duty to write JUnit test suites (as part of their defined objectives on the project plan) who do not understand the business is another prescription for failure. Back to work. SDG jco James C. Owen Senior Knowledgebase Consultant 6314 Kelly Circle Garland, TX 75044 972.530.2895 214.684.5272 (cell) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 7:10 AM To: [EMAIL PROTECTED] Subject: Re: JESS: more efficient jess debugging I think James Owen wrote: My only experience with JUnit was a bit of a disappointment. JUnit is designed for testing procedural code, not declarative statements. The JUnit tests that we ended up writing were hand-coded. JUnit is definitely for testing procedural code. I wasn't suggesting that we want to use JUnit for Jess; I was suggesting that I would be interested in creating JessUnit, using the XUnit family of testing tools as a model. BTW, most JUnit tests -are- hand-coded. I guess that the thing is that JUnit is part of the XP concept. This means that after you gather ALL of the requirements then you write ALL of the tests - before writing the first line of code. Then, if the code doesn't pass the tests, it's bad. The XP guys really like to use the phrase refactor mercilessly as more of chant than fact. Well, don't forget that I personally -am- one of the XP guys. What you've said here is a profound misstatement of how test-driven development works. It's explicitly iterative. You write -one- test. Then you write just enough code to make that test pass. Then you refactor to make all the code as simple and clean as possible. Then you write another test. It's absolutely ideal for iterative development processes of all kinds. Collecting all the requirements and writing all the tests at the beginning is absolutely antithetical to the XP approach. The discussion below is interesting and useful, however! The best method that I've found do far is extremely simple. I write a spreadsheet with all of the applicable slots (attributes) in the columns. Then the name of each rule is the heading for the successive columns. Loading up the attribute columns is a simple binary problem. Easily duplicated in about a day or two. Then, with the help of the BA, the rules are confirmed as TRUE (or YES or whatever) in the appropriate place. This is exported to a CSV file and each row is pulled into a set of Java objects. The rules are run with the results checked against whether the rule should have fired or not. The result is total verification. Validation is another matter entirely. I know it sounds complicated, but it's actually quite easy. Also, it gives you complete alpha and beta error tests (for those with a statistical background.) Think of a simple AND situation IF A and B then C Testing for A = 0, B = 0, C = blank A = 0, B = 1, C = blank A = 1, B = 0, C = blank A = 1, B = 1, C = TRUE Four rows, total checking for the rule. Now, when I set this up
RE: JESS: more efficient jess debugging
Without being too... hmm... can't think of the right softener for this so I guess I'll just have to say it and get it over with. The GUI debugging tool that comes with JRules is really quite excellent. You can step through the rules, assign break points, watch the value of variables, etc., much as with any debugger. However, some of the extra added goodies are watching the Agenda Table and seeing all of the rules that are on the table and the state of events. Being able to see all of the objects and all of the libraries and the values of the attributes and states has proven helpful on more than one occasion. Their builder tool is quite useful in checking syntax. If you can't see it in the builder GUI then the rule probably isn't right. BUT, I hate having to use to write rules; it's like trying to type with mittens on. And, yes, Jack, I have done a cut and paste and forgotten to change the rule name - or sometimes the output. Late at night. When I ran out of coffee. And I had a migraine. (Let's see, that was excuses 43, 28, 75, 18, and 4, right?) Advisor (from Fair Isaacs, formerly HNC, formerly Brokat, formerly Blaze Software, formerly Neuron Data - they've quite a history) has a similar GUI debugger that is also quite nice. Very similar to JRules/ I've heard that others also have nice debuggers, but, again, these are all commercial products. Such as Haley and Aion et. Al. The danger here is that, sooner or later, the impetus will be to move away from the real job of the KE, that of actually thinking out the solutions to problems. There is a shifting, even now, of the JRules and Advisor projects to promote all of the rule building to the BA's. And every time that has happened it has led to disaster. I sure that if you ask the testers at Lloyds TSB that they will attest to that. Lockheed tried that as well and had to get burned badly before learning that markeeters are, well, stretching the truth just a wee bit. One more time: Leave the email alone and get back to work !!! SDG jco James C. Owen Senior Knowledgebase Consultant 6314 Kelly Circle Garland, TX 75044 972.530.2895 214.684.5272 (cell) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jack Kerkhof Sent: Wednesday, June 04, 2003 11:24 AM To: [EMAIL PROTECTED] Subject: Re: JESS: more efficient jess debugging Aright then, The feeling I get from this is that a general direction for the next phase of jess is known, but a specification is not yet there and you are soliciting input. I would have much more than an email's worth to offer there. A survey may be the way to go, or at least get started. But I cant' resist: Seems to me that an awful lot can be done with the right parser or XML framework. The essence, that is not there now, is breaking down the component parts of a rule, particularly the LHS, not simply as syntax but as meta-knowledge it its own right. This gets to be VERY useful in large systems and has a number of applications: - Automated LHS unit test generation is one such example. - Generation of a fact-rule 'scope of influence' graph would be another very useful tool (Anyone know of a more formal name for such a directed graph?). - Identification of patterns of fact use. patterns of rule use. Such a tool can really accelerate a designers ability to abstract concepts in a knowledge base. In this world of rapid incremental improvement, logic systems have to adapt quickly to retain usefulness. You'd like to capture the total design up front, But it just doesn't happen that way. So tools to facilitate design level constructs, particularly reverse engineering, are gold. Compared to what we have now, very simple parsing improvements, primarily to facilitate the debugging process: - semantic errors (i.e. undefined variables in development rules that are caught at parse time would save a lot of debug time. Ernest: it would be worth your time just in the emails you wouldn't have to answer because of silly syntax!) - duplicate rule warnings and the whole class of can but probably shouldn't syntax. Ya, it's simple (he who has never cut-and-paste a rule and forgot to change the name can laugh at me first) but it's invisible at run time, and that hurts. - refining error messages to a coder-friendly format that facilitates identification and rectification. ... I'd go on but they pay me to do real work around here. Actually, I need a coffee. Jack 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: more efficient jess debugging
My only experience with JUnit was a bit of a disappointment. JUnit is designed for testing procedural code, not declarative statements. The JUnit tests that we ended up writing were hand-coded. I guess that the thing is that JUnit is part of the XP concept. This means that after you gather ALL of the requirements then you write ALL of the tests - before writing the first line of code. Then, if the code doesn't pass the tests, it's bad. The XP guys really like to use the phrase refactor mercilessly as more of chant than fact. The best method that I've found do far is extremely simple. I write a spreadsheet with all of the applicable slots (attributes) in the columns. Then the name of each rule is the heading for the successive columns. Loading up the attribute columns is a simple binary problem. Easily duplicated in about a day or two. Then, with the help of the BA, the rules are confirmed as TRUE (or YES or whatever) in the appropriate place. This is exported to a CSV file and each row is pulled into a set of Java objects. The rules are run with the results checked against whether the rule should have fired or not. The result is total verification. Validation is another matter entirely. I know it sounds complicated, but it's actually quite easy. Also, it gives you complete alpha and beta error tests (for those with a statistical background.) Think of a simple AND situation IF A and B then C Testing for A = 0, B = 0, C = blank A = 0, B = 1, C = blank A = 1, B = 0, C = blank A = 1, B = 1, C = TRUE Four rows, total checking for the rule. Now, when I set this up for the driver validation for a major insurance company, we had 5,120 checks. When we did it for a major banking loan application, we had 65,000+ checks. On the other hand, the tests for the driver validation were written in about two days. The banking application took a bit over a week. The bottom line is that you CANNOT leave a gap in something like loan applications or insurance underwriting or some flake will find it and exploit it. 100% testing is absolutely necessary. In the past, the wisdom has been that you can't check every possibility. The truth is that you CAN check every possibility. With today's computers having enormous RAM and disk storage, this is not a problem. The only trick is to compartmentalize the rule sets so that you have manageable testing runs. The driver acceptability tests took a few minutes. The banking application tool about four hours. Both were running on an Sun E6000 with 8 processors. Remember - there is total peace of mind for the business users. ALSO, nobody (including the BA's) have to learn another testing tool. JUnit was used in both cases to test the Java classes themselves. Good luck. The first time you write one of these you'll have to iron out a few wrinkles. The second time is a snap. The third time is, So? SDG jco James C. Owen Senior Knowledgebase Consultant 6314 Kelly Circle Garland, TX 75044 972.530.2895 214.684.5272 (cell) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 6:23 PM To: [EMAIL PROTECTED] Subject: Re: JESS: more efficient jess debugging I think Jack Kerkhof wrote: All this discussion of an improved parser, debugging, and IDE are whetting my appetite! Are there any specifications yet regarding what will be included in a 'version 7'? And any estimates of timelines? Jess has always been every customer driven, so the answer to the first question depends on what people want to see. I've got lots of anecdotal information, but not any hard numbers on what people think would be most important. I've been meaning to set up a survey to help set priorities. Anybody know of some good, no-hassle web-based survey software? The stuff I've been able to find has been more than worthless. If parser work is going to be done what exactly what improvements/features are being entertained? Well, the meat of it would be that the current ad-hoc parser would be replaced by something using a formal grammar and an intermediate AST representation, so that introducing entirely new rule languages becomes much simpler, and there will be a way to add user-specified extensions. Then there will be an XML front end as an alternative to the Jess language one. Alan has clearly been thinking a lot about debugging. Testing and Validation are also big issues for commercial applications. Any thoughts on automation in that area? I've thought some about what a JessUnit would look like. I'd love to start a discussion about that. Anyone with XUnit experience who has ideas? Jack 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: arden health care syntax
Hmmm lets see. Started in 2000. Had two meetings. The link to the original document has either expired or been deleted or is on another server somewhere. Last version was Jan of 2001. No concrete evidence of anything that I can see on this link. Im not sure how we can map an unknown entity to Jess. (This email is direct evidence of why they dont send donkeys to school. :-))) SDG jco James C. Owen Senior Knowledgebase Consultant 6314 Kelly Circle Garland, TX 75044 972.530.2895 214.684.5272 (cell) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Clay Sent: Friday, May 30, 2003 4:35 PM To: [EMAIL PROTECTED] Subject: JESS: arden health care syntax Has anyone ever come across a mapping of Arden Syntax to Jess?
RE: JESS: more effecient jess debuging
Title: more effecient jess debuging Question: Will jdb or some of the other shareware (freeware) debugging tools work with Jess. I havent tried them yet but I know that there are some that will work with other rulebased systems out there. Just wondered if anyone else had tried any of these. SDG jco James C. Owen Senior Knowledgebase Consultant 6314 Kelly Circle Garland, TX 75044 972.530.2895 214.684.5272 (cell) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Crumley Sent: Thursday, May 29, 2003 6:30 PM To: [EMAIL PROTECTED] Subject: JESS: more effecient jess debuging I have recently inherited a bit of code that is pretty complex. So far watch-all has not been able to help me find the problems I am tracking down. Can anyone suggest other debug methods for jess rulesets? watch-all will tell me what rules fire, but more importantly I am looking for why a rule didnt fire. I examinted the facts that a particular rule was matching against and went through all the guards and they look like they should work but the rule doesn't seem to be firing. Adding (printout t 'message' crlf) after each rule also didnt yeild any results (atleast it didnt result in any messages in the output file I am redirecting 't' to). Are there any other methods you have used to debug a rule? Thanks, ryan 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: more effecient jess debuging
Excellent! As usual, Ernest cuts to the heart of the matter. GIGO means just that. :-) Dr. Albert Einstein once said something to the effect that if you can't explain your theory to a five-year-old then your explanation is too complicated or you don't understand it yourself. Another :-) Whenever I'm trying to write a technical paper, I ask both my artist wife and my musician son to read it over and see if they can understand what I'm trying to say. Without understanding the technical jargon, of course. If it doesn't make sense to them, it won't make sense to the normal reader. The other thing that I normally stress to my Business Analysts when they are writing a rule template is that it has to make sense in English before we can write the rule in Jess, JRules, OPSJ, Advisor or any other rulebase. Just something else to consider and now I'll hush and go to beddie bye... SDG jco James C. Owen Senior Knowledgebase Consultant 6314 Kelly Circle Garland, TX 75044 972.530.2895 214.684.5272 (cell) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, May 29, 2003 9:53 PM To: [EMAIL PROTECTED] Subject: Re: JESS: more effecient jess debuging I think Ryan Crumley wrote: PFONT SIZE=2 FACE=ArialI have recently inherited a bit of code that is pretty complex. So far watch-all has not been able to help me find the problems I am tracking down. Can anyone suggest other debug methods for jess rulesets? /FONT/P Besides the other excellent suggestions we've seen here, I'd like to add code inspection to the list. matches and view and watch are all dynamic analysis tools; static analysis -- i.e., just checking to see that the code is correct -- is important too. Many problems are caused by a few common coding errors. The most common one comes from not realizing that symbols won't match strings, and vice versa, and integers won't match floats, and vice versa. Give the code a good read. This sounds very obvious, but it's surprising how few people really do it. Even more powerful is trying to explain what the code does to another person, out loud. This works amazingly well, even if the other person is actually an inanimate object (this is sometimes called the Rubber Duck effect; try explaining the code to a rubber duck.) To explain it, you've got to express it in words, and this very often exposes problems right there. - 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]