Closed rossberg closed 2 months ago
Now the interpreter backends support the def parameter!
To keep it simple,
instead of maintaining a new environment,
it uses the original env
that interpreter was using,
where key is the concatenation of the prefix $
and the parameter name (i.e. "$f_"
),
and the value is the name of the original target function definition. (i.e. FnameV("fadd_")
)
This is based on the assumption that the normal variables in SpecTec never starts with "$".
Cool, thanks @f52985!
There is a lot of code duplication in the numerics implementation. This PR simplifies that by factoring out much of the logic into higher-order functions. This is just a start, we can probably simplify further.
However, this is the first use of def's as parameters, which the interpreter does not support yet.
@ShinWonho, @f52985, this PR isn't high priority. Just putting it out there so that you can have a look in case you have spare cycles. :)