Repository Public MIT Research preview
1% S19-F02 — Anatomie d'une trace : un essai échoué, lu ligne par ligne.2% DONNÉES : S19-F02-donnees.tex, généré par demos/src/atlas_s19/exporter_donnees_figures.py.3% Idée : chaque étape consigne la décision, l'appel, l'observation, le coût et l'horloge. Le texte4% final paraît juste ; c'est l'argument de l'étape 2 qui révèle l'erreur. Le banc ne lit que cela :5% la trace et le cas, et il en tire six propriétés puis une classe d'erreur.6\input{S19-F02-donnees.tex}%7\begin{tikzpicture}[x=1mm, y=1mm]8 \foreach \n/\t/\mots/\ms/\decision/\appel/\observation in \AtlasDixNeufTraceEtapes {9 \pgfmathsetmacro{\x}{ifthenelse(\n==1, 0, ifthenelse(\n==2, 55, 99.6))}10 \pgfmathsetmacro{\l}{ifthenelse(\n==1, 52, 42)}11 \draw[atlas region, fill=atlasPanel, fill opacity=.35] (\x,10.4) rectangle ++(\l,37.2);12 \node[atlas tag=atlasFlow, anchor=west] at (\x+2.4,47.6) {ÉTAPE \n};13 \node[atlas note, anchor=west] at (\x+1.6,44.2) {\mots\ mots lus · \ms\ ms · t = \t~s};14 \node[atlas note, anchor=west] at (\x+1.6,41.4) {décision};15 \node[atlas label, anchor=west] at (\x+1.6,38.4) {\decision};16 \node[atlas note, anchor=west] at (\x+1.6,35) {appel d'outil};17 \node[atlas label, anchor=north west, align=left, text width=\l mm-4mm, font=\ttfamily\AtlasSizeTiny] at (\x+1.6,33.4) {\appel};18 \node[atlas note, anchor=west] at (\x+1.6,24.8) {observation};19 \node[atlas label, anchor=north west, align=left, text width=\l mm-4mm, font=\AtlasSizeTiny] at (\x+1.6,23.6) {\observation};20 }21 \draw[atlas arrow] (52,31) -- (55,31);22 \draw[atlas arrow] (97,31) -- (99.6,31);23 % L'erreur est dans l'argument de l'étape 224 \draw[draw=atlasHazard, line width=1.1pt, rounded corners=1.6pt] (56,26.4) rectangle (96,32.9);25 \node[atlas tag=atlasHazard, anchor=east] at (95.6,13.6) {attendu par le cas : \AtlasDixNeufTraceAttendu};26 \draw[draw=atlasHazard, line width=.9pt] (93,15.6) -- (93,26.4);27 % ---------- Ce que le banc en tire ----------28 \node[atlas note, anchor=west, text width=30mm] at (0,4.3) {Le banc lit la trace et le cas \AtlasDixNeufTraceCas\ : six propriétés.};29 \foreach \nom/\vraie [count=\i from 0] in \AtlasDixNeufTraceProprietes {30 \pgfmathsetmacro{\x}{34 + mod(\i,3)*29}31 \pgfmathsetmacro{\y}{6.8 - int(\i/3)*5}32 \ifnum\vraie=133 \pic[atlasValid, scale=.3] at (\x,\y) {atlas check};34 \node[atlas label, anchor=west] at (\x+2,\y) {\nom};35 \else36 \pic[atlasHazard, scale=.3] at (\x,\y) {atlas cross};37 \node[atlas label, anchor=west, font=\AtlasSizeLabel\bfseries] at (\x+2,\y) {\nom};38 \fi39 }40 \draw[atlas arrow hazard] (109,4.3) -- (114.6,4.3);41 \node[atlas block hazard, text width=22mm, minimum height=8mm] at (128.2,4.7) {\textbf{Échec}\\ \AtlasDixNeufTraceClasse};42\end{tikzpicture}43