Cargando…
Semantical Analysis of Contextual Types
We describe a category-theoretic semantics for a simply typed variant of Cocon, a contextual modal type theory where the box modality mediates between the weak function space that is used to represent higher-order abstract syntax (HOAS) trees and the strong function space that describes (recursive)...
Autores principales: | , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
2020
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7788623/ http://dx.doi.org/10.1007/978-3-030-45231-5_26 |
_version_ | 1783633066538827776 |
---|---|
author | Pientka, Brigitte Schöpp, Ulrich |
author_facet | Pientka, Brigitte Schöpp, Ulrich |
author_sort | Pientka, Brigitte |
collection | PubMed |
description | We describe a category-theoretic semantics for a simply typed variant of Cocon, a contextual modal type theory where the box modality mediates between the weak function space that is used to represent higher-order abstract syntax (HOAS) trees and the strong function space that describes (recursive) computations about them. What makes Cocon different from standard type theories is the presence of first-class contexts and contextual objects to describe syntax trees that are closed with respect to a given context of assumptions. Following M. Hofmann’s work, we use a presheaf model to characterise HOAS trees. Surprisingly, this model already provides the necessary structure to also model Cocon. In particular, we can capture the contextual objects of Cocon using a comonad [Formula: see text] that restricts presheaves to their closed elements. This gives a simple semantic characterisation of the invariants of contextual types (e.g. substitution invariance) and identifies Cocon as a type-theoretic syntax of presheaf models. We express our category-theoretic constructions by using a modal internal type theory that is implemented in Agda-Flat. |
format | Online Article Text |
id | pubmed-7788623 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2020 |
record_format | MEDLINE/PubMed |
spelling | pubmed-77886232021-01-07 Semantical Analysis of Contextual Types Pientka, Brigitte Schöpp, Ulrich Foundations of Software Science and Computation Structures Article We describe a category-theoretic semantics for a simply typed variant of Cocon, a contextual modal type theory where the box modality mediates between the weak function space that is used to represent higher-order abstract syntax (HOAS) trees and the strong function space that describes (recursive) computations about them. What makes Cocon different from standard type theories is the presence of first-class contexts and contextual objects to describe syntax trees that are closed with respect to a given context of assumptions. Following M. Hofmann’s work, we use a presheaf model to characterise HOAS trees. Surprisingly, this model already provides the necessary structure to also model Cocon. In particular, we can capture the contextual objects of Cocon using a comonad [Formula: see text] that restricts presheaves to their closed elements. This gives a simple semantic characterisation of the invariants of contextual types (e.g. substitution invariance) and identifies Cocon as a type-theoretic syntax of presheaf models. We express our category-theoretic constructions by using a modal internal type theory that is implemented in Agda-Flat. 2020-04-17 /pmc/articles/PMC7788623/ http://dx.doi.org/10.1007/978-3-030-45231-5_26 Text en © The Author(s) 2020 Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. |
spellingShingle | Article Pientka, Brigitte Schöpp, Ulrich Semantical Analysis of Contextual Types |
title | Semantical Analysis of Contextual Types |
title_full | Semantical Analysis of Contextual Types |
title_fullStr | Semantical Analysis of Contextual Types |
title_full_unstemmed | Semantical Analysis of Contextual Types |
title_short | Semantical Analysis of Contextual Types |
title_sort | semantical analysis of contextual types |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7788623/ http://dx.doi.org/10.1007/978-3-030-45231-5_26 |
work_keys_str_mv | AT pientkabrigitte semanticalanalysisofcontextualtypes AT schoppulrich semanticalanalysisofcontextualtypes |