blob: f811475cdf05c9aedb2c6d4194797c2101b9aaa0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
open CfimAst
open Utils
(** Check if a [statement] contains loops *)
let rec statement_has_loops (st : statement) : bool =
let obj =
object
inherit [_] iter_statement
method! visit_Loop _ _ = raise Found
end
in
try
obj#visit_statement () st;
false
with Found -> true
|