1. At a computer system, a method for synthesizing one or more code fragments in a software routine using one or more known inputs and corresponding expected outputs for portions of the software routine, the method comprising: an act of providing a software routine with one or more known inputs and corresponding one or more expected outputs for the software routine; an act of inferring software routine instructions based on the known inputs and corresponding expected outputs; and an act of synthesizing a correctly functioning code fragment based on the inferred instructions for use in the software routine.