-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
365 lines (320 loc) · 16.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<!DOCTYPE html>
<html>
<head>
<title>Domain-Driven Model Inference Applied To Web Applications | William Durand</title>
<link rel="stylesheet" href="reveal.js/css/reveal.min.css">
<link rel="stylesheet" href="reveal.js/css/theme/simple.css" id="theme">
<link rel="stylesheet" href="reveal.js/lib/css/zenburn.css">
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="css/fix-fontawesome-reveal-js.css">
<link rel="stylesheet" href="css/custom.css">
<script>
document.write('<link rel="stylesheet" href="reveal.js/css/print/' +
(window.location.search.match(/print-pdf/gi) ? 'pdf' : 'paper') +
'.css" type="text/css" media="print">'
);
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1 class="title">Domain-Driven Model Inference Applied To Web Applications</h1>
<em class="subtitle">Sébastien Salva, <u>William Durand</u> — July 22, 2014 / SERP'14</em>
<p class="sponsors">
<img src="images/worldcomp.png" class="no-border" />
<img src="images/limos.png" class="no-border" />
<img src="images/blaisepascal.png" class="no-border" />
<img src="images/michelin.jpg" class="no-border" />
</p>
</section>
<section data-background="images/chaine-des-puys.jpg">
<img src="images/renaud-lavillenie.jpg" class="fragment lavillenie" />
<img src="images/michelin-hq.jpg" class="fragment michelin-hq" />
</section>
<section>
<section data-markdown>
<script type="text/template">
## Context
* 100+ applications running in production
* Not (fully) covered by tests
* Documentation may be outdated
* MUST be maintained!
</script>
</section>
<section data-markdown>
<script type="text/template">
The only way to **ensure stability** while fixing a
bug<br>is to **learn how the application behaves**.
</script>
</section>
<section data-markdown>
<script type="text/template">
A first classic solution is to express these
behaviours with formal models, e.g. **I**nput
**O**utput **S**ymbolic **T**ransition **S**ystems.
<p class="fragment">
<br>
But writing such models is an **heavy task** and **error prone**.
</p>
</script>
</section>
<section data-markdown>
<script type="text/template">
Hence the need for a **model inference approach**.
</script>
</section>
</section>
<section>
<section>
<h2>Model Inference</h2>
</section>
<section data-markdown>
<script type="text/template">
**Inference** is the act or **process of reaching a
conclusion**<br>about something from **known facts**
or evidence.
</script>
</section>
<section data-markdown>
<script type="text/template">
A (human) **domain expert** can deduce the meaning of
an application execution by reading its traces.
<p class="fragment">
<br>
<i class="fa fa-lightbulb"></i> What about doing the same, **programmatically**?
</p>
</script>
</section>
<section data-markdown>
<script type="text/template">
An **expert system** is a computer system
that<br>**emulates the decision-making ability of a
human expert**.
</script>
</section>
</section>
<section>
<section>
<h2>Model Inference Framework</h2>
<p>
<img src="images/framework.png" class="no-border" />
</p>
</section>
<section>
<h2>Model Generator Layers</h2>
<p>
<img src="images/se.png" class="no-border" />
</p>
</section>
<section data-markdown>
<script type="text/template">
## Rules
* a rule can only be applied a limited number of times on the same knowledge base
* the inference rules are Modus Ponens
* no implicit knowledge elimination
</script>
</section>
</section>
<section>
<section data-markdown>
<script type="text/template">
## Layer 1: Trace Filtering
1. Cleaning-up the trace set given as input, removing
**noise**, <br>a.k.a. **irrelevant** traces
2. Transforming "raw" traces into **structured traces**
<br>
<i class="fa fa-info-circle"></i> _HTTP requests
and responses related to assets<br>(CSS files,
JavaScript files, images) are meaningless._
</script>
</section>
<section data-markdown>
<script type="text/template">
## Structured HTTP Traces
<p class="left">
Let `t = req`<sub>`1`</sub>`, resp`<sub>`1`</sub>`, ..., req`<sub>`n`</sub>`, resp`<sub>`n`</sub>
be a raw HTTP trace composed of an alternate sequence of HTTP
request `req`<sub>`i`</sub> and HTTP response `resp`<sub>`i`</sub>.
The structured HTTP trace `σ` of `t` is the sequence
`(a`<sub>`1`</sub>`(p), θ`<sub>`1`</sub>`)...(a`<sub>`n`</sub>`(p), θ`<sub>`n`</sub>`)` where:
</p>
* `a`<sub>`i`</sub> is the HTTP verb used to perform the request in `req`<sub>`i`</sub>,
* `p` is the parameter set `{URI, request, response}`,
* `θ`<sub>`i`</sub> is a valuation `p → D`<sub>`p`</sub> which assigns a value to each
variables of `p`. `θ` is deduced from the values extracted from `req`<sub>`i`</sub> and `resp`<sub>`i`</sub>.
<p class="left">
The resulting trace set derived from raw traces is denoted `ST`.
</p>
</script>
</section>
<section data-markdown>
<script type="text/template">
## Example
<br>
GET("https://github.com/", req0, resp0)
GET("https://github.com/login", ...)
POST("https://github.com/session", ...)
GET("https://github.com/", ...)
GET("https://github.com/willdurand", ...)
GET("https://github.com/willdurand/Geocoder", ...)
POST("https://github.com/logout", ...)
GET("https://github.com/", ...)
</script>
</section>
</section>
<section>
<section data-markdown>
<script type="text/template">
## Layer 2: Transformation Of The Traces Into IOSTSs
1. Translating a structured trace set `ST` into a run set `SR`
2. Deriving a first IOSTS <code>δ1</code> from `SR`
<br>
Based on <code>δ1</code>, it should be
possible to generate a different model `M`, but we
must preserve the following relation:
`traces(M) = ST`
</script>
</section>
<section>
<h2>Example</h2>
<img src="images/gh-2-1.png" class="no-border"/>
</section>
</section>
<section>
<section data-markdown>
<script type="text/template">
## Layers 3-N: IOSTS Abstraction
Composed of rules that emulate the ability of a
human expert<br>to **simplify transitions**, to **analyze
transition syntax** in order<br>to deduce more
meaningful information related to the<br>targeted
application, and to **construct more abstract models**.
<br>
Each layer takes an **IOSTS given by the direct lower one**.
It represents the current **base of facts**.
</script>
</section>
<section data-markdown>
<script type="text/template">
## Layer 3
Layer 3 contains **low level**, **generic rules**
that<br>can be reused against different applications.
<br>
#### Example
rule "Identify Login Page"
when
$t: Transition(
Action == GET,
Guard.response.content contains('login-form')
)
then
modify ($t) { Assign.add("isLoginPage := true") }
end
</script>
</section>
<section data-markdown>
<script type="text/template">
## Layer 3 - Example
<img src="images/gh-2-2.png" class="no-border" />
</script>
</section>
<section data-markdown>
<script type="text/template">
## Layer 4
Layer 4 allows to infer a more abstract
model<br>composed of **more expressive actions**.
<br>
#### Example
rule "Identify Authentication"
when
$t1: Transition(Action == GET, Assign contains "isLoginPage:= true",
$t1final := Lfinal)
$t2: Transition(Action == PostRedirection, Linit == $t1lfinal,
$t2linit := Linit)
not Transition(Linit == $t2linit)
then
insert(new Transition("Authentication",
Guard($t1.Guard,$t2.Guard), Assign($t1.Assign, $t2.Assign),
$t1.Linit, $t2.Lfinal
))
retract($t1)
retract($t2)
end
</script>
</section>
<section data-markdown>
<script type="text/template">
## Layer 4 - Example
<img src="images/gh-2-3.png" class="no-border" />
</script>
</section>
<section data-markdown>
<script type="text/template">
## Need More?
<img src="images/gh-2-4.png" class="no-border" />
</script>
</section>
</section>
<section>
<section data-markdown>
<script type="text/template">
## Conclusion
</script>
</section>
<section data-markdown>
<script type="text/template">
## Cons
* Writing (and maintaining) rules is harder than expected
* Preserving `traces(M) = ST` is not easy
</script>
</section>
<section data-markdown>
<script type="text/template">
## Pros
* Original approach to derive IOSTS models
* It Works™
</script>
</section>
</section>
<section>
<section data-markdown>
<script type="text/template">
## Future Work
* Applying such a framework on industrial systems (WIP)
* Generating test cases for regression testing
* Finding a better way to write rules
</script>
</section>
</section>
<section data-markdown>
<script type="text/template">
## Thank You.
### Questions?
</script>
</section>
</div>
</div>
<script src="reveal.js/lib/js/head.min.js"></script>
<script src="reveal.js/js/reveal.min.js"></script>
<script>
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
slideNumber: true,
touch: true,
hideAddressBar: true,
theme: Reveal.getQueryHash().theme,
transition: Reveal.getQueryHash().transition || 'concave',
dependencies: [
{ src: 'reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
]
});
</script>
</body>
</html>