Methods to support multimethod function overloading with compile-time type checking
AssigneeInternational Business Machines Corporation
InventorsRakesh Agrawal, Linda G. De Michiel, Bruce G. Lindsay
Life of this patent
Estimating the term…
Loading patent…
AssigneeInternational Business Machines Corporation
InventorsRakesh Agrawal, Linda G. De Michiel, Bruce G. Lindsay
Estimating the term…
Methods and related apparatus, for use in programming language systems, are set forth which support compile-time type checking for overloaded functions in an environment supporting subtypes with multiple inheritance. At both compile and runtime, the invention considers the type of all actual arguments of a function to select a proper function instance to execute. Furthermore, the methods contemplated by the invention identify at compile time the set of function instances which might be invoked due to subtype substitutions for the actual arguments. Since type errors on function invocations or variable assignments are usually indicative of a programming error, program reliability can be improved and faults that would otherwise result in runtime errors can be corrected through the use of the invention prior to program deployment.
A method, to be practiced at compile time by a data handling system that supports multimethod function selection on typed data, including subtypes with multiple inheritance, for enabling static-type checking to be performed at run time for overloaded functions, wherein said system includes (i) a set of type definitions, including specification of subtype relationships, (ii) function definitions referring to at least one of the type definitions, each function definition including a definition of arguments, including an argument order and argument positions, and (iii) precedence rules which, in combination with the function argument order, define an ordering of the confusable function instances, for a given set of arguments, the method comprising the steps of:
A method, to be practiced at compile time by a data handling system that supports multimethod function selection on typed data, including subtypes with multiple inheritance, for enabling static-type checking to be performed at run time for overloaded functions, wherein said system includes (i) a set of type definitions, including specification of subtype relationships, (ii) function definitions referring to at least one of the type definitions, and (iii) precedence rules which, in combination with the function argument order, define an ordering of the confusable function instances, for a given set of arguments, and further wherein said system includes a first data structure for representing (i) subtype relationships as specified in said type definitions, the subtype relationships including levels of specificity, such that, within a given subtype relation for a given set of the data types, there is a maximal static argument type which has a lowest level of specificity, (ii) a partitioning of function instances into confusable sets within which the function instances are ordered, and (iii) for each confusable set, information as to what the maximal static argument types of the functions are for each of the argument positions, the method comprising the steps of:
A method, to be practiced at compile time by a data handling system that supports multimethod function selection on typed data, including subtypes with multiple inheritance, for enabling static-type checking to be performed at run time for overloaded functions, wherein said system includes (i) a set of type definitions, including specification of subtype relationships, (ii) function definitions referring to at least one of the type definitions, and (iii) precedence rules which, in combination with the function argument order, define an ordering of the confusable function instances, for a given set of arguments, the method comprising the steps of:
A data handling system that supports multimethod function selection on typed data, including subtypes with multiple inheritance, for enabling static-type checking to be performed at run time for overloaded functions, the system comprising:
A data handling system that supports multimethod function selection on typed data, including subtypes with multiple inheritance, for enabling static-type checking to be performed at run time for overloaded functions, the system comprising:
A data handling system that supports multimethod function selection on typed data, including subtypes with multiple inheritance, for enabling static-type checking to be performed at run time for overloaded functions, the system comprising:
Dependencies are inferred from the claim text.