Hostname: page-component-6766d58669-kl59c Total loading time: 0 Render date: 2026-05-15T01:16:38.199Z Has data issue: false hasContentIssue false

Programming and reasoning about actors that share state

Published online by Cambridge University Press:  03 December 2024

SAM CALDWELL
Affiliation:
Northeastern University, Boston, MA 02115, USA (e-mail: samc@ccs.neu.edu)
TONY GARNOCK-JONES
Affiliation:
Maastricht University, Maastricht, Netherlands (e-mail: tony.garnock-jones@maastrichtuniversity.nl)
MATTHIAS FELLEISEN
Affiliation:
Northeastern University, Boston, MA 02115, USA (e-mail: matthias@ccs.neu.edu)
Rights & Permissions [Opens in a new window]

Abstract

Actor languages realize concurrency via message passing, which most of the time is easy to use. Empirical code inspection provides evidence, however, that on occasion, programmers wish to have an actor share some of its state with others. The dataspace model adds a tightly controlled state-exchange mechanism, dubbed dataspace, to the actor model for just this purpose. Experience with dataspaces suggests that this form of sharing calls for linguistic constructs that allow programmers to state temporal aspects of actor conversations. In response, this paper presents the facet notation: its theory, its type system, its behavioral type system, and some first experiences with an implementation.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2024. Published by Cambridge University Press
Figure 0

Fig. 1. Dataspace with actors engaged in a smart home conversation.

Figure 1

Fig. 2. First faceted actor.

Figure 2

Fig. 3. Visualization of an actor’s facets and facet’s endpoints.

Figure 3

Fig. 4. Implementation of the Light actor, draft.

Figure 4

Fig. 5. Implementation of the Hub actor.

Figure 5

Fig. 6. Visualization of the Light and Hub actors’ facet trees.

Figure 6

Fig. 7. Derived forms.

Figure 7

Fig. 8. Effect types.

Figure 8

Fig. 9. Implementation of the Light actor, fixed (see Figure 4).

Figure 9

Fig. 10. Program syntax.

Figure 10

Fig. 11. Evaluation syntax.

Figure 11

Fig. 12. The light-facet facet as an initial machine state and its transitions.

Figure 12

Fig. 13. Transition relation.

Figure 13

Fig. 14. Type syntax.

Figure 14

Fig. 15. Facet typing.

Figure 15

Fig. 16. Dataspace syntax and semantics.

Figure 16

Fig. 17. Example Dataspace Transitions

Figure 17

Fig. 18. Example type dataspace transitions.

Figure 18

Fig. 19. Formal LTL examples.

Figure 19

Fig. 20. Annotated excerpt of a Promela program for the SPIN model checker

Figure 20

Fig. 21. Soft deadlocked actors.

Figure 21

Table 1: Evaluation results

Figure 22

Table 2. Running time (seconds) and memory usage (megabytes) of each completed check. The checks ran on a laptop with an Apple M1 Pro CPU, 32GB of memory, and MacOS Ventura 13.5 installed

Figure 23

Fig. A1. Procedural light actor.

Figure 24

Fig. C1. The light-facet facet as an initial machine state and its transitions.

Figure 25

Fig. C2. Type evaluation syntax.

Figure 26

Fig. C3. Type machine transitions.

Submit a response

Discussions

No Discussions have been published for this article.