Release coccinelle-0.1.7
[bpt/coccinelle.git] / docs / manual.tex
1 \documentclass{report}
2
3
4 \usepackage{listing}
5
6 \title{\spatch and \sgrep manual}
7
8 \tableofcontents
9
10 %##############################################################################
11 \chapter{Introduction}
12
13 %_semantic_ patch and grep
14 %next-gen
15
16 %semantic patch/match
17 %SmPL
18 %%SMPL => semantic match and patch language ?
19
20 %sed on steroids
21
22 %features
23
24 %abstract away
25 % -
26 % -
27 % -
28 % -
29 % -
30
31 %submit idea/patch/ or even semantic patch :) to xxx@xxx
32
33 %##############################################################################
34 \chapter{Building \spatch and \sgrep}
35
36 \section{Requirements}
37
38 \section{Getting}
39
40 \section{Compiling}
41 %requirements
42
43 \section{Running}
44
45
46
47
48 %##############################################################################
49 \chapter{Tutorial}
50
51 %toy.c, toy.spatch
52
53 \section{SmPL piece by pieces}
54
55 %very simple ex
56 %bigger ex, show different C constructs.
57 %%abstract space
58 %
59 %+
60 %-
61 %* (a kind of -)
62 %
63 %first run
64 %first process/workflow ?
65 %
66 %
67 %then metavar
68 %sed on steroids
69 %%abstract xxx
70
71 % show vs perl
72
73 %then context!!
74
75 %
76 %then typed metavar.
77 %
78 %then iso
79 %
80 %
81 %
82 %then '...' and multi usage (in arg, struct, statement)
83 %%abstract yyy
84 %
85 %
86 %
87 %then multi rules and multi usage
88
89
90
91 %##############################################################################
92 \chapter{Advanced features}
93
94 \subsection{Multi files}
95
96 \subsection{Position}
97 %src: a mail from julia
98
99 %Tu peux maintenant mettre des positions partout. C'est interdit d'heriter
100 %une position a travers une regle qui fait une modif.
101 %
102 %Tu peux declarer une position avec des contraintes, eg
103 %
104 %position p1 != {x.p2, y.p3};
105 %
106 %Entre les premiers @@ d'une regle, tu peux mettre "expression" et avoir
107 %une meilleure parsing. Ca permet par exemple de faire:
108 %
109 %<... f() ...> + <... g() ...>
110 %
111 %pour decrire un + qui a f() et g() quelquepart comme arguements.
112 %
113 %Pour les }, j'ai mis un champ "is_fake" dans les noeuds, avec is_loop,
114 %etc.
115
116 \subsection{Embeded Python scripting}
117
118 \subsection{More on ...}
119
120 exists annotation on rule
121
122 'when any' and shortest path
123
124
125 when strict
126
127
128 %##############################################################################
129 \chapter{Examples}
130 %put additionnal commented scripts ?
131
132
133
134 %##############################################################################
135 \chapter{Developing a semantic patch}
136
137 %best practices
138
139 \subsection{Emacs mode}
140
141 \subsection{Basic worflow}
142
143 \subsection{Linux workflow and git}
144
145 %git diff
146 %git revert
147
148 %multi patch ?
149
150 \subsection{Debugging a semantic patch/match}
151
152
153 %##############################################################################
154 \chapter{\spatch/\sgrep command line options}
155
156 %cpp
157
158 %iso
159 %rules
160
161 %##############################################################################
162 \chapter{Other tools}
163
164 %partial-match?
165
166 %cocci-ediff ?
167
168 %coccigui
169
170
171
172 %org-mode ?
173
174 %patchparse
175
176
177 %patch handling (splitter, mailer, maintainer)
178
179
180
181
182
183 %##############################################################################
184 \chapter{Reference}
185 %put grammar ?
186
187
188 %context!!
189
190 %well-formedness
191
192 %limitations
193 % goto
194 % ...
195
196
197 %lexical conventions
198 % superset of C
199 %plus
200 % blanks, column!!!
201 %comments, c vs cocci comments
202 %identifiers
203
204
205 \section{Toplevel}
206
207 \section{Metavariables}
208 %typed metavar
209 %scoped metavar and rules
210
211 \section{Variables}
212
213 \section{Types}
214
215 \section{Expressions}
216
217 %funcall and ...
218
219 %cf also position trick
220
221 \section{Statements}
222
223 %declaration
224
225 %type definition
226 % struct iso
227
228
229
230 \section{Rules}
231
232
233 \section{Isomorphisms}
234
235 %named iso
236
237
238 %iso file
239 %extra file standard.h
240
241 %implicit iso
242
243
244 \section{cpp quircks}
245
246 %declarator
247 %declarer
248
249 %also extra file standard.h
250
251 %##############################################################################
252 \appendix
253
254
255
256 %index (reversed)
257 %index of concepts ? keywords ?