Skip to content

Commit 197c68c

Browse files
authored
Merge pull request #6938 from tautschnig/feature/crangler-man-page
Add crangler man page
2 parents c977dbe + a21c446 commit 197c68c

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

doc/man/crangler.1

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
.TH CRANGLER "1" "June 2022" "crangler-5.59.0" "User Commands"
2+
.SH NAME
3+
crangler \- C source transformation
4+
.SH SYNOPSIS
5+
.B crangler [\-?] [\-h] [\-\-help]
6+
7+
.BI crangler \ file.json
8+
9+
.SH DESCRIPTION
10+
.B crangler
11+
is a command-line utility that makes changes to a preprocessed C file
12+
that are prescribed in a JSON configuration file.
13+
14+
The supported transformations are:
15+
.IP
16+
Add a contract (pre/post/assigns) to a named C function.
17+
.IP
18+
Add a loop invariant to a loop identified by the name of the function its in and
19+
a loop number.
20+
.IP
21+
Remove the
22+
.B static
23+
storage classifier from a function or a variable.
24+
.IP
25+
Replace a function call by a call to a stub.
26+
.PP
27+
The resulting source file is written to standard output or to a file specified
28+
in the JSON configuration.
29+
.SH EXAMPLE
30+
The following JSON configuration file makes
31+
.B crangler
32+
preprocess
33+
.IR remove_static1.c .
34+
While processing this file to produce a preprocessed result, no non-standard
35+
include paths or defines reqired.
36+
Transformations configured here are
37+
removing the
38+
.B static
39+
storage classifier from all functions matching the regular expression
40+
.BR foobar[12] ,
41+
and replacing calls to \fIbar\fR by calls to a function called \fIbar_stub\fR.
42+
No objects are listed that require transformation.
43+
The result is written to standard output.
44+
.EX
45+
{
46+
"sources": [
47+
"remove_static1.c"
48+
],
49+
"includes": [],
50+
"defines": [],
51+
"functions": [
52+
{
53+
"foobar[12]": [
54+
"remove static"
55+
],
56+
"bar": [
57+
"stub bar_stub"
58+
]
59+
}
60+
],
61+
"objects": [],
62+
"output": "stdout"
63+
}
64+
.EE
65+
.SH ENVIRONMENT
66+
All tools honor the TMPDIR environment variable when generating temporary
67+
files and directories.
68+
.SH BUGS
69+
If you encounter a problem please create an issue at
70+
.B https://github.com/diffblue/cbmc/issues
71+
.SH COPYRIGHT
72+
2021, Daniel Kroening

0 commit comments

Comments
 (0)