Clara is a forward-chaining production system -- think Jess, Drools or 
CLIPS (but in pure Clojure, of course.). Core.logic offers constraint-based 
logic programming, more along the lines of Prolog and obviously with a 
strong relationship to Kanren.

These approaches are complementary; which one to use really depends on the 
problem you want to solve. If you can describe a problem as a search space 
over a set of constraints, core.logic is almost certainly a better fit than 
Clara.

In contrast, Clara targets the expression of complex and arbitrary 
domain-specific knowledge. Even a functional approach to programming can 
become unwieldy if business rules are frequently changing and have 
arbitrary relationships to other rules. Those functions would need to be 
deeply chained together, with frequent changes forcing them to be re-wired. 
Production systems allow the logic to be expressed independently, where 
authors need not worry about other rules, order of execution, or wiring 
them together. The engine then runs the rules against a set of input and 
ensures the working memory reaches a consistent state.

I wrote about this in more depth 
here: https://github.com/rbrush/clara-rules/wiki/Introduction

On Tuesday, September 24, 2013 5:41:01 AM UTC-5, Dmitry Groshev wrote:
>
> I'm curious how this relates to core.logic. If I understand correctly, 
> Clara can be compiled to core.logic and utilize it's search, doesn't it?
>
> On Tuesday, September 24, 2013 6:16:12 AM UTC+4, Ryan Brush wrote:
>>
>> This is the first release of Clara, forward-chaining rules in Clojure. 
>>
>> Details on the github site:
>>
>> https://github.com/rbrush/clara-rules
>>
>> I've also posted the rationale for what I'm doing here:
>>
>> http://www.toomuchcode.org/2013/09/rules-as-control-structure.html
>>
>> The gist is that forward-chaining rules are a great tool for many 
>> problems and Clojure's strengths can address some weaknesses in existing 
>> production systems. Right now Clara supports most of the major features 
>> seen in production systems, embraces Clojure values like immutability, and 
>> is powerful enough for a number of use cases. It still needs to be profiled 
>> and subjected to more rigorous testing before I'd consider it production 
>> ready, but this release is for anyone interested in experimenting with it.
>>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to