Skip to content

Refactor offsets, lvals and addresses#1067

Merged
sim642 merged 77 commits intomasterfrom
offset-refactor
Jun 6, 2023
Merged

Refactor offsets, lvals and addresses#1067
sim642 merged 77 commits intomasterfrom
offset-refactor

Conversation

@sim642
Copy link
Copy Markdown
Member

@sim642 sim642 commented May 30, 2023

Everything is organized into three modules:

  1. Offset contains everything for manipulating Goblint offsets with various index types.
  2. Mval contains everything for manipulating varinfo * offset pairs.
  3. AddressDomain contains everything for manipulating base analysis addresses.

All three now have interface files which makes rebuild times negligible when only modifying the implementation (as opposed to recompiling ~200 modules which transitively depend on them).
Many functions are renamed to make naming consistent and standard.

@sim642 sim642 added the cleanup Refactoring, clean-up label May 30, 2023
@sim642 sim642 self-assigned this May 30, 2023
@michael-schwarz
Copy link
Copy Markdown
Member

It may also be worth trying if we can get rid of the polymorphic variants for offsets?

@sim642
Copy link
Copy Markdown
Member Author

sim642 commented May 30, 2023

It may also be worth trying if we can get rid of the polymorphic variants for offsets?

That's a future idea I have, but it requires modifying so many places that I don't want to do it right now.
With organized type signatures in place, it should become doable without tons of module prefixes. Especially because we open CIL in so many places and it has constructors with the same names.

Copy link
Copy Markdown
Member

@michael-schwarz michael-schwarz left a comment

Choose a reason for hiding this comment

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

Thank you for undertaking this gigantic refactoring endeavor. I left comments in a few places. Additionally I was wondering if we want to write something up for the docs while this is fresh on our minds.

The distinction between Mval and Lval really is vital to newcomers to the framework.

@sim642
Copy link
Copy Markdown
Member Author

sim642 commented Jun 5, 2023

Additionally I was wondering if we want to write something up for the docs while this is fresh on our minds.

The distinction between Mval and Lval really is vital to newcomers to the framework.

I added a few sentences to the top level API docs. That way it hopefully stays better in sync.

@sim642 sim642 merged commit 133df50 into master Jun 6, 2023
@sim642 sim642 deleted the offset-refactor branch June 6, 2023 10:28
sim642 added a commit that referenced this pull request Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Refactoring, clean-up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants