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

Queues: Test Oracles for PIEOs and PCQs #2192

Merged
merged 67 commits into from
Jul 15, 2024
Merged

Queues: Test Oracles for PIEOs and PCQs #2192

merged 67 commits into from
Jul 15, 2024

Conversation

KabirSamsi
Copy link
Collaborator

This PR introduces Python test oracles for Push-In-Extract-Out (PIEO) Queues and Programmable Calendar Queues (PCQs). It also generalizes parts of the oracle generation framework to account for parameters like time and rank being passed in directly.

For further info on these structures, please consult the notes that I and @anshumanmohan's have put together on PIEOs, PCQs and PIEO Trees which also discuss the PIEO-PCQ implementation I have gone for here.

Copy link
Contributor

@anshumanmohan anshumanmohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome stuff, and congrats on getting your errors sorted out! I have left a number of comments for you to chip away at. Mostly they are for readability, and in one case I am suggesting a library implementation instead of a hand-rolled one. But the first step is what you have done just now: writing it out by hand! Now that you know it works, you can more confidently try out a library implementation to see if it does what you need. This handwritten version will also be invaluable when coding it up in Calyx.

calyx-py/calyx/queue_data_gen.py Outdated Show resolved Hide resolved
calyx-py/calyx/queue_data_gen.py Outdated Show resolved Hide resolved
calyx-py/calyx/queue_data_gen.py Show resolved Hide resolved
calyx-py/calyx/queue_data_gen.py Outdated Show resolved Hide resolved
calyx-py/calyx/queue_data_gen.py Outdated Show resolved Hide resolved
calyx-py/calyx/queues.py Outdated Show resolved Hide resolved
calyx-py/calyx/queues.py Outdated Show resolved Hide resolved
calyx-py/calyx/queues.py Outdated Show resolved Hide resolved
calyx-py/calyx/queues.py Show resolved Hide resolved
calyx-py/calyx/queues.py Show resolved Hide resolved
@anshumanmohan
Copy link
Contributor

Also, please use the command line to resolve your conflicts with main. Github is guiding you through it below, and I can show you during our 1:1 later.

@KabirSamsi
Copy link
Collaborator Author

KabirSamsi commented Jul 10, 2024

Since my last comment, I've made a handful of changes to fix the CI compiler & memory allocation errors that had started again post the merge. All should be fixed now, though.

@anshumanmohan whenever you have a moment, I've put in all the edits you requested and some of the new functionality. Please let me know if anything else is needed!

Copy link
Contributor

@anshumanmohan anshumanmohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo! Nice stuff, and thanks for doing up the simple/universal version in addition to the other two! I have a few comments inline to try and clarify the code for myself, but otherwise this is looking very close to done :)

calyx-py/calyx/queue_data_gen.py Outdated Show resolved Hide resolved
calyx-py/calyx/queue_data_gen.py Outdated Show resolved Hide resolved
calyx-py/calyx/queues.py Show resolved Hide resolved
calyx-py/calyx/queues.py Outdated Show resolved Hide resolved
calyx-py/calyx/queues.py Outdated Show resolved Hide resolved
calyx-py/calyx/queues.py Show resolved Hide resolved
calyx-py/calyx/queues.py Show resolved Hide resolved
calyx-py/calyx/queues.py Outdated Show resolved Hide resolved
calyx-py/calyx/queues.py Outdated Show resolved Hide resolved
@KabirSamsi
Copy link
Collaborator Author

I have added all the requested changes, are clarified any questions in the discussion above. Please let me know if anything else is required!

Copy link
Contributor

@anshumanmohan anshumanmohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Merge at will!

@KabirSamsi KabirSamsi merged commit 9135b6f into main Jul 15, 2024
18 checks passed
@KabirSamsi KabirSamsi deleted the queues-extend branch July 15, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants