Parcourir la source

test-fix: execute formal cover witnesses

Codex Resource Selftest il y a 4 mois
Parent
commit
18ee6f84dd

+ 1 - 1
config/prod2u_p4_verification_targets_v1.json

@@ -41,7 +41,7 @@
       {"name": "frame_tx_contract", "tasks": ["prove"]},
       {"name": "frame_tx_contract", "tasks": ["prove"]},
       {"name": "output_target_ram_contract", "tasks": ["prove"]},
       {"name": "output_target_ram_contract", "tasks": ["prove"]},
       {"name": "simple_frame_contract", "tasks": ["prove"]},
       {"name": "simple_frame_contract", "tasks": ["prove"]},
-      {"name": "simple_motor_temperature_contract", "tasks": ["prove"]},
+      {"name": "simple_motor_temperature_contract", "tasks": ["prove", "cover"]},
       {"name": "pwm_scheduler_contract", "tasks": ["prove"]},
       {"name": "pwm_scheduler_contract", "tasks": ["prove"]},
       {"name": "host_watchdog_contract", "tasks": ["prove"]}
       {"name": "host_watchdog_contract", "tasks": ["prove"]}
     ]
     ]

+ 9 - 4
tests/formal/simple_motor_temperature_contract.sby

@@ -1,12 +1,17 @@
+[tasks]
+cover
+prove
+
 [options]
 [options]
-mode prove
+cover: mode cover
+prove: mode prove
 depth 128
 depth 128
 
 
-[engines]
+[engines prove]
 abc pdr
 abc pdr
 
 
-[tasks]
-prove
+[engines cover]
+smtbmc yices
 
 
 [script]
 [script]
 read_verilog -formal door_motor_engine.v
 read_verilog -formal door_motor_engine.v

+ 7 - 0
tests/unit/test_codex_harness.py

@@ -425,6 +425,13 @@ class CodexHarnessTests(unittest.TestCase):
             sorted(manifest["layers"]["icarus"]),
             sorted(manifest["layers"]["icarus"]),
         )
         )
 
 
+    def test_simple_motor_temperature_task_engines_match_formal_contract(self):
+        path = ROOT / "tests" / "formal" / "simple_motor_temperature_contract.sby"
+        self.assertEqual(
+            prod2u_p4_harness.formal_task_engines(path, ["prove", "cover"]),
+            {"prove": ["abc pdr"], "cover": ["smtbmc yices"]},
+        )
+
     def test_agent_task_report_accepts_unconstrained_observations_and_full_commits(self):
     def test_agent_task_report_accepts_unconstrained_observations_and_full_commits(self):
         # A capability probe is a read-only report for the exact dispatch HEAD.
         # A capability probe is a read-only report for the exact dispatch HEAD.
         # It must not reinterpret later production/formal commits as this task's
         # It must not reinterpret later production/formal commits as this task's