-
Notifications
You must be signed in to change notification settings - Fork 18
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
EHeapElems is buggy #60
Comments
@Calvin-L BTW, can you grant me sufficient permission to add labels to issues? |
It feels like the problem is that |
I think we might need to associate each ArrayList representing the Heap with an explicit heap_size. Or we can't really track its real size under mutations. |
|
It would be more helpful to write a summary of your conversation, than to paste the conversation. That will be briefer and easier for others to understand. |
Summary of the bug: Thus one proposal is to provide @Calvin-L proposed four potential fixes following-up PR #61:
I felt like first we shouldn't ignore it, since there is no guarantee that it will always disappear. And sometimes, it will be confusing to user since we claimed that "it is an anytime algorithm". I suspect that option (3) implies no less work than option 1. And in some sense it is just an incremental change over design (2). Design (1) implies not just work but also change in the architecture, so I believe that we should plan it as a long-term goal and see if it is worth pursing. In summary, I think we should temporarily fix this problem by design (2). |
I think of Cozy has having two distinct data structures:
Is proposal 2 to do away with the heaparray representation and always use a heap (represented as a pair) instead? |
That seems good to me.
I think of it as only one, but some of its operations are different from the ones that normal heaps have since they need a valid length parameter. It is also true that Cozy has two different "views" of a heap's representation: one view in terms of bags which Cozy uses to reason about the semantics of different operations during synthesis, and one view in terms of arrays which Cozy uses to generate efficient code. For Cozy to be correct, these two views need to behave identically on identical inputs. |
Then compile and run as #59 indicates
I suspect that this is a code-gen bug.
The text was updated successfully, but these errors were encountered: