Fix and refactor decoder and translator#28
Merged
sergeypospelov merged 4 commits intomainfrom Jun 29, 2023
Merged
Conversation
76dcecf to
27e5553
Compare
CaelmBleidd
approved these changes
Jun 29, 2023
87cf014 to
4b87850
Compare
24 tasks
korifey
pushed a commit
that referenced
this pull request
Jul 12, 2023
petrukhinandrew
added a commit
to petrukhinandrew/usvm
that referenced
this pull request
May 5, 2025
* fix: packagePrivate considered public * feat: pass testInfo into createTestRenderer, add disable security annotations into JcSpringMvcTestClassRenderer * fix: annotation collection logic, Inherited annotation handling * fix: method annotation lookup * fix: style fixes * fix: quick fix
Saloed
pushed a commit
that referenced
this pull request
Jun 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the problem with
UModelBaseambiguity and refactors the whole decoding mechanism a little bit.Details
The problem
We analyze function
check:a0 == 0in emptyUModeland it has emptym0: KModel, soa0evaluates to sample valuenull, because register reading was not translated yet.r0 := mkConst("r0")and for some reasonm0(r0)equals to something different fromnull.JcTestand readr0from the modelm0, but now the model containsr0, we get something non-null, and that is the problem.To fix that, we provide an expression translator in every component of
UModelBase, so it first translates an expression and only then the expression is evaluated in aKModel.Other
I decided to remove
UCachingExprTranslatorto simplify extension of our expressions and the total number of components. Now,UExprTranslatorcachesUExprs viaKNonRecursiveTransformerand also caches initial values forURegionIds explicitly.Lazy model components calls
translatefunction, which takes an expression from a cache or explicitly transforms it.Also fixed cache usage in
UTreeMemoryUpdatesFoldervisitor a little bit.