{"id":"visitor-dual-hierarchy-grounds-ocp-inversion-mechanism","text":"Visitor's dual class hierarchy architecture (orthogonal element and visitor hierarchies) is a primary structural mechanism that supports OCP axis inversion: the standard OCP axis (add new types) relies on a single hierarchy, while inverting it (add new operations) benefits from a second orthogonal hierarchy to house new operations independently of the element hierarchy — the dual hierarchy provides the structural foundation for bidirectional extensibility, though the antecedents establish this as the mechanism enabling structural independence and explicit axis tradeoff rather than demonstrating it is the only possible approach.","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["visitor-dual-hierarchy-enables-structural-independence","visitor-dispatch-implements-ocp-inversion"],"outlist":[],"label":"The dual hierarchy is the structural prerequisite that makes double-dispatch OCP inversion possible, not just a convenience"}],"dependents":["double-dispatch-completes-visitor-extensibility-mechanism"],"metadata":{"source_type":"derived","review_result":"pass","repair_action":"softened"},"created_at":"2026-06-18T01:19:55+00:00","updated_at":"2026-06-18T06:15:08+00:00","reviewed_at":"2026-06-18T06:15:08+00:00","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"visitor-dual-hierarchy-grounds-ocp-inversion-mechanism","truth_value":"IN","reason":"SL justification valid","antecedents":["visitor-dual-hierarchy-enables-structural-independence","visitor-dispatch-implements-ocp-inversion"],"label":"The dual hierarchy is the structural prerequisite that makes double-dispatch OCP inversion possible, not just a convenience"},{"node":"visitor-dual-hierarchy-enables-structural-independence","truth_value":"IN","reason":"SL justification valid","antecedents":["gof-visitor-two-class-hierarchies","gof-visitor-no-common-parent-required"],"label":"Dual hierarchy architecture directly enables the no-common-parent capability"},{"node":"gof-visitor-two-class-hierarchies","truth_value":"IN","reason":"premise"},{"node":"gof-visitor-no-common-parent-required","truth_value":"IN","reason":"premise"},{"node":"visitor-dispatch-implements-ocp-inversion","truth_value":"IN","reason":"SL justification valid","antecedents":["visitor-double-dispatch-mechanism","visitor-inverts-ocp-axis"],"label":"The dispatch mechanism IS the axis inversion — not two independent properties but implementation and consequence"},{"node":"visitor-double-dispatch-mechanism","truth_value":"IN","reason":"SL justification valid","antecedents":["gof-visitor-double-dispatch-via-accept","visitor-passed-as-argument-to-accept","gof-visitor-two-class-hierarchies"],"label":"Accept-as-argument + callback-encodes-type + two-hierarchy-structure together constitute the double-dispatch mechanism"},{"node":"gof-visitor-double-dispatch-via-accept","truth_value":"IN","reason":"premise"},{"node":"visitor-passed-as-argument-to-accept","truth_value":"IN","reason":"premise"},{"node":"visitor-inverts-ocp-axis","truth_value":"IN","reason":"SL justification valid","antecedents":["visitor-enables-open-ended-operations","visitor-tradeoff-stable-structure-required","ocp-open-for-extension-closed-for-modification"],"label":"Visitor's open-ops/closed-structure stance is the precise mirror of OCP's open-structure/closed-ops stance"},{"node":"visitor-enables-open-ended-operations","truth_value":"IN","reason":"premise"},{"node":"visitor-tradeoff-stable-structure-required","truth_value":"IN","reason":"premise"},{"node":"ocp-open-for-extension-closed-for-modification","truth_value":"IN","reason":"premise"}]}}