CozySynthesizer / cozy

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

check in generated code as end-to-end regresison test #91

Closed izgzhen closed 5 years ago

izgzhen commented 5 years ago

with this, we can track precisely what has changed because of what. Also, we can throw anyone curious about the output from Cozy a simple link to GitHub

Calvin-L commented 5 years ago

I think this is too fragile to be useful.

Right now the test_examples.sh script uses simple mode, so this works. However, this will stop working if we ever want to test synthesis.

izgzhen commented 5 years ago
  • In simple mode, Cozy's output is deterministic. However, the output is also very bad, so there isn't much point in sharing it.

It is a good point. But the diff of trivial output can be useful to understand what has changed within Cozy.

With full synthesis, Cozy's output is nondeterministic. In particular, it will often choose different names for variables.

I think it is possible to make Cozy deterministic with a simple change? For example, we can assign a maximum step size for the main improvement loop to avoid using imprecise timeout. Also, variable can be made deterministic by choosing a different generator.

Making it deterministic is also useful for day-to-day debugging/reproduction.

izgzhen commented 5 years ago

In simple mode, Cozy's output is deterministic. However, the output is also very bad, so there isn't much point in sharing it.

Regarding this -- again from my perspective I am still curious about a synthesizer's output even if it is a trivial one or bad or anything, as long as I am informed about its status.

izgzhen commented 5 years ago

ping @Calvin-L