logoalt Hacker News

didericislast Saturday at 3:06 PM1 replyview on HN

> business rules engines, complex event processing, and related technologies are still marginal in the industry for reasons I don't completely understand

Translating between complex implicit intention in colloquial language and software and formal language used in proof assistants is usually very time consuming and difficult.

By the time you’ve formalized the rules, the context in which the rules made sense will have changed/a lot will be outdated. Plus time and money spent on formalizing rules is time and money not spent on core business needs.


Replies

PaulHoulelast Saturday at 10:10 PM

That's definitely true, but I do think production rules have some uses that are less obvious.

For instance, XSLT is not "an overcomplicated Jinja 2" but rather it is based on production rules but hardly anybody seems to know that, they just think it's a Jinja 2 that doesn't do what they want.

Production rules are remarkably effective at dealing with deep asynchrony, say a process that involves some steps done by people or some steps done by humans, like a loan application being processed by a bank that has to be looked at by a loan officer. They could be an answer to the async comm problems in the web browser. See also complex events processing.

Production rules could be a more disciplined way to address the issues addressed by stored procedures in databases.

I've written systems where production rules are used in the control plane to set up and tear down data pipelines with multiple phases in a way that can exploit the opportunistic parallelism that can be found in sprawling commercial batch jobs. (The Jena folks told me what I was doing wasn't supported but I'd spent a lot of time with the source code and there was no problem.)