High-level MPPV
HMPPV is based on MPPV. It has some instructions that are a shorthand for commonly used combinations of instructions in MPPV. And in addition to the type of values provided by MPPV, it has strings.Instructions
Here,extfocus (extended focus) is either a focus, or
a field selection that may also be compound (like x.f.f).
The type for strings is str and string values must be
delimited by double quotes ("), and a backslash (\) and a double quote
inside a string must be preceded (escaped) by an additional backslash.
The set of characters that may appear in a string are the alphanumeric
characters, the punctuation characters, the space, and the newline in the
form of \n.
extfocus = new- Create a new atom and assign it to
extfocus. Whenextfocusis a field selection, it must be of type atom. extfocus1 = extfocus2- Assign the value in
extfocus2toextfocus1. Whenextfocus1is a field selection, the field must be of the same type as the value inextfocus2. extfocus.+f- Add a field of type atom to the atom selected by
extfocus. extfocus.+f = new- Add a field of type atom to the atom selected by
extfocus, and assign it a newly created atom. extfocus1.+f = extfocus2- Add a field of type atom to the atom selected by
extfocus1, and assign it the aotm selected byextfocus2. extfocus.+f:t- Add a field of type
tto the atom selected byextfocus. extfocus.+f:t = u- Add a field of type
tto the atom selected byextfocusand assign it the valueu. extfocus1.+f:t = extfocus2- Add a field of type
tto the atom selected byextfocus1and assign it the value selected byextfocus2. extfocus.-f- Removes the field
ffrom the atom selected byextfocus. Returnsfalsewhen the atom has no fieldf. extfocus/f- Returns
truewhen the atom selected byextfocushas a fieldf, andfalseotherwise. extfocus1 == extfocus2- Comparison of the values selected by
extfocus1andextfocus2. Returnstruewhen the values selected byextfocus1andextfocus2are the same or contain the same atom, andfalseotherwise. extfocus?- Returns
truewhen the value selected byextfocusis an atom, andfalseotherwise. extfocus?t- Returns
truewhen the value selected byextfocusis of typet, andfalseotherwise.
Example
The following list of MPPV instructionsh1 = x.f; h1 = h1.f; h2 = new; h1.f = h2
can be written with HMPPV as
x.f.f.f = new