A method and system is described for generating executable code for a computer
program. A programmer creates an intentional program tree using a syntax-independent
editor. The editor allows a programmer to directly manipulate the intentional program
tree. The intentional program tree has nodes. Each node represents a high-level
computational construct of the computer program. For each node representing a high-level
computational construct, the system transforms the node into an implementation
of the high-level computational construct using low-level computational constructs.
For each node representing a low-level computational construct, the system generates
executable code that implements the low-level computational construct. The system
further provides that where a high-level computational construct has a plurality
of implementations of the high-level computational construct, the system transforms
the nodes by selecting one of the implementations and transforms the node in accordance
with the selected implementation. The system further provides that the implementation
is selected by automatically analyzing semantics of the intentional program tree.