Dissertation, We Tackle This Challenge by Designing a Programming Lan- Guage for Specifying Search Strategies

Dissertation, We Tackle This Challenge by Designing a Programming Lan- Guage for Specifying Search Strategies

THÈSE DE DOCTORAT DE SORBONNE UNIVERSITÉ Spécialité Informatique École doctorale Informatique, Télécommunications et Électronique (Paris) Présentée par Pierre Talbot Pour obtenir le grade de DOCTEUR de SORBONNE UNIVERSITÉ Sujet de la thèse : Spacetime Programming A Synchronous Language for Constraint Search dirigée par Carlos Agon et encadrée par Philippe Esling soutenue le 6 juin 2018 devant le jury composé de : M. Carlos Agon Directeur de thèse Mme. Emmanuelle Encrenaz Examinatrice M. Antoine Miné Examinateur M. Vijay A. Saraswat Rapporteur M. Manuel Serrano Examinateur M. Sylvain Soliman Examinateur M. Guido Tack Rapporteur M. Peter Van Roy Examinateur Spacetime Programming A Synchronous Language for Constraint Search Pierre Talbot 2018 iv Abstract Constraint programming is a paradigm for computing with mathematical rela- tions named constraints. It is a declarative approach to describe many real-world problems including scheduling, vehicles routing, biology and musical composition. Constraint programming must be contrasted with procedural approaches that de- scribe how a problem is solved, whereas constraint models describe what the prob- lem is. The part of how a constraint problem is solved is left to a general constraint solver. Unfortunately, there is no solving algorithm efficient enough to every prob- lem, because the search strategy must often be customized per problem to attain reasonable efficiency. This is a daunting task that requires expertise and good understanding on the solver’s intrinsics. Moreover, higher-level constraint-based languages provide limited support to specify search strategies. In this dissertation, we tackle this challenge by designing a programming lan- guage for specifying search strategies. The dissertation is constructed around two axes: (i) a novel theory of constraint programming based on lattice theory, and (ii) a programming language, called spacetime programming, building on lattice theory for its data structures and on synchronous programming for its computa- tional model. The first part formalizes the components of inference and search in a constraint solver. This allows us to scrutinize various constraint-based languages through the same underlying foundations. In this respect, we give the semantics of sev- eral paradigms including constraint logic programming and concurrent constraint programming using lattices. The second part is dedicated to building a practi- cal language where search strategies can be easily composed. Compositionality consists of taking several distinct strategies and, via some operators, to compose these in order to obtain a new strategy. Existing proposals include extensions to logic programming, monadic constraint programming and search combinators, but all suffer from different drawbacks as explained in the dissertation. The original aspect of spacetime programming is to make use of a temporal dimension, offered by the synchronous paradigm, to compose and synchronize search strategies on a shared logical clock. This paradigm opens the door to new and more complex search strategies in constraint programming but also in applications requiring backtracking search. We demonstrated its usefulness in an interactive computer-aided composition sys- tem where we designed a search strategy to help the composer navigating in the state space generated by a musical constraint problem. We also explored a model checking algorithm where a model dynamically generates a constraint satisfaction problem (CSP) representing the reachability of some states. Although these ap- plications are experimental, they hint at the suitability of spacetime programming in a larger context. v Acknowledgements Je remercie très chaleureusement Emmanuel Chailloux qui, après un Skype mémorable, m’a accepté pour ma dernière année en Master, et qui m’a trouvé un stage qui allait me diriger vers une thèse. Plutôt que de parler de stage, c’est plutôt vers Carlos, ou Carlito, après 4 ans on se le permet, et Philou, que j’ai été dirigé. Une histoire qui a commencé à “la salle de réunion”, et dans laquelle ils m’ont prodigué des conseils des plus avisés, et ce toujours dans une excellente ambiance. Merci aussi à tous mes bro’ffices. Clément et Mattia avec qui tout ça a commencé. Merci aux amis de Jussieu, et surtout l’équipe APR, Steven, Pierrick, Vincent, qui étaient là aux premières heures. Merci Rémy, tu m’as suivi sur les toutes les branches de la A, et puis même jusqu’à Châtelet (c’est ça la force de l’amitié). L’amicale de ping pong de l’IRCAM : merci à Gérard, Sylvie, Grégoire, Karim, Cyrielle, Florence, Olivier et tous les pongistes du −4. Et puis, merci Jean-Louis, Pierre N°2, et tous les autres. I would like to acknowledge Vijay Saraswat, Guido Tack and Antoine Miné for their valuable comments and corrections on my dissertation. I had the opportunity to go to Japan twice, and I am grateful for all the help Philippe Codognet provided me. Chiba-sensei and Phong Nguyen, warmly welcomed me to their labs in Japan, and I highly appreciate their support. Of course, special thanks to all of my friends in Japan: Marceau Suntory, Klervie, Nate, Mathieu Green Trompette, Nicolas and Guillaume. I would like to thank Thomas Silverston too, for the good time we spent together. Thanks to all these people, I had a very pleasant and inspiring stay in Tokyo. I want to thank my wife, Yinghan, who continuously supports me, and always has faith in me. Merci aussi à toute ma famille, ma mère, mon père, Céline et Thomas, pour m’avoir encouragé, et ce même parfois de l’autre bout du monde. Pierre Talbot Paris, le 17 avril 2018 Contents Introduction 1 I A Lattice Theory of Constraint Programming 9 1 Lattice Hierarchy for Constraint Solving 10 1.1 Constraint programming . 11 1.1.1 Constraint modelling . 11 1.1.2 Constraint solving . 13 1.1.3 Propagation . 16 1.2 Lattice structure . 18 1.3 Lattice hierarchy for constraint programming . 27 1.3.1 L0: Value . 28 1.3.2 L1: Domain . 28 1.3.3 L2: Variable store . 29 1.3.4 L3: Constraint satisfaction problem . 29 1.3.5 L4: Search tree . 32 1.3.6 L5: Tree store . 33 1.3.7 Ln: Algorithm selection . 35 1.4 Inference in L3 with propagation . 35 1.4.1 Modelling a problem . 35 1.4.2 Deciding . 36 1.4.3 Propagating . 37 1.5 Bridging L3 and L4 with backtracking . 38 1.5.1 Delta operator . 40 1.5.2 Queueing strategy . 41 1.5.3 Branching strategy . 43 1.5.4 Exploration strategy . 45 1.6 Inference in L4 with constraint optimization problem . 46 1.7 Pruning in L4 with backjumping . 47 1.8 Conclusion and discussion . 50 vi CONTENTS vii 2 Constraint-based Programming Languages 52 2.1 Introduction . 52 2.2 Background . 54 2.2.1 First-order logic . 55 2.2.2 Semi-decidability . 56 2.2.3 Logic programming . 57 2.2.4 Decidable fragments of FOL . 59 2.3 Modelling languages: from L0 to L4 (⊔) . 60 2.3.1 Declarative languages . 60 2.3.2 Constraint imperative programming . 65 2.4 Inference-based languages: from L0 to L3 (⊔, ⊨) . 67 2.4.1 Concurrent logic programming . 67 2.4.2 Concurrent constraint programming . 70 2.5 Bridging L3 and L4 (⊔, ⊨, ∆) ...................... 78 2.5.1 Andorra-based languages . 78 2.5.2 Constraint logic programming . 81 2.5.3 Lattice-based semantics of CLP . 86 2.6 Search languages: L4 and above (⊔, ⊨, ∆) . 91 2.6.1 Search in logic languages . 92 2.6.2 Search in other paradigms . 97 2.6.3 Control operators for search . 101 2.7 Conclusion and discussion . 103 II Spacetime Programming 106 3 Overview of Spacetime Programming 107 3.1 Synchronous programming . 107 3.1.1 Linear time . 108 3.1.2 Causality analysis . 109 3.2 Concepts of spacetime programming . 111 3.2.1 Branching time . 111 3.2.2 Blending linear and branching time . 112 3.2.3 Host variables as lattice structures . 113 3.3 Syntax and intuitive semantics . 114 3.3.1 Communication fragment . 114 3.3.2 Undefinedness in three-valued logic . 117 3.3.3 Synchronous fragment . 118 3.3.4 Search tree fragment . 119 3.3.5 Read-write scheduling . 120 3.3.6 Derived statements . 121 3.4 Programming search strategies in L4 . 122 3.4.1 A minimal constraint search algorithm . 122 CONTENTS viii 3.4.2 Branch and bound . 125 3.5 Hierarchy in spacetime with universes . 126 3.5.1 Universe fragment . 127 3.5.2 Communication across layers of the hierarchy . 128 3.6 Programming in L5 with universes . 130 3.6.1 Iterative deepening search . 130 3.6.2 Branch and bound revisited . 131 4 Behavioral Semantics Inside an Instant 134 4.1 Behavioral semantics . 134 4.2 Composition of search trees . 137 4.3 Expressions and interface with host . 139 4.4 Statements rules . 141 4.4.1 Communication fragment . 141 4.4.2 Synchronous fragment . 143 4.4.3 Search tree fragment . 145 4.5 Causality analysis . 146 4.5.1 Logical correctness . 146 4.5.2 A constraint model of causality . 147 4.5.3 From the spacetime program to the causality model . 150 4.5.4 Causal dependencies . 150 4.5.5 Causal statements . 152 4.6 Conclusion and discussion . 156 5 Behavioral Semantics Across Instants 159 5.1 Composition of parallel universes . 160 5.2 Universe hierarchy . 160 5.3 Hierarchical behavioral semantics . 163 5.4 Hierarchical variable . 164 5.4.1 Read, write and allocate variables in the hierarchy . 165 5.4.2 Top-down spacetime transfer . 167 5.4.3 Bottom-up spacetime transfer . 169 5.5 Semantics of the rules across time . 169 5.5.1 Semantics of the queueing strategy . 169 5.5.2 Universe statement . 171 5.5.3 Reaction rule . 172 III Applications 173 6 Modular Search Strategies 174 6.1 Pruning strategies .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    243 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us