proj-plbook-plChAutomatedProgrammingLangs

Table of Contents for Programming Languages: a survey

Languages for automated programming

The Push3 genetic programming target language

PUSH3 is a stack language. Its instruction set is divided by stack. The stacks are are BOOLEAN, CODE, EXEC, FLOAT, INTEGER, NAME.

The following is quoted or paraphrased from http://faculty.hampshire.edu/lspector/push3-description.html

Note about the EXEC stack: "Code queued for execution. The EXEC stack maintains the execution state of the Push interpreter. Instructions that specifically manipulate the EXEC stack can be used to implement various kinds of control structures. The CODE stack can also be used in this way, but manipulations to the EXEC stack are "live" in the sense that they are manipulating the actual execution state of the interpreter, not just code that might later be executed."

Note about the NAME stack: "For creating bindings between symbolic identifiers and values of various types; that is, for implementing (global) variables and defined instructions. Bindings are created with DEFINE instructions. Any identifier that is not a known Push instruction or a known literal of any other type is considered a NAME and will be pushed onto the NAME stack when encountered, unless it has a definition (in which case its associated value will be pushed on the EXEC stack when it is encountered. The NAME.QUOTE instruction can be used to get a name that already has a definition onto the NAME stack."

Note about the CODE stack: "For explicit code manipulation and execution. May also be used as a general list data type. This type must always be present, as the top level interpreter will push any code to be executed on the CODE stack prior to execution. However, one may turn off all CODE instructions if code manipulation is not needed."

Instructions common to all stacks:

Instructions common to all stacks but NAME:

Instructions common to all stacks but EXEC:

Instructions common to INTEGER and FLOAT (these are also the only operations available for the INTEGER stack):

Instructions only for FLOAT:

Instructions only for BOOLEAN:

Instructions only for NAME:

Instructions for both EXEC and CODE (descriptions here given for the EXEC stack:

Instructions only for EXEC:

Instructions only for CODE (you might think, why can't i execute these in EXEC? but note that ALL instrutions can be IN the EXEC stack; these are operations that execute ON the CODE stack):

Links:


Links