diff options
-rw-r--r-- | scheduling/BTL_Scheduler.v | 15 |
1 files changed, 13 insertions, 2 deletions
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. |