plot-results.ipynb 176 KB
Newer Older
Jaime Arias's avatar
Jaime Arias committed
1
2
3
4
{
 "cells": [
  {
   "cell_type": "code",
5
   "execution_count": 1,
Jaime Arias's avatar
Jaime Arias committed
6
7
8
9
10
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import pandas as pd\n",
Jaime Arias's avatar
Jaime Arias committed
11
    "import numpy as np\n",
Jaime Arias's avatar
Jaime Arias committed
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
    "import plotly.io as pio\n",
    "import plotly.express as px\n",
    "import plotly.graph_objs as go\n",
    "from itertools import combinations \n",
    "from plotly.subplots import make_subplots\n",
    "\n",
    "# render figures in notebook\n",
    "pio.renderers.default = \"notebook_connected\"\n",
    "\n",
    "# templates figures\n",
    "px.defaults.template = \"simple_white\"\n",
    "pio.templates.default = \"simple_white\"\n",
    "\n",
    "# layout for all figures\n",
    "LAYOUT_FIGURES = dict(\n",
    "    autosize=False,\n",
    "    width = 500,\n",
    "    height = 500,\n",
    "    xaxis = dict(\n",
    "      constrain=\"domain\",\n",
    "      mirror=True,\n",
    "      showexponent=\"all\",\n",
    "      exponentformat=\"power\"\n",
    "    ),\n",
    "    yaxis = dict(\n",
    "      scaleanchor = \"x\",\n",
    "      scaleratio = 1,\n",
    "      mirror=True,\n",
    "      showexponent=\"all\",\n",
    "      exponentformat=\"power\"\n",
    "    ),\n",
    "    title = dict(\n",
    "      y = 0.9,\n",
    "      x = 0.5,\n",
    "      xanchor = 'center',\n",
    "      yanchor = 'top'\n",
    "    )\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Auxiliary Functions"
   ]
  },
  {
   "cell_type": "code",
61
   "execution_count": 2,
Jaime Arias's avatar
Jaime Arias committed
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
   "metadata": {},
   "outputs": [],
   "source": [
    "def create_folder(path):\n",
    "    \"\"\"Creates a folder if it does not exist\n",
    "    \n",
    "    Parameters\n",
    "    ----------\n",
    "    path : str\n",
    "        Path of the new folder\n",
    "    \n",
    "    Examples\n",
    "    --------\n",
    "    \n",
    "    >>> create_folder('./results')\n",
    "    \"\"\"\n",
    "    if not os.path.exists(path):\n",
    "        os.makedirs(path)"
   ]
  },
  {
   "cell_type": "code",
84
   "execution_count": 3,
Jaime Arias's avatar
Jaime Arias committed
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
   "metadata": {},
   "outputs": [],
   "source": [
    "def create_figure(df, model):\n",
    "    \"\"\"Creates a scatter figure showing the time taken by each tool to verify each property of a model\n",
    "    \n",
    "    Parameters\n",
    "    ----------\n",
    "    df : pandas.Dataframe\n",
    "        Dataframe containing the results of the experiments\n",
    "    model : string\n",
    "        model to be plotted\n",
    "    \n",
    "    Returns\n",
    "    -------\n",
    "    plotly.graph_objects.Figure\n",
    "        Scatter figure\n",
    "    \n",
    "    Examples\n",
    "    --------\n",
    "    \n",
    "    >>> import os\n",
    "    >>> import pandas as pd\n",
    "    >>> csv_file = os.path.join(\"results\", \"output.csv\")\n",
    "    >>> df = pd.read_csv(csv_file)\n",
    "    >>> fig = create_figure(df, 'philo10')\n",
    "    \"\"\"\n",
    "    model_df = df[df.model == model]\n",
    "\n",
    "    figure = px.scatter(model_df, \n",
    "                        x=\"formula\", y=\"time\",\n",
    "                        title=model, \n",
    "                        color=\"tool\", \n",
    "                        symbol_sequence=['x'])\n",
    "\n",
    "    figure.update_layout(yaxis_title=\"time (s)\", title=LAYOUT_FIGURES['title'])\n",
    "    return figure"
   ]
  },
  {
   "cell_type": "code",
126
   "execution_count": 4,
Jaime Arias's avatar
Jaime Arias committed
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
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_axis_title(experiment, show_strategy=True):\n",
    "    \"\"\"Get the axis title of a figure depending on the experiment being plotted\n",
    "    \n",
    "    Parameters\n",
    "    ----------\n",
    "    experiment : str\n",
    "        String with the experiment information\n",
    "    show_strategy : bool, optional\n",
    "        Flag to show the information related to the strategy used by the tool\n",
    "    \n",
    "    Returns\n",
    "    -------\n",
    "    str\n",
    "        axis title\n",
    "        \n",
    "    Examples\n",
    "    --------\n",
    "    \n",
    "    >>> get_axis_title('pmc-sog_otfL_couv99-default_1_1', True)\n",
    "    pmc-sog (Lace, strategy: couv99-default, # cores: 1)\n",
    "    \"\"\"\n",
    "    information = experiment.split('_')\n",
    "    tool_name = information[0]\n",
    "    \n",
    "    info = []\n",
155
156
157
    "    library_dic = {\n",
    "        'otfL': 'Lace',\n",
    "        'otfP': 'Pthreads',\n",
158
159
    "        'otfC': 'Cthreads',\n",
    "        'otf': 'Hybrid'\n",
160
    "    }\n",
Jaime Arias's avatar
Jaime Arias committed
161
162
    "    \n",
    "    if (len(information) == 5):\n",
163
    "        info.append(library_dic[information[1]])\n",
Jaime Arias's avatar
Jaime Arias committed
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
    "\n",
    "    if (show_strategy):\n",
    "        info.append('strategy: {}'.format(information[-3]))\n",
    "\n",
    "    nb_nodes = int(information[-2])\n",
    "    if (nb_nodes > 1):\n",
    "        info.append('# nodes: {}'.format(nb_nodes))\n",
    "\n",
    "    info.append('# cores: {}'.format(information[-1]))\n",
    "\n",
    "    title = '{} ({})'.format(tool_name, ', '.join(info))\n",
    "    \n",
    "    return title"
   ]
  },
  {
   "cell_type": "code",
181
   "execution_count": 5,
182
183
184
   "metadata": {},
   "outputs": [],
   "source": [
185
    "def create_log_figure(table, table_errors, model, tool_x, tool_y, show_strategy=True, callback=None):\n",
Jaime Arias's avatar
Jaime Arias committed
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
    "    \"\"\"Creates a Scatter figure in logarithmic scale comparing the performance of two tools\n",
    "    \n",
    "    Parameters\n",
    "    ----------\n",
    "    table : pandas.Dataframe\n",
    "        Dataframe with the times of each experiment\n",
    "    table_errors : pandas.Dataframe\n",
    "        Dataframe with the errors of each experiment\n",
    "    model : string\n",
    "        Model to be analyzed\n",
    "    tool_x : string\n",
    "        Tool to be compared and plotted on the x-axis\n",
    "    tool_y : string\n",
    "        Tool to be compared and plotted on the y-axis\n",
    "    show_strategy : bool\n",
    "        Flag to show the stretagy used by the tools\n",
202
203
    "    callback : function\n",
    "        Function to be called when clicking on a point\n",
Jaime Arias's avatar
Jaime Arias committed
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
    "        \n",
    "    Returns\n",
    "    -------\n",
    "    plotly.graph_objects.Figure\n",
    "        Scatter figure\n",
    "        \n",
    "    Examples\n",
    "    --------\n",
    "    >>> import os\n",
    "    >>> import pandas as pd\n",
    "    >>> csv_file = os.path.join(\"results\", \"output.csv\")\n",
    "    >>> df = pd.read_csv(csv_file)\n",
    "    >>> table = df.set_index(['model', 'formula', 'tool'], drop=True).unstack('tool')\n",
    "    >>> fig = create_log_figure(table['time'], table['error'], 'philo10', 'pmc-sog_otfL_couv99-default_1_8', 'pmc-sog_otfP_couv99-default_1_8')\n",
    "    \"\"\"\n",
    "    try:\n",
    "        min_values = table.loc[model].min()\n",
    "        max_values = table.loc[model].max()\n",
    "\n",
    "        min_value = min(min_values[tool_x], min_values[tool_y])/2.\n",
224
225
    "        min_value_log = np.log10(min_value)\n",
    "\n",
Jaime Arias's avatar
Jaime Arias committed
226
    "        max_value = max(max_values[tool_x], max_values[tool_y])\n",
227
228
229
230
231
232
233
    "        max_value_log = np.log10(max_value)\n",
    "\n",
    "        table_model = table.loc[model]\n",
    "        table_errors_model = table_error.loc[model]\n",
    "        \n",
    "        full_table_x = pd.concat([table_model[tool_x],table_model['property'], table_errors_model[tool_x]], axis=1)\n",
    "        full_table_x.columns = ['time', 'property', 'error']\n",
Jaime Arias's avatar
Jaime Arias committed
234
    "\n",
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
    "        full_table_y = pd.concat([table_model[tool_y],table_model['property'], table_errors_model[tool_y]], axis=1)\n",
    "        full_table_y.columns = ['time', 'property', 'error']\n",
    "\n",
    "        traces = [\n",
    "            {\"property\": 'T', \"color\":\"green\"},\n",
    "            {\"property\": 'F', \"color\":\"red\"},\n",
    "            {\"property\": 'U', \"color\":\"black\"}\n",
    "        ]\n",
    "\n",
    "        figures = []\n",
    "        for t in traces:\n",
    "            # filter by verification output\n",
    "            table_x = full_table_x[full_table_x.property == t['property']]\n",
    "            table_y = full_table_y[full_table_y.property == t['property']]\n",
    "\n",
    "            # custom data\n",
    "            custom_data = list(zip(table_x.index, table_x.error,table_y.error))\n",
252
253
254
255
256
257
258
    "            \n",
    "            # tools\n",
    "            metainfo = {\n",
    "                'model': model, \n",
    "                'tools': {'x': tool_x, 'y': tool_y},\n",
    "                'folder': os.path.join(os.path.abspath(os.pardir), \"results\")\n",
    "            }\n",
259
260
261
262
263
264
265
    "\n",
    "            figures.append(go.Scatter(x=table_x.time,\n",
    "                                      y=table_y.time,\n",
    "                                      name=t['property'],\n",
    "                                      mode='markers',\n",
    "                                      marker_symbol='circle-open',\n",
    "                                      marker_color=t['color'],\n",
266
    "                                      meta = metainfo,\n",
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
    "                                      customdata=custom_data,\n",
    "                                      hovertemplate =\n",
    "                                        '<b>Formula # %{customdata[0]}</b><br>' +\n",
    "                                        '<br><b>Times:</b><br>' +\n",
    "                                        '<b>x:</b> %{x} s' +\n",
    "                                        '<br><b>y:</b> %{y} s<br>' +\n",
    "                                        '<br><b>Errors:</b><br>' +\n",
    "                                        '<b>x:</b> %{customdata[1]}<br>' +\n",
    "                                        '<b>y:</b> %{customdata[2]}',\n",
    "                                        ))    \n",
    "\n",
    "        # Line\n",
    "        figures.append(go.Scatter(x=[min_value, max_value], \n",
    "                                    y=[min_value, max_value],\n",
    "                                    mode='lines', showlegend=False,\n",
    "                                    line=dict(color='black', width=1)))\n",
    "\n",
    "        # Create figure\n",
    "        figure = go.FigureWidget(figures)\n",
    "        figure.update_layout(LAYOUT_FIGURES,\n",
    "                             title_text=model,\n",
    "                             hoverlabel=dict(bgcolor=\"white\", align='auto'),\n",
    "                             legend_title_text='property',\n",
    "                             xaxis=dict(type='log', autorange=False, range=[min_value_log, max_value_log]),\n",
    "                             yaxis=dict(type='log', autorange=False, range=[min_value_log, max_value_log]),\n",
    "                             xaxis_title=get_axis_title(tool_x, show_strategy),\n",
    "                             yaxis_title=get_axis_title(tool_y, show_strategy))\n",
    "\n",
    "        # Add event\n",
    "        if callback is not None:\n",
    "            for i in range(len(figure.data)):\n",
    "                figure.data[i].on_click(callback)\n",
Jaime Arias's avatar
Jaime Arias committed
299
300
301
302
303
304
305
306
307
    "    \n",
    "        return figure\n",
    "    except Exception as e:\n",
    "        print(\"Error when ploting model: {} - tool_x: {} - tool_y: {}\".format(model, tool_x, tool_y))\n",
    "        print(e)"
   ]
  },
  {
   "cell_type": "code",
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
   "execution_count": 6,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "import webbrowser\n",
    "\n",
    "def get_filename(base_path, tool, model, model_instance, formula):\n",
    "    \"\"\"Returns the absolute path of the experiment log\n",
    "    \n",
    "    Parameters\n",
    "    ----------\n",
    "    base_path : string\n",
    "        Path of the folder where logs are saved\n",
    "    tool : string\n",
    "        Tool name\n",
    "    model : string\n",
    "        Model name\n",
    "    model_instance : string\n",
    "        Name of the model instance\n",
    "    formula : string\n",
    "        Identifier of the formula\n",
    "    \n",
    "    Returns\n",
    "    -------\n",
    "    string\n",
    "        Absolute path of the log file\n",
    "    \n",
    "    \"\"\"\n",
    "    information = tool.split('_')\n",
    "    \n",
    "    tool_name = information[0]\n",
    "    tool_configuration = '_'.join(information[:-2])\n",
    "    nb_nodes = information[-2]\n",
    "    nb_cores = information[-1]\n",
    "    \n",
    "    experiment_folder = os.path.join(base_path, tool_name, tool_configuration, model, model_instance)\n",
    "    filename = f'{tool_name}_{model_instance}-n{nb_nodes}-th{nb_cores}-f{formula}'\n",
    "    absolute_path = os.path.join(experiment_folder, filename)\n",
    "    \n",
    "    return absolute_path\n",
    "\n",
    "def open_logs_callback(trace, points, selector):\n",
    "    \"\"\"Callback that open the log files when clicking on a point of the figure\n",
    "    \n",
    "    Parameters\n",
    "    ----------\n",
    "    trace : plotly.graph_objects.Figure\n",
    "        the figure to attach the callback\n",
    "    points : plotly.callbacks.Points \n",
    "        points of the figure selected\n",
    "    selector: plotly.callbacks.InputDeviceState \n",
    "        Device information \n",
    "    \"\"\"\n",
    "    inds = points.point_inds\n",
    "    if (inds):\n",
    "        index = inds[0]\n",
    "\n",
    "        formula, error_x, error_y = trace['customdata'][index]\n",
    "        model_instance = trace['meta']['model']\n",
    "        model = ''.join(c for c in model_instance if not c.isdigit())\n",
    "        tools = trace['meta']['tools']\n",
    "        logs_folder = trace['meta']['folder']\n",
    "\n",
    "        filename_x = get_filename(logs_folder, tools['x'], model, model_instance, formula)\n",
    "        filename_y = get_filename(logs_folder, tools['y'], model, model_instance, formula)\n",
    "\n",
    "        for f in [filename_x, filename_y]:\n",
    "            webbrowser.open(f'file://{f}.err')\n",
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
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
    "            webbrowser.open(f'file://{f}.out')\n",
    "\n",
    "OPEN_LOGS_CALLBACK_JS = \"\"\"\n",
    "function get_filename (base_path, tool, model_instance, formula) {\n",
    "  const information = tool.split('_');\n",
    "  const size = information.length;\n",
    "\n",
    "  const tool_name = information[0];\n",
    "  const tool_configuration = information.slice(0, size - 2).join('_');\n",
    "  const nb_nodes = information[size - 2];\n",
    "  const nb_cores = information[size - 1];\n",
    "\n",
    "  const model = model_instance.replace(/[0-9]/g, '');\n",
    "\n",
    "  const experiment_folder = `${base_path}/${tool_name}/${tool_configuration}/${model}/${model_instance}`;\n",
    "  const filename = `${tool_name}_${model_instance}-n${nb_nodes}-th${nb_cores}-f${formula}`;\n",
    "\n",
    "  return `${experiment_folder}/${filename}`;\n",
    "}\n",
    "\n",
    "const plots = document.getElementsByClassName(\"plotly-graph-div js-plotly-plot\");\n",
    "const myPlot = plots[0];\n",
    "\n",
    "myPlot.on('plotly_click', function(data){\n",
    "    const points = data.points;\n",
    "    if (points.length != 1) {return ;}\n",
    "    \n",
    "    const myPoint = points[0];\n",
    "    const formula = myPoint.customdata[0];\n",
    "    const meta = myPoint.data.meta;\n",
    "    \n",
    "    const href = window.location.href.split('/');\n",
    "    const base_path = href.splice(0,href.length-2).join('/');\n",
    "    const results_path = `${base_path}/results`;\n",
    "    \n",
    "    const filename_x = get_filename(results_path, meta.tools.x, meta.model, formula);\n",
    "    const filename_y = get_filename(results_path, meta.tools.y, meta.model, formula);\n",
    "    \n",
    "    console.log('x: ' + filename_x);\n",
    "    window.open(`${filename_x}.err`);\n",
    "    window.open(`${filename_x}.out`);\n",
    "    \n",
    "    console.log('y: ' + filename_y);\n",
    "    window.open(`${filename_y}.err`);\n",
    "    window.open(`${filename_y}.out`);\n",
    "});\n",
    "\"\"\"\n"
425
426
427
428
429
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
Jaime Arias's avatar
Jaime Arias committed
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
   "metadata": {},
   "outputs": [],
   "source": [
    "def create_figure_explored_states(table_explored_states, model):\n",
    "    \"\"\"Creates figure showing the number of explorated states during the verification \n",
    "    \n",
    "    Parameters\n",
    "    ----------\n",
    "    table_explored_states : pandas.Dataframe\n",
    "        Dataframe with the explorated states of each experiment\n",
    "    model : string\n",
    "        Model to be analyzed\n",
    "        \n",
    "    Returns\n",
    "    -------\n",
    "    plotly.graph_objects.Figure\n",
    "        Scatter figure\n",
    "    \"\"\"\n",
    "    colors={'T': 'green', 'F': 'red'}\n",
    "    float_formatter = \"{:.2E}\".format\n",
    "\n",
    "    table_model = table_explored_states[table_explored_states.property != 'U']\n",
    "    table_model = table_model[table_model.model == model]\n",
    "\n",
    "    table_stats = table_model.groupby(['property']).agg(['mean']) \n",
    "\n",
    "    fig = go.Figure()\n",
    "    for p in table_stats.index:\n",
    "        data = table_model[table_model.property==p]\n",
    "        stats = table_stats.loc[p]\n",
    "        \n",
    "        x_axis = np.arange(1, data['formula'].count()+1, 1)\n",
    "        mean = stats['explored_states','mean']\n",
    "        \n",
    "        figure = px.scatter(data, \n",
    "                            x=x_axis, \n",
    "                            y=\"explored_states\",\n",
    "                            title=model, \n",
    "                            color='property',\n",
    "                            color_discrete_map=colors,\n",
    "                            symbol_sequence=[\"circle\"])\n",
    "\n",
    "        line = go.Scatter(x=[x_axis[0], x_axis[-1]], \n",
    "                          y=[mean, mean],\n",
    "                          mode='lines', showlegend=False,                          \n",
    "                          line=dict(color=colors[p], width=1.5))\n",
    "\n",
    "        fig.add_trace(figure['data'][0])\n",
    "        fig.add_trace(line)\n",
    "        \n",
    "        fig.add_annotation(x=1, \n",
    "                           y=mean,\n",
    "                           font=dict(color=colors[p]),\n",
    "                           text=f\"mean = {float_formatter(mean)}\")\n",
    "\n",
    "    fig.update_layout(title_text=model, title=LAYOUT_FIGURES['title'], \n",
    "                      width = 500, height = 500, margin=dict(r=110))\n",
    "    \n",
    "    fig.update_xaxes(title=\"formula\", range=[x_axis[0]-1, x_axis[-1]+1])\n",
    "    fig.update_yaxes(title=\"# explored states\")\n",
    "    \n",
    "    fig.update_annotations(dict(\n",
    "        showarrow=False,\n",
    "        xanchor=\"left\",\n",
    "        yanchor=\"middle\",\n",
    "        xref='paper'))\n",
    "    \n",
    "    return fig"
   ]
  },
  {
   "cell_type": "code",
502
   "execution_count": 8,
Jaime Arias's avatar
Jaime Arias committed
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
   "metadata": {},
   "outputs": [],
   "source": [
    "# Experiment filters\n",
    "\n",
    "def versus_dfs(experiments):\n",
    "    \"\"\"Selects only experiments using DFS strategy\"\"\"\n",
    "    exp1, exp2 = experiments\n",
    "    strategy_exp1= exp1.split('_')[1]\n",
    "    strategy_exp2= exp2.split('_')[1]\n",
    "    \n",
    "    return strategy_exp1 == 'dfs' or strategy_exp2 == 'dfs'\n",
    "\n",
    "def versus_sequential(experiments):\n",
    "    \"\"\"Selects only experiments run sequentially \"\"\"\n",
    "    exp1, exp2 = experiments\n",
    "    nodes_exp1, threads_exp1 = exp1.split('_')[-2:]\n",
    "    nodes_exp2, threads_exp2 = exp2.split('_')[-2:]\n",
    "\n",
    "    return (nodes_exp1 == '1' and nodes_exp2 == '1') and \\\n",
    "            (threads_exp1 == '1' or threads_exp2 == '1')\n",
    "\n",
    "def same_tool(experiments, tool):\n",
    "    \"\"\"Selects only experiments comparing the same tool\"\"\"\n",
    "    exp1, exp2 = experiments\n",
    "    tool_exp1= exp1.split('_')[0]\n",
    "    tool_exp2= exp2.split('_')[0]\n",
    "    return tool_exp1.startswith(tool) and tool_exp2.startswith(tool)\n",
    "\n",
    "def same_number_threads(experiments):\n",
    "    \"\"\"Selects only experiments comparing the same number of processes and cores\"\"\"\n",
    "    exp1, exp2 = experiments\n",
    "    nodes_exp1, threads_exp1 = exp1.split('_')[-2:]\n",
    "    nodes_exp2, threads_exp2 = exp2.split('_')[-2:]\n",
    "    return (nodes_exp1 == nodes_exp2) and (threads_exp1 == threads_exp2) \n",
    "\n",
    "def same_thread_library(experiments):\n",
    "    \"\"\"Selects only experiments comparing the same parallelization library\"\"\"\n",
    "    exp1, exp2 = experiments\n",
    "    library_exp1 = exp1.split('_')[1]\n",
    "    library_exp2 = exp2.split('_')[1]\n",
    "    return library_exp1 == library_exp2\n",
    "\n",
    "def same_strategy(experiments):\n",
    "    \"\"\"Selects only experiments comparing the same strategy\"\"\"\n",
    "    exp1, exp2 = experiments\n",
    "    strategy_exp1 = exp1.split('_')[2]\n",
    "    strategy_exp2 = exp2.split('_')[2]\n",
    "    return strategy_exp1 == strategy_exp2\n",
    "\n",
    "def only_couvreur_strategy(experiments):\n",
    "    \"\"\"Selects only experiments comparing couvreur emptiness check algorithm\"\"\"\n",
    "    exp1, exp2 = experiments\n",
    "    strategy_exp1 = exp1.split('_')[2]\n",
    "    strategy_exp2 = exp2.split('_')[2]\n",
    "    return strategy_exp1.startswith('couv99') and strategy_exp2.startswith('couv99')\n",
    "\n",
    "def compare_threads_library(experiments):\n",
    "    \"\"\"Compares parallization libraries used in pmc-sog. \n",
    "    \n",
    "    It selects experiments where the tool is only pmc-sog and the strategy, number of threads, \n",
    "    number of processus are the same.\n",
    "    \"\"\"\n",
    "    return same_tool(experiments, 'pmc-sog') and \\\n",
    "            same_strategy(experiments) and \\\n",
    "            same_number_threads(experiments) and \\\n",
    "            not same_thread_library(experiments)\n",
    "\n",
    "def compare_couvreur_strategies(experiments):\n",
    "    \"\"\"Compares couvreurs strategies used in pmc-sog. \n",
    "    \n",
    "    It selects experiments where the tool is only pmc-sog, the strategy is couvreur, and \n",
    "    the parallelization library, number of threads, number of processus are the same.\n",
    "    \"\"\"\n",
    "    return only_couvreur_strategy(experiments) and \\\n",
    "            same_thread_library(experiments) and \\\n",
    "            same_number_threads(experiments)\n",
    "\n",
581
582
583
584
585
586
587
    "def same_distributed_number_threads(experiments):\n",
    "    \"\"\"Selects only experiments where the multiplication of theirs nodes with cores are the same.\"\"\"\n",
    "    exp1, exp2 = experiments\n",
    "    nodes_exp1, threads_exp1 = exp1.split('_')[-2:]\n",
    "    nodes_exp2, threads_exp2 = exp2.split('_')[-2:]\n",
    "    return (int(nodes_exp1) * int(threads_exp1)) == (int(nodes_exp2) * int(threads_exp2))\n",
    "\n",
Jaime Arias's avatar
Jaime Arias committed
588
589
590
591
592
593
    "def compare_tools(experiments):\n",
    "    \"\"\"Compares pmc-sog and pnml2lts-mc using the DFS algorithm. \n",
    "    \n",
    "    It selects experiments where the tools are not the same, the exploration algorithm is DFS and \n",
    "    the number of processus and cores are the same.\n",
    "    \"\"\"\n",
594
    "    return not (same_tool(experiments, 'pmc-sog') or same_tool(experiments,'pnml2lts-mc')) and \\\n",
Jaime Arias's avatar
Jaime Arias committed
595
596
597
598
599
600
601
602
603
604
605
606
607
    "            versus_dfs(experiments)\n",
    "\n",
    "def compare_multithreading(experiments):\n",
    "    \"\"\"Compares the sequential and multi-core version of pmc-sog. \n",
    "    \n",
    "    It selects experiments where the tools is pmc-sog, the parallelization library, the emptiness check \n",
    "    strategy are the same. Here the number of processus and cores are different.\n",
    "    \"\"\"\n",
    "    return same_tool(experiments, 'pmc-sog') and \\\n",
    "            same_thread_library(experiments) and \\\n",
    "            same_strategy(experiments) and \\\n",
    "            versus_sequential(experiments)\n",
    "\n",
608
609
610
611
612
613
614
615
    "def against_hybrid(experiments):\n",
    "    \"\"\"Selects only experiments comparing with hybrid mode\"\"\"\n",
    "    exp1, exp2 = experiments\n",
    "    library_exp1 = exp1.split('_')[1]\n",
    "    library_exp2 = exp2.split('_')[1]\n",
    "    return (library_exp1 == 'otf') or (library_exp2 == 'otf')\n",
    "\n",
    "\n",
616
617
618
619
    "def compare_distributed(experiments):\n",
    "    \"\"\"Compares the hybrid version of pmc-sog\"\"\"\n",
    "    return same_tool(experiments, 'pmc-sog') and \\\n",
    "        same_strategy(experiments) and \\\n",
620
621
    "        same_distributed_number_threads(experiments) and \\\n",
    "        against_hybrid(experiments)\n",
622
    "\n",
Jaime Arias's avatar
Jaime Arias committed
623
624
625
626
627
    "# Plots to be created\n",
    "plots = {\n",
    "    'compare_thread_library': compare_threads_library,\n",
    "    'compare_couvreur_algorithm': compare_couvreur_strategies,\n",
    "    'compare_tools': compare_tools,\n",
628
629
    "    'compare_multicore': compare_multithreading,\n",
    "    'compare_distributed': compare_distributed\n",
Jaime Arias's avatar
Jaime Arias committed
630
631
632
633
634
635
636
637
638
639
640
641
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Load Data"
   ]
  },
  {
   "cell_type": "code",
642
   "execution_count": 9,
Jaime Arias's avatar
Jaime Arias committed
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
   "metadata": {},
   "outputs": [],
   "source": [
    "# Root folder\n",
    "PROJECT_FOLDER = os.path.abspath(os.pardir)\n",
    "\n",
    "# csv file with the output\n",
    "csv_file = os.path.join(PROJECT_FOLDER, \"results\", \"output.csv\")\n",
    "\n",
    "# Output folder\n",
    "OUTPUT_FOLDER = os.path.join(PROJECT_FOLDER,\"results\", \"figures\")\n",
    "create_folder(OUTPUT_FOLDER)"
   ]
  },
  {
   "cell_type": "code",
659
   "execution_count": 10,
Jaime Arias's avatar
Jaime Arias committed
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>model</th>\n",
       "      <th>formula</th>\n",
       "      <th>tool</th>\n",
       "      <th>time</th>\n",
       "      <th>property</th>\n",
Jaime Arias's avatar
Jaime Arias committed
688
       "      <th>explored_states</th>\n",
Jaime Arias's avatar
Jaime Arias committed
689
690
691
692
693
694
695
696
       "      <th>error</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>philo10</td>\n",
       "      <td>1</td>\n",
697
       "      <td>pmc-sog_otfL_couv99-default_1_16</td>\n",
698
       "      <td>6.572</td>\n",
Jaime Arias's avatar
Jaime Arias committed
699
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
700
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
701
702
703
704
705
706
       "      <td>OK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>philo10</td>\n",
       "      <td>1</td>\n",
707
708
709
       "      <td>pmc-sog_otfL_couv99-shy_1_16</td>\n",
       "      <td>5.926</td>\n",
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
710
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
711
712
713
714
715
716
       "      <td>OK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>philo10</td>\n",
       "      <td>1</td>\n",
717
718
719
       "      <td>pmc-sog_otfP_couv99-default_1_16</td>\n",
       "      <td>6.811</td>\n",
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
720
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
721
722
723
724
725
726
       "      <td>OK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>philo10</td>\n",
       "      <td>1</td>\n",
727
728
       "      <td>pmc-sog_otfP_couv99-shy_1_16</td>\n",
       "      <td>6.862</td>\n",
Jaime Arias's avatar
Jaime Arias committed
729
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
730
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
731
732
733
734
735
736
       "      <td>OK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>philo10</td>\n",
       "      <td>1</td>\n",
737
       "      <td>pmc-sog_otf_couv99-default_2_8</td>\n",
Jaime Arias's avatar
Jaime Arias committed
738
       "      <td>5.705</td>\n",
739
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
740
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
741
742
743
744
745
746
747
       "      <td>OK</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
Jaime Arias's avatar
Jaime Arias committed
748
749
750
751
752
753
754
755
756
757
758
759
760
       "     model  formula                              tool   time property  \\\n",
       "0  philo10        1  pmc-sog_otfL_couv99-default_1_16  6.572        F   \n",
       "1  philo10        1      pmc-sog_otfL_couv99-shy_1_16  5.926        F   \n",
       "2  philo10        1  pmc-sog_otfP_couv99-default_1_16  6.811        F   \n",
       "3  philo10        1      pmc-sog_otfP_couv99-shy_1_16  6.862        F   \n",
       "4  philo10        1    pmc-sog_otf_couv99-default_2_8  5.705        F   \n",
       "\n",
       "   explored_states error  \n",
       "0              NaN    OK  \n",
       "1              NaN    OK  \n",
       "2              NaN    OK  \n",
       "3              NaN    OK  \n",
       "4              NaN    OK  "
Jaime Arias's avatar
Jaime Arias committed
761
762
      ]
     },
763
     "execution_count": 10,
Jaime Arias's avatar
Jaime Arias committed
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# read data\n",
    "df = pd.read_csv(csv_file)\n",
    "\n",
    "# merge the information related to the experiment (# nodes, # threads, strategy) to the tool column\n",
    "df['tool'] = df[['tool', 'strategy', 'num_nodes', 'num_threads']].astype(str).apply('_'.join, axis=1)\n",
    "df = df.drop(columns=['strategy', 'num_nodes', 'num_threads'])\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
781
   "execution_count": 11,
Jaime Arias's avatar
Jaime Arias committed
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>property</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>model</th>\n",
       "      <th>formula</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">philo10</th>\n",
       "      <th>1</th>\n",
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>F</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                property\n",
       "model   formula         \n",
       "philo10 1              F\n",
       "        2              F\n",
       "        3              F\n",
       "        4              F\n",
       "        5              F"
      ]
     },
850
     "execution_count": 11,
Jaime Arias's avatar
Jaime Arias committed
851
852
853
854
855
856
857
858
859
860
861
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# ground truth for properties\n",
    "p_df = pd.read_csv(csv_file)\n",
    "p_df =p_df[\n",
    "    (p_df.tool=='pnml2lts-mc') & \n",
    "    (p_df.strategy == 'ndfs') & \n",
    "    (p_df.num_nodes == 1) & \n",
862
    "    (p_df.num_threads == 16)]\n",
Jaime Arias's avatar
Jaime Arias committed
863
864
    "\n",
    "# only property column is needed\n",
Jaime Arias's avatar
Jaime Arias committed
865
    "p_df = p_df.drop(columns=['tool', 'strategy', 'num_nodes', 'num_threads', 'time', 'explored_states', 'error'])\n",
Jaime Arias's avatar
Jaime Arias committed
866
867
868
869
870
871
872
873
874
    "p_df.fillna('U', inplace=True)\n",
    "p_df.set_index(['model', 'formula'], inplace=True)\n",
    "p_df.sort_index(inplace=True)\n",
    "\n",
    "p_df.head()"
   ]
  },
  {
   "cell_type": "code",
875
   "execution_count": 12,
Jaime Arias's avatar
Jaime Arias committed
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"10\" halign=\"left\">time</th>\n",
       "      <th>...</th>\n",
       "      <th colspan=\"10\" halign=\"left\">error</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>tool</th>\n",
Jaime Arias's avatar
Jaime Arias committed
911
       "      <th>pmc-sog_otfL_couv99-default_1_1</th>\n",
Jaime Arias's avatar
Jaime Arias committed
912
       "      <th>pmc-sog_otfL_couv99-default_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
913
       "      <th>pmc-sog_otfL_couv99-shy_1_1</th>\n",
914
       "      <th>pmc-sog_otfL_couv99-shy_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
915
       "      <th>pmc-sog_otfP_couv99-default_1_1</th>\n",
916
       "      <th>pmc-sog_otfP_couv99-default_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
917
       "      <th>pmc-sog_otfP_couv99-shy_1_1</th>\n",
918
       "      <th>pmc-sog_otfP_couv99-shy_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
919
       "      <th>pmc-sog_otf_couv99-default_2_16</th>\n",
920
       "      <th>pmc-sog_otf_couv99-default_2_8</th>\n",
Jaime Arias's avatar
Jaime Arias committed
921
       "      <th>...</th>\n",
922
       "      <th>pmc-sog_otf_couv99-default_8_2</th>\n",
Jaime Arias's avatar
Jaime Arias committed
923
       "      <th>pmc-sog_otf_couv99-shy_2_16</th>\n",
924
       "      <th>pmc-sog_otf_couv99-shy_2_8</th>\n",
Jaime Arias's avatar
Jaime Arias committed
925
926
       "      <th>pmc-sog_otf_couv99-shy_4_16</th>\n",
       "      <th>pmc-sog_otf_couv99-shy_4_4</th>\n",
927
       "      <th>pmc-sog_otf_couv99-shy_8_2</th>\n",
Jaime Arias's avatar
Jaime Arias committed
928
       "      <th>pnml2lts-mc_dfs_1_1</th>\n",
Jaime Arias's avatar
Jaime Arias committed
929
       "      <th>pnml2lts-mc_dfs_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
930
       "      <th>pnml2lts-mc_ndfs_1_1</th>\n",
Jaime Arias's avatar
Jaime Arias committed
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
       "      <th>pnml2lts-mc_ndfs_1_16</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>model</th>\n",
       "      <th>formula</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">philo10</th>\n",
       "      <th>1</th>\n",
Jaime Arias's avatar
Jaime Arias committed
963
       "      <td>NaN</td>\n",
964
       "      <td>6.572</td>\n",
Jaime Arias's avatar
Jaime Arias committed
965
       "      <td>NaN</td>\n",
966
       "      <td>5.926</td>\n",
Jaime Arias's avatar
Jaime Arias committed
967
       "      <td>NaN</td>\n",
968
       "      <td>6.811</td>\n",
Jaime Arias's avatar
Jaime Arias committed
969
       "      <td>NaN</td>\n",
970
       "      <td>6.862</td>\n",
Jaime Arias's avatar
Jaime Arias committed
971
972
       "      <td>5.688</td>\n",
       "      <td>5.705</td>\n",
Jaime Arias's avatar
Jaime Arias committed
973
974
       "      <td>...</td>\n",
       "      <td>OK</td>\n",
Jaime Arias's avatar
Jaime Arias committed
975
       "      <td>TIME LIMIT</td>\n",
Jaime Arias's avatar
Jaime Arias committed
976
977
978
979
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
Jaime Arias's avatar
Jaime Arias committed
980
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
981
       "      <td>OK</td>\n",
Jaime Arias's avatar
Jaime Arias committed
982
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
983
984
985
986
       "      <td>OK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
Jaime Arias's avatar
Jaime Arias committed
987
       "      <td>NaN</td>\n",
988
       "      <td>5.179</td>\n",
Jaime Arias's avatar
Jaime Arias committed
989
       "      <td>NaN</td>\n",
990
       "      <td>5.090</td>\n",
Jaime Arias's avatar
Jaime Arias committed
991
       "      <td>NaN</td>\n",
992
       "      <td>4.575</td>\n",
993
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
994
995
996
       "      <td>4.350</td>\n",
       "      <td>5.206</td>\n",
       "      <td>6.592</td>\n",
Jaime Arias's avatar
Jaime Arias committed
997
998
999
1000
1001
1002
1003
       "      <td>...</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1004
       "      <td>NaN</td>\n",
1005
       "      <td>OK</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1006
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1007
1008
1009
1010
       "      <td>OK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1011
       "      <td>NaN</td>\n",
1012
       "      <td>2.620</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1013
       "      <td>NaN</td>\n",
1014
       "      <td>4.383</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1015
       "      <td>NaN</td>\n",
1016
       "      <td>3.489</td>\n",
1017
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1018
1019
1020
       "      <td>4.143</td>\n",
       "      <td>3.801</td>\n",
       "      <td>6.219</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1021
1022
1023
1024
1025
1026
       "      <td>...</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
1027
       "      <td>OK</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1028
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1029
       "      <td>OK</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1030
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1031
1032
1033
1034
       "      <td>OK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1035
       "      <td>NaN</td>\n",
1036
       "      <td>2.379</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1037
       "      <td>NaN</td>\n",
1038
       "      <td>4.183</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1039
       "      <td>NaN</td>\n",
1040
       "      <td>4.322</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1041
       "      <td>NaN</td>\n",
1042
       "      <td>4.149</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1043
1044
       "      <td>4.647</td>\n",
       "      <td>5.837</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1045
1046
1047
1048
1049
1050
1051
       "      <td>...</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1052
       "      <td>NaN</td>\n",
1053
       "      <td>OK</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1054
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1055
1056
1057
1058
       "      <td>OK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1059
       "      <td>NaN</td>\n",
1060
       "      <td>4.260</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1061
       "      <td>NaN</td>\n",
1062
       "      <td>7.320</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1063
       "      <td>NaN</td>\n",
1064
       "      <td>7.995</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1065
       "      <td>NaN</td>\n",
1066
       "      <td>7.629</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1067
1068
       "      <td>8.440</td>\n",
       "      <td>8.405</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1069
1070
1071
1072
1073
       "      <td>...</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
1074
1075
       "      <td>OK</td>\n",
       "      <td>OK</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1076
       "      <td>NaN</td>\n",
1077
       "      <td>OK</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1078
       "      <td>NaN</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1079
1080
1081
1082
       "      <td>OK</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
Jaime Arias's avatar
Jaime Arias committed
1083
       "<p>5 rows × 88 columns</p>\n",
Jaime Arias's avatar
Jaime Arias committed
1084
1085
1086
       "</div>"
      ],
      "text/plain": [
Jaime Arias's avatar
Jaime Arias committed
1087
1088
1089
1090
1091
1092
1093
1094
       "                                           time  \\\n",
       "tool            pmc-sog_otfL_couv99-default_1_1   \n",
       "model   formula                                   \n",
       "philo10 1                                   NaN   \n",
       "        2                                   NaN   \n",
       "        3                                   NaN   \n",
       "        4                                   NaN   \n",
       "        5                                   NaN   \n",
1095
       "\n",
Jaime Arias's avatar
Jaime Arias committed
1096
1097
1098
1099
1100
1101
1102
1103
       "                                                                              \\\n",
       "tool            pmc-sog_otfL_couv99-default_1_16 pmc-sog_otfL_couv99-shy_1_1   \n",
       "model   formula                                                                \n",
       "philo10 1                                  6.572                         NaN   \n",
       "        2                                  5.179                         NaN   \n",
       "        3                                  2.620                         NaN   \n",
       "        4                                  2.379                         NaN   \n",
       "        5                                  4.260                         NaN   \n",
1104
       "\n",
Jaime Arias's avatar
Jaime Arias committed
1105
1106
1107
1108
1109
1110
1111
1112
       "                                                                              \\\n",
       "tool            pmc-sog_otfL_couv99-shy_1_16 pmc-sog_otfP_couv99-default_1_1   \n",
       "model   formula                                                                \n",
       "philo10 1                              5.926                             NaN   \n",
       "        2                              5.090                             NaN   \n",
       "        3                              4.383                             NaN   \n",
       "        4                              4.183                             NaN   \n",
       "        5                              7.320                             NaN   \n",
1113
       "\n",
Jaime Arias's avatar
Jaime Arias committed
1114
1115
1116
1117
1118
1119
1120
1121
       "                                                                              \\\n",
       "tool            pmc-sog_otfP_couv99-default_1_16 pmc-sog_otfP_couv99-shy_1_1   \n",
       "model   formula                                                                \n",
       "philo10 1                                  6.811                         NaN   \n",
       "        2                                  4.575                         NaN   \n",
       "        3                                  3.489                         NaN   \n",
       "        4                                  4.322                         NaN   \n",
       "        5                                  7.995                         NaN   \n",
1122
       "\n",
Jaime Arias's avatar
Jaime Arias committed
1123
1124
1125
1126
1127
1128
1129
1130
       "                                                                              \\\n",
       "tool            pmc-sog_otfP_couv99-shy_1_16 pmc-sog_otf_couv99-default_2_16   \n",
       "model   formula                                                                \n",
       "philo10 1                              6.862                           5.688   \n",
       "        2                              4.350                           5.206   \n",
       "        3                              4.143                           3.801   \n",
       "        4                              4.149                           4.647   \n",
       "        5                              7.629                           8.440   \n",
1131
       "\n",
Jaime Arias's avatar
Jaime Arias committed
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
       "                                                ...  \\\n",
       "tool            pmc-sog_otf_couv99-default_2_8  ...   \n",
       "model   formula                                 ...   \n",
       "philo10 1                                5.705  ...   \n",
       "        2                                6.592  ...   \n",
       "        3                                6.219  ...   \n",
       "        4                                5.837  ...   \n",
       "        5                                8.405  ...   \n",
       "\n",
       "                                         error                              \\\n",
       "tool            pmc-sog_otf_couv99-default_8_2 pmc-sog_otf_couv99-shy_2_16   \n",
       "model   formula                                                              \n",
       "philo10 1                                   OK                  TIME LIMIT   \n",
       "        2                                   OK                          OK   \n",
       "        3                                   OK                          OK   \n",
       "        4                                   OK                          OK   \n",
       "        5                                   OK                          OK   \n",
       "\n",
       "                                                                        \\\n",
       "tool            pmc-sog_otf_couv99-shy_2_8 pmc-sog_otf_couv99-shy_4_16   \n",
       "model   formula                                                          \n",
       "philo10 1                               OK                          OK   \n",
       "        2                               OK                          OK   \n",
       "        3                               OK                          OK   \n",
       "        4                               OK                          OK   \n",
       "        5                               OK                          OK   \n",
1158
1159
       "\n",
       "                                                                       \\\n",
Jaime Arias's avatar
Jaime Arias committed
1160
       "tool            pmc-sog_otf_couv99-shy_4_4 pmc-sog_otf_couv99-shy_8_2   \n",
1161
1162
       "model   formula                                                         \n",
       "philo10 1                               OK                         OK   \n",
Jaime Arias's avatar
Jaime Arias committed
1163
       "        2                               OK                         OK   \n",
1164
1165
1166
1167
       "        3                               OK                         OK   \n",
       "        4                               OK                         OK   \n",
       "        5                               OK                         OK   \n",
       "\n",
Jaime Arias's avatar
Jaime Arias committed
1168
1169
1170
1171
1172
1173
1174
1175
       "                                                                               \\\n",
       "tool            pnml2lts-mc_dfs_1_1 pnml2lts-mc_dfs_1_16 pnml2lts-mc_ndfs_1_1   \n",
       "model   formula                                                                 \n",
       "philo10 1                       NaN                   OK                  NaN   \n",
       "        2                       NaN                   OK                  NaN   \n",
       "        3                       NaN                   OK                  NaN   \n",
       "        4                       NaN                   OK                  NaN   \n",
       "        5                       NaN                   OK                  NaN   \n",
1176
       "\n",
Jaime Arias's avatar
Jaime Arias committed
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
       "                                       \n",
       "tool            pnml2lts-mc_ndfs_1_16  \n",
       "model   formula                        \n",
       "philo10 1                          OK  \n",
       "        2                          OK  \n",
       "        3                          OK  \n",
       "        4                          OK  \n",
       "        5                          OK  \n",
       "\n",
       "[5 rows x 88 columns]"
Jaime Arias's avatar
Jaime Arias committed
1187
1188
      ]
     },
1189
     "execution_count": 12,
Jaime Arias's avatar
Jaime Arias committed
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# table with times, verification output and error for each experiment\n",
    "table = df.set_index(['model', 'formula', 'tool'], drop=True).unstack('tool')\n",
    "table.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Preprocessing of data"
   ]
  },
  {
   "cell_type": "code",
1209
   "execution_count": 13,
Jaime Arias's avatar
Jaime Arias committed
1210
1211
1212
1213
   "metadata": {},
   "outputs": [],
   "source": [
    "ZERO = 10e-5\n",
Jaime Arias's avatar
Jaime Arias committed
1214
    "TIMEOUT = 10 * 60 # 10 minutes = 600 seconds"
Jaime Arias's avatar
Jaime Arias committed
1215
1216
1217
1218
   ]
  },
  {
   "cell_type": "code",
1219
   "execution_count": 14,
Jaime Arias's avatar
Jaime Arias committed
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
Jaime Arias's avatar
Jaime Arias committed
1244
       "      <th>pmc-sog_otfL_couv99-default_1_1</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1245
       "      <th>pmc-sog_otfL_couv99-default_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1246
       "      <th>pmc-sog_otfL_couv99-shy_1_1</th>\n",
1247
       "      <th>pmc-sog_otfL_couv99-shy_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1248
       "      <th>pmc-sog_otfP_couv99-default_1_1</th>\n",
1249
       "      <th>pmc-sog_otfP_couv99-default_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1250
       "      <th>pmc-sog_otfP_couv99-shy_1_1</th>\n",
1251
       "      <th>pmc-sog_otfP_couv99-shy_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1252
       "      <th>pmc-sog_otf_couv99-default_2_16</th>\n",
1253
       "      <th>pmc-sog_otf_couv99-default_2_8</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1254
1255
       "      <th>...</th>\n",
       "      <th>pmc-sog_otf_couv99-shy_2_16</th>\n",
1256
       "      <th>pmc-sog_otf_couv99-shy_2_8</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1257
1258
       "      <th>pmc-sog_otf_couv99-shy_4_16</th>\n",
       "      <th>pmc-sog_otf_couv99-shy_4_4</th>\n",
1259
       "      <th>pmc-sog_otf_couv99-shy_8_2</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1260
       "      <th>pnml2lts-mc_dfs_1_1</th>\n",
1261
       "      <th>pnml2lts-mc_dfs_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1262
       "      <th>pnml2lts-mc_ndfs_1_1</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
       "      <th>pnml2lts-mc_ndfs_1_16</th>\n",
       "      <th>property</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>model</th>\n",
       "      <th>formula</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
Jaime Arias's avatar
Jaime Arias committed
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
Jaime Arias's avatar
Jaime Arias committed
1290
1291
1292
1293
1294
1295
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">philo10</th>\n",
       "      <th>1</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1296
       "      <td>600.0</td>\n",
1297
       "      <td>6.572</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1298
       "      <td>600.0</td>\n",
1299
       "      <td>5.926</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1300
       "      <td>600.0</td>\n",
1301
       "      <td>6.811</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1302
       "      <td>600.0</td>\n",
1303
       "      <td>6.862</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1304
1305
1306
1307
1308
1309
1310
1311
1312
       "      <td>5.688</td>\n",
       "      <td>5.705</td>\n",
       "      <td>...</td>\n",
       "      <td>600.000</td>\n",
       "      <td>6.921</td>\n",
       "      <td>12.902</td>\n",
       "      <td>13.706</td>\n",
       "      <td>16.728</td>\n",
       "      <td>600.0</td>\n",
1313
       "      <td>0.81</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1314
       "      <td>600.0</td>\n",
1315
       "      <td>0.19</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1316
1317
1318
1319
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1320
       "      <td>600.0</td>\n",
1321
       "      <td>5.179</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1322
       "      <td>600.0</td>\n",
1323
       "      <td>5.090</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1324
       "      <td>600.0</td>\n",
1325
       "      <td>4.575</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1326
       "      <td>600.0</td>\n",
1327
       "      <td>4.350</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1328
1329
1330
1331
1332
1333
1334
1335
1336
       "      <td>5.206</td>\n",
       "      <td>6.592</td>\n",
       "      <td>...</td>\n",
       "      <td>5.091</td>\n",
       "      <td>7.795</td>\n",
       "      <td>6.936</td>\n",
       "      <td>9.216</td>\n",
       "      <td>13.315</td>\n",
       "      <td>600.0</td>\n",
1337
       "      <td>0.43</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1338
       "      <td>600.0</td>\n",
1339
       "      <td>0.12</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1340
1341
1342
1343
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1344
       "      <td>600.0</td>\n",
1345
       "      <td>2.620</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1346
       "      <td>600.0</td>\n",
1347
       "      <td>4.383</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1348
       "      <td>600.0</td>\n",
1349
       "      <td>3.489</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1350
       "      <td>600.0</td>\n",
1351
       "      <td>4.143</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1352
1353
1354
1355
1356
1357
1358
1359
1360
       "      <td>3.801</td>\n",
       "      <td>6.219</td>\n",
       "      <td>...</td>\n",
       "      <td>4.822</td>\n",
       "      <td>6.958</td>\n",
       "      <td>6.129</td>\n",
       "      <td>8.621</td>\n",
       "      <td>10.305</td>\n",
       "      <td>600.0</td>\n",
1361
       "      <td>2.36</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1362
       "      <td>600.0</td>\n",
1363
       "      <td>0.16</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1364
1365
1366
1367
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1368
       "      <td>600.0</td>\n",
1369
       "      <td>2.379</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1370
       "      <td>600.0</td>\n",
1371
       "      <td>4.183</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1372
       "      <td>600.0</td>\n",
1373
       "      <td>4.322</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1374
       "      <td>600.0</td>\n",
1375
       "      <td>4.149</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1376
1377
1378
1379
1380
1381
1382
1383
1384
       "      <td>4.647</td>\n",
       "      <td>5.837</td>\n",
       "      <td>...</td>\n",
       "      <td>4.932</td>\n",
       "      <td>5.782</td>\n",
       "      <td>8.317</td>\n",
       "      <td>8.562</td>\n",
       "      <td>11.722</td>\n",
       "      <td>600.0</td>\n",
1385
       "      <td>0.54</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1386
       "      <td>600.0</td>\n",
1387
       "      <td>0.18</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1388
1389
1390
1391
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1392
       "      <td>600.0</td>\n",
1393
       "      <td>4.260</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1394
       "      <td>600.0</td>\n",
1395
       "      <td>7.320</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1396
       "      <td>600.0</td>\n",
1397
       "      <td>7.995</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1398
       "      <td>600.0</td>\n",
1399
       "      <td>7.629</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1400
1401
1402
1403
1404
1405
1406
1407
1408
       "      <td>8.440</td>\n",
       "      <td>8.405</td>\n",
       "      <td>...</td>\n",
       "      <td>9.307</td>\n",
       "      <td>8.542</td>\n",
       "      <td>16.590</td>\n",
       "      <td>13.513</td>\n",
       "      <td>16.733</td>\n",
       "      <td>600.0</td>\n",
1409
       "      <td>0.67</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1410
       "      <td>600.0</td>\n",
1411
       "      <td>0.08</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1412
1413
1414
1415
       "      <td>F</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
Jaime Arias's avatar
Jaime Arias committed
1416
       "<p>5 rows × 23 columns</p>\n",
Jaime Arias's avatar
Jaime Arias committed
1417
1418
1419
       "</div>"
      ],
      "text/plain": [
Jaime Arias's avatar
Jaime Arias committed
1420
1421
1422
1423
1424
1425
1426
1427
       "                 pmc-sog_otfL_couv99-default_1_1  \\\n",
       "model   formula                                    \n",
       "philo10 1                                  600.0   \n",
       "        2                                  600.0   \n",
       "        3                                  600.0   \n",
       "        4                                  600.0   \n",
       "        5                                  600.0   \n",
       "\n",
Jaime Arias's avatar
Jaime Arias committed
1428
1429
       "                 pmc-sog_otfL_couv99-default_1_16  \\\n",
       "model   formula                                     \n",
1430
1431
1432
1433
1434
       "philo10 1                                   6.572   \n",
       "        2                                   5.179   \n",
       "        3                                   2.620   \n",
       "        4                                   2.379   \n",
       "        5                                   4.260   \n",
Jaime Arias's avatar
Jaime Arias committed
1435
       "\n",
Jaime Arias's avatar
Jaime Arias committed
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
       "                 pmc-sog_otfL_couv99-shy_1_1  pmc-sog_otfL_couv99-shy_1_16  \\\n",
       "model   formula                                                              \n",
       "philo10 1                              600.0                         5.926   \n",
       "        2                              600.0                         5.090   \n",
       "        3                              600.0                         4.383   \n",
       "        4                              600.0                         4.183   \n",
       "        5                              600.0                         7.320   \n",
       "\n",
       "                 pmc-sog_otfP_couv99-default_1_1  \\\n",
       "model   formula                                    \n",
       "philo10 1                                  600.0   \n",
       "        2                                  600.0   \n",
       "        3                                  600.0   \n",
       "        4                                  600.0   \n",
       "        5                                  600.0   \n",
1451
       "\n",
1452
1453
1454
1455
1456
1457
1458
       "                 pmc-sog_otfP_couv99-default_1_16  \\\n",
       "model   formula                                     \n",
       "philo10 1                                   6.811   \n",
       "        2                                   4.575   \n",
       "        3                                   3.489   \n",
       "        4                                   4.322   \n",
       "        5                                   7.995   \n",
1459
       "\n",
Jaime Arias's avatar
Jaime Arias committed
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
       "                 pmc-sog_otfP_couv99-shy_1_1  pmc-sog_otfP_couv99-shy_1_16  \\\n",
       "model   formula                                                              \n",
       "philo10 1                              600.0                         6.862   \n",
       "        2                              600.0                         4.350   \n",
       "        3                              600.0                         4.143   \n",
       "        4                              600.0                         4.149   \n",
       "        5                              600.0                         7.629   \n",
       "\n",
       "                 pmc-sog_otf_couv99-default_2_16  \\\n",
       "model   formula                                    \n",
       "philo10 1                                  5.688   \n",
       "        2                                  5.206   \n",
       "        3                                  3.801   \n",
       "        4                                  4.647   \n",
       "        5                                  8.440   \n",
       "\n",
       "                 pmc-sog_otf_couv99-default_2_8  ...  \\\n",
       "model   formula                                  ...   \n",
       "philo10 1                                 5.705  ...   \n",
       "        2                                 6.592  ...   \n",
       "        3                                 6.219  ...   \n",
       "        4                                 5.837  ...   \n",
       "        5                                 8.405  ...   \n",
       "\n",
       "                 pmc-sog_otf_couv99-shy_2_16  pmc-sog_otf_couv99-shy_2_8  \\\n",
       "model   formula                                                            \n",
       "philo10 1                            600.000                       6.921   \n",
       "        2                              5.091                       7.795   \n",
       "        3                              4.822                       6.958   \n",
       "        4                              4.932                       5.782   \n",
       "        5                              9.307                       8.542   \n",
       "\n",
       "                 pmc-sog_otf_couv99-shy_4_16  pmc-sog_otf_couv99-shy_4_4  \\\n",
       "model   formula                                                            \n",
       "philo10 1                             12.902                      13.706   \n",
       "        2                              6.936                       9.216   \n",
       "        3                              6.129                       8.621   \n",
       "        4                              8.317                       8.562   \n",
       "        5                             16.590                      13.513   \n",
       "\n",
       "                 pmc-sog_otf_couv99-shy_8_2  pnml2lts-mc_dfs_1_1  \\\n",
       "model   formula                                                    \n",
       "philo10 1                            16.728                600.0   \n",
       "        2                            13.315                600.0   \n",
       "        3                            10.305                600.0   \n",
       "        4                            11.722                600.0   \n",
       "        5                            16.733                600.0   \n",
       "\n",
       "                 pnml2lts-mc_dfs_1_16  pnml2lts-mc_ndfs_1_1  \\\n",
       "model   formula                                               \n",
       "philo10 1                        0.81                 600.0   \n",
       "        2                        0.43                 600.0   \n",
       "        3                        2.36                 600.0   \n",
       "        4                        0.54                 600.0   \n",
       "        5                        0.67                 600.0   \n",
       "\n",
       "                 pnml2lts-mc_ndfs_1_16  property  \n",
       "model   formula                                   \n",
       "philo10 1                         0.19         F  \n",
       "        2                         0.12         F  \n",
       "        3                         0.16         F  \n",
       "        4                         0.18         F  \n",
       "        5                         0.08         F  \n",
       "\n",
       "[5 rows x 23 columns]"
Jaime Arias's avatar
Jaime Arias committed
1525
1526
      ]
     },
1527
     "execution_count": 14,
Jaime Arias's avatar
Jaime Arias committed
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# table with times for each experiment\n",
    "table_time = table['time'].copy()\n",
    "\n",
    "# replace non finished experiments with a dummy value, e.g. timeout\n",
    "table_time.fillna(TIMEOUT, inplace=True)\n",
    "\n",
    "# replace 0.00 time for 10^(-5), we cannot plot log(0)\n",
    "table_time.replace(0.0, ZERO, inplace=True)\n",
    "\n",
    "# add verification output to the table\n",
    "table_time = pd.concat([table_time, p_df], axis=1)\n",
    "\n",
    "table_time.head()"
   ]
  },
  {
   "cell_type": "code",
1550
   "execution_count": 15,
Jaime Arias's avatar
Jaime Arias committed
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
Jaime Arias's avatar
Jaime Arias committed
1575
       "      <th>pmc-sog_otfL_couv99-default_1_1</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1576
       "      <th>pmc-sog_otfL_couv99-default_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1577
       "      <th>pmc-sog_otfL_couv99-shy_1_1</th>\n",
1578
       "      <th>pmc-sog_otfL_couv99-shy_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1579
       "      <th>pmc-sog_otfP_couv99-default_1_1</th>\n",
1580
       "      <th>pmc-sog_otfP_couv99-default_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1581
       "      <th>pmc-sog_otfP_couv99-shy_1_1</th>\n",
1582
       "      <th>pmc-sog_otfP_couv99-shy_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1583
       "      <th>pmc-sog_otf_couv99-default_2_16</th>\n",
1584
       "      <th>pmc-sog_otf_couv99-default_2_8</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1585
1586
       "      <th>...</th>\n",
       "      <th>pmc-sog_otf_couv99-shy_2_16</th>\n",
1587
       "      <th>pmc-sog_otf_couv99-shy_2_8</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1588
1589
       "      <th>pmc-sog_otf_couv99-shy_4_16</th>\n",
       "      <th>pmc-sog_otf_couv99-shy_4_4</th>\n",
1590
       "      <th>pmc-sog_otf_couv99-shy_8_2</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1591
       "      <th>pnml2lts-mc_dfs_1_1</th>\n",
1592
       "      <th>pnml2lts-mc_dfs_1_16</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1593
       "      <th>pnml2lts-mc_ndfs_1_1</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
       "      <th>pnml2lts-mc_ndfs_1_16</th>\n",
       "      <th>property</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>model</th>\n",
       "      <th>formula</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
Jaime Arias's avatar
Jaime Arias committed
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
Jaime Arias's avatar
Jaime Arias committed
1621
1622
1623
1624
1625
1626
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">philo10</th>\n",
       "      <th>1</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1627
1628
1629
1630
1631
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1632
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1633
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1634
1635
1636
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1637
1638
       "      <td>...</td>\n",
       "      <td>U</td>\n",
1639
1640
1641
1642
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
1643
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1644
1645
       "      <td>U</td>\n",
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1646
1647
1648
1649
1650
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1651
1652
1653
1654
1655
1656
1657
1658
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1659
1660
       "      <td>F</td>\n",
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1661
       "      <td>...</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1662
1663
       "      <td>F</td>\n",
       "      <td>F</td>\n",
1664
1665
1666
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1667
1668
       "      <td>U</td>\n",
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1669
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1670
1671
1672
1673
1674
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1675
1676
1677
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
1678
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1679
       "      <td>U</td>\n",
1680
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1681
1682
1683
1684
1685
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>...</td>\n",
1686
       "      <td>F</td>\n",
1687
       "      <td>F</td>\n",
1688
       "      <td>F</td>\n",
1689
1690
       "      <td>F</td>\n",
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1691
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1692
1693
       "      <td>U</td>\n",
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1694
1695
1696
1697
1698
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1699
1700
1701
1702
1703
1704
1705
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
1706
1707
1708
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1709
       "      <td>...</td>\n",
1710
       "      <td>F</td>\n",
1711
1712
1713
1714
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1715
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1716
1717
       "      <td>U</td>\n",
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1718
1719
1720
1721
1722
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
Jaime Arias's avatar
Jaime Arias committed
1723
1724
1725
1726
1727
1728
1729
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1730
1731
1732
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1733
       "      <td>...</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1734
       "      <td>F</td>\n",
1735
1736
1737
1738
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "      <td>F</td>\n",
1739
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1740
1741
       "      <td>U</td>\n",
       "      <td>U</td>\n",
Jaime Arias's avatar
Jaime Arias committed
1742
1743
1744
1745
1746
       "      <td>F</td>\n",
       "      <td>F</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
Jaime Arias's avatar
Jaime Arias committed
1747
       "<p>5 rows × 23 columns</p>\n",
Jaime Arias's avatar
Jaime Arias committed
1748
1749
1750
       "</div>"
      ],
      "text/plain": [
Jaime Arias's avatar
Jaime Arias committed
1751
1752
1753
1754
1755
1756
1757
       "                pmc-sog_otfL_couv99-default_1_1  \\\n",
       "model   formula                                   \n",
       "philo10 1                                     U   \n",
       "        2                                     U   \n",
       "        3                                     U   \n",
       "        4                                     U   \n",
       "        5                                     U   \n",
1758
       "\n",
Jaime Arias's avatar
Jaime Arias committed
1759
1760
1761
1762
1763