Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Pigosat-specific types for literals, etc #8

Closed
wkschwartz opened this issue Feb 13, 2015 · 1 comment · Fixed by #9
Closed

Make Pigosat-specific types for literals, etc #8

wkschwartz opened this issue Feb 13, 2015 · 1 comment · Fixed by #9
Milestone

Comments

@wkschwartz
Copy link
Owner

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
Copy link
Owner Author

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

wkschwartz added a commit that referenced this issue Feb 15, 2015
This makes it easier for users of the API to remember the relationships among
the different argument and return-value types from the different Pigosat
methods. Further, it makes maintenance easier: e.g., we can change the literal
type from int32 to int64 just by changing the `type Literal int32` line.
wkschwartz added a commit that referenced this issue Feb 15, 2015
This makes it easier for users of the API to remember the relationships among
the different argument and return-value types from the different Pigosat
methods. Further, it makes maintenance easier: e.g., we can change the literal
type from int32 to int64 just by changing the `type Literal int32` line.
@wkschwartz wkschwartz mentioned this issue Feb 15, 2015
Merged
@wkschwartz wkschwartz modified the milestone: v1.0 beta Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant