A Constraint Solver for PHP Arrays - Archive ouverte HAL Accéder directement au contenu
Communication Dans Un Congrès Année : 2013

A Constraint Solver for PHP Arrays

Résumé

In previous works, we have proposed Praspel, a framework for contract-based testing in PHP. Among others, it includes a specification language and a unit test generator which automatically generates test data from formal preconditions. The generator sometimes rejects data, when they do not satisfy parts of the preconditions. In many cases, generation with rejection is not efficient enough. Thus we investigate practical contexts where more efficient generation algorithms can be designed and we extend Praspel with their implementation. After strings, that we have already considered, the most frequent data type in PHP is arrays. They cover most of the needs for collections, because they can store key-value pairs of any kind, they do not have a specific length or depth, and they are efficiently implemented. In this paper, we report on a study to know what are the most popular constraints on PHP arrays. Then we formalize these constraints and we present an implementation in PHP of a constraint solver for these constraints. In this context, the constraint-based approach removes all the rejections.
Fichier principal
Vignette du fichier
EGB13.pdf (230.51 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-00909202 , version 1 (26-11-2013)

Identifiants

Citer

Ivan Enderlin, Alain Giorgetti, Fabrice Bouquet. A Constraint Solver for PHP Arrays. ICSTW - Sixth International IEEE Conference on Software Testing, Verification and Validation Workshops - 2013, Mar 2013, Luxembourg, Luxembourg. pp.218-223, ⟨10.1109/ICSTW.2013.80⟩. ⟨hal-00909202⟩
182 Consultations
997 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More