7 research outputs found

    Parametricity and Dependent Types

    Get PDF
    Reynolds' abstraction theorem shows how a typing judgement in System F can be translated into a relational statement (in second order predicate logic) about inhabitants of the type. We (in second order predicate logic) about inhabitants of the type. We obtain a similar result for a single lambda calculus (a pure type system), in which terms, types and their relations are expressed. Working within a single system dispenses with the need for an interpretation layer, allowing for an unusually simple presentation. While the unification puts some constraints on the type system (which we spell out), the result applies to many interesting cases, including dependently-typed ones

    Una formalización del modelado multi-nivel

    Full text link
    Los sistemas formales de modelado, como el Unified Modeling Language (UML), son bien cono-cidos por todos los ingenieros de software. Los mismos permiten razonar sobre la estructura a gran escala de los sistemas de la información, facilitando el análisis, diseño e implementación de los mismos, así como su mantenimiento posterior, y simplificando tareas como la refactorización automática o la generación de códi-go. Por otro lado, a pesar del éxito que han tenido estas herramientas, no están exentas de limitaciones. La más notable de las mismas es, quizás, que no se permite considerar más de un nivel de instanciación de una clase. Para solventar esta insuficiencia, existen extensiones, como el Meta-Object Facility (MOF), que aumentan esta funcionalidad añadiendo niveles adicionales entre los que se pueden establecer relaciones de instanciación. El metamodelado multinivel o metamodelado profundo es un paradigma relativamente nuevo de modelado que elimina las restricciones de la estructura estándar de cuatro capas que propone el MOF permi-tiendo sistemas con un número arbitrario de niveles. Sin embargo, el entendimiento actual de esta herra-mienta está basado en nociones de teoría de categorías, una disciplina matemática que resulta difícil de to-mar en relación a lenguajes de programación reales orientados a objetos. Para comprender mejor el funcionamiento de esta nueva herramienta, poniéndola en contexto con la teoría existente, y dar pie a investigación futura, este trabajo pretende establecer una formalización de la misma basada en teoría de tipos, una rama de la teoría de la computación que estudia la semántica de las reglas de tipado en un lenguaje de programación o sistema similar. Con este objetivo, hemos construido y analizado dos sistemas formales que pretenden constituir la base del desarrollo de futuros lenguajes de pro-gramación basados en el metamodelado multinivel, y hemos desarrollado compiladores de los mismos a Ja-vaScript para probar la aplicabilidad de estos modelos teóricos de manera práctica.Formal modeling systems such as the Unified Modeling Language (UML), are widely used by software engineers. Such systems allow reasoning about the large-scale organization of information systems, easing their analysis, design and implementation, reducing maintenance costs and simplifying automated generation or refactoring of software. On the other hand, despite the success that these tools have experienced, they are not devoid of limi-tations. Perhaps the most noticeable is the lack of support for more than one level of instantiation of a certain class. In order to solve this problem, extensions have been designed, such as the Meta-Object Facility (MOF), that expand the functionality of classical modeling frameworks allowing additional levels between which can be established instance-of relationships. Multilevel metamodelling or deep metamodelling is a recently-developed modeling paradigm that aims to completely eliminate the restrictions inherent in the four-layer approach proposed by the MOF, re-placing them with systems that allow for an unrestricted number of object layers. However, the current un-derstanding of this tool is based on category theory, a mathematical abstraction that is hard to relate to real object-oriented programming. In order to better understand the particularities of this new tool, putting it in context with the existing theory and facilitating subsequent research, this work intends to establish a formalization of said tool through the use of type theory, a branch of computer science that deals with the specification and semantics of typing rules for programming languages and similar formal systems. With this in mind, we've developed and analyzed two formal systems that intend to form the basis for the development of further programming languages based on the notions of multilevel metamodelling. Furthermore, we have developed compilers for said systems that show the practical applicability of these purely theoretical models

    Computability in constructive type theory

    Get PDF
    We give a formalised and machine-checked account of computability theory in the Calculus of Inductive Constructions (CIC), the constructive type theory underlying the Coq proof assistant. We first develop synthetic computability theory, pioneered by Richman, Bridges, and Bauer, where one treats all functions as computable, eliminating the need for a model of computation. We assume a novel parametric axiom for synthetic computability and give proofs of results like Rice’s theorem, the Myhill isomorphism theorem, and the existence of Post’s simple and hypersimple predicates relying on no other axioms such as Markov’s principle or choice axioms. As a second step, we introduce models of computation. We give a concise overview of definitions of various standard models and contribute machine-checked simulation proofs, posing a non-trivial engineering effort. We identify a notion of synthetic undecidability relative to a fixed halting problem, allowing axiom-free machine-checked proofs of undecidability. We contribute such undecidability proofs for the historical foundational problems of computability theory which require the identification of invariants left out in the literature and now form the basis of the Coq Library of Undecidability Proofs. We then identify the weak call-by-value λ-calculus L as sweet spot for programming in a model of computation. We introduce a certifying extraction framework and analyse an axiom stating that every function of type ℕ → ℕ is L-computable.Wir behandeln eine formalisierte und maschinengeprüfte Betrachtung von Berechenbarkeitstheorie im Calculus of Inductive Constructions (CIC), der konstruktiven Typtheorie die dem Beweisassistenten Coq zugrunde liegt. Wir entwickeln erst synthetische Berechenbarkeitstheorie, vorbereitet durch die Arbeit von Richman, Bridges und Bauer, wobei alle Funktionen als berechenbar behandelt werden, ohne Notwendigkeit eines Berechnungsmodells. Wir nehmen ein neues, parametrisches Axiom für synthetische Berechenbarkeit an und beweisen Resultate wie das Theorem von Rice, das Isomorphismus Theorem von Myhill und die Existenz von Post’s simplen und hypersimplen Prädikaten ohne Annahme von anderen Axiomen wie Markov’s Prinzip oder Auswahlaxiomen. Als zweiten Schritt führen wir Berechnungsmodelle ein. Wir geben einen kompakten Überblick über die Definition von verschiedenen Berechnungsmodellen und erklären maschinengeprüfte Simulationsbeweise zwischen diesen Modellen, welche einen hohen Konstruktionsaufwand beinhalten. Wir identifizieren einen Begriff von synthetischer Unentscheidbarkeit relativ zu einem fixierten Halteproblem welcher axiomenfreie maschinengeprüfte Unentscheidbarkeitsbeweise erlaubt. Wir erklären solche Beweise für die historisch grundlegenden Probleme der Berechenbarkeitstheorie, die das Identifizieren von Invarianten die normalerweise in der Literatur ausgelassen werden benötigen und nun die Basis der Coq Library of Undecidability Proofs bilden. Wir identifizieren dann den call-by-value λ-Kalkül L als sweet spot für die Programmierung in einem Berechnungsmodell. Wir führen ein zertifizierendes Extraktionsframework ein und analysieren ein Axiom welches postuliert dass jede Funktion vom Typ N→N L-berechenbar ist

    Compilación Certificada sobre Máquinas Abstractas de evaluación normal

    Get PDF
    En esta tesis se analiza cómo demostrar la corrección de compiladores de lenguajes con evaluación normal, utilizando máquinas abstractas como entornos de ejecución. En particular se presenta una prueba de corrección de un compilador basada en la semántica denotacional del lenguaje, utilizando técnicas como step-indexing y biortogonalidad para definir relaciones lógicas que capturen la noción de corrección del compilador de manera composicional. Además, se desarrolla un enfoque basado en la noción de realizabilidad para demostrar la corrección del compilador en un lenguaje con evaluación lazy. Todas las pruebas de corrección presentadas en la tesis están formalizadas en Coq, un asistente de demostración con tipos dependientes

    Church numerals, twice!

    No full text
    This paper explains Church numerals, twice. The first explanation links Church numerals to Peano numerals via the well-known encoding of data types in the polymorphic λ-calculus. This view suggests that Church numerals are folds in disguise. The second explanation, which is more elaborate, but also more insightful, derives Church numerals from first principles, that is, from an algebraic specification of addition and multiplication. Additionally, we illustrate the use of the parametricity theorem by proving exponentiation as reverse application correct.

    Church Numerals, Twice!

    No full text
    This pearl explains Church numerals, twice. The first explanation links Church numerals to Peano numerals via the well-known encoding of data types in the polymorphic #-calculus. This view suggests that Church numerals are folds in disguise. The second explanation, which is more elaborate, but also more insightful, derives Church numerals from first principles, that is, from an algebraic specification of addition and multiplication. Additionally, we illustrate the use of the parametricity theorem by proving exponentiation as reverse application correct

    Theoretical Pearl: Church numerals‚ twice!

    No full text
    This pearl explains Church numerals, twice. The first explanation links Church numerals to Peano numerals via the well-known encoding of data types in the polymorphic λ-calculus. This view suggests that Church numerals are folds in disguise. The second explanation, which is more elaborate, but also more insightful, derives Church numerals from first principles, that is, from an algebraic specification of addition and multiplication. Additionally, we illustrate the use of the parametricity theorem by proving exponentiation as reverse application correct
    corecore