Skip to content

Conversation

sergeyrid
Copy link
Collaborator

No description provided.

sergeyrid and others added 30 commits July 7, 2023 12:19
…th-selection

# Conflicts:
#	buildSrc/src/main/kotlin/Versions.kt
#	usvm-core/src/main/kotlin/org/usvm/Machine.kt
#	usvm-core/src/main/kotlin/org/usvm/ps/PathSelectorFactory.kt
#	usvm-jvm/build.gradle.kts
@sergeyrid sergeyrid requested a review from Saloed September 7, 2023 17:23
class CoverageCounterStatistics<State : UState<*, *, *, *, State>>(
private val coverageStatistics: CoverageStatistics<*, *, State>,
private val coverageCounter: CoverageCounter,
private val methodName: String
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we include method signature here?

@emnigma emnigma mentioned this pull request Oct 4, 2023
@sergeyrid sergeyrid requested a review from Saloed October 18, 2023 23:26
testStatementsCounts.values.sum(),
testFinished.values.sumOf { if (it) 1.0 else 0.0 }.toFloat(),
)
return Json.encodeToJsonElement(statistics).jsonObject
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is better to return a statistics object, avoiding serialization to json.

if (path.isEmpty()) {
return
}
val jsonData = buildJsonObject {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is better to use serializable object instead of creating a json manually.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The first field of this object would need to be a multidimensional array of floats of unknown depth. I can think of 2 ways of making it serializabe: writing a custom serializer or making it a JsonArray. Both options seem to me like doing almost the same thing as creating a json manually, but probably even worse.

@sergeyrid sergeyrid requested a review from Saloed October 30, 2023 20:24
return blockList.map { getBlockFeatures(it) }
}

fun saveGraph(filePath: Path) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is better to split the BlockGraph data structure and graph printer

env, edgesDataBuffer,
edgesShape.map { it.toLong() }.toLongArray()
)
val result = gnnSession!!.run(mapOf(Pair("x", featuresData), Pair("edge_index", edgesData)))
Copy link
Collaborator

Choose a reason for hiding this comment

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

mapOf("x" to featuresData)

)
val result = gnnSession!!.run(mapOf(Pair("x", featuresData), Pair("edge_index", edgesData)))
val output = (result.get("output").get().value as Array<*>).map {
(it as FloatArray).toList()
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is better to use FloatArray if possible

petrukhinandrew added a commit to petrukhinandrew/usvm that referenced this pull request Sep 22, 2025
* fix: lint

* fix: inherit test method annotations from fakeMethod

* feat: introduce reflection utils renderer, remove spring import manager

* Fix class expression render for primitive and array types (UnitTestBot#144)

* Fix empty unbound wildcard type bound (UnitTestBot#147)

* feat: introduce reflection utils inline strategy

Signed-off-by: Andrew Petrukhin <dartmol2300@gmail.com>

* refactor: update reflection utils inline strategy ownership

* fix: update JcSpringMvcTestTransformer.kt to match actual context init

* fix: style

* feat: remove unsafe import manager

* fix: pass isAccessibleFromTestClass separately from inline strategy

* fix: remove file renderer from unsafe utils renderer

* fix: style

---------

Signed-off-by: Andrew Petrukhin <dartmol2300@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants