-
Notifications
You must be signed in to change notification settings - Fork 4
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
Types #9
Types #9
Conversation
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.
I think it's a good idea. In addition to maintainability, I do think it increases readability, since the sat-solving stuff tends to have you looking at a lot of slices of ints and bool. The typedef do help to document what you are looking at along the way. Are you thinking of merging some of the API I had exposed from my fork before putting the project aside? |
Thanks for the feedback. I want to support the entire PicoSAT feature set but I don't want anything Plus there are some things that are super easy to test like the recently Any advice on priorities, test data, and API you can suggest is welcome. On Sunday, February 15, 2015, Justin Israel notifications@github.com
Billy Schwartz |
Sometime within the next couple days, I could take the features that I have On Mon Feb 16 2015 at 1:02:14 PM William Schwartz notifications@github.com
|
That would be great. I'm going to try to work on some features/tests too, especially for low hanging fruit. I think the easiest way to test completely new features is to add fields to the test data like 0bf1cb6, but as always I'm open to suggestion. Thanks! |
Make specific types for all inputs and outputs from Pigosat
Fixes #8
By using Pigosat specific types —
Literal
instead ofint32
,Formula
instead of[][]int32
— we address two problems. First, I'm hoping the API is easier to understand for a beginner. Second, it makes maintenance easier: e.g., we can change the literal type fromint32
toint64
just by changing thetype Literal int32
line. Eventually we could even add methods like(I'm not adding this method now because I don't think it's entirely necessary at this point.)
@justinfx, wondering what you think about this. I'd like to get the API right, add a few more features, bump to version 1, then set this project aside.