src/HOLCF/IOA/Modelcheck/MuIOAOracle.ML
author haftmann
Thu, 30 Jun 2005 08:57:53 +0200
changeset 16619 94e3d94b426d
parent 16152 7294283b0c45
child 17241 62bb8dcc316e
permissions -rw-r--r--
minor corrections
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16152
7294283b0c45 no_tac;
wenzelm
parents: 15570
diff changeset
     1
7294283b0c45 no_tac;
wenzelm
parents: 15570
diff changeset
     2
(* $Id$ *)
6471
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
     3
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
     4
(* call_sim_tac invokes oracle "Sim" *)
7299
743b22579a2f quite a lot of tuning and cleanup;
wenzelm
parents: 6471
diff changeset
     5
fun call_sim_tac thm_list i state = 
6471
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
     6
let val sign = #sign (rep_thm state);
15570
8d8c70b41bab Move towards standard functions.
skalberg
parents: 7299
diff changeset
     7
        val (subgoal::_) = Library.drop(i-1,prems_of state);
7299
743b22579a2f quite a lot of tuning and cleanup;
wenzelm
parents: 6471
diff changeset
     8
        val OraAss = invoke_oracle MuIOAOracle.thy "Sim" (sign,SimOracleExn (subgoal,thm_list));
6471
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
     9
in
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    10
(cut_facts_tac [OraAss] i) state
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    11
end;
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    12
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    13
(* is_sim_tac makes additionally to call_sim_tac some simplifications,
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    14
	which are suitable for implementation realtion formulas *)
7299
743b22579a2f quite a lot of tuning and cleanup;
wenzelm
parents: 6471
diff changeset
    15
fun is_sim_tac thm_list i state =
6471
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    16
let val sign = #sign (rep_thm state);
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    17
in
15570
8d8c70b41bab Move towards standard functions.
skalberg
parents: 7299
diff changeset
    18
case Library.drop(i-1,prems_of state) of
16152
7294283b0c45 no_tac;
wenzelm
parents: 15570
diff changeset
    19
        [] => no_tac state |
6471
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    20
        subgoal::_ => EVERY[REPEAT(etac thin_rl i),
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    21
                        simp_tac (simpset() addsimps [ioa_implements_def]) i,
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    22
                        rtac conjI i,
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    23
                        rtac conjI (i+1),
7299
743b22579a2f quite a lot of tuning and cleanup;
wenzelm
parents: 6471
diff changeset
    24
			TRY(call_sim_tac thm_list (i+2)),
6471
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    25
			TRY(atac (i+2)), 
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    26
                        REPEAT(rtac refl (i+2)),
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    27
	 		simp_tac (simpset() addsimps (thm_list @
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    28
				comp_simps @ restrict_simps @ hide_simps @
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    29
				rename_simps @  ioa_simps @ asig_simps)) (i+1),
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    30
		 	simp_tac (simpset() addsimps (thm_list @
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    31
				comp_simps @ restrict_simps @ hide_simps @
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    32
				rename_simps @ ioa_simps @ asig_simps)) (i)] state
08d12ef5fc19 added translation from IOA to mucalculus and corresponding modelchecker examples;
mueller
parents:
diff changeset
    33
end;