-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
405 lines (351 loc) · 17.8 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
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Inferring models with rule-based expert systems | 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>
if (window.location.search.match(/print-pdf/gi)) {
document.write('<link rel="stylesheet" href="css/pdf.css" type="text/css">');
}
</script>
<!--[if lt IE 9]>
<script src="reveal.js/lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1 class="title">Inferring Models With<br>Rule-Based Expert Systems</h1>
<em class="subtitle"><u>William Durand</u>, Sébastien Salva — December 5, 2014 / SoICT'14</em>
<p class="sponsors">
<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"></section>
<section>
<section data-markdown>
<script type="text/template">
## Background @ Michelin
</script>
</section>
<section data-markdown>
<script type="text/template">
* 100+ applications running in **production**
* Not (fully) covered by tests
* Documentation most likely outdated
* MUST be maintained for ~20 years!
</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 to express these
behaviours is to **model** them, e.g. with **I**nput
**O**utput **S**ymbolic **T**ransition **S**ystems.
<br>
<p class="fragment">But writing such models is an **heavy task** and **error prone**.</p>
<br>
<p class="fragment">
<em><i class="fa fa-arrow-right"></i>Not suitable for Michelin applications.</em>
</p>
</script>
</section>
<section data-markdown>
<script type="text/template">
Hence the need for a **model inference approach**.
<br>
<p class="fragment">
<em><i class="fa fa-arrow-right"></i> If models don't exist (or are too<br>complicated to write), let's build them!</em>
</p>
</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-o"></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">
## Hypotheses On The Rules
<br>
* A rule can only be applied a limited number of times on the same knowledge base
* The inference rules are Modus Ponens (soundness)
* Facts are Horn clauses
<br>
Modus Ponens + Horn clauses <i class="fa fa-long-arrow-right"></i> completeness
</script>
</section>
</section>
<section data-markdown>
<script type="text/template">
## Proof Of Concept
Working with Web Applications
</script>
</section>
<section>
<section data-markdown>
<script type="text/template">
## Layer 1: Trace Filtering
<br>
1. Cleaning-up the trace set given as input, removing **noise**
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
<br>
<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: IOSTS Transformation
<br>
1. Translating a structured trace set `ST` into a run set `SR`
2. Deriving a first IOSTS tree <code>δ1</code> from `SR`
<br>
<br>
<i class="fa fa-exclamation-triangle"></i> The model is **not** extrapolated:
`traces(δ1) = ST`
</script>
</section>
<section>
<h2>Example</h2>
<p>
<img src="images/gh-2-1.png" class="no-border"/>
</p>
</section>
</section>
<section>
<section data-markdown>
<script type="text/template">
## Layers 3-N: IOSTS Abstraction
<br>
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**.
<br>It represents the current **base of facts**.
</script>
</section>
<section data-markdown>
<script type="text/template">
## Layer 3
<br>
Layer 3 contains **low level**, **generic rules**
that<br>can be reused against different applications.
<br>
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
<p>
<img src="images/gh-2-2.png" class="no-border" />
</p>
</script>
</section>
<section data-markdown>
<script type="text/template">
## Layer 4
<br>
Layer 4 allows to infer a more abstract
model<br>composed of **more expressive actions**.
<br>
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
<p>
<img src="images/gh-2-3.png" class="no-border" />
</p>
</script>
</section>
<section data-markdown>
<script type="text/template">
## Need More?
<p>
<img src="images/gh-2-4.png" class="no-border" />
</p>
</script>
</section>
</section>
<section>
<section data-markdown>
<script type="text/template">
## Conclusion
</script>
</section>
<section data-markdown>
<script type="text/template">
## Cons
<br>
* Writing (and maintaining) rules is harder than expected
* Preserving `traces(M) = ST` leads to rather large models
</script>
</section>
<section data-markdown>
<script type="text/template">
## Pros
<br>
* Original approach to derive IOSTS models
* It Works™
</script>
</section>
</section>
<section>
<section data-markdown>
<script type="text/template">
## Current Status
<br>
Working on an implementation for Michelin's industrial systems.
</script>
</section>
</section>
<section data-markdown>
<script type="text/template">
## Future Work
<br>
Generating test cases for regression testing.
</script>
</section>
<section data-markdown data-background="images/bib-in-hanoi.jpg" class="thanks">
<script type="text/template">
## Thank You.
### Questions?
</script>
</section>
</div>
</div>
<script type="text/javascript" src="reveal.js/lib/js/head.min.js"></script>
<script type="text/javascript" src="reveal.js/js/reveal.min.js"></script>
<script type="text/javascript">
Reveal.initialize({
slideNumber: !window.location.search.match(/print-pdf/gi),
history: 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: 'js/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
]
});
</script>
</body>
</html>