Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling of deadlock checking #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/tlacli/tools/tlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def setup(parser: _SubParsersAction) -> None:

# TODO parser.add_argument("--cfg-del", action="store_true", help="If added, deletes cfg file after model checking is complete")
# TODO for tlc arguments, use store_true and store_false. Might also want to move the parser config into a separate file because there are a lot
tlc_args.add_argument("--no-check-deadlocks", action="store_true", help="If added, disables deadlock checking for tlc")

# Maybe the default should be half the threads?
tlc_args.add_argument("--tlc-workers", default=cpu_count(), help="The number of worker threads to use (default is number of cpus)")
Expand Down Expand Up @@ -167,7 +168,8 @@ def run(args: Namespace):
metadir= f"-metadir {state_dir}" # Removes the extraneous state folder
config= f"-config {cfg_file}"
workers = f"-workers {args.tlc_workers}"
script = f"java -jar {jar_path} {workers} {config} {metadir} -terse -cleanup {spec_path}"
additional_args = "-deadlock" if args.no_check_deadlocks else ""
script = f"java -jar {jar_path} {workers} {config} {metadir} -terse -cleanup {additional_args} {spec_path}"

if args.show_script:
print(script)
Expand Down