IP Library Granted Patent US 8,490,051
Granted Patent B2
US 8,490,051 · App. 11/712,000 · Granted Jul 16, 2013

Generic interface for numeric types

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 8,490,051
App. No.
11/712,000
Granted
Jul 16, 2013
Kind
B2
Abstract

Various technologies and techniques are disclosed for providing a common generic interface for numeric types in statically typed languages. The common generic interface defines basic arithmetic operations, thereby allowing basic arithmetic operations to be performed on the numeric types. The common generic interface provides support for overflow detection when a result of an operation being performed on a particular numeric type will result in an overflow situation when the operation does not fit within a range supported by the particular numeric types. The common generic interface provides support for one or more mathematical properties to be retrieved for a particular one of the numeric types being used in a particular circumstance.

Claims (31)

1. A computer-readable storage device, comprising:

a software development application for providing a statically typed software development language that implements a public arithmetic class having an object model that includes:

a public generic interface that defines basic arithmetic operations, the public generic interface being implementable by a plurality of numeric types, thereby allowing basic arithmetic operations to be performed on the plurality of numeric types, the public generic interface being operable to change to a second one of the numeric types in response to a determination that a result of an operation being performed on a first one of the numeric types would not fit within a range supported by the first one of the numeric types;

a public arithmetic descriptor class that describes numeric properties of each of the plurality of numeric types implementing the public generic interface; and

an arithmetic capabilities enumeration used by the public arithmetic descriptor class that includes mathematical properties that can be retrieved for each of the plurality of numeric types implementing the public generic interface.

2. The computer-readable storage device of claim 1 , wherein the public generic interface is operable to use overflow data obtained during overflow detection to determine a next action.

3. The computer-readable storage device of claim 1 , wherein the public generic interface is operable to report a failure when an exception occurs.

4. The computer-readable storage device of claim 1 , wherein the public generic interface is operable to change to a second one of the numeric types when a first attempt to perform an operation with a first one of the numeric types fails.

5. The computer-readable storage device of claim 1 , wherein the public arithmetic descriptor class is operable to allow one or more mathematical properties to be retrieved for a particular one of the numeric types being used in a particular circumstance.

6. The computer-readable storage device of claim 5 , wherein the mathematical properties that can be retrieved are selected from the group consisting of a representation of zero, a representation of one, a minimum value, a maximum value, a range, a positive infinity value, and a negative infinity value.

7. The computer-readable storage device of claim 1 , wherein support is provided to allow common numeric operations that can be performed on any of the numeric types to be packaged together.

8. A computer-implemented method for providing a common generic interface with overflow detection comprising the steps of:

providing a statically typed software development language that implements, in the logic of a computing device, a public arithmetic class having an object model that includes a public generic interface that defines basic arithmetic operations and that allows basic arithmetic operations to be performed on a plurality of numeric types, the public generic interface being implementable by the plurality of numeric types, a public arithmetic descriptor class that describes the numeric properties of each of the plurality of numeric types implementing the public generic interface, and an arithmetic capabilities enumeration used by the public arithmetic descriptor class that includes mathematical properties that can be retrieved for each of the plurality of numeric types implementing the public generic interface;

receiving a request to perform an operation on a particular one of the numeric types;

determining whether a result of the operation will create an overflow situation when the operation does not fit within a range supported by the particular one of the numeric types; and

changing, using the public generic interface, to a second one of the numeric types if the result of the operation does not fit within the range supported by the particular one of the numeric types.

9. The method of claim 8 , wherein the public generic interface allows basic arithmetic operations to be performed on the numeric types.

10. The method of claim 8 , wherein the public generic interface is operable to report a failure when an exception occurs.

11. The method of claim 8 , wherein the public generic interface is operable to change to a second one of the numeric types when a first attempt to perform an operation with a first one of the numeric types fails.

12. The method of claim 8 , wherein support is provided to allow common numeric operations that can be performed on any of the numeric types to be packaged together.

13. A computer-readable storage device having computer-executable instructions recorded thereon for causing a computer to perform the steps recited in claim 8 .

14. A computer-implemented method for providing a common generic interface that supports various mathematical properties comprising the steps of:

providing a statically typed software development language that implements, in the logic of a computing device, a public arithmetic class having an object model that includes a public generic interface that defines basic arithmetic operations, thereby allowing basic arithmetic operations to be performed on a plurality of numeric types, the public generic interface being implementable by the plurality of numeric types, a public arithmetic descriptor class that describes the numeric properties of each of the plurality of numeric types implementing the public generic interface, and an arithmetic capabilities enumeration used by the public arithmetic descriptor class;

changing, using the public generic interface, to a second one of the numeric types in response to a determination that a result of an operation being performed on a first one of the numeric types would not fit within a range supported by the first one of the numeric types; and

retrieving, using the arithmetic capabilities enumeration, one or more mathematical properties for a particular one of the numeric types being used in a particular circumstance.

15. The method of claim 14 , wherein the mathematical properties that can be retrieved are selected from the group consisting of a representation of zero, a representation of one, a minimum value, a maximum value, a range, a positive infinity value, and a negative infinity value.

16. The method of claim 14 , wherein one or more of the mathematical properties provide information about how a particular one of the numeric types are represented.

17. The method of claim 14 , wherein support is provided to allow common numeric operations that can be performed on any of the numeric types to be packaged together.

18. A computer-readable storage device having computer-executable instructions recorded thereon for causing a computer to perform the steps recited in claim 14 .

19. The method of claim 8 , wherein the public arithmetic descriptor class is operable to allow one or more mathematical properties to be retrieved for a particular one of the numeric types being used in a particular circumstance.

20. The method of claim 19 , wherein the mathematical properties that can be retrieved are selected from the group consisting of a representation of zero, a representation of one, a minimum value, a maximum value, a range, a positive infinity value, and a negative infinity value.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034542/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 25, 2012
From: ANDERSEN, MELITTA; MILLER, JAMES S.; MOORE, ANTHONY J.; WEINSTEIN, ARIEL; FREE, JOSH
To: MICROSOFT CORPORATION
Reel/Frame 028629/0342 →