Tip technology and its application to sparcompiler pascal
First Claim
1. A method of converting source code into object code, comprising the steps, performed by a data processing system having a memory, of:
- providing, in the memory, a TIP that corresponds to a data structure in the memory, the data structure chosen from a group consisting of an identifier table data structure, a name list (NL) table data structure, a parse tree data structure, and a data structure representing a conventional grammar of a programming language, the TIP including at least one programming interface to the data structure, the programming interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface and an output interface, the at least one programming interface comprising a plurality of abstract interface levels including a representation level containing an interface to the data structure, the representation level for defining access to attributes and elements in the data structure, a definition level containing an interface to the representation level, the definition for defining access to abstract attributes in the representation level, and a conceptual level containing an interface to the definition level, the conceptual level for treating the data structure as a single abstract object, the conceptual level interface having a plurality of software procedures through which the TIP can be accessed by software outside the TIP, at least the data structure and the representation level not being accessible from outside the TIP, the conceptual level being accessible from outside the TIP and the definition level enabling at least one unique interface; and
performing an operation on the data structure, as part of the conversion from source code into object code, by way of the conceptual level of the interface, which in turn accesses the representation level, which in turn accesses the data structure.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for mandating a hierarchy of TIPs (Technological Instrumental Packages), each defining an interface for handling a related data structure, such as a symbol table or a parse tree. The present invention structures a TIP into a plurality of abstract levels, which include an encapsulated concrete representation, a representation level, a definition level, and a conceptual level. The interface to a TIP consists of, for example, the conceptual level and a portion of the definition level. The concrete representation and representation level are hidden from the computer programmer. In addition, the present invention designates an interface for each level to perform creation/deletion, access, update, and output.
-
Citations
21 Claims
-
1. A method of converting source code into object code, comprising the steps, performed by a data processing system having a memory, of:
-
providing, in the memory, a TIP that corresponds to a data structure in the memory, the data structure chosen from a group consisting of an identifier table data structure, a name list (NL) table data structure, a parse tree data structure, and a data structure representing a conventional grammar of a programming language, the TIP including at least one programming interface to the data structure, the programming interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface and an output interface, the at least one programming interface comprising a plurality of abstract interface levels including a representation level containing an interface to the data structure, the representation level for defining access to attributes and elements in the data structure, a definition level containing an interface to the representation level, the definition for defining access to abstract attributes in the representation level, and a conceptual level containing an interface to the definition level, the conceptual level for treating the data structure as a single abstract object, the conceptual level interface having a plurality of software procedures through which the TIP can be accessed by software outside the TIP, at least the data structure and the representation level not being accessible from outside the TIP, the conceptual level being accessible from outside the TIP and the definition level enabling at least one unique interface; and
performing an operation on the data structure, as part of the conversion from source code into object code, by way of the conceptual level of the interface, which in turn accesses the representation level, which in turn accesses the data structure. - View Dependent Claims (2, 3, 4, 5, 21)
providing in the memory a second TIP that corresponds to a second data structure chosen from the group consisting of the identifier table data structure, the name list (NL) table data structure, the parse tree data structure, and the data structure representing a conventional grammar of a programming language, the second TIP including at least one interface to the second data structure, the interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface, and an output interface, the at least one interface to the second data structure including a plurality of abstract interface levels, which include a second representation level containing an interface to the second data structure, a second definition level containing an interface to the second representation level, and a second conceptual level, containing an interface to the second definition level, where at least the second data structure and the second representation level cannot be accessed from outside of the second TIP and where the second conceptual level of interface can be accessed from outside the second TIP.
-
-
4. The method of claim 1, wherein the operation performing step further includes the step of performing operations on the data structure by way of the conceptual level of the interface, which in turn accesses the definition interface, which in turn accesses the representation level, which in turn accesses the data structure.
-
5. The method of claim 1, wherein a level N+1 interface can be accessed by a level N interface only.
-
21. The method of claim 1, wherein the conceptual level interface includes an iterator function to allow access to list elements in a node of a tree.
-
6. A method used in a computer program that converts source code into object code, comprising the steps, performed by a data processing system having a memory, of:
-
providing, in the memory, a TIP that corresponds to a data structure in the memory that is used by the computer program, the TIP including at least one interface to the data structure, the interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface and an output interface, the at least one interface comprising a plurality of abstract interface levels including a representation level containing an interface to the data structure, the representation level for defining access to attributes and elements in the data structure, a definition level containing an interface to the representation level, the definition level for defining access to abstract attributes in the representation level, and a conceptual level containing an interface to the definition level, the conceptual level for treating the data structure as a single abstract object, the conceptual level interface having a plurality of software procedures through which the TIP can be accessed by software outside the TIP, at least the data structure and the representation level of the interface being inaccessible from outside the TIP, the conceptual level of the interface being accessible from outside the TIP and the definition level enabling at least one unique interface; and
performing an operation on the data structure, as part of the conversion from source code to object code, by way of the conceptual level of the interface, which in turn accesses the representation level, which in turn accesses the data structure. - View Dependent Claims (12, 13, 14, 15)
providing in the memory a second TIP that corresponds to a second data structure chosen from the group consisting of the identifier table data structure, the name list (NL) table data structure, the parse tree data structure, and the data structure representing a conventional grammar of a programming language, the second TIP including at least one interface to the second data structure, the interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface, and an output interface, the at least one interface to the second data structure including a plurality of abstract interface levels, which include a second representation level containing an interface to the second data structure, a second definition level containing an interface to the second representation level, and a second conceptual level, containing an interface to the second definition level, where at least the second data structure and the second representation level cannot be accessed from outside of the second TIP and where the second conceptual level of the interface can be accessed from outside the second TIP.
-
-
14. The method of claim 6, wherein the operation performing step further includes the step of performing operations on the data structure by way of the conceptual level of the interface, which in turn accesses the definition interface, which in turn accesses the representation level, which in turn accesses the data structure.
-
15. The method of claim 6, wherein a level N+1 interface can be accessed by a level N interface only.
-
7. An apparatus that uses a compiler computer program to convert source code into object code, comprising:
-
a data processing system having a memory provided to store at least one data structure used by the computer program, the at least one data structure chosen from a group consisting of an identifier table data structure, a name list (NL) table data structure, a parse tree data structure and a data structure representing a conventional grammar of a programming language;
a TIP that corresponds to the stored data structure;
an interface portion in the TIP providing at least one interface to the data structure, the interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface, and an output interface;
a plurality of abstract interface levels provided in the interface portion of the TIP, the abstract interface levels including a representation level containing an interface to the data structure, the representation level for defining access to attributes and elements in the data structure, a definition level containing an interface to the representation level, the definition level for defining access to abstract attributes in the representation level, and a conceptual level containing an interface to the definition level, the conceptual level for treating the data structure as a single abstract object, the conceptual level interface having a plurality of software procedures through which the TIP can be accessed by software outside the TIP, at least the data structure and the representation level of the interface being inaccessible from outside the TIP, the conceptual level of the interface being accessible from outside the TIP and the definition level enabling at least one unique interface; and
an operation performing portion of the data processing system that performs at least one instruction of the computer program, provided to perform an operation on the data structure as part of the conversion from source code to object code, by way of the conceptual level of the interface, which in turn accesses the representation level, which in turn accesses the data structure. - View Dependent Claims (8, 9, 10, 11)
a second data structure stored in the memory and chosen from the group consisting of the identifier table data structure, the name list (NL) table data structure, the parse tree data structure, and the data structure representing a conventional grammar of a programming language;
a second TIP that corresponds to the second data structure;
an interface portion in the second TIP providing at least one interface to the second data structure, the interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface, and an output interface;
a plurality of abstract interface levels for the interface portion of the second TIP, the abstract interface levels including a representation level containing an interface to the data structure, a definition level containing an interface to the representation level, and a conceptual level, containing an interface to the definition level, where at least the data structure and the representation level of the interface cannot be accessed from outside of the TIP and the conceptual level of the interface can be accessed from outside the TIP; and
wherein the operation performing portion includes a portion that performs at least one instruction of the computer program to perform an operation on the second data structure by way of the conceptual level of the interface of the second TIP, which in turn accesses the representation level of the second TIP, which in turn accesses the second data structure.
-
-
10. The apparatus of claim 7, wherein the operation performing portion further includes a portion provided to perform an operation on the data structure by way of the conceptual level of the interface, which in turn accesses the definition interface, which in turn accesses the representation level, which in turn accesses the data structure.
-
11. The apparatus of claim 7, wherein a level N+1 interface can be accessed by a level N interface only.
-
16. A computer readable medium carrying one or more sequences of instructions for converting source code into object code, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
accessing a TIP that corresponds to a data structure created and stored in a memory, the data structure chosen from a group consisting of an identifier table data structure, a name list (NL) table data structure, a parse tree data structure and a data structure representing a conventional grammar of a programming language, the TIP including at least one interface to the data structure, the interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface and an output interface, the at least one interface comprising a plurality of abstract interface levels including a representation level containing an interface to the data structure, the representation level for defining access to attributes and elements in the data structure, a definition level containing an interface to the representation level, the definition level for defining access to abstract attributes in the representation level, and a conceptual level containing an interface to the definition level, the conceptual level for treating the data structure as a single abstract object, the conceptual level interface having a plurality of software procedures through which the TIP can be accessed by software outside the TIP, at least the data structure and the representation level of the interface being inaccessible from outside of the TIP, the conceptual level of the interface being accessible from outside the TIP and the definition level enabling at least one unique interface; and
performing an operation on the data structure, as part of the conversion from source code to object code by way of the conceptual level of the interface, which in turn accesses the representation level, which in turn accesses the data structure.
-
-
17. A computer readable medium carrying one or more sequences of instructions for converting source code into object code, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
accessing a TIP that corresponds to a data structure created and stored in a memory that is used by the one or more sequences of instructions, the TIP including at least one interface to the data structure, the interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface and an output interface, the at least one interface comprising a plurality of abstract interface levels including a representation level containing an interface to the data structure, the representation level for defining access to attributes and elements in the data structure, a definition level containing an interface to the representation level, the definition level for defining access to abstract attributes in the representation level, and a conceptual level containing an interface to the definition level, the conceptual level for treating the data structure as a single abstract object, the conceptual level interface having a plurality of software procedures through which the TIP can be accessed by software outside the TIP, at least the data structure and the representation level of the interface being inaccessible from outside of the TIP, the conceptual level of the interface being accessible from outside the TIP, and the definition level enabling at least one unique interface; and
performing an operation on the data structure, as part of the conversion from source code to object code by way of the conceptual level of the interface, which in turn accesses the representation level, which in turn accesses the data structure.
-
-
18. A computer program product comprising:
-
a computer usable medium having computer readable code embodied therein for causing source code to be converted into object code, the computer program product including;
computer readable program code devices configured to cause a computer to access from a memory at least one data structure to be used by the computer program product, the at least one data being chosen from a group consisting of an identifier table data structure, a name list (NL) table data structure, a parse tree data structure and a data structure representing a conventional grammar of a programming language;
computer readable program code devices configured to cause a computer to effect accessing a TIP that corresponds to the at least one data structure, the TIP including an interface portion providing at least one interface to the data structure, the interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface, and an output interface, a plurality of abstract interface levels being provided in the interface portion of the TIP, the abstract interface levels including a representation level containing an interface to the data structure, the representation level for defining access to attributes and elements in the data structure, a definition level containing an interface to the representation level, the definition level for defining access to abstract attributes in the representation level, and a conceptual level, containing an interface to the definition level, the conceptual level for treating the data structure as a single abstract object, the conceptual level interface having a plurality of software procedures through which the TIP can be accessed by software outside the TIP, at least the data structure and the representation level being inaccessible from outside the TIP, the conceptual level of the interface can be accessed from outside the TIP, and the definition level enabling at least one unique interface; and
computer readable program code devices configured to cause a computer to effect performing, as part of the conversion from source code to object code, an operation on the data structure by way of the conceptual level of the interface, which in turn accesses the representation level, which in turn accesses the data structure.
-
-
19. A method of converting source code into object code, comprising the steps, performed by a data processing system having a memory, of:
-
providing, in the memory, a TIP that corresponds to a data structure in the memory, the data structure chosen from a group consisting of an identifier table data structure, a name list (NL) table data structure, a parse tree data structure, and a data structure representing a conventional grammar of a programming language, the TIP including at least one programming interface to the data structure, the programming interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface and an output interface, the at least one programming interface comprising a plurality of abstract interface levels including a representation level containing an interface to the data structure, the representation level for defining access to attributes and elements in the data structure, a definition level containing an interface to the representation level, the definition level for defining access to abstract attributes in the representation level, and a conceptual level containing an interface to the definition level, the conceptual level for treating the data structure as a single abstract object, the conceptual level interface having a plurality of software procedures through which the TIP can be accessed by software outside the TIP, at least the data structure and the representation level being inaccessible from outside the TIP, the conceptual level being accessible from outside the TIP and the TIP enabling at least one aspect of the definition level to be made inaccessible from outside the TIP by declaring the at least one aspect as static; and
performing an operation on the data structure, as part of the conversion from source code into object code, by way of the conceptual level of the interface, which in turn accesses the representation level, which in turn accesses the data structure.
-
-
20. A method of converting source code into object code, comprising the steps, performed by a data processing system having a memory, of:
-
providing, in the memory, a TIP that corresponds to a data structure in the memory, the data structure chosen from a group consisting of an identifier table data structure, a name list (NL) table data structure, a parse tree data structure, and a data structure representing a conventional grammar of a programming language, the TIP including at least one programming interface to the data structure, the programming interface chosen from a group consisting of a creation/deletion interface, an access interface, an update interface and an output interface, the at least one programming interface comprising a plurality of abstract interface levels including a representation level containing an interface to the data structure, the representation level for defining access to attributes and elements in the data structure, a definition level containing an interface to the representation level, the definition level for defining access to abstract attributes in the representation level, and a conceptual level containing an interface to the definition level, the conceptual level for treating the data structure as a single abstract object, the conceptual level interface having a plurality of software procedures through which the TIP can be accessed by software outside the TIP, at least the data structure and the representation level being inaccessible from outside the TIP, the conceptual level being accessible from outside the TIP and the TIP enabling at least one risky aspect of the definition level to be written only once despite variation of the interface of at least one other level; and
performing an operation on the data structure, as part of the conversion from source code into object code, by way of the conceptual level of the interface, which in turn accesses the representation level, which in turn accesses the data structure.
-
Specification