snakes.tex
9.36 KB
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
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[orientation=portrait,size=a0,scale=2]{beamerposter}
\usepackage{textpos}
\usepackage{picins}
\usepackage{url}
\usepackage{fancyvrb}
\usepackage{relsize}
\usepackage{tikz}
\usetikzlibrary{shapes.callouts}
\parindent=0pt
\setbeamertemplate{navigation symbols}{}
\def\smallskip{\vspace{5mm}}
\def\medskip{\vspace{10mm}}
\def\bigskip{\vspace{20mm}}
\colorlet{title}{black!10}
\colorlet{minor}{black!65}
\colorlet{snakes}{green!30!black}
\colorlet{python}{blue!30!black}
\definecolor{popup}{rgb}{.6,1,.5}
\def\*{\raise-.65ex\hbox{$\smash{
\includegraphics[height=1em]{snake-shadow.pdf}}$}}
\def\section#1{\noindent\colorbox{title}{%
\hbox to \textwidth{\bfseries #1\hfill\strut\*}}\smallskip}
\def\endparitem{\endgraf\egroup}
\def\>{\par\bgroup
\let\par=\endparitem
\leftskip=1.4em\parindent=-1.4em
\indent\hbox to 1.4em{\hss
$\smash{\includegraphics[width=1em]{cartoon-python.pdf}}$
}\ignorespaces}
\def\+{\par\bgroup
\let\par=\endparitem
\leftskip=2.8em\parindent=-1.4em
\indent\hbox to 1.4em{\hss
$\color{snakes}\smash{\bullet}$
}\ignorespaces}
\def\PYk #1{{\color{snakes}#1}}
\def\PYn #1{{\color{python}#1}}
\def\PYc #1{{\color{minor}#1}}
\begin{document}
\begin{frame}[fragile]{}
%%
%% title & logos
%%
\begin{textblock}{14.4}(.5,.5)
\parpic{\includegraphics[height=13cm]{logo-snakes}\quad}
{\Large\bfseries a high-level Petri nets library}\\[15pt]
{\large Franck Pommereau}\\[30pt]
\small
IBISC/COSMO, university of vry/Paris-Saclay\\
23 boulevard de France, 91037 vry Cedex France\\[20pt]
\url{franck.pommereau@ibisc.univ-evry.fr}\\
\url{http://www.ibisc.univ-evry.fr/~fpommereau/SNAKES/}
\end{textblock}
\begin{textblock}{14.4}(.7,.5)
\null\hfill
\begin{tikzpicture}[xscale=4,yscale=4]
\node at (-2,0) {\includegraphics[width=150mm, height=150mm,
keepaspectratio=true]{logo-ibisc}};
\node at (1,1) {\includegraphics[width=58mm, height=58mm,
keepaspectratio=true]{logo-ueve}};
\node at (1,-1) {\includegraphics[width=65mm, height=65mm,
keepaspectratio=true]{logo-genopole}};
\end{tikzpicture}
\end{textblock}
%%
%% left column
%%
\begin{textblock}{9}(.5,2.85)
\section{SNAKES in a nutshell}
\tikzstyle{popup}=[draw,rectangle callout,rounded corners=15,
text width=10cm,align=center,callout pointer width=7mm,
callout absolute pointer={(70:.5)},fill=popup]
\begin{center}
\begin{tikzpicture}[scale=12]
\node at (0,0) {\scalebox{-1}[1]{%
\includegraphics[scale=3]{oroborus.pdf}}};
\node[popup,callout relative pointer={(-70:2)}] at (90:1)
{SNAKES is a Python library};
\node[popup,callout relative pointer={(-150:2)}] at (40:1.4)
{Define and manipulate Petri nets};
\node[popup,callout relative pointer={(170:3)}] at (10:1.3)
{Very generic Petri net definition};
\node[popup,callout relative pointer={(150:4)}] at (-25:1.3)
{Annotations are Python expressions};
\node[popup,callout relative pointer={(80:4)}] at (-90:1)
{Tokens are Python objects};
\node[popup,cloud callout,cloud puffs=15,aspect=2.5,inner sep=-20pt,
cloud puff arc=120,callout relative pointer={(170:3)},
fill=blue!20,rounded corners=0] at (-45:1.7)
{\small Even SNAKES'\\[-20pt] net objects};
\node[popup,callout relative pointer={(50:4.5)}] at (-150:1.2)
{Fully reflexive for maximal flexibility};
\node[popup,cloud callout,cloud puffs=12,aspect=2.6,inner sep=-50pt,
cloud puff arc=140,callout relative pointer={(50:2)},
fill=blue!20,rounded corners=0] at (-130:1.5)
{\small Inspired\\[-20pt] by Emacs};
\node[popup,callout relative pointer={(10:3)}] at (170:1.2)
{Extensible with plugins};
\node at (0,0) {\includegraphics[scale=.5]{python-powered.pdf}};
\end{tikzpicture}
\end{center}
%%
%%
%%
\medskip
\section{Plugins}
\> {\color{snakes}\texttt{gv}}: draw Petri nets using GraphViz
\> {\color{snakes}\texttt{ops}}: algebras of Petri nets compositions
{\small\color{minor}(PBC, PNA, M-nets, \dots)}
\> {\color{snakes}\texttt{pids}}: dynamic processes creation and
destruction
\> {\color{snakes}\texttt{labels}}: arbitrary objects annotations
\> {\color{snakes}\texttt{let}}: variables assignation during computation
\> \dots {\color{minor}(your plugin here: try, it's easy)}
%%
%%
%%
\bigskip
\section{ABCD for friendly modelling}
\> process algebra with friendly Python-like syntax
\> embeds full Python
\> compiler shipped with SNAKES library
\> generates Petri nets objects
\> export to pictures or PNML files
\> simulation and reachability analysis
\vbox to 0pt{\vss\null\hfill
\includegraphics[width=18cm]{abcd-simul}
\vspace*{.2\baselineskip}}
\vspace*{-\baselineskip}
%%
%%
%%
\bigskip
\section{Neco for fast analysis}
\> \L ukasz Fronc's companion tool {\small\color{minor}(available
separately at \url{https://code.google.com/p/neco-net-compiler/})}
\> Neco compiles SNAKES Petri nets into fast native code
\+ optimised marking structure
\+ per-transition optimised firing
\> reads PNML, ABCD, or net objects
\> process-symmetries reductions
\> state space exploration and LTL model-checking
{\small\color{minor}(using SPOT)}
\> awarded at the \emph{model-checking contest\/} 2013
{\small\color{minor}(PETRI NETS conf.)}
\vbox to 0pt{\vss\null\hfill
\begin{tikzpicture}
\node[inner sep=0pt] (neco) {\includegraphics[width=18cm]{neco.pdf}};
\node[below=-6pt] at (neco.south) {\scalebox{2.1}[1]{net
compiler\hskip 9pt\null}};
\end{tikzpicture}\hspace*{-12mm}
\vspace*{2.8\baselineskip}}
%%
%%
%%
\end{textblock}
%%
%% right column
%%
\def\section#1{\noindent{\bfseries #1}\smallskip}
\begin{textblock}{5}(10,2.85)
\begin{tikzpicture}
\path[fill=title] (0,0) rectangle (40,100);
\end{tikzpicture}
\end{textblock}
\begin{textblock}{5}(10.2,3)
%%
%%
%%
\section{About SNAKES}
\> free \& open source {\small (GNU LGPL)}
\> works out of the box
\> 81.5k lines of portable Python
\> maintained for 10\texttt{+} years
\> one permanent developer/user
\> online documentation has\qquad 300\texttt{+} visitors per month
%%
%%
%%
\bigskip
\section{SNAKES vs GitHub's top 10 Python projects$^*$
{\color{minor}\small(on Nov. 2013)}}
\vskip -1ex
\begin{tikzpicture}[xscale=3.4,yscale=-2.5]
\tikzstyle{project}=[left,anchor=base east,inner sep=0pt]
\tikzstyle{bar}=[draw=blue!50!black,fill=blue!50!white,
anchor=base west,inner sep=0pt,name=bar]
\tikzstyle{price}=[right,anchor=base west]
\node[project] at (0,1) {\small django\;};
\node[bar,text width=530] at (0,1) {\small\strut};
\node[price,anchor=base east] at (bar.base east)
{\raise -.1ex\hbox{\small\$5.3M (432)}};
\node[project] at (0,2) {\small\color{snakes}snakes\;};
\node[bar,text width=270] at (0,2) {\small\strut};
\begin{scope}[color=snakes]
\draw[clip] (bar.north west) rectangle (bar.south east)
node at (bar.center) {\includegraphics[scale=.2]{python-skin}};
\end{scope}
\node[price] at (bar.base east) {\small\$2.7M (2)};
\node[project] at (0,3) {\small sick-beard\;};
\node[bar,text width=260] at (0,3) {\small\strut};
\node[price] at (bar.base east) {\small\$2.6M (110)};
\node[project] at (0,4) {\small ipython\;};
\node[bar,text width=230] at (0,4) {\small\strut};
\node[price] at (bar.base east) {\small\$2.3M (236)};
\node[project] at (0,5) {\small boto\;};
\node[bar,text width=210] at (0,5) {\small\strut};
\node[price] at (bar.base east) {\small\$2.1M (314)};
\node[project] at (0,6) {\small reddit\;};
\node[bar,text width=150] at (0,6) {\small\strut};
\node[price] at (bar.base east) {\small\$1.5M (87)};
\node[project] at (0,7) {\small sentry\;};
\node[bar,text width=130] at (0,7) {\small\strut};
\node[price] at (bar.base east) {\small\$1.3M (166)};
\node[project] at (0,8) {\small tornado\;};
\node[bar,text width=60] at (0,8) {\small\strut};
\node[price] at (bar.base east) {\small\$0.6M (120)};
\node[project] at (0,9) {\small requests\;};
\node[bar,text width=30] at (0,9) {\small\strut};
\node[price] at (bar.base east) {\small\$0.3M (275)};
\node[project] at (0,10) {\small flask\;};
\node[bar,text width=20] at (0,10) {\small\strut};
\node[price] at (bar.base east) {\small\$0.2M (159)};
\node[project] at (0,11) {\small httpie\;};
\node[bar,text width=10] at (0,11) {\small\strut};
\node[price] at (bar.base east) {\small\$0.1M (22)};
\end{tikzpicture}
estimated cost to develop {\color{minor}\small(generated using David A.
Wheeler's ``SLOCCount'')} and number of contributors
\hbox to \textwidth{\null\hfill\color{minor}\small $^*$ 10 most forked
or followed Python projects}
%%
%%
%%
\bigskip
\section{Using SNAKES out of Python}
\> write a binding in Cython
\begin{Verbatim}[commandchars=\\\{\},fontsize=\small,xleftmargin=1.4em,
numbers=left,numbersep=30pt]
\PYc{# this is Cython code}
\PYk{cdef} \PYk{public} \PYk{int} \PYn{foo} (...):
\PYc{# Python with SNAKES here}
\end{Verbatim}
\> Cython compiles to C/C\texttt{++} \qquad with a \texttt{.h} file:
\begin{Verbatim}[commandchars=\\\{\},fontsize=\small,xleftmargin=1.4em,
numbers=left,numbersep=30pt]
\PYc{// this is C/C++ code}
\PYk{extern} \PYk{int} \PYn{foo}(...);
\end{Verbatim}
\> use this API in your project
%%
%%
%%
\bigskip
\section{Isn't Python slow?}
\> {\color{snakes}no} for handling nets {\small\color{minor}even large
ones}
\> {\color{red!30!black}yes} for firing transitions
\> \raise -.1ex\hbox{\includegraphics[height=.9em]{neco.pdf}} is fast
at that! {;-)}
%%
%%
%%
\end{textblock}
%%
%% flush top
%%
\vspace*{150cm}
\end{frame}
\end{document}