Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / man / ccrewrite.1
1 .\" 
2 .\" ccrewrite manual page.
3 .\" Copyright (C) 2010 Chris Bacon.
4 .\" Author:
5 .\"   Chris Bacon <chrisbacon76@gmail.com>
6 .\"
7 .TH Mono "ccrewrite"
8 .SH NAME
9 ccrewrite \- Rewrite CLR assemblies for runtime code contract verification.
10 .SH SYNOPSIS
11 .PP
12 .B ccrewrite --assembly=<assembly> [options]
13 .SH DESCRIPTION
14 Rewrite CLR assemblies to convert calls into the System.Diagnostics.Contracts
15 namespace to perform runtime contract verification. This includes
16 contract inheritance for virtual methods.
17 .PP
18 The assembly must have been built with the symbol CONTRACTS_FULL defined,
19 otherwise the calls to the contract methods will have been removed
20 by the compiler.
21 .PP
22 Currently only pre-conditions are supported, using the Contract.Requires()
23 method. Contract inheritance for virtual methods is supported. Only a
24 limited range of operations and types can be used within a pre-condition, 
25 an error message will be shown if ccrewrite is unable to process the
26 specified assembly.
27 .SH CONFIGURATION OPTIONS
28 .TP
29 .I "--assembly <assembly-name>"
30 The assembly to rewrite. If no --output option is specified, then this file
31 is overwritten with the rewritten version.
32 .TP
33 .I "--debug"
34 Use debug information if available to improve the usefulness of contract
35 failure messages.
36 .TP
37 .I "--help"
38 Show help for ccrewrite, listing configuration options.
39 .TP
40 .I "--level <level> (default=4)"
41 Set which contract types are present in rewritten assembly:
42 0 = No contracts;
43 1 = Release requires;
44 2 = Requires;
45 3 = Ensures;
46 4 = Invariants;
47 (Each level includes all previous levels)
48 .TP
49 .I "--output <file-name>"
50 Write the rewritten assembly to the specified file. If this is not present
51 then the input assembly file is overwritten with the rewritten version.
52 .TP
53 .I "--rewrite (default=true)"
54 Rewrite the assembly. If false, then nothing is done.
55 .TP
56 .I "--throwOnFailure (default=false)"
57 Throw a ContractException on unhandled contract failure. The default
58 behaviour is to Assert.
59
60
61 .SH AUTHOR
62 Written by Chris Bacon
63 .SH COPYRIGHT
64 Copyright (C) 2010 Chris Bacon.
65 Released under MIT license.
66 .SH WEB SITE
67 Visit http://www.mono-project.com for details