Type-Directed Program Transformations for the Working Functional Programmer

Authors Justin Lubin, Ravi Chugh



PDF
Thumbnail PDF

File

OASIcs.PLATEAU.2019.3.pdf
  • Filesize: 449 kB
  • 12 pages

Document Identifiers

Author Details

Justin Lubin
  • University of Chicago, Chicago, IL, USA
Ravi Chugh
  • University of Chicago, Chicago, IL, USA

Cite As Get BibTex

Justin Lubin and Ravi Chugh. Type-Directed Program Transformations for the Working Functional Programmer. In 10th Workshop on Evaluation and Usability of Programming Languages and Tools (PLATEAU 2019). Open Access Series in Informatics (OASIcs), Volume 76, pp. 3:1-3:12, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2020) https://doi.org/10.4230/OASIcs.PLATEAU.2019.3

Abstract

We present preliminary research on Deuce+, a set of tools integrating plain text editing with structural manipulation that brings the power of expressive and extensible type-directed program transformations to everyday, working programmers without a background in computer science or mathematical theory. Deuce+ comprises three components: (i) a novel set of type-directed program transformations, (ii) support for syntax constraints for specifying "code style sheets" as a means of flexibly ensuring the consistency of both the concrete and abstract syntax of the output of program transformations, and (iii) a domain-specific language for specifying program transformations that can operate at a high level on the abstract (and/or concrete) syntax tree of a program and interface with syntax constraints to expose end-user options and alleviate tedious and potentially mutually inconsistent style choices. Currently, Deuce+ is in the design phase of development, and discovering the right usability choices for the system is of the highest priority.

Subject Classification

ACM Subject Classification
  • Human-centered computing → Human computer interaction (HCI)
  • Software and its engineering → Domain specific languages
  • Software and its engineering → Integrated and visual development environments
Keywords
  • program transformations
  • structured editing
  • refactoring
  • code formatting

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Edwin Brady. Type-Driven Development with Idris. Manning Publications Company, 2017. URL: https://books.google.com/books?id=eWzEjwEACAAJ.
  2. Ravi Chugh. Structured Editing for Elm* in Elm, 2018. URL: https://www.youtube.com/watch?v=IcgmSRJHu_8.
  3. Michael Coblenz, Jonathan Aldrich, Brad A. Myers, and Joshua Sunshine. Interdisciplinary Programming Language Design. In Proceedings of the 2018 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, Onward! 2018, pages 133-146, New York, NY, USA, 2018. ACM. URL: https://doi.org/10.1145/3276954.3276965.
  4. Richard Feldman. Making Impossible States Impossible, 2016. URL: https://www.youtube.com/watch?v=IcgmSRJHu_8.
  5. Jonathan Frankle, Peter-Michael Osera, David Walker, and Steve Zdancewic. Example-Directed Synthesis: A Type-Theoretic Interpretation. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '16, pages 802-815, New York, NY, USA, 2016. ACM. URL: https://doi.org/10.1145/2837614.2837629.
  6. Tim Freeman and Frank Pfenning. Refinement Types for ML. In Proceedings of the ACM SIGPLAN 1991 Conference on Programming Language Design and Implementation, PLDI '91, pages 268-277, New York, NY, USA, 1991. ACM. URL: https://doi.org/10.1145/113445.113468.
  7. Susumu Hayashi. Logic of refinement types. In Henk Barendregt and Tobias Nipkow, editors, Types for Proofs and Programs, pages 108-126, Berlin, Heidelberg, 1994. Springer Berlin Heidelberg. Google Scholar
  8. Brian Hempel, Justin Lubin, Grace Lu, and Ravi Chugh. Deuce: A Lightweight User Interface for Structured Editing. In Proceedings of the 40th International Conference on Software Engineering, ICSE '18, pages 654-664, New York, NY, USA, 2018. ACM. URL: https://doi.org/10.1145/3180155.3180165.
  9. JetBrains. JetBrains MPS. URL: https://www.jetbrains.com/mps/ [cited August 14, 2019]. URL: https://www.jetbrains.com/mps/.
  10. Tristan Knoth, Di Wang, Nadia Polikarpova, and Jan Hoffmann. Resource-Guided Program Synthesis. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2019, pages 253-268, New York, NY, USA, 2019. ACM. URL: https://doi.org/10.1145/3314221.3314602.
  11. Huiqing Li and Simon Thompson. Tool Support for Refactoring Functional Programs. In Partial Evaluation and Program Manipulation, pages 182-196, San Francisco, California, USA, January 2008. URL: http://www.cs.kent.ac.uk/pubs/2008/2634.
  12. Justin Lubin, Nick Collins, Cyrus Omar, and Ravi Chugh. Live Example-Directed Program Synthesis, 2019. Google Scholar
  13. John Maloney, Mitchel Resnick, Natalie Rusk, Brian Silverman, and Evelyn Eastmond. The Scratch Programming Language and Environment. Trans. Comput. Educ., 10(4):16:1-16:15, November 2010. URL: https://doi.org/10.1145/1868358.1868363.
  14. Conor McBride. The Derivative of a Regular Type is its Type of One-Hole Contexts. URL: http://strictlypositive.org/diff.pdf.
  15. Yaron Minksy. Effective ML, 2010. URL: https://blog.janestreet.com/effective-ml-video/.
  16. Chris Okasaki. Purely Functional Data Structures. Cambridge University Press, New York, NY, USA, 1998. Google Scholar
  17. Cyrus Omar, Ian Voysey, Ravi Chugh, and Matthew A. Hammer. Live Functional Programming with Typed Holes. PACMPL, 3(POPL), 2019. URL: https://doi.org/10.1145/3290327.
  18. Peter-Michael Osera. Program synthesis with types. PhD thesis, University of Pennsylvania, 2015. Google Scholar
  19. Peter-Michael Osera. Constraint-Based Type-Directed Program Synthesis. In Proceedings of the 4th ACM SIGPLAN International Workshop on Type-Driven Development, TyDe 2019, pages 64-76, New York, NY, USA, 2019. ACM. URL: https://doi.org/10.1145/3331554.3342608.
  20. Peter-Michael Osera and Steve Zdancewic. Type-and-Example-Directed Program Synthesis. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '15, pages 619-630, New York, NY, USA, 2015. ACM. URL: https://doi.org/10.1145/2737924.2738007.
  21. Nadia Polikarpova, Ivan Kuraj, and Armando Solar-Lezama. Program Synthesis from Polymorphic Refinement Types. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '16, pages 522-538, New York, NY, USA, 2016. ACM. URL: https://doi.org/10.1145/2908080.2908093.
  22. Reudismam Rolim, Gustavo Soares, Loris D'Antoni, Oleksandr Polozov, Sumit Gulwani, Rohit Gheyi, Ryo Suzuki, and Björn Hartmann. Learning Syntactic Program Transformations from Examples. In Proceedings of the 39th International Conference on Software Engineering, ICSE '17, pages 404-415, Piscataway, NJ, USA, 2017. IEEE Press. URL: https://doi.org/10.1109/ICSE.2017.44.
  23. Patrick M. Rondon, Ming Kawaguci, and Ranjit Jhala. Liquid Types. In Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '08, pages 159-169, New York, NY, USA, 2008. ACM. URL: https://doi.org/10.1145/1375581.1375602.
  24. Tim Teitelbaum and Thomas Reps. The Cornell Program Synthesizer: A Syntax-directed Programming Environment. Commun. ACM, 24(9):563-573, September 1981. URL: https://doi.org/10.1145/358746.358755.
  25. Markus Voelter, Janet Siegmund, Thorsten Berger, and Bernd Kolb. Towards User-Friendly Projectional Editors. In Benoît Combemale, David J. Pearce, Olivier Barais, and Jurgen J. Vinju, editors, Software Language Engineering, pages 41-61, Cham, 2014. Springer International Publishing. Google Scholar
  26. Geoffrey Washburn and Stephanie Weirich. Good Advice for Type-directed Programming Aspect-oriented Programming and Extensible Generic Functions. In Proceedings of the 2006 ACM SIGPLAN Workshop on Generic Programming, WGP '06, pages 33-44, New York, NY, USA, 2006. ACM. URL: https://doi.org/10.1145/1159861.1159867.
  27. Stephanie Weirich and Liang Huang. A Design for Type-Directed Programming in Java. Electron. Notes Theor. Comput. Sci., 138(2):117-136, November 2005. URL: https://doi.org/10.1016/j.entcs.2005.09.014.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail