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.
- Git clone this repository (git clone https://github.com/trishullab/cflobdd.git .)
- Install Boost C++ from https://www.boost.org/users/download/ (any version should work). The version used in the paper is 1.80.0.
- Change the directory to the CFLOBDD subfolder (cd CFLOBDD/). The other folders contain code for testing the baselines mentioned in the paper.
- 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
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.