1. A method, performed by a computer device, the method comprising: obtaining an in-memory representation of computer code from a block step method of an executable model, wherein the in-memory representation includes one or more variables and wherein the obtaining is performed by the computer device; identifying, from the one or more variables, a subset of persistent variables, wherein the identifying is performed by the computer device; determining if any of the one or more variables in the subset of persistent variables are state variables, wherein the determining is performed by the computer device; generating, by the computer device and based on the in-memory representation and the one or more variables: a block output method, when none of the subset of persistent variables are state variables, or the block output method and a block update method, when the subset of persistent variables includes a state variable.