snakes.tex 10.9 KB
\documentclass{beamer}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[orientation=portrait,size=a4,scale=2]{beamerposter}
\usepackage[absolute,overlay]{textpos}
\usepackage{url}

\usepackage{tikz}
\usetikzlibrary{shapes.callouts}

\tikzstyle{box}[yellow]=[draw=#1!70!black,fill=#1!50,very thick,
  rounded corners,fill opacity=.25,draw opacity=.5,minimum height=2,outer sep=10pt]
\tikzstyle{call}[yellow]=[box=#1,fill opacity=.04,draw opacity=.25,
  rectangle callout]
\tikzstyle{dots}[yellow]=[color=#1!70!black,opacity=.25]
\tikzstyle{layer}[yellow]=[above,rotate=90,#1!70!black,opacity=.75]
\tikzstyle{label}=[below right=1mm,anchor=base west]
%\tikzstyle{title}[yellow]=[box=#1,text opacity=1,text width=#2]

\tikzset{title/.style n args=2{box=#1,minimum width=#2,
    text opacity=1,
    inner sep=2mm,
    minimum height=1.5\baselineskip,
    anchor=base}}

\def\title #1#2{\leavevmode
  \hskip -2mm
  \tikz\node[title={gray}{#1}]{#2};}

\parindent=0pt
\setbeamertemplate{navigation symbols}{}

\setlength{\TPHorizModule}{1cm}
\setlength{\TPVertModule}{1cm}

\def\minor #1{{\small\color{gray}#1}}
\def\remark #1{\minor{(#1)}}

\def\>{\par$\color{gray}\triangleright$ \ignorespaces}
\def\+{$\phantom{\triangleright}$ \ignorespaces}

\newenvironment{code}{\begin{small}\ttfamily}{\end{small}}
\def\PYk #1{\texttt{\color{red!50!black}#1}}
\def\PYn #1{\texttt{\color{green!50!black}#1}}
\def\PYc #1{\texttt{\color{blue!50!black!50!white}#1}}

\begin{document}

\begin{frame}[t]{}

  %%
  %% drawing grid
  %%

  %% \begin{textblock}{21}(0,0)
  %%   \begin{tikzpicture}[yellow!70,yscale=-1]
  %%     \draw[densely dotted] (0,0) grid (21,30);
  %%     \foreach \x in {1,...,20} {
  %%       \node at (\x,.5) {\x};
  %%       }
  %%     \foreach \x in {1,...,20} {
  %%       \node at (\x,29.5) {\x};
  %%       }
  %%     \foreach \y in {1,...,29} {
  %%       \node at (.5,\y) {\y};
  %%       }
  %%     \foreach \y in {1,...,29} {
  %%       \node at (20.5,\y) {\y};
  %%       }
  %%   \end{tikzpicture}
  %% \end{textblock}

  %%
  %% title & logos
  %%

  \begin{textblock}{4}(1,1)
    \includegraphics[height=38mm]{../pix/logo-snakes}
  \end{textblock}

  \begin{textblock}{10}(5,1)
    {\color[HTML]{1A3B5D}\LARGE\bfseries a high-level Petri nets library}\\[8pt]
    {\large Franck Pommereau}\\[16pt]
    \href{https://www.ibisc.univ-evry.fr/}{IBISC}/%
    \href{https://www.ibisc.univ-evry.fr/equipe/cosmo/}{COSMO},
    \href{https://www.univ-evry.fr/}{university of Évry}/%
    \href{https://www.universite-paris-saclay.fr}{Paris-Saclay}\\[8pt]
    \href{mailto:franck.pommereau@ibisc.univ-evry.fr}%
         {franck.pommereau@ibisc.univ-evry.fr}\\
    \href{https://snakes.ibisc.univ-evry.fr}%
         {snakes.ibisc.univ-evry.fr}
  \end{textblock}

  \begin{textblock}{6}(14,1)
    \begin{tikzpicture}[yscale=.9]
      \node at (-2,0) {\href{https://www.ibisc.univ-evry.fr/}%
        {\includegraphics[width=35mm, height=35mm,
          keepaspectratio=true]{../pix/logo-ibisc}}};
      \node at (1,1) {\href{https://www.univ-evry.fr/}%
        {\includegraphics[width=20mm, height=20mm,
          keepaspectratio=true]{../pix/logo-ueve}}};
      \node at (1,-1) {\href{https://genopole.fr/}%
        {\includegraphics[width=20mm, height=20mm,
          keepaspectratio=true]{../pix/logo-genopole}}};
    \end{tikzpicture}
  \end{textblock}

  %%
  %% facts
  %%

  \begin{textblock}{8}(9,5.5)
    \> pure Python library \remark{works out of the box}
    \> free software \remark{\href{https://www.gnu.org/licenses/lgpl.html}{GNU LGPL}}
    \> 81.5k lines of code
    \> maintained for 12\texttt{+} years
    \> \href{https://snakes.ibisc.univ-evry.fr/API/}{online doc}
       $\Rightarrow$ 300\texttt{+} unique visits / month
    \> 150\texttt{+} installs from PyPI / month
  \end{textblock}

  %%
  %% architecture
  %%

  \begin{textblock}{11}(9,9)
    \begin{tikzpicture}[yscale=-1,xscale=1.1]
      % core library
      \draw[box] (.1,.1) rectangle (5.9,1.9);
      \draw[box=orange] (6.1,.1) rectangle (7.9,1.9);
      \node[dots=orange] at (8.5,1) {$\bullet\bullet\bullet$};
      \node[layer=orange] at (0,1) {core library\strut};
      \node[label] at (0,.5) {nets};
      \node[label,text width=8cm,scale=.6] at (.1,1) {\itshape{%
          Petri nets, places, transitions, arcs,\\
          markings, marking graphs, \dots}};
      \node[label] at (6,.5) {simul};
      \node[label,text width=20mm,scale=.6] at (6.1,1) {\itshape{%
          interactive simulation}};
      % plugins
      \draw[box=green] (.1,2.1) rectangle (1.9,3.9);
      \draw[box=green] (2.1,2.1) rectangle (3.9,3.9);
      \draw[box=green] (4.1,2.1) rectangle (5.9,3.9);
      \draw[box=green] (6.1,2.1) rectangle (7.9,3.9);
      \node[dots=green] at (8.5,3) {$\bullet\bullet\bullet$};
      \node[layer=green] at (0,3) {plugins\strut};
      \node[label] at (0,2.5) {ops};
      \node[label,text width=24mm,scale=.6] at (.1,3) {\itshape{%
          PBC\slash PNA \& M-nets\\ compositions}};
      \node[label] at (2,2.5) {sync};
      \node[label,text width=26mm,scale=.6] at (2.1,3) {\itshape{%
          transitions\\ synchronisation}};
      \node[label] at (4,2.5) {gv};
      \node[label,text width=26mm,scale=.6] at (4.1,3) {\itshape{%
          drawing with GraphViz}};
      \node[label] at (6,2.5) {pids};
      \node[label,text width=26mm,scale=.6] at (6.1,3) {\itshape{%
          dynamic\\ process spawn\slash kill}};
      % utilities
      \draw[box=blue] (.1,4.1) rectangle (3.9,5.9);
      \node[dots=blue] at (4.5,5) {$\bullet\bullet\bullet$};
      \node[layer=blue] at (0,5) {utilities\strut};
      \node[label] at (0,4.5) {abcd};
      \node[label,text width=66mm,scale=.6] at (.1,5) {\itshape{%
          compiler\slash simulator for the\\ Asynchronous Box Calculus\\
          with Data}};
      % sep
      \draw[densely dotted,gray,thick](-.9,6) -- (9,6);
      \node[above left,gray,scale=.7] at (9,6) {included in SNAKES};
      \node[below left,gray,scale=.7] at (9,6) {not in SNAKES anymore};
      % external tools
      \draw[box=red] (.1,6.1) rectangle (3.9,7.9);
      \node[dots=red] at (4.5,7) {$\bullet\bullet\bullet$};
      \node[layer=red,text width=2cm,text centered] at (0,7) {external\\[-1mm] tools};
      \node[label] at (0,6.5) {neco};
      \node[label,text width=66mm,scale=.6] at (.1,7) {\itshape{%
          net compiler,\\ state-space computation\\ \& LTL model-checking}};
      \node[opacity=.6] at (3,6.5) {\href{https://github.com/Lvyn/neco-net-compiler}%
        {\includegraphics[height=5mm]{../pix/neco}}};
    \end{tikzpicture}
  \end{textblock}

  \begin{textblock}{3}(17.4,13.4)
    \href{https://www.python.org/}%
         {\includegraphics[width=25mm]{../pix/python-powered}}
  \end{textblock}

  %%
  %% core
  %%

  \begin{textblock}{8}(.8,6.2)
    \tikz[yscale=-1]\node[call,
      callout relative pointer={(1.1,-.4)},
      minimum width=74mm,minimum height=40mm]{};
  \end{textblock}

  \begin{textblock}{7}(1,6.4)
    \> define and handle Petri nets
    \> very general definition
    \> numerous extensions\\
    \+ \minor{read/inhibitor/whole-place arcs, \dots}
    \> annotations = Python expressions
    \> tokens = Python objects
    \> nets can be executed \remark{fire transitions}
  \end{textblock}

  \begin{textblock}{3}(17.8,7.9)
    \tikz[yscale=-1]\node[call=orange,
      callout relative pointer={(-.2,-.5)},
      minimum width=21mm,minimum height=7mm]{};
  \end{textblock}

  \begin{textblock}{3}(18,8.1)
    \> utilities
  \end{textblock}

  %%
  %% plugins
  %%

  \begin{textblock}{8}(.8,10.8)
    \tikz[yscale=-1]\node[call=green,
      callout relative pointer={(1.1,.05)},
      minimum width=74mm,minimum height=28mm]{};
  \end{textblock}

  \begin{textblock}{8}(1,11)
    \> extensible with plugins
    \> several plugins provided
    \> easy to add new ones\\
    \+ \minor{time Petri nets $\leq$ 100 LoC}\\[-2pt]
    \+ \minor{nets-within-nets $\leq$ 30 LoC}
  \end{textblock}

  %%
  %% abcd
  %%

  \begin{textblock}{8}(.8,14.3)
    \tikz[yscale=-1]\node[call=blue,
      callout relative pointer={(1.1,.3)},
      minimum width=74mm,minimum height=28mm]{};
  \end{textblock}

  \begin{textblock}{8}(1,14.5)
    \> user-friendly modelling language
    \> algebra of coloured Petri nets
    \> Python-inspired syntax
    \> seamless integration of Python
    \> web-based interactive simulator

    \vspace*{4mm}
    \includegraphics[width=9cm]{../pix/abcd-websim}
  \end{textblock}

  \begin{textblock}{4}(7.1,16.77)
    \tikz\draw[draw=blue!70!black!25!white,line width=3pt,->,cap=round] (0,0)
    .. controls (.5,0) and (.5,-.5) .. (.25,-.8);
  \end{textblock}

  %%
  %% neco
  %%

  \begin{textblock}{8}(10.8,17.1)
    \tikz[yscale=-1]\node[call=red,
      callout relative pointer={(-.3,.6)},
      minimum width=94mm,minimum height=48mm]{};
  \end{textblock}

  \begin{textblock}{9}(11,17.9)
    \> {\L}ukasz Fronc's companion tool\\
    \+ \minor{\href{https://github.com/Lvyn/neco-net-compiler}%
             {github.com/Lvyn/neco-net-compiler}}
    \> compiles nets into fast native code\\
    \+ \minor{per-net optimised marking structure}\\[-2pt]
    \+ \minor{per-transition optimised firing}\\[-2pt]
    \+ \minor{cannot optimise arbitrary Python code}
    \> process-symmetries reductions \remark{plugin pids}
    \> state space \& LTL model-checking
      \remark{using \href{https://spot.lrde.epita.fr/}{SPOT}}
    \> awarded at the \href{https://mcc.lip6.fr/}{model-checking contest 2013}
  \end{textblock}

  %%
  %% SNAKES out of Python
  %%

  \begin{textblock}{9}(1,23.5)
    \title{85mm}{SNAKES out of Python\strut}

    \vspace*{2mm}

    \> write a binding in Cython

    \begin{code}
      \PYc{~~\# this is Cython code = Python + C types}\\
      \PYk{~~cdef} \PYk{public} \PYk{int} \PYn{foo} (...):\\
      \PYc{~~~~~~\# Python code using SNAKES goes here}
    \end{code}

    \> Cython compiles to C/C\texttt{++} with a \texttt{.h} file:

    \begin{code}
      \PYc{~~// this is C/C++ code}\\
      \PYk{~~extern} \PYk{int} \PYn{foo}(...);\\
    \end{code}

    \> use this API in your project
  \end{textblock}

  %%
  %% SNAKES' future
  %%

  \begin{textblock}{12}(10.5,23.5)
    \title{100mm}{SNAKES' future\strut}

    \vspace*{2mm}

    \> development name: ZINC
    \> Python 3 only \remark{drop Python 2 support}
    \> net compilation at its heart \minor{\textit{à la} Neco}
    \> ``any language''-coloured Petri nets\\
    \+ \minor{currently: Python, Go, CoffeeScript/JS}
    \> even more general Petri nets definition
    \> cleaner, lighter, more modern
  \end{textblock}

  \begin{textblock}{2}(17.7,24.9)
    \includegraphics[width=23mm]{../pix/zinc-logo}
  \end{textblock}

  %%
  %% copyright
  %%

  \begin{textblock}{19}(1,28.8)
    \centering\tiny\color{gray}%
    \copyright~2018 Franck Pommereau
    (\href{mailto:franck.pommerau@univ-evry.fr}%
          {\texttt{franck.pommerau@univ-evry.fr}})
    \href{https://creativecommons.org/licenses/by-sa/4.0/}%
         {CC BY-SA
          \raisebox{-.5ex}{\includegraphics[height=\baselineskip]{../pix/by-sa}}}

  \end{textblock}

\end{frame}
\end{document}