Skip to content

Conversation

@eduardoloz
Copy link

Resolved comments from previous PR (such as putting debugging code under verbose flag and getting rid of debgugging comments).

followed everything from previous PR comments except for the stdout, stderr = process.communicate() line (I need this to receive the winning strategy). Also general note about this python version. It seems to be slower for programs that check smaller amounts of states but faster in ones like two_phase_commit_7 (on my machine because the original is TO). Hope you also see this pattern!

Copy link

@iandardik iandardik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is much cleaner! I was not able to get the code working on my my machine though. For example, I saw the following error:

Benchmark 3: ex-quorum-leader-election-6
Creating an empty no_invs.cfg file in the destination directory.
Parallel command found an error

Log file .log does not exist in .
Run time: 0.54s

I suspect this is due to the hardcoded path that you have that refers to the file structure on your own machine (see my comment below).

recomp-verify.py Outdated
Comment on lines 177 to 187
script_content = f"""#!/usr/bin/env bash
echo "Running {script_name}"
echo "Spec file is: {spec}"
echo "CFG file is: {cfg}"
echo "Original directory is: {orig_dir}"
# Navigate to the target directory
cd "./{subdir}" || {{
echo "Failed to cd into the target directory." >&2
exit 1
}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please hide the creation of the script behind a function. for example:

create_script(script_name, spec, cfg, ...):
return f"""#!/usr/bin/env bash
...

recomp-verify.py Outdated
}}
# Run the verification script with the {flag} option
python3 "/Users/eddie/Research/REU/recomp-verify/recomp-verify.py" \\

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix this hard-coded path

verify_multi_process(spec, cfg, verbose)
else:
verify_single_process(spec, cfg, cust, naive, verbose)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this whitespace back in for readability :)

recomp-verify.py Outdated
Comment on lines 22 to 23
# print(f"Decomp command exited with return code: {ret.returncode}")
# print(f"Decomp output: {ret.stdout}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clean up this commented-out code

Copy link

@iandardik iandardik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During my testing, I found two things:

  1. The output still does not match the original output. Please get rid of all the debugging prints when you check in your code next time (or hide them behind a --verbose flag as we talked about).
  2. There are cases where your new script is significantly slower than the original script. For example, ex-quorum-leader-election-6 should take 5 seconds (see Fig 6 in the paper) but your version is taking 25-35 seconds. I looked into this a bit and I think the reason why is that your tool does not use TLC for the monolithic strategy in parallel mode. I left a comment around where you should make the fix.

}}
# Run the verification script with the {flag} option
python3 "{os.path.join(root_dir, 'recomp-verify.py')}" \\

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the script type is "mono" this should be a call to TLC, not the python script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants