Daniel Friedman | Indiana University (original) (raw)
Uploads
Papers by Daniel Friedman
An introduction to relational (pure logic) programming using the miniKanren language. Includes th... more An introduction to relational (pure logic) programming using the miniKanren language. Includes the complete implementation of miniKanren.
Reflective systems are intended to be open enough to allow the user to extend and modify them eas... more Reflective systems are intended to be open enough to allow the user to extend and modify them easily. In this paper we show that the openness and extensibility of a reflective system depends to a great degree on the choice of its underlying representations. Giving the language the necessary expressive power requires forethought in the design stage of the kinds of extensions the user might wish to make. We illustrate this conclusion by considering what features a reflective language should have in order to implement quasi-static binding. Since quasi-static binding involves modification of the environment, it is a natural candidate for reflective implementation. We show that the ease, and even possibility, of the implementationdepends on the representation choices of the underlying reflective system. 1 Introduction Reflective systems allow the user to extend the system at run time. The standard procedurally reflective languages, such as 3-Lisp [13, 4], Brown [6, 14], and Blond [2, 3, ...
The Reasoned Schemer, 2005
The goal of The Reasoned Schemer is to help the functional programmer think logically and the log... more The goal of The Reasoned Schemer is to help the functional programmer think logically and the logic programmer think functionally. The authors of The Reasoned Schemer believe that logic programming is a natural extension of functional programming, and they demonstrate this by extending the functional language Scheme with logical constructs -- thereby combining the benefits of both styles. The extension encapsulates most of the ideas in the logic programming language Prolog.The pedagogical method of The Reasoned Schemer is a series of questions and answers, which proceed with the characteristic humor that marked The Little Schemer and The Seasoned Schmer. Familiarity with a functional language or with the first eight chapters of The Little Schemer is assumed. Adding logic capabilities required the introduction of new forms. The authors' goal is to show to what extent writing logic programs is the same as writing functional programs using these forms. In this way, the reader of Th...
This paper proposes that the distinguishing characteristic of Aspect-Oriented Programming (AOP) s... more This paper proposes that the distinguishing characteristic of Aspect-Oriented Programming (AOP) systems is that they allow programming by making quantified programmatic assertions over programs written by programmers oblivious to such assertions. Thus, AOP systems can be analyzed with respect to three critical dimensions: the kinds of quantifications allowed, the nature of the actions that can be asserted, and the mechanism for combining base-level actions with asserted actions. Consequences of this perspective are the recognition that certain systems are not AOP and that some mechanisms are expressive enough to allow programming an AOP system within them. A corollary is that while AOP can be applied to Object-Oriented Programming, it is an independent concept applicable to other programming styles.
Jonathan G. Rossie, Jr. and Daniel P. Friedman fjrossie,dfriedg@cs.indiana.edu Department of Comp... more Jonathan G. Rossie, Jr. and Daniel P. Friedman fjrossie,dfriedg@cs.indiana.edu Department of Computer Science, Indiana University 215 Lindley Hall, Bloomington, Indiana 47405 May 17, 1995 Abstract We find that by answering three essential questions about the static properties of inheritance hierarchies, we gain significant insight into the kind of inheritance best exemplified by C++. Multiple inheritance, the dominance rule for disambiguation, and the presence of virtual and nonvirtual base classes lead to quite a complicated semantics. By abstracting the notion of a subobject, we have designed an algebra for answering the three questions in a way that manages all of these complications. Overview The multiple-inheritance model found in C++[2, 6], which derives largely from Krogdahl's multiple inheritance for Simula[3], can be seen as the result of one fundamental design imperative: that distinct storage should be allocated for each instance variable, regardless of name identity. T...
The notion of continuations is ubiquitous in many di erent areas of computer science, including c... more The notion of continuations is ubiquitous in many di erent areas of computer science, including category theory, compilers, logic, operating systems, programming, and semantics. Following on the 1992 and 1997 ACM SIGPLAN Workshops on Continuations, the current w orkshop provides a forum for the presentation and discussion of new results and work in progress aimed at a better understanding of the nature of continuations, the relation of continuations to other areas of logic and computer science, and exciting new applications of continuations in contexts such as mobile threads, simulation, distributed systems, graphical user interfaces, and education. The program includes seven technical papers. Christopher Wadsworth the originator of the term continuation" and Suresh Jagannathan at NEC Research and Emphora, Inc. kindly agreed to deliver invited talks at CW'01. Review Process A call for papers was announced on several mailing lists and newsgroups. Thirteen submissions were received and forty six reviews were written. Each paper was owned" by one committee member who was responsible for summarizing all the reviews and making a recommendation to the rest of the committee. The nal decisions were made collectively by the program committee on the basis of the collected reviews. The discussions among the committee members were conducted electronically and lasted for about a week.
The Scheme programming language has a standard mechanism for syntactic extension that is little u... more The Scheme programming language has a standard mechanism for syntactic extension that is little used because it is perceived to have not enough expressive power. While there are useful transformations the standard mechanism cannot do, it is possible to create powerful and portable syntactic extensions by writing syntax transformers in a continuationpassing style. We introduce this style, and show how it may be used to perform arbitrary Turing-complete computation over expression shapes during the expansion process. We conclude with a real-world use of the technique, and evaluate the loss of clarity necessitated by the standard mechanism.
This paper attempts to develop a better theoretical understanding of re ective systems. We begin ... more This paper attempts to develop a better theoretical understanding of re ective systems. We begin by a developing a re ective extension of the v-calculus and de ne a simple operational semantics for it based on the in nite tower model described in [10]. We then develop an equational logic from this semantics. The resulting logic is shown to be weak because of re ective properties. We establish properties about this logic and show that it corresponds to the operational semantics.
This paper presents a new two-stage CPS algorithm. The first stage plants trivial partial continu... more This paper presents a new two-stage CPS algorithm. The first stage plants trivial partial continuations via a recursive-descent traversal and the second stage is a rewrite system that transforms all nontail calls into tail calls. The algorithm combines the metaphors of the Plotkin-style CPS transformation along with reduction in the -calculus.
The Little Prover introduces inductive proofs as a way to determine facts about computer programs... more The Little Prover introduces inductive proofs as a way to determine facts about computer programs. It is written in an approachable, engaging style of question-and-answer, with the characteristic humor of The Little Schemer (fourth edition, MIT Press). Sometimes the best way to learn something is to sit down and do it; the book takes readers through step-by-step examples showing how to write inductive proofs. The Little Prover assumes only knowledge of recursive programs and lists (as presented in the first three chapters of The Little Schemer ) and uses only a few terms beyond what novice programmers already know. The book comes with a simple proof assistant to help readers work through the book and complete solutions to every example.
The Little Prover introduces inductive proofs as a way to determine facts about computer programs... more The Little Prover introduces inductive proofs as a way to determine facts about computer programs. It is written in an approachable, engaging style of question-and-answer, with the characteristic humor of The Little Schemer (fourth edition, MIT Press). Sometimes the best way to learn something is to sit down and do it; the book takes readers through step-by-step examples showing how to write inductive proofs. The Little Prover assumes only knowledge of recursive programs and lists (as presented in the first three chapters of The Little Schemer ) and uses only a few terms beyond what novice programmers already know. The book comes with a simple proof assistant to help readers work through the book and complete solutions to every example.
An introduction to relational (pure logic) programming using the miniKanren language. Includes th... more An introduction to relational (pure logic) programming using the miniKanren language. Includes the complete implementation of miniKanren.
Reflective systems are intended to be open enough to allow the user to extend and modify them eas... more Reflective systems are intended to be open enough to allow the user to extend and modify them easily. In this paper we show that the openness and extensibility of a reflective system depends to a great degree on the choice of its underlying representations. Giving the language the necessary expressive power requires forethought in the design stage of the kinds of extensions the user might wish to make. We illustrate this conclusion by considering what features a reflective language should have in order to implement quasi-static binding. Since quasi-static binding involves modification of the environment, it is a natural candidate for reflective implementation. We show that the ease, and even possibility, of the implementationdepends on the representation choices of the underlying reflective system. 1 Introduction Reflective systems allow the user to extend the system at run time. The standard procedurally reflective languages, such as 3-Lisp [13, 4], Brown [6, 14], and Blond [2, 3, ...
The Reasoned Schemer, 2005
The goal of The Reasoned Schemer is to help the functional programmer think logically and the log... more The goal of The Reasoned Schemer is to help the functional programmer think logically and the logic programmer think functionally. The authors of The Reasoned Schemer believe that logic programming is a natural extension of functional programming, and they demonstrate this by extending the functional language Scheme with logical constructs -- thereby combining the benefits of both styles. The extension encapsulates most of the ideas in the logic programming language Prolog.The pedagogical method of The Reasoned Schemer is a series of questions and answers, which proceed with the characteristic humor that marked The Little Schemer and The Seasoned Schmer. Familiarity with a functional language or with the first eight chapters of The Little Schemer is assumed. Adding logic capabilities required the introduction of new forms. The authors' goal is to show to what extent writing logic programs is the same as writing functional programs using these forms. In this way, the reader of Th...
This paper proposes that the distinguishing characteristic of Aspect-Oriented Programming (AOP) s... more This paper proposes that the distinguishing characteristic of Aspect-Oriented Programming (AOP) systems is that they allow programming by making quantified programmatic assertions over programs written by programmers oblivious to such assertions. Thus, AOP systems can be analyzed with respect to three critical dimensions: the kinds of quantifications allowed, the nature of the actions that can be asserted, and the mechanism for combining base-level actions with asserted actions. Consequences of this perspective are the recognition that certain systems are not AOP and that some mechanisms are expressive enough to allow programming an AOP system within them. A corollary is that while AOP can be applied to Object-Oriented Programming, it is an independent concept applicable to other programming styles.
Jonathan G. Rossie, Jr. and Daniel P. Friedman fjrossie,dfriedg@cs.indiana.edu Department of Comp... more Jonathan G. Rossie, Jr. and Daniel P. Friedman fjrossie,dfriedg@cs.indiana.edu Department of Computer Science, Indiana University 215 Lindley Hall, Bloomington, Indiana 47405 May 17, 1995 Abstract We find that by answering three essential questions about the static properties of inheritance hierarchies, we gain significant insight into the kind of inheritance best exemplified by C++. Multiple inheritance, the dominance rule for disambiguation, and the presence of virtual and nonvirtual base classes lead to quite a complicated semantics. By abstracting the notion of a subobject, we have designed an algebra for answering the three questions in a way that manages all of these complications. Overview The multiple-inheritance model found in C++[2, 6], which derives largely from Krogdahl's multiple inheritance for Simula[3], can be seen as the result of one fundamental design imperative: that distinct storage should be allocated for each instance variable, regardless of name identity. T...
The notion of continuations is ubiquitous in many di erent areas of computer science, including c... more The notion of continuations is ubiquitous in many di erent areas of computer science, including category theory, compilers, logic, operating systems, programming, and semantics. Following on the 1992 and 1997 ACM SIGPLAN Workshops on Continuations, the current w orkshop provides a forum for the presentation and discussion of new results and work in progress aimed at a better understanding of the nature of continuations, the relation of continuations to other areas of logic and computer science, and exciting new applications of continuations in contexts such as mobile threads, simulation, distributed systems, graphical user interfaces, and education. The program includes seven technical papers. Christopher Wadsworth the originator of the term continuation" and Suresh Jagannathan at NEC Research and Emphora, Inc. kindly agreed to deliver invited talks at CW'01. Review Process A call for papers was announced on several mailing lists and newsgroups. Thirteen submissions were received and forty six reviews were written. Each paper was owned" by one committee member who was responsible for summarizing all the reviews and making a recommendation to the rest of the committee. The nal decisions were made collectively by the program committee on the basis of the collected reviews. The discussions among the committee members were conducted electronically and lasted for about a week.
The Scheme programming language has a standard mechanism for syntactic extension that is little u... more The Scheme programming language has a standard mechanism for syntactic extension that is little used because it is perceived to have not enough expressive power. While there are useful transformations the standard mechanism cannot do, it is possible to create powerful and portable syntactic extensions by writing syntax transformers in a continuationpassing style. We introduce this style, and show how it may be used to perform arbitrary Turing-complete computation over expression shapes during the expansion process. We conclude with a real-world use of the technique, and evaluate the loss of clarity necessitated by the standard mechanism.
This paper attempts to develop a better theoretical understanding of re ective systems. We begin ... more This paper attempts to develop a better theoretical understanding of re ective systems. We begin by a developing a re ective extension of the v-calculus and de ne a simple operational semantics for it based on the in nite tower model described in [10]. We then develop an equational logic from this semantics. The resulting logic is shown to be weak because of re ective properties. We establish properties about this logic and show that it corresponds to the operational semantics.
This paper presents a new two-stage CPS algorithm. The first stage plants trivial partial continu... more This paper presents a new two-stage CPS algorithm. The first stage plants trivial partial continuations via a recursive-descent traversal and the second stage is a rewrite system that transforms all nontail calls into tail calls. The algorithm combines the metaphors of the Plotkin-style CPS transformation along with reduction in the -calculus.
The Little Prover introduces inductive proofs as a way to determine facts about computer programs... more The Little Prover introduces inductive proofs as a way to determine facts about computer programs. It is written in an approachable, engaging style of question-and-answer, with the characteristic humor of The Little Schemer (fourth edition, MIT Press). Sometimes the best way to learn something is to sit down and do it; the book takes readers through step-by-step examples showing how to write inductive proofs. The Little Prover assumes only knowledge of recursive programs and lists (as presented in the first three chapters of The Little Schemer ) and uses only a few terms beyond what novice programmers already know. The book comes with a simple proof assistant to help readers work through the book and complete solutions to every example.
The Little Prover introduces inductive proofs as a way to determine facts about computer programs... more The Little Prover introduces inductive proofs as a way to determine facts about computer programs. It is written in an approachable, engaging style of question-and-answer, with the characteristic humor of The Little Schemer (fourth edition, MIT Press). Sometimes the best way to learn something is to sit down and do it; the book takes readers through step-by-step examples showing how to write inductive proofs. The Little Prover assumes only knowledge of recursive programs and lists (as presented in the first three chapters of The Little Schemer ) and uses only a few terms beyond what novice programmers already know. The book comes with a simple proof assistant to help readers work through the book and complete solutions to every example.