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

See all traces #113

Open
ridhij93 opened this issue Jun 7, 2021 · 3 comments
Open

See all traces #113

ridhij93 opened this issue Jun 7, 2021 · 3 comments

Comments

@ridhij93
Copy link

ridhij93 commented Jun 7, 2021

Is there a way I can see all explored traces?

@kostis
Copy link
Contributor

kostis commented Jun 7, 2021

Is there a way I can see all explored traces?

Why would you want to do that? In real programs, the number of traces is large and you will be swamped by that information.

In small examples, used for understanding the algorithm the tool uses, you can force a failure/crash at the end of the program which will cause it to print the trace till the crash, and also use the option -keep-going (-k) to continue exploring traces even after a failure.

An alternative is of course to locate the code that prints the trace after a failure and use it appropriately to do what you are looking for.

@ridhij93
Copy link
Author

ridhij93 commented Jun 7, 2021

Thank you.
I want to check the interleavings of a small program.

@margnus1
Copy link
Contributor

margnus1 commented Jun 7, 2021

I was actually working on such a feature a few years ago, however I never made it feature-complete, and it only supported SC, TSO, and PSO. Still, you can check the code out in PR #24. Since it's based on such an old version of Nidhugg, it will most likely not work with any LLVMs from after 2017, and is going to be missing any improvements to Nidhugg from after then. Feel free to check it out, and let me know if it was useful. Then I'll be even more motivated to finish it up and merge it to mainline.
You can do this in git with

git fetch git://github.com/margnus1/nidhugg.git trace-dump
git checkout -b trace-dump FETCH_HEAD

Of course, as Kostis said, it's not going to be useful on programs with large amounts of traces.

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

Successfully merging a pull request may close this issue.

3 participants