Skip to content

Commit

Permalink
Merge branch 'master' into append-op
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarabrahamsson committed Mar 4, 2018
2 parents 7a2d9b2 + 58eca1f commit 9d7859d
Show file tree
Hide file tree
Showing 64 changed files with 3,417 additions and 2,766 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ compiler/benchmarks/sml/polyc_*
compiler/benchmarks/sml/sml_*
compiler/benchmarks/*.dat
compiler/benchmarks/*.eps

# sexpression build
unverified/sexp-bootstrap/build
compiler-sexp*
2 changes: 2 additions & 0 deletions basis/RatProgScript.sml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ val REAL_TYPE_def = Define `
REAL_TYPE (r:real) =
\v. ?x:rat. RAT_TYPE x v /\ (real_of_rat x = r)`;

val _ = add_type_inv ``REAL_TYPE`` ``:(int # num)``;

(* transfer *)

val RAT_RAT = Q.prove(
Expand Down
9 changes: 6 additions & 3 deletions characteristic/cfAppLib.sml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ fun mk_Arrow_of_app_goal t = let
val (tm'', args) = strip_n (n-1) tm'
in (tm'', args @ [arg]) end
fun dest_pred t = strip_n 2 t
fun pred_v t = let val (_, [_, v]) = dest_pred t in v end
fun pred_x t = let val (_, [x, _]) = dest_pred t in x end
fun pred_v t = case dest_pred t of (_, [_, v]) => v | _ => failwith "pred_v"
fun pred_x t = case dest_pred t of (_, [x, _]) => x | _ => failwith "pred_x"
val (t_vars, t_body) = strip_forall t
val (hyps1, concl_tm) = strip_imp t_body
(* hyps: list of hypothesis *)
Expand Down Expand Up @@ -95,7 +95,10 @@ fun mk_Arrow_of_app_goal t = let
val (_, post_body1) = dest_comb post (* dest_POSTv *)
val (_, post_body2) = dest_abs post_body1
val (_, pure_post) = dest_comb post_body2 (* dest_cond *)
val (concl_pred, [f_x, v]) = dest_pred pure_post
val (concl_pred, f_x, v) =
(case dest_pred pure_post of
(concl_pred, [f_x, v]) => (concl_pred, f_x, v)
| _ => failwith "dest_pred")
val (f, _) = strip_n (List.length argsv_list) f_x
(* build the iterated Arrows *)
val arrows = foldl (fn (argv, arrows) =>
Expand Down
Loading

0 comments on commit 9d7859d

Please sign in to comment.