# US 2023/0409301 A1 · Role extensions for programming languages

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

- Number: US 2023/0409301 A1
- Document ID: US20230409301A1
- Status: Published application
- Kind: A1
- Application number: 18/335,035
- Filed: 2023-06-14
- Published: 2023-12-21
- Earliest claimed: 2022-06-21
- Assignees: Zoho Corporation Private Limited
- Applicants: Zoho Corporation Private Limited
- Inventors: Sridhar Vembu; Akshhayaa S
- Web page: https://patentgrep.com/patent/US20230409301A1

## CPC

- G06F 8/427: {Parsing}
- G06F 8/437: {Type checking}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A programming language and compiler support inheritance and type extensions. Program code defines user-defined independent and dependent-link data types. Elements of an independent data type can be inherited by a dependent-link data type that can extend the scope of the independent data type and the scope of one or more elements of the independent data type. Data types and type extensions are instantiated in memory as uniquely identified objects that reference one another in a manner that controls inter-object access.

## Claims

### Claim 1

A method of parsing statements of programming code, the method comprising:
parsing a first of the statements naming a first data type, the first data type having:
a first-data-type name;
an extensibility indicator indicating the first data type is extensible; and
a first-data-type element; and
parsing a second of the statements naming a second data type referencing the first data type, the second data type having:
a second-data-type element associated with an extension indicator, the second-data-type element referencing at least one of the first data type and the first-data-type element.

### Claim 2 (depends on 1)

The method of claim 1, wherein the extensibility indicator matches the extension indicator.

### Claim 3 (depends on 1)

The method of claim 1, wherein the first data type has a scope and the second-data-type element references the first data type and extends the scope of the first data type.

### Claim 4 (depends on 1)

The method of claim 1, wherein the extension indicator associated with the second-data-type element is followed by the first-data-type name.

### Claim 5 (depends on 1)

The method of claim 1, wherein the first-data-type element has a scope and the second-data-type element references the first-data-type element and extends the scope of the first-data-type element.

### Claim 6 (depends on 1)

The method of claim 1, wherein the first-data-type element has a first-data-type-element name and an extension indicator associated with the second-data-type element is followed by the first-data-type-element name.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
creating, responsive to the first data type, a first intermediate-language representation corresponding to the first data type; and
creating, responsive to the second data type:
a second intermediate-language representation corresponding to the second data type; and
a third intermediate-language representation including a reference to the first intermediate-language representation;
the second intermediate-language representation including a reference to the third intermediate-language representation.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
creating, responsive to the first data type, a first intermediate-language representation corresponding to the first data type;
creating, for the first-data-type element, a second intermediate-language representation corresponding to the first-data-type element; and
creating, responsive to the second data type:
a third intermediate-language representation corresponding to the second data type; and
a fourth intermediate-language representation with a reference to the second intermediate-language representation;
the third intermediate-language representation including a reference to the fourth intermediate-language representation.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
parsing a third of the statements including an access of the second data type from the first data type and issuing an error message responsive to the access of the second data type from the first data type.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
parsing a third of the statements including an access of the second-data-type element from the first data type and issuing an error message responsive to the access of the second-data-type element from the first data type.

### Claim 11 (depends on 1)

The method of claim 1, wherein the second data type includes an other element independent of the extension indicator, the method further comprising:
parsing a third of the statements including an access of the other element from the first data type; and
issuing an error message responsive to the access of the other element from the first data type.

### Claim 12 (depends on 1)

The method of claim 1, wherein the second data type includes an other element independent of the extension indicator, the method further comprising:
parsing a third of the statements including an access of the other element from second-data-type element with the extension indicator; and
issuing an error message responsive to the access of the other element from the second data-type element.

### Claim 13 (depends on 1)

The method of claim 1, further comprising:
parsing a third of the statements including a type casting of the first data type to the second data type and issuing an error message responsive to the type casting.

### Claim 14 (depends on 1)

The method of claim 1, further comprising:
parsing a third of the statements including a check whether an instance of the first data type is of the second data type and issuing an error message responsive to the check.

### Claim 15

A non-transitory, computer-readable medium comprising:
first statements defining a first data type having:
a first-data-type scope; and
a first-data-type element having a first-data-type-element scope; and
second statements defining a second data type referencing the first data type and having a second-data-type scope that includes the first-data-type scope, the second statements including at least one of:
a first scope-extension statement extending the second-data-type scope beyond the first-data-type scope; and
a second scope-extension statement extending the second-data-type scope beyond the first-data-type-element scope.

### Claim 16 (depends on 15)

The medium of claim 15, wherein the first statements include a name of the first data type and the second statements include a name of the second data type with a reference to the name of the first data type, the first scope-extension statement references the name of the first data type, and the second scope-extension statement references a name of the first-data-type element.

### Claim 17

A system comprising:
at least one processor;
a memory connected to the at least one processor: and
a compiler that when loaded into the at least one processor causes the at least one processor to:
parse first statements of programming code naming a first data type, the first data type having:
a first-data-type name;
an extensibility indicator indicating the first data type is extensible; and
a first-data-type element; and
parse second statements of the programming code, the second statements naming a second data type referencing the first data type, the second data type having:
a second-data-type element associated with an extension indicator, the second-data-type element referencing at least one of the first data type and the first-data-type element.

### Claim 18 (depends on 17)

The system of claim 17, wherein the compiler further causes the at least one processor to:
create, responsive to the first data type, a first intermediate-language representation corresponding to the first data type; and
create, responsive to the second data type:
a second intermediate-language representation corresponding to the second data type; and
a third intermediate-language representation including a reference to the first intermediate-language representation;
the second intermediate-language representation including a reference to the third intermediate-language representation.

### Claim 19 (depends on 17)

The system of claim 17, wherein the compiler further causes the at least one processor to:
create, responsive to the first data type, a first intermediate-language representation corresponding to the first data type;
create, for the first-data-type element, a second intermediate-language representation corresponding to the first-data-type element; and
create, responsive to the second data type:
a third intermediate-language representation corresponding to the second data type; and
a fourth intermediate-language representation with a reference to the second intermediate-language representation;
the third intermediate-language representation including a reference to the fourth intermediate-language representation.

### Claim 20 (depends on 17)

The system of claim 17, wherein the compiler further causes the at least one processor to parse a third of the statements including a type casting of the first data type to the second data type and issuing an error message responsive to the type casting.

### Claim at position 21

21-43. (canceled)
