Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Pretty Expressive Printer #208

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions data/desc.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Fat Pointers for Temporal Memory Safety of C
Zhou, Jie, et al. “Fat Pointers for Temporal Memory Safety of C.” Proceedings of the ACM on Programming Languages, vol. 7, no. OOPSLA1, Apr. 2023, pp. 316–47. Crossref, https://doi.org/10.1145/3586038.
Temporal memory safety bugs, especially use-after-free and double free bugs, pose a major security threat to C programs. Real-world exploits utilizing these bugs enable attackers to read and write arbitrary memory locations, causing disastrous violations of confidentiality, integrity, and availability. Many previous solutions retrofit temporal memory safety to C, but they all either incur high performance overhead and/or miss detecting certain types of temporal memory safety bugs. In this paper, we propose a temporal memory safety solution that is both efficient and comprehensive. Specifically, we extend Checked C, a spatially-safe extension to C, with temporally-safe pointers. These are implemented by combining two techniques: fat pointers and dynamic key-lock checks. We show that the fat-pointer solution significantly improves running time and memory overhead compared to the disjoint-metadata approach that provides the same level of protection. With empirical program data and hands-on experience porting real-world applications, we also show that our solution is practical in terms of backward compatibility---one of the major complaints about fat pointers.
A Pretty Expressive Printer
Porncharoenwase, Sorawee, et al. “A Pretty Expressive Printer.” Proceedings of the ACM on Programming Languages, vol. 7, no. OOPSLA2, Oct. 2023, pp. 1122–49. Crossref, https://doi.org/10.1145/3622837.
Pretty printers make trade-offs 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 user-supplied 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, worst-case time complexity, and practical running time. Our evaluation shows that PrettyExpressive is efficient and effective at producing optimal layouts. PrettyExpressive has also seen real-world adoption: it serves as a foundation of a code formatter for Racket.
3 changes: 2 additions & 1 deletion data/history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ https://doi.org/10.1145/3656456
https://doi.org/10.1145/3622828
https://doi.org/10.1145/3632882
https://doi.org/10.1145/3607862
https://doi.org/10.1145/3586038
https://doi.org/10.1145/3586038
https://doi.org/10.1145/3622837
2 changes: 1 addition & 1 deletion data/next.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://doi.org/10.1145/3586038
https://doi.org/10.1145/3622837
3 changes: 2 additions & 1 deletion data/past.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ https://doi.org/10.1145/3656456
https://doi.org/10.1145/3622828
https://doi.org/10.1145/3632882
https://doi.org/10.1145/3607862
https://doi.org/10.1145/3586038
https://doi.org/10.1145/3586038
https://doi.org/10.1145/3622837
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Our tools for paper selection: [plgroup on Github](https://github.com/the-au-for
| 3. | September 13 | Polymorphic Type Inference for Dynamic Languages |
| 4. | September 20 | A Graded Modal Dependent Type Theory with a Universe and Erasure, Formalized |
| 5. | September 27 | Fat Pointers for Temporal Memory Safety of C |
| 6. | October 4 | Paper 6 discussion |
| 6. | October 4 | A Pretty Expressive Printer |
| 7. | October 11 | Paper 7 discussion |
| 8. | October 18 | Paper 8 discussion |
| 9. | October 25 | Paper 9 discussion |
Expand Down
3 changes: 2 additions & 1 deletion docs/papers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
2. Lee, Edward, and Ondřej Lhoták. “Simple Reference Immutability for System F &lt;:” Proceedings of the ACM on Programming Languages, vol. 7, no. OOPSLA2, Oct. 2023, pp. 857–81. Crossref, <a href='https://doi.org/10.1145/3622828' target='_blank'>https://doi.org/10.1145/3622828</a>.
3. Castagna, Giuseppe, et al. “Polymorphic Type Inference for Dynamic Languages.” Proceedings of the ACM on Programming Languages, vol. 8, no. POPL, Jan. 2024, pp. 1179–210. Crossref, <a href='https://doi.org/10.1145/3632882' target='_blank'>https://doi.org/10.1145/3632882</a>.
4. Abel, Andreas, et al. “A Graded Modal Dependent Type Theory with a Universe and Erasure, Formalized.” Proceedings of the ACM on Programming Languages, vol. 7, no. ICFP, Aug. 2023, pp. 920–54. Crossref, <a href='https://doi.org/10.1145/3607862' target='_blank'>https://doi.org/10.1145/3607862</a>.
5. Zhou, Jie, et al. “Fat Pointers for Temporal Memory Safety of C.” Proceedings of the ACM on Programming Languages, vol. 7, no. OOPSLA1, Apr. 2023, pp. 316–47. Crossref, <a href='https://doi.org/10.1145/3586038' target='_blank'>https://doi.org/10.1145/3586038</a>.
5. Zhou, Jie, et al. “Fat Pointers for Temporal Memory Safety of C.” Proceedings of the ACM on Programming Languages, vol. 7, no. OOPSLA1, Apr. 2023, pp. 316–47. Crossref, <a href='https://doi.org/10.1145/3586038' target='_blank'>https://doi.org/10.1145/3586038</a>.
6. Porncharoenwase, Sorawee, et al. “A Pretty Expressive Printer.” Proceedings of the ACM on Programming Languages, vol. 7, no. OOPSLA2, Oct. 2023, pp. 1122–49. Crossref, <a href='https://doi.org/10.1145/3622837' target='_blank'>https://doi.org/10.1145/3622837</a>.