Rules-as-Code-League / RaC-Handbook

23 stars 0 forks source link

Definition of Rules Engines, Idea for Chapter #1

Open Gauntlet173 opened 4 years ago

Gauntlet173 commented 4 years ago

Hey, everyone. Just looking at some of the pages here, and the definition of a rules engine is rubbing me the wrong way. It's in a few different places, and before I make pull requests suggesting how we could rephrase, I want to confirm that I'm not out to lunch.

Basically a "rules engine" is a piece of software that is able to do logical reasoning about rules. A "rule base" is a collection of rules and facts that can be consumed by a rules engine provided in the same language that the "rules engine" speaks. A rules engine answers queries, which are usually questions in the form of "is this true", or "with regard to what data in the rule base is this true"? If what you have is a system in which you do not write "rules", or where the "reasoning" is done by a library, or by a compiler that is not using some form of logical deduction, then the impression that I'm under is that you are not using a rules engine.

OpenFisca, for example, is implemented in Python, and uses an object-oriented paradigm, not a deductive logic paradigm. So it is not a "rules engine" as such. Neota Logic, Oracle Policy Automation, DataLex and RaaP USE rule-engines, but they are not themselves rule-engines, because they don't just do the reasoning they also provide user interfaces for writing code, and asking questions, and visualizing code, etc. I would call them "platforms" for building applications using encoded rules. OpenFisca in that sense is also a "platform", but not one that uses a rules engine.

The true "rules engines" are the interpreters for declarative logic programming languages like Flora-2, XSB, SWI-Prolog.

Another clarification that I'd like to make is that a "rules engine" is not the only option. There are declarative logic approaches, procedural programming approaches, and probably more. Some of the tools build interfaces, some only allow for rule editing, and provide answers.

So my categories for tools would be:

I'd be inclined to add semantic web tools and ontology tools, as well, but I'm not as familiar with the domain.

What do you think of adding a chapter that talks about the tools available, and the categories they fit into? What about a chapter that talks about the basics of formal logic as a representation tool?

Tim-desousa commented 3 years ago

Hi Jason,

Things have clearly been crazy this year for everyone, as I just saw this and it's 10 months later.

Ultimately, I don't disagree with anything you're saying, and I think we might have oversimplified things a bit too much in an effort to make concepts digestible for government audiences new to the field.

Fancy making the pull request?

Tim-desousa commented 3 years ago

Rather than add a new chapter, I think we should restructure an expand the existing chapter 5 on rules engines.

Gauntlet173 commented 3 years ago

I'll take another look and see if that is something I could help with. For some reason, the handbook is not visible in the mobile GitHub app, right now. Not sure why that would be.

J

On Mon., Dec. 7, 2020, 4:20 p.m. Tim de Sousa, notifications@github.com wrote:

Rather than add a new chapter, I think we should restructure an expand the existing chapter 5 on rules engines.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Rules-as-Code-League/RaC-Handbook/issues/1#issuecomment-740240561, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ6T7QCGNWVBXWMYC6KK43STVPKHANCNFSM4KXS4GZA .