CozySynthesizer / cozy

The collection synthesizer
https://cozy.uwplse.org
Apache License 2.0
209 stars 18 forks source link

Cost model change #30

Closed anhnamtran closed 6 years ago

anhnamtran commented 6 years ago

Changes to the cost model that it no longer has to use the "no integer arithmetic in state name" rule.

Calvin-L commented 6 years ago

I would also like to have at least one test that covers this functionality. In essence: cost(EStateVar(x+1)) < cost(EStateVar(x)+1), unless x is a freebie, in which case the relationship is reversed.

Calvin-L commented 6 years ago

This is useful on its own, so I am going to merge it in. Make a separate pull request for the restrictions we talked about yesterday and today.

Calvin-L commented 6 years ago

One last thing I missed: you need to use .value when reading an Option object. I made this small fix to your code in fde6b31.

anhnamtran commented 6 years ago

Oops sorry about that. I had that in mind but I blanked when I was putting it in.