Giter Club home page Giter Club logo

logic's Introduction

logic

Installation

gem install logic

Usage

By default, you get a truth table and a list of MC/DC pairs:

logic '(a or b) and (c or d)'

Gives you:

    a b c d | output
 1) 0 0 0 0 |   0
 2) 0 0 0 1 |   0
 3) 0 0 1 0 |   0
 4) 0 0 1 1 |   0
 5) 0 1 0 0 |   0
 6) 0 1 0 1 |   1
 7) 0 1 1 0 |   1
 8) 0 1 1 1 |   1
 9) 1 0 0 0 |   0
10) 1 0 0 1 |   1
11) 1 0 1 0 |   1
12) 1 0 1 1 |   1
13) 1 1 0 0 |   0
14) 1 1 0 1 |   1
15) 1 1 1 0 |   1
16) 1 1 1 1 |   1

a => [[2, 10], [3, 11], [4, 12]]
b => [[2, 6], [3, 7], [4, 8]]
c => [[5, 7], [9, 11], [13, 15]]
d => [[5, 6], [9, 10], [13, 14]]

Copyright © 2010 Bryan Ash. See LICENSE for details.

logic's People

Contributors

bryan-ash avatar

Watchers

Raphaël B. avatar James Cloos 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.