21 |
21 |
22 val settings = [("solver", "\"DefaultSAT4J\"")] |
22 val settings = [("solver", "\"DefaultSAT4J\"")] |
23 |
23 |
24 fun cast_to_rep R u = Op1 (Cast, type_of u, R, u) |
24 fun cast_to_rep R u = Op1 (Cast, type_of u, R, u) |
25 |
25 |
26 val dummy_T = @{typ 'a} |
26 val dummy_T = \<^typ>\<open>'a\<close> |
27 |
27 |
28 val atom1_v1 = FreeName ("atom1_v1", dummy_T, Atom (1, 0)) |
28 val atom1_v1 = FreeName ("atom1_v1", dummy_T, Atom (1, 0)) |
29 val atom2_v1 = FreeName ("atom2_v1", dummy_T, Atom (2, 0)) |
29 val atom2_v1 = FreeName ("atom2_v1", dummy_T, Atom (2, 0)) |
30 val atom6_v1 = FreeName ("atom6_v1", dummy_T, Atom (6, 0)) |
30 val atom6_v1 = FreeName ("atom6_v1", dummy_T, Atom (6, 0)) |
31 val atom16_v1 = FreeName ("atom16_v1", dummy_T, Atom (16, 0)) |
31 val atom16_v1 = FreeName ("atom16_v1", dummy_T, Atom (16, 0)) |
208 formula = formula} |
208 formula = formula} |
209 end |
209 end |
210 |
210 |
211 fun run_all_tests () = |
211 fun run_all_tests () = |
212 let |
212 let |
213 val {debug, overlord, timeout, ...} = Nitpick_Commands.default_params @{theory} [] |
213 val {debug, overlord, timeout, ...} = Nitpick_Commands.default_params \<^theory> [] |
214 val max_threads = 1 |
214 val max_threads = 1 |
215 val max_solutions = 1 |
215 val max_solutions = 1 |
216 in |
216 in |
217 case Kodkod.solve_any_problem debug overlord timeout max_threads max_solutions |
217 case Kodkod.solve_any_problem debug overlord timeout max_threads max_solutions |
218 (map (problem_for_nut @{context}) tests) of |
218 (map (problem_for_nut \<^context>) tests) of |
219 Kodkod.Normal ([], _, _) => () |
219 Kodkod.Normal ([], _, _) => () |
220 | _ => error "Tests failed" |
220 | _ => error "Tests failed" |
221 end |
221 end |
222 |
222 |
223 end; |
223 end; |