Hostname: page-component-74656f9884-npj9w Total loading time: 0 Render date: 2026-11-06T16:20:03.666Z Has data issue: false hasContentIssue false

Exploiting Multiple Abstract Call Patterns for Optimizing Run-Time Checks

Published online by Cambridge University Press:  07 August 2026

DANIELA FERREIRO
Affiliation:
Universidad Politecnica de Madrid, Spain, Instituto IMDEA Software, Spain (e-mails: d.ferreiro@alumnos.upm.es, daniel.jurjo@alumnos.upm.es, m.ciccale@alumnos.upm.es)
DANIEL JURJO-RIVAS
Affiliation:
Universidad Politecnica de Madrid, Spain, Instituto IMDEA Software, Spain (e-mails: d.ferreiro@alumnos.upm.es, daniel.jurjo@alumnos.upm.es, m.ciccale@alumnos.upm.es)
MARCO CICCALÈ
Affiliation:
Universidad Politecnica de Madrid, Spain, Instituto IMDEA Software, Spain (e-mails: d.ferreiro@alumnos.upm.es, daniel.jurjo@alumnos.upm.es, m.ciccale@alumnos.upm.es)
JOSE F. MORALES
Affiliation:
Instituto IMDEA Software, Spain, Artificial Intelligence Department, Universidad Politecnica de Madrid, Spain (e-mail: josefrancisco.morales@upm.es)
PEDRO LOPEZ-GARCIA
Affiliation:
Instituto IMDEA Software, Spain, Tecnologías de la Información y las Comunicaciones (TIC), Instituto de Tecnologías Físicas y de la Información (ITEFI), Consejo Superior de Investigaciones Cientificas, Spain (e-mail: pedro.lopez@csic.es)
MANUEL V. HERMENEGILDO
Affiliation:
Universidad Politecnica de Madrid, Spain, Instituto IMDEA Software, Spain (e-mail: manuel.hermenegildo@upm.es)
Rights & Permissions [Opens in a new window]

Abstract

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.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press
Figure 0

Figure 1. Reduction rules for the operational semantics of (C)LP programs.

Figure 1

Figure 2. An example Prolog program with an assertion capturing its behavior.

Figure 2

Figure 3. Reduction rules for the operational semantics of (C)LP programs with assertions.

Figure 3

Figure 4. Analysis graph of the p/2$\mathit{p/2}$ predicate in Figure 5 with the abstract domain in Figure 6.

Figure 4

Figure 5. Program with different calling modes.

Figure 5

Figure 6. Abstract domain lattice.

Figure 6

Algorithm 1 absAssrtProjs function.Algorithm 1 long description.

Figure 7

Algorithm 2 absAssrtPrimes function.Algorithm 2 long description.

Figure 8

Algorithm 3 vers program transformation.Algorithm 3 long description.

Figure 9

Table 1. Number of reduced properties (%)Table 1 long description.

Figure 10

Table 2. Execution time, ms (speed-up w.r.t. rt)Table 2 long description.

Figure 11

Table 3. Number of reduced properties (%) for LPdocTable 3 long description.