Leonardo Angel - Mateo Sanabria Ardila
Actors have unique identifiers and communicate via asynchronous message passing.
In response to a message, an actor may change its internal state, create new actors with a specified behavior (including an initial state), and/or send messages to known actors.
An actor configuration represents the potentially distributed state of a system at a single logical point in time.
The actor model imposes fairness on computation sequences in order to be valid.
Fairness: if a transition (from an actor configuration) is infinitely often enabled, the transition must eventually happen.
“if a process makes a print request infinitely often, then printing for that process will occur infinitely often”
The unbounded nondeterminism property means that messages are eventually received but there is no bound assumed on how many transitions may take place beforehand
Ticker: repeatedly sends tick messages to Clock
Clock: Upon receipt of each tick increments an internal counter representing a time value
Ticker’s behavior keeps going by:
sending a continue message to itself
Sending a tick message to Clock
Receiving the continue message
Thus repeatedly moving through a sequence of three control states.
Unbounded nondeterminism: The property whereby the clock may wait an arbitrarily long time (as measured by the number of accumulated ticks) to receive a tick, but eventually it does and therefore makes progress in incrementing its own time value
Notice that without fairness, the ticker could keep producing tick messages indefinitely without any of them being received by the clock
An actor configuration represents the potentially distributed state of a system at a single logical point in time
structure ( Cfg T ) :=
Null | ( One T ) | (++ ( Cfg T ) ( Cfg T ))
Null and ++ are axiomatized to form an Abelian Monoid. Null is the Monoid identity element for the binary ++ operator, which is associativeand and commutative
There are several theorems related to the configuration's behavior
datatype ( Actor Id LS ) :=
( actor’ Id LS ) | ( message’ Id LS Id Ide )
define actor :=
lambda ( id ls ) ( One ( actor’ id ls ))
define message :=
lambda ( fr to c ) ( One ( message’ fr LS0 to c )
s ++ (actor Ticker ( ticker local3 ))
++ (actor Clock ( clock local zero ))
++ (message Ticker Ticker’ continue )
++ (message Ticker Clock’ tick)
Transition-Path datatype describe how configurations change in response to transition steps:
Message receiving
Message sending
Actor creation steps
datatype ( Step Id ) :=
( receive Id Id Ide )
| ( send Id Id Ide )
| ( create Id Id )
datatype ( TP Id LS ) :=
Initial
| ( then ( TP Id LS ) ( Step Id ))
declare config :
( Id , LS ) [( TP Id LS )] - > ( Cfg ( Actor Id LS ))
declare ready-to :
( Id , LS ) [ LS ( Step Id )] - > Boolean
declare next :
( Id , LS ) [ LS ( Step Id )] - > LS
declare unique-ids: (Id, LS)
[(Cfg (Actor Id LS))] -> Boolean
module unique-ids {
define definition :=
(forall s . (unique-ids s) <==>
forall id . (count id s) <= one)
}
T1 = ( T0 then ( receive Clock Ticker ’tick))
config T1 =
s ++ (actor Ticker ( ticker local3 ))
++(actor Clock ( clock local ( S zero )))
++(message Ticker Ticker’ continue)
define P :=
( Initial then (create Clock Ticker)
then (send Ticker Ticker ’continue)
then (send Ticker Clock ’tick)
then (receive Clock Ticker ’tick)
then (receive Ticker Ticker ’continue)
then (send Ticker Ticker ’continue)
then (send Ticker Clock ’tick)
then (receive Ticker Ticker ’continue)
then (send Ticker Ticker ’continue)
then (send Ticker Clock ’tick)
then (receive Clock Ticker ’tick))
Complexity of example (Clock-Ticker)
Relation between steps on paths
Temporal Logic articulateness