Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2489837.2489841acmotherconferencesArticle/Chapter ViewAbstractPublication PagesecoopConference Proceedingsconference-collections
research-article

A new concurrency model for Scala based on a declarative dataflow core

Published: 02 July 2013 Publication History

Abstract

Declarative dataflow values are single assignment variables such that all operations needing their values wait automatically until the values are available. Adding threads and declarative dataflow values to a functional language gives declarative concurrency, a model in which concurrency is deterministic and explicit synchronization is not needed. In our experience, this greatly simplifies the writing of concurrent programs (as explained in several chapters of CTM [20]). We complete this model with lazy execution and message-passing concurrency. Both extensions are tightly integrated with the declarative dataflow core. Lazy execution is provided by extending declarative dataflow with a by-need synchronization operation. Message passing is provided by adding streams equipped with a send operation, where a stream is a list with an unbound single-assignment variable. This paper presents the Ozma language, a conservative extension of Scala that supports all these concepts. We have made a complete implementation of Ozma by combining the implementations of Scala and Oz. Evaluation shows that this implementation supports the full semantics of Scala with concurrent programs based on the new concurrency model. In particular, within the functional subset of Scala the new concurrency model fully supports deterministic concurrency.

References

[1]
Arvind and Thomas R. E.: I-Structures: An efficient data type for functional languages. Technical Report 210, MIT, Laboratory for Computer Science, Cambridge, MA (1980)
[2]
Collet, R.: The Limits of Network Transparency in a Distributed Programming Language. PhD thesis, Université catholique de Louvain (2007)
[3]
Doeraene S.: Ozma: Extending Scala with Oz Concurrency. Master's thesis, Université catholique de Louvain. Full source code available at https://github.com/sjrd/ozma (2011)
[4]
Doeraene, S.: Ozma: Extending Scala with Oz Concurrency. Invited talk, Strange Loop, St Louis, MI, URL: thestrangeloop.com, (Sep. 2012)
[5]
Drejhammar, F., Schulte, C., Haridi, S., Brand, P.: Flow Java: Declarative concurrency for Java. In Proceedings of the Nineteenth International Conference on Logic Programming, Springer LNCS, vol. 2916, pp. 346--360. (2003)
[6]
Halstead, R. H. Jr.: MultiLisp: A language for concurrent symbolic computation. In ACM Transactions on Programming Languages and Systems, 7(4), pp. 501--538 (Oct. 1985)
[7]
Hewitt, C., Bishop P., Steiger, R.: A universal modular ACTOR formalism for artificial intelligence. In 3rd International Joint Conference on Artificial Intelligence (IJCAI), pp. 235--245 (Aug. 1973)
[8]
Imam, S., Sarkar, V.: Habanero-Scala: Async-Finish Programming in Scala.
[9]
Janson, S., Montelius, J., Haridi, S.: Ports for objects in concurrent logic programs. In Research Directions in Concurrent Object-Oriented Programming, pp. 211--231 (1993)
[10]
Kahn, G.: The semantics of a simple language for parallel programming. In IFIP Congress, pp. 471--475 (1974)
[11]
Odersky M.: Scala By Example. École Polytechnique Fédérale de Lausanne (2010)
[12]
Odersky M.: The Scala language specification, version 2.9. École Polytechnique Fédérale de Lausanne (2011)
[13]
Mozart Consortium: Mozart Programming System. URL: www.mozart-oz.org (2011)
[14]
Programming Methods Laboratory: The Scala Programming Language. URL: www.scala-lang.org (2011)
[15]
Rossberg, A.: Typed Open Programming: A Higher-Order, Typed Approach to Dynamic Modularity and Distribution. PhD thesis, Universität des Saarlandes (2007)
[16]
Saraswat, V. A.: Concurrent Constraint Programming. MIT Press, Cambridge, MA (1993)
[17]
Shapiro, E.: The family of concurrent logic programming languages. In ACM Computing Surveys, 21(3), pp. 413--510 (Sept. 1989)
[18]
Smolka, G.: The Oz programming model. In Computer Science Today, Springer LNCS, vol. 1000, pp. 324--343 (1995)
[19]
Spiessens, A., Collet, R., Van Roy, R.: Declarative Laziness in a Concurrent Constraint Language. In 2nd International Workshop on Multiparadigm Constraint Programming Languages, part of 9th International Conference on Principles and Practice of Constraint Programming (CP2003) (Sep. 2003)
[20]
Van Roy, P., Haridi, S.: Concepts, Techniques, and Models of Computer Programming. MIT Press, Cambridge MA (2004)
[21]
Van Roy, P.: Ozma: Extending Scala with Oz Concurrency. Invited talk, QCon International Software Development Conference, San Francisco, CA, URL: qconsf.com, (Nov. 2011)

Cited By

View all
  • (2025)Tail Modulo Cons, OCaml, and Relational Separation LogicProceedings of the ACM on Programming Languages10.1145/37049159:POPL(2337-2363)Online publication date: 9-Jan-2025
  • (2020)A history of the Oz multiparadigm languageProceedings of the ACM on Programming Languages10.1145/33863334:HOPL(1-56)Online publication date: 12-Jun-2020
  • (2014)DerflowProceedings of the Thirteenth ACM SIGPLAN workshop on Erlang10.1145/2633448.2633451(51-60)Online publication date: 3-Sep-2014
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
SCALA '13: Proceedings of the 4th Workshop on Scala
July 2013
84 pages
ISBN:9781450320641
DOI:10.1145/2489837
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

  • CNRS: Centre National De La Rechercue Scientifique
  • UM2: University Montpellier 2
  • AITO: Assoc Internationale por les Technologies Objects

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 02 July 2013

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Oz
  2. Ozma
  3. Scala
  4. concurrent programming
  5. dataflow
  6. deterministic concurrency
  7. lazy execution
  8. message-passing concurrency
  9. nondeterminism

Qualifiers

  • Research-article

Conference

ECOOP '13
Sponsor:
  • CNRS
  • UM2
  • AITO

Acceptance Rates

SCALA '13 Paper Acceptance Rate 12 of 22 submissions, 55%;
Overall Acceptance Rate 12 of 22 submissions, 55%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 09 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2025)Tail Modulo Cons, OCaml, and Relational Separation LogicProceedings of the ACM on Programming Languages10.1145/37049159:POPL(2337-2363)Online publication date: 9-Jan-2025
  • (2020)A history of the Oz multiparadigm languageProceedings of the ACM on Programming Languages10.1145/33863334:HOPL(1-56)Online publication date: 12-Jun-2020
  • (2014)DerflowProceedings of the Thirteenth ACM SIGPLAN workshop on Erlang10.1145/2633448.2633451(51-60)Online publication date: 3-Sep-2014
  • (2014)Your server as a functionACM SIGOPS Operating Systems Review10.1145/2626401.262641348:1(51-57)Online publication date: 15-May-2014

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media