equal
deleted
inserted
replaced
1 (* Author: Lukas Bulwahn, TU Muenchen *) |
1 (* Author: Lukas Bulwahn, TU Muenchen *) |
2 |
2 |
3 header {* A simple counterexample generator performing exhaustive testing *} |
3 header {* A simple counterexample generator performing exhaustive testing *} |
4 |
4 |
5 theory Quickcheck_Exhautive |
5 theory Quickcheck_Exhaustive |
6 imports Quickcheck |
6 imports Quickcheck |
7 uses ("Tools/exhaustive_generators.ML") |
7 uses ("Tools/exhaustive_generators.ML") |
8 begin |
8 begin |
9 |
9 |
10 subsection {* basic operations for exhaustive generators *} |
10 subsection {* basic operations for exhaustive generators *} |
366 [code del]: "catch_match t1 t2 = (SOME t. t = t1 \<or> t = t2)" |
366 [code del]: "catch_match t1 t2 = (SOME t. t = t1 \<or> t = t2)" |
367 |
367 |
368 code_const catch_match |
368 code_const catch_match |
369 (SML "(_) handle Match => _") |
369 (SML "(_) handle Match => _") |
370 |
370 |
371 use "Tools/smallvalue_generators.ML" |
371 use "Tools/exhaustive_generators.ML" |
372 |
372 |
373 setup {* Smallvalue_Generators.setup *} |
373 setup {* Exhaustive_Generators.setup *} |
374 |
374 |
375 declare [[quickcheck_tester = exhaustive]] |
375 declare [[quickcheck_tester = exhaustive]] |
376 |
376 |
377 hide_fact orelse_def catch_match_def |
377 hide_fact orelse_def catch_match_def |
378 no_notation orelse (infixr "orelse" 55) |
378 no_notation orelse (infixr "orelse" 55) |