- From: Waleed Abdulla <Waleed_Abdulla@xrules.org>
- Date: Thu, 7 Jul 2005 00:28:13 -0700
- To: "'Sandro Hawke'" <sandro@w3.org>, "'Anthony Finkelstein'" <anthony@systemwire.com>
- Cc: <public-rule-workshop-discuss@w3.org>
Note: Interleaved reply. > -----Original Message----- > From: Sandro Hawke > > What are the apples-to-apples functions performed by rule software? > What bits of code could be put in interchangeable black boxes? > > Right now, I see three main ones: > > * Inference. Given some data and some rules, infer some more data > which logically follows. An inference engine (or deductive > database) mostly fits behind a query interface, eg SPARQL, SQL, > XQuery. > > * Validation. Use some rules to examine some data and see if it > meets certain criteria. If not, issue errors or warnings. > > * Service Execution. Given some data, rules, and a set of > executable operations, run the engine and have it invoke > procedural code with parameters bound from the data. Another dimension to divide rules by is the type of data they work with. I see three here: * Rules that work with Java or C# objects (the kind common in some of the popular rules engines). These can be inference, validation, or execution rules. * Ruels that work with RDF, such as N3 in CWM. These are typically inference rules, but they can also be used for validation (think of validation as inferring weather a set of data is valid by some criteria). I haven't seen examples of RDF rules used for execution, but I can't think of a reason why they can't be used to trigger events that an application intercepts to execute tasks. * Rules that work with XML documents. Again, these can be used to validate XML documents, inference values of nodes from values of other nodes, or trigger execution when certain conditions apply. > Each area has its own typical language: "if condition then condition", > "if [not] condition then error", and "if condition then action", but > they obviously have a lot in common, too. > > Do you see a big problem with establishing a standard language of "if > condition then condition/error/action" and defining conformant > implementations in terms of the above functions? I think the real challenge is more about data and expression language. Basically, "what data do our rules work with" and "what language the rules are expressed in". As you suggested, all rules can be expressed as "If condition then condition/error/action", but are we going to write the condition in Java, XML, XPath, RDF, or something else? If we just define a skeleton for If .. Then and leave the language of expression un-standardized, then we haven't really done much. Obviously, the answer depends on the type of data we're targeting. If our data is Java objects, then XPath is probably not a good choice. If our data is RDF, then some sort of RDF extension might be the right choice. Weather one language can be written to express conditions and actions for all of our Java objects, RDF, and XML is still not clear to me. Any ideas about how this language might look like would be a great contribution (and I'm not talking about a rules language, just an expression language to express the conditions and actions). If we get that, we're half way done. Waleed
Received on Thursday, 7 July 2005 07:28:29 UTC