]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite_engine/grafiteEngine.ml
lazy proof term to increase sharing and decrease memory consumption.
[helm.git] / helm / software / components / grafite_engine / grafiteEngine.ml
index 10cf1b8cbc41e3171f83a6e01300f6822ff2c91f..888ad55ff0b773df640cca516314f6e69749c797 100644 (file)
@@ -689,7 +689,7 @@ let rec eval_command = {ec_go = fun ~disambiguate_command opts status
      status,[]
   | GrafiteAst.Print (_,"proofterm") ->
       let _,_,_,p,_, _ = GrafiteTypes.get_current_proof status in
-      prerr_endline (Auto.pp_proofterm p);
+      prerr_endline (Auto.pp_proofterm (Lazy.force p));
       status,[]
   | GrafiteAst.Print (_,_) -> status,[]
   | GrafiteAst.Qed loc ->
@@ -710,7 +710,7 @@ let rec eval_command = {ec_go = fun ~disambiguate_command opts status
          (GrafiteTypes.Command_error
            "Proof not completed! metasenv is not empty!");
       let name = UriManager.name_of_uri uri in
-      let obj = Cic.Constant (name,Some bo,ty,[],attrs) in
+      let obj = Cic.Constant (name,Some (Lazy.force bo),ty,[],attrs) in
       let status, lemmas = add_obj uri obj status in
        {status with 
          GrafiteTypes.proof_status = GrafiteTypes.No_proof},
@@ -768,7 +768,7 @@ let rec eval_command = {ec_go = fun ~disambiguate_command opts status
                   "\nPlease use a variant."));
            end;
          let _subst = [] in
-         let initial_proof = (Some uri, metasenv', _subst, bo, ty, attrs) in
+         let initial_proof = (Some uri, metasenv', _subst, lazy bo, ty, attrs) in
          let initial_stack = Continuationals.Stack.of_metasenv metasenv' in
          { status with GrafiteTypes.proof_status =
             GrafiteTypes.Incomplete_proof