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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Ciccalè, Marco, Jurjo-Rivas, Daniel, Morales, Jose F., López-García, Pedro, Hermenegildo, Manuel V.
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912580281303040
author Ciccalè, Marco
Jurjo-Rivas, Daniel
Morales, Jose F.
López-García, Pedro
Hermenegildo, Manuel V.
author_facet Ciccalè, Marco
Jurjo-Rivas, Daniel
Morales, Jose F.
López-García, Pedro
Hermenegildo, Manuel V.
contents 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 (constraint) logic programming ((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.
format Preprint
id arxiv_https___arxiv_org_abs_2507_17233
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Hiord#: An Approach to the Specification and Verification of Higher-Order (C)LP Programs
Ciccalè, Marco
Jurjo-Rivas, Daniel
Morales, Jose F.
López-García, Pedro
Hermenegildo, Manuel V.
Programming Languages
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 (constraint) logic programming ((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.
title Hiord#: An Approach to the Specification and Verification of Higher-Order (C)LP Programs
topic Programming Languages
url https://arxiv.org/abs/2507.17233