1. A computer-readable storage medium loaded with computer-executable instructions, that, when executed on at least one processor in a computer, implement a tool that performs a method of analyzing computer instructions, the computer instructions specifying actions by a computer and the computer instructions implementing a multi-threaded program, the method comprising: processing the computer instructions to infer a plurality of variable-lock associations, each variable-lock association of the plurality of variable-lock associations being comprised of a variable and a lock associated with the variable, both the variable and the lock being referenced in the computer instructions, wherein, for each variable in a variable-lock association, the processing comprises inferring a lock that, when referenced in an operation in the computer instructions that instructs the computer to enter a critical section, guards the variable from concurrent access, and wherein each variable is associated with a locking state and a type state, the locking state associated with a variable being the locked state when the variable is currently guarded by the associated lock and the locking state associated with a variable being the unlocked state when the variable is currently unguarded by the associated lock, the type state being the uninitialized state when the locking state associated with the variable is the unlocked state or when the locking state associated with the variable is first set to the locked state, the type state otherwise being based on operations performed on the variable in the computer instructions that modify the type state of the variable; stepping through the computer instructions to simulate at least one control flow of the program; and while stepping through the computer instructions, for each variable in a variable-lock association of the plurality of variable-lock associations: when the locking state associated with a variable is the unlocked state and when the lock associated with the variable is referenced in an operation in the program that instructs the computer to enter a critical section, then setting the locking state associated with the variable to the locked state and setting the type state associated with the variable to the uninitialized state; when the lock associated with the variable is referenced in an operation in the program that instructs the computer to leave a critical section, then setting the locking state associated with the variable to the unlocked state and setting the type state associated with the variable to the uninitialized state; when the locking state associated with the variable is the locked state, tracking the type state associated with the variable, the type state of the variable being based on operations in the computer instructions that modify the type state of the variable, wherein the computer instructions comprise type state-dependent operations that are dependent on the type state of a variable, such that when a variable is associated with a type state in a first set of type states, executing a type state-dependent operation referencing the variable instructs the computer to enter into a particular error condition, and when a variable is associated with a type state in a second set of type states, executing the type state-dependent operation referencing the variable does not instruct the computer to enter into the particular error condition; and when the variable is referenced in a type state-dependent operation in the computer instructions, then: when the type state of the variable is the uninitialized state or when the type state of a variable is a state in the first set of type states, then indicating a warning.