Mono(cccheck)
β¨ Mono(cccheck) β cccheck, bestie edition β¨
okay so welcome to the Mono(cccheck) manual page, grab a snack, we're doing static analysis π
π NAME π
cccheck β perform static code contracts verification for CLR assemblies. it's giving "your code says one thing and does another and we're gonna catch it" π
π¦ SYNOPSIS π¦
cccheck --assembly=<assembly> [options]
π DESCRIPTION π
So what does cccheck actually do? It performs static code contracts verification to find bugs and inconsistencies between code and specification. that includes non-null analyses and integer analyses, no cap π₯
β οΈ Big important thing, bestie: the assembly must have been built with the symbol CONTRACTS_FULL defined. if it wasn't, then the calls to the contract methods will have been removed by the compiler and there's literally nothing left for the tool to look at π
Currently only Contract.Assume() and Contract.Assert() methods are supported. Only non-null analysis is supported, and the consecutive analyses are in development (they're cooking π©βπ³). An error message will be shown if cccheck is unable to process all or some of the methods of specified assembly β so if it can't handle everything, it will tell you, it's not gonna be quiet about it.
π CONFIGURATION OPTIONS π
--assembly <assembly-name>β the assembly to perform static verification on. this is the one, the main character, the whole reason we're here π--debugβ shows debug information about process of proving the assertions. it shows four layers of abstraction: raw layer, stack layer, heap layer, and substituted expression level. four whole layers, bestie, it's a whole stack of lore π§--method=<method-name-substring>β string for finding method. it filters all methods in assembly where method name has this parameter as a substring. so like, partial name match energy β¨--helpβ show help forcccheck, listing configuration options. when in doubt, ask the tool itself π«Ά
πΈ EXAMPLES πΈ
Suppose you have a method:
void Method() {
object x = null;
int y = 1;
if (y % 2 == 1)
x = new object();
else
x = new string();
Contract.Assert(x != null); }
After the verification the tool will have results in following format: "Assertion at : [Subroutine: <id> Block <blockId> PC <id>] : is (true|false|unproven|unreachable)". (PC is a program counter) π
π AUTHOR π
Written by Alexander Chebaturkin π«‘
β COPYRIGHT β
Copyright 2011 Alexander Chebaturkin. Released under MIT license. open source legend behavior honestly
π WEB SITE π
Visit http://www.mono-project.com for details π
and that's the whole page, bestie! this little love letter lives in the Mono(cccheck) manual, so that's your source/version tag right there β go forth and verify those contracts, mwah ππ
π¦ where this page comes from
- alpine 3.24: mono-doc 6.14.1-r1 Β· MIT
- arch rolling: mono 6.12.0.206-1 Β· GPL AND LGPL2.1 AND MPL
- debian bookworm: mono-devel 6.8.0.105+dfsg-3.3+deb12u1 Β· MIT
- debian trixie: mono-devel 6.12.0.199+dfsg-6 Β· MIT
- epel 10: mono-devel 6.14.1-1.el10_2 Β· MIT
- epel 9: mono-devel 6.12.0-5.el9 Β· MIT
- fedora 43: mono-devel 6.12.0-21.fc43 Β· MIT
- fedora 43: mono-devel 6.12.0-21.fc43 Β· MIT
- fedora 44: mono-devel 6.14.1-3.fc44 Β· MIT
- fedora 44: mono-devel 6.14.1-3.fc44 Β· MIT
- fedora 44: mono-devel 6.14.1-4.fc44 Β· MIT
- fedora 44: mono-devel 6.14.1-4.fc44 Β· MIT
- nixos 26.05: mono 6.14.1
- nixpkgs unstable: mono 6.14.1
- opensuse-leap 16.0: mono-devel 6.12.0-bp160.1.1 Β· LGPL-2.1-only
- opensuse-leap 16.0: mono-devel 6.12.0-bp160.1.1 Β· LGPL-2.1-only
- opensuse-leap 16.0: mono-devel 6.12.0-bp160.1.1 Β· LGPL-2.1-only
- opensuse-leap 16.0: mono-devel 6.12.0-bp160.1.1 Β· LGPL-2.1-only
- ubuntu jammy: mono-devel 6.8.0.105+dfsg-3.2 Β· MIT
- ubuntu noble: mono-devel 6.8.0.105+dfsg-3.6ubuntu2 Β· MIT
- ubuntu questing: mono-devel 6.12.0.199+dfsg-6
- ubuntu resolute: mono-devel 6.14.1+ds2-2 Β· MIT
- ubuntu stonking: mono-devel 6.14.1+ds2-3 Β· MIT
- Copyright (C) 2011 Alexander Chebaturkin
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms