We introduce a new programming language construct, Interactors, supporting the agent-oriented view that programming is a dialog between simple, self-contained, autonomous building blocks. We define Interactors as an a...
详细信息
ISBN:
(纸本)9783540929949
We introduce a new programming language construct, Interactors, supporting the agent-oriented view that programming is a dialog between simple, self-contained, autonomous building blocks. We define Interactors as an abstraction of answer generation and refinement in Logic Engines resulting in expressive language extension and metaprogramming patterns. As a first step toward a declarative semantics, we sketch a pure Prolog specification showing that Interactors can be expressed at source level, in a relatively simple and natural way. Interactors extend language constructs like Ruby, Python and C#'s multiple coroutining block returns through yield statements and they can emulate the action of fold operations and monadic constructs in functional languages. Using the Interactor API, we describe at source level, language extensions like dynamic databases and algorithms involving generation of infinite answer streams.
暂无评论