Skip to content

Add 1-Dimensional memory model for memory safe tasks - #756

Merged
schuessf merged 133 commits into
devfrom
wip/jk/simplified-memory-model-post
Nov 19, 2025
Merged

Add 1-Dimensional memory model for memory safe tasks#756
schuessf merged 133 commits into
devfrom
wip/jk/simplified-memory-model-post

Conversation

@jankoerner

@jankoerner jankoerner commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces a 1-dimensional memory model which can be used for ReachSafety tasks.
The 1-dimensional memory model comes with some major refactorings of the source code.
These refactoring can be seen in the attached image and allow an easy extension for new Addressings, Structures, ManagementStrategies and Metadatas (not visible in the image).
2025-11-06T20:16:22,830512837+01:00

@schuessf

schuessf commented Nov 6, 2025

Copy link
Copy Markdown
Member

@jankoerner Thanks for your work! I will try to review this PR tomorrow. I just quickly fixed the compilation, as some settings were changed in #752 and started the Jenkins nightly for this PR.

@bahnwaerter

Copy link
Copy Markdown
Member

Many thanks also for your extensive work, @jankoerner!

[...] I just quickly fixed the compilation, as some settings were changed in #752 and started the Jenkins nightly for this PR [...]

Thanks @schuessf for fixing the issue. It looked like the Git rebase didn't include all the other changes.

@jankoerner
jankoerner force-pushed the wip/jk/simplified-memory-model-post branch 2 times, most recently from 17dd19a to 3cb57aa Compare November 8, 2025 21:25
@bahnwaerter

bahnwaerter commented Nov 9, 2025

Copy link
Copy Markdown
Member

The soundness issues that lead to incorrect results on the following benchmarks should be fixed.

@schuessf schuessf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for your work! I briefly looked over the structure of your new code and it looks good to me -- if it works, we can merge it in principal.

I left a few more general comments. In addition: Please make sure for all the files you added that they the have at least a header, an author and a description such that we know what the class is supposed to do.

@schuessf

Copy link
Copy Markdown
Member

I just checked the latest nightly and a lot of tests failed, but (probably) only because the new setting "memory neutrality" did not parse an empty string to an empty set and therefore the check in MemoryPointer1D always failed. Therefore, I fixed the parsing on dev (23b7c4e) and hopefully the test will all succeed in the next nightly.

@schuessf

schuessf commented Nov 12, 2025

Copy link
Copy Markdown
Member

@jankoerner The nightly tests run now in principle. There is however one issue left, where the existing implementation still only works with 2D pointers, see here

Edit: I just fixed that myself.

@schuessf schuessf changed the title Add 1-Dimensional memory model for ReachSafety tasks Add 1-Dimensional memory model for memory safe tasks Nov 19, 2025
Renamed memory model to memory structure because it only covers the
memory representation. The full memory model alos features a memory
addressing and this commit is a preparation for this step.
Added the interfaces for structure and addressing.
Added 1D and 2D memory addressing as well as a common base class.
Added a utils class.
The ExpressionTranslation was neither used in the abstract base class nor in the subclasses.
Also removed unnecessary cast of TypeHandler.
This factory is used to create concrete instances implementing
interfaces that are used in the memory model. All validity checks are
also part of the factory.
Use the memory structure from the new memory model instead of the using
the structure that was part of the memory handler.
From time to time, more parts will move to the memory model.
The malloc now depent on the settings.
Moved things out of the MemoryHandler to access them there and in the
model.
Renamed things.
The statements in Ultimate.Init depent on the current memory model.
jankoerner and others added 25 commits November 19, 2025 18:00
Removed introduced Supresswarning to allow external tools to notice
them.
Also renamed some classes to match the naming scheme.
This method was deleted because it is unused but restored again such
that it can be deleted in a dedicated commit / pull-request.
@schuessf
schuessf force-pushed the wip/jk/simplified-memory-model-post branch from 7ffa30c to 2bc755f Compare November 19, 2025 17:01
@schuessf
schuessf merged commit 2bc755f into dev Nov 19, 2025
2 checks passed
@schuessf
schuessf deleted the wip/jk/simplified-memory-model-post branch November 19, 2025 17:05
schuessf added a commit that referenced this pull request Nov 21, 2025
#756 added more tests (~1000), therefore the latest nightly was aborted just before it finished.
@maul-esel maul-esel mentioned this pull request Dec 21, 2025
32 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants