Atelier des rouesLaboratoire EN
Objets/Documentation

comparaison13.py

Je fournis le matériel du contrôle AT.G27.

Télécharger ↓
"""Inspect the paired B benchmark and its published certificates. Use garanties12.py for full replay."""
from hashlib import sha256
from pathlib import Path
import json

HERE=Path(__file__).resolve().parent
def run():
    rows=json.loads((HERE/'mesures-incremental13.json').read_bytes())
    out=[]
    for row,name in zip(rows,('certificat-libre-B.json','certificat-incremental13.json')):
        raw=(HERE/name).read_bytes(); cert=json.loads(raw)['B']
        n=len(cert['paths']); events=row['events']
        assert n==row['final_paths']==row['readers']['sat']['answer']['paths']==row['readers']['special']['answer']['paths']
        assert [e[1] for e in events]==list(range(2,n+1)) and len(cert['refutations'])==n-1
        assert sorted(events)==events and row['paths_at_60']==max([1]+[k for s,k in events if s<=60])
        out.append(dict(mode=row['mode'],at_60=row['paths_at_60'],final=n,

Lire dans son contexte

Commentaires

Les commentaires en français et en anglais sont réunis ici.

La discussion reste consultable. J’ouvrirai les participations dès que la protection antispam sera configurée.