IP Library › Granted Patent US 12,386,597
Granted Patent B2
US 12,386,597 · App. 18/335,035 · Granted Aug 12, 2025

Role extensions for programming languages

Inventors: Sridhar Vembu (Tenkasi, IN); Akshhayaa S (Kanchipuram District, IN)
Assignee: Zoho Corporation Private Limited
G06F8/427G06F8/437
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,386,597
App. No.
18/335,035
Granted
Aug 12, 2025
Kind
B2
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 (82)

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;

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;

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.

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

3. 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.

4. 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.

5. 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.

6. 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;

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;

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.

7. The method of claim 6 , 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.

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

9. The method of claim 6 , 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.

10. The method of claim 6 , 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.

11. The method of claim 6 , 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.

12. The method of claim 6 , 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.

13. The method of claim 6 , 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.

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

15. The method of claim 6 , 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.

16. 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;

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.

17. The system of claim 16 , 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.

18. 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;

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.

19. The system of claim 18 , 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.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 19, 2024
From: VEMBU, SRIDHAR; S, AKSHHAYAA
To: ZOHO CORPORATION PRIVATE LIMITED
Reel/Frame 066490/0801 →
Priority Claims (1)
IN 202241035496 · Jun 21, 2022 · national
Continuity (2)
Provisional Application 63370361 · Aug 3, 2022
Related Publication 20230409301A1 · Dec 21, 2023
References Cited (64)
US 5748966A · Sato · 1998 [cited by applicant]
US 6918107B2 · Lucas · 2005 [cited by examiner]
US 7389498B2 · Meijer · 2008 [cited by examiner]
US 7694274B2 · Meijer et al. · 2010 [cited by applicant]
US 7801926B2 · Hunter · 2010 [cited by examiner]
US 7917534B2 · Demiroski et al. · 2011 [cited by applicant]
US 8055907B2 · Deem · 2011 [cited by examiner]
US 8225294B2 · Ryu · 2012 [cited by examiner]
US 8332385B2 · Moor · 2012 [cited by examiner]
US 8713515B1 · Biggerstaff · 2014 [cited by examiner]
US 8893082B2 · Naden · 2014 [cited by examiner]
US 9053028B2 · Taillefer · 2015 [cited by examiner]
US 9075630B1 · Smith · 2015 [cited by examiner]
US 9361129B2 · Le Roy · 2016 [cited by examiner]
US 9513880B2 · Avadhanula · 2016 [cited by examiner]
US 9563412B2 · Hoban · 2017 [cited by examiner]
US 9639335B2 · Hoban · 2017 [cited by examiner]
US 9710243B2 · O'Hara · 2017 [cited by examiner]
US 9760653B2 · Liu · 2017 [cited by examiner]
US 10169004B2 · Khoyi · 2019 [cited by examiner]
US 10437572B1 · Ghaleb · 2019 [cited by examiner]
US 10929106B1 · Sridhar · 2021 [cited by applicant]
US 10963228B1 · Samuel · 2021 [cited by examiner]
US 11042699B1 · Sayre · 2021 [cited by examiner]
US 11210459B1 · Krishnaswamy · 2021 [cited by examiner]
US 11403074B1 · Gandhi · 2022 [cited by examiner]
US 20060225053A1 · Lakshman · 2006 [cited by examiner]
US 20100037213A1 · Meijer · 2010 [cited by examiner]
US 20110276950A1 · Fisher · 2011 [cited by examiner]
US 20140130016A1 · Menghrajani · 2014 [cited by examiner]
US 20140282443A1 · Hoban et al. · 2014 [cited by applicant]
US 20140380276A1 · Matthiesen et al. · 2014 [cited by applicant]
US 20170123762A1 · Drukman · 2017 [cited by examiner]
US 20170322783A1 · Khoyi · 2017 [cited by examiner]
US 20180260197A1 · Tsingauz · 2018 [cited by examiner]
US 20190114160A1 · Yehuda · 2019 [cited by examiner]
US 20190129696A1 · Ibrahim · 2019 [cited by examiner]
US 20190278569A1 · Horton · 2019 [cited by examiner]
US 20200050431A1 · Zilouchian Moghaddam · 2020 [cited by examiner]
US 20200150933A1 · Yehuda · 2020 [cited by examiner]
US 20220335031A1 · Eberlein · 2022 [cited by examiner]
US 20230105235A1 · Freund · 2023 [cited by examiner]
US 20240004616A1 · Wrighton · 2024 [cited by examiner]
US 20240241702A1 · Vembu · 2024 [cited by examiner]
CN 106415495A · 2017 [cited by examiner]
Bettini, Lorenzo, et al. “TraitRecordJ: A programming language with traits and records.” Science of Computer Programming 78.5 (2013): 521-541. [cited by examiner]
Zhang, Haoyuan, Huang Li, and Bruno C. D. S. Oliveira. “Type-safe modular parsing.” Proceedings of the 10th ACM SIGPLAN International Conference on Software Language Engineering. 2017. [cited by examiner]
Amin, Nada. Dependent Object Types. Diss. EPFL, 2016. [cited by examiner]
VanHattum, Alexa, et al. “Verifying dynamic trait objects in Rust.” Proceedings of the 44th International Conference on Software Engineering: Software Engineering in Practice. 2022. [cited by examiner]
Bi, Xuan, and Bruno C. D. S. Oliveira. “Typed first-class traits.” 32nd European Conference on Object-Oriented Programming (ECOOP 2018). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2018. [cited by examiner]
Vo, Tung Duc. “Application of protocol-oriented programming in iOS development.” (2019). [cited by examiner]
Nguyen, Ha. “Programming Language interoperability in cross-platform software development.” (2022). [cited by examiner]
Leuthäuser, Max. “A Pure Embedding of Roles.” Technische Universität Dresden.(https://nbn-resolving. org/urn: nbn: de: bsz: 14-qucosa-227624) (2017). [cited by examiner]
Barik, Rajkishore, et al. “Optimization of swift protocols.” Proceedings of the ACM on Programming Languages 3.OOPSLA (2019). [cited by examiner]
Jacobs, Bart “Four Clever Uses of Swift Extensions,” cocoacasts.com/four-clever-uses-of-swift-extensions, May 3, 2017 (8 pages). [cited by applicant]
Johnson, Andrew “Why does Swift not allow stored properties in extensions”, stackoverflow.com/questions/32873400/why-does-swift-not-allow-stored-properties-in-extensions, Sep. 30, 2015 (2 pages). [cited by applicant]
Kasyap, Krishna “How to convert a super class variable into a sub class type in Java,” tutorialspoint.com/how-to-convert-a-super-class-variable-into-a-sub-class-type-in-java, Feb. 8, 2021 (3 pages). [cited by applicant]
Khan, Aasif “Extensions in Swift Explained,” appypie.com/swift-extensions-how-to, Dec. 13, 2021 (8 pages). [cited by applicant]
Liang, “Chapter 11: Inheritance and Polymorphism, from Introduction to Java Programming,” 10th Edition, 2015 (49 pages). [cited by applicant]
Miglani, Gaurav “Referencing Subclass objects with Subclass vs Superclass reference,” geeksforgeeks.org/referencing-subclass-objects-subclass-vs-superclass-reference, Mar. 29, 2017 (9 pages). [cited by applicant]
Sengupta, Tirtharaj “Composition in Golang,” geeksforgeeks.org/composition-in-golang, May 1, 2020 (5 pages). [cited by applicant]
Wikipedia, “Compiler,” retrieved from “https://en.wikipedia.org/w/index.phptitle=Compiler oldid=1091156409”, last edited on Jun. 2, 2022, at 15:06 (16 pages). [cited by applicant]
Wikipedia, “Role-Oriented Programming,” retrieved from “https://en.wikipedia.org/w/index.phptitle=Role-oriented_programming oldid=1065936286”, last edited on Jan. 16, 2022, at 01:48 (3 pages). [cited by applicant]
Wilder, Noah, “How to make extension for multiple classes Swift,” stackoverflow.com/questions/38464134/how-to-make-extension-for-multiple-classes-swift, Mar. 28, 2018 (4 pages). [cited by applicant]