-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Feature request] Add support for Term and Contract ID #247
Comments
Question: What should be the ID of a term or contract that was constructed without an explicit ID? That is, should we have this kind of API, given PEP 8 Descriptive Naming Styles:
Or this:
Where the constructor would use Python's built-in It seems that the 2nd alternative is preferable for traceability proposes. |
Eventually, for the purpose of traceability, I get the impression that a term may need to know to what contract it belongs--and whether it is an assumption or guarantee. This would require us to identify each term uniquely--for which we probably cannot rely on the user. We may need to have a term factory that is in charge of generating new IDs for terms. In the case we are discussing, we are using the |
We need to separate two different concepts:
For (1), I suggest using a UUID version 4 string with the user-provided ID as a suffix. This will ensure that all of Pacti's IDs will be unique regardless of whether provenance traceability is turned on or off. For (2), we have a separate issue about this: #248 |
I agree we have two items in the conversation: IDs and provenance, but the two are closely related. I only see a strong need for supporting IDs when supporting provenance. For the current use case, which is disambiguation of print rules, I am not sure an ID would be the cleanest way to implement it. Can you give me an example of how an ID could help this disambiguation? IMO, we could support disambiguation using a new dictionary in the
We could store
Now, when we see that term |
Suppose we parse a contract that has two expressions: Then the dictionary approach would have:
We're losing a lot of information about the relationship between the rules; when we see Suppose instead that the |
Since we've benchmarked Pacti to be fast when we use job-level parallel processing as we did for the space_mission case study, it is essential to avoid adding global in-memory states like a term dictionary as it would prevent running concurrent jobs on different processors! |
This branch commit adds The next step is to hook up the current polyhedral parser to generate pairs of Verified |
This branch commit adds
The 1st test passes; the 2nd test fails at the check for the The reason we loose the parse rule provenance is due to the simplification of the guarantees during construction: To fix this problem, it seems that we need to augment |
This commit updates the following APIs:
All tests pass, including new tests to verify the preservation of guarantee terms, even if simplification removes some of them; see the new test cases in
|
Fixed the quality checks; this is ready for a draft PR. |
Closing, see #252 (comment) |
Is your feature request related to a problem? Please describe.
To expand Pacti's syntax for Polyhedral terms, it will be necessary to keep track of the conversion between the end-user input form of a term and the internal Polyhedral terms as summarized here: #129 (comment)
Describe the solution you'd like
This ticket is about the basic functionality of tracking term and contract ID at the API level.
The text was updated successfully, but these errors were encountered: