CozySynthesizer / cozy

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

Quick code review #29

Closed anhnamtran closed 6 years ago

anhnamtran commented 6 years ago

Format:

filename: [start line, end line] ...

or

filename: method_name

Overall a few places are undocumented.

Calvin-L commented 6 years ago

There are a few things I am going to leave as-is.

Some method def's have type restrictions when some others don't. Intentional?

The type restrictions are a form of documentation, and are generally only present on the most important functions. Note that they are not enforced unless the procedure is annotated with @common.typechecked, and even then, the type annotations are only enforced dynamically.

Why chose TWO, FOUR, EIGHT, TWENTY?

The cost model is sort of a black art. There are boatload of regression tests in tests/cost_model.py that describe "expected behavior" from the cost model, and these parameters are tuned to make it behave appropriately.