wkschwartz / pigosat

Go (golang) bindings for Picosat, the satisfiability solver
Other
15 stars 4 forks source link

Make Pigosat-specific types for literals, etc #8

Closed wkschwartz closed 9 years ago

wkschwartz commented 9 years ago

Something like

type Status int
type Literal int32
type Clause []Literal
type Formula []Clause
type Solution []bool

Maybe Literal should be int. PicoSAT's literals are C.int. We just don't want unsafe.Sizeof(Literal) > unsafe.Sizeof(C.int). This could be tested in the unit tests.

wkschwartz commented 9 years ago

On Mac OS 10.10.1, a C int got compiled to 32 bits, so a Go int32 it is.