PGA - ProGram Algebra
Molecular Programming Primitives
Instructions
x = new
- Create a new atom and assign it to
x.
x.+f
- Add a field
f to the atom in focus
x.
If this atom already has a field f then
false is returned.
x.-f
- Removes the field
f from the atom in focus
x.
Returns false when the atom has no field
f.
x.f = y
- Assigns the atom in focus
y to the field
f of the atom in focus x.
If the atom in focus x does not have a field
f then false is returned.
x = y.f
- Assign to atom in field
f of the atom in focus
y to the focus x.
If the atom in focus y does not have a field
f then false is returned.
x = y
- Assigns the atom in focus
y to the focus
x.
x == y
- Return
true if the foci x and
y contain the same atom, and false
otherwise.
x/f
- Return
true when the atom in focus x
has a field f, and false otherwise.