|The PEAK Developers' Center||FrontPage||RecentChanges||TitleIndex||WordIndex||SiteNavigation||HelpContents|
In the design of applications, rules are everywhere: business rules, game rules, routing rules, "expert systems", code and query optimizers, and rule-based "agents" and triggers. But to implement rules, they have to be converted into code -- usually in the form of decision trees that become increasingly difficult to maintain as the number of rules grows. Recent developments in computer science, however, make it possible to automatically convert rules into decision trees that are guaranteed to be correct and efficient, even for large numbers of rules, without using a specialized logic or rule language like Prolog or Lisp. This presentation will give an overview of how to implement rule-driven systems directly in Python, using Python itself as the language for specifying rules, with faster development and execution times than would be obtained by hand-coding if-then trees. Examples will be based on the predicate dispatch implementation included in the latest version of the PyProtocols package.
(Bonus material, for use if above runs short and there are no questions)