# US 2001/0037496 A1 · Method and system for generating a computer program

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2001/0037496 A1
- Document ID: US20010037496A1
- Status: Published application
- Kind: A1
- Application number: 09/730,375
- Filed: 2000-12-05
- Published: 2001-11-01
- Earliest claimed: 1993-10-29
- Assignees: Microsoft Corporation
- Inventors: Charles Simonyi
- Web page: https://patentgrep.com/patent/US20010037496A1

## CPC

- G06F 8/30: Creation or generation of source code
- G06F 8/33: Intelligent editors
- Y10S 715/967: Visual or iconic programming
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y10S: TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS

## Abstract

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.

## Claims

### Claim 1

A method in a computer system for generating executable code for a computer program, the method comprising the steps of:
receiving an intentional program tree having nodes, each node representing a high-level computational construct of the computer program;
for each node representing a high-level computational construct, transforming the node into an implementation of the high-level computational construct using low-level computational constructs; and
for each node representing a low-level computational construct, generating executable code that implements the low-level computational construct.

### Claim 2 (depends on 1)

The method of claim 1 wherein a high-level computational construct has a plurality of implementations of the high-level computational construct and wherein the step of transforming the node includes when the high-level computational construct has a plurality of implementations, selecting one of the implementations and transforming the node in accordance with the selected implementation.

### Claim 3 (depends on 2)

The method of claim 2 wherein the step of selecting selects based on annotations provided by a programmer.

### Claim 4 (depends on 2)

The method of claim 2 wherein the step of selecting selects automatically by analyzing semantics of the intentional program tree.

### Claim 5 (depends on 1)

The method of claim 1 wherein the step of receiving an intentional program tree includes creating the intentional program tree by direct manipulation of the intentional program tree by a programmer.

### Claim 6 (depends on 5)

The method of claim 5 including the step of receiving a new high-level computational construct and receiving an implementation of the new high-level computational construct that uses low-level computational constructs, wherein the step of creating the intentional program tree includes adding a node to the intentional program tree representing the new high-level computational construct, and wherein the node representing the new high-level computational construct is transformed using the received implementation.

### Claim 7 (depends on 1)

The method of claim 1 wherein each high-level computational construct has a function for transforming a node representing the high-level computational construct into a node representing an implementation of the high-level computation construct using low-level computational constructs and wherein the step of transforming the node representing a high-level computation construct includes invoking the function to transform the node.

### Claim 8 (depends on 1)

The method of claim 1 wherein each high-level computational construct has a function for displaying a representation of a node representing the high-level computational construct.

### Claim 9 (depends on 1)

The method of claim 1 including the step of before the step of transforming, preprocessing nodes to store indications to control the transforming to identify errors.

### Claim 10 (depends on 1)

The method of claim 1 wherein the indications include flags to indicate a low-level computational construct that corresponds to an overloaded high-level computational construct.

### Claim 11 (depends on 10)

The method of claim 10 wherein the step of preprocessing is performed as a background activity during the step of receiving the intentional program tree.

### Claim 12

A computer system for generating a computer program, the computer program having a plurality of high-level computational constructs, each high-level computational construct having a behavior, the computer system comprising:
means for creating an intentional program tree by direct manipulation of the intentional program tree, the intentional program tree having nodes representing the high-level computational constructs of the computer program;
means for reducing the intentional program tree to a reduced program tree, the reduced program tree having nodes representing low-level computational constructs, each high-level computational construct having a reduction enzyme for reducing a node representing the high-level computational construct into one or more nodes that implement the behavior of the high-level computational construct, each of the nodes representing a low-level computational construct;
means for adding a new high-level computational construct for use in creating the intentional program tree, the new high-level computational construct having a reduction enzyme, the new high-level computational construct for use in the intentional program tree; and
means for generating executable code based in the reduced program tree.
