Safety of transformations of data trees - TEL - Thèses en ligne Accéder directement au contenu
Thèse Année : 2021

Safety of transformations of data trees

Vérification de tranformations de données arborescentes

Résumé

This thesis aims at studying formal modelisations of tree transformations, with a focus on tree transducers. In particular we want to use tree transformations to represent operations on file systems which are represented as tree structures. More precisely we modelise operations performed by Shell scripts used to install and remove packages on Debian GNU/Linux distributions. The Shell scripting language provides access to Unix commands performing changes on file systems in addition to other tools. We model Unix file systems as feature trees and we represent the actions of Unix commands on a file system using a model we call tree pattern transducers. This model uses tree patterns to represent modifications on feature trees, and a system of constraints to represent the domains of tree transformations. We translate Unix commands into this model. We then provide an algorithm for computing the composition of tree pattern transducers. We implement a tool for finding the configurations of the file system which can make a given Shell script fail. Instead of computing the transducers representing scripts recursively on the structure of scripts, we only compute their domains. This allows us to reduce the complexity of our algorithm. The domains of transformations performed by scripts are computed recursively, starting with the last comand in the script. This amounts at computing successive inverse images of the commands in a script. We examine the pros and cons of this algorithm and we implement it. The implementation is then tested on a corpus of Debian package scripts. To better inform the discussion around this algorithm’s complexity, we give a proof that the problem we are solving is NP-hard, even on very restricted sets of scripts. In a more theoretical direction, we use techniques from the field of functional programming to shed new light on known models of transducers. We contribute a new class of transducers named High-Order Deterministic tree Transducers (HODT) which generalizes some known models of tree transducers. HODT are defined similarly to deterministic Top-down tree transducers (DTOP), but the output of rules are simply-typed λ-terms. We show how putting constraints on these terms yields different known classes of transducers: restriction to terms of order 0 yields the class of DTOP, while restriction to terms of order ≤ 1 yields the class of Macro Tree Transducers (MTT). We give a procedure for computing the composition of two HODT based on models of the λ-caclculus. We show that the order of the composition is the sum of the orders of the composed transducers, which gives an interesting explanation as to why DTOP are closed under composition (as HODT of order 0) but not MTT (HODT of order ≤ 1). In particular we study the restriction of HODT to linear terms, to which we add an inspection by a bottom-up tree automaton. We show that this model represents the same tree-to-tree functions as other known classes of transducers, most notably Transductions defined by Monadic Second-Order logic (MSOT). We then prove a similar result for the restriction to almost linear terms and an extension of MSOT called Monadic Second-Order logic tree Transductions with Sharing of subtrees (MSOTS). We then give a specialized procedure for the composition of HODT which preserves linearity. This procedure relies on linear logic and coherence spaces. Because the time complexity of this procedure largely depends on the order of transducers, we give a procedure to reduce the order of linear and almost linear transducers. We argue that composition algorithms for equivalent classes of transducers can also be decomposed into two steps: first computing composition in a meta-class of transducers ressembling HODT and second reducing the order to fall back to the initial model of transducers. In a last part, we prove that the word language MIX also known as the double-sided Dyck language, is not an EDT0L. This implies that it cannot be the output language of an MSOT from a regular language.
L'objectif de cette thèse est d'étudier les représentations formelles de transformations de structure de données arborescentes, en particulier les transducteurs d'arbres. Nous utilisons des méthodes formelles venant de la litérature scientifique des transducteurs d'arbres pour la vérification sur des scripts Shell utilisés dans les systèmes Debian GNU/Linux pour installer et désinstaller des packages. Nous modélisons les systèmes de fichiers par des arbres, et les scripts Shell qui modifient le système de fichier par des transformations de ces arbres. Nous avons implémenté un outil qui, étant donné un script, détècte les configurations du système de fichier qui peuvent faire échouer ce script. Nous avons testé cet outil sur un corpus de scripts Debian. Nous étudions ensuite la compléxité de cet algorithme, et nous démontrons que le problème résolu est NP-dur, même sur des classes de script simples. Dans une étude plus théorique, nous utilisons la programmation fonctionnelle pour revisiter des modèles connus de transducteurs d'arbres. Nous présentons un nouveau modèle de transducteurs nommé High-Order Deterministic tree Transducers (HODT) qui donne une généralisation de différents modèles connus. Les transducteurs HODT sont définis comme des transducteurs d'arbres Top-down (DTOP), sauf que leurs règles peuvent produire des λ-termes simplement typés à la place d'arbres. Ajouter des contraintes sur les λ-termes produits par les règles conduit à différents modèle connus: la restriction aux termes d'ordre 0 donne la classe DTOP, la restriction aux termes d'ordre 1 donne la classe des Macro Tree Transducers (MTT). Nous utilisons des modèles du λ-caclcul pour donner une procédure pour calculer la composition de deux transducteurs HODT. La somme des ordres de deux transducteurs HODT donne l'ordre de leur composition, ceci donne une nouvelle compréhension de pourquoi la classe DTOP (HODT d'ordre 0) est fermée par composition, mais pas MTT (HODT d'ordre ≤1). En particulier on étudie la restriction des transducteurs HODT dont les λ-termes sont linéaires, à laquelle on ajoute une inspection par un automate bottom-up (BOT). Elle caractérise la même classe de fonctions que plusieurs modèles connus, entre autres les Streaming Tree Transducers (STT) et les transductions d'arbres définies par Monadic Second-Order logic (MSOT). Nous prouvons également que la restriction aux λ-termes quasi-linéaires donne la classe des Attribute Tree Transducers (ATT). Nous présentons ensuite une nouvelle procédure de composition qui préserve la linéarité. Cette procédure est permise par une analyse de flot basée sur la logique linéaire et les espaces cohérents. Cet algorithme est ensuite comparé aux algorithmes existants sur les modèles équivalents. Finalement, nous prouvons que le langage de mot MIX (ou double-sided Dyck language) n'est pas un EDT0L. Ce qui implique qu'il n'est pas le langage de sortie d'une tranformation MSOT depuis un langage d'entrée régulier.
Fichier principal
Vignette du fichier
main.pdf (1.21 Mo) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

tel-03773108 , version 1 (07-01-2022)
tel-03773108 , version 2 (08-09-2022)

Identifiants

  • HAL Id : tel-03773108 , version 1

Lien texte intégral

Citer

Paul Daniel Geoffroy Gallot. Safety of transformations of data trees: Tree transducer theory applied to a verification problem on shell scripts. Formal Languages and Automata Theory [cs.FL]. Université de Lille, 2021. English. ⟨NNT : ⟩. ⟨tel-03773108v1⟩
235 Consultations
131 Téléchargements

Partager

Gmail Facebook X LinkedIn More