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

Duplication of type quantifiers when extracting models #156

Open
br4sco opened this issue Mar 23, 2024 · 0 comments
Open

Duplication of type quantifiers when extracting models #156

br4sco opened this issue Mar 23, 2024 · 0 comments

Comments

@br4sco
Copy link
Contributor

br4sco commented Mar 23, 2024

Compiling the following model

include "seq.mc"
let model: () -> Float = lam.
  foldl2 (lam acc. lam x1. lam x2.
            addf acc (assume (Beta x1 x2)))
         0.0 [1.0, 2.0, 3.0] [1.0, 2.0, 3.0]
mexpr
model ()

with cppl will duplicate the type quantifiers of foldl2 defined in seq.mc to something similar to

let foldl21: all c. all b7. all a28. all a28. all b7. all c. Unknown

in the resulting mexpr program. The problem seems to arise in the extraction phase of model compilation. Note that the output program will also fail to type check due to miking-lang/miking#830 when using partial CPS. However, the quantifier duplication also occurs for full CPS and no CPS.

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

No branches or pull requests

1 participant