Pasar al contenido principal

Resultados relacionados

Resultados totales (Incluyendo duplicados): 3
Encontrada(s) 1 página(s)

DIGITAL.CSIC. Repositorio Institucional del CSIC
Publicación Artículo científico (JournalArticle)

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

  • Ciccalè, Marco
  • Jurjo-Rivas, Daniel
  • Morales, José F.
  • López-García, Pedro
  • Hermenegildo, Manuel
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., Partially funded by MICIU projects CEX2024-001471-M María de Maeztu and TED2021-132464B-I00 PRODIGY , as well as by the Tezos foundation. We would also like to thank the anonymous reviewers for their very useful and constructive feedback., Peer reviewed
DIGITAL.CSIC. Repositorio Institucional del CSIC
Publicación Otros (Other)

Multi-configurable Search Rules in Prolog and Application to Testing

  • Ferreiro, Daniela
  • Morales, José F.
  • López-García, Pedro
  • Hermenegildo, Manuel V.
Practical Aspects of Declarative Languages. PADL 2026. Lecture Notes in Computer Science, vol 16401 19 páginas, 5 figuras, 1 tabla, Prolog systems traditionally employ leftmost, depth-first search as their execution strategy. This choice is well-justified for effi- ciency reasons, generally accepted, and useful in practice. However, it is also well-known that it can lead to incompleteness when evaluating programs over infinite search spaces and may not be ideal for complex search spaces. We revisit the role of search strategies in Prolog programs, and present a new approach, that enables programmable and compos- able control of search. While advanced search strategies can always be programmed in Prolog, we opt instead for an approach that separates the search strategy used from the actual code, so that different strategies can be used on the same set of clauses. We provide constructs for controlling the search strategies that allow adapting the search dynamically. We also illustrate the usefulness of the proposed approach by applying it in the context of testing (constraint) logic programs, showing how composable search parameters enable more controlled and targeted exploration of program behavior., Partially funded by MICIU projects CEX2024-001471-M María de Maeztu and TED2021-132464B-I00 PRODIGY, as well as by the Tezos foundation. We would also like to thank the reviewers for their very useful and constructive feedback.
DIGITAL.CSIC. Repositorio Institucional del CSIC
Publicación Artículo científico (JournalArticle)

Exploiting Multiple Abstract Call Patterns for Optimizing Run-Time Checks

  • Ferreiro, Daniela
  • Jurjo-Rivas, Daniel
  • Morales, José F.
  • López-García, Pedro
  • Hermenegildo, Manuel V.
20 páginas, 6 figuras, 3 tablas, In strongly typed languages, types are verified at compile time, while dynamically typed languages, such as Prolog, perform type consistency checks entirely at run-time. Extending dynamic languages with assertions allows expressing both classical types and more general properties, providing high expressiveness, but at the cost of run-time overhead. Abstract interpretation allows safely approximating such program properties at compile time, which has been used to reduce the number of properties that require run-time checks, while still reporting unverified properties that can guide further static analyses, testing, or domain refinement. In this work, we first study how to selectively integrate the run-time semantics of assertion properties into a multivariant, top-down, goal-directed abstract interpretation algorithm. We then show how multiple inferred calling patterns can be exploited to reduce the number of properties that must be checked at run-time, thus minimizing the overhead. Finally, we report on an implementation of our approach in the Ciao system and provide performance results showing improvements over previously reported techniques., Partially funded by MICIU project CEX2024-001471-M María de Maeztu and by the European Union MSCA GA 101154447 NEAT. We would also like to thank the anonymous reviewers for their very useful and constructive feedback., Peer reviewed