X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=ocaml%2Flambda4.ml;h=c6cecec5c0c064f972071344d4c6381559a4b120;hb=417e6bbe7973c9413216a87dff01f920d39e4657;hp=340b955049e3cc64230cb81bf258663fcdfe941b;hpb=0aaa773167c006689b00b9ff25f867ccbb1caa32;p=fireball-separation.git diff --git a/ocaml/lambda4.ml b/ocaml/lambda4.ml index 340b955..c6cecec 100644 --- a/ocaml/lambda4.ml +++ b/ocaml/lambda4.ml @@ -657,9 +657,9 @@ let env_of_sigma freshno sigma should_explode = e,Pure.lift (-n-1) (snd (List.find (fun (i,_) -> i = n) sigma)),[] with Not_found -> - if should_explode && n = hd_of_i_var (cast_to_i_var !bomb) - then ([], (let f t = Pure.A(t,t) in f (Pure.L (f (Pure.V 0)))), []) - else ([],Pure.V n,[]))::e + if n = hd_of_i_var (cast_to_i_var !bomb) + then ([], Pure.omega should_explode, []) + else ([], Pure.V n, []) ) :: e in aux 0 ;; (* ************************************************************************** *) @@ -712,22 +712,22 @@ let solve p = let ps = List.map scott_of_nf p.ps in let sigma' = List.map (fun (x,inst) -> x, scott_of_nf inst) sigma in - let e' = env_of_sigma freshno sigma' false (* FIXME shoudl_explode *) in + let e' = env_of_sigma freshno sigma' false in + let e'' = env_of_sigma freshno sigma' true in prerr_endline "-----------------"; - let pure_bomb = ToScott.t_of_nf (!bomb) in (* Pure.B *) (function | Some div -> print_endline (Pure.print div); let t = Pure.mwhd (e',div,[]) in prerr_endline ("*:: " ^ (Pure.print t)); - assert (t = pure_bomb) + assert (Pure.diverged t) | None -> ()) div; List.iter (fun n -> verbose ("_::: " ^ (Pure.print n)); - let t = Pure.mwhd (e',n,[]) in + let t = Pure.mwhd (e'',n,[]) in verbose ("_:: " ^ (Pure.print t)); - assert (t <> pure_bomb) + assert (not (Pure.diverged t)) ) conv ; List.iteri (fun i n -> verbose ((string_of_int i) ^ "::: " ^ (Pure.print n));