Categorygithub.com/dterbah/go-logic
modulepackage
0.0.0-20240718070659-13e5ad72c42b
Repository: https://github.com/dterbah/go-logic.git
Documentation: pkg.go.dev

# README

Go Logic !

CI codecov Quality Gate Status Bugs Lines of Code Maintainability Rating Technical Debt

Be ready to solve your boolean expressions with Go Logic ! This simple CLI is used to take a boolean expression and solve it with all possible combination. You'll find a short guide to help you get the most out of this application.

Installation

To install locally this tool, you can run the following command :

go install github.com/dterbah/go-logic

Once this command is finished, you can directly use it like this :

go-logic ...

Syntax of the boolean expression

Here is an overview of the syntax for the different boolean operator

Operator nameDescriptionSyntax in Go LogicUsages
NOTNegation operator!!a
OROr operator|, vavb, a|!b
ANDAnd operator^,&,.a^b, (!a.b).c, c&a
XORXor operator+a+b
IMPLIESImplie operator->a->b, b->!(a^v)
EQUIVALENCEEquivalence operator<->a<->b, 1<->b

CLI usage and options

You can use this command using the command go-logic. There is multiple options you can use to have different outputs

CommandDescriptionUsageDefault valueRequired
-eDefine the expression you want to analyzego-logic -e="a+b"None
-tCreate and output the truth table of the expressiongo-logic -e="a" -tTrue
-gCreate a DOT graph of your expressiongo-logic -e="a^1" -gFalse
-sSimplify the current expressiongo-logic -e="a+b" -sFalse

# Packages

No description provided by the author