forked from CakeML/cakeml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWord8ArrayProgScript.sml
30 lines (24 loc) · 1.22 KB
/
Word8ArrayProgScript.sml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
open preamble ml_translatorLib ml_progLib basisFunctionsLib
Word8ProgTheory
val _ = new_theory "Word8ArrayProg";
val _ = translation_extends "Word8Prog";
val _ = ml_prog_update (open_module "Word8Array");
val _ = append_decs
``[mk_binop "array" Aw8alloc;
mk_binop "sub" Aw8sub;
mk_unop "length" Aw8length;
Dlet unknown_loc (Pvar "update") (Fun "x" (Fun "y" (Fun "z"
(App Aw8update [Var (Short "x"); Var (Short "y"); Var (Short "z")]))));
Dlet unknown_loc (Pvar "copy")
(Fun "src" (Fun "srcoff" (Fun "len" (Fun "dst" (Fun "dstoff"
(App CopyAw8Aw8 [Var (Short "src");Var (Short "srcoff");Var (Short "len");
Var (Short "dst");Var (Short "dstoff")]))))));
Dlet unknown_loc (Pvar "copyVec")
(Fun "src" (Fun "srcoff" (Fun "len" (Fun "dst" (Fun "dstoff"
(App CopyStrAw8 [Var (Short "src");Var (Short "srcoff");Var (Short "len");
Var (Short "dst");Var (Short "dstoff")]))))));
Dlet unknown_loc (Pvar "substring")
(Fun "src" (Fun "srcoff" (Fun "len"
(App CopyAw8Str [Var (Short "src");Var (Short "srcoff");Var (Short "len")])))) ]``;
val _ = ml_prog_update (close_module NONE);
val _ = export_theory()