aboutsummaryrefslogtreecommitdiffstats
path: root/src/translation/HTLgen.v
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-06-02 17:21:06 +0100
committerYann Herklotz <git@yannherklotz.com>2020-06-02 17:21:06 +0100
commit2b0c8766b4e99772777763e96e13747454672814 (patch)
tree7fd47d3207d30a79a644bb2c3b0af6d3e5416cf0 /src/translation/HTLgen.v
parent5416713c9d6a64839fabf2a923e4dd3bb25ac5fc (diff)
downloadvericert-kvx-2b0c8766b4e99772777763e96e13747454672814.tar.gz
vericert-kvx-2b0c8766b4e99772777763e96e13747454672814.zip
Add proof for initial state
Diffstat (limited to 'src/translation/HTLgen.v')
-rw-r--r--src/translation/HTLgen.v8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/translation/HTLgen.v b/src/translation/HTLgen.v
index aa965fc..78b1864 100644
--- a/src/translation/HTLgen.v
+++ b/src/translation/HTLgen.v
@@ -371,7 +371,13 @@ Definition max_state (f: function) : state :=
Definition transl_module (f : function) : Errors.res module :=
run_mon (max_state f) (transf_module f).
-Definition transl_fundef := transf_partial_fundef transl_module.
+Definition transl_fundef (f : RTL.fundef) : Errors.res HTL.fundef :=
+ match f with
+ | Internal f' =>
+ Errors.bind (transl_module f')
+ (fun f'' => Errors.OK (Internal f''))
+ | _ => Errors.Error (Errors.msg "External function could not be translated.")
+ end.
(** Translation of a whole program. *)