ActorScriptis analysed in terms of questions and answers.
The objective is to analyse the publication of Carl Hewitt: ActorScript
is analysed in terms of questions and answers. Being able to answer these questions should prove a basic grasp of the introduced ideas.
Expressions evaluate to …
Expressions evaluate to Actors
Types are ….
Types are Actors.
What does this mean? x:Integer≡3▮
It defines the identifier x to be of type Integer with value 3.
What is an interface for a procedure?
A procedure interface is used to specify the types of messages that a procedure Actor can receive. For instance:
Interface IntegerToInteger {[Integer]↦ Integer}▮
means that an actor implements the interface IntegerToInteger
if, given an integer it returns an integer.
What does this mean?
It means that Double
is an Actor that implements
the interface IntegerToIntegerAndVectorToVector
. The interface is
implemented since to an integer n
it returns
n+n
that is an integer and similarly for a
vector.
Given: Square∎[x:Integer]:Integer ≡ x*x▮
, what does this mean: Square∎[2+1]
?
It means that the actor Square
receives 3
which evaluates to 9
.
What does this mean?
- e : Euro
- sa :≡ SimpleAccount[e] : Actor
- sa∎getBalance[] = e
- sa∎deposit[10]
- sa∎getBalance[] = e+10
- highlighted code is a continuation. By linearizing computation, a continuation prevents default concurrency and consequently variable data races are impossible.
What does this mean? ⦷Factorial∎[1000]+⦷Fibonacci∎[2000]▮
It means that concurrent execution of Factorial∎[1000] and Fibonacci∎[2000] both of which must complete execution. This does not require that the executions of Factorial∎[1000] and Fibonacci∎[2000] actually overlap in time.
- The publication: ActorScript by Carl Hewitt has been analysed.
- There is no known actual implementation of ActorScript.
- There is a video where Carl Hewitt says that there should be an updated version of the paper at some point because there are bugs. (
which video?)
- There is no known practical programming language that implements the Actor Model as defined by Carl Hewitt.
- A few approximate practical implementations exist, such as Akka and Erlang.
- ActorScript may still be useful to some extent as a specification language.