Giter Site home page Giter Site logo

logicly's Introduction

logicly

logicly is command line tool intended to make it easier to work with logical expressions. One can use logicly to create a truth-table for a logic expression. If you run the command logicly -t "a | b -> b & c", logicly will produce the following output:

a b c | ((a | b) -> (b & c))
----------------------------
0 0 0 |          1          
0 0 1 |          1          
0 1 0 |          0          
0 1 1 |          1          
1 0 0 |          0          
1 0 1 |          0          
1 1 0 |          0          
1 1 1 |          1         

Since for expession with many different atomic formulas the truth-table gets bigger (for n different atomic formulas the table will contain 2^n rows) you can set one of the following two flags:

  • --only-sat print only those valuations which satisfie the expression (i.e. where the expression is 1)
  • --only-unsat print only those valuations which do not satisfies the expression

Furthermore, with the flag -e VAL you can say logicly to evaluate the expression with a specific valuation. The valuation has to be in the form of <lit>:(0|1)(,<lit>:(0|1))* where <lit> is an literal.

For further details on the api and the syntac refer to the help produced by the flag -h

Possibly comming Features

  • simplification of expessions (simplification goals could be some normal for like CNF or DNF, or it could be simplified to use the least amount of operations (this could be usefull for optimizing conditions for loops and if-statements))

  • printing a list of all partial expressions

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.