background preloader

Rule Engines

Facebook Twitter

Building Custom Rule Engines. [This article was originally published in PC AI magazine, Volume 10, Number 2 Mar/Apr 1996.

Building Custom Rule Engines

The magazine can be reached at PC AI, 3310 West Bell Rd., Suite 119, Phoenix AZ, USA 85023 Tel: (602) 971-1869, FAX: (602) 971-2321, E-Mail: info@pcai.com, Web: Introduction Rules occupy a hazy area between data and procedure. Like data, each rule in a rule base is independent, and can be linked to other rules dynamically based on common values. Like procedures, each rule has multiple substatements specifying conditions and/or actions related to the execution or firing of the rule.

Looking at it another way, both databases and procedures can be thought of as degenerate cases of rule bases. Figure 1: The relationship between data, procedure and rules. Because most programming tools are designed for either data or procedures, when confronted with a specification written as a collection of rules, the developer is faced with a tricky problem. OO jDREW - Home.

Introduction OO jDREW, the Object Oriented Java Deductive Reasoning Engine for the Web is the reference implementation of the (Naf Hornlog) RuleML Web rule language.

OO jDREW - Home

It is an Object Oriented extension to jDREW. OO jDREW - Home. Prova language for rule based scripting of Java and agents, and knowledge and information integration. The System DR-DEVICE. DR-DEVICE is a system for defeasible reasoning on the Semantic Web.

The System DR-DEVICE

Defeasible reasoning is a rule-based approach for efficient reasoning with incomplete and inconsistent information. Such reasoning is, among others, useful for ontology integration, where conflicting information arises naturally; and for the modeling of business rules and policies, where rules with exceptions are often used. It can represent facts, rules, and priorities among rules. This reasoning family comprises defeasible logics and Courteous Logic Programs. The main advantage of this approach is the combination of two desirable features: enhanced representational capabilities allowing one to reason with incomplete and contradictory information, coupled with low computational complexity compared to mainstream nonmonotonic reasoning.

DR-DEVICE is capable of reasoning about RDF metadata over multiple Web sources using defeasible logic rules. The stupid Java™ rules engine. An Easy Rules example (a Java "rules engine") By Alvin Alexander.

An Easy Rules example (a Java "rules engine")

Last updated: Aug 3, 2015 I’m considering using Easy Rules as a simple “rules engine” in my Android Football Game application, primarily because (a) there are a ton of “rules” involved in having a computer call offensive and defensive plays, and (b) I’m trying to find a way to simplify that code and make it more maintainable. The Easy Rules website has a Hello, world demo you can look at to get started, but after you take a look at that, here’s my first example. The main “driver” class My main class — the class that includes my main method — looks like this: My BasicFootballRule class is an abstract class. Package test2; import org.easyrules.core.BasicRule; //TODO the "football game state" stuff should be a separate interface public abstract class BasicFootballRule extends BasicRule { protected FootballGameState gameState; public void setGameState(FootballGameState gameState) { this.gameState = gameState; } }

  Just Do I.T.: Two-Minutes Scala Rules Engine. Scala is really seductive.

  Just Do I.T.: Two-Minutes Scala Rules Engine

To drive my learning of this JVM programming language, I thought I should go beyond the obvious experiments and try to tackle a subject dear to my heart: building a general purpose rules engine. Of course, the implementation I am going to talk about here is naive and inefficient but the rules engine is just a pretext here: this is about Scala and how it shines. And it is also a subset of what Scala is good at: I mainly scratch the surface by focusing on pattern matching and collections handling.

The fact representation I use is the same than the one used by RuleML: a fact is a named relationship between predicates. For example, in "blue is the color of the sky", color is the relationship between blue and sky. Hammurabi - A Scala Rule Engine. One of the most common reasons why software projects fail, or suffer unbearable delays, is the misunderstandings between the analysts who define the business rules of the domain for which the software is going to be written and the developers who have to code these rules.

Hammurabi - A Scala Rule Engine

The latter write those rules in a language that is completely obscure for the first ones. In this way the business analysts don't have a chance to read, understand and validate what the programmers developed and then they can only empirically test the final software behavior, hardly covering all the possible corner cases and often recognizing mistakes only when it is too late.

What Hammurabi is Hammurabi is a rule engine written in Scala that tries to leverage the features of this language making it particularly suitable to implement extremely readable internal Domain Specific Languages. A foursome of golfers is standing at a tee, in a line from left to right. The Jess solution => (printout t Fred " " ? RuleML Wiki. Engines:Master - RuleML Wiki. Various rule engines have been used to execute (queries posed to) rulebases for subsets of RuleML as described in the following. 1 Current.

Engines:Master - RuleML Wiki

XSB. RuleML Wiki.