Download the PHP package d3lph1/boollet without Composer

On this page you can find all versions of the php package d3lph1/boollet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package boollet

Boollet

Boollet is a boolean algebra toolkit for PHP.

PHP Version Require License

Features

Requirements

Installation

Usage

Expression object API

You can create either UnaryExpression or BinaryExpression with one or two operands respectively:

If there is no label for variable specified, it will be assigned with sequentially autogenerated symbols.

Evaluate the expression with initial variable values:

Evaluate the expression with overwritten variable values (It can be partially overwritten):

Value binding

In the example above there are only static variable values which could not be changed dynamically without expression reconstructing.

To change value of variable at runtime you should use Variable::set() method. For convenient batch value setup there is ValueBinder class:

Expression parser

For parsing stringed expressions uses ShuntingYardParser parser implementation. Under the hood it uses Dijkstra's algorithm of the same name.

Building truth table

Complete conjunctive/disjunctive normal form calculation

Class NormalForms provides utility methods to find complete conjunctive (or disjunctive ) normal form representations.

Zhegalkin Polynomial calculation

For such needs you can use ZhegalkinPolynomial utility class:

SAT and UNSAT solvers

Boollet provides naive algorithm implementations to solve boolean (un)satisfiability problem.

SAT is the problem of determining if there exists an interpretation that satisfies a given boolean formula (formula becomes true).

UNSAT is the problem of determining if there exists an interpretation that not satisfies a given boolean formula (formula becomes false).

CompleteDisjunctiveNormalFormSATSolver works only with expressions in complete disjunctive normal form. Whereas CompleteConjunctiveNormalFormUNSATSolver uses only expressions in complete conjunctive normal form.

The second argument of the method findAllPossibleSolutions() takes an array of variables with respect to which it is required to solve the problem. Other variables whose labels are not passed to this argument must have values (in the example below y is such variable).

$solutions will look like this:

To conveniently define results constraints, you can use findAllPossibleSolutionsWithConstraints():

$solutions will look like this:

License

This code is published under the MIT license. This means you can do almost anything with it, as long as the copyright notice and the accompanying license file is left intact.


All versions of boollet with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
dan-da/texttable-php Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package d3lph1/boollet contains the following files

Loading the files please wait ....