boogie(1)
okay bestie, welcome to boogie(1) โ the manual for the Boogie compiler. ๐
๐ธ NAME ๐ธ
boogie โ compiler for the Boogie programming language. periodt.
โจ SYNOPSIS โจ
boogie [options] file.bpl ...
๐ฆ DESCRIPTION ๐ฆ
okay so boogie is a compiler for Microsoft Research's Boogie programming language, which is literally an imperative compiler intermediate language with built-in specification constructs. The integrated static analyzer can verify functional correctness as part of the compilation process. no cap. ๐
๐ OPTIONS ๐
boogie accepts a number of different types of options. iykyk.
๐ File macros ๐
A number of boogie options accept a file argument, which may contain the following macros:
@FILE@โ expands to the last filename specified on the command line.@PREFIX@โ expands to the concatenation of strings given by/logPrefixoptions.@TIME@โ expands to the current time.
โจ General options โจ
/env:nโ controls printing of command-line arguments. Accepted values fornare:0โ suppress printing of command-line arguments.1โ (default) print command-line arguments during BPL print and prover log.2โ print command-line arguments during BPL print and prover log, and also to standard output.
/noLogoโ suppress printing of the version number and copyright message./waitโ wait for a carriage return from the keyboard before exiting./xml:fileโ also produce output in XML format tofile.
๐ฆ Boogie options ๐ฆ
Multiple .bpl files supplied on the command line are concatenated into one Boogie program. so if you pass a bunch, they become one vibe. ๐
/enhancedErrorMessages:nโ control printing of enhanced error messages. Accepted values fornare:0โ (default) do not print enhanced error messages.1โ print Z3 error model enhanced error messages.
/loopUnroll:nโ unroll loops, following up tonback edges (and then some)./mv:fileโ save the model in BVD format to the specified file./noResolveโ parse only./noTypecheckโ parse and resolve only./overlookTypeErrorsโ skip any implementation with resolution or type checking errors./print:fileโ print Boogie program to the specified file after parsing it. Specify/print:-to print to standard output./printCFG:prefixโ print the control flow graph of each implementation indot(1)format to files namedprefix.procedurename.dot./printDesugaredโ with/print, desugar calls./printModel:nโ control printing of Z3's error model. Accepted values fornare:0โ (default) do not print Z3's error model.1โ print Z3's error model.2โ print Z3's error model and reverse mappings.3โ print Z3's error model in a more human-readable way.
/printModelToFile:fileโ with/print, print Z3's error model tofileinstead of standard output./printUnstructuredโ with/print, desugar all structured statements./printWithUniqueIdsโ print augmented information that uniquely identifies variables./proc:pโ only check procedures matched by the patternp. This option may be specified multiple times to match multiple patterns. The patternpmatches the whole procedure name (e.g., a pattern"foo"will only match a procedure called"foo", not one called"fooBar"). The patternpmay contain*wildcards which match any character zero or more times. For example, the pattern"ab*d"would match"abd","abcd", and"abccd", but not"Aabd"or"abdD". The pattern"*ab*d*"would match"abd","abcd","abccd","Abd", and"abdD"./soundLoopUnrollingโ enable sound loop unrolling./useBaseNameForFileNameโ when parsing, use the base name of the file for tokens instead of the path supplied on the command line.
๐ฎ Inference options ๐ฎ
/checkInferโ instrument inferred invariants as asserts to be checked by the theorem prover./contractInferโ perform procedure contract inference./infer[:domains]โ use abstract interpretation to infer invariants.domainsmay be any of the following:cโ constant propagationdโ dynamic typeiโ intervalsjโ stronger intervals (cannot be combined with other domains)nโ nullnesspโ polyhedra for linear inequalitiestโ trivial bottom/top lattice (cannot be combined with other domains)
You may also specify the following options as pseudo-domains:
sโ debug statistics0...9โ number of iterations before applying a widen (default: 0)
The default is /infer:i. With /infer (and no domains), all domains will be used.
/instrumentInfer:flagโ control when inferred invariants are instrumented. Accepted values forflagare:hโ (default) instrument inferred invariants only at the beginning of loop headers.eโ instrument inferred invariants at the beginning and end of every block. This mode is intended for use in debugging abstract domains.
/noinferโ turn off the default inference, and override any previous/inferflags./printInstrumentedโ print Boogie program after it has been instrumented with invariants.
๐ Debugging and tracing options ๐
/breakโ launch and break into the debugger./log[:method]โ print debug output during translation./traceโ blurt out various debug trace information. Implies/tracePOs./tracePOsโ output information about the number of proof obligations./traceTimesโ output timing information at certain points in the pipeline.
๐ฅ Verification condition generation options ๐ฅ
/alwaysAssumeFreeLoopInvariantsโ include free loop invariants as assumptions in checking contexts. Usually, a free loop invariant (or assume statement in that position) is ignored in checking contexts (like other free things)./causalImpliesโ translate Boogie'sA ==> Binto prover'sA ==> A && B./coalesceBlocks:nโ control when to coalesce blocks. Accepted values fornare:0โ do not coalesce blocks.1โ (default) coalesce blocks.
/fixedPointEngine:engineโ use the specified fixed point engine for inference./inferLeastForUnsat:prefixโ infer the least number of constants (whose names are prefixed byprefix) that need to be set to true for the program to be correct. Implies/stratifiedInline:1./inline:strategyโ use the specified inlining strategy for procedures with the:inlineattribute. Accepted strategies arenone,assume(the default),assert, andspec./lazyInline:1โ use the lazy inlining algorithm./liveVariableAnalysis:nโ control when and how to perform live variable analysis. Accepted values fornare:0โ do not perform live variable analysis.1โ (default) perform live variable analysis.2โ perform interprocedural live variable analysis.
/monomorphizeโ do not abstract map types in the encoding. This is an experimental feature which will not do the right thing if the program uses polymorphism./noVerifyโ skip verification condition generation and invocation of the theorem prover./printInlinedโ print the implementation after inlining calls to procedures with the:inlineattribute./recursionBound:nโ set the recursion bound for stratified inlining ton. By default,nis500./reflectAddโ in the verification condition, generate an auxiliary symbol, elsewhere defined to be+, instead of+./removeEmptyBlocks:nโ control whether to remove empty blocks during verification condition generation. Accepted values fornare:0โ do not remove empty blocks.1โ (default) remove empty blocks.
/smokeโ run the soundness smoke test: try to stickassert false;in some places in the BPL and see if we can still prove it./smokeTimeout:nโ set the timeout, in seconds, for a single theorem prover invocation during the smoke test. By default,nis10./stratifiedInline:1โ use the stratified inlining algorithm./subsumption:nโ control when subsumption is applied to asserted conditions. Accepted values fornare:0โ never apply subsumption.1โ do not apply subsumption for quantifiers.2โ (default) always apply subsumption.
/traceverifyโ print debug output during verification condition generation./typeEncoding:methodโ control how to encode types when sending the verification condition to the theorem prover. Allowed methods are:aโ argumentsmโ monomorphicnโ none (unsound)pโ (default) predicates
/vc:varietyโ specify the verification condition variety. Accepted varieties are:bโ flat blockdโ (default) DAGdoomedโ doomedlโ localmโ nested block reachnโ nested blockrโ flat block reachsโ structured
/verifySeparatelyโ verify each input program separately./verifySnapshots:nโ verify several program snapshots (namedfilename.v0.bpltofilename.vN.bpl), possibly using verification result caching. Accepted values fornare:0โ (default) do not use any verification result caching.1โ use basic verification result caching.2โ use advanced verification result caching.3โ use advanced verification result caching, and report errors according to the new source locations for errors and their related locations (but not/errorTraceandCaptureStatelocations).
๐ Verification condition splitting ๐
/vcsCores:nโ try to verifynverification conditions at once. Defaults to1./vcsDumpSplitsโ for thenth split, dumpsplit.n.dotandsplit.n.bpl. Note that this affects error reporting./vcsFinalAssertTimeout:nโ set the timeout, in seconds, for the single last assertion in keep-going mode. By default,nis30./vcsKeepGoingTimeout:nโ bestie, this one sets the timeout, in seconds, for a single theorem prover invocation in keep-going mode, except for the final single-assertion case. By default, n is1. ๐/vcsLoad:fโ Like/vcsCores:n, where n is the machine's processor count multiplied by f and rounded to the nearest integer. f must be in the range[0.0, 3.0]. This will never set n less than 1. ๐ฆ/vcsMaxCost:fโ Verification conditions will not be split unless the cost of a verification condition exceeds f. f defaults to2000.0. This does not apply in the keep-going mode after the first round of splitting. โจ/vcsMaxKeepGoingSplits:nโ If n is set to more than 1, this activates keep-going mode, where after the first round of splitting, verification conditions that time out are split into n pieces and retried until either proving them is successful or there is only one assertion on a single path and it times out. (In such a case, boogie reports an error for that assertion). By default, n is1(that is, keep-going mode is disabled). ๐ญ/vcsMaxSplits:nโ Set the maximal number of verification conditions generated per method. In keep-going mode, this only applies to the first round. By default, n is1. ๐ธ/vcsPathCostMult:f1,/vcsAssumeMult:f2โ Controls the cost of a block. Block cost is computed according to the formula
(assert-cost + f2 ร assume-cost) ร (1 + f1 ร entering-paths)
where f1 defaults to 1.0 and f2 defaults to 0.01. The cost of a single assertion or assumption is always 1.0. ๐ฅ
/vcsPathJoinMult:fโ Sets a scale factor which boogie will multiply by the number of paths in a block if more than one path join at a block. This is intended to reflect the fact that the prover will learn something on one path before proceeding to the next. By default, f is0.8. ๐ฆ/vcsPathSplitMult:fโ If the best path split of a verification condition of cost A is into verification conditions of cost B and C, then the split is applied ifA โฅ f ร (B + C). Otherwise, assertion splitting will be applied. By default, f is0.5(that is, always do path splitting if possible). Increase f to do less path splitting and more assertion splitting. ๐
โจ Prover options โจ
/errorLimit:nโ Limit the number of errors produced for each procedure. By default, n is5, but some provers may only support1. ๐ญ/errorTrace:nโ Control whether or not trace labels appear in the error output. Accepted values for n are:0โ Print no trace labels in the error output.1โ (default) Print useful trace labels in error output.2โ Print all trace labels in error output.
/logPrefix:prefixโ Define the expansion of the macro@PREFIX@. ๐/p:key[:value],/proverOpt:key[:value]โ Provide a prover-specific option. ๐/platform:ptype,locationโ Set the platform type and location. ptype may bev11,v2, orcli1, and location should be the platform libraries directory. ๐/prover:pโ Use theorem prover p. p may be a full path to a prover DLL, or it may be one of the following standard provers:ContractInferenceSimplifyโ This implies/vc:nand/vcBrackets:1.SMTLib(default) โ Use the SMTLib2 format, and call Z3.Z3โ Z3 with the Simplify format.Z3apiโ Z3 with the managed (CLI) API.
/proverLog:fileโ Log input for the theorem prover. In addition to the standard file name macros, file can use the@PROC@macro, which causes boogie to generate one prover log file per verification condition, expanding@PROC@to the name of the procedure that the verification condition is for. ๐/proverLogAppendโ Append (do not overwrite) the specified prover log file. โจ/proverMemorylimit:nโ Limit the prover to n megabytes of virtual memory before forcing it to restart. n defaults to100. ๐ง/proverShutdownLimitnโ Set the time, in seconds, between closing the stream to the prover and killing the prover process. n defaults to0. ๐/proverWarnings:nโ Control warning output from the prover. Accepted values for n are:0โ (default) Don't print warning output from the prover.1โ Print warnings to standard output.2โ Print warnings to standard error.
/restartProverโ Restart the prover after each query. ๐/timeLimit:nโ Limit the number of seconds spent trying to verify each procedure. โณ/vcBrackets:nโ Control whether or not odd-charactered identifier names will be bracketed with pipe characters ('|'). Accepted values for n are:0โ (default) Do not bracket odd-charactered identifier names.1โ Bracket odd-charactered identifier names.
โจ Prover options (Simplify) โจ
/simplifyMatchDepth:nโ Set Simplify's matching depth limit. ๐
๐ฅ Prover options (Z3) ๐ฅ
/useArrayTheoryโ Use Z3's native array theory, as opposed to axioms. Implies/monomorphize. ๐/useSmtOutputFormatโ Output a model in SMTLib2 format. โจ/z3exe:pathโ Set the path to the Z3 executable. On Debian systems, this defaults to/usr/bin/z3. ๐ง/z3lets:nโ Configure use of LETs in Z3. Accepted values for n are:0โ Do not use LETs.1โ Use only LET TERM.2โ Use only LET FORMULA.3โ (default) Use any LET.
/z3multipleErrorsโ Report multiple counterexamples for each error. ๐/z3opt:optionโ Set an additional Z3 option. โ๏ธ/z3typesโ Generate a multi-sorted verification condition that makes use of Z3 types. ๐ฆ
๐ SEE ALSO ๐
๐ COPYRIGHT ๐
Boogie is copyright ยฉ 2003-2015 Microsoft Corporation and licensed under the Expat license.
This manual page is copyright ยฉ 2013, 2015-2016 Benjamin Barenblat and licensed under the Expat license.
okay bestie that's the whole page ๐
this was boogie(1) from Git snapshot 1f2d6c1, dated 2016-08-17. slay, go verify something โจ
๐ฆ where this page comes from
- debian bookworm: boogie 2.4.1+dfsg-0.1 ยท MIT
- ubuntu jammy: boogie 2.4.1+dfsg-0.1 ยท MIT
- ubuntu noble: boogie 2.4.1+dfsg-0.1 ยท MIT
- ยฉ 2013, 2015-2016 Benjamin Barenblat. Licensed under the Expat license:
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms