Giter Site home page Giter Site logo

cflobdd's Introduction

CFLOBDDs: Context-Free-Language Ordered Binary Decision Diagrams

CFLOBDDs are data structures that provide double-exponential compression of Boolean functions in the best case (and exponential compression over BDDs). They can be used as a plug-compatible replacement for BDDs. In this paper, we have used them in the context of simulating quantum algorithms.

Installation

  1. Git clone this repository (git clone https://github.com/trishullab/cflobdd.git .)
  2. Install Boost C++ from https://www.boost.org/users/download/ (any version should work). The version used in the paper is 1.80.0.
  3. Change the directory to the CFLOBDD subfolder (cd CFLOBDD/). The other folders contain code for testing the baselines mentioned in the paper.
  4. Compile using the command (creates a.out executable): g++ -g -std=c++17 -w -I. -I.<path_to_boost> -I.Solver/uwr/bit_vector/ -I.Solver/uwr/assert/ -I.Solver/uwr/matrix/ -I.Solver/uwr/parsing/ -lm .cpp Solver/uwr/bit_vector/.cpp Solver/uwr/parsing/*.cpp

Code Structure:

The main CFLOBDD class is present in cflobdd_t.h with definitions of internal groupings and other classes in cflobdd_node.cpp.
The matrix and vector operations are present in files matrix1234_* and vector_*.
As all the classes are templatized, the classes are instantiated with different types (int, double, float_boost -> arbitary precision floating point).
A CFLOBDD object (say 'int') generally follows :-> cflobdd_int.cpp, cflobdd_top_node_int.cpp (deals with terminal values) and then the core operations are in cflobdd_node.cpp.
cflobdd_node.cpp (or matrix1234_node.cpp) is common to all data types are they handle proto-CFLOBDDs (see the paper for more details).
All the tests are done via runTests function in tests_cfl.cpp which is the only function called in main.cpp.
InitModules in tests_cfl.cpp should be run before creating any CFLOBDD object. InitModules initializes the cache. ClearModules should be invoked before exiting the program.

cflobdd's People

Contributors

cs14b052 avatar alaarman avatar

Stargazers

Chenghang Shi avatar  avatar Colton Skees avatar Caleb Stanford avatar Yann Herklotz avatar Matteo avatar breandan avatar Di Wang avatar

Watchers

 avatar  avatar

cflobdd's Issues

Error: no match for ‘operator==’

Hi, I met up with this compiling error on both of the latest branches. My g++ version is 11.3.0. The full information is as below.

weighted_cross_product.cpp:1132:29: required from here
weighted_cross_product.cpp:778:16: error: no match for ‘operator==’ (operand types are ‘CFL_OBDD::WeightedCFLOBDDInternalNode<boost::multiprecision::number<boost::multiprecision::backends::cpp_dec_float<100> >, std::multiplies<boost::multiprecision::number<boost::multiprecision::backends::cpp_dec_float<100> > > >*’ and ‘CFL_OBDD::WeightedCFLOBDDNodeHandleT<boost::multiprecision::number<boost::multiprecision::backends::cpp_dec_float<100> >, std::multiplies<boost::multiprecision::number<boost::multiprecision::backends::cpp_dec_float<100> > > >’)
778 | if (n1 == WeightedCFLOBDDNodeHandleT<T,Op>::NoDistinctionNode_Ann[n1->level] && n2 == WeightedCFLOBDDNodeHandleT<T,Op>::NoDistinctionNode_Ann[n2->level])

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.