Bidirectional Elaboration of Dependently Typed Programs

Dependently typed programming languages allow programmers to express a rich set of invariants and verify them statically via type checking. To make programming with dependent types practical, dependently typed systems provide a compact language for pro-grammers where one can omit some arguments, cal...

Full description

Bibliographic Details
Main Authors: Francisco Ferreira, Brigitte Pientka
Other Authors: The Pennsylvania State University CiteSeerX Archives
Format: Text
Language:English
Subjects:
Online Access:http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.672.6554
http://www.cs.mcgill.ca/%7Ebpientka/papers/reconstruction-long.pdf
id ftciteseerx:oai:CiteSeerX.psu:10.1.1.672.6554
record_format openpolar
spelling ftciteseerx:oai:CiteSeerX.psu:10.1.1.672.6554 2023-05-15T15:41:52+02:00 Bidirectional Elaboration of Dependently Typed Programs Francisco Ferreira Brigitte Pientka The Pennsylvania State University CiteSeerX Archives application/pdf http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.672.6554 http://www.cs.mcgill.ca/%7Ebpientka/papers/reconstruction-long.pdf en eng http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.672.6554 http://www.cs.mcgill.ca/%7Ebpientka/papers/reconstruction-long.pdf Metadata may be used without restrictions as long as the oai identifier remains attached to it. http://www.cs.mcgill.ca/%7Ebpientka/papers/reconstruction-long.pdf type reconstruction text ftciteseerx 2016-01-08T17:26:44Z Dependently typed programming languages allow programmers to express a rich set of invariants and verify them statically via type checking. To make programming with dependent types practical, dependently typed systems provide a compact language for pro-grammers where one can omit some arguments, called implicit, which can be inferred. This source language is then usually elab-orated into a core language where type checking and fundamen-tal properties such as normalization are well understood. Unfor-tunately, this elaboration is rarely specified and in general is ill-understood. This makes it not only difficult for programmers to un-derstand why a given program fails to type check, but also is one of the reasons that implementing dependently typed programming systems remains a black art known only to a few. In this paper, we specify the design of a source language for a dependently typed programming language where we separate the language of programs from the language of types and terms occur-ring in types. We then give a bi-directional elaboration algorithm to translate source terms where implicit arguments can be omitted to a fully explicit core language and prove soundness of our elabora-tion. Our framework provides post-hoc explanation for elaboration found in the programming and proof environment, Beluga. Categories and Subject Descriptors CR-number [subcategory]: third-level Text Beluga Beluga* Unknown
institution Open Polar
collection Unknown
op_collection_id ftciteseerx
language English
topic type reconstruction
spellingShingle type reconstruction
Francisco Ferreira
Brigitte Pientka
Bidirectional Elaboration of Dependently Typed Programs
topic_facet type reconstruction
description Dependently typed programming languages allow programmers to express a rich set of invariants and verify them statically via type checking. To make programming with dependent types practical, dependently typed systems provide a compact language for pro-grammers where one can omit some arguments, called implicit, which can be inferred. This source language is then usually elab-orated into a core language where type checking and fundamen-tal properties such as normalization are well understood. Unfor-tunately, this elaboration is rarely specified and in general is ill-understood. This makes it not only difficult for programmers to un-derstand why a given program fails to type check, but also is one of the reasons that implementing dependently typed programming systems remains a black art known only to a few. In this paper, we specify the design of a source language for a dependently typed programming language where we separate the language of programs from the language of types and terms occur-ring in types. We then give a bi-directional elaboration algorithm to translate source terms where implicit arguments can be omitted to a fully explicit core language and prove soundness of our elabora-tion. Our framework provides post-hoc explanation for elaboration found in the programming and proof environment, Beluga. Categories and Subject Descriptors CR-number [subcategory]: third-level
author2 The Pennsylvania State University CiteSeerX Archives
format Text
author Francisco Ferreira
Brigitte Pientka
author_facet Francisco Ferreira
Brigitte Pientka
author_sort Francisco Ferreira
title Bidirectional Elaboration of Dependently Typed Programs
title_short Bidirectional Elaboration of Dependently Typed Programs
title_full Bidirectional Elaboration of Dependently Typed Programs
title_fullStr Bidirectional Elaboration of Dependently Typed Programs
title_full_unstemmed Bidirectional Elaboration of Dependently Typed Programs
title_sort bidirectional elaboration of dependently typed programs
url http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.672.6554
http://www.cs.mcgill.ca/%7Ebpientka/papers/reconstruction-long.pdf
genre Beluga
Beluga*
genre_facet Beluga
Beluga*
op_source http://www.cs.mcgill.ca/%7Ebpientka/papers/reconstruction-long.pdf
op_relation http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.672.6554
http://www.cs.mcgill.ca/%7Ebpientka/papers/reconstruction-long.pdf
op_rights Metadata may be used without restrictions as long as the oai identifier remains attached to it.
_version_ 1766374751523045376