Skip to content

Releases: wkschwartz/pigosat

v1.0.0

31 Jul 18:23
Compare
Choose a tag to compare

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

05 Jan 08:20
Compare
Choose a tag to compare
v1.0.0b Pre-release
Pre-release

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 to Add #28
  • Switched order of Solve's return values #10 (this also resulted in switching the order of arguments and return values for Minimizer)
  • Removed call to BlockSolution from Solve #22
  • Renamed NewPigosat to New #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 of AddClauses,
  • switch the order of solution and status, and
  • explicitly call p.BlockSolution(solution).
    Calling p.Delete() when you're done with p is only important in library code or if you're generating a lot of pigosat.Pigosat objects. This is because the garbage collector can call p.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

  • Upgrade PicoSAT from 960 to 965 #21
  • Improved documentation #25
  • Minimizer's RecordSolution no longer needs to be safe for concurrent use #19
  • Improved testing and stability #5 (thanks to @justinfx) #6 #20 #24 #26

v0.3.1

09 Feb 14:29
Compare
Choose a tag to compare
v0.3.1 Pre-release
Pre-release
  • Upgrade to PicoSAT 960 (was using version 957)
  • Make PiGoSAT go getable: Now you can obtain PiGoSAT simply by running go 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

30 Jan 00:13
Compare
Choose a tag to compare

Documentation improvements

v0.2.0

28 Jan 15:31
Compare
Choose a tag to compare

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

18 Jan 21:59
Compare
Choose a tag to compare

First version. Provides basic solving capabilities.