GithubHelp home page GithubHelp logo

ocaml-tdk's Introduction

tdk - The Decision Kit

The Decision Kit is a collection of data structures are that useful for representing functions, relations, and other combinatorial objects. These data strctures are based on various generalizations of reduced ordered binary decision diagrams.

Build Status

Installation

Tdk has no dependencies. To install the library, simply clone the repository, build it and install it using the following commands:

make && make install

Alternatively, you can install tdk using OPAM:

opam install tdk

For building and running the tests during development, you will need to install the oUnit package and reconfigure the build process to enable tests:

opam install oUnit
./configure --enable-tests
make && make test

Features

The library supports three data structures:

  • Vlr - a Variable-Lattice-Result diagram for representing functions over variables that are assigned values in a lattice, producing a result with an algebraic structure.
  • Vcr - a Variable-Constant-Result diagram for representing functions over variables that are assigned values in a total ordering, producing results with an algebraic structure.
  • Bdd - a Reduced Ordered Binary Decision Diagram for representing boolean-valued functions over boolean variables.

Each of these data structures is implemented as a functor. Here's an example of how to instantiate and use the Bdd functor for variables represented as Int32.ts:

module B = Tdk.Bdd.Make(struct
  type t = Int32.t

  let compare = Int32.compare
  let hash a = Int32.to_int a

  let to_string = Int32.to_string
end)

let impl a b = B.(sum b (neg a))

let a = B.var 0l
let b = B.var 1l
let c = B.var 2l

(* `(a /\ b) -> c) -> (a -> b -> c)` is a tautology *)
assert B.(tautology (impl (impl (prod a b) c)
                          (impl a (impl b c))))

Cultural Note

Yall take the PC way, let ya CD's play
I rock a 120 Minute TDK
Hey! Looking for a way to the hype
"Welcome to the underground!" Shit, that's just a day in the life

โ€” Cashmere the Pro, Nasty Filthy by CunninLynguists

License

BSD3, see LICENSE file for its text.

ocaml-tdk's People

Contributors

seliopou avatar

Watchers

 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.