EPFL-LAP / dynamatic

DHLS (Dynamic High-Level Synthesis) compiler based on MLIR
Other
49 stars 14 forks source link

Boolean Logic Library #90

Closed DanaKossaybati closed 2 months ago

DanaKossaybati commented 2 months ago

This PR adds the boolean logic library files to the repo. This library uses a tree structure to represent a boolean expression. It supports functions such as: creating a boolean expressions directly (through APIs) or by parsing a string, minimizing a boolean expressions using Espresso-II algorithm, and applying Shannon expansion to transform the boolean expression into a tree of MUXes (soon).

The library, as of now, is composed of 4 main parts:

  1. Lexer: lexical analyzer for tokenizing a string.
  2. Parser: parser for parsing a list of tokens generated by the lexer into a boolean expression tree.
  3. BooleanExpression: all the necessary definitions and methods to support the BoolExpression tree data structure.
  4. BooleanLogicLibrary: all the APIs for the library to parse, create, and minimize a boolen logical expression.