[bp-users]Prolog Implementation of Rulebase

Don Winston dwinston@momentumsystems.com
Mon, 27 Aug 2001 19:31:43 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C12F2E.E71998A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I've used the BlazeSoft Advisor rulebase for implementing business rules =
for a web application of a major inusrance company. I no longer work =
there and now work as a consultant for smaller companines who wiil not =
pay for something like Advisor (or ILog's JRules).

Has anyone ever constructed a simple rulebase tool based on Prolog? The =
syntax of Prolog is unsatisfactory for this purpose. What I'm talking =
about is an english like way of expressing business rules, like:

DATA
  x =3D 1.
  aString =3D 'Hello'.
  ...
END DATA.

BEGIN RULESET A
  RULE1: IF (cond1) THEN (action1).
  RULE2: IF (cond2) THEN (action2).
  ...
END RULESET A.

BEGIN RULESET B
  RULE1: IF (cond1) THEN apply RULESET A.
  RULE2: IF (cond2) THEN (action2).
END RULESET B.


....


In additon you should be able to make calls to one or more Java classes =
from a rule. A Java class should be able to load, compile, and execute =
the rulebase and retrieve the "answer" if any.

------=_NextPart_000_0005_01C12F2E.E71998A0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3103.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I've used the BlazeSoft Advisor =
rulebase for=20
implementing business rules&nbsp;for a web application of a =
major&nbsp;inusrance=20
company. I no longer work there and now work&nbsp;as a consultant for =
smaller=20
companines who&nbsp;wiil not pay for something like Advisor (or ILog's=20
JRules).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Has anyone ever constructed a simple =
rulebase tool=20
based on Prolog?</FONT>&nbsp;<FONT face=3DArial size=3D2>The syntax of =
Prolog is=20
unsatisfactory for this purpose. What I'm talking about is an english =
like way=20
of expressing business rules, like:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>DATA</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; x =3D 1.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; aString =3D =
'Hello'.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>END DATA.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>BEGIN RULESET A</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; RULE1:</FONT><FONT face=3DArial =
size=3D2> IF=20
(cond1) THEN (action1).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; RULE2: IF (cond2) THEN=20
(action2).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>END RULESET A.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>BEGIN RULESET B</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; RULE1: IF (cond1) THEN apply =
RULESET=20
A.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; RULE2: IF (cond2) THEN=20
(action2).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>END RULESET B.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>....</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>In additon you should be able =
to&nbsp;make calls to=20
one or more Java classes from a rule. A Java class should be able to =
load,=20
compile, and execute the rulebase and retrieve the "answer" if=20
any.</FONT></DIV></BODY></HTML>

------=_NextPart_000_0005_01C12F2E.E71998A0--