Skip to content

Commit

Permalink
Complete thread_gas
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-schwarz committed Sep 20, 2024
1 parent dc84b4a commit 300a195
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/framework/constraints.ml
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,12 @@ module PerFunctionGas(GasVal:GasVal):Gas = struct
let callee_gas f v =
let c = Option.default (G.top ()) (M.find_opt f v) in
M.add f (max 0 c-1) v
let thread_gas f v = v (* max 0 (v - 1) *)
let thread_gas f v =
match Cilfacade.find_varinfo_fundec f with
| fd ->
callee_gas fd v
| exception Not_found ->
callee_gas Cil.dummyFunDec v
end


Expand Down

0 comments on commit 300a195

Please sign in to comment.