Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pocke/go-minisat
Golang binding for Minisat
https://github.com/pocke/go-minisat
Last synced: about 2 months ago
JSON representation
Golang binding for Minisat
- Host: GitHub
- URL: https://github.com/pocke/go-minisat
- Owner: pocke
- License: mit
- Created: 2015-04-29T10:25:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T16:13:53.000Z (about 6 years ago)
- Last Synced: 2024-06-19T13:47:13.144Z (6 months ago)
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
go-minisat
=================Golang binding for minisat.
Installation
----------------### Install minisat
Arch linux
```sh
$ yaourt -S minisat-git
```Other
```sh
$ git clone https://github.com/niklasso/minisat
$ cd minisat
$ make config prefix="/usr"
$ make
$ sudo make install
```### Install go-minisat
```sh
$ go get github.com/pocke/go-minisat
```Usage
-----------```go
package mainimport (
"github.com/pocke/go-minisat"
)func main() {
s := minisat.NewSolver()
v1 := minisat.NewVar()
v2 := minisat.NewVar()
s.AddClause(v1, v2)
s.AddClause(v1, v2.Not())
s.AddClause(v1.Not(), v2.Not())
s.Solve() // => trues.ModelValue(v1) // => true, nil
s.ModelValue(v2) // => false, nil
}
```Example
------------- [sudoku-solver](https://github.com/pocke/sudoku-solver)
License
-----------Copyright © 2015 Masataka Kuwabara
Licensed [MIT][mit]
[MIT]: http://www.opensource.org/licenses/mit-license.php