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

Make simplestValue top-level for overrides + hasInstance fix on ADTType #151

Merged
merged 4 commits into from
May 12, 2021

Conversation

jad-hamza
Copy link
Contributor

No description provided.

src/main/scala/inox/ast/SymbolOps.scala Outdated Show resolved Hide resolved
src/main/scala/inox/ast/SymbolOps.scala Outdated Show resolved Hide resolved
}
} else {
val cons = sort.constructors.sortBy(_.fields.size).head
ADT(cons.id, cons.tps, cons.fields.map(vd => simplestValue(vd.getType, seen + adt, allowSolver)))
Copy link
Member

Choose a reason for hiding this comment

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

Actually, the "correct" implementation of simplestValue should probably use streams where all ADT constructors are considered.

src/main/scala/inox/ast/SymbolOps.scala Outdated Show resolved Hide resolved
@samarion
Copy link
Member

Not super important, but might make sense to split the tuple fix into a second PR. Did you check that it fixes the issue on the Stainless side?

@samarion samarion merged commit c908e75 into epfl-lara:master May 12, 2021
@jad-hamza
Copy link
Contributor Author

Did you check that it fixes the issue on the Stainless side?

Yes and I encountered #153 on the same example, I think this means it was OK for the tuples.

@jad-hamza jad-hamza deleted the simplestValue branch May 12, 2021 11:18
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.

2 participants