Releases: wkschwartz/pigosat
Releases · wkschwartz/pigosat
v1.0.0
This is a feature-complete version 1.0 and the API is now stable.
There have been no major changes since the beta release.
Minor backward incompatible change
- #30: Removed the version-number type and replaced it with simple string.
Updating client code
pigosat.Version
is now a constant string. You can parse it with a library such as semver.
Bug fix
- #29: Fixed a benign data race when writing traces.
Upgrade
- Implemented continuous integration testing and test-coverage reporting and added the corresponding badges to README.
v1.0.0b
v1.0 beta
This is hopefully a feature-complete version 1.0. Ideally PiGoSAT's API will now be stable, and I promise it will be once it's out of beta. It will live in beta for awhile until I get some feedback or I get tired of it being in beta.
Special thanks to @justinfx for all his help.
Add support for
- Writing traces #13 (thanks to @justinfx)
- Making and analyzing assumptions #12 (thanks to @justinfx)
- Deleting
Pigosat
objects manually #18
Backward incompatible changes
- Renamed
AddClauses
toAdd
#28 - Switched order of
Solve
's return values #10 (this also resulted in switching the order of arguments and return values forMinimizer
) - Removed call to
BlockSolution
fromSolve
#22 - Renamed
NewPigosat
toNew
#7 - PiGoSAT-specific types for
Literal
,Clause
,Formula
#8 #9
Updating client code
Before
p := pigosat.New(nil)
p.AddClauses(pigosat.Formula{{1, 2}, {2, 3}, {1}})
for status, solution := p.Solve(); status == pigosat.Satisfiable; status, solution = p.Solve() {
// process solutions here
}
After
Most importantly, you need to
- use
Add
instead ofAddClauses
, - switch the order of solution and status, and
- explicitly call
p.BlockSolution(solution)
.
Callingp.Delete()
when you're done withp
is only important in library code or if you're generating a lot ofpigosat.Pigosat
objects. This is because the garbage collector can callp.Delete()
, but the GC may not get around to doing so before the program exits.
p := pigosat.New(nil)
defer p.Delete() // Not necessary in casual or one-off use
p.Add(pigosat.Formula{{1, 2}, {2, 3}, {1}})
for solution, status := p.Solve(); status == pigosat.Satisfiable; solution, status = p.Solve() {
// process solutions here
p.BlockSolution(solution)
}
Bug fixes
- Accept empty clauses #14 #15 (thanks to @sacado)
- Panic when trying to use uninitialized or deleted Pigosat objects #6
Upgrades
v0.3.1
- Upgrade to PicoSAT 960 (was using version 957)
- Make PiGoSAT
go get
able: Now you can obtain PiGoSAT simply by runninggo get https://github.com/wkschwartz/pigosat
. Thanks to @justinfx for help with this. - Add
BlockSolution
public method as another way to add a clause to your CNF formula - Teach
pigosat.Solve
to be iterable:
for status, solution := p.Solve(); status == Satisfiable; status, solution = p.Solve() {
// Do stuff with `solution`
}
- Improved testing
- Add the
Minimizer
interface for using iterated constraint optimization (need to add some examples to the documentation in the future)
v0.2.2
Documentation improvements
v0.2.0
Automate memory management of Pigosat
instances: users no longer have to call p.Delete()
when they are done with a var p *Pigosat
.
v0.1.0
First version. Provides basic solving capabilities.