Abstract
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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Mayfield, J., Labrou, Y., Finin, T.W.: Evaluation of KQML as an Agent Communication Language. In: Wooldridge, M., Müller, J.P., Tambe, M. (eds.) IJCAI-WS 1995 and ATAL 1995. LNCS, vol. 1037, pp. 347–360. Springer, Heidelberg (1996)
Wegner, P., Eberbach, E.: New Models of Computation. Comput. J. 47(1), 4–9 (2004)
Tarau, P.: Orthogonal Language Constructs for Agent Oriented Logic Programming. In: Carro, M., Morales, J.F. (eds.) Proceedings of CICLOPS 2004, Fourth Colloquium on Implementation of Constraint and Logic Programming Systems, Saint-Malo, France (September 2004)
Tarau, P.: BinProlog 11.x Professional Edition: Advanced BinProlog Programming and Extensions Guide. Technical report, BinNet Corp. (2006)
Tarau, P.: Fluents: A Refactoring of Prolog for Uniform Reflection and Interoperation with External Objects. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS, vol. 1861. Springer, Heidelberg (2000)
Liu, J., Kimball, A., Myers, A.C.: Interruptible iterators. In: Morrisett, J.G., Jones, S.L.P. (eds.) POPL, pp. 283–294. ACM, New York (2006)
Matsumoto, Y.: The Ruby Programming Language (June 2000)
Sasada, K.: YARV: yet another RubyVM: innovating the ruby interpreter. In: Johnson, R., Gabriel, R.P. (eds.) OOPSLA Companion, pp. 158–159. ACM, New York (2005)
Microsoft Corp.: Visual C# . Project, http://msdn.microsoft.com/vcsharp
van Rossum, G.: A Tour of the Python Language. In: TOOLS (23), p. 370. IEEE Computer Society, Los Alamitos (1997)
Liskov, B., Bloom, T., Schaffert, J.C., Snyder, A., Atkinson, R., Moss, E., Scheifler, R.: CLU. LNCS, vol. 114. Springer, Heidelberg (1981)
Griswold, R.E., Hanson, D.R., Korb, J.T.: Generators in Icon. ACM Trans. Program. Lang. Syst. 3(2), 144–161 (1981)
Tarau, P., Boyer, M.: Nonstandard Answers of Elementary Logic Programs. In: Jacquet, J. (ed.) Constructing Logic Programs, pp. 279–300. J.Wiley, Chichester (1993)
Tarau, P., Boyer, M.: Elementary Logic Programs. In: Deransart, P., Małuszyński, J. (eds.) PLILP 1990. LNCS, vol. 456, pp. 159–173. Springer, Heidelberg (1990)
Warren, D.H.D.: Higher-order extensions to Prolog – are they needed? In: Michie, D., Hayes, J., Pao, Y.H. (eds.) Machine Intelligence 10. Ellis Horwood (1981)
Bird, R.S., de Moor, O.: Solving optimisation problems with catamorphism. In: Bird, R.S., Woodcock, J.C.P., Morgan, C.C. (eds.) MPC 1992. LNCS, vol. 669, pp. 45–66. Springer, Heidelberg (1993)
Wadler, P.: Deforestation: Transforming programs to eliminate trees. Theor. Comput. Sci. 73(2), 231–248 (1990)
Tarau, P., Dahl, V.: High-Level Networking with Mobile Code and First Order AND-Continuations. Theory and Practice of Logic Programming 1(3), 359–380 (2001)
Carro, M., Hermenegildo, M.V.: Concurrency in prolog using threads and a shared database. In: ICLP, pp. 320–334 (1999)
Wielemaker, J.: Native preemptive threads in SWI-prolog. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol. 2916, pp. 331–345. Springer, Heidelberg (2003)
De Bosschere, K., Tarau, P.: Blackboard-based Extensions in Prolog. Software — Practice and Experience 26(1), 49–69 (1996)
Jeff Thompson: Yield Prolog. Project, http://yieldprolog.sourceforge.net
Peyton Jones, S.L. (ed.): Haskell 98 Language and Libraries: The Revised Report (September 2002), http://haskell.org/definition/haskell98-report.pdf
Wadler, P.: Comprehending monads. In: ACM Conf. Lisp and Functional Programming, Nice, France, pp. 61–78. ACM Press, New York (1990)
Majumdar, A.K., Sowa, J.F., Stewart, J.: Pursuing the goal of language understanding. In: Eklund, P., Haemmerlé, O. (eds.) ICCS 2008. LNCS, vol. 5113, pp. 21–42. Springer, Heidelberg (2008)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Tarau, P., Majumdar, A. (2008). Interoperating Logic Engines. In: Gill, A., Swift, T. (eds) Practical Aspects of Declarative Languages. PADL 2009. Lecture Notes in Computer Science, vol 5418. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-92995-6_10
Download citation
DOI: https://doi.org/10.1007/978-3-540-92995-6_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-92994-9
Online ISBN: 978-3-540-92995-6
eBook Packages: Computer ScienceComputer Science (R0)