Communicating Sequential Processes (Introduction)
In attempt to deeply (or even shallowly) understand core.async - I will be reading the book by C.A.R. Hoare.
Chapter 1
Objects interact with one another & with us.
This is described as actions and events.
Toaster Oven:
set timer (st)
set heat (sh)
open (o)
close (c)
insert food (i1f)
ding when finished (timer event) (o1ding)
Vending Machine:
insert quarter (in1q)
insert dollar (in1d)
extract cookie (cookie)
extract chips (chips)
extract quarter in change (out1q)
Classes vs Occurrences
In CSP, in1q is a "Class". There can be many occurrences of a "Class". This also has something to do with the letter "h"....?
Event - there are event Classes and event Occurrences
Class - an event description (something that can happen)
Occurrence - an actual occurrence of a described event in time
Alphabet - set of names of *EVENTS* considered relevant for a particular description of an OBJECT (like a vending machine)
~ An object can never engage in an event outside of its alphabet!
Events - should be instantaneous and atomic... Time consuming events *SHOULD* be denoted with 2 EVENTS: [start-event completion-event]
^ Time-consuming events split out this way allows for other events to occur between start/stop of a time consuming event.
Simplifications:
we ignore time (how long it takes for event x to conclude)
we ignore causality (internal mechanism vs. outside agent)
Process - the behavior pattern of an object
Simple Vending Machine: αVMS={coin, chips} Complex Vending Machine: αVMC={in1p, in2p, small, large, out1p}
This is how we define the alphabet of processes.
The alpha symbol denotes "alphabet"
The capital letters VMS (Vending Machine Simple) denote the object aka the Process
The lower case letters within the set denote events_
Key for Formulae:
words in UPPERCASE -> distinct processes
word in lowercase -> distinct events
P, Q, R -> arbitrary processes
a, b, c -> distinct events
x, y, z -> variables denoting events
A, B, C -> sets of events
X, Y -> variables denoting processes
This is kind of a shitty roadmap, but okay...
















