Skip to content

Commit e178b0d

Browse files
committed
Add janalyzer man page
This was built using help2man and then manually expanded based on goto-analyzer's man page.
1 parent 7bfbfce commit e178b0d

File tree

1 file changed

+350
-1
lines changed

1 file changed

+350
-1
lines changed

doc/man/janalyzer.1

-1
This file was deleted.

doc/man/janalyzer.1

+350
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,350 @@
1+
.TH JANALYZER "1" "June 2022" "janalyzer-5.59.0" "User Commands"
2+
.SH NAME
3+
janalyzer \- Data-flow analysis for Java bytecode
4+
.SH SYNOPSIS
5+
.TP
6+
.B janalyzer [\-?] [\-h] [\-\-help]
7+
show help
8+
.TP
9+
.B janalyzer \fImethod\-name\fR
10+
Use the fully qualified name of a method as entry point, e.g.,
11+
\fI'mypackage.Myclass.foo:(I)Z'\fR
12+
.TP
13+
.B janalyzer \fIclass\-name\fR
14+
The entry point is the method specified by
15+
\fB\-\-function\fR, or otherwise, the
16+
.B public static void main(String[])
17+
method of the given class \fIclass\-name\fR.
18+
.TP
19+
.B janalyzer \-jar \fIjarfile\fR
20+
JAR file to be checked.
21+
The entry point is the method specified by
22+
\fB\-\-function\fR or otherwise, the
23+
.B public static void main(String[])
24+
method
25+
of the class specified by \fB\-\-main\-class\fR or the main
26+
class specified in the JAR manifest
27+
(checked in this order).
28+
.TP
29+
.B janalyzer \-\-gb \fIgoto\-binary\fR
30+
GOTO binary file to be checked.
31+
The entry point is the method specified by
32+
\fB\-\-function\fR, or otherwise, the
33+
.B public static void main(String[])
34+
of the class specified by \fB\-\-main\-class\fR
35+
(checked in this order).
36+
.SH DESCRIPTION
37+
.SH OPTIONS
38+
.TP
39+
\fB\-classpath\fR dirs/jars, \fB\-cp\fR dirs/jars, \fB\-\-classpath\fR dirs/jars
40+
Set class search path of directories and jar files using a colon-separated list
41+
of directories and JAR archives to search for class files.
42+
.TP
43+
\fB\-\-main\-class\fR class\-name
44+
Set the name of the main class.
45+
.TP
46+
\fB\-\-function\fR name
47+
Set entry point function name.
48+
.SS "Task options:"
49+
.TP
50+
\fB\-\-show\fR
51+
Displays a domain for every instruction in the GOTO binary. The
52+
format and information will depend on the \fIdomain\fR that has
53+
been selected.
54+
.TP
55+
\fB\-\-verify\fR
56+
Every property in the program is checked to see whether it is true
57+
(it always holds), unreachable, false if it is reachable (due to the
58+
over-approximate analysis, it is not clear if locations are reachable
59+
or if it is an overapproximation, so this is the best that can be
60+
achieved) or unknown. If there are multiple points of execution that
61+
reach the same location, each will be checked and the answers
62+
combined, with unknown taking precedence.
63+
.TP
64+
\fB\-\-simplify\fR \fIfile_name\fR
65+
Writes a new version of the input program to \fIfile_name\fR in which the program has
66+
been simplified using information from the abstract interpreter. The
67+
exact simplification will depend on the domain that is used but
68+
typically this might be replacing any expression that has a constant
69+
value. If this makes instructions unreachable (for example if \fBGOTO\fR
70+
can be shown to never be taken) they will be removed. Removal can be
71+
deactivated by passing \fB\-\-no\-simplify\-slicing\fR. In the ideal world
72+
simplify would be idempotent (i.e. running it a second time would not
73+
simplify anything more than the first). However there are edge cases
74+
which are difficult or prohibitively expensive to handle in the
75+
domain which can result in a second (or more) runs giving
76+
simplification. Submitting bug reports for these is helpful but they
77+
may not be viable to fix.
78+
.TP
79+
\fB\-\-no\-simplify\-slicing\fR
80+
Do not remove instructions from which no
81+
property can be reached (use with \fB\-\-simplify\fR).
82+
.TP
83+
\fB\-\-unreachable\-instructions\fR
84+
Lists which instructions have a domain which is bottom
85+
(i.e. unreachable). If \fB\-\-function\fR has been used to set the program
86+
entry point then this can flag things like the \fImain\fR function as
87+
unreachable.
88+
.TP
89+
\fB\-\-unreachable\-functions\fR
90+
Similar to \fB\-\-unreachable\-instructions\fR, but reports which functions are
91+
definitely unreachable rather than just instructions.
92+
.TP
93+
\fB\-\-reachable\-functions\fR
94+
The negation of \fB\-\-unreachable\-functions\fR, reports which functions may be
95+
reachable. Note that because the analysis is over-approximate, it
96+
is possible this will mark functions as reachable when a more precise
97+
analysis (possibly using \fBjbmc\fR(1)) will show that there are no execution
98+
traces that reach them.
99+
.SS "Abstract interpreter options:"
100+
.TP
101+
\fB\-\-location\-sensitive\fR
102+
use location\-sensitive abstract interpreter
103+
.TP
104+
\fB\-\-concurrent\fR
105+
This extends abstract interpretation with very restricted and special purpose
106+
handling of threads. This needs the domain to have certain unusual
107+
properties for it to give a correct answer. At the time of writing
108+
only \fB\-\-dependence\-graph\fR is compatible with it.
109+
.SS "Domain options:"
110+
.TP
111+
\fB\-\-constants\fR
112+
The default option, this stores one constant value per variable. This means it
113+
is fast but will only find things that can be resolved by constant propagation.
114+
The domain has some handling of arrays but limited support for pointers which
115+
means that in can potentially give unsound behavior.
116+
.TP
117+
\fB\-\-intervals\fR
118+
A domain that stores an interval for each integer and float variable. At the
119+
time of writing not all operations are supported so the results can be quite
120+
over-approximate at points. It also has limitations in the handling of pointers
121+
so can give unsound results.
122+
.TP
123+
\fB\-\-non\-null\fR
124+
This domain is intended to find which pointers are not null. Its
125+
implementation is very limited and it is not recommended.
126+
.TP
127+
\fB\-\-dependence\-graph\fR
128+
Tracks data flow and information flow dependencies between
129+
instructions and produces a graph. This includes doing points-to
130+
analysis and tracking reaching definitions (i.e. use-def chains).
131+
This is one of the most extensive, correct and feature complete domains.
132+
.SS "Output options:"
133+
These options control how the result of the task is output. The
134+
default is text to the standard output. In the case of tasks that
135+
produce goto-programs (\fB\-\-simplify\fR for example), the output options
136+
only affect the logging and not the final form of the program.
137+
.TP
138+
\fB\-\-text\fR \fIfile_name\fR
139+
Output results in plain text to given file.
140+
.TP
141+
\fB\-\-json\fR \fIfile_name\fR
142+
Writes the output as a JSON object to \fIfile_name\fR.
143+
.TP
144+
\fB\-\-xml\fR \fIfile_name\fR
145+
Output results in XML format to \fIfile_name\R.
146+
.TP
147+
\fB\-\-dot\fR \fIfile_name\fR
148+
Writes the output in \fBdot\fR(1) format to \fIfile_name\fR. This is
149+
only supported by some domains and tasks (for example
150+
\fB\-\-show\fR \fB\-\-dependence-graph\fR).
151+
.SS "Specific analyses:"
152+
.TP
153+
\fB\-\-taint\fR file_name
154+
perform taint analysis using rules in given file
155+
.TP
156+
\fB\-\-show\-taint\fR
157+
print taint analysis results on stdout
158+
.TP
159+
\fB\-\-show\-local\-may\-alias\fR
160+
perform procedure\-local may alias analysis
161+
.SS "Java Bytecode frontend options:"
162+
.TP
163+
\fB\-\-disable\-uncaught\-exception\-check\fR
164+
ignore uncaught exceptions and errors
165+
.TP
166+
\fB\-\-throw\-assertion\-error\fR
167+
Throw java.lang.AssertionError on violated
168+
\fBassert\fR statements instead of failing
169+
at the location of the \fBassert\fR statement.
170+
.TP
171+
\fB\-\-throw\-runtime\-exceptions\fR
172+
Make implicit runtime exceptions explicit.
173+
.TP
174+
\fB\-\-assert\-no\-exceptions\-thrown\fR
175+
Transform \fBthrow\fR instructions into \fBassert FALSE\fR
176+
followed by \fBassume FALSE\fR.
177+
.TP
178+
\fB\-\-max\-nondet\-array\-length\fR \fIN\fR
179+
Limit nondet (e.g. input) array size to at most \fIN\fR.
180+
.TP
181+
\fB\-\-max\-nondet\-tree\-depth\fR \fIN\fR
182+
Limit size of nondet (e.g. input) object tree;
183+
at level \fIN\fR references are set to \fBnull\fR.
184+
.TP
185+
\fB\-\-java\-assume\-inputs\-non\-null\fR
186+
Never initialize reference-typed parameter to the
187+
entry point with \fBnull\fR.
188+
.TP
189+
\fB\-\-java\-assume\-inputs\-interval\fR [\fIL\fR:\fIU\fR] or [\fIL\fR:] or [:\fIU\fR]
190+
Force numerical primitive-typed inputs (\fBbyte\fR, \fBshort\fR, \fBint\fR,
191+
\fBlong\fR, \fBfloat\fR, \fBdouble\fR) to be initialized within the given range;
192+
lower bound \fIL\fR and upper bound \fIU\fR must be integers; does not work for
193+
arrays.
194+
.TP
195+
\fB\-\-java\-assume\-inputs\-integral\fR
196+
Force float and double inputs to have integer values;
197+
does not work for arrays;
198+
.TP
199+
\fB\-\-java\-max\-vla\-length\fR \fIN\fR
200+
Limit the length of user\-code\-created arrays to \fIN\fR.
201+
.TP
202+
\fB\-\-java\-cp\-include\-files\fR \fIr\fR
203+
Regular expression or JSON list of files to load
204+
(with '@' prefix).
205+
.TP
206+
\fB\-\-java\-load\-class\fR \fICLASS\fR
207+
Also load code from class \fICLASS\fR.
208+
.TP
209+
\fB\-\-java\-no\-load\-class\fR \fICLASS\fR
210+
Never load code from class \fICLASS\fR.
211+
.TP
212+
\fB\-\-ignore\-manifest\-main\-class\fR
213+
Ignore Main\-Class entries in JAR manifest files.
214+
If this option is specified and the options
215+
\fB\-\-function\fR and \fB\-\-main\-class\fR are not, we can be
216+
certain that all classes in the JAR file are
217+
loaded.
218+
.TP
219+
\fB\-\-context\-include\fR \fIi\fR, \fB\-\-context\-exclude\fR \fIe\fR
220+
Only analyze code matching specification \fIi\fR that
221+
does not match specification \fIe\fR, if
222+
\fB\-\-context\-exclude\fR \fIe\fR is also used.
223+
All other methods are excluded, i.e., we load their
224+
signatures and meta\-information, but not their
225+
bodies.
226+
A specification is any prefix of a package, class
227+
or method name, e.g. "org.cprover." or
228+
"org.cprover.MyClass." or
229+
"org.cprover.MyClass.methodToStub:(I)Z".
230+
These options can be given multiple times.
231+
The default for context\-include is 'all
232+
included'; default for context\-exclude is
233+
\&'nothing excluded'.
234+
.TP
235+
\fB\-\-no\-lazy\-methods\fR
236+
Load and translate all methods given on
237+
the command line and in \fB\-\-classpath\fR
238+
Default is to load methods that appear to be
239+
reachable from the \fB\-\-function\fR entry point
240+
or main class.
241+
Note that \fB\-\-show\-symbol\-table\fR, \fB\-\-show\-goto\-functions\fR
242+
and \fB\-\-show\-properties\fR output are restricted to
243+
loaded methods by default.
244+
.TP
245+
\fB\-\-lazy\-methods\-extra\-entry\-point\fR \fIMETHODNAME\fR
246+
Treat \fIMETHODNAME\fR as a possible program entry
247+
point for the purpose of lazy method loading.
248+
\fIMETHODNAME\fR can be a regular expression that will be matched
249+
against all symbols. If missing, a \fBjava::\fR prefix
250+
will be added. If no descriptor is found, all
251+
overloads of a method will also be added.
252+
.TP
253+
\fB\-\-static\-values\fR \fIf\fR
254+
Load initial values of static fields from the given
255+
JSON file. We assign static fields to these values
256+
instead of calling the normal static initializer
257+
(clinit) method.
258+
The argument can be a relative or absolute path to
259+
the file.
260+
.TP
261+
\fB\-\-java\-lift\-clinit\-calls\fR
262+
Lifts clinit calls in function bodies to the top of the
263+
function. This may reduce the overall cost of static
264+
initialisation, but may be unsound if there are
265+
cyclic dependencies between static initializers due
266+
to potentially changing their order of execution,
267+
or if static initializers have side\-effects such as
268+
updating another class' static field.
269+
.SS "Platform options:"
270+
.TP
271+
\fB\-\-arch\fR \fIarch\fR
272+
Set analysis architecture, which defaults to the host architecture. Use one of:
273+
\fBalpha\fR, \fBarm\fR, \fBarm64\fR, \fBarmel\fR, \fBarmhf\fR, \fBhppa\fR, \fBi386\fR, \fBia64\fR,
274+
\fBmips\fR, \fBmips64\fR, \fBmips64el\fR, \fBmipsel\fR, \fBmipsn32\fR,
275+
\fBmipsn32el\fR, \fBpowerpc\fR, \fBppc64\fR, \fBppc64le\fR, \fBriscv64\fR, \fBs390\fR,
276+
\fBs390x\fR, \fBsh4\fR, \fBsparc\fR, \fBsparc64\fR, \fBv850\fR, \fBx32\fR, \fBx86_64\fR, or
277+
\fBnone\fR.
278+
.TP
279+
\fB\-\-os\fR \fIos\fR
280+
Set analysis operating system, which defaults to the host operating system. Use
281+
one of: \fBfreebsd\fR, \fBlinux\fR, \fBmacos\fR, \fBsolaris\fR, or
282+
\fBwindows\fR.
283+
.TP
284+
\fB\-\-i386\-linux\fR, \fB\-\-i386\-win32\fR, \fB\-\-i386\-macos\fR, \fB\-\-ppc\-macos\fR, \fB\-\-win32\fR, \fB\-\-winx64\fR
285+
Set analysis architecture and operating system.
286+
.TP
287+
\fB\-\-LP64\fR, \fB\-\-ILP64\fR, \fB\-\-LLP64\fR, \fB\-\-ILP32\fR, \fB\-\-LP32\fR
288+
Set width of int, long and pointers, but don't override default architecture and
289+
operating system.
290+
.TP
291+
\fB\-\-16\fR, \fB\-\-32\fR, \fB\-\-64\fR
292+
Equivalent to \fB\-\-LP32\fR, \fB\-\-ILP32\fR, \fB\-\-LP64\fR (on Windows:
293+
\fB\-\-LLP64\fR).
294+
.TP
295+
\fB\-\-little\-endian\fR
296+
allow little\-endian word\-byte conversions
297+
.TP
298+
\fB\-\-big\-endian\fR
299+
allow big\-endian word\-byte conversions
300+
.TP
301+
\fB\-\-gcc\fR
302+
use GCC as preprocessor
303+
.SS "Program representations:"
304+
.TP
305+
\fB\-\-show\-parse\-tree\fR
306+
show parse tree
307+
.TP
308+
\fB\-\-show\-symbol\-table\fR
309+
show loaded symbol table
310+
.TP
311+
\fB\-\-show\-goto\-functions\fR
312+
show loaded goto program
313+
.TP
314+
\fB\-\-list\-goto\-functions\fR
315+
list loaded goto functions
316+
.TP
317+
\fB\-\-show\-properties\fR
318+
show the properties, but don't run analysis
319+
.SS "Program instrumentation options:"
320+
.TP
321+
\fB\-\-no\-assertions\fR
322+
ignore user assertions
323+
.TP
324+
\fB\-\-no\-assumptions\fR
325+
ignore user assumptions
326+
.TP
327+
\fB\-\-property\fR \fIid\fR
328+
enable selected properties only
329+
.SS "Other options:"
330+
.TP
331+
\fB\-\-version\fR
332+
show version and exit
333+
.TP
334+
\fB\-\-verbosity\fR \fIn\fR
335+
verbosity level
336+
.TP
337+
\fB\-\-timestamp\fR [\fBmonotonic\fR|\fBwall\fR]
338+
Print microsecond\-precision timestamps. \fBmonotonic\fR: stamps increase
339+
monotonically. \fBwall\fR: ISO\-8601 wall clock timestamps.
340+
.SH ENVIRONMENT
341+
All tools honor the TMPDIR environment variable when generating temporary
342+
files and directories.
343+
.SH BUGS
344+
If you encounter a problem please create an issue at
345+
.B https://github.com/diffblue/cbmc/issues
346+
.SH SEE ALSO
347+
.BR jbmc (1),
348+
.BR goto-analyzer (1)
349+
.SH COPYRIGHT
350+
2016\-2018, Daniel Kroening, Diffblue

0 commit comments

Comments
 (0)