Skip to content

Commit f7129f6

Browse files
authored
Add path condition root to GameState. (#93)
1 parent 7d9becb commit f7129f6

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

VSharp.IL/Serializer.fs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -488,15 +488,20 @@ let collectGameState (basicBlocks: ResizeArray<BasicBlock>) filterStates =
488488
for term in pathCondition do
489489
pathConditionDelta.AddRange(collectPathCondition term)
490490

491-
State(
492-
s.Id,
493-
(uint <| s.CodeLocation.offset - currentBasicBlock.StartOffset + 1<byte_offset>)
494-
* 1u<byte_offset>,
491+
let pathConditionRoot =
495492
PathConditionVertex(
496493
id = getFirstFreePathConditionVertexId (),
497494
pathConditionVertexType = pathConditionVertexType.PathConditionRoot,
498495
children = [| for p in pathCondition -> pathConditionVertices.[p].Id |]
499-
),
496+
)
497+
498+
pathConditionDelta.Add pathConditionRoot
499+
500+
State(
501+
s.Id,
502+
(uint <| s.CodeLocation.offset - currentBasicBlock.StartOffset + 1<byte_offset>)
503+
* 1u<byte_offset>,
504+
pathConditionRoot,
500505
s.VisitedAgainVertices,
501506
s.VisitedNotCoveredVerticesInZone,
502507
s.VisitedNotCoveredVerticesOutOfZone,

0 commit comments

Comments
 (0)