Hostname: page-component-74656f9884-54qdv Total loading time: 0 Render date: 2026-11-09T21:58:50.731Z Has data issue: false hasContentIssue false

VeriFly: On-the-fly Assertion Checking via Incrementality

Published online by Cambridge University Press:  02 November 2021

MIGUEL A. SANCHEZ-ORDAZ
Affiliation:
IMDEA Software Institute and Universidad Politécnica de Madrid (UPM) (e-mails: ma.sanchez.ordaz@imdea.org, isabel.garcia@imdea.org, victor.perez@imdea.org, josef.morales@imdea.org)
ISABEL GARCIA-CONTRERAS
Affiliation:
IMDEA Software Institute and Universidad Politécnica de Madrid (UPM) (e-mails: ma.sanchez.ordaz@imdea.org, isabel.garcia@imdea.org, victor.perez@imdea.org, josef.morales@imdea.org)
VICTOR PEREZ
Affiliation:
IMDEA Software Institute and Universidad Politécnica de Madrid (UPM) (e-mails: ma.sanchez.ordaz@imdea.org, isabel.garcia@imdea.org, victor.perez@imdea.org, josef.morales@imdea.org)
JOSÉ F. MORALES
Affiliation:
IMDEA Software Institute and Universidad Politécnica de Madrid (UPM) (e-mails: ma.sanchez.ordaz@imdea.org, isabel.garcia@imdea.org, victor.perez@imdea.org, josef.morales@imdea.org)
PEDRO LOPEZ-GARCIA
Affiliation:
IMDEA Software Institute and Spanish Council for Scientific Research (CSIC) (e-mail: pedro.lopez@imdea.org)
MANUEL V. HERMENEGILDO
Affiliation:
IMDEA Software Institute and Universidad Politécnica de Madrid (UPM) (e-mail: manuel.hermenegildo@imdea.org)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Assertion checking is an invaluable programmer’s tool for finding many classes of errors or verifying their absence in dynamic languages such as Prolog. For Prolog programmers, this means being able to have relevant properties, such as modes, types, determinacy, nonfailure, sharing, constraints, and cost, checked and errors flagged without having to actually run the program. Such global static analysis tools are arguably most useful the earlier they are used in the software development cycle, and fast response times are essential for interactive use. Triggering a full and precise semantic analysis of a software project every time a change is made can be prohibitively expensive. This is specially the case when complex properties need to be inferred for large, realistic code bases. In our static analysis and verification framework, this challenge is addressed through a combination of modular and incremental (context- and path-sensitive) analysis that is responsive to program edits, at different levels of granularity. In this tool paper, we present how the combination of this framework within an integrated development environment (IDE) takes advantage of such incrementality to achieve a high level of reactivity when reflecting analysis and verification results back as colorings and tooltips directly on the program text – the tool’s VeriFly mode. The concrete implementation that we describe is Emacs-based and reuses in part off-the-shelf “on-the-fly” syntax checking facilities (flycheck). We believe that similar extensions are also reproducible with low effort in other mature development environments. Our initial experience with the tool shows quite promising results, with low latency times that provide early, continuous, and precise assertion checking and other semantic feedback to programmers during the development process. The tool supports Prolog natively, as well as other languages by semantic transformation into Horn clauses.

Information

Type
Original Article
Copyright
© The Author(s), 2021. Published by Cambridge University Press