# US 2026/0093466 A1 · Systems and methods for automated lambda discovery and instruction generation

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

- Number: US 2026/0093466 A1
- Document ID: US20260093466A1
- Status: Published application
- Kind: A1
- Application number: 19/193,424
- Filed: 2025-04-29
- Published: 2026-04-02
- Earliest claimed: 2024-10-02
- Assignees: Protiviti Inc.
- Applicants: Protiviti Inc.
- Inventors: John Michael DuBois
- Web page: https://patentgrep.com/patent/US20260093466A1

## CPC

- G06F 8/4441: {Reducing the execution time required by the program code}
- G06F 8/42: {Syntactic analysis}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Automated lambda discovery and instruction generation is provided. A method includes receiving an abstract syntax tree (AST) of a set of executable instructions in a first programming language. The method includes identifying, using the AST, one or more loops represented by the AST for the set of executable instructions. The method includes identifying, for each of the one or more loops, a count of a number of variables referenced or assigned for each of the one or more loops. The method includes determining, for a loop of the one or more loops, that the count meets a threshold for which to generate a lambda expression in a second programming language for the loop. The method includes generating, based at least on the determination, a second set of executable instructions in the second programming language including the lambda expression to represent the loop.

## Claims

### Claim 1

A system comprising one or more processors coupled with memory, the one or more processors configured to execute computer readable instructions to:
receive an abstract syntax tree (AST) of a set of executable instructions in a first programming language;
identify, using the AST, one or more loops represented by the AST for the set of executable instructions;
identify, for each of the one or more loops, a count of a number of variables referenced or assigned for each of the one or more loops;
determine, for a loop of the one or more loops, that the count meets a threshold for which to generate a lambda expression in a second programming language for the loop; and
generate, by the one or more processors based at least on the determination, a second set of executable instructions in the second programming language comprising the lambda expression to represent the loop.

### Claim 2 (depends on 1)

The system of claim 1, wherein the one or more processors are further configured to:
create a flat version of the AST; and
use the flat version of the AST to identify the one or more loops.

### Claim 3 (depends on 1)

The system of claim 1, wherein the threshold is determined based at least on a type of the second programming language.

### Claim 4 (depends on 1)

The system of claim 1, wherein the one or more processors are further configured to:
determine whether each loop of the one or more loops is a latent loop or is identified by a loop construct of the first programming language.

### Claim 5 (depends on 4)

The system of claim 4, wherein the threshold is determined based at least on whether the loop is the latent loop or is identified by the loop construct.

### Claim 6 (depends on 1)

The system of claim 1, wherein the one or more processors are further configured to:
decorate a loop head in the AST upon identifying the one or more loops, the decoration comprising an indication of a loop type of a plurality of loop types, wherein the generation of the lambda expression is based at least on the loop type.

### Claim 7 (depends on 1)

The system of claim 1, wherein:
the count comprises a number of variable assignments.

### Claim 8 (depends on 1)

The system of claim 1, wherein:
the count comprises a number of variable references.

### Claim 9

A method comprising:
receiving, by one or more processors, an abstract syntax tree (AST) of a set of executable instructions in a first programming language;
identifying, by the one or more processors using the AST, one or more loops represented by the AST for the set of executable instructions;
identifying, by the one or more processors for each of the one or more loops, a count of a number of variables referenced or assigned for each of the one or more loops;
determining, by the one or more processors for a loop of the one or more loops, that the count meets a threshold for which to generate a lambda expression in a second programming language for the loop; and
generating, by the one or more processors based at least on the determination, a second set of executable instructions in the second programming language comprising the lambda expression to represent the loop.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
creating a flat version of the AST; and
using the flat version of the AST to identify the one or more loops.

### Claim 11 (depends on 9)

The method of claim 9, wherein the threshold is determined based at least on a type of the second programming language.

### Claim 12 (depends on 9)

The method of claim 9, further comprising:
determining, by the one or more processors, whether each loop of the one or more loops is a latent loop or is identified by a loop construct of the first programming language.

### Claim 13 (depends on 12)

The method of claim 12, wherein the threshold is determined based at least on whether the loop is the latent loop or is identified by the loop construct.

### Claim 14 (depends on 9)

The method of claim 9, further comprising:
decorating a loop head in the AST upon identifying the one or more loops, the decoration comprising an indication of a loop type of a plurality of loop types, wherein the generation of the lambda expression is based at least on the loop type.

### Claim 15 (depends on 9)

The method of claim 9, wherein:
the threshold comprises a threshold number of variable assignments.

### Claim 16 (depends on 9)

The method of claim 9, wherein:
the threshold comprises a threshold number of variable assignments.

### Claim 17

A non-transitory computer-readable medium comprising computer-readable instructions stored thereon that when executed by one or more processors of a data processing system cause the one or more processors to:
create a flat version of a received abstract syntax tree (AST) of a set of executable instructions in a first programming language;
identify, using the flat version of the AST, one or more loops represented by the AST for the set of executable instructions;
identify, for each of the one or more loops, a count of a number of variables referenced or assigned for each of the one or more loops;
determine, for a loop of the one or more loops, that the count meets a threshold for which to generate a lambda expression in a second programming language for the loop; and
generate, by the one or more processors based at least on the determination, a second set of executable instructions in the second programming language comprising the lambda expression to represent the loop.

### Claim 18 (depends on 17)

The computer-readable medium of claim 17, wherein the computer-readable instructions comprise instructions to:
determine whether each loop of the one or more loops is a latent loop or is identified by a loop construct of the first programming language, wherein the threshold is determined based at least on whether the loop is the latent loop or is identified by the loop construct.

### Claim 19 (depends on 17)

The computer-readable medium of claim 17, wherein the threshold is determined based at least on a type of the second programming language.

### Claim 20 (depends on 17)

The computer-readable medium of claim 17, wherein:
the count comprises a number of variable assignments and a number of variable references.
