# US 2019/0317743 A1 · Intent-based machine programming

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

- Number: US 2019/0317743 A1
- Document ID: US20190317743A1
- Status: Published application
- Kind: A1
- Application number: 16/455,125
- Filed: 2019-06-27
- Published: 2019-10-17
- Earliest claimed: 2019-06-27
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Brian Cremeans; Marcos Emanuel Carranza; Krishna Surya; Mats Agerstam; Justin Gottschlich
- Web page: https://patentgrep.com/patent/US20190317743A1

## CPC

- G06F 8/427: {Parsing}
- G06F 8/22: {Procedural}
- G06F 8/36: Software reuse
- G06F 8/73: Program documentation
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 20/00: Machine learning
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/045: Combinations of networks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Apparatus, devices, systems, methods, and articles of manufacture for intent-based machine programming are disclosed. An example system categorize source code blocks includes a code repository accessor to access a code repository and select a source code block. The example system also includes a signature generator to generate a signature for the source code block, a collateral miner to extract collateral associated with the source code block, and a tokenizer to transform the source code block into tokens. In addition, the example system includes a function assessor to determine a function of the source code block based on the collateral and the tokens and an input/output determiner to determine an input and an output of the source code block based on the collateral and the signature. The example system further includes a tagger to categorize the source code block with the function, input, and output.

## Claims

### Claim 1

A system to categorize source code blocks, the system comprising:
a code repository accessor to:
access a code repository; and
select a source code block;
a signature generator to generate a signature for the source code block;
a collateral miner to extract collateral associated with the source code block;
a tokenizer to transform the source code block into tokens;
a function assessor to determine a function of the source code block based on the collateral and the tokens;
an input/output determiner to determine an input and an output of the source code block based on the collateral and the signature; and
a tagger to categorize the source code block with the function, input, and output.

### Claim 2 (depends on 1)

The system of claim 1, wherein the collateral includes a first type of collateral and a second type of collateral, the function based on the first type of collateral and the input and output of the source code based on the second type of collateral.

### Claim 3 (depends on 2)

The system of claim 2, wherein the first type of collateral is a unit test.

### Claim 4 (depends on 2)

The system of claim 2, wherein the second type of collateral is documentation.

### Claim 5

A system to automatically generate source code, the system comprising:
an intent receiver to receive intent of a programmer developing source code;
an intent analyzer to determine a desired function, input, and output of the intent;
a code searcher to:
search a repository of source code blocks, the source codes blocks categorized with respective functions, inputs, and outputs; and
identify a candidate source code block to match the desired function, input, and output based on the categorized function, input, and output of the candidate source code block;
a code evaluator to determine if the categorized function, input, and output of the candidate source code block matches the desired function, input, and output of the intent; and
a code inserter to insert the candidate source code block when the categorized function, input, and output of the candidate source code block matches the desired function, input, and output of the intent.

### Claim 6 (depends on 5)

The system of claim 5, wherein the candidate source code block is a first candidate source code block, and when the code evaluator determines that at least one of the categorized function, input, or output of the candidate source code block does not match at least one of the desired function, input, or output of the intent, the code searcher is to identify a second candidate source code block to partially match the desired function, input, and output based on the categorized function, input, and output of the candidate source code block.

### Claim 7 (depends on 6)

The system of claim 6, wherein the code evaluator is to determine if one or two of the categorized function, input, and output of the second candidate source code block matches at least one or two of the desired function, input, and output of the intent; and
when one or two of the categorized function, input, and output of the second candidate source code block matches at least one or two of the desired function, input, and output of the intent:
the code evaluator is to identify the element of intent not satisfied by the second candidate source code block;
the code searcher is to find a supplement source code block to satisfy the missing element; and
the code inserter is to insert the second candidate source code block and the supplement source code block.

### Claim 8 (depends on 5)

The system of claim 5, wherein the programmer is a machine.

### Claim 9

A system to categorize source code blocks, the system comprising:
means for selecting a source code block from a code repository;
means for generating a signature for the source code block;
means for mining collateral associated with the source code block;
means for tokenizing the source code block into tokens;
means for determining a function of the source code block based on the collateral and the tokens;
means for determining an input and an output of the source code block based on the collateral and the signature; and
means for categorizing the source code block with the function, input, and output.

### Claim 10 (depends on 9)

The system of claim 9, wherein the collateral includes a first type of collateral and a second type of collateral, the function based on the first type of collateral and the input and output of the source code based on the second type of collateral.

### Claim 11 (depends on 10)

The system of claim 10, wherein the first type of collateral is a unit test.

### Claim 12 (depends on 10)

The system of claim 10, wherein the second type of collateral is documentation.

### Claim 13

A system to automatically generate source code, the system comprising:
means for receiving intent of a programmer developing source code;
means for analyzing the intent to determine a desired function, input, and output of the intent;
means for identifying a candidate source code block from a repository of source code blocks, the candidate source code block to match the desired function, input, and output based on the categorized function, input, and output of the candidate source code block;
means for evaluating source code to determine if the categorized function, input, and output of the candidate source code block matches the desired function, input, and output of the intent; and
means for inserting the candidate source code block when the categorized function, input, and output of the candidate source code block matches the desired function, input, and output of the intent.

### Claim 14 (depends on 13)

The system of claim 13, wherein the candidate source code block is a first candidate source code block, and when the means for evaluating source code determines that at least one of the categorized function, input, or output of the candidate source code block does not match at least one of the desired function, input, or output of the intent, the means for identifying is to identify a second candidate source code block to partially match the desired function, input, and output based on the categorized function, input, and output of the candidate source code block.

### Claim 15 (depends on 14)

The system of claim 14, wherein the means for evaluating source code is to determine if one or two of the categorized function, input, and output of the second candidate source code block matches at least one or two of the desired function, input, and output of the intent; and
when one or two of the categorized function, input, and output of the second candidate source code block matches at least one or two of the desired function, input, and output of the intent:
the means for evaluating source code is to identify the element of intent not satisfied by the second candidate source code block;
the means for identifying is to find a supplement source code block to satisfy the missing element; and
the means for inserting is to insert the second candidate source code block and the supplement source code block.

### Claim 16 (depends on 13)

The system of claim 13, wherein the programmer is a machine.

### Claim at position 17

17-40. (canceled)
