GithubHelp home page GithubHelp logo

relatron's Introduction

relatron

A library for typed relational and logic programming in Scala, based on µkanren.

Motivation

There are many reasons why a typed embedding of relational programming is beneficial. Several are described here:

  1. Soundness: well-typed Scala code implies well-typed relational queries. In other words, it is harder to write an unsound relational program.
  2. Reification: by expecting the user to ascribe the types of the free variables of their queries, the interpreter can automatically figure out how to reify internal state into metalanguage terms.
  3. Language extensions: easily support extensions to the core language via ad hoc polymorphism (type classes).

Features

  • Standard library
    • Natural numbers (Peano encoding)
    • Lists
  • Arithmetic expressions
    • Evaluation
    • Typing

Reference

  1. Relational Programming in miniKanren: Techniques, Applications, and Implementations (https://scholarworks.iu.edu/dspace/bitstream/handle/2022/8777/Byrd_indiana_0093A_10344.pdf)
  2. µKanren: A Minimal Functional Core for Relational Programming (http://webyrd.net/scheme-2013/papers/HemannMuKanren2013.pdf)
  3. Typed Embedding of a Relational Language in OCaml (https://arxiv.org/pdf/1805.11006.pdf)

relatron's People

Stargazers

Albert Chen avatar

Watchers

James Cloos avatar Raas Ahsan avatar

relatron's Issues

Implement occurs check

The occurs check fails unification of X and Y if X or Y is syntactically "contained" in the other

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.