Skip to content

Commit

Permalink
Merge pull request #72 from UQ-PAC/backwards-visitor
Browse files Browse the repository at this point in the history
implement aslBackwardsVisitor
  • Loading branch information
ailrst authored May 8, 2024
2 parents 0120c18 + a46f655 commit abd63cb
Show file tree
Hide file tree
Showing 5 changed files with 392 additions and 292 deletions.
6 changes: 3 additions & 3 deletions libASL/asl_utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ let fv_stmts stmts =

let fv_stmt stmt =
let fvs = new freevarClass in
ignore (visit_stmt (fvs :> aslVisitor) stmt);
ignore (visit_stmt_single (fvs :> aslVisitor) stmt);
fvs#result

let fv_decl decl =
Expand Down Expand Up @@ -295,7 +295,7 @@ end

let locals_of_stmts stmts =
let lc = new localsClass in
ignore (Visitor.mapNoCopy (visit_stmt (lc :> aslVisitor)) stmts);
ignore @@ Asl_visitor.visit_stmts lc stmts;
lc#locals

let locals_of_decl decl =
Expand Down Expand Up @@ -423,7 +423,7 @@ let subst_type (s: expr Bindings.t) (x: ty): ty =

let subst_stmt (s: expr Bindings.t) (x: stmt): stmt =
let subst = new substClass s in
visit_stmt subst x
visit_stmt_single subst x


(** More flexible substitution class - takes a function instead
Expand Down
Loading

0 comments on commit abd63cb

Please sign in to comment.