-
Notifications
You must be signed in to change notification settings - Fork 9
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
✨ Add SyReC synthesis with Additional Lines #65
✨ Add SyReC synthesis with Additional Lines #65
Conversation
…syrec.cpp/hpp) Included the corresponding python bindings (bindings.cpp) Added the corresponding tests (test_add_lines_synthesis.cpp, test_add_lines_simulation) Included corresponding json files required for testing purpose (circuit_simulation_add_lines.cpp, circuit_synthesis_add_lines.cpp) Included the corresponding python tests (test_syrec.cpp) Made necessary minor changes to the respective cmake files.
Codecov Report
@@ Coverage Diff @@
## main #65 +/- ##
=======================================
- Coverage 91.5% 91.2% -0.3%
=======================================
Files 25 29 +4
Lines 1789 1825 +36
=======================================
+ Hits 1638 1666 +28
- Misses 151 159 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just quickly went over all the changes here and as of now, this is not ready to be merged.
Please avoid code duplication at (almost) all cost. This tiny PR alone adds 1.8K lines of code to the repository of which most are duplicate code. For details, see the comments below.
…n a single file. Updated the GUI as required.
…r' into Adding-Original-SyReC-synthesizer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks much better already! Thanks.
Still, i believe there is room for improvement and some easily avoidable code duplication remains. You can find the detailed comments below.
…s) to the syrec_synthesis.cpp/hpp file. derived class put in a seperate file.
…r' into Adding-Original-SyReC-synthesizer
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last round of changes didn't go the direction I would have hoped. In particular
- it hardly reduced code duplication
- it did not split up the individual classes
- it introduced different names for the same functions.
What I had in mind, was proper object oriented programming. I just pushed some commits that refactor the relevant classes in order to reduce the code duplication as much as possible.
Note how the additional lines synthesiser only defines 4 functions and that is it. Everything can be handled is handled in the base class.
This was made possible by just 1-2 small changes in some functions.
Overall the refactoring reduced the additional lines in this PR by roughly 300 lines.
All tests still pass. But please make sure that everything besides that still works as intended.
Thank you very much for this. I didn't know that I had to do this. Again, learnt a lot from this |
include/algorithms/synthesis/syrec_synthesis_additional_lines.hpp
Outdated
Show resolved
Hide resolved
I just resolved all the conflicts so that CI starts properly. |
Don't know why the CI is failing? |
Seems to just be a sporadic failure. The upload of the codecov report sometimes fails for whatever reason. Usually a restart of the job is enough to fix this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also looks great now. I'll again update the PR title and description and then merge the PR once CI passes.
Small side note: once this is merged, please wait a bit before creating the next PR. I am planning on introducing some more code quality features and improve some aspects of the python packaging during the rest of the day. I'll keep you posted (and you'll probably see the PRs)
I have already created the dd synthesis PR. is that going to be an issue? |
Most certainly not, but you'll have to deal with the merge conflicts 🙃 |
This PR implements the original SyReC synthesis approach using additional lines. The
syrec-editor
GUI is updated accordingly.