Replies: 2 comments
-
Approach 2 looks good to me. |
Beta Was this translation helpful? Give feedback.
0 replies
-
#1284 switched the log output to stderr. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In relation to #655 and #664, I see a fundamental problem with the mixed usage of
stdout
andstderr
in ESBMC at the moment.We currently have 2 conflicting conventions:
stdout
used for non-error messages in ESBMC,stderr
for error messages. Thus no single file ESBMC output to at the moment constitutes a "log" of all actions and situations encountered. Error messages usually precede ESBMC aborting with an error exit code due to either an internal bug or wrong usage.stderr
- the same convention used by many compilers and other software (e.g. FFmpeg) potentially creating machine-readable¹ output:stderr
for text to be interpreted by humans, leavingstdout
to be piped to other programs or redirected.The convention in 2. is widely adopted. Question here is, does it also apply to ESBMC? I would argue that since ESBMC can be instructed to create machine-readable output (SMT formulas, SMT models, potentially a machine-readable counter-example in the future), it should be possible for such output to go to
stdout
in conformance with 2. That in turn would imply that all of the current messages should go tostderr
instead. That would at least solve the externally visible discrepancy between the files mentioned in 1. and also make Clang's diagnostics/parse tree part of the human-readable "log" output of ESBMC.I realize that this technically does not "solve" #664, but adopting convention 2. would solve the mixed output file usage and for now also make Clang's diagnostics externally indistinguishable from ESBMC's - which is a good thing™. What do you think?
¹ "machine-readable" used in this post in the sense that a common agreed-upon and documented format for it exists
Beta Was this translation helpful? Give feedback.
All reactions