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

type synonym involving nat causes c++ compiler failure #42

Open
tjhance opened this issue Sep 9, 2021 · 1 comment
Open

type synonym involving nat causes c++ compiler failure #42

tjhance opened this issue Sep 9, 2021 · 1 comment

Comments

@tjhance
Copy link
Collaborator

tjhance commented Sep 9, 2021

I have this type declared for some ghost code:

type FullMap<K(!new)> = m : imap<K, nat> | IsFull(m) && HasFiniteSupport(m) 

dafny c++ tries to compile it and, of course, complains (because of the nat). This type is only used in proof code, but there's no way to add a 'ghost' modifier to this declaration

@tjhance
Copy link
Collaborator Author

tjhance commented Sep 9, 2021

Here's a workaround:

type FullMap<K(!new)> = FM(ghost m: imap<K, nat>) ...

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