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

Move tutorial tools to main directory structure #130

Merged
merged 11 commits into from
Oct 28, 2020

Conversation

didriklundberg
Copy link
Member

This PR moves tools from the tutorial support directories to the other tools.

A few questions remain:

  • What to do with bir_lifter_simple_interfaceLib.sml and bir_lifter_interfaceLib.sml? I suggest these be merged, while checking names of functions to be consistent.
  • What to do with bir_wp_interfaceLib.sml and easy_noproof_wpLib.sml (currently not used)? Here, functionality seems to be more overlapping.
  • SMT interface and symbolic execution stuff is left in the support and support2 directories of the tutorial. We need to decide where to place these things.

We also need to change the main README to take these changes into account. I think that can be done when this is finalized.

@didriklundberg didriklundberg marked this pull request as ready for review October 19, 2020 15:09
andreaslindner
andreaslindner previously approved these changes Oct 19, 2020
Copy link
Member

@andreaslindner andreaslindner left a comment

Choose a reason for hiding this comment

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

Nice restructuring collection. Could we make the adjustments to the README file in this PR and keep the three other bullet points for a new PR?

Otherwise, some comments:

  • not for this PR, but general comment: we need more tests. at least some basic three tests per module. otherwise it's hard to notice if something breaks and also hard to find what exactly breaks from a change: e.g. backlifter and comp (at the moment they are indirectly tested by the tutorial test, but more fine grained testing would be helpful. even if tests are simple and really basic they help to spot some problems and narrow down the search for causes)
  • backlifter sounds fancy :)
  • maybe subprogram lib is not really a lifter thing. but maybe it is because it works together with programs that are lifted with the current version of the lifter. but then, when we change the lifter to produce multiple blocks per instruction, then this way of extracting subprograms doesn't work anymore. unsure. anyways, the reason why i comment on it is that the idea of having a subprogram lib doesn't sound like a "lifter thing" to me

@didriklundberg
Copy link
Member Author

Ok, just patched up dependencies.py a tiny bit but the output (both using print_simple flag and not) does not agree format-wise with the dependencies.dot originally added by @totorigolo in e572ec1. @totorigolo, was this created manually or did you use some other tool I've missed?

@totorigolo
Copy link
Member

From the look of the file, I would say that I did create it manually. My rationale must have been that this directory structure does not change often, and it's super easy to fix the file.

@didriklundberg
Copy link
Member Author

From the look of the file, I would say that I did create it manually. My rationale must have been that this directory structure does not change often, and it's super easy to fix the file.

Yes, that was what I suspected. Thanks for the quick reply.

@andreaslindner
Copy link
Member

Just to not keep you waiting: Should I give this one another review already to merge it or are you still working on it?

@didriklundberg
Copy link
Member Author

Just to not keep you waiting: Should I give this one another review already to merge it or are you still working on it?

I pushed a commit with a few further changes to the README just now. You can review them, and maybe make an issue for fixing a new dependency graph if you want.

README.md Outdated Show resolved Hide resolved
README.md Outdated
├─ doc: Documentation material
├─ examples: Showcasing HolBA
│ ├─ aes: lifting + WP of AES on Cortex-M0
│ ├─ bsl-wp-smt: Simplified BIR generation and SMT interface
Copy link
Member

Choose a reason for hiding this comment

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

It does also have wp generation inside. In this way it tests the whole chain for simple example programs. Maybe we want to add one word somewhere to capture this fact?

Copy link
Member Author

Choose a reason for hiding this comment

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

It does also have wp generation inside. In this way it tests the whole chain for simple example programs. Maybe we want to add one word somewhere to capture this fact?

Sure, you can suggest a change to this effect.

Copy link
Member

Choose a reason for hiding this comment

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

Not exactly one extra word, but what about:
Small BIR example programs to test Simplified BIR generation, WP propagation and SMT interface
or
Small BIR example programs to test BSL, WP, and the extended HolSMT
or append "libraries together" to the last one

Copy link
Member Author

Choose a reason for hiding this comment

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

I went with the first suggestion.

andreaslindner
andreaslindner previously approved these changes Oct 24, 2020
Copy link
Member

@andreaslindner andreaslindner left a comment

Choose a reason for hiding this comment

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

I think it looks good, and your idea to create an issue for the dependency graph is also good I think.

# Conflicts:
#	src/theory/tools/backlifter/bir_backlifterScript.sml
#	src/tools/Holmakefile.gen
#	src/tools/backlifter/bir_backlifterLib.sml
andreaslindner
andreaslindner previously approved these changes Oct 24, 2020
Copy link
Member

@andreaslindner andreaslindner left a comment

Choose a reason for hiding this comment

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

I just resolved the 3 merge conflicts stemming from the lifter wrapping. If the tests pass fine, then the last review should still apply.

@andreaslindner
Copy link
Member

Ahh. Probably because of the git file rename detection and similar path names, I merged wrong. I am fixing it now and will then check it properly.

andreaslindner
andreaslindner previously approved these changes Oct 24, 2020
Copy link
Member

@andreaslindner andreaslindner left a comment

Choose a reason for hiding this comment

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

I checked and now everything is as it should be.

Copy link
Member

@andreaslindner andreaslindner left a comment

Choose a reason for hiding this comment

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

Of course it's still very much approved 😃

@didriklundberg didriklundberg merged commit 3af2da9 into master Oct 28, 2020
@didriklundberg didriklundberg deleted the dev_tutorial_to_main branch February 3, 2021 08:57
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.

3 participants