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

Improvements to requirements #124

Open
6 tasks
zsunberg opened this issue Dec 31, 2016 · 3 comments
Open
6 tasks

Improvements to requirements #124

zsunberg opened this issue Dec 31, 2016 · 3 comments

Comments

@zsunberg
Copy link
Member

zsunberg commented Dec 31, 2016

If the requirements system turns out to be useful, the following improvements could be made

  • Smartly and optionally print module names (easy)
  • Allow parameters throughout (I think they will break some functions now) (medium)
  • Print requirements even if there is an error in get_requirements. Currently, if there is an error in a @POMDP_require block, it will not show any @reqs that come after the error. A better way to fail would be to show the requirement (but possibly without all the type information). It is not clear how to handle cases when a @req is in an if statement or has some other conditionality (difficult)
  • Use static analysis to determine the requirements instead of specifying them manually (difficult)
  • One should also be able to specify requirements with a function call and have the types inferred, e.g
@POMDP_require f(a::A) begin
    @req f(a)
end

should work in addition to

@POMDP_require f(a::A) begin
    @req f(::typeof(a))
end

which already works. (easy)

  • Might be able to unify @req and @subreq - do they need to be different? (meidum)
@etotheipluspi
Copy link
Member

This is great, and the new requirements functionality is awesome! Can we merge the improvements checklist into the original post to make it easier to track.

@zsunberg
Copy link
Member Author

zsunberg commented Jan 5, 2017

Done. BTW, I personally don't ever expect to get around to doing any of these tasks, haha - it will only happen if someone else gets deeply involved with this.

@zsunberg
Copy link
Member Author

Seems like code_typed works pretty well now, so it should be pretty easy to automate more things

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

2 participants