Abstract Compilation as Abstraction of Operator Semantics, applied to Cost Analysis
Traditional least fixed-point semantics often fails to support precise static cost analysis due to its neglect of recursive structural information. This work proposes operator semantics as an intermediate representation bridging syntax and denotational semantics, treating programs as operators and constructing a higher-order abstract domain grounded in category theory, with composition as the core primitive. This framework enables abstract compilation that simultaneously achieves soundness, precision, and modularity. The approach supports cost analysis for general functional unknowns and generalized fold-based metrics, leveraging a solver-agnostic technique for extracting optimal recurrence relations. Consequently, it facilitates precise static cost analysis of recursive programs over algebraic data types, encompassing generalized size metrics beyond the reach of conventional methods.