Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rossberg
Copy link
Collaborator

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. :)

@f52985
Copy link
Collaborator

f52985 commented Aug 28, 2024

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 "$".

@rossberg
Copy link
Collaborator Author

Cool, thanks @f52985!

@rossberg rossberg merged commit d9a12cf into main Aug 29, 2024
@rossberg rossberg deleted the ho-num branch August 29, 2024 07:01
f52985 pushed a commit to kaist-plrg/spectec that referenced this pull request Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants