Commit 6be9b9a8 authored by MARCHE Claude's avatar MARCHE Claude
Browse files

remove all implicit use of introduce_premises

parent a8564b0d
......@@ -7,7 +7,8 @@
<prover id="2" name="Z3" version="4.5.0" timelimit="5" steplimit="0" memlimit="1000"/>
<prover id="3" name="CVC4" version="1.5" timelimit="1" steplimit="0" memlimit="1000"/>
<prover id="4" name="Alt-Ergo" version="2.0.0" timelimit="1" steplimit="0" memlimit="1000"/>
<file name="../isqrt_von_neumann.mlw" proved="true">
<prover id="5" name="CVC4" version="1.4" timelimit="1" steplimit="0" memlimit="1000"/>
<file name="../isqrt_von_neumann.mlw">
<theory name="VonNeumann16" proved="true">
<goal name="sqr_add" proved="true">
<proof prover="2" timelimit="1"><result status="valid" time="0.36"/></proof>
......@@ -48,34 +49,34 @@
<proof prover="3"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter isqrt16.11" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.01"/></proof>
<proof prover="3"><result status="valid" time="0.06"/></proof>
</goal>
<goal name="WP_parameter isqrt16.12" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.01"/></proof>
<proof prover="3"><result status="valid" time="0.05"/></proof>
</goal>
<goal name="WP_parameter isqrt16.13" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.05"/></proof>
<proof prover="3"><result status="valid" time="0.08"/></proof>
</goal>
<goal name="WP_parameter isqrt16.14" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.08"/></proof>
</goal>
<goal name="WP_parameter isqrt16.15" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.08"/></proof>
<proof prover="3"><result status="valid" time="0.06"/></proof>
</goal>
<goal name="WP_parameter isqrt16.16" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.06"/></proof>
<proof prover="3"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter isqrt16.17" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.06"/></proof>
<proof prover="3"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter isqrt16.18" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.06"/></proof>
<proof prover="3"><result status="valid" time="0.05"/></proof>
</goal>
<goal name="WP_parameter isqrt16.19" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.05"/></proof>
</goal>
<goal name="WP_parameter isqrt16.20" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.08"/></proof>
<proof prover="3"><result status="valid" time="0.05"/></proof>
</goal>
<goal name="WP_parameter isqrt16.21" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.06"/></proof>
......@@ -84,7 +85,7 @@
<proof prover="3"><result status="valid" time="0.05"/></proof>
</goal>
<goal name="WP_parameter isqrt16.23" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.01"/></proof>
<proof prover="3"><result status="valid" time="0.08"/></proof>
</goal>
<goal name="WP_parameter isqrt16.24" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.02"/></proof>
......@@ -96,13 +97,13 @@
<proof prover="3"><result status="valid" time="0.04"/></proof>
</goal>
<goal name="WP_parameter isqrt16.27" expl="loop variant decrease" proved="true">
<proof prover="3"><result status="valid" time="0.08"/></proof>
<proof prover="3"><result status="valid" time="0.07"/></proof>
</goal>
<goal name="WP_parameter isqrt16.28" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.05"/></proof>
<proof prover="3"><result status="valid" time="0.06"/></proof>
</goal>
<goal name="WP_parameter isqrt16.29" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.05"/></proof>
<proof prover="3"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter isqrt16.30" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.08"/></proof>
......@@ -126,7 +127,7 @@
<proof prover="3"><result status="valid" time="0.68"/></proof>
</goal>
<goal name="WP_parameter isqrt16.37" expl="loop variant decrease" proved="true">
<proof prover="3"><result status="valid" time="0.07"/></proof>
<proof prover="3"><result status="valid" time="0.08"/></proof>
</goal>
<goal name="WP_parameter isqrt16.38" expl="postcondition" proved="true">
<proof prover="3"><result status="valid" time="0.02"/></proof>
......@@ -137,7 +138,7 @@
</transf>
</goal>
</theory>
<theory name="VonNeumann32" proved="true">
<theory name="VonNeumann32">
<goal name="sqr_add" proved="true">
<transf name="unfold" proved="true" arg1="sqr">
<goal name="sqr_add.0" proved="true">
......@@ -145,8 +146,8 @@
</goal>
</transf>
</goal>
<goal name="WP_parameter isqrt32" expl="VC for isqrt32" proved="true">
<transf name="split_goal_wp" proved="true" >
<goal name="WP_parameter isqrt32" expl="VC for isqrt32">
<transf name="split_goal_wp" >
<goal name="WP_parameter isqrt32.0" expl="loop invariant init" proved="true">
<proof prover="3"><result status="valid" time="0.01"/></proof>
</goal>
......@@ -184,22 +185,22 @@
<proof prover="3"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter isqrt32.12" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.01"/></proof>
<proof prover="3"><result status="valid" time="0.02"/></proof>
</goal>
<goal name="WP_parameter isqrt32.13" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.28"/></proof>
<proof prover="3"><result status="valid" time="0.16"/></proof>
</goal>
<goal name="WP_parameter isqrt32.14" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.36"/></proof>
</goal>
<goal name="WP_parameter isqrt32.15" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.16"/></proof>
<proof prover="3"><result status="valid" time="0.19"/></proof>
</goal>
<goal name="WP_parameter isqrt32.16" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.18"/></proof>
<proof prover="3"><result status="valid" time="0.26"/></proof>
</goal>
<goal name="WP_parameter isqrt32.17" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.19"/></proof>
<proof prover="3"><result status="valid" time="0.24"/></proof>
</goal>
<goal name="WP_parameter isqrt32.18" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.10"/></proof>
......@@ -208,7 +209,7 @@
<proof prover="3"><result status="valid" time="0.12"/></proof>
</goal>
<goal name="WP_parameter isqrt32.20" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.59"/></proof>
<proof prover="3"><result status="valid" time="0.30"/></proof>
</goal>
<goal name="WP_parameter isqrt32.21" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.26"/></proof>
......@@ -217,28 +218,31 @@
<proof prover="3"><result status="valid" time="0.11"/></proof>
</goal>
<goal name="WP_parameter isqrt32.23" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.01"/></proof>
<proof prover="3"><result status="valid" time="0.02"/></proof>
</goal>
<goal name="WP_parameter isqrt32.24" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.33"/></proof>
</goal>
<goal name="WP_parameter isqrt32.25" expl="loop invariant preservation" proved="true">
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="16.47"/></proof>
<goal name="WP_parameter isqrt32.25" expl="loop invariant preservation">
<proof prover="0"><result status="timeout" time="1.00"/></proof>
<proof prover="3" timelimit="30"><result status="unknown" time="29.61"/></proof>
<proof prover="4"><result status="timeout" time="1.01"/></proof>
<proof prover="5"><result status="unknown" time="1.01"/></proof>
</goal>
<goal name="WP_parameter isqrt32.26" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.12"/></proof>
</goal>
<goal name="WP_parameter isqrt32.27" expl="loop variant decrease" proved="true">
<proof prover="3"><result status="valid" time="0.17"/></proof>
<proof prover="3"><result status="valid" time="0.30"/></proof>
</goal>
<goal name="WP_parameter isqrt32.28" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.10"/></proof>
</goal>
<goal name="WP_parameter isqrt32.29" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.11"/></proof>
<proof prover="3"><result status="valid" time="0.15"/></proof>
</goal>
<goal name="WP_parameter isqrt32.30" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.51"/></proof>
<proof prover="3"><result status="valid" time="0.28"/></proof>
</goal>
<goal name="WP_parameter isqrt32.31" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.31"/></proof>
......@@ -256,10 +260,10 @@
<proof prover="3"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter isqrt32.36" expl="loop invariant preservation" proved="true">
<proof prover="3" timelimit="100"><result status="valid" time="113.42"/></proof>
<proof prover="3" timelimit="100"><result status="valid" time="66.28"/></proof>
</goal>
<goal name="WP_parameter isqrt32.37" expl="loop variant decrease" proved="true">
<proof prover="3"><result status="valid" time="0.30"/></proof>
<proof prover="3"><result status="valid" time="0.17"/></proof>
</goal>
<goal name="WP_parameter isqrt32.38" expl="postcondition" proved="true">
<proof prover="3"><result status="valid" time="0.22"/></proof>
......@@ -318,52 +322,55 @@
<proof prover="3"><result status="valid" time="0.02"/></proof>
</goal>
<goal name="WP_parameter isqrt64.10" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.05"/></proof>
<proof prover="3"><result status="valid" time="0.31"/></proof>
</goal>
<goal name="WP_parameter isqrt64.11" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter isqrt64.12" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.01"/></proof>
<proof prover="3" timelimit="5"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter isqrt64.13" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter isqrt64.14" expl="assertion" proved="true">
<proof prover="3"><result status="valid" time="1.32"/></proof>
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="1.23"/></proof>
</goal>
<goal name="WP_parameter isqrt64.15" expl="assertion" proved="true">
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="2.73"/></proof>
</goal>
<goal name="WP_parameter isqrt64.16" expl="assertion" proved="true">
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="2.62"/></proof>
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="2.30"/></proof>
</goal>
<goal name="WP_parameter isqrt64.17" expl="assertion" proved="true">
<proof prover="3" timelimit="5"><result status="valid" time="1.87"/></proof>
<proof prover="3"><result status="valid" time="1.00"/></proof>
</goal>
<goal name="WP_parameter isqrt64.18" expl="assertion" proved="true">
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="3.60"/></proof>
<proof prover="3"><result status="valid" time="1.90"/></proof>
</goal>
<goal name="WP_parameter isqrt64.19" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.55"/></proof>
<proof prover="3"><result status="valid" time="0.66"/></proof>
</goal>
<goal name="WP_parameter isqrt64.20" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.70"/></proof>
</goal>
<goal name="WP_parameter isqrt64.21" expl="loop invariant preservation" proved="true">
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="2.54"/></proof>
<proof prover="0"><result status="highfailure" time="0.88"/></proof>
<proof prover="3" timelimit="30"><result status="valid" time="2.36"/></proof>
<proof prover="4"><result status="timeout" time="1.01"/></proof>
<proof prover="5"><result status="unknown" time="1.00"/></proof>
</goal>
<goal name="WP_parameter isqrt64.22" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.76"/></proof>
</goal>
<goal name="WP_parameter isqrt64.23" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.79"/></proof>
<proof prover="3"><result status="valid" time="0.50"/></proof>
</goal>
<goal name="WP_parameter isqrt64.24" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.01"/></proof>
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="0.02"/></proof>
</goal>
<goal name="WP_parameter isqrt64.25" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="1.08"/></proof>
<proof prover="3"><result status="valid" time="0.69"/></proof>
</goal>
<goal name="WP_parameter isqrt64.26" expl="loop invariant preservation" proved="true">
<transf name="replace" proved="true" arg1="num" arg2="(sub num1 b)">
......@@ -424,21 +431,21 @@
<goal name="WP_parameter isqrt64.29" expl="loop variant decrease" proved="true">
<transf name="split_goal_wp" proved="true" >
<goal name="WP_parameter isqrt64.29.0" expl="VC for isqrt64" proved="true">
<proof prover="3"><result status="valid" time="0.73"/></proof>
<proof prover="3"><result status="valid" time="0.58"/></proof>
</goal>
<goal name="WP_parameter isqrt64.29.1" expl="VC for isqrt64" proved="true">
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="2.44"/></proof>
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="2.00"/></proof>
</goal>
</transf>
</goal>
<goal name="WP_parameter isqrt64.30" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.66"/></proof>
<proof prover="3"><result status="valid" time="0.55"/></proof>
</goal>
<goal name="WP_parameter isqrt64.31" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="0.64"/></proof>
<proof prover="3"><result status="valid" time="0.55"/></proof>
</goal>
<goal name="WP_parameter isqrt64.32" expl="loop invariant preservation" proved="true">
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="3.80"/></proof>
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="3.68"/></proof>
</goal>
<goal name="WP_parameter isqrt64.33" expl="loop invariant preservation" proved="true">
<proof prover="3"><result status="valid" time="1.07"/></proof>
......@@ -467,7 +474,7 @@
<goal name="WP_parameter isqrt64.39.0.0.0" expl="VC for isqrt64" proved="true">
<transf name="assert" proved="true" arg1="(x = add (sqr res_g) num)">
<goal name="WP_parameter isqrt64.39.0.0.0.0" proved="true">
<proof prover="3" timelimit="5"><result status="valid" time="1.84"/></proof>
<proof prover="3" timelimit="5"><result status="valid" time="1.28"/></proof>
</goal>
<goal name="WP_parameter isqrt64.39.0.0.0.1" expl="VC for isqrt64" proved="true">
<transf name="unfold" proved="true" arg1="sqr">
......@@ -486,7 +493,7 @@
<proof prover="3"><result status="valid" time="0.01"/></proof>
</goal>
<goal name="WP_parameter isqrt64.39.0.0.0.1.0.0.0.1.1" proved="true">
<proof prover="3"><result status="unknown" time="0.94"/></proof>
<proof prover="3" obsolete="true"><result status="unknown" time="0.94"/></proof>
<proof prover="4"><result status="valid" time="0.14" steps="241"/></proof>
</goal>
</transf>
......@@ -755,10 +762,10 @@
<goal name="WP_parameter isqrt64.40" expl="loop variant decrease" proved="true">
<transf name="split_goal_wp" proved="true" >
<goal name="WP_parameter isqrt64.40.0" expl="VC for isqrt64" proved="true">
<proof prover="3"><result status="valid" time="0.58"/></proof>
<proof prover="3"><result status="valid" time="0.46"/></proof>
</goal>
<goal name="WP_parameter isqrt64.40.1" expl="VC for isqrt64" proved="true">
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="2.00"/></proof>
<proof prover="3" timelimit="10" memlimit="4000"><result status="valid" time="1.70"/></proof>
</goal>
</transf>
</goal>
......
......@@ -1476,9 +1476,9 @@ let on_selected_row r =
if detached then
task_view#source_buffer#set_text ""
else
let b = gconfig.intro_premises in
let _b = gconfig.intro_premises in
let c = gconfig.show_full_context in
send_request (Get_task(id,b,c,true))
send_request (Get_task(id,c,true))
| NProofAttempt ->
let (pa, _obs, _l) = Hint.find node_id_pa id in
let output_text =
......@@ -1508,13 +1508,13 @@ let on_selected_row r =
if detached then
task_view#source_buffer#set_text ""
else
let b = gconfig.intro_premises in
let _b = gconfig.intro_premises in
let c = gconfig.show_full_context in
send_request (Get_task(id,b,c,true))
send_request (Get_task(id,c,true))
| _ ->
let b = gconfig.intro_premises in
let _b = gconfig.intro_premises in
let c = gconfig.show_full_context in
send_request (Get_task(id,b,c,true))
send_request (Get_task(id,c,true))
with
| Not_found -> task_view#source_buffer#set_text ""
......
......@@ -68,10 +68,9 @@ let interp_request args =
Command_req (int_of_string n, com)
| _ -> invalid_arg ("Why3web.interp_request '" ^ args ^ "'"))
| args when Strings.has_prefix "gettask_" args ->
let b = false (* TODO: allow user to customize printing with intros or not *) in
let c = false in
let loc = true in
Get_task (int_of_string (Strings.remove_prefix "gettask_" args),b,c,loc)
Get_task (int_of_string (Strings.remove_prefix "gettask_" args),c,loc)
| _ -> invalid_arg ("Why3web.interp_request '" ^ args ^ "'")
let handle_script s args =
......
......@@ -354,7 +354,7 @@ let build_prover_call ?proof_script ~cntexample c id pr limit callback ores =
let command =
Whyconf.get_complete_command config_pr ~with_steps in
try
let task = Session_itp.get_raw_task c.controller_session id in
let task = Session_itp.get_task c.controller_session id in
Debug.dprintf debug_sched "[build_prover_call] Script file = %a@."
(Pp.print_option Pp.string) proof_script;
let inplace = config_pr.Whyconf.in_place in
......@@ -545,7 +545,7 @@ let schedule_proof_attempt c id pr
let create_file_rel_path c pr pn =
let session = c.controller_session in
let driver = snd (Hprover.find c.controller_provers pr) in
let task = Session_itp.get_raw_task session pn in
let task = Session_itp.get_task session pn in
let session_dir = Session_itp.get_dir session in
let th = get_encapsulating_theory session (APn pn) in
let th_name = (Session_itp.theory_name th).Ident.id_string in
......@@ -603,7 +603,7 @@ let prepare_edition c ?file pn pr ~notification =
in
let ch = open_out file in
let fmt = formatter_of_out_channel ch in
let task = Session_itp.get_raw_task session pn in
let task = Session_itp.get_task session pn in
let driver = snd (Hprover.find c.controller_provers pr) in
Driver.print_task ~cntexample:false ?old driver fmt task;
Opt.iter close_in old;
......@@ -940,7 +940,7 @@ let replay_proof_attempt c pr limit (parid: proofNodeID) id ~callback ~notificat
| Some pr' ->
try
if pr' <> pr then callback id (UpgradeProver pr');
let _ = get_raw_task c.controller_session parid in
let _ = get_task c.controller_session parid in
schedule_proof_attempt c parid pr' ~counterexmp:false ~limit ~callback ~notification
with Not_found ->
callback id Detached
......@@ -1229,7 +1229,7 @@ later on. We do has if proof fails. *)
in
Debug.dprintf debug "Bisecting with %a started.@."
Whyconf.print_prover prover;
let t = get_raw_task ses goal_id in
let t = get_task ses goal_id in
match Eliminate_definition.bisect_step t with
| Eliminate_definition.BSdone _ -> assert false
| Eliminate_definition.BSstep(rem,kont) -> bisect_step rem kont
......
......@@ -106,7 +106,7 @@ type ide_request =
| Add_file_req of string
| Set_config_param of string * int
| Get_file_contents of string
| Get_task of node_ID * bool * bool * bool
| Get_task of node_ID * bool * bool
| Focus_req of node_ID
| Unfocus_req
| Remove_subtree of node_ID
......
......@@ -117,10 +117,9 @@ type ide_request =
| Add_file_req of string
| Set_config_param of string * int
| Get_file_contents of string
| Get_task of node_ID * bool * bool * bool
(** [Get_task(id,b,c,loc)] requests for the text of the task in node
[id]. When [b] is true then quantified variables and hypotheses
are introduced as local definitions. When [c] is true then the
| Get_task of node_ID * bool * bool
(** [Get_task(id,b,loc)] requests for the text of the task in node
[id]. When [b] is true then the
full context is show. When [loc] is false the locations are not
returned *)
| Focus_req of node_ID
......
......@@ -77,7 +77,7 @@ let unproven_goals_below_id cont id =
(****** Exception handling *********)
let p s id =
let _,tables = Session_itp.get_task s id in
let _,tables = Session_itp.get_task_name_table s id in
let pr = tables.Trans.printer in
let apr = tables.Trans.aprinter in
(Pretty.create pr apr pr pr false)
......@@ -270,7 +270,7 @@ let print_request fmt r =
| Set_config_param(s,i) -> fprintf fmt "set config param %s %i" s i
| Get_file_contents _f -> fprintf fmt "get file contents"
| Get_first_unproven_node _nid -> fprintf fmt "get first unproven node"
| Get_task(nid,b,c,loc) -> fprintf fmt "get task(%d,%b,%b,%b)" nid b c loc
| Get_task(nid,b,loc) -> fprintf fmt "get task(%d,%b,%b)" nid b loc
| Focus_req _nid -> fprintf fmt "focus"
| Unfocus_req -> fprintf fmt "unfocus"
| Remove_subtree _nid -> fprintf fmt "remove subtree"
......@@ -772,7 +772,7 @@ end
| Some label_detection ->
(match node with
| APn pr_node ->
let task = Session_itp.get_raw_task session pr_node in
let task = Session_itp.get_task session pr_node in
let b = label_detection task in
if b then
add_focused_node node
......@@ -880,12 +880,8 @@ end
reset_and_send_the_whole_tree ()
(* -- send the task -- *)
let task_of_id d id do_intros show_full_context loc =
let task,tables = get_task d.cont.controller_session id in
let task =
if do_intros then task else
get_raw_task d.cont.controller_session id
in
let task_of_id d id show_full_context loc =
let task,tables = get_task_name_table d.cont.controller_session id in
(* This function also send source locations associated to the task *)
let loc_color_list = if loc then get_locations task else [] in
let task_text =
......@@ -896,11 +892,11 @@ end
in
task_text, loc_color_list
let send_task nid do_intros show_full_context loc =
let send_task nid show_full_context loc =
let d = get_server_data () in
match any_from_node_ID nid with
| APn id ->
let s, list_loc = task_of_id d id do_intros show_full_context loc in
let s, list_loc = task_of_id d id show_full_context loc in
P.notify (Task (nid, s, list_loc))
| ATh t ->
P.notify (Task (nid, "Theory " ^ (theory_name t).Ident.id_string, []))
......@@ -908,7 +904,7 @@ end
let pa = get_proof_attempt_node d.cont.controller_session pid in
let parid = pa.parent in
let name = Pp.string_of Whyconf.print_prover pa.prover in
let s, list_loc = task_of_id d parid do_intros show_full_context loc in
let s, list_loc = task_of_id d parid show_full_context loc in
let prover_text = s ^ "\n====================> Prover: " ^ name ^ "\n" in
(* Display the result of the prover *)
let prover_ce =
......@@ -935,7 +931,7 @@ end
let name = get_transf_name d.cont.controller_session tid in
let args = get_transf_args d.cont.controller_session tid in
let parid = get_trans_parent d.cont.controller_session tid in
let s, list_loc = task_of_id d parid do_intros show_full_context loc in
let s, list_loc = task_of_id d parid show_full_context loc in
P.notify (Task (nid, s ^ "\n====================> Transformation: " ^
String.concat " " (name :: args) ^ "\n", list_loc))
......@@ -1321,7 +1317,7 @@ end
Hint.mem model_any nid
| Copy_paste (from_id, to_id) ->
Hint.mem model_any from_id && Hint.mem model_any to_id
| Get_task(nid,_,_,_) ->
| Get_task(nid,_,_) ->
Hint.mem model_any nid
| Command_req (nid, _) ->
if not (Itp_communication.is_root nid) then
......@@ -1391,7 +1387,7 @@ end
read_and_send f
| Save_file_req (name, text) ->
save_file name text;
| Get_task(nid,b,c,loc) -> send_task nid b c loc
| Get_task(nid,b,loc) -> send_task nid b loc
| Interrupt_req -> C.interrupt ()
| Command_req (nid, cmd) ->
begin
......
......@@ -176,9 +176,9 @@ let print_request_to_json (r: ide_request): Json_base.json =
| Set_config_param(s,n) ->
convert_record ["ide_request", cc r;
"param", String s; "value", Int n]
| Get_task(n,b,c,loc) ->
| Get_task(n,b,loc) ->
convert_record ["ide_request", cc r;
"node_ID", Int n; "do_intros", Bool b; "full_context", Bool c ; "loc", Bool loc]
"node_ID", Int n; "full_context", Bool b ; "loc", Bool loc]
| Get_file_contents s ->
convert_record ["ide_request", cc r;
"file", String s]
......@@ -432,10 +432,9 @@ let parse_request (constr: string) j =
| "Get_task" ->
let n = get_int (get_field j "node_ID") in
let b = get_bool_opt (get_field j "do_intros") false in
let c = get_bool_opt (get_field j "full_context") false in
let b = get_bool_opt (get_field j "full_context") false in
let loc = get_bool_opt (get_field j "loc") false in
Get_task(n,b,c,loc)
Get_task(n,b,loc)
| "Remove_subtree" ->
let n = get_int (get_field j "node_ID") in
......
......@@ -372,7 +372,7 @@ type command =
| Other of string * string list
let query_on_task cont f id args =
let _,table = Session_itp.get_task cont.Controller_itp.controller_session id in
let _,table = Session_itp.get_task_name_table cont.Controller_itp.controller_session id in
try Query (f cont table args) with
| Undefined_id s -> QError ("No existing id corresponding to " ^ s)
| Number_of_arguments -> QError "Bad number of arguments"
......
......@@ -122,7 +122,7 @@ type session = {
session_prover_ids : int Hprover.t;
(* tasks *)
session_raw_tasks : Task.task Hpn.t;
session_tasks : (Task.task * Trans.naming_table) Hpn.t;
session_task_tables : Trans.naming_table Hpn.t;
(* proved status *)
file_state: bool Hstr.t;
th_state: bool Ident.Hid.t;
......@@ -223,18 +223,19 @@ let get_proofNode (s : session) (id : proofNodeID) =
Hint.find s.proofNode_table id
with Not_found -> raise BadID
let get_raw_task s id =
let get_task s id =
Hpn.find s.session_raw_tasks id
let get_task s n =
try
Hpn.find s.session_tasks n
let get_task_name_table s n =
let t = get_task s n in
let table = try
Hpn.find s.session_task_tables n
with Not_found ->
let t = get_raw_task s n in
let ti = Trans.apply Introduction.introduce_premises t in
let ta = Args_wrapper.build_naming_tables ti in
Hpn.add s.session_tasks n (ti,ta);
ti,ta
let ta = Args_wrapper.build_naming_tables t in
Hpn.add s.session_task_tables n ta;
ta