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

Use Lumberjack for crux output of messages, exceptions, CruxSimulation, and ProvedGoals. #755

Merged
merged 19 commits into from
Jun 11, 2021

Conversation

kquick
Copy link
Member

@kquick kquick commented Jun 4, 2021

This also standardizes the output for various front-ends, ergo the changes in the golden test results, which are all just wording and formatting changes, nothing substantive.

The general approach here is to move the formatting of output into the LogAction provided by lumberjack. In the core code, anything which should be output or logged is done via a call with the original, structured object. The LogActions are usually created at initialization time and different LogActions can be used for different configurations (e.g. if Crux is outputting to something like an IDE, it could use a LogAction that emits JSON-formatted messages instead of the colorized, human readable messages that the default loggers emit). By passing the structure object to the output routine, more decisions can be made on how to handle the output.

crux-llvm/crux-llvm.cabal Show resolved Hide resolved
crucible-concurrency/src/Cruces/ExploreCrux.hs Outdated Show resolved Hide resolved
crux-mir/test/Test.hs Outdated Show resolved Hide resolved
crux/src/Crux.hs Show resolved Hide resolved
Copy link
Contributor

@RyanGlScott RyanGlScott left a comment

Choose a reason for hiding this comment

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

Assuming CI passes, LGTM.

Copy link
Contributor

@atomb atomb left a comment

Choose a reason for hiding this comment

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

This is excellent. I love having more consistent output from all of the Crux instantiations. I don't see any changes to the crux-mir test output files, though. Do they still go through?

@kquick
Copy link
Member Author

kquick commented Jun 7, 2021

This is excellent. I love having more consistent output from all of the Crux instantiations. I don't see any changes to the crux-mir test output files, though. Do they still go through?

Thanks!

Not all of crux-mir is passing yet; I don't have the right configuration to run them locally, so I'm patching them up based on CI results and will get them green before I merge.

crux/src/Crux.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@robdockins robdockins left a comment

Choose a reason for hiding this comment

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

Seems like a good improvement to me!

@spernsteiner
Copy link
Contributor

I looked at the crux-mir .good files and they all look good to me. The "test foo::bar: FAILED" lines are all unchanged, so it still matches the cargo test output.

Is it intentional that crux-mir now prints every counterexample twice (once under foo::bar counterexamples and again under final results)? If so, that's fine, I just wanted to check in case it's a bug.

@kquick kquick force-pushed the crux_lumberjack branch 3 times, most recently from 0c77b2b to b6d3fa1 Compare June 11, 2021 15:01
@kquick kquick merged commit 31758d0 into master Jun 11, 2021
@kquick kquick deleted the crux_lumberjack branch June 11, 2021 20:11
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.

None yet

5 participants