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

test-suite feature: generate well-typed Exprs #21

Open
mhuesch opened this issue Apr 13, 2021 · 0 comments
Open

test-suite feature: generate well-typed Exprs #21

mhuesch opened this issue Apr 13, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@mhuesch
Copy link
Contributor

mhuesch commented Apr 13, 2021

this is a little tricky.
two approaches come to mind:

  1. generate terms using the untyped generator, call infer them on them, & discard not-well-typed ones.
  • seems inefficient - we will probably rarely generate a well-typed Expr of any non-miniscule size.
  1. define a new type-directed generator.
  • seems hard, but doable.
  • here we might generate a Type first, and then use that to guide generation of an Expr which fits the type.
  • I imagine there's research literature about doing this, but I am currently ignorant of it.

migrated from mhuesch/poly-rs#13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant