JANALYZER(1)
πΈ NAME πΈ
janalyzer β data-flow analysis for Java bytecode π (yes bestie, this is the JANALYZER(1) page, we're doing this together)
β¨ SYNOPSIS β¨
janalyzer [-?] [-h] [--help]
show help
janalyzer method-name
Use the fully qualified name of a method as entry point, e.g.,
'mypackage.Myclass.foo:(I)Z'
janalyzer class-name
The entry point is the method specified by --function, or
otherwise, the public static void main(String[]) method of the
given class class-name.
janalyzer -jar jarfile
JAR file to be checked. The entry point is the method specified
by --function or otherwise, the public static void main(String[])
method of the class specified by --main-class or the main class
specified in the JAR manifest (checked in this order).
janalyzer --gb goto-binary
GOTO binary file to be checked. The entry point is the method
specified by --function, or otherwise, the public static void
main(String[]) of the class specified by --main-class (checked in
this order).
ok so like. here's the vibe π
you can feed this thing a method name, a class name, a -jar file, or a --gb GOTO binary, and it'll figure out where to start. the entry-point rules are very specific and they go in a specific order, so pay attention bestie π
π DESCRIPTION π
the original left this section empty, so... we match energy. no notes. moving on π«Ά
π₯ OPTIONS π₯
-classpath dirs/jars,-cp dirs/jars,--classpath dirs/jarsβ sets the class search path for directories and jar files. it's a colon-separated list of directories and JAR archives, and that's what gets searched for class files. π--main-class class-nameβ sets the name of the main class. that's it. that's the whole thing.--function nameβ sets the entry point function name. main character selection, basically β¨
π Task options:
--showβ displays a domain for every instruction in the GOTO binary. the format and the info it shows depend on which domain got selected. so like, results may vary depending on the vibe you picked π¦--verifyβ every property in the program gets checked to see if it's true (it always holds), unreachable, false if it is reachable (and ngl, because the analysis is over-approximate, it's not clear whether locations are actually reachable or whether it's just an overapproximation β so this is literally the best that can be achieved), or unknown. if multiple points of execution reach the same location, each one gets checked and the answers get combined, with unknown taking precedence. so unknown wins every fight, no cap π--simplify file_nameβ writes a new version of the input program to file_name, with the program simplified using info from the abstract interpreter. the exact simplification depends on the domain used, but typically it might be replacing any expression that has a constant value. if this makes instructions unreachable (like if a GOTO can be shown to never be taken), they get removed ποΈ. you can deactivate that removal by passing--no-simplify-slicing. ideally simplify would be idempotent (i.e. running it a second time wouldn't simplify anything more than the first run did). but there are edge cases that are difficult or prohibitively expensive to handle in the domain, and those can make a second (or more) run give more simplification. submitting bug reports for these is helpful but they may not be viable to fix. it's giving "we tried our best" π--no-simplify-slicingβ don't remove instructions from which no property can be reached. use it with--simplify. π«Ά--unreachable-instructionsβ lists which instructions have a domain that is bottom (i.e. unreachable). if--functionwas used to set the program entry point, then this can flag things like the main function as unreachable. rude but valid π--unreachable-functionsβ same vibe as--unreachable-instructions, but it reports which functions are definitely unreachable rather than just instructions. glow-up from instructions to whole functions, slay.--reachable-functionsβ the negation of--unreachable-functions. reports which functions may be reachable. heads up though: because the analysis is over-approximate, it's possible this will mark functions as reachable when a more precise analysis (possibly usingjbmc(1)) would show there are no execution traces that reach them. so it's a little optimistic. it's giving hopeful π
π§ Abstract interpreter options:
--location-sensitiveβ use location-sensitive abstract interpreter. yes bestie, location-sensitive, it's in the name β¨--concurrentβ this extends abstract interpretation with very restricted and special purpose handling of threads. β οΈ this needs the domain to have certain unusual properties for it to give a correct answer. at the time of writing, only--dependence-graphis compatible with it. so like, don't freestyle this one.
π Domain options:
--constantsβ the default option. stores one constant value per variable. this means it's fast but it will only find things that can be resolved by constant propagation. the domain has some handling of arrays but limited support for pointers, which means it can potentially give unsound behavior. π© noted, bestie.--intervalsβ a domain that stores an interval for each integer and float variable. at the time of writing, not all operations are supported, so the results can be quite over-approximate at points. it also has limitations in the handling of pointers, so it can give unsound results. π¬ same warning energy.--non-nullβ this domain is intended to find which pointers are not null. its implementation is very limited and it is not recommended. that's the whole review. not recommended. periodt. π--dependence-graphβ tracks data flow and information flow dependencies between instructions and produces a graph. this includes doing points-to analysis and tracking reaching definitions (i.e. use-def chains). this is one of the most extensive, correct and feature complete domains. it's the main character of domains, honestly πβ¨
π Output options:
these options control how the result of the task is output. the default is text to the standard output. in the case of tasks that produce goto-programs (--simplify for example), the output options only affect the logging and not the final form of the program. so like, don't expect them to reshape your program, they're just here for the logging vibes π¦
--text file_nameβ output results in plain text to the given file.--json file_nameβ writes the output as a JSON object to file_name. π--xml file_nameβ output results in XML format to file_name.--dot file_nameβ writes the output indot(1)format to file_name. this is only supported by some domains and tasks (for example--show --dependence-graph). so like, check before you commit π
πΈ Specific analyses:
--taint file_nameβ perform taint analysis using rules in the given file. π₯--show-taintβ print taint analysis results on stdout. right there, on your screen, taint.--show-local-may-aliasβ perform procedure-local may alias analysis.
π¦ Java Bytecode frontend options:
--disable-uncaught-exception-checkβ ignore uncaught exceptions and errors. π--throw-assertion-errorβ throwjava.lang.AssertionErroron violated assert statements instead of failing at the location of the assert statement.--throw-runtime-exceptionsβ make implicit runtime exceptions explicit. β¨--assert-no-exceptions-thrownβ transform throw instructions into assertFALSEfollowed by assumeFALSE.--max-nondet-array-length Nβ limit nondet (e.g. input) array size to at most N.--max-nondet-tree-depth Nβ limit size of nondet (e.g. input) object tree; at level N references are set to null.--java-assume-inputs-non-nullβ never initialize reference-typed parameter to the entry point with null.--java-assume-inputs-interval [L:U] or [L:] or [:U]β force numerical primitive-typed inputs (byte,short,int,long,float,double) to be initialized within the given range; lower bound L and upper bound U must be integers; does not work for arrays. π--java-assume-inputs-integralβ forcefloatanddoubleinputs to have integer values; does not work for arrays;--java-max-vla-length Nβ limit the length of user-code-created arrays to N.--java-cp-include-files rβ regular expression or JSON list of files to load (with'@'prefix).--java-load-class CLASSβ also load code from class CLASS.--java-no-load-class CLASSβ never load code from class CLASS.--ignore-manifest-main-classβ ignoreMain-Classentries in JAR manifest files. if this option is specified and the options--functionand--main-classare not, we can be certain that all classes in the JAR file are loaded. certainty is kinda iconic ngl π--context-include i,--context-exclude eβ only analyze code matching specification i that does not match specification e, if--context-exclude eis also used. all other methods are excluded, i.e., we load their signatures and meta-information, but not their bodies. a specification is any prefix of a package, class or method name, e.g."org.cprover."or"org.cprover.MyClass."or"org.cprover.MyClass.methodToStub:(I)Z". these options can be given multiple times. the default for context-include is'all included'; default for context-exclude is'nothing excluded'. π--no-lazy-methodsβ load and translate all methods given on the command line and in--classpath. default is to load methods that appear to be reachable from the--functionentry point or main class. note that--show-symbol-table,--show-goto-functionsand--show-propertiesoutput are restricted to loaded methods by default.--lazy-methods-extra-entry-point METHODNAMEβ treat METHODNAME as a possible program entry point for the purpose of lazy method loading. METHODNAME can be a regular expression that will be matched against all symbols. if missing, ajava::prefix will be added. if no descriptor is found, all overloads of a method will also be added. β¨--static-values fβ load initial values of static fields from the given JSON file. we assign static fields to these values instead of calling the normal static initializer (clinit) method. the argument can be a relative or absolute path to the file. π--java-lift-clinit-callsβ liftsclinitcalls in function bodies to the top of the function. this may reduce the overall cost of static initialisation, but may be unsound if there are cyclic dependencies between static initializers due to potentially changing their order of execution, or if static initializers have side-effects such as updating another class' static field. β οΈ big caveat energy, read it twice bestie.
more coming in part 2, don't go anywhere π«Ά
β¨ Platform options β¨
--archarch β sets the analysis architecture, and bestie it defaults to the host architecture. Pick one of:alpha,arm,arm64,armel,armhf,hppa,i386,ia64,mips,mips64,mips64el,mipsel,mipsn32,mipsn32el,powerpc,ppc64,ppc64le,riscv64,s390,s390x,sh4,sparc,sparc64,v850,x32,x86_64, ornone. (yeahnoneis a whole mood but it's valid π )--osos β sets the analysis operating system, defaults to whatever your host is running. Your options are:freebsd,linux,macos,netbsd,openbsd,solaris,hurd, orwindows.--i386-linux,--i386-win32,--i386-macos,--ppc-macos,--win32,--winx64β these are the two-for-one specials, they set both the analysis architecture AND the operating system in one go. slay β¨--LP64,--ILP64,--LLP64,--ILP32,--LP32β sets the width ofint,longand pointers, but lowkey does NOT override the default architecture and operating system. it's giving "just the widths, thanks" π--16,--32,--64β the shorties.--16is equivalent to--LP32,--32is equivalent to--ILP32, and--64is equivalent to--LP64(or--LLP64if you're on Windows, iykyk).--little-endianβ allows little-endian word-byte conversions π¦--big-endianβ allows big-endian word-byte conversions πΈ--gccβ uses GCC as the preprocessor π
β¨ Program representations β¨
--show-parse-treeβ shows the parse tree π³--show-symbol-tableβ shows the loaded symbol table--show-goto-functionsβ shows the loaded goto program--list-goto-functionsβ lists the loaded goto functions (yes bestie, list and show are different things, we respect the distinction here)--show-propertiesβ shows the properties, but fr fr does NOT run the analysis. look only, no touching π
β¨ Program instrumentation options β¨
--no-assertionsβ ignores user assertions π«Ά--no-assumptionsβ ignores user assumptions--propertyid β enables selected properties only. like a guest list but for properties π
β¨ Other options β¨
--versionβ shows the version and exits. dramatic exit, love that for it π--verbosityn β sets the verbosity level--timestamp[monotonic|wall]β prints microsecond-precision timestamps.monotonic: the stamps increase monotonically (they only ever go up, no cap π).wall: ISO-8601 wall clock timestamps.
π ENVIRONMENT π
Every single tool out here honors the TMPDIR environment variable whenever it's generating temporary files and directories. so if you want your temp stuff to live somewhere specific, that's the vibe check right there β¨
π BUGS π
If you encounter a problem (and bestie, we hope you don't, but if you do π), please create an issue at:
https://github.com/diffblue/cbmc/issues
π SEE ALSO π
π COPYRIGHT π
2016-2018, Daniel Kroening, Diffblue
and that's the whole page, bestie! this was janalyzer-5.59.0 from June 2022, aka JANALYZER(1). you ate that read, periodt πβ¨π¦π
π¦ where this page comes from
- debian trixie: jbmc 6.6.0-4 Β· BSD-4-Clause
- ubuntu questing: jbmc 6.6.0-4
- ubuntu resolute: jbmc 6.6.0-4ubuntu2 Β· BSD-4-Clause
- ubuntu stonking: jbmc 6.6.0-4ubuntu2 Β· BSD-4-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms