CONSTRAINT MICROKANREN IN THE CLP SCHEME Jason Hemann Submitted to the faculty of the University Graduate School in partial fulfillment of the requirements for the degree Doctor of Philosophy in the Department of School of Informatics, Computing, and Engineering Indiana University January 2020 Accepted by the Graduate Faculty, Indiana University, in partial fulfillment of the require- ments for the degree of Doctor of Philosophy. Daniel P. Friedman, Ph.D. Amr Sabry, Ph.D. Sam Tobin-Hochstadt, Ph.D. Lawrence Moss, Ph.D. December 20, 2019 ii Copyright 2020 Jason Hemann ALL RIGHTS RESERVED iii To Mom and Dad. iv Acknowledgements I want to thank all my housemates and friends from 1017 over the years for their care and support. I’m so glad to have you all, and to have you all over the world. Who would have thought that an old house in Bloomington could beget so many great memories. While I’m thinking of it, thanks to Lisa Kamen and Bryan Rental for helping to keep a roof over our head for so many years. Me encantan mis salseros y salseras. I know what happens in the rueda stays in the rueda, so let me just say there’s nothing better for taking a break from right-brain activity. Thanks to Kosta Papanicolau for his early inspiration in math, critical thinking, and research, and to Profs. Mary Flagg and Michael Larsen for subsequent inspiration and training that helped prepare me for this work. Learning, eh?—who knew? I want to thank also my astounding undergraduate mentors including Profs. Mark Lewis, Berna Massingill, Paul Myers for their early and continued support, a gentle push when I needed it, and for their willingness to answer my questions. Likewise, I want to thank the people of my summer REU in Oakland University including Profs. Fatma Mili, Debasis Debnath, and Mohahmed Zody—and a special shout-out to T-313—for an educational, inspiring, and interesting summer. Thank you Lynne Mikolon and Laura Reed. Without you I don’t know what I would have done. But whatever it was, odds are it would have taken four times as long or that I would still be trying to figure out the coffee machine. Thanks also to Regina and Pattyand Sherry and of the IU SICE staff who helped me jump through all manner of hoops when, left to my own devices, I would have instead garroted myself with red tape. Likewise thanks v to the Wells librarians. Their inter-library loan jiu-jitsu saved me countless hours and made the otherwise impossible possible. Thank you also to the IU Graduate School staff for their help in preparing this manuscript. I’m grateful to the entire 311 and 304 staff: Zach, Robert, Cam, Tim, Suzanne, Brittany, Kyle, Ken, Andy, Andre, Ed, Kristyn, Erik, Josh, Carl, Russell, Ryan, Taylor, K, Mozzy, Mark, Anna, Lalo, Weixi, Jack, Coleman, Adam, David, Hao, Alyssa, and Lewis. Without you all I’d still be in the middle of grading. I could not have hoped for a better set of colleagues and friends. I need to thank all of my 311 and 521 students, for allowing me to guinea pig much of this material to/at them. Your comments, suggestions, corrections and improvements helped make this dissertation what it is. And I need to also thank Adam Foltzer, my predecessor and 311 AI, for his early help and getting me sucked into all of this. Thank you Fiora Pizzo and Kaitlin Kertesz for keeping me on track, and thanks also to CITL and my writing posses and group leaders—especially Tara. I need to also thank Haley, Rin, Praveen, Kaitlin Guidarelli, Emily Larson, and all of my other accountabilibuddies and ersatz writing groups for sitting and working with me. To Ben Lerner, thanks for both sharing your space and time, and thanks for keeping me on track. I want to shout out Kyle and Vince for their support and for providing much needed R & R back home. We’ll have to find a holiday to celebrate this—Dis-mas? Many thanks also to my coauthors and collaborators, including Matt Might, Daniel Brady, Will Byrd, Oleg Kiselyov, and Erik Holk. I want to thank Chung-chieh Shan, and again thank Will Byrd and Oleg Kiselyov, for early discussions of constraints in miniKanren. I want to thank Ryan Culpepper, Leif Anderson, and Alex Knauth for their improvements to the framework macros, Josh Cox for his initial work on miniKanren constraints, and Andre Kuhlenschmidt and Michael Ballantyne for their semantics help specifically and general help generally. I also want to thank all of my anonymous reviewers for all their suggestions vi and improvements. I need to thank Will Byrd, for paving my way practically, technically, academically, and socially. I would not have been to half as many conferences and talks without his initial prodding. I would not have known what this research could be. His larger-than-life presence and visions inspire a wider view of the current project and then some. I need to thank also the IU PL wonks for allowing me to dry-run so much of this dissertation by them. And I want to thank also the Northeastern University PL group and my Rose-Hulman posse for their advice and suggestions. Thanks to Dr. Spencer and his mantra for helping to coax me through the trickier bits, and thanks also to my good friend, caffeine. Special thanks to Lindsey Kuiper, for being so in my corner when I’ve needed it. Lindsey, you’ve been more supportive and inspirational than I think you know. Thank you Memo Dalkilic, for lending an outside ear and a comforting shoulder. Thanks also to Charles Pope, for his continued assistance in helping me staff courses, Funda Ergun for her well-timed prodding, and both for being an ear when I needed one. Matthias Felleisen, thank you so, so much for not just earlier foundational work, but also for the mentoring, older-brothering, inspirational talks, practical advice, proofreading, the best whip-cracking this side of Gen. Patton, and so much more. I’m so lucky to be under your wing. I of course want to thank my wonderful, loving family. Momma, thanks for all the fruit and coffee and cookies that were the fuel that made this possible. Dad, thanks forthe frequent talks and even more frequent flier miles. Thank you Tyler and Jana, your wonderful spouses Aly and Ross, and little Ady, Andy, and Brett. And Larry for such wonderful talks. And Jill, not least of all for the never-ending snacks. Having more time to spend with everyone in the whole, extended family is another great reason to have this finished. vii I give my heartfelt thanks to my entire committee for their suggestions, support, and shoulders. I could not have accomplished this without your guidance. Amr and Larry, I hope I can pay forward the support and mentoring that you’ve given me. Sam, I don’t know how I’ll manage life’s great mysteries without barging into your office to ask about them. Thank you to the Friedmans. To work with Dan is to get to know the whole Friedman clan. Thank you so much for so graciously welcoming me into your home and your lives. Dan and Mary, I’ll forever treasure your friendship. To my advisor and mentor Dan specifically, what can I possibly say here? Thank you for being a wonderful mentor, partner, raconteur, hacking buddy, the better part of the “Friedman-and-Hemann” standup duo, and my dear, dear friend. Dan introduced me to the joys of Scheming before we even met, and he has not let up since then. You’ve taught me so much about computing, navigating the academic world, and life in general. One would think I’d be used to it by now, but I am still surprised anew by the depth of his wisdom. It may take a while to realize it, but in the large Dan usually ends up being correct. My office is lined with books and stacks upon stacks ofpapers as I write this, and I have my irons in several fires; it’s the image of a “little Dan”. I continue to put to use all the wisdom you’ve imparted. Financial Support. My dissertation has been financed by a teaching assistantship from the Indiana University Department of Computer Science and faculty positions at the Rose-Hulman Institute of Technology and Northeastern University. I am grateful for all this kindness and support. viii Abstract Programmers in related constraint-logic languages should have language semantics that span different implementations and enable reasoning generally about the shared partsof languages’ behaviors while reflecting their differences. A wide class of miniKanren languages are syntactic extensions over a small kernel logic programming language with interrelated semantics parameterized by their constraint systems. This thesis characterizes succinctly a set of miniKanren CLP languages parameterized by their constraints, for pure, relational programming by instantiating, for each, portions of the constraint domain. This set of languages carry related components of their declarative and operational semantics that are independent of a particular host language or their particular constraint sets. This characterization bolsters the development of useful tools and aids in solving important tasks with pure relational programming. Prerequisites and Mathematics We presume the reader has formal logic background sufficient to complete an introduc- tory logic course, and is familiar with the subject matter from a first course in programming languages for graduate or advanced undergraduate students such as is taught at Indiana Uni- versity, including the programming language Racket, a dialect of Scheme.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages216 Page
-
File Size-