|
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) |
| 16 | +parser.add_argument('--hard_timeout_in_seconds', help='Proof checking will fail after this amount of time', required=False, default="600") |
17 | 17 | parser.add_argument('--skip', nargs='+', help='Space-separated list of .tla modules to skip checking', required=False, default=[]) |
18 | 18 | parser.add_argument('--only', nargs='+', help='If provided, only check proofs in this space-separated list', required=False, default=[]) |
19 | 19 | parser.add_argument('--verbose', help='Set logging output level to debug', action='store_true') |
|
24 | 24 | manifest = tla_utils.load_all_manifests(examples_root) |
25 | 25 | skip_modules = args.skip |
26 | 26 | only_modules = args.only |
27 | | -hard_timeout_in_seconds = args.runtime_seconds_limit * 2 |
| 27 | +hard_timeout_in_seconds = int(args.hard_timeout_in_seconds) |
28 | 28 |
|
29 | 29 | logging.basicConfig(level = logging.DEBUG if args.verbose else logging.INFO) |
30 | 30 |
|
|
34 | 34 | for manifest_dir, spec in manifest |
35 | 35 | for module in spec['modules'] |
36 | 36 | if 'proof' in module |
37 | | - and (runtime := tla_utils.parse_timespan(module['proof']['runtime'])) <= timedelta(seconds = args.runtime_seconds_limit) |
38 | 37 | and module['path'] not in skip_modules |
39 | 38 | and (only_modules == [] or module['path'] in only_modules) |
40 | 39 | ], |
|
0 commit comments