Skip to content

Commit

Permalink
consume
Browse files Browse the repository at this point in the history
  • Loading branch information
Dspil committed Aug 2, 2023
1 parent b1b847d commit abfbf48
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion silver
10 changes: 9 additions & 1 deletion src/main/scala/rules/Executor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import viper.silicon.state.terms.predef.`?r`
import viper.silicon.utils.freshSnap
import viper.silicon.verifier.Verifier
import viper.silver.cfg.ConditionalEdge
import viper.silver.reporter.BenchmarkingAccumulator
import viper.silver.reporter.ProverActionIDs

trait ExecutionRules extends SymbolicExecutionRules {
def exec(s: State,
Expand Down Expand Up @@ -143,7 +145,13 @@ object executor extends ExecutionRules {
(Q: (State, Verifier) => VerificationResult)
: VerificationResult = {

exec(s, graph.entry, cfg.Kind.Normal, v)(Q)
val execID = ProverActionIDs.getID
println(s"OIJOIEWJFOIJW $execID")
v.reporter report BenchmarkingAccumulator("exec", execID, true)
exec(s, graph.entry, cfg.Kind.Normal, v)((s, v) => {
v.reporter report BenchmarkingAccumulator("exec", execID)
Q(s, v)
})
}

def exec(s: State, block: SilverBlock, incomingEdgeKind: cfg.Kind.Value, v: Verifier)
Expand Down
10 changes: 9 additions & 1 deletion src/main/scala/rules/Producer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import viper.silicon.state._
import viper.silicon.supporters.functions.NoopFunctionRecorder
import viper.silicon.verifier.Verifier
import viper.silver.verifier.reasons.{NegativePermission, QPAssertionNotInjective}
import viper.silver.reporter.ProverActionIDs
import viper.silver.reporter.BenchmarkingAccumulator

trait ProductionRules extends SymbolicExecutionRules {

Expand Down Expand Up @@ -125,7 +127,13 @@ object producer extends ProductionRules {
allPves ++= pves
})

produceTlcs(s, sf, allTlcs.result(), allPves.result(), v)(Q)
val produceID = ProverActionIDs.getID
v.reporter report BenchmarkingAccumulator("produce", produceID)

produceTlcs(s, sf, allTlcs.result(), allPves.result(), v)((s, v) => {
v.reporter report BenchmarkingAccumulator("produce", produceID)
Q(s, v)
})
}

private def produceTlcs(s: State,
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/verifier/DefaultMainVerifier.scala
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ class DefaultMainVerifier(config: Config,
reporter report BenchmarkingReport("method well definedness", "meth_well_def")
reporter report BenchmarkingReport("prover", "prover")
reporter report BenchmarkingReport("consume", "consume")
reporter report BenchmarkingReport("produce", "produce")
reporter report BenchmarkingReport("eval", "eval")
reporter report BenchmarkingReport("branch", "branching")

( functionVerificationResults
Expand Down

0 comments on commit abfbf48

Please sign in to comment.