Why3: Shepherd your herd of provers, 2011. ,
URL : https://hal.archives-ouvertes.fr/hal-00790310
Logic programming with focusing proofs in linear logic, 1992. ,
, Differential categories. Math. Structures Comput. Sci, vol.16, issue.6, 2006.
Differential interaction nets, Theoretical Computer Science, vol.364, issue.2, pp.166-195, 2006. ,
URL : https://hal.archives-ouvertes.fr/hal-00150274
On köthe sequence spaces and linear logic, Mathematical Structures in Computer Science, vol.12, issue.5, pp.579-623, 2002. ,
Finiteness spaces, Mathematical Structures in Computer Science, vol.15, issue.4, pp.615-646, 2005. ,
URL : https://hal.archives-ouvertes.fr/hal-00150276
An introduction to differential linear logic : proof-nets, models and antiderivatives, Mathematical Structures in Computer Science, vol.28, issue.7, pp.995-1060, 2018. ,
URL : https://hal.archives-ouvertes.fr/hal-01326738
Interpreting a finitary pi-calculus in differential interaction nets, Inf. Comput, 2010. ,
URL : https://hal.archives-ouvertes.fr/hal-00148816
Linear logic, Theoretical Computer Science, vol.50, issue.1, pp.1-102, 1987. ,
URL : https://hal.archives-ouvertes.fr/inria-00075966
A new constructive logic : Classical logic. Mathematical Structures in Computer Science, 1991. ,
URL : https://hal.archives-ouvertes.fr/inria-00075117
Produits tensoriels topologiques et espaces nucléaires, Mem. Amer. Math. Soc, issue.16, p.140, 1955. ,
Locally convex spaces, 1981. ,
Mackey-complete spaces and power series, MSCS, 2016. ,
URL : https://hal.archives-ouvertes.fr/hal-01175662
A logical account for linear partial differential equations, Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018 ,
Higher-order distributions for differential linear logic, FOS-SACS 2019, Held as Part ETAPS ,
URL : https://hal.archives-ouvertes.fr/hal-01969262
Etude de la polarisation en logique, 2002. ,
URL : https://hal.archives-ouvertes.fr/tel-00007884
Categorical semantics of linear logic, 2008. ,
, Dialogue categories and chiralities. Publ. Res. Inst. Math. Sci, vol.52, issue.4, pp.359-412, 2016.
Differential structure in models of multiplicative biadditive intuitionistic linear logic. Proceedings of TLCA, 2007. ,
Théorie des distributions, 1966. ,
Differential linear logic and polarization, Typed Lambda Calculi and Applications, 9th International Conference, pp.371-385, 2009. ,
URL : https://hal.archives-ouvertes.fr/hal-00387062
Structured reactive programming with polymorphic temporal tiles, ACM Work. on Functional Art, Music, Modeling and Design (FARM), 2016. ,
URL : https://hal.archives-ouvertes.fr/hal-01350525
Unified media programming : An algebraic approach, ACM Work. on Functional Art, Music, Modeling and Design (FARM), 2017. ,
URL : https://hal.archives-ouvertes.fr/hal-01571133
Concurrence légère en ocaml : muthreads, Journées Francophones des Langages Applicatifs (JFLA), 2013. ,
Multilisp : A language for concurrent symbolic computation, ACM Trans. Program. Lang. Syst, vol.7, issue.4, pp.501-538, 1985. ,
A history of Haskell : Being lazy with class, Third ACM SIGPLAN History of Programming Languages (HOPL), 2007. ,
An equational modeling of asynchronous concurrent programming, 2019. ,
Screaming in the IO monad, ACM Work. on Functional Art, Music, Modeling and Design (FARM), 2019. ,
URL : https://hal.archives-ouvertes.fr/hal-02368138
Concurrent haskell, Principles of Programing Languages (POPL), 1996. ,
Higher-order functional reactive programming without spacetime leaks, Int. Conf. Func. Prog. (ICFP), 2013. ,
The OCaml system, release 4.08, Documentation and user's manual. Inria, 2019. ,
URL : https://hal.archives-ouvertes.fr/hal-00930213
Parallel and Concurrent Programming in Haskell, 2013. ,
Real World Ocaml : Functional programming for the masses, 2013. ,
A modular approach to denotational semantics, Category Theory and Computer Science (CTCS), vol.530, 1991. ,
Comprehending monads, Conference on LISP and Functional Programming (LFP), 1990. ,
Introduction to stochastic control theory, 2012. ,
, , 2019.
Real time programming: Special purpose or general purpose languages. Information Processing, vol.89, pp.11-17, 1989. ,
URL : https://hal.archives-ouvertes.fr/inria-00075494
Pyro: Deep universal probabilistic programming, Journal of Machine Learning Research, vol.20, issue.6, pp.1-28, 2019. ,
Zélus, a Synchronous Language with ODEs, International Conference on Hybrid Systems: Computation and Control, 2013. ,
Stan: A probabilistic programming language, Journal of Statistical Software, vol.76, issue.1, pp.1-37, 2017. ,
A Conservative Extension of Synchronous Data-flow with State Machines, ACM International Conference on Embedded Software, 2005. ,
Scade 6: A formal language for embedded critical software development, International Symposium on Theoretical Aspects of Software Engineering, 2017. ,
URL : https://hal.archives-ouvertes.fr/hal-01666470
Sequential Monte Carlo samplers, Journal of the Royal Statistical Society: Series B (Statistical Methodology), vol.68, issue.3, pp.411-436, 2006. ,
URL : https://hal.archives-ouvertes.fr/hal-01593880
The Design and Implementation of Probabilistic Programming Languages, pp.2019-2029, 2014. ,
Statecharts: A visual formalism for complex systems, Sci. Comput. Program, vol.8, issue.3, pp.231-274, 1987. ,
Compiling Markov chain Monte Carlo algorithms for probabilistic modeling, ACM SIGPLAN Conference on Programming Language Design and Implementation, 2017. ,
The bugs project: Evolution, critique and future directions, Statistics in medicine, vol.28, issue.25, pp.3049-3067, 2009. ,
FastSLAM: A factored solution to the simultaneous localization and mapping problem, AAAI National Conference on Artificial Intelligence, vol.10895, pp.88-107, 2002. ,
Scientific workflows for computational reproducibility in the life sciences : Status, challenges and opportunities, Future Generation Comp. Syst, vol.75, pp.284-298, 2017. ,
Why and where : A characterization of data provenance, Database Theory -ICDT 2001, 8th International Conference, vol.1973, pp.316-330, 2001. ,
HoTTSQL : Proving query rewrites with univalent SQL semantics, PLDI, 2017. ,
Refinements for free, Certified Programs and Proofs -Third International Conference, vol.8307, pp.147-162, 2013. ,
URL : https://hal.archives-ouvertes.fr/hal-01113453
Coccinelle, a Coq library for rewriting, Types, 2008. ,
Tracing the lineage of view data in a warehousing environment, ACM Trans. Database Syst, vol.25, issue.2, pp.179-227, 2000. ,
Towards a formalisation of relational database theory in constructive type theory, RelMiCS, pp.137-148, 2003. ,
Relations in Dependent Type Theory, 2006. ,
Containment of conjunctive queries on annotated relations, Proceedings of the 12th International Conference on Database Theory, ICDT '09, pp.296-309, 2009. ,
Provenance semirings, Proceedings of the Twenty-Sixth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, pp.31-40, 2007. ,
Provenance semirings, Proceedings of the twenty-sixth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, pp.31-40, 2007. ,
The semiring framework for database provenance, Proceedings of the 36th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, pp.93-99, 2017. ,
A Sceptic's Approach to Combining HOL and Maple, Journal of Automated Reasoning, vol.21, issue.3, pp.279-294, 1998. ,
Entrez gene : gene-centered information at ncbi, Nucleic acids research, vol.33, issue.suppl_1, pp.54-58, 2005. ,
Toward a verified relational database management system, ACM Int. Conf. POPL, 2010. ,
Probabilistic database summarization for interactive data exploration, vol.10, pp.1154-1165, 2017. ,
Ncbi reference sequences (refseq) : current status, new features and genome annotation policy, Nucleic acids research, vol.40, issue.D1, pp.130-135, 2011. ,
, The Mathematical Components team. Mathematical Components. Available at
, Documentation du solveur ilog solver
, Github du solveur naxos solver
, Site officiel de minizinc
, Site officiel du solveur eclipse prolog
, Site officiel du solveur gecode
, Site officiel du solveur minion
, Site officiel du solveur sicstus prolog
FaCiLe : a Functional Constraint Library, CICLOPS 2001, Colloquium on Implementation of Constraint and LOgic Programming Systems, 2001. ,
URL : https://hal.archives-ouvertes.fr/hal-00938018
A certified constraint solver over finite domains, Formal Methods (FM 2012, vol.7436, pp.116-131, 2012. ,
URL : https://hal.archives-ouvertes.fr/hal-01126135
Characteristic formulae for the verification of imperative programs, Proceeding of the 16th ACM SIGPLAN international conference on Functional Programming, pp.418-430, 2011. ,
Solveurs cp(fd) vérifiés formellement, Journées Francophones de Programmation par Contraintes (JFPC'13), pp.115-118, 2013. ,
Coq of OCaml. The OCaml Users and Developers Workshop, 2014. ,
Sparse-Sets for Domain Implementation, CP workshop on Techniques foR Implementing Constraint programming Systems (TRICS), pp.1-10, 2013. ,
Flexible management of large-scale integer domains in csps, Artificial Intelligence: Theories, Models and Applications, 6th Hellenic Conference on AI, SETN 2010, vol.6040, pp.405-410, 2010. ,
, , 2017.
Finite domain constraint programming systems, Handbook of Constraint Programming, vol.2, pp.495-526, 2006. ,
Dedekind reals ,
Views of pi: definition and computation, 2014. ,
Foundations of constructive analysis, 2012. ,
Constructive measure theory. Memoirs of the American mathematical society, Number, vol.116, 1972. ,
Formalization of real analysis: A survey of proof assistants and libraries, 2013. ,
URL : https://hal.archives-ouvertes.fr/hal-00806920
Éléments de mathématique, intégration, 1967. ,
Über definitionsbereiche von funktionen, Mathematische Annalen, vol.97, pp.60-75, 1927. ,
A general form of integral, Annals of Mathematics. Second Series, 1918. ,
, Constructive reals in coq: Axioms and categoricity, 2000.
La documentation de coq ,
Computer certified efficient exact reals in coq, 2011. ,
Proof-irrelevant model of cc with predicative induction and judgmental equality, 2011. ,
Sheaves in geometry and logic, 1992. ,
A monadic, functional implementation of real numbers, 2007. ,
Nicht konstruktiv beweisbare sätze der analysis, J. Sym. Logic, vol.14, 1949. ,
Consistency of the predicative calculus of cumulative inductive constructions (pcuic), 2017. ,
URL : https://hal.archives-ouvertes.fr/hal-01615123
, The Univalent Foundations Program. Homotopy Type Theory: Univalent Foundations of Mathematics, 2013.
, Modeling in Event-B -System and Software Engineering, 2010.
The SMT-LIB Standard: Version 2.6, 2017. ,
Automatic proofs and refutations for higher-order logic, 2012. ,
Soft typing, Proceedings of the ACM SIGPLAN'91 Conference on Programming Language Design and Implementation (PLDI), pp.278-292, 1991. ,
, Integrating SMT solvers in Rodin. Sci. Comput. Program, vol.94, pp.130-143, 2014.
Ironfleet: proving practical distributed systems correct, Proceedings of the 25th Symposium on Operating Systems Principles, SOSP 2015, pp.1-17, 2015. ,
How to prove higher order theorems in first order logic, Proceedings of the 12th International Joint Conference on Artificial Intelligence, pp.137-142, 1991. ,
Semantics of Mizar as an Isabelle object logic, Journal of Automated Reasoning, vol.63, issue.3, pp.557-595, 2019. ,
Specifying Systems, The TLA+ Language and Tools for Hardware and Software Engineers, 2002. ,
Should your specification language be typed, ACM Trans. Program. Lang. Syst, vol.21, issue.3, pp.502-526, 1999. ,
Set theory for verification: I. from foundations to functions. CoRR, 1993. ,
Polymorphic set-theoretic types for functional languages. (Types ensemblistes polymorphes pour les langages fonctionnels), 2019. ,
URL : https://hal.archives-ouvertes.fr/tel-02119930
Z Notation -a reference manual, Prentice Hall International Series in Computer Science, 1992. ,
Gradual typing for functional languages, Scheme and functional programming workshop, pp.81-92, 2006. ,
Proof automation and type synthesis for set theory in the context of TLA+. (Automatisation de preuves et synthèse de types pour la théorie des ensembles dans le contexte de TLA+), 2014. ,
URL : https://hal.archives-ouvertes.fr/tel-01751181
Model checking tla + specifications, Correct Hardware Design and Verification Methods, 10th IFIP WG 10.5 Advanced Research Working Conference, CHARME '99, vol.1703, pp.54-66, 1999. ,
Towards a provably correct encoding from F* to SMT. Master's thesis, 2016. ,
A modular integration of SAT/SMT solvers to Coq through proof witnesses, Certied Programs and Proofs, vol.7086, p.135150, 2011. ,
URL : https://hal.archives-ouvertes.fr/hal-00639130
Dedukti : a logical framework based on the ??-calculus modulo theory, 2016. ,
Expressing theories in the ??-calculus modulo theory and in the Dedukti system, 22nd International Conference on Types for Proofs and Programs, 2016. ,
URL : https://hal.archives-ouvertes.fr/hal-01441751
Why3 : Shepherd your herd of provers, International Workshop on Intermediate Verication Languages, vol.5364, 2011. ,
URL : https://hal.archives-ouvertes.fr/hal-00790310
Let's verify this with Why3, International Journal on Software Tools for Technology Transfer (STTT), vol.17, issue.6, p.709727, 2015. ,
Fast LCF-style proof reconstruction for Z3, Interactive Theorem Proving, vol.6172, p.179194, 2010. ,
Checking Zenon modulo proofs in Dedukti, Proof eXchange for Theorem Proving, vol.186, p.5773, 2015. ,
URL : https://hal.archives-ouvertes.fr/hal-01171360
Coccinelle, a Coq library for rewriting, Types, 2008. ,
Lightweight interactive proving inside an automatic program verier, Formal Integrated Development Environments, 2018. ,
Automated proof-producing abstraction of C code, CSE, 2015. ,
Don't sweat the small stu : Formal verication of C code without the pain, Programming Language Design and Implementation, p.429439, 2014. ,
A computational approach to Pocklington certicates in type theory, Functional and Logic Programming, vol.3945, p.97113, 2006. ,
The essence of higher-order concurrent separation logic, Programming Languages and Systems, vol.10201, p.696723, 2017. ,
URL : https://hal.archives-ouvertes.fr/hal-01633133
Dependent types and multimonadic eects in F*, Principles of Programming Languages, p.256270, 2016. ,
Carine Morel et Loïc Peyrot : Learn-OCaml : un assistant à l'enseignement d'OCaml, Trentièmes Journées Francophones des Langages Applicatifs (JFLA'19), 2019. ,
Sous le capot du MOOC OCaml, Vingt-septièmes Journées Francophones des Langages Applicatifs (JFLA'16), vol.2016 ,
URL : https://hal.archives-ouvertes.fr/hal-01333599
Fast and sound random generation for automated testing and benchmarking in Objective Caml, In ACM SIGPLAN Workshop on ML, pp.61-70, 2009. ,
URL : https://hal.archives-ouvertes.fr/hal-00391817
Scaling up functional programming education : under the hood of the OCaml MOOC, ACM SIGPLAN International Conference on Functional Programming (ICFP'17), pp.1-25, 2017. ,
Teaching the art of functional programming using automated grading (experience report), ACM SIGPLAN International Conference on Functional Programming (ICFP'19), vol.2019 ,
An Infrastructure for Mechanised Grading, 2nd International Conference on Computer Supported Education (CSEDU'10), pp.37-45, 2010. ,
URL : https://hal.archives-ouvertes.fr/hal-00429671
,
, Compilateur OCaml pour la collecte de termes Lambda
,
Clone detection using abstract syntax trees, Proceedings. International Conference on Software Maintenance (Cat. No. 98CB36272), p.368377, 1998. ,
Syntax tree ngerprinting : a foundation for source code similarity detection, 2009. ,
A language independent approach for detecting duplicated code, Proceedings IEEE International Conference on Software Maintenance -1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360), p.109118, 1999. ,
The program dependence graph and its use in optimization, ACM Trans. Program. Lang. Syst, vol.9, issue.3, p.319349, 1987. ,
Type-safe modular hash-consing, Proceedings of the ACM Workshop on ML, p.1219, 2006. ,
Various code clone detection techniques and tools : A comprehensive survey, p.655667, 2016. ,
The Pragmatic Programmer : From Journeyman to Master ,
, , 1999.
Deckard : Scalable and accurate tree-based detection of code clones, 29th International Conference on Software Engineering (ICSE'07), p.96105, 2007. ,
Ccnder : a multilinguistic token-based code clone detection system for large scale source code, IEEE Transactions on Software Engineering, vol.28, issue.7, p.670, 2002. ,
Identifying similar code with program dependence graphs, Proceedings Eighth Working Conference on Reverse Engineering, p.301309, 2001. ,
Cp-miner : nding copy-paste and related bugs in largescale software code, IEEE Transactions on Software Engineering, vol.32, issue.3, p.176192, 2006. ,
A survey of partitional and hierarchical clustering algorithms, Data Clustering : Algorithms and Applications, p.87110, 2013. ,
Comparison and evaluation of code clone detection techniques and tools : A qualitative approach, Science of Computer Programming, vol.74, issue.7, pp.470-495, 2009. ,
On nding duplication and near-duplication in large software systems, Reverse Engineering -Working Conference Proceedings, 2001. ,
, Elle s'explique par une taille de pile de 8 Mo et des tableaux d'activation de 32 octets chacun (une adresse de retour, deux valeurs sauvegardées sur la pile et un
, espace aussi grand pour en calculer la hauteur. Le code en ligne accompagnant cet article inclut un programme, dûà Martin Clochard, qui calcule la hauteur en espace log(N ). Son temps de calcul, en revanche
Je remercie toutes les personnes, collègues ouétudiants, qui se sont prêtées au jeu lorsque j'ai testé sur elles ce problème ,
Defunctionalized interpreters for programming languages, SIGPLAN Not, vol.43, issue.9, pp.131-142, 2008. ,
Defunctionalization at work, Proceedings of the 3rd ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, PPDP '01, pp.162-174, 2001. ,
The schorr-waite graph marking algorithm, Acta Inf, vol.11, pp.223-232, 1979. ,
The Zipper, Journal of Functional Programming, vol.7, issue.5, pp.549-554, 1997. ,
The Art of Computer Programming, volumes 1-4A, 1997. ,
Traversing binary trees simply and cheaply, Inf. Process. Lett, vol.9, issue.5, pp.197-200, 1979. ,
Definitional interpreters for higher-order programming languages, Proceedings of the ACM Annual Conference, vol.2, pp.717-740, 1972. ,
The discoveries of continuations, LISP and Symbolic Computation, vol.6, issue.3, pp.233-247, 1993. ,
,
, A' edx::eax, etc.) et de modificateurs ('=' écriture, '+' lecture/écriture, etc.). Il est possible de partager explicitement un emplacement entre une sortie et une entrée, en attribuant le numéro de la sortie à l'entrée ("0"). Le compilateur peut également le faire de son propre chef -il cherchera à minimiser le nombre de registres alloués et, pour ce faire, travaille avec l'hypothèse que les entrées sont « consommées » avant que les sorties ne soient « produites, lié au contexte C : les lignes 1587 à 1589 déclarent un contrat composé de 3 listes (séparées par ':') : les sorties, les entrées et les effets bord (appelés clobbers) du bloc. Les entrées et sorties associent des variables ou des expressions du C à des registres ou emplacements mémoire de l'assembleur
=S" ( __ res) indique que le registre esi retournera la nouvelle valeur de __ res et "0" ( __ s) qu'il doit contenir la valeur de __ s à l'entrée du bloc ,
d1)) indique que le registre eax (respectivement ecx) sera écrasé -__ d0 (respectivement __ d1) n'étant pas utile au delà du bloc, il s'agit d'un registre intermédiaire, =&a" ( __ d0) (respectivement "=&c ,
=&D" ( __ d2) indique, comme précédemment, que le registre edi est un registre intermédiaire ,
r" ( __ reject) indique qu'un registre en lecture seule -au choix du compilateur -doit contenir la valeur de __ reject ,
, memory" et "cc" indiquent que le bloc peut accéder et modifier respectivement tout emplacement mémoire accessible depuis l'environnement
, Le compilateur a ici peu de marge de manoeuvre, l'interface est très contrainte car les mnémoniques sont très spécialisées et utilisent implicitement des registres particuliers. Le seul choix qu'il lui reste à faire est d'associer un registre à l'entrée %4 (lignes 1572 et 1581), en sachant qu'il ne peut choisir eax, Nous pouvons déduire de ces informations quelles sont les entrées qui partagent ou ne peuvent partager un registre avec une sortie ; ces données sont illustrées dans la Fig
il est bien utilisé dans le code assembleur (écrit ligne 1576, lu ligne 1582), à l'insu des compilateurs, puisque ceux-ci n'inspectent pas les mnémoniques. Ainsi, si ce registre est choisi, la valeur de l'entrée (le pointeur __ reject) sera écrasée à la ligne 1576 par le calcul d'ecx (la longueur de la chaîne pointée par __ reject). Le problème est alors d'autant plus important que, s'agissant d'un pointeur, la lecture (ligne 1581) et le déréférencement (ligne 1583) de la mauvaise valeur provoquera une erreur de segmentation ,
au moins jusqu'à GCC 4.8, la déclaration d'ebx en clobber si l'option -fpic était active : il était ainsi utilisé de façon détournée, en prenant soin de le sauvegarder (push ligne 1571) et de le restaurer ,
Abstract interpretation : A unified lattice model for static analysis of programs by construction or approximation of fixpoints, 1977. ,
BINSEC/SE : A dynamic symbolic execution toolkit for binary-level analysis, SANER, 2016. ,
URL : https://hal.archives-ouvertes.fr/hal-01721502
, DWARF Debugging Information Format Committee. DWARF Debugging Information Format, vol.5, 2017.
Some assembly required -program analysis of embedded system code, SCAM, 2008. ,
Frama-c : A software analysis perspective, Formal Asp. Comput, vol.27, issue.3, pp.573-609, 2015. ,
URL : https://hal.archives-ouvertes.fr/cea-01808981
De l'assembleur sur la ligne ?, Appelez TInA ! In JFLA, 2019. ,
Get rid of inline assembly through verificationoriented lifting, ASE, 2019. ,
An analysis of x86-64 inline assembly in c programs, 2018. ,
ocpmemprof : un profileur mémoire pour OCaml, Vingtsixièmes Journées Francophones des Langages Applicatifs, 2015. ,
Profilage mémoire d'applications OCaml, 2014. ,
Mohamed Iguernelala, and Alain Mebsout, Proceedings of the 16th International Workshop on Satisfiability Modulo Theories, SMT 2018, 2018. ,
Observation temps-réel de programmes Caml, JFLA (Journées Francophones des Langages Impératifs), Studia Informatica Universalis, pp.195-216, 2010. ,
, Statistically profiling memory in OCaml. OCaml Workshop, 2016.
URL : https://hal.archives-ouvertes.fr/hal-01406809
Using valgrind to detect undefined value errors with bitprecision, Proceedings of the Annual Conference on USENIX Annual Technical Conference, ATEC '05, pp.2-2, 2005. ,
on en déduit que isTrue (x f1 ) ; eval (x ? , x t2 ) ? x o isFalse (x f1 ) ; eval (x ? , x t3 ) ? ,
,
, Tout d'abord, les fichiersécrits une fois pour toute et décrivant le cadre formel : la définition des squelettes (Section 3.1) et la définition d'une interprétation concrète (Section 3.2). Ensuite, des fichiers générés automatiquementà partir de la description squelettique de la sémantique. Ces fichiers instancient la définition générale des squelettes pour la sémantique considérée. Enfin, des fichiers supplémentaires fournissent l'implémentation des filtres, ou donnent des propriétés sur ceux-ci
, On suppose donnés tous leséléments de base d'une sémantique squelettique (l'ensemble des sortes ?, l'ensemble des constructeurs, filtres, crochets et les fonctions csort
, Alors on donne la définition d'un terme de sorte s (on exclut volontairement les termes de base, qui n'existent pas au niveau de la sémantique squelettique, mais qui seront
, Inductive skel_var : sort -> Type := | skel_var_intro : forall s, string -> skel_var s. Inductive term : term_sort -> Type := | term_sv : forall t, skel_var (Term t) -> term t | term_constructor : forall (c:constructor), list_term (fst (csort c)) -> term (Prgm (snd (csort c))) with list_term: list term_sort -> Type := | nil_term: list_term
, Les définitions d'un os et d'un squelette sont exactement les mêmes que dans la formalisation ci-dessus,à l'exception des variables squelettiques qui sont explicitement typées (leur sorte est donnée) : Inductive bone := | H : hook -> list typed_skel_var -> typed_term -> list typed_skel_var -> bone | F : filter -> list typed_skel_var -> list typed_skel_var -> bone | B : list (list bone) -> list typed_skel_var -> bone. Definition skeleton := list (bone). flux : Variable l: language
, Inductive cterm := | cterm_base : forall (b:l.(l_base_sort)), base_interp b -> cterm | cterm_constructor : l.(l_cons) -> list cterm -> cterm. On définit aussi les valeurs, et les quadruplets concrets. Inductive value := | val_flow : forall f, flow_interp f -> value | val_cterm : cterm -> value, Les termes concrets sont des termes clos, sans variables de termes, qui représentent des termes du langage
, On suppose maintenant qu'on a une interprétation des filtres (donc une fonction quià chaque filtre associe une relation)
, Variable filter_interp : l.(l_filter) -> list value -> list value -> Prop
Deux versions existent, dans deux fichiers différents. La première (Concrete.v) utilise l'induction structurelle de Coq pour interpréter les crochets. La seconde (Concrete2.v) suit la définition donnée en Section 2.3 et définit une fonctionnelle de conséquence immédiate, l'homologue de la fonction H définie plus haut, qui transforme un ensemble de quadruplets en un autre ensemble de quadruplets. La sémantique en est alors le plus petit point fixe ,
, :S) s1 s3 | i_Void : forall s, interp_skel [] s s with interp_bone : bone -> env -> env -> Prop := | i_F : forall lv f (f1 : env) (l1 : list typed_skel_var) l2, filter_interp_opt f (List.map (find f1) (map skel_name l1)) lv -> interp_bone, Inductive interp_skel : skeleton -> env -> env -> Prop := | i_Cons : forall B S s1 s2 s3, interp_bone B s1 s2 -> interp_skel S s2 s3 -> interp_skel
, | i_H : forall (v1 v2: list value) (h: l.(l_hook)) (ct: cterm) (t : typed_term) (e:env)
, ) (map (skel_name) V) = map Some vals -> interp_bone (B Ss V) e (add_asn e V vals) with concrete_semantics :concrete_quadruple -> Prop := | cs_intro: forall (h: l.(l_hook)), forall (c: l.(l_cons)) (s xt xo: list typed_skel_var), forall (S: skeleton), forall lt s1 s2 sigma, In (h,s,c,xt,S,xo) (l.(l_semantics)) -> interp_skel S (add_asn (add_asn_cterm void_env xt lt) s s1) sigma -> unfold_list_option (map (find sigma) (map skel_name xo, | i_B : forall vals Ss Si V e e', List.In Si Ss -> interp_skel Si e e' -> map
, Le cas intéressant de cette définition est pour le crochet, qui utilise le prédicat concrete semantics, défini en induction mutuelle, pour la récursion. Voici la définition principale de la seconde version (code)
, :S) (s1,T) r | i_Void : forall s t, interp_skel [] (s,t) s with interp_bone : bone -> Cstate -> Cresult -> Prop := | i_F : forall f (f1 : env) tl lv (l1 : list typed_skel_var) l2, filter_interp_opt f (List.map (find f1) (map skel_name l1)) lv -> interp_bone, Inductive interp_skel : skeleton -> Cstate -> Cresult -> Prop := | i_Cons : forall B S s1 s2 T r, interp_bone B (s1,T) s2 -> interp_skel S (s2,T) r -> interp_skel
, | i_H : forall (h: (l.(l_hook))) (e : env) (T:concrete_quadruple -> Prop) (xf1 xf2 : list typed_skel_var) (t:typed_term) (v : list value), match unfold_list_option (map (find e) (map skel_name xf1)), eval_term e (projT2 t) with | Some xf1
, H h xf1 t xf2) (e,T) (add_asn e xf2 v: env) | i_B : forall Ss Si V e T vals e', List.In Si Ss -> interp_skel Si (e,T) e' -> map (find e') (map skel_name V) = map Some vals -> interp_bone
, xo) l.(l_semantics) -> interp_skel S (add_asn (add_asn_cterm void_env xt lt) s s1, T) sigma -> unfold_list_option (map (find sigma) (map skel_name xo)) = Some
, Fixpoint consequence n := match n with | 0 => fun _ => False | S m => immediate_consequence
, Prop := exists n
, le crochet s'appuie sur l'ensemble de quadruplets passé en argument pour définir la récursion. L'équivalence entre ces deux versions est immédiate, et estégalement prouvée (code)
, On appelle donc un analyseur lexical et un analyseur syntaxique de fichiers de sémantique squelettique, puis un typeur qui vérifie la bonne formation des crochets et ajoute des annotations de type. Ces trois outils sont ceux qui ontété définis pour necro
,
, Exemple de Génération Prenons l'exemple de l'opérateur conditionnel if défini ci-dessus. Sa version définie en sémantique squelettique s'écrit de la manière suivante (code)
, If (x_t1, x_t2, x_t3) -> x_f1 <-expr x_s x_t1
, Appel de crochet *) x_f1' <-isBool x_f1
, Appel de filtre *) x_o <-branch (* Branchement *) isTrue x_f1'
, Appel de filtre *) x_o <-stmt x_s x_t2 (* Appel de crochet *) or (* Deuxième branche *) isFalse x_f1
On prend les chaînes de caractères comme identifiants, et les entiers relatifs comme littéraux. De même, on choisit une implémentation pour les sortes de flot (code). Enfin, on définitégalement l'interprétation concrète des filtres (code) ,
, Assign "over
, Assign "fact" (Const, vol.1
, Assign "i
, While (Not (Equal (Var "n") (Const 0))) ( Assign "a
, Assign "i" (Const, vol.1
, Var n))) ( Assign "fact" (Plus (Var "fact
, Assign "i" (Plus (Var "i") (Const 1)) )
, On commence par définir deux lemmes correspondant aux invariants des deux boucles et on montre le résultat suivant par récurrence (code), où rd fm state accèdeà une variable de l'état, et où fact calcule (mathématiquement) la factorielle. exists (x:flow_interp s_state)
Skeletal Semantics and their Interpretations, Proceedings of the ACM on Programming Languages, vol.44, pp.1-31, 2019. ,
URL : https://hal.archives-ouvertes.fr/hal-01881863
Characteristic formulae for the verification of imperative programs, Proceeding of the 16th ACM SIG-PLAN international conference on Functional Programming, pp.418-430, 2011. ,
Necro : Animating Skeletons, ML 2019, 2019. ,
Ales Bizjak, Lars Birkedal, and Derek Dreyer. Iris from the ground up : A modular foundation for higher-order concurrent separation logic, Journal of Functional Programming, vol.28, issue.20, 2018. ,
Natural semantics, STACS 87, 4th Annual Symposium on Theoretical Aspects of Computer Science, vol.247, pp.22-39, 1987. ,
URL : https://hal.archives-ouvertes.fr/inria-00075953
Isak : A complete semantics of K, 2018. ,
, Grigore Ro?u. Matching logic. Logical Methods in Computer Science, vol.13, issue.4, pp.1-61, 2017.
An overview of the K semantic framework, Journal of Logic and Algebraic Programming, vol.79, issue.6, pp.397-434, 2010. ,
Ott : Effective tool support for the working semanticist, Journal of Functional Programming, vol.20, issue.1, pp.71-122, 2010. ,
Locales: A Module System for Mathematical Theories, Journal of Automated Reasoning, vol.52, issue.2, pp.123-153, 2014. ,
CakeML: A verified implementation of ML, Principles of Programming Languages (POPL), pp.179-191, 2014. ,
A formally verified compiler back-end, Journal of Automated Reasoning, vol.43, issue.4, pp.363-446, 2009. ,
URL : https://hal.archives-ouvertes.fr/inria-00360768
Isabelle/HOL: a proof assistant for higher-order logic, vol.2283, 2002. ,
Introduction to bisimulation and coinduction, 2011. ,
URL : https://hal.archives-ouvertes.fr/hal-00907026
Finding and understanding bugs in C compilers, Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2011. ,