|
|
| """claims.py — All 16 registered validity claims"""
|
|
|
| from engine import Claim
|
|
|
|
|
| TOPOLOGY_CLAIMS = [
|
| Claim(
|
| type="topology",
|
| spec="topology_preservation",
|
| evidence=["kernel", "topology", "state"]
|
| ),
|
| Claim(
|
| type="topology",
|
| spec="reachability",
|
| evidence=["graph", "start", "goal"]
|
| ),
|
| Claim(
|
| type="topology",
|
| spec="floating_ports",
|
| evidence=["circuit", "connections"]
|
| ),
|
| Claim(
|
| type="topology",
|
| spec="conduction_soundness",
|
| evidence=["voltage_levels", "transitions"]
|
| ),
|
| Claim(
|
| type="topology",
|
| spec="cycle_detection",
|
| evidence=["graph_edges", "visited"]
|
| ),
|
| ]
|
|
|
|
|
| NUMERIC_CLAIMS = [
|
| Claim(
|
| type="numeric",
|
| spec="feasibility_bounds",
|
| evidence=["cpu", "memory", "latency"]
|
| ),
|
| Claim(
|
| type="numeric",
|
| spec="resource_conservation",
|
| evidence=["allocated", "used", "freed"]
|
| ),
|
| Claim(
|
| type="numeric",
|
| spec="timing_constraints",
|
| evidence=["start_time", "end_time", "deadline"]
|
| ),
|
| Claim(
|
| type="numeric",
|
| spec="bitwidth_overflow",
|
| evidence=["operands", "bitwidth", "result"]
|
| ),
|
| ]
|
|
|
|
|
| STACK_MACHINE_CLAIMS = [
|
| Claim(
|
| type="stack_machine",
|
| spec="stack_depth_bound",
|
| evidence=["instructions", "max_depth"]
|
| ),
|
| Claim(
|
| type="stack_machine",
|
| spec="frame_integrity",
|
| evidence=["frames", "pointers"]
|
| ),
|
| Claim(
|
| type="stack_machine",
|
| spec="return_address_validity",
|
| evidence=["return_stack", "code_pointers"]
|
| ),
|
| Claim(
|
| type="stack_machine",
|
| spec="variable_initialization",
|
| evidence=["variables", "init_sites"]
|
| ),
|
| Claim(
|
| type="stack_machine",
|
| spec="no_use_after_free",
|
| evidence=["allocation", "deallocation", "access"]
|
| ),
|
| Claim(
|
| type="stack_machine",
|
| spec="no_buffer_overflow",
|
| evidence=["buffers", "accesses", "bounds"]
|
| ),
|
| Claim(
|
| type="stack_machine",
|
| spec="type_safety",
|
| evidence=["instructions", "operands", "types"]
|
| ),
|
| ]
|
|
|
| ALL_CLAIMS = TOPOLOGY_CLAIMS + NUMERIC_CLAIMS + STACK_MACHINE_CLAIMS
|
|
|
| def get_claims_by_type(claim_type: str):
|
| """Get all claims of a specific type"""
|
| return [c for c in ALL_CLAIMS if c.type == claim_type]
|
|
|
| def get_all_claims():
|
| """Get all 16 claims"""
|
| return ALL_CLAIMS
|
|
|