Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This paper was randomly selected as your next reading.
A Pretty Expressive Printer
Pretty printers make tradeoffs between the expressiveness of their pretty printing language, the optimality objective that they minimize when choosing between different ways to lay out a document, and the performance of their algorithm. This paper presents a new pretty printer, e , that is strictly more expressive than all pretty printers in the literature and provably minimizes an optimality objective. Furthermore, the time complexity of e is better than many existing pretty printers. When choosing among different ways to lay out a document, e consults a usersupplied cost factory , which determines the optimality objective, giving e a unique degree of flexibility. We use the Lean theorem prover to verify the correctness validity and optimality of e , and implement e concretely as a pretty printer that we call PrettyExpressive. To evaluate our pretty printer against others, we develop a formal framework for reasoning about the expressiveness of pretty printing languages, and survey pretty printers in the literature, comparing their expressiveness, optimality, worstcase time complexity, and practical running time. Our evaluation shows that PrettyExpressive is efficient and
Porncharoenwase, Sorawee, et al. “A Pretty Expressive Printer. Proceedings of the ACM on Programming Languages, vol. 7, no. OOPSLA2, Oct. 2023, pp. 112249. Crossref, https://doi.org/10.1145/3622837.
Merge this PR to apply selection.