Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
cc04af0
feat: setting up for mocks, including mockito, draft of handling mocks
sofyak0zyreva Nov 27, 2025
711d3b1
feat: change path selector to targeted, create targets (all return st…
sofyak0zyreva Nov 29, 2025
8dc8aa5
ref: change CalculatorTest class and method under test
sofyak0zyreva Dec 1, 2025
548ecb9
ref: change structure of handling concrete method calls, start implem…
sofyak0zyreva Dec 1, 2025
d9d0fdf
feat: return symbolic exprs when methods are mocked
sofyak0zyreva Dec 6, 2025
b3f5c7a
ref: minor changes to access modifiers in other modules
sofyak0zyreva Dec 7, 2025
8132519
feat: new memory region and corresponding configuration settings
sofyak0zyreva Dec 7, 2025
9a2e7e0
feat: detection of mocked methods' calls and reading symbolic values …
sofyak0zyreva Dec 7, 2025
2851353
feat: override run() for getting final values for mocked methods
sofyak0zyreva Dec 7, 2025
153381c
style: remove unused code
sofyak0zyreva Dec 7, 2025
7e02987
docs: add dependency
sofyak0zyreva Dec 7, 2025
814f0b4
feat: add printing functions for mocked methods and their values
sofyak0zyreva Dec 7, 2025
1864504
ref: delete files with unused code
sofyak0zyreva Dec 7, 2025
1092da5
test: change test structure
sofyak0zyreva Dec 7, 2025
546a6fd
feat: print results in order of class appearances, inside by method c…
sofyak0zyreva Dec 8, 2025
9e8527d
test: basic checks of module's functionality
sofyak0zyreva Dec 8, 2025
3bb8210
ref: move module to my branch
sofyak0zyreva Dec 9, 2025
d25de39
ref: update file according to spring branch
sofyak0zyreva Dec 9, 2025
f73d7d3
fix: only application code is handled in a specified way
sofyak0zyreva Dec 13, 2025
897b710
feat: draft of class for resolving mocked methods
sofyak0zyreva Dec 13, 2025
f5a7841
ref: add type for a mock memory region
sofyak0zyreva Dec 13, 2025
c89f2d9
fix: methods for static fields in mock transformer
sofyak0zyreva Dec 13, 2025
68b423e
ref: remove create machine function from tests
sofyak0zyreva Dec 17, 2025
f1a6e48
ref: leave two interpreter versions for later revision
sofyak0zyreva Dec 17, 2025
13299c2
ref: remove create machine
sofyak0zyreva Dec 17, 2025
df5cb52
feat: draft of test instructions for last state
sofyak0zyreva Dec 17, 2025
a30914c
docs: change approximations version
sofyak0zyreva Dec 18, 2025
c077f03
ref: move gradle file
sofyak0zyreva Dec 18, 2025
47993e9
fix: adding all instructions
sofyak0zyreva Dec 18, 2025
48bc127
ref: mocked method is readable from memory
sofyak0zyreva Dec 18, 2025
2f8bc79
fix: which mocked values are resolved
sofyak0zyreva Dec 18, 2025
89fbb9a
fix: assign right methods and params to each UTestsMockConfigInfo
sofyak0zyreva Dec 19, 2025
ced38cd
feat: draft of rendering config info
sofyak0zyreva Dec 21, 2025
21ad247
ref: remove unused interpreter code
sofyak0zyreva Dec 21, 2025
34f302c
feat: render instructions for mock config
sofyak0zyreva Dec 22, 2025
14552e3
ref: add str for convenience
sofyak0zyreva Dec 22, 2025
c9849a6
ref: temporarily modify files outside of mocks dir
sofyak0zyreva Dec 22, 2025
b057e0d
test: further tests
sofyak0zyreva Dec 22, 2025
280a089
style: apply formatting
sofyak0zyreva Dec 22, 2025
d503ff8
feat: add visitor to record where variables should be created
sofyak0zyreva Dec 23, 2025
0fb4c46
feat: add new UTestExpression type and respective custom rendering of…
sofyak0zyreva Dec 23, 2025
a460fc7
ref: clean up and apply formatter
sofyak0zyreva Dec 23, 2025
33f294c
feat: get variable name info from test file and insert it into mock c…
sofyak0zyreva Dec 23, 2025
7cd6bc9
ref: clean up tests
sofyak0zyreva Dec 23, 2025
fb02521
style: formatter
sofyak0zyreva Dec 23, 2025
482f2d2
ref: move functions around for convenience
sofyak0zyreva Dec 23, 2025
4f76504
fix: clean up global maps between test runs
sofyak0zyreva Dec 23, 2025
9bdf50b
ref: remove unused code
sofyak0zyreva Dec 23, 2025
3f9b30b
feat: add flag of exception in method under test
sofyak0zyreva Dec 24, 2025
9201e27
feat: add full java test renderer
sofyak0zyreva Dec 24, 2025
a4b2fb8
ref: move class to testOutput folder for lack of imports
sofyak0zyreva Dec 24, 2025
1f5ef6d
docs: final test files with mock configs in testOutput
sofyak0zyreva Dec 24, 2025
3fa26e3
docs: add ci
sofyak0zyreva Dec 24, 2025
2eb8a21
docs: remove old docs for lack of complications
sofyak0zyreva Dec 24, 2025
e9cdfde
docs: add readme
sofyak0zyreva Dec 24, 2025
6a876ee
docs: fix links
sofyak0zyreva Dec 24, 2025
2300b53
docs: fix misprint
sofyak0zyreva Dec 24, 2025
8e72799
docs: add code-based documentation
sofyak0zyreva Dec 25, 2025
0a78ac1
docs: add more documentation
sofyak0zyreva Dec 25, 2025
39a9f48
style: apply formatting
sofyak0zyreva Dec 25, 2025
f30d8c8
docs: fix publish_dir
sofyak0zyreva Dec 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 0 additions & 190 deletions .github/workflows/ci.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy Dokka Docs

on:
push:
branches: [ mocks2 ]

jobs:
deploy-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Build Dokka
run: ./gradlew dokkaHtml

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: usvm-jvm-mocks/build/dokka/html
33 changes: 0 additions & 33 deletions .github/workflows/gradle-publish.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/mocksCI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Mocks configurations CI

on:
push:
branches: [ mocks2 ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Grant execute permission to Gradle wrapper
run: chmod +x ./gradlew

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 21

- name: Build project without tests
run: ./gradlew build -x test

- name: Run JVM mocks tests
run: ./gradlew :usvm-jvm-mocks:test

- name: Run ktlint check
run: ./gradlew ktlintCheck
35 changes: 0 additions & 35 deletions .github/workflows/python-runner-publish.yml

This file was deleted.

1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ tasks.register("validateProjectList") {
project(":usvm-python"),
project(":usvm-ts"),
project(":usvm-ts-dataflow"),
project(":usvm-jvm-rendering"),
)

// Gather the actual subprojects from the current root project.
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ object Versions {
const val ksmt = "0.5.26"
const val logback = "1.4.8"
const val mockk = "1.13.4"
const val mockito = "5.4.0"
const val rd = "2023.2.0"
const val sarif4k = "0.5.0"
const val shadow = "8.3.3"
Expand Down Expand Up @@ -191,6 +192,12 @@ object Libs {
version = Versions.mockk
)

val mockito = dep(
group = "org.mockito",
name = "mockito-core",
version = Versions.mockito
)

// https://github.com/UnitTestBot/juliet-java-test-suite
val juliet_support = dep(
group = "com.github.UnitTestBot.juliet-java-test-suite",
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ include("usvm-python:usvm-python-runner")
findProject(":usvm-python:usvm-python-runner")?.name = "usvm-python-runner"
include("usvm-python:usvm-python-commons")
findProject(":usvm-python:usvm-python-commons")?.name = "usvm-python-commons"
include("usvm-jvm-mocks")
include("usvm-jvm-rendering")

// Actually, `includeBuild("../jacodb")` is enough, but there is a bug in IDEA when path is a symlink.
// As a workaround, we convert it to a real absolute path.
Expand Down
2 changes: 1 addition & 1 deletion usvm-core/src/main/kotlin/org/usvm/Machine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class UMachine<State : UState<*, *, *, *, *, State>> : AutoCloseable {
* @param stopStrategy is called on every step, before peeking a next state from the path selector.
* Returning `true` aborts analysis.
*/
protected fun run(
protected open fun run(
interpreter: UInterpreter<State>,
pathSelector: UPathSelector<State>,
observer: UMachineObserver<State>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.usvm.statistics
import org.usvm.UState
import org.usvm.util.RealTimeStopwatch
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds

/**
* Maintains information about time spent on machine processes.
Expand All @@ -16,7 +17,7 @@ class TimeStatistics<Method, State : UState<*, Method, *, *, *, State>> : UMachi
/**
* Total machine running time.
*/
val runningTime get() = stopwatch.elapsed
val runningTime get() = Duration.INFINITE

/**
* Returns time spent by machine on [method].
Expand Down
Loading