You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This system provides CMSGen, a fast weighted uniform-like sampler. While we give no
guarantees that the sampling follows the desired distribution, it is currently
the best non-guaranteed (uniform) sampler as per our testing with
Barbarik. In case you need guaranteed
uniform sampling, please check out
UniGen. When citing CMSGen, always
reference our FMCAD'21
paper
(bibtex here).
Obtaining CMSGen
Easiest way to run CMSGen is to use one of our released
binaries. We support all major
platforms: Linux, Mac, and Windows, and support ARM and x86_64 too. The second
best thing to use is Nix. Simply install nix and
then:
nix shell github:meelgroup/cmsgen#cmsgen
Then you will have cmsgen binary available and ready to use.
Finally, you can also build cmsgen from source:
git clone https://github.com/meelgroup/cmsgen
cd cmsgen
mkdir build &&cd build
cmake ..
make
sudo make install
sudo ldconfig
You can even run CMSGen from within your browser from
here.
Command-line usage
Let's take a DIMACS CNF file input.cnf. To get 50 uniform-like samples, run:
Where the return value sat will be True, indicating there is a solution
found (i.e. it's not unsatisfiable), and sol[1], sol[2], etc. will indicate
the solution to variables 1, 2, etc.