IP Library Granted Patent US 8,826,254
Granted Patent B2
US 8,826,254 · App. 13/671,825 · Granted Sep 2, 2014

Memoizing with read only side effects

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,826,254
App. No.
13/671,825
Granted
Sep 2, 2014
Kind
B2
Abstract

A function may be memoized when a side effect is a read only side effect. Provided that the read only side effect does not mutate a memory object, the side effect may be considered as an input to a function for purity and memoization analysis. When a read only side effect may be encountered during memoization analysis, the read only side effect may be treated as an input to a function for memoization analysis. In some cases, such side effects may enable an impure function to behave as a pure function for the purposes of memoization.

Claims (45)

1. A method performed by at least one processor, said method comprising:

receiving operational results for an application comprising a first function, said operational results comprising inputs to said first function, results returned from said first function, and a state associated with said inputs to said first function;

said operational results being collected by a tracer;

determining that a first side effect comprises reading a first memory object, said state comprising values for said first memory object;

determining that said first side effect does not comprise mutating said first memory object;

determining that said first function returns a first value given a first condition, said first condition comprising a first set of input parameter values and a first value for said first memory object;

causing said first function to be memoized under said first condition without collecting said operational results by said tracer.

2. The method of claim 1 further comprising:

analyzing said operational results and determining that said first function under said first condition returns a consistent result.

3. The method of claim 2 , said consistent result being determined within a statistical certainty.

4. The method of claim 2 , said plurality of operational results being captured during executing an application comprising said first function.

5. The method of claim 4 , said application being executed under simulated loads.

6. The method of claim 4 , said application being executed under actual loads.

7. The method of claim 4 further comprising:

determining that said first function returns a second value under a second condition, said second condition comprising said first set of input parameter values and a second value for said first memory object; and

causing said first function to be memoized under said second condition.

8. The method of claim 7 further comprising:

determining that said first function returns inconsistent values under a third condition, said third condition comprising said first set of input parameter values and a third value for said first memory object; and

causing said first function not to be memoized under said third condition.

9. The method of claim 8 further comprising:

receiving said operational results from a client device.

10. The method of claim 9 further comprising:

storing a record in a configuration database for memoizing said first function.

11. The method of claim 10 , said record indicating that said first function is memoizable under said first condition.

12. The method of claim 11 , said record indicating that said first function is not memoizable under said third condition.

13. A system comprising:

a processor;

a purity analyzer operating on said processor, said purity analyzer that:

receives operational results for an application comprising a first function, said operational results comprising inputs to said first function, results returned from said first function, and a state associated with said inputs to said first function;

said operational results being collected by a tracer;

determines that a first side effect comprises reading a first memory object, said state comprising values for said first memory object;

determines that said first side effect does not comprise mutating said first memory object;

determines that said first function returns a first value given a first condition, said first condition comprising a first set of input parameter values and a first value for said first memory object;

stores said first function and said first condition in a configuration database, said configuration database being used to execute said application without said tracer to memoize said first function.

14. The system of claim 13 further comprising:

a distribution server that transmits said configuration database to a client device.

15. The system of claim 14 further comprising:

an instrumented execution environment that executes an application comprising said first function and generates said operational results.

16. The system of claim 15 , said instrumented execution environment that further executes said application under simulated loads.

17. The system of claim 16 , said purity analyzer that further:

determines that said first function returns inconsistent values under a second condition, said second condition comprising said first set of input parameter values and a second value for said first memory object; and

stores said first function and said second condition in said configuration database as being not memoizable.

18. The system of claim 17 further comprising:

a static code analyzer that examines said application to identify said first function as impure.

19. The system of claim 18 , said static code analyzer that analyzes said application in source code form.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 20, 2015
From: CONCURIX CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 036139/0069 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 13, 2012
From: GOUNARES, ALEXANDER G.; LI, YING; GARRETT, CHARLES D.; NOAKES, MICHAEL D.
To: CONCURIX CORPORATION
Reel/Frame 029463/0885 →