On The Metric Nature of (Differential) Logical Relations

πŸ“… 2025-05-02
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
The metric nature of differential logical relations in higher-order program difference modeling remains poorly understood, hindering principled quantification of program discrepancies. Method: We systematically characterize the mathematical structure of the distance function induced by such relations, introducing the novel concept of a *quasi-quasimetric*. We rigorously prove that differential logical relations induce quasi-quasimetrics and establish their unified correspondence with quasimetrics and partial metrics. Leveraging this foundation, we derive compositional program-difference inference rules enabling modular analysis of input–output error propagation. Our approach integrates type theory, programming language semantics, metric space theory, and logical relations. Contribution: This work provides the first formal metric foundation for differential logical relations, clarifies their structural role in program error quantification, and establishes a novel compositional reasoning framework for robustness and difference verification of higher-order programs.

Technology Category

Application Category

πŸ“ Abstract
Differential logical relations are a method to measure distances between higher-order programs. They differ from standard methods based on program metrics in that differences between functional programs are themselves functions, relating errors in input with errors in output, this way providing a more fine grained, contextual, information. The aim of this paper is to clarify the metric nature of differential logical relations. While previous work has shown that these do not give rise, in general, to (quasi-)metric spaces nor to partial metric spaces, we show that the distance functions arising from such relations, that we call quasi-quasi-metrics, can be related to both quasi-metrics and partial metrics, the latter being also captured by suitable relational definitions. Moreover, we exploit such connections to deduce some new compositional reasoning principles for program differences.
Problem

Research questions and friction points this paper is trying to address.

Measure distances between higher-order programs
Clarify metric nature of differential logical relations
Establish connections to quasi-metrics and partial metrics
Innovation

Methods, ideas, or system contributions that make the work stand out.

Differential logical relations measure program distances
Quasi-quasi-metrics link quasi and partial metrics
New compositional reasoning for program differences
πŸ”Ž Similar Papers
No similar papers found.