Hiord: An Approach to the Specification and Verification of Higher-Order (C)LP Programs

📅 2025-07-23
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge of static verification for higher-order programs in Constraint Logic Programming (C)LP. We present the first framework enabling compile-time verification of higher-order assertions. Our method extends the assertion language to formally specify higher-order parameters, establishes a predicate-based semantic model for higher-order assertions—defining a semantic ordering among properties to ensure consistency—and employs abstract interpretation combined with syntactic-semantic restructuring to safely reduce higher-order properties to first-order ones, thereby enabling decidable static analysis. Implemented as a prototype on the Ciao platform, our approach is validated on multiple real-world higher-order (C)LP programs. Results demonstrate both theoretical soundness and practical effectiveness, significantly enhancing correctness guarantees for higher-order (C)LP programs.

Technology Category

Application Category

📝 Abstract
Higher-order constructs enable more expressive and concise code by allowing procedures to be parameterized by other procedures. Assertions allow expressing partial program specifications, which can be verified either at compile time (statically) or run time (dynamically). In higher-order programs, assertions can also describe higher-order arguments. While in the context of (C)LP, run-time verification of higher-order assertions has received some attention, compile-time verification remains relatively unexplored. We propose a novel approach for statically verifying higher-order (C)LP programs with higher-order assertions. Although we use the Ciao assertion language for illustration, our approach is quite general and we believe is applicable to similar contexts. Higher-order arguments are described using predicate properties -- a special kind of property which exploits the (Ciao) assertion language. We refine the syntax and semantics of these properties and introduce an abstract criterion to determine conformance to a predicate property at compile time, based on a semantic order relation comparing the predicate property with the predicate assertions. We then show how to handle these properties using an abstract interpretation-based static analyzer for programs with first-order assertions by reducing predicate properties to first-order properties. Finally, we report on a prototype implementation and evaluate it through various examples within the Ciao system.
Problem

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

Static verification of higher-order (C)LP programs with assertions
Describing higher-order arguments using refined predicate properties
Reducing predicate properties to first-order for abstract interpretation
Innovation

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

Statically verifies higher-order (C)LP programs
Uses predicate properties for higher-order arguments
Reduces predicate properties to first-order properties
🔎 Similar Papers
No similar papers found.
M
Marco Ciccalè
Universidad Politécnica de Madrid (UPM), IMDEA Software Institute, Madrid, Spain
D
Daniel Jurjo-Rivas
Universidad Politécnica de Madrid (UPM), IMDEA Software Institute, Madrid, Spain
Jose F. Morales
Jose F. Morales
Assistant Professor at UPM / IMDEA Software Institute
Logic ProgrammingVirtual MachinesCompilersAbstract InterpretationStatic Analysis
P
Pedro López-García
Spanish Council for Scientific Research, IMDEA Software Institute, Madrid, Spain
M
Manuel V. Hermenegildo
Universidad Politécnica de Madrid (UPM), IMDEA Software Institute, Madrid, Spain