Skip to content

Commit

Permalink
build based on a89fdc0
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Feb 24, 2024
1 parent cd21708 commit 36579d0
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.1","generation_timestamp":"2024-02-24T09:04:13","documenter_version":"1.2.1"}}
{"documenter":{"julia_version":"1.10.1","generation_timestamp":"2024-02-24T21:02:06","documenter_version":"1.2.1"}}
2 changes: 1 addition & 1 deletion dev/Examples/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
Test Summary: | Pass Total Time
successor | 1 1 0.0s
Test Summary: | Pass Total Time
commutative | 1 1 0.0s</code></pre><p>In this way, we can even reuse properties from other invocations of <code>@check</code> with new, perhaps more specialized, inputs. For generalization, we can use <a href="../api.html#Supposition.Data.Just"><code>Data.Just</code></a> to pass our <code>add</code> function to the generalized properties.</p><div class="admonition is-info"><header class="admonition-header">Nesting @testset</header><div class="admonition-body"><p>From Julia 1.11 onwards, <code>@check</code> can also report its own results as part of a parent <code>@testset</code>. This is unfortunately unsupported on 1.10 and earlier.</p></div></div><p>Be aware that while all checks pass, we <em>do not have a guarantee that our code is correct for all cases</em>. Sampling elements to test is a statistical process and as such we can only gain <em>confidence</em> that our code is correct. You may view this in the light of Bayesian statistics, where we update our prior that the code is correct as we run our testsuite more often. This is also true were we not using property based testing or Supposition.jl at all - with traditional testing approaches, only the values we&#39;ve actually run the code with can be said to be tested.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../intro.html">« Introduction to PBT</a><a class="docs-footer-nextpage" href="composition.html">Composing Generators »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Saturday 24 February 2024 09:04">Saturday 24 February 2024</span>. Using Julia version 1.10.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
commutative | 1 1 0.0s</code></pre><p>In this way, we can even reuse properties from other invocations of <code>@check</code> with new, perhaps more specialized, inputs. For generalization, we can use <a href="../api.html#Supposition.Data.Just"><code>Data.Just</code></a> to pass our <code>add</code> function to the generalized properties.</p><div class="admonition is-info"><header class="admonition-header">Nesting @testset</header><div class="admonition-body"><p>From Julia 1.11 onwards, <code>@check</code> can also report its own results as part of a parent <code>@testset</code>. This is unfortunately unsupported on 1.10 and earlier.</p></div></div><p>Be aware that while all checks pass, we <em>do not have a guarantee that our code is correct for all cases</em>. Sampling elements to test is a statistical process and as such we can only gain <em>confidence</em> that our code is correct. You may view this in the light of Bayesian statistics, where we update our prior that the code is correct as we run our testsuite more often. This is also true were we not using property based testing or Supposition.jl at all - with traditional testing approaches, only the values we&#39;ve actually run the code with can be said to be tested.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../intro.html">« Introduction to PBT</a><a class="docs-footer-nextpage" href="composition.html">Composing Generators »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Saturday 24 February 2024 21:02">Saturday 24 February 2024</span>. Using Julia version 1.10.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
40 changes: 20 additions & 20 deletions dev/Examples/composition.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,30 @@
f = filter(iseven, intgen)

example(f, 10)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">10-element Vector{UInt8}:
0xfc
0x78
0x44
0x78
0xfa
0xf8
0x26
0xb0
0xca
0x4e</code></pre><p>Note that filtering is, in almost all cases, strictly worse than constructing the desired objects directly. For example, if the filtering predicate rejects too many examples from the input space, it can easily happen that no suitable examples can be found:</p><pre><code class="language-julia hljs">g = filter(&gt;(typemax(UInt8)), intgen)
0x20
0x50
0xc4
0x74
0xa4
0xde
0xda
0x0e
0xbe
0xfa</code></pre><p>Note that filtering is, in almost all cases, strictly worse than constructing the desired objects directly. For example, if the filtering predicate rejects too many examples from the input space, it can easily happen that no suitable examples can be found:</p><pre><code class="language-julia hljs">g = filter(&gt;(typemax(UInt8)), intgen)
example(g, 10)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">ERROR: Tried sampling 100000 times, without getting a result. Perhaps you&#39;re filtering out too many examples?</code></pre><p>It is best to only filter when you&#39;re certain that the part of the state space you&#39;re filtering out is not substantial.</p><h3 id="map"><a class="docs-heading-anchor" href="#map"><code>map</code></a><a id="map-1"></a><a class="docs-heading-anchor-permalink" href="#map" title="Permalink"></a></h3><p>In order to make it easier to directly construct conforming instances, you can use <code>map</code>, transforming the output of one <code>Possibility</code> into a different object:</p><pre><code class="language-julia hljs">using Supposition

intgen = Data.Integers{UInt8}()
makeeven(x) = (x÷0x2)*0x2
m = map(makeeven, intgen)

example(m, 10)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">10-element Vector{UInt8}:
0xb4
0xac
0x4c
0x86
0x52
0x6e
0xde
0xa2
0xaa
0x5e</code></pre><div class="admonition is-warning"><header class="admonition-header">Type stability</header><div class="admonition-body"><p>The inferred type of objects created by a generator from <code>map</code> is a <em>best effort</em> and may be wider than expected. Ensure your function <code>f</code> is easily inferrable to have good chances for <code>map</code>ping it to be inferable as well.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="basic.html">« Basic Usage</a><a class="docs-footer-nextpage" href="recursive.html">Recursive Generation »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Saturday 24 February 2024 09:04">Saturday 24 February 2024</span>. Using Julia version 1.10.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0x02
0xcc
0x60
0xd0
0x3e
0x22
0xfa
0xae
0x80
0x4e</code></pre><div class="admonition is-warning"><header class="admonition-header">Type stability</header><div class="admonition-body"><p>The inferred type of objects created by a generator from <code>map</code> is a <em>best effort</em> and may be wider than expected. Ensure your function <code>f</code> is easily inferrable to have good chances for <code>map</code>ping it to be inferable as well.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="basic.html">« Basic Usage</a><a class="docs-footer-nextpage" href="recursive.html">Recursive Generation »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Saturday 24 February 2024 21:02">Saturday 24 February 2024</span>. Using Julia version 1.10.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 36579d0

Please sign in to comment.