Lightweight Typed Customizable Unmarshaling

Pascal Cuoq 1 Julien Signoles 1 Damien Doligez 2, *
* Auteur correspondant
1 LSL - Laboratoire Sûreté des Logiciels
DILS - Département Ingénierie Logiciels et Systèmes : DRT/LIST/DILS
Abstract : 1. Abstract The contribution of this work is threefold. First, we offer an OCaml unmarshaling algorithm that uses a lightweight type-directed de-scription of the expected structure of data to make consistency checks. The second contribution is the opportunity to specify func-tions to be systematically applied on values as they are being un-marshaled. Our third contribution is a type-safe layer for these functions and for the unmarshaling algorithm itself. 2. Description The standard OCaml unmarshaling function is input value: in channel → α. The aforementioned first contribution is a function descr input val with type in channel → descr → α. One value of type descr that can be passed as second argu-ment is Abstract, and then the behavior is exactly identical to input value. The programmer can provide as much information as (s)he wants for the additional consistency checks. For instance, (s)he can pass the value (t array Abstract) to specify that the value being read is an array of undescribed values. Our unmar-shaling algorithm maintains a cursor into the structure description, allowing it to know what the current loaded value should look like.
Type de document :
Communication dans un congrès
ACM SIGPLAN Workshop on ML, Sep 2011, Tokyo, Japan. 〈http://conway.rutgers.edu/ml2011/〉
Liste complète des métadonnées

Littérature citée [12 références]  Voir  Masquer  Télécharger

https://hal.inria.fr/hal-01091947
Contributeur : Damien Doligez <>
Soumis le : mercredi 4 février 2015 - 05:29:05
Dernière modification le : vendredi 25 mai 2018 - 12:02:07
Document(s) archivé(s) le : mardi 5 mai 2015 - 10:05:55

Fichier

unmarshal-final.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : hal-01091947, version 1

Collections

CEA | INRIA | DRT | LIST

Citation

Pascal Cuoq, Julien Signoles, Damien Doligez. Lightweight Typed Customizable Unmarshaling. ACM SIGPLAN Workshop on ML, Sep 2011, Tokyo, Japan. 〈http://conway.rutgers.edu/ml2011/〉. 〈hal-01091947〉

Partager

Métriques

Consultations de la notice

186

Téléchargements de fichiers

102