Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Statistics on core.logic

Number of watchers on Github 1085
Number of open issues 1
Main language Clojure
Average time to merge a PR less than a minute
Open pull requests 1+
Closed pull requests 15+
Last commit over 2 years ago
Repo Created over 8 years ago
Repo Last Updated over 1 year ago
Size 2.95 MB
Organization / Authorclojure
Contributors24
Page Updated
Do you use core.logic? Leave a review!
View core.logic activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating core.logic for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

core.logic

A logic programming library for Clojure & ClojureScript. core.logic offers Prolog-like relational programming, constraint logic programming, and nominal logic programming for Clojure. At its heart is an original implementation of miniKanren as described in William Byrd's dissertation Relational Programming in miniKanren: Techniques, Applications, and Implementations as well as the extensions described in cKanren and Kanren. It is designed to be easily extended to forms of logic programming beyond the ones provided.

Releases and dependency information

Latest stable release: 0.8.11

Leiningen dependency information:

[org.clojure/core.logic "0.8.11"]

Maven dependency information:

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>core.logic</artifactId>
  <version>0.8.11</version>
</dependency>

Example usage

(use 'clojure.core.logic)

(run* [q]
  (== q true))  
;;=> (true)

Running the tests

Assuming you have V8 installed from source:

lein cljsbuild once adv
d8 resources/tests.js

If you have another JS engine installed use that instead.

Reasoned Schemer

If you wish to work through The Reasoned Schemer with core.logic make sure to look over this first.

If you're interested in using core.logic from ClojureScript look here.

For more information & documentation please consult the wiki.

Differences from core.unify

core.unify provides a la carte unification facilities that are not deeply tied into the operation of a logic engine. While core.logic does provide a similar simple unifier interface with support for specifying fine-grained constraints, if you have no need for a logic programming system, core.unify may be a better fit.

YourKit

YourKit has given an open source license for their profiler, greatly simplifying the profiling of core.logic performance.

YourKit supports open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.

Developer information

Copyright and license

Copyright 2010-2016 David Nolen, Rich Hickey & contributors.

Licensed under the EPL (see the file epl.html).

core.logic open pull requests (View All Pulls)
  • Fix benchmark about zebrao
core.logic questions on Stackoverflow (View All Questions)
  • Expressing that a specific subset of X's have property Y in core.logic
  • Eliminating duplicate results when querying a family tree with core.logic
  • What does non-relational mean in practice for core.logic?
  • core.logic CLP(FD) with ClojureScript
  • Finding similar sets with clojure's core.logic / minikanren
  • Generate core.logic statements using macros
  • Understanding core.logic !=
  • core.logic unification matches value in map but not key
  • What syntax core.logic matche, defne pattern matching constructs use?
  • How to simulate an 'outer join' in core.logic?
  • How to deal with list of goals in core.logic
  • Core.logic misses solution with fd/* when a (correct, integral, non-negative) domain is given for an lvar being multiplied, works without domain
  • Concise Explanation of Core.logic
  • mini-Kanren, core.logic, clojure: Reasoned Scheme Exercise 60
  • Translating the insert fact from Prolog to core.logic
  • clojure core.logic counting elements in a set
  • core.logic stackoverflow when using sets
  • How do I de-structure a map in core.logic?
  • Clojure core.logic CLP(FD) projecting FD variables
  • How to implement a type system with clojure core.logic
  • Using core.logic to solve the sum product riddle
  • Does projecting in two directions count as relational in core.logic?
  • Extending core.logic to custom types
  • Unexpected results with Clojure core.logic (using CLP/FD)
  • How do you use core.logic in a practical way in a larger Clojure program?
  • Refactoring with core.logic
  • distincto vs. fd/distinct in core.logic
  • How do I connect clojure core.logic to a database?
  • Goal ordering in Clojure's `core.logic`
  • Clojure core.logic generating parents
core.logic list of languages used
Other projects in Clojure