Proceedings of the 2013 ACM SIGPLAN Workshop on Dependently-Typed Programming 2013
DOI: 10.1145/2502409.2502410
|View full text |Cite
|
Sign up to set email alerts
|

Correct-by-construction pretty-printing

Abstract: A new approach to correct-by-construction pretty-printing is presented. The basic methodology is the one of classical (not necessarily correct) pretty-printing: users convert values to pretty-printer documents, and a general rendering algorithm turns documents into strings. The main novelty is that dependent types are used to ensure that, for each value, the constructed document is correct with respect to the value and a given grammar. Other parts of the development use well-established technology: the pretty-… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
3
1
1

Citation Types

0
8
0

Year Published

2014
2014
2021
2021

Publication Types

Select...
4
2
1

Relationship

0
7

Authors

Journals

citations
Cited by 7 publications
(8 citation statements)
references
References 13 publications
0
8
0
Order By: Relevance
“…In subsequent work, Tan and Morrisett [2018] extended this DSL to support bidirectional grammars in order to provide a uniform language for specifying and generating both decoders and encoders, proving a similar notion of consistency to what we present here. Danielsson [2013], on the other hand, shows how to extend traditional approaches to derive correct-by-construction pretty-printers, whose output is guaranteed to be parsable into the original value by a user-supplied context-free grammar. In the FliPpr language [Matsuda and Wang 2018], instead of supplying the grammar, users annotate a pretty-printer with additional directives specifying how to parse non-pretty input; the annotated program is then automatically inverted to generate a context-free grammar.…”
Section: Related Workmentioning
confidence: 99%
“…In subsequent work, Tan and Morrisett [2018] extended this DSL to support bidirectional grammars in order to provide a uniform language for specifying and generating both decoders and encoders, proving a similar notion of consistency to what we present here. Danielsson [2013], on the other hand, shows how to extend traditional approaches to derive correct-by-construction pretty-printers, whose output is guaranteed to be parsable into the original value by a user-supplied context-free grammar. In the FliPpr language [Matsuda and Wang 2018], instead of supplying the grammar, users annotate a pretty-printer with additional directives specifying how to parse non-pretty input; the annotated program is then automatically inverted to generate a context-free grammar.…”
Section: Related Workmentioning
confidence: 99%
“…Different approaches have been proposed to derive prettier [26], and correct-by-construction [7] pretty-printers. However, these approaches are aimed at traditional programming languages, and might require further adaptations to be applied to layout-sensitive languages.…”
Section: Pretty-printingmentioning
confidence: 99%
“…This has directly inspired some of our terminology regarding semi-partial isomorphisms. Danielsson [2013] has shown how to write a pretty printing library that guarantees a similar round trip property.…”
Section: Related Workmentioning
confidence: 99%