Results 1  10
of
19
ADIC: An Extensible Automatic Differentiation Tool for ANSIC
, 1997
"... . In scientific computing, we often require the derivatives @f=@x of a function f expressed as a program with respect to some input parameter(s) x, say. Automatic differentiation (AD) techniques augment the program with derivative computation by applying the chain rule of calculus to elementary oper ..."
Abstract

Cited by 76 (14 self)
 Add to MetaCart
. In scientific computing, we often require the derivatives @f=@x of a function f expressed as a program with respect to some input parameter(s) x, say. Automatic differentiation (AD) techniques augment the program with derivative computation by applying the chain rule of calculus to elementary operations in an automated fashion. This article introduces ADIC (Automatic Differentiation of C), a new AD tool for ANSIC programs. ADIC is currently the only tool for ANSIC that employs a sourcetosource program transformation approach; that is, it takes a C code and produces a new C code that computes the original results as well as the derivatives. We first present ADIC "by example" to illustrate the functionality and ease of use of ADIC and then describe in detail the architecture of ADIC. ADIC incorporates a modular design that provides a foundation for both rapid prototyping of better AD algorithms and their sharing across AD tools for different languages. A component architecture call...
Models of Sharing Graphs: A Categorical Semantics of let and letrec
, 1997
"... To my parents A general abstract theory for computation involving shared resources is presented. We develop the models of sharing graphs, also known as term graphs, in terms of both syntax and semantics. According to the complexity of the permitted form of sharing, we consider four situations of sha ..."
Abstract

Cited by 60 (9 self)
 Add to MetaCart
To my parents A general abstract theory for computation involving shared resources is presented. We develop the models of sharing graphs, also known as term graphs, in terms of both syntax and semantics. According to the complexity of the permitted form of sharing, we consider four situations of sharing graphs. The simplest is firstorder acyclic sharing graphs represented by letsyntax, and others are extensions with higherorder constructs (lambda calculi) and/or cyclic sharing (recursive letrec binding). For each of four settings, we provide the equational theory for representing the sharing graphs, and identify the class of categorical models which are shown to be sound and complete for the theory. The emphasis is put on the algebraic nature of sharing graphs, which leads us to the semantic account of them. We describe the models in terms of the notions of symmetric monoidal categories and functors, additionally with symmetric monoidal adjunctions and traced
Environments, Continuation Semantics and Indexed Categories
 Theoretical Aspects of Computer Software, number 1281 in Lect. Notes Comp. Sci
, 1997
"... . There have traditionally been two approaches to modelling environments, one by use of ønite products in Cartesian closed categories, the other by use of the base categories of indexed categories with structure. Recently, there have been more general deønitions along both of these lines: the ørst g ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
. There have traditionally been two approaches to modelling environments, one by use of ønite products in Cartesian closed categories, the other by use of the base categories of indexed categories with structure. Recently, there have been more general deønitions along both of these lines: the ørst generalising from Cartesian to symmetric premonoidal categories, the second generalising from indexed categories with speciøed structure to categories. The added generality is not of the purely mathematical kind; in fact it is necessary to extend semantics from the logical calculi studied in, say, Type Theory to more realistic programming language fragments. In this paper, we establish an equivalence between these two recent notions. We then use that equivalence to study semantics for continuations. We give three category theoretic semantics for modelling continuations and show the relationships between them. The ørst is given by a continuations monad. The second is based on a symmetric prem...
Contrasting Exceptions and Continuations
, 2001
"... Exceptions and firstclass continuations are the most powerful forms of control in programming languages. While both are a form of nonlocal jumping, there is a fundamental difference between them. We formalize this difference by proving a contextual equivalence that holds in the presence of excepti ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
Exceptions and firstclass continuations are the most powerful forms of control in programming languages. While both are a form of nonlocal jumping, there is a fundamental difference between them. We formalize this difference by proving a contextual equivalence that holds in the presence of exceptions, but not continuations; and conversely, we prove an equivalence that holds in the presence of continuations, but not exceptions. By the same technique, we show that exceptions and continuations together do not give rise to state, and that exceptions and state do not give rise to continuations.
Implementing Constructivist Ideas in a Functional Programming Curriculum for Secondary School Students
"... Functional Programming includes complex concepts and advanced ideas such as building abstractions with functions, compound data and list processing. Other core concepts, such as lists and evaluation of expressions, might seem simpler yet prove to be complex for some students, as we will show in this ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Functional Programming includes complex concepts and advanced ideas such as building abstractions with functions, compound data and list processing. Other core concepts, such as lists and evaluation of expressions, might seem simpler yet prove to be complex for some students, as we will show in this paper. Teaching FP issues to secondary school students gave us an opportunity to rethink our beliefs about Computer Science Education, FP courses, and their implementations in schools. As part of a new CS curriculum for secondary school students in Israel we developed a FP course, using DrScheme 1 environment, based on recent research in science education that emphasizes the constructivist nature of learning. In this paper we will focus on two of the typical learning obstacles that were found in our field research. One is the conceptual conflict between the functional and the imperative paradigms, and the other is the difficulty to capture the functional evaluation process. Keywords Con...
D.P.: From variadic functions to variadic relations: A miniKanren perspective
 University of Chicago
, 2006
"... We present an implementation of miniKanren, an embedding of logic programming in R 5 RS Scheme that comprises three logic operators. We describe these operators, and use them to define plus o, a relation that adds two numbers. We then define plus ∗o, which adds zero or more numbers; plus ∗o takes ex ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
We present an implementation of miniKanren, an embedding of logic programming in R 5 RS Scheme that comprises three logic operators. We describe these operators, and use them to define plus o, a relation that adds two numbers. We then define plus ∗o, which adds zero or more numbers; plus ∗o takes exactly two arguments, the first of which is a list of numbers to be added or a logical variable representing such a list. We call such a relation pseudovariadic. Combining Scheme’s varargs facility with pseudovariadic helper relations leads to variadic relations, which take a variable number of arguments. We focus on pseudovariadic relations, which we demonstrate are more flexible than their variadic equivalents. We show how to define plus ∗o in terms of plus o using foldr o and foldl o, higherorder relational abstractions derived from Haskell’s foldr and foldl functions. These higherorder abstractions demonstrate the benefit of embedding relational operators in a functional language. We define many other pseudovariadic relations using foldr o and foldl o, consider the limitations of these abstractions, and explore their effect on the divergence behavior of the relations they define. We also consider doublepseudovariadic relations, a generalization of pseudovariadic relations that take as their first argument a list of lists or a logical variable representing a list of lists.
Pure, Declarative, and Constructive Arithmetic Relations (Declarative Pearl) ⋆
"... Abstract. We present decidable logic programs for addition, multiplication, division with remainder, exponentiation, and logarithm with remainder over the unbounded domain of natural numbers. Our predicates represent relations without mode restrictions or annotations. They are fully decidable under ..."
Abstract
 Add to MetaCart
Abstract. We present decidable logic programs for addition, multiplication, division with remainder, exponentiation, and logarithm with remainder over the unbounded domain of natural numbers. Our predicates represent relations without mode restrictions or annotations. They are fully decidable under the common, DFSlike, SLD resolution strategy of Prolog or under an interleaving refinement of DFS. We prove that the evaluation of our arithmetic goals always terminates, given arguments that share no logic variables. Further, the (possibly infinite) set of solutions for a goal denotes exactly the corresponding mathematical relation. (For SLD without interleaving, and for some infinite solution sets, only half of the relation’s domain may be covered.) We define predicates to handle unary (for illustration) and binary representations of natural numbers, and prove termination and completeness of these predicates. Our predicates are written in pure Prolog, without cut (!), var/1, or other nonlogical operators. The purity and minimalism of our approach allows us to declare arithmetic in other logic systems, such as Haskell type classes. 1
Advanced Programming Techniques Using Scheme
, 1998
"... this paper, we describe an interactive reducer for lambda terms that combines firstclass continuations, macros, delay, and state. We also describe the means by which we induce students to master advanced topics. 1. Introduction ..."
Abstract
 Add to MetaCart
this paper, we describe an interactive reducer for lambda terms that combines firstclass continuations, macros, delay, and state. We also describe the means by which we induce students to master advanced topics. 1. Introduction
CPS109  Computer Science 1
, 1997
"... ons will be clearly stated on the lab. Individual labs are worth very few marks, so if they are not handed in on time, no opportunity will be available to hand them in later, and they will not cause an INC grade. The departmental assignment policy applies. You are expected to have read and understoo ..."
Abstract
 Add to MetaCart
ons will be clearly stated on the lab. Individual labs are worth very few marks, so if they are not handed in on time, no opportunity will be available to hand them in later, and they will not cause an INC grade. The departmental assignment policy applies. You are expected to have read and understood it. If you have any questions about this please come and talk to me. All labs and assignments must have complete header documentation, including a statement of authorship. Labs Lab time will be used for working through formal labs with example problems. These labs will be written up and handed in at the end of the lab. There will be 9 labs to be handed in (none for weeks before assignments are due, although teaching assistants and the professor will be available for questions, or for November 6 when the lab time will be used for an online test). Course Outline The text for the course (and for CPS209) is The Schematics of Computati