File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
usvm-ml-gameserver/src/main/kotlin/org.usvm/gameserver/serialization Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -82,11 +82,18 @@ var pcs = mutableSetOf<Int>()
8282fun <Block : BasicBlock > createGameState (
8383 game : Game <Block >
8484): GameState {
85- val (vertices, stateWrappers, blockGraph, pathConditionVertices ) = game
85+ val (vertices, stateWrappers, blockGraph, _ ) = game
8686 val states = stateWrappers.map { it.toState() }
87+ val pcVertices = mutableListOf<PathConditionVertex >()
88+ for (state in states) {
89+ if (! pcs.contains(state.pathCondition.id)) {
90+ pcVertices.add(state.pathCondition)
91+ pcs.add(state.pathCondition.id)
92+ }
93+ }
8794 return GameState (
8895 graphVertices = vertices.map { it.toGameMapVertex() },
89- pathConditionVertices = pathConditionVertices.map { it.toPathConditionVertex() } ,
96+ pathConditionVertices = pcVertices ,
9097 states = states,
9198 map = blockGraph.toGameMapEdge(vertices)
9299 )
You can’t perform that action at this time.
0 commit comments