From 7fcd02817f4201e81ed35bf3356095997966c8d5 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Thu, 20 Jan 2022 19:08:29 +0100 Subject: Make good progress on updating InterpreterStatements to use CPS --- src/Invariants.ml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Invariants.ml') diff --git a/src/Invariants.ml b/src/Invariants.ml index 33e7d90b..52de4c5e 100644 --- a/src/Invariants.ml +++ b/src/Invariants.ml @@ -8,6 +8,7 @@ module C = Contexts module Subst = Substitute module A = CfimAst module L = Logging +open Cps open TypesUtils open InterpreterUtils open InterpreterBorrowsCore @@ -726,3 +727,9 @@ let check_invariants (config : C.config) (ctx : C.eval_ctx) : unit = check_borrowed_values_invariant ctx; check_typing_invariant ctx; check_symbolic_values config ctx + +(** Same as [check_invariants], but written in CPS *) +let cf_check_invariants (config : C.config) : cm_fun = + fun cf ctx -> + check_invariants config ctx; + cf ctx -- cgit v1.2.3