Abstract
The age of multi-core computers is upon us, yet current programming languages, typically designed for single-core computers and adapted post hoc for multi-cores, remain tied to the constraints of a sequential mindset and are thus in many ways inadequate. New programming language designs are required that break away from this old-fashioned mindset. To address this need, we have been developing a new programming language called Encore, in the context of the European Project UpScale. The paper presents a motivation for the Encore language, examples of its main constructs, several larger programs, a formalisation of its core, and a discussion of some future directions our work will take. The work is ongoing and we started more or less from scratch. That means that a lot of work has to be done, but also that we need not be tied to decisions made for sequential language designs. Any design decision can be made in favour of good performance and scalability. For this reason, Encore offers an interesting platform for future exploration into object-oriented parallel programming.
Partly funded by the EU project FP7-612985 UpScale: From Inherent Concurrency to Massive Parallelism through Type-based Optimisations (http://www.upscale-project.eu).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
This design should change, so that await will become more similar to get, but with a different effect on the active object.
- 2.
Ideally, this should be: handler.handle( await fut). Future versions of Encore will support this semantics.
- 3.
An alternative version of Par t is possible where the order in the collection is not preserved. This will be considered in more detail in future experiments.
- 4.
As work in parallel types and combinators is work in progress, this list is likely to change and grow.
- 5.
Relies on Maybe data type: in Haskell syntax data Maybe a = Nothing | Just a. Data types are at present being implemented. An alternative to Maybe is to use Par restricted to empty and singleton collections. With this encoding, the constructors for Maybe become Nothing = empty, Just a = liftv a (from Sect. 9.3), and the destructor, maybe ::
in Haskell, is defined in Encore as def maybe
.
- 6.
Note that at the time of writing, the capability system has not been fully implemented.
- 7.
Encore may eventually not include all kinds of capabilities presented here, this is a matter under consideration.
- 8.
\(\mu \) Encore supports interfaces, though Encore does not yet. Encore with combine interfaces with traits.
- 9.
In Encore the constructor does not run asynchronously.
References
Agha, G.A.: ACTORS: A Model of Concurrent Computations in Distributed Systems. The MIT Press, Cambridge (1986)
Agha, G.A., Mason, I.A., Smith, S.F., Talcott, C.L.: A foundation for actor computation. J. Funct. Program. 7(1), 1–72 (1997)
Albert, R., Barabási, A.-L.: Statistical mechanics of complex networks. Rev. Mod. Phys. 74, 47–97 (2002)
Armstrong, J.: Programming Erlang: Software for a Concurrent World. Pragmatic Bookshelf, Raleigh (2007)
Baker Jr., H.C., Hewitt, C.: The incremental garbage collection of processes. SIGPLAN Not. 12(8), 55–59 (1977)
Barabási, A.-L., Albert, R.: Emergence of scaling in random networks. Science 286(5439), 509–512 (1999)
Caromel, D., Henrio, L., Serpette, B.P.: Asynchronous sequential processes. Inf. Comput. 207(4), 459–495 (2009)
Castegren, E., Wrigstad, T.: Capable: capabilities for scalability. In: IWACO 2014 (2014)
Cavé, V., Zhao, J., Shirako, J., Sarkar, V.: Habanero-Java: the new adventures of old X10. In: Probst, C.W., Wimmer, C. (eds.) Proceedings of the 9th International Conference on Principles and Practice of Programming in Java, PPPJ 2011, pp. 51–61. ACM, Kongens Lyngby, Denmark, 24–26 August 2011
Clarke, D.: Object ownership and containment. Ph.D. thesis, School of Computer Science and Engineering, University of New South Wales, Australia (2002)
Clarke, D., Noble, J., Wrigstad, T. (eds.): Aliasing in Object-Oriented Programming. Types, Analysis and Verification. LNCS, vol. 7850. Springer, Heidelberg (2013)
Clarke, D., Wrigstad, T.: External uniqueness is unique enough. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 176–200. Springer, Heidelberg (2003)
Clarke, D., Wrigstad, T., Östlund, J., Johnsen, E.B.: Minimal ownership for active objects. In: Ramalingam, G. (ed.) APLAS 2008. LNCS, vol. 5356, pp. 139–154. Springer, Heidelberg (2008)
Ducasse, S., Nierstrasz, O., Schärli, N., Wuyts, R., Black, A.P.: Traits: a mechanism for fine-grained reuse. ACM Trans. Program. Lang. Syst. 28(2), 331–388 (2006)
Felleisen, M., Hieb, R.: The revised report on the syntactic theories of sequential control and state. Theoret. Comput. Sci. 103(2), 235–271 (1992)
Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java(TM) Language Specification, 3rd edn. Addison-Wesley Professional, Reading (2005)
Haller, P., Odersky, M.: Scala actors: unifying thread-based and event-based programming. Theoret. Comput. Sci. 410(2–3), 202–220 (2009)
Halstead Jr., R.H.: Multilisp: a language for concurrent symbolic computation. ACM Trans. Program. Lang. Syst. 7(4), 501–538 (1985)
Henrio, L., Huet, F., István, Z.: Multi-threaded active objects. In: De Nicola, R., Julien, C. (eds.) COORDINATION 2013. LNCS, vol. 7890, pp. 90–104. Springer, Heidelberg (2013)
Johnsen, E.B., Hähnle, R., Schäfer, J., Schlatte, R., Steffen, M.: ABS: a core language for abstract behavioral specification. In: Aichernig, B.K., de Boer, F.S., Bonsangue, M.M. (eds.) Formal Methods for Components and Objects. LNCS, vol. 6957, pp. 142–164. Springer, Heidelberg (2011)
Johnsen, E.B., Owe, O.: An asynchronous communication model for distributed concurrent objects. Softw. Syst. Model. 6(1), 35–58 (2007)
Kitchin, D., Quark, A., Cook, W., Misra, J.: The Orc programming language. In: Lee, D., Lopes, A., Poetzsch-Heffter, A. (eds.) FMOODS 2009. LNCS, vol. 5522, pp. 1–25. Springer, Heidelberg (2009)
Lavender, R.G., Schmidt, D.C.: Pattern Languages of Program Design 2. Chapter Active Object: An Object Behavioral Pattern for Concurrent Programming. Addison-Wesley Longman Publishing Co., Inc, Boston (1996)
Liskov, B.H., Shrira, L.: Promises: Linguistic support for efficient asynchronous procedure calls in distributed systems. In: Wise, D.S. (ed.) Proceedings of the SIGPLAN Conference on Programming Lanugage Design and Implementation (PLDI 1988), pp. 260–267. ACM, Atlanta, GE, USA (1988)
Meseguer, J.: Conditional rewriting logic as a unified model of concurrency. Theoret. Comput. Sci. 96, 73–155 (1992)
Miller, H., Haller, P., Odersky, M.: Spores: a type-based foundation for closures in the age of concurrency and distribution. In: Jones, R. (ed.) ECOOP 2014. LNCS, vol. 8586, pp. 308–333. Springer, Heidelberg (2014)
Miller, M.S.: Robust composition: towards a unified approach to access control and concurrency control. Ph.D. thesis, Johns Hopkins University, Baltimore, Maryland, USA, May 2006
Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, Heidelberg (1999)
Noble, J., Clarke, D.G., Potter, J.: Object ownership for dynamic alias protection. In: TOOLS Pacific 1999: 32nd International Conference on Technology of Object-Oriented Languages and Systems, pp. 176–187. IEEE Computer Society, Melbourne, Australia, 22–25 November 1999
Peyton Jones, S., et al.: The Haskell 98 language and libraries: the revised report. J. Funct. Program. 13(1), 0–255 (2003)
Prokopec, A., Bagwell, P., Rompf, T., Odersky, M.: A Generic parallel collection framework. In: Jeannot, E., Namyst, R., Roman, J. (eds.) Euro-Par 2011, Part II. LNCS, vol. 6853, pp. 136–147. Springer, Heidelberg (2011)
Reppy, J.H.: Concurrent Programming in ML. Cambridge University Press, Cambridge (1999)
Rossberg, A., Botlan, D.L., Tack, G., Brunklaus, T., Smolka, G.: Alice Through the Looking Glass, Munich, Germany. Trends in Functional Programming, vol. 5, pp. 79–96. Intellect Books, Bristol (2006). ISBN 1-84150144-1
Srinivasan, S., Mycroft, A.: Kilim: Isolation-typed actors for Java. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 104–128. Springer, Heidelberg (2008)
The Akka Project. Akka (2015). http://akka.io/
Van Roy, P., Haridi, S.: Concepts, Techniques, and Models of Computer Programming. MIT Press, Cambridge (2004)
Welc, A., Jagannathan, S., Hosking, A.: Safe futures for Java. In: Proceedings of the Object Oriented Programming, Systems, Languages, and Applications (OOPSLA 2005), pp. 439–453. ACM Press, New York, NY, USA (2005)
Wrigstad, T., Pizlo, F., Meawad, F., Zhao, L., Vitek, J.: Loci: simple thread-locality for Java. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 445–469. Springer, Heidelberg (2009)
Yokote, Y., Tokoro, M.: Concurrent programming in ConcurrentSmalltalk. In: Yonezawa, A., Tokoro, M. (eds.) Object-Oriented Concurrent Programming, pp. 129–158. The MIT Press, Cambridge, Mass. (1987)
Yonezawa, A.: ABCL: An Object-Oriented Concurrent System. Series in Computer Systems. The MIT Press, Cambridge (1990)
Yonezawa, A., Briot, J.-P., Shibayama, E:. Object-oriented concurrent programming in ABCL/1. In: Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 1986) (1986). Sigplan Not. 21(11):258–268 (1986)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Code for Preferential Attachments
A Code for Preferential Attachments
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Brandauer, S. et al. (2015). Parallel Objects for Multicores: A Glimpse at the Parallel Language Encore . In: Bernardo, M., Johnsen, E. (eds) Formal Methods for Multicore Programming. SFM 2015. Lecture Notes in Computer Science(), vol 9104. Springer, Cham. https://doi.org/10.1007/978-3-319-18941-3_1
Download citation
DOI: https://doi.org/10.1007/978-3-319-18941-3_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-18940-6
Online ISBN: 978-3-319-18941-3
eBook Packages: Computer ScienceComputer Science (R0)