Automated Random Testing of Numerical Constrained Types - Archive ouverte HAL Accéder directement au contenu
Communication Dans Un Congrès Année : 2021

Automated Random Testing of Numerical Constrained Types

Résumé

We propose an automated testing framework based on constraint programming techniques. Our framework allows the developer to attach a numerical constraint to a type that restricts its set of possible values. We use this constraint as a partial specification of the program, our goal being to derive property-based tests on such annotated programs. To achieve this, we rely on the user-provided constraints on the types of a program: for each function f present in the program, that returns a constrained type, we generate a test. The tests consists of generating uniformly pseudo-random inputs and checking whether f 's output satisfies the constraint. We are able to automate this process by providing a set of generators for primitive types and generator combinators for composite types. To derive generators for constrained types, we present in this paper a technique that characterizes their inhabitants as the solution set of a numerical CSP. This is done by combining abstract interpretation and constraint solving techniques that allow us to efficiently and uniformly generate solutions of numerical CSP. We validated our approach by implementing it as a syntax extension for the OCaml language.
Fichier principal
Vignette du fichier
LIPIcs-CP-2021-59.pdf (811.53 Ko) Télécharger le fichier
Origine : Fichiers éditeurs autorisés sur une archive ouverte

Dates et versions

hal-03667623 , version 1 (13-05-2022)

Identifiants

Citer

Ghiles Ziat, Matthieu Dien, Vincent Botbol. Automated Random Testing of Numerical Constrained Types. 27th International Conference on Principles and Practice of Constraint Programming (CP 2021), Oct 2021, Montpellier, France. pp.59:1-59:19, ⟨10.4230/LIPIcs.CP.2021.59⟩. ⟨hal-03667623⟩
49 Consultations
12 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More