Giter VIP home page Giter VIP logo

clj-bob's Introduction

clj-bob

A Clojure (technically) port of J-Bob, the proof assistant from The Little Prover by Daniel P. Friedman and Carl Eastlund.

caveats

Ok, so first of all, this is not normal Clojure. Like the Scheme implementation, this is mostly macros and functions that operate on/emulate ACL2 syntax. On the one hand, that's really weird. On the other, that means that this matches the book exactly in almost all cases -- a worthy trade.

I've successfully tested a bunch of the book's examples (including the final one) and they've all matched the Scheme implementation, but that's the best I can give you right now in terms of assurances.

weird stuff

The book/J-Bob assume that . and / are legal to use in function names. Unfortunately, Clojure disagrees. Through the use of advanced search-and-replace™ technology, I changed all .s and /s into -.

That means that chapter1.example1 is now chapter1-example1, dethm.set?/sub is now dethm-set?-sub, etc.

usage

with an editor repl

If you're comfortable an editor-based REPL like CIDER, Fireplace, or Cursive, you can open /src/clj_bob/repl.clj and start a REPL from there. That namespace does the necessary Clojure exclusions and requires to be ready to execute code directly out of the book.

with lein repl

If you'd prefer to use the Leiningen REPL, just clone this repository and run lein repl inside of it. Everything's pre-configured, so you can immediately start typing examples from the book and you should see exactly the same output.

For example:

#_clj-bob.j-bob=> (car (cons 'ham '(eggs)))
ham
#_clj-bob.j-bob=> (atom '()) ;; no, this is not Clojure
t

contributions

...are very welcome, including docs, issues, and pull requests. Please note that this project has adopted a code of conduct, and contributors are expected to adhere to it.

clj-bob's People

Contributors

juxtin avatar

Watchers

 avatar  avatar

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.