|
13 | 13 | parser = ArgumentParser(description='Validate all proofs in all modules with TLAPM.') |
14 | 14 | parser.add_argument('--tlapm_path', help='Path to TLAPM install dir; should have bin and lib subdirs', required=False, default = 'deps/tlapm') |
15 | 15 | parser.add_argument('--examples_root', help='Root directory of the tlaplus/examples repository', required=False, default='.') |
16 | | -parser.add_argument('--runtime_seconds_limit', help='Only run proofs with expected runtime less than this value', required=False, default=60) |
17 | 16 | parser.add_argument('--skip', nargs='+', help='Space-separated list of .tla modules to skip checking', required=False, default=[]) |
18 | 17 | parser.add_argument('--only', nargs='+', help='If provided, only check proofs in this space-separated list', required=False, default=[]) |
19 | 18 | parser.add_argument('--verbose', help='Set logging output level to debug', action='store_true') |
|
24 | 23 | manifest = tla_utils.load_all_manifests(examples_root) |
25 | 24 | skip_modules = args.skip |
26 | 25 | only_modules = args.only |
27 | | -hard_timeout_in_seconds = args.runtime_seconds_limit * 2 |
28 | 26 |
|
29 | 27 | logging.basicConfig(level = logging.DEBUG if args.verbose else logging.INFO) |
30 | 28 |
|
31 | 29 | proof_module_paths = sorted( |
32 | 30 | [ |
33 | | - (manifest_dir, spec, module, runtime) |
| 31 | + (manifest_dir, spec, module, tla_utils.parse_timespan(module['proof']['runtime'])) |
34 | 32 | for manifest_dir, spec in manifest |
35 | 33 | for module in spec['modules'] |
36 | 34 | if 'proof' in module |
37 | | - and (runtime := tla_utils.parse_timespan(module['proof']['runtime'])) <= timedelta(seconds = args.runtime_seconds_limit) |
38 | 35 | and module['path'] not in skip_modules |
39 | 36 | and (only_modules == [] or module['path'] in only_modules) |
40 | 37 | ], |
|
61 | 58 | ], |
62 | 59 | stdout = subprocess.PIPE, |
63 | 60 | stderr = subprocess.STDOUT, |
64 | | - text = True, |
65 | | - timeout = hard_timeout_in_seconds |
| 61 | + text = True |
66 | 62 | ) |
67 | 63 | end_time = timer() |
68 | 64 | actual_runtime = timedelta(seconds = end_time - start_time) |
|
0 commit comments