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

Inlining & Threading (rework) #483

Merged
merged 34 commits into from
Jul 11, 2023
Merged

Inlining & Threading (rework) #483

merged 34 commits into from
Jul 11, 2023

Conversation

xeren
Copy link
Collaborator

@xeren xeren commented Jul 5, 2023

Moves inlining of boogie code into a new ProgramProcessor.

EDIT by @ThomasHaas :
This PR moves static memory initialization, inlining, and thread creation from the parser into processing passes.
All thse passes run immediatly after parsing, meaning that the overall behaviour should not have changed.
There is a minor improvement in handling of pthread_join allowing us to handle slightly more cases.
As a side effect, the 4 pthread events Create, Start, Join and End are also gone now.

Work to do in future PRs:

  • Move thread creation to after unrolling. This requires a lot of changes in our passes to work on functions rather than threads. We (likely) also need a notion of LocalId in addition to GlobalId
  • We need to understand what kind of history-tracking we want to do, e.g., do we need an InlineId now? More generally, we need to look into metadata tracking with our more intricate program processing. I think tracking of originalId is also broken for now.
  • More refactoring/cleanup.

xeren and others added 29 commits July 5, 2023 13:11
Proper renaming in Inlining
Deep copy of DirectFunctionCall
Pthread_create and join are parsed and calls to them are generated as expected outside of inline mode.
Added new Events for passing parameters across threads, and updated ThreadCreation pass to generate them.
Updated CoreCodeVerification to recognize new threading-related events.
Updated inlining pass to generate annotations around inlined calls.
Updated Alias analysis to recognize new threading-related events
Refactor/renaming
Added new thread events to EventFactory
Updated ThreadCreation to not generate Pthread events
Fixed issue in ExecutionModel with boolean valued memory accesses.
… with the new ThreadCreation pass, but still fail without, so they are disabled for now.
Added new thread_local.c unit test
Better automatic naming for nameless threads.
Adding missing StaticMemoryInitializer pass into ProcessingManager
First cleanup pass of Parser code (removing inline mode).
@ThomasHaas ThomasHaas changed the title [Draft] Inlining (rework) Inlining & Threading (rework) Jul 9, 2023
@hernanponcedeleon
Copy link
Owner

LGTM

@ThomasHaas ThomasHaas merged commit 0dd7003 into development_rework Jul 11, 2023
1 check passed
@ThomasHaas ThomasHaas deleted the inlining1 branch July 11, 2023 20:48
hernanponcedeleon added a commit that referenced this pull request Jul 15, 2023
Add proper functions #470
Generic Registers #471
Rmw base classes #475
Type Safety #478
Parsing & thread creation #479
Unit tests for thread creation #481
Move memory initialization, inlining, and thread creation from the parser to processing passes #483
Inlining of nondet_int #485
Various fixes/cleanup #487

---------

Co-authored-by: Thomas Haas <[email protected]>
Co-authored-by: René Pascal Maseli <[email protected]>
Co-authored-by: Hernan Ponce de Leon <[email protected]>
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