项目作者: liffiton

项目描述 :
A Javascript API for the MiniSat and MiniCard constraint solvers.
高级语言: C++
项目地址: git://github.com/liffiton/JSMiniSolvers.git
创建时间: 2017-05-29T15:41:28Z
项目社区:https://github.com/liffiton/JSMiniSolvers

开源协议:Other

下载


JSMiniSolvers

JSMiniSolvers is a Javascript API and implementation of the
MiniSat and MiniCard constraint
solvers. The solvers have been compiled into Javascript with
Emscripten, meaning they can run directly in a web
browser.

[You can also use this library in standalone Javscript engine like
Node.js, 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 - A higher-level
    API for creating & solving logical constraints.
  • 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!

Development

Building minisolvers.js

Install dev-dependencies:

  1. npm install

Build:

  1. npm run build

Test:

  1. 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
.

Then, in the src/cpp directory:

  1. make

Or to build a debug version (unoptimizied, unminified):

  1. make d

License

This code is licensed under the MIT license. See LICENSE for details.