mit-plv / bedrock2

A work-in-progress language and compiler for verified low-level programming
http://adam.chlipala.net/papers/LightbulbPLDI21/
MIT License
297 stars 45 forks source link

Fix destruct loop in straightline #372

Closed bMacSwigg closed 1 year ago

bMacSwigg commented 1 year ago

In some cases, destruct H won't be able to clear H from the context. This causes straightline to get stuck in a loop, trying to destruct the same hypothesis on each iteration. This change ensures that we only call destruct H when we know that this won't happen.