GithubHelp home page GithubHelp logo

pltools / ocanren Goto Github PK

View Code? Open in Web Editor NEW
115.0 11.0 19.0 9.19 MB

Statically typed embedding of miniKanren relational programming language into OCaml

License: GNU Lesser General Public License v2.1

OCaml 99.68% Makefile 0.21% Smarty 0.12%
minikanren ocaml relational-programming

ocanren's Introduction

OCanren License API docs

OCanren is a strongly-typed embedding of relational programming language miniKanren into OCaml. Nowadays, the implementation of OCanren strongly reminds faster-miniKanren. Previous implementation was based on microKanren with disequality constraints.

See installation instructions, API documentation for more details, or ReadTheDocs for detailed information. (All papers about OCanren are not located in the separate repo.)

Check our template repository for OCanren projects for faster startup!

Installation

To try out developer version of OCanren and OCanren-ppx both, use

  opam pin add https://github.com/PLTools/OCanren.git --yes

OCanren is available in the main OPAM repository, but it's version may be lagging behind.

  opam install OCanren-ppx OCanren --yes

ocanren's People

Contributors

dboulytchev avatar dewshick avatar eupp avatar kajigor avatar pitag-ha avatar rozplokhas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ocanren's Issues

@YueLiPicasso tutorial

  • It feels like the wrong type (In tutorial / in OCanren)

  • And what is the project and where should it come from (here, here and here) By the way, I couldn't run the example. Is it even correct?

  • From time to time I encounter unification of both (==) and (===). What is it correct? There is only one option in the first chapter of the tutorial.

  • I didn't find this type in Logic.mli.

Unused variable self warning when using ppx_distrib

When trying to use ppx_distrib on a type with no parameters, warning 27 [unused-var-strict] is emitted:

3 | [%%distrib
4 | type nonrec t = 
5 |   | Integer 
6 |   | Boolean
7 | [@@deriving gt ~options:{ show; fmt; gmap }]
8 | 
9 | type ground = t ]
Error (warning 27 [unused-var-strict]): unused variable self.

Integrate @YueLiPicasso's tutorial

List of subtasks copy-pasted from YueLiPicasso/OCanrenTutorial#2

Group S: Problems that have straightforward fix or cause disputes on trivial matters (S for straight)

  • spell errors
  • text formatting (such as adding newlines and indentation)
  • removal of double semi-colons ( ;; ) at end of OCaml code lines
  • Alternative commands for the install/uninstall of OCanren.
  • Write in infix or prefix style, for infix operators ?
  • change of jargon: groundi -> injected
  • two versions of build system
  • favor of explict lambda abstraction in function definition

Group M: Moderate technical clarifications (M for moderate)

  • How to briefly introduce GT? Shall we say that "it provides a Haskell type class style feature to OCaml" or we could say something better?
  • Clarify that we do not allow infinite programs, but the programs we write may be viewed as being infinite in theory.
  • Description of simple concepts like "stream" in complex/advanced ways could be kept, but a more intuitive explanation can also be added.
  • The term "zip" has many meanings, but that adopted in the tutorial is clarified by an example. A deterministic and implementation oriented definition of zipping is good to be added.
  • GT.string vs. string to be clarified
  • The notion of guarded type may be not useful for some people, but I found it illuminating, so I choose to keep it.
  • When does a ground type coincide with its corresponding (fully) abstract type? This may worth some more discussion.
  • The comments on the use of -rectypes compiler option serve to explain why we need that flag.
  • Explain the two type parameters of the "injected" type constructor could be added.
  • Clarify that there are a few syntaxes for OCanren and we are using one of them.

Group P: Philosophical questions

  • Shall the author focus the tutorial on the major implementation technique of OCanren and the ideas
    of relational programming, which he is better at, or he should do what he is not good at and update the tutorial very often to explain how to install the latest version of OCanren where there is no fundamental change in its concepts and implementation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.