The scale and diversity of interactions in current wide-area distributed programming environments. specially in Internet-based applications, point to the fact that there is no single solution for coordinating distribu...
详细信息
The scale and diversity of interactions in current wide-area distributed programming environments. specially in Internet-based applications, point to the fact that there is no single solution for coordinating distributed applications. Instead, what is needed is the ability to easily build and combine different coordination abstractions. In this paper, we discuss the role of some language features, such as first-class function values, closures, and coroutines, in allowing different coordination mechanisms to be constructed out of a small set of communication primitives, and to be easily mixed and combined. Using the Lua programming language, we define a basic asynchronous primitive, which allows programming in a direct event-driven style with the syntax of function calls, and, based on this primitive, we build different well-known coordination abstractions for distributed computing. (c) 2009 Elsevier Ltd. All rights reserved.
If the result of an expensive computation is invalidated by a small change to the input, the old result should be updated incrementally instead of reexecuting the whole computation. We incrementalize programs through ...
详细信息
ISBN:
(纸本)9781450327848
If the result of an expensive computation is invalidated by a small change to the input, the old result should be updated incrementally instead of reexecuting the whole computation. We incrementalize programs through their derivative. A derivative maps changes in the program's input directly to changes in the program's output, without reexecuting the original program. We present a program transformation taking programs to their derivatives, which is fully static and automatic, supports first-class functions, and produces derivatives amenable to standard optimization. We prove the program transformation correct in Agda for a family of simply-typed lambda-calculi, parameterized by base types and primitives. A precise interface specifies what is required to incrementalize the chosen primitives. We investigate performance by a case study: We implement in Scala the program transformation, a plugin and improve performance of a nontrivial program by orders of magnitude.
暂无评论