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

Compute Dependencies in the extractable monad #133

Draft
wants to merge 1 commit into
base: coq-8.8
Choose a base branch
from

Conversation

gmalecha
Copy link
Contributor

@gmalecha gmalecha commented May 8, 2019

This is a proposal to implement tmQuoteRecursive using an action tmDependencies that returns a list of all of the dependencies. The client can then traverse the list to compute the global_references type. I'm not sure how much this simplifies things, but it seems a little bit more orthogonal and potentially allows quoting less.

@gmalecha gmalecha changed the base branch from coq-8.8 to plugin-tm-interp May 8, 2019 01:10
@SimonBoulier
Copy link
Contributor

Yes. tmDependencies would be nice!

@aa755
Copy link
Contributor

aa755 commented May 8, 2019

tmDependencies was almost definable in the monad (even before this PR)? Fuel was needed to circumvent the issue of convincing the termination checker. Would it be better (more general) to just add a fixpoint combinator in the monad?

@yforster
Copy link
Member

yforster commented May 8, 2019 via email

@aa755
Copy link
Contributor

aa755 commented May 8, 2019 via email

@gmalecha
Copy link
Contributor Author

gmalecha commented May 8, 2019

General recursion could be nice, but that might warrant a longer discussion. In particular, it might make reasoning about meta functions more difficult.

@gmalecha gmalecha changed the base branch from plugin-tm-interp to coq-8.8 May 14, 2019 13:03
@@ -210,6 +210,10 @@ struct
else
not_supported_verb trm "unquote_list"

let rec quote_list ty = function
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost certainly duplicated.

@mattam82
Copy link
Member

mattam82 commented May 22, 2019

I’m surprised you couldn’t do it with fuel and a computed bound, as there is a finite number of references in a global_environment + term. Termination might be tricky, e.g. avoiding loops cleanly requires to know that the env is well-founded/linearizable (Typing.wf would ensure this). But I don’t see how it could be impossible, at least using the size of the term as a bound for the number of global_references or something like that.

@gmalecha
Copy link
Contributor Author

Discussion with @mattam82 , it seems like the plan is to finish implementing this (and possibly something else).

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.

None yet

5 participants