TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Generating well-typed terms that are not "useless" [pdf]

41 pointsby luuover 1 year ago

3 comments

trompover 1 year ago
The use of quotes around &quot;Useless&quot; becomes clear in<p>&gt; decoupling the generation of types and expressions significantly biases generation towards functions that do not use their arguments.<p>&gt; Such “use-less” function arguments lead to wasted computation, both in terms of generation time (as the code that generates such arguments is essentially dead) and in terms of compilation time (as the test runner now needs to compile a larger program).
chriswarboover 1 year ago
Using laziness to avoid generating parts of an expression until it&#x27;s needed is a really nice idea. The LazySmallCheck package[1] took this approach, but was limited in the types of data it could produce (e.g. it couldn&#x27;t generate functions). This was extended by LazySmallCheck2012[2], but that seems to be unmaintained and doesn&#x27;t work with more recent GHC versions.<p>(Note that these are named in reference to SmallCheck[3], which takes the approach of enumerating concrete values in order of &quot;size&quot;; as an alternative to the more widely-used QuickCheck[4], which generates concrete values at random, and tries to &quot;shrink&quot; those which trigger a failure)<p>[1] <a href="https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;lazysmallcheck" rel="nofollow noreferrer">https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;lazysmallcheck</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;UoYCS-plasma&#x2F;LazySmallCheck2012">https:&#x2F;&#x2F;github.com&#x2F;UoYCS-plasma&#x2F;LazySmallCheck2012</a><p>[3] <a href="https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;smallcheck" rel="nofollow noreferrer">https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;smallcheck</a><p>[4] <a href="https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;QuickCheck" rel="nofollow noreferrer">https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;QuickCheck</a>
choegerover 1 year ago
Looks like a very interesting paper for everyone trying to test any kind of tool that works on a (functional) language.<p>Love the Acknowledgement section.