Skip to content

Commit

Permalink
Counting vars now
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Nov 29, 2024
1 parent cc2e020 commit 6ad63b3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ fun XcfaLabel.collectVars(): Iterable<VarDecl<*>> =
is ReadLabel -> setOf(global, local)
is StartLabel -> params.map { ExprUtils.getVars(it) }.flatten().toSet() union setOf(pidVar)
is WriteLabel -> setOf(global, local)
is SyncRecvLabel -> setOf(key)
is SyncSendLabel -> setOf(key)
else -> emptySet()
}

Expand Down Expand Up @@ -241,6 +243,8 @@ fun XcfaLabel.collectVarsWithAccessType(): VarAccessMap =
is JoinLabel -> mapOf(pidVar to READ)
is ReadLabel -> mapOf(global to READ, local to READ)
is WriteLabel -> mapOf(global to WRITE, local to WRITE)
is SyncRecvLabel -> mapOf(key to READ)
is SyncSendLabel -> mapOf(key to WRITE)
else -> emptyMap()
}

Expand Down

0 comments on commit 6ad63b3

Please sign in to comment.