Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liffiton/jsminisolvers
A Javascript API for the MiniSat and MiniCard constraint solvers.
https://github.com/liffiton/jsminisolvers
constraints javascript-api minisat solver
Last synced: 29 days ago
JSON representation
A Javascript API for the MiniSat and MiniCard constraint solvers.
- Host: GitHub
- URL: https://github.com/liffiton/jsminisolvers
- Owner: liffiton
- License: other
- Created: 2017-05-29T15:41:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-24T03:44:53.000Z (3 months ago)
- Last Synced: 2024-10-16T13:13:40.587Z (3 months ago)
- Topics: constraints, javascript-api, minisat, solver
- Language: C++
- Size: 3.33 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
JSMiniSolvers
=============JSMiniSolvers is a Javascript API and implementation of the
[MiniSat](http://minisat.se/) and [MiniCard](http://git.io/minicard) constraint
solvers. The solvers have been compiled into Javascript with
[Emscripten](http://emscripten.org/), meaning they can run directly in a web
browser._[You can also use this library in standalone Javscript engine like
[Node.js](https://nodejs.org/), but in that case you are better off running
natively-compiled code by using a binary or an API that accesses native shared
libraries instead.]_### Alternatives
* [Logic-Solver](https://www.npmjs.com/package/logic-solver) - A higher-level
API for creating & solving logical constraints.
* [Research.js](https://github.com/jgalenson/research.js) - Information and
scripts to help compile MiniSat and other solvers into Javascript.Usage
-----Grab the pre-compiled script and optional sourcemap from ``dist/``. See
``example.html`` for a simple usage example.[Try it online!](https://liffiton.github.io/JSMiniSolvers/example.html)
Development
-----------### Building ``minisolvers.js``
Install dev-dependencies:
npm install
Build:
npm run build
Test:
npm test
### Re-building ``src/cpp/libmini*.js``
The repository contains pre-compiled javascript versions of MiniSat and
MiniCard, so you can build the ``minisolvers.js`` library without needing to
install or use Emscripten. If you would like to modify the C++ source of
either solver and recompile it, however, you will need to [install
Emscripten](https://emscripten.org/docs/getting_started/downloads.html).Then, in the ``src/cpp`` directory:
make
Or to build a debug version (unoptimizied, unminified):
make d
License
-------This code is licensed under the MIT license. See LICENSE for details.