-
Notifications
You must be signed in to change notification settings - Fork 274
Tools overview #5792
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
Tools overview #5792
Conversation
TGWDB
commented
Jan 29, 2021
- [V ] Each commit message has a non-empty body, explaining why the change was made.
- Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
- The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
- Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
- My commit message includes data points confirming performance improvements (if claimed).
- My PR is restricted to a single feature or bugfix.
- White-space or formatting changes outside the feature-related changed lines are in commits of their own.
Codecov Report
@@ Coverage Diff @@
## develop #5792 +/- ##
========================================
Coverage 69.54% 69.54%
========================================
Files 1243 1243
Lines 100701 100701
========================================
Hits 70037 70037
Misses 30664 30664
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically yes but there are a few more bits and links that might be useful.
- [others (converter, driver, file_converter, java-converter)](#others) | ||
|
||
The rest of this document provides a section on each of these tools in alphabetical order. | ||
Most links in this document are to the [CProver online documentation](http://cprover.diffblue.com/index.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not quite sure how linking is done in the rest of the documentation but if there is an option to have these as local / relative links that would be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should definitely use relative links.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no consistent way of linking.
I was working on another (draft, so very provisional) pull request (see #5781) and it was recommended to use links to the online documentation at diffblue.com.
Exact quote is:
README.md references http://cprover.diffblue.com/, so I'd go with that in top-level files (README.md, COMPILING.md, CODING_STANDARD.md, and possibly any files to be added at that level).
So should I document with:
A. Links to the local documentation path (e.g. doc/html/index.html)
B. Links to the absolute location (e.g. http://cprover.diffblue.com/index.html)
C. Something else? (E.g. relative html links, although these will not work when .md files are used like this one?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the confusion is that the top-level .md files are currently not compiled into cprover.diffblue.com, but only those in doc
and the README.md
files in the source directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My rationale was that this is a top level .md file (similar to README.md) and so we should link to the diffblue.com URLs. Since this is not going to be compiled into the website, then I understand the current linking is correct?
The above said, if we wish to move this document to another location (or have another reason to change), let me know and I can redo the links as relative.
TOOLS_OVERVIEW.md
Outdated
|
||
## goto-analyzer | ||
|
||
This provides a way to access and invoke various forms of analysis on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit more detailed and restricted than that. goto-analyzer
is a wrapper around the abstract interpretation ( http://cprover.diffblue.com/background-concepts.html#abstract_interpretation_section ) implementation ( well, implementations, see http://cprover.diffblue.com/group__analyses.html ) in CPROVER. It allows you to configure what abstractions are used and what is then done with them (verification, display, simplification, etc.). At the moment the best documentation is here : http://cprover.diffblue.com/goto__analyzer__parse__options_8h.html but I have writing a section for the manual on my TODO list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorporated these comments into an updated version (some text taken almost directly).
Let me know if you want to coordinate on writing the section for the manual (I'd love to learn more about this, and help write the section if I can).
TOOLS_OVERVIEW.md
Outdated
## goto-cc | ||
|
||
This is a compiler that also adds goto program information to the compiled | ||
programs. Note that `goto-cc` is the compiler and linker while `goto-gcc` and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
goto-cc
is intended as a drop-in replacement for gcc
so that you can re-use the same build infrastructure. The key difference is that it builds goto-modelt
s instead of executables ( somewhere @tautschnig had a patch to build both but it is not the default ). Really important is that depending on the same of the binary, you get emulation of different compilers, such as the Visual Studio one and the CodeWarrior one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a rewrite that I hope reflects this.
Provides a variety of difference checks between two goto programs (produced | ||
by `goto-cc`). This invokes some of the cbmc tools to convert the goto | ||
program and then determine which functions are added/removed/changed. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essentially a diff
tool for goto-programs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the text for this (and also jdiff).
TOOLS_OVERVIEW.md
Outdated
## janalyzer | ||
|
||
This provides a way to access and invoke various forms of analysis on | ||
Java programs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes; janalyzer
is a fork of goto-analyzer
with the JVM front-end added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the text for this.
TOOLS_OVERVIEW.md
Outdated
|
||
This is the main analysis engine the performs the analysis | ||
of Java files using bounded model checking. This is a | ||
Java version of the `cbmc` tool (more documentation for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pedantry perhaps but to me a "java version" implies it is written in Java. The point is that jbmc
is an old fork of cbmc
with the JVM front-end added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a BMC tool for Java bytecode (similar to cbmc being a BMC tool for C).
It has been separated from CBMC in order to support separate compilation of C and Java frontends and tools. Also, JBMC's command line follows conventions of java
so that programs can be analysed in the same way you would run them using the java
executable. There also lots of additional options to support nondeterministic initialisation of variable size arrays, data structures and strings, control how to assert on exceptions etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated text for this (and added some clear phrases from Peter).
Provides a variety of difference checks between two goto programs (produced | ||
by `goto-cc`). This invokes some of the `cbmc` tools to convert the goto | ||
program and then determine which functions are added/removed/changed. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise, I believe (@peterschrammel ?) that jdiff
is goto-diff
forked and the JVM front-end added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, just a clone of goto-diff for use on Java bytecode input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated text (and also on goto-diff)
TOOLS_OVERVIEW.md
Outdated
## memory-analyzer | ||
|
||
This is a wrapper program that provides a front end to `gdb` that adds some | ||
useful features related to the other goto utilities. Note that to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit more than that. memory-analyzer
allows you to run an compiled binary, using gdb
and when you are at the right point, it will build a harness that allows you to analyze the program /from that state/.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added text on this, hope it is clear(er) now.
TOOLS_OVERVIEW.md
Outdated
|
||
This is an (Satisfiability Modulo Theory) SMT solver that is shipped | ||
with CProver. The SMT solver here is built on top of a Satisfiability | ||
(SAT) solver. The `smt2_solver` is designer to work with files, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is basically an SMT interface to the CPROVER back-end prover.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martin-cs Can you please clarify whether you are proposing a change to the text (and if so perhaps propose some new text), or whether you were making a comment to help us understand?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think more of the later but let's try the former too...
smt2_solver
is an SMT (Satisfiability Modulo Theory) solver. It parses SMT-LIB 2 format and uses CPROVER's internal bit-blasting solver (see solvers/
) to resolve queries.
- [others (converter, driver, file_converter, java-converter)](#others) | ||
|
||
The rest of this document provides a section on each of these tools in alphabetical order. | ||
Most links in this document are to the [CProver online documentation](http://cprover.diffblue.com/index.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should definitely use relative links.
TOOLS_OVERVIEW.md
Outdated
|
||
This is the main analysis engine the performs the analysis | ||
of Java files using bounded model checking. This is a | ||
Java version of the `cbmc` tool (more documentation for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a BMC tool for Java bytecode (similar to cbmc being a BMC tool for C).
It has been separated from CBMC in order to support separate compilation of C and Java frontends and tools. Also, JBMC's command line follows conventions of java
so that programs can be analysed in the same way you would run them using the java
executable. There also lots of additional options to support nondeterministic initialisation of variable size arrays, data structures and strings, control how to assert on exceptions etc.
Provides a variety of difference checks between two goto programs (produced | ||
by `goto-cc`). This invokes some of the `cbmc` tools to convert the goto | ||
program and then determine which functions are added/removed/changed. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, just a clone of goto-diff for use on Java bytecode input.
Provides a variety of difference checks between two goto programs (produced | ||
by `goto-cc`). This invokes some of the cbmc tools to convert the goto | ||
program and then determine which functions are added/removed/changed. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essentially a diff
tool for goto-programs.
TOOLS_OVERVIEW.md
Outdated
janalyzer --help | ||
``` | ||
|
||
## java-unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really an executable for users, but developers.
|
||
## symtab2gb | ||
|
||
This utility is to compile a cbmc symbols table (in JSON format) into a goto binary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used to integrate external language frontends, e.g. https://github.com/diffblue/gnat2goto/
TOOLS_OVERVIEW.md
Outdated
``` | ||
|
||
|
||
## unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things below are for developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added developer utilities section and listed the developer tools there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding all this documentation! One overall comment: would be be worth merging the sections janalyzer/goto-analyzer, jdiff/goto-diff, jbmc/cbmc, java-unit/unit?
- [Developer Utilities](#developer-utilities) | ||
- [java-unit](#java-unit) | ||
- [unit](#unit) | ||
- [others (converter, driver, file_converter, java-converter)](#others) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, and makes me wonder whether this should be linked (or included in?) the top-level README file so that people accessing the repository see it right away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added link in README.md
TOOLS_OVERVIEW.md
Outdated
in addition to the normal compiled program). Note that `goto-cc` is the | ||
compiler and linker while `goto-gcc` and `goto-ld` are symbolic links to | ||
`goto-cc`. The additional object code is used as the internal representation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure the fact that these are symlinks matters the most to a user. Perhaps focus on the resulting behaviour? goto-cc
behaves differently, depending on the file name: the command-line options (and ensuing behaviour) are modelled after the program that has the same name as the suffix, i.e., gcc
, ld
, etc. (we also support cl
, link
, bcc
, as
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been updated now to clarify the role of the different files and de-emphasise the symlinks.
Note that `goto-cc` can emulate GCC, Visual Studio, and CodeWarrior | ||
compilers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, see my notes about for symlinks.
This invokes some of the cbmc tools to convert the goto | ||
program and then determine which functions are added/removed/changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that any other tools are being invoked?
TOOLS_OVERVIEW.md
Outdated
## goto-harness | ||
|
||
This is a tool for creating a harness around a (part of a) goto program that | ||
can then be analysed inside the harness. Harnesses can be either function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "inside the harness" mean?
TOOLS_OVERVIEW.md
Outdated
### others | ||
|
||
These (`converter`, `driver`, `file_converter`, `java-converter`) | ||
are build time utilities for other tools and not designed | ||
to be run independently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure these should even be mentioned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rationale was to have list of all binaries (built on Linux, so some on other platforms may be missing). Open to removing the section though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood, but I fear this might cause more confusion than doing good. Not a blocker from my point of view, leaving it to you to decide.
This adds the TOOLS_OVERVIEW.md file (and links to it from README.md). The Tools Overview is an overview of all the tools that are part of the CProver package. Each overview includes main points on how to use the tool and what the tool is meant to do. Also further documentation links are provided to better understand the tool.