LogicalOptimizer.Cli
4.0.0
dotnet tool install --global LogicalOptimizer.Cli --version 4.0.0
dotnet new tool-manifest
dotnet tool install --local LogicalOptimizer.Cli --version 4.0.0
#tool dotnet:?package=LogicalOptimizer.Cli&version=4.0.0
nuke :add-package LogicalOptimizer.Cli --version 4.0.0
LogicalOptimizer.Cli
Boolean optimization and analysis from the command line. A .NET global tool
(logical-optimizer) over the LogicalOptimizer toolkit: optimize expressions with
verified equivalence and explicit minimality, print truth tables, minimize CSV /
multi-output tables and export to other formats.
dotnet tool install -g LogicalOptimizer.Cli
logical-optimizer "a & b | a & c"
# Original: a & b | a & c
# Optimized: a & (b | c)
# Equivalent: proven
# Minimality: proven
# Cost: 4 -> 3 literals
# CNF: a & (b | c)
# DNF: a & b | a & c
# Variables: [a, b, c]
Other flags: --format=json for a stable machine-readable report (CI-friendly; exit codes
0/1/2), --cnf / --dnf / --anf for a single normal form, --advanced for
XOR/IMP/EQV patterns, --truth-table, --trace to explain how the result was reached,
--verbose for metrics, and --outputs=A,B for multi-output CSV minimization. Run
logical-optimizer --help for the full list.
Equivalence check
The check verb proves two expressions equivalent or returns a concrete counterexample —
an assignment on which they differ:
logical-optimizer check "admin | (owner & businessHours)" "admin | owner"
# Left: admin | (owner & businessHours)
# Right: admin | owner
# Equivalent: no
# Counterexample: admin=0, businessHours=0, owner=1
Exit codes: 0 equivalent, 3 not equivalent, 4 unknown (budget exhausted).
--format=json emits a versioned machine-readable report (cli-check-report-v1.schema.json
in schema/).
Standard-format problem files
Four verbs read a DIMACS / WCNF / OPB file and dispatch it to the in-house SAT, MaxSAT,
pseudo-Boolean or d-DNNF engine, printing the usual s / o / v competition lines:
logical-optimizer solve problem.cnf # DIMACS CNF satisfiability
logical-optimizer maxsat problem.wcnf # WCNF weighted partial MaxSAT
logical-optimizer solve-pb problem.opb # OPB pseudo-Boolean feasibility
logical-optimizer count problem.cnf --engine dnnf # exact #SAT via d-DNNF
When to choose this package
Install the CLI for scripts, CI checks, running an existing DIMACS/WCNF/OPB corpus, and
quick one-off optimization or equivalence work without writing code. To call the same
engines from a .NET application, use the LogicalOptimizer library package instead.
📚 Full documentation: https://AlexanderV.github.io/LogicalOptimizer/
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.