-
Notifications
You must be signed in to change notification settings - Fork 19
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
Implementation of the JacoDB interpreter #18
Merged
Merged
Conversation
This file contains 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
sergeypospelov
changed the title
Implementation of JacoDB interpreter
Draft: Implementation of JacoDB interpreter
May 23, 2023
sergeypospelov
force-pushed
the
sergey/jvm
branch
from
June 1, 2023 08:27
c118006
to
6e42f58
Compare
sergeypospelov
force-pushed
the
sergey/jvm
branch
4 times, most recently
from
June 15, 2023 15:22
02ae0b8
to
36d969f
Compare
sergeypospelov
changed the title
Draft: Implementation of JacoDB interpreter
Implementation of the JacoDB interpreter
Jun 20, 2023
dvvrd
requested changes
Jun 27, 2023
usvm-core/src/main/kotlin/org/usvm/ps/stopstregies/StepsCountingStoppingStrategy.kt
Outdated
Show resolved
Hide resolved
usvm-core/src/main/kotlin/org/usvm/ps/stopstregies/TargetsCoveredStoppingStrategy.kt
Outdated
Show resolved
Hide resolved
usvm-jvm/src/main/kotlin/org/usvm/machine/JcApplicationGraph.kt
Outdated
Show resolved
Hide resolved
usvm-jvm/src/test/kotlin/org/usvm/operators/JcBinaryOperatorTest.kt
Outdated
Show resolved
Hide resolved
usvm-jvm/src/test/kotlin/org/usvm/operators/JcUnaryOperatorTest.kt
Outdated
Show resolved
Hide resolved
usvm-jvm/src/main/kotlin/org/usvm/machine/state/JcStateUtils.kt
Outdated
Show resolved
Hide resolved
sergeypospelov
force-pushed
the
sergey/jvm
branch
from
June 28, 2023 07:27
784c221
to
a6cdaff
Compare
Fix: not heapRefEq
… different size now
sergeypospelov
force-pushed
the
sergey/jvm
branch
from
June 28, 2023 12:04
a6cdaff
to
f42416e
Compare
CaelmBleidd
requested changes
Jun 28, 2023
usvm-core/src/main/kotlin/org/usvm/constraints/PathConstraints.kt
Outdated
Show resolved
Hide resolved
usvm-core/src/main/kotlin/org/usvm/ps/combinators/InterleavedSelector.kt
Outdated
Show resolved
Hide resolved
sergeypospelov
force-pushed
the
sergey/jvm
branch
from
June 29, 2023 08:00
3804497
to
6e1d827
Compare
sergeypospelov
force-pushed
the
sergey/jvm
branch
from
June 29, 2023 10:07
252b2c9
to
9c49644
Compare
sergeypospelov
force-pushed
the
sergey/jvm
branch
from
June 29, 2023 10:08
9c49644
to
2c9e6bd
Compare
CaelmBleidd
approved these changes
Jun 29, 2023
korifey
pushed a commit
that referenced
this pull request
Jul 12, 2023
Co-authored-by: Alexey Menshutin <alex.menshutin99@gmail.com>
korifey
pushed a commit
that referenced
this pull request
Jul 12, 2023
Co-authored-by: Alexey Menshutin <alex.menshutin99@gmail.com>
korifey
added a commit
that referenced
this pull request
Jul 13, 2023
* First version of logging for usvm * Implementation of the JacoDB interpreter (#18) Co-authored-by: Alexey Menshutin <alex.menshutin99@gmail.com> * New path selectors infrastructure (#29) * Add general framework for weighted searchers * Add tests for AA-tree and discrete PDF * Little typo fix in tests * Add shortest distance to targets weighter * Add random tree path selector * Add fork depth path selector * Fix interleaved path selector * Add comments and some new java tests, infrastructure fixes * PR comments fixes, add solver type and timeout options * First version of logging for usvm * synchronize with master --------- Co-authored-by: Sergey Pospelov <sergeypospelov59@gmail.com> Co-authored-by: Alexey Menshutin <alex.menshutin99@gmail.com> Co-authored-by: Maksim Parshin <mxprshn@gmail.com>
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 adds an initial support of the JVM byte-code analysis. In addition, simple search strategies
DfsPathSelector
,BfsPathSelector
and combinators were implemented, as well asTargetsCoveredStoppingStrategy
. Also, some minor refactorings inusvm-core
were made.The PR includes some tests, comments and lots of TODOs in the code. The supported features and known issues are listed in #25.
Details
The overall architecture is very similar to the sample-language analyzer.
The JVM interpreter is based on JacoDB 3-address code, which is very similar to well-known Soot Jimple representation.
JcMachine
JcMachine
is an entry point of analysis, and it takes aJcClasspath
as a dependency. Some varying features, like search strategy, are hard-coded for simplicity now.JcApplicationGraph
JcApplicationGraph
is a wrapper for JacoDB application graph, which simply delegates calls to it.JcState
JcState
extendsUState
with aJcMethodResult
field, which represents a current result of a method execution, other components are the same.JcInterpreter
JcIntepreter
is very similar toSampleInterpreter
, except that it isn't responsible for handling calls. It also provides an initial support for handling exceptions, but without catch blocks now.JcExprResolver
JcExprResolver
performs an actual symbolic execution, handling allJcExpr
essions. The primitive types are handled based on their size, meaning that, e.g.char
is represented by bit-vectors of 16 bits. There is a known issue inJacoDB
about incorrect types for operations with integrals likechar
orshort
, so some tests are disabled now.Changes in
usvm-core
UHeapRef
andUSizeExpr
, instead of just aUSizeExpr
UReadOnlyMemoryInterface
implemented byUMemoryBase
andUModelBase
URegistersStack
a little bitUArrayLengthLValue
TODO: