From a97cea76d531b3ea985c284d76baa6370f7dc489 Mon Sep 17 00:00:00 2001 From: Sylvain Boulmé Date: Fri, 28 May 2021 16:49:31 +0200 Subject: declare a checker for the symbolic simulation --- scheduling/BTL_Scheduler.v | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'scheduling/BTL_Scheduler.v') diff --git a/scheduling/BTL_Scheduler.v b/scheduling/BTL_Scheduler.v index faeb58cd..43d6dd5e 100644 --- a/scheduling/BTL_Scheduler.v +++ b/scheduling/BTL_Scheduler.v @@ -17,9 +17,20 @@ Record match_function (f1 f2: BTL.function): Prop := { exists ib2, (fn_code f2)!pc = Some ib2 /\ symbolic_simu f1 f2 (entry ib1) (entry ib2); }. +Local Open Scope error_monad_scope. + +Definition check_symbolic_simu (f tf: BTL.function): res unit := OK tt. (* TODO: fixme *) + +Lemma check_symbolic_simu_correct x f1 f2: + check_symbolic_simu f1 f2 = OK x -> + forall pc ib1, (fn_code f1)!pc = Some ib1 -> + exists ib2, (fn_code f2)!pc = Some ib2 /\ symbolic_simu f1 f2 (entry ib1) (entry ib2). +Admitted. + Definition transf_function (f: BTL.function) := - (* TODO: fixme *) - OK (BTL.mkfunction (fn_sig f) (fn_params f) (fn_stacksize f) (scheduler f) (fn_entrypoint f)). + let tf := BTL.mkfunction (fn_sig f) (fn_params f) (fn_stacksize f) (scheduler f) (fn_entrypoint f) in + do _ <- check_symbolic_simu f tf; + OK tf. Definition transf_fundef (f: fundef) : res fundef := transf_partial_fundef (fun f => transf_function f) f. -- cgit