Просмотр исходного кода

validate active formal property registry

root 3 месяцев назад
Родитель
Сommit
eb646977ac
1 измененных файлов с 5 добавлено и 4 удалено
  1. 5 4
      tools/run_6400_formal.py

+ 5 - 4
tools/run_6400_formal.py

@@ -386,15 +386,16 @@ def run_job(job: dict[str, Any], run_root: Path, timeout: int) -> dict[str, Any]
 def validate_manifest(manifest: dict[str, Any]) -> None:
     properties = manifest.get("properties", [])
     ids = [entry.get("id") for entry in properties]
-    expected = [f"P{index:02d}" for index in range(1, 19)]
-    if ids != expected:
-        raise ValueError(f"formal property IDs must be exactly {expected}, got {ids}")
+    if not ids or any(not isinstance(value, str) or not value for value in ids):
+        raise ValueError("formal property IDs must be non-empty strings")
+    if len(ids) != len(set(ids)):
+        raise ValueError(f"formal property IDs must be unique, got {ids}")
     proof_targets = manifest.get("proof_targets", [])
     if not proof_targets:
         raise ValueError("proof_targets is empty")
     harnesses = {entry["sby"] for entry in proof_targets}
     if any(entry.get("harness") not in harnesses for entry in properties):
-        raise ValueError("a P01-P18 property references a non-proof harness")
+        raise ValueError("a formal property references a non-proof harness")
     for target in [*proof_targets, *manifest.get("cover_targets", [])]:
         sby_path = FORMAL_DIR / target["sby"]
         if not sby_path.is_file():