Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing Effects should support vm_compute and native_compute #8

Open
JasonGross opened this issue Apr 1, 2020 · 3 comments
Open

Comments

@JasonGross
Copy link
Collaborator

JasonGross commented Apr 1, 2020

Or if there is already support, this should be tested. @herbelin @maximedenes @ppedrot @silene (apparently I can't just tag @coq/vm-native-maintainers from a different repo), any thoughts on how feasible this is?

@maximedenes
Copy link

I'd expect it to be reasonably simple for native_compute (because it generates OCaml code, you could simply insert a call to a hook). Maybe less so for vm_compute, where you'd need to call this hook from the VM.

@silene
Copy link

silene commented Aug 28, 2020

I have some long-term plans to make it possible to register arbitrary OCaml functions fot VM execution (i.e., an Axiom command that would also take the name of a plugin-registered OCaml function). This would make this feature trivial to implement.

@JasonGross
Copy link
Collaborator Author

I am thinking about this feature again. I presume this needs special support Coq-side? Some sort of hook that plugins can call which says "when emitting native/VM code for this constant, please also emit this extra code above the function, and, underneath the closure for n arguments, emit let () := <custom code> in ... where the custom code is wrapped in parens and applied to the first n arguments"?

(Also, I'd like a version that works in the VM that doesn't require Axiom if possible. It seems fine to require a constant that is Qed-opaque / module-locked, and to taint it for Print Assumptions / the checker as "uses custom reduction in the VM")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants