-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGraph-QuickCheck.html
24 lines (24 loc) · 16 KB
/
Graph-QuickCheck.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Graph.QuickCheck</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Graph-QuickCheck.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graph.QuickCheck.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">verigraph-1.1.1: Software specification and verification tool based on graph rewriting.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Graph.QuickCheck</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#section.orphans">Orphan instances</a></li></ul></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:randomNodeOf">randomNodeOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen (<a href="Graph-Graph.html#t:Node">Node</a> n)</li><li class="src short"><a href="#v:randomNodeIdOf">randomNodeIdOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen <a href="Graph-Graph.html#t:NodeId">NodeId</a></li><li class="src short"><a href="#v:randomNodeInContextOf">randomNodeInContextOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen (<a href="Graph-Graph.html#t:NodeInContext">NodeInContext</a> n e)</li><li class="src short"><a href="#v:randomEdgeOf">randomEdgeOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen (<a href="Graph-Graph.html#t:Edge">Edge</a> e)</li><li class="src short"><a href="#v:randomEdgeIdOf">randomEdgeIdOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen <a href="Graph-Graph.html#t:EdgeId">EdgeId</a></li><li class="src short"><a href="#v:randomEdgeInContextOf">randomEdgeInContextOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen (<a href="Graph-Graph.html#t:EdgeInContext">EdgeInContext</a> n e)</li><li class="src short"><a href="#v:randomGraph">randomGraph</a> :: Gen n -> Gen e -> <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> Gen (<a href="Graph-Graph.html#t:Graph">Graph</a> n e)</li><li class="src short"><a href="#v:shrinkGraph">shrinkGraph</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> [<a href="Graph-Graph.html#t:Graph">Graph</a> n e]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:randomNodeOf" class="def">randomNodeOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen (<a href="Graph-Graph.html#t:Node">Node</a> n) <a href="src/Graph.QuickCheck.html#randomNodeOf" class="link">Source</a> <a href="#v:randomNodeOf" class="selflink">#</a></p><div class="doc"><p>Generate a random node that is a member of the given graph.
Must not be used with empty graphs, so calls to this are often similar to the following:</p><p>not (Prelude.null $ nodes graph) ==>
forAll (randomNodeOf graph) $ node ->
someProperty graph node</p></div></div><div class="top"><p class="src"><a id="v:randomNodeIdOf" class="def">randomNodeIdOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen <a href="Graph-Graph.html#t:NodeId">NodeId</a> <a href="src/Graph.QuickCheck.html#randomNodeIdOf" class="link">Source</a> <a href="#v:randomNodeIdOf" class="selflink">#</a></p><div class="doc"><p>Generate a random node identifier that is a member of the given graph.
Must not be used with empty graphs, so calls to this are often similar to the following:</p><p>not (Prelude.null $ nodes graph) ==>
forAll (randomNodeIdOf graph) $ nodeId ->
someProperty graph nodeId</p></div></div><div class="top"><p class="src"><a id="v:randomNodeInContextOf" class="def">randomNodeInContextOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen (<a href="Graph-Graph.html#t:NodeInContext">NodeInContext</a> n e) <a href="src/Graph.QuickCheck.html#randomNodeInContextOf" class="link">Source</a> <a href="#v:randomNodeInContextOf" class="selflink">#</a></p><div class="doc"><p>Generate a random node that is a member of the given graph, along with its context.
Must not be used with empty graphs, so calls to this are often similar to the following:</p><p>not (Prelude.null $ nodes graph) ==>
forAll (randomNodeInContextOf graph) $ (node, ctx) ->
someProperty graph node ctx</p></div></div><div class="top"><p class="src"><a id="v:randomEdgeOf" class="def">randomEdgeOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen (<a href="Graph-Graph.html#t:Edge">Edge</a> e) <a href="src/Graph.QuickCheck.html#randomEdgeOf" class="link">Source</a> <a href="#v:randomEdgeOf" class="selflink">#</a></p><div class="doc"><p>Generate a random edge that is a member of the given graph.
Must not be used with empty graphs, so calls to this are often similar to the following:</p><p>not (Prelude.null $ edges graph) ==>
forAll (randomEdgeOf graph) $ edge ->
someProperty graph edge</p></div></div><div class="top"><p class="src"><a id="v:randomEdgeIdOf" class="def">randomEdgeIdOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen <a href="Graph-Graph.html#t:EdgeId">EdgeId</a> <a href="src/Graph.QuickCheck.html#randomEdgeIdOf" class="link">Source</a> <a href="#v:randomEdgeIdOf" class="selflink">#</a></p><div class="doc"><p>Generate a random edge identifier that is a member of the given graph.
Must not be used with empty graphs, so calls to this are often similar to the following:</p><p>not (Prelude.null $ edges graph) ==>
forAll (randomEdgeIdOf graph) $ edgeId ->
someProperty graph edgeId</p></div></div><div class="top"><p class="src"><a id="v:randomEdgeInContextOf" class="def">randomEdgeInContextOf</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> Gen (<a href="Graph-Graph.html#t:EdgeInContext">EdgeInContext</a> n e) <a href="src/Graph.QuickCheck.html#randomEdgeInContextOf" class="link">Source</a> <a href="#v:randomEdgeInContextOf" class="selflink">#</a></p><div class="doc"><p>Generate a random edge that is a member of the given graph, along with its context.
Must not be used with empty graphs, so calls to this are often similar to the following:</p><p>not (Prelude.null $ edges graph) ==>
forAll (randomEdgeInContextOf graph) $ (edge, ctx) ->
someProperty graph edge ctx</p></div></div><div class="top"><p class="src"><a id="v:randomGraph" class="def">randomGraph</a> :: Gen n -> Gen e -> <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> Gen (<a href="Graph-Graph.html#t:Graph">Graph</a> n e) <a href="src/Graph.QuickCheck.html#randomGraph" class="link">Source</a> <a href="#v:randomGraph" class="selflink">#</a></p><div class="doc"><p>Given generators for payloads, the number of nodes and the number of edges,
generates a random graph.</p></div></div><div class="top"><p class="src"><a id="v:shrinkGraph" class="def">shrinkGraph</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> [<a href="Graph-Graph.html#t:Graph">Graph</a> n e] <a href="src/Graph.QuickCheck.html#shrinkGraph" class="link">Source</a> <a href="#v:shrinkGraph" class="selflink">#</a></p><div class="doc"><p>Produces all immediate shrinks of the given graph. Each shrink step may remove a single node
(along with all its incident edges) or a single edge.</p></div></div><h1>Orphan instances</h1><div id="section.orphans" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:o:ic:Arbitrary:Arbitrary:1" class="instance expander" onclick="toggleSection('i:o:ic:Arbitrary:Arbitrary:1')"></span> Arbitrary <a href="Graph-Graph.html#t:EdgeId">EdgeId</a></span> <a href="src/Graph.QuickCheck.html#line-17" class="link">Source</a> <a href="#v:-36-fArbitraryEdgeId" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:o:ic:Arbitrary:Arbitrary:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:arbitrary">arbitrary</a> :: Gen <a href="Graph-Graph.html#t:EdgeId">EdgeId</a></p><p class="src"><a href="#v:shrink">shrink</a> :: <a href="Graph-Graph.html#t:EdgeId">EdgeId</a> -> [<a href="Graph-Graph.html#t:EdgeId">EdgeId</a>]</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:o:ic:Arbitrary:Arbitrary:2" class="instance expander" onclick="toggleSection('i:o:ic:Arbitrary:Arbitrary:2')"></span> Arbitrary <a href="Graph-Graph.html#t:NodeId">NodeId</a></span> <a href="src/Graph.QuickCheck.html#line-10" class="link">Source</a> <a href="#v:-36-fArbitraryNodeId" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:o:ic:Arbitrary:Arbitrary:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:arbitrary">arbitrary</a> :: Gen <a href="Graph-Graph.html#t:NodeId">NodeId</a></p><p class="src"><a href="#v:shrink">shrink</a> :: <a href="Graph-Graph.html#t:NodeId">NodeId</a> -> [<a href="Graph-Graph.html#t:NodeId">NodeId</a>]</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:o:ic:Eq:Eq:3" class="instance expander" onclick="toggleSection('i:o:ic:Eq:Eq:3')"></span> <a href="../base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> e => <a href="../base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Graph-Graph.html#t:Edge">Edge</a> e)</span> <a href="src/Graph.QuickCheck.html#line-82" class="link">Source</a> <a href="#v:-36-fEqEdge" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:o:ic:Eq:Eq:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Graph-Graph.html#t:Edge">Edge</a> e -> <a href="Graph-Graph.html#t:Edge">Edge</a> e -> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Graph-Graph.html#t:Edge">Edge</a> e -> <a href="Graph-Graph.html#t:Edge">Edge</a> e -> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:o:ic:Eq:Eq:4" class="instance expander" onclick="toggleSection('i:o:ic:Eq:Eq:4')"></span> <a href="../base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> n => <a href="../base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Graph-Graph.html#t:Node">Node</a> n)</span> <a href="src/Graph.QuickCheck.html#line-76" class="link">Source</a> <a href="#v:-36-fEqNode" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:o:ic:Eq:Eq:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Graph-Graph.html#t:Node">Node</a> n -> <a href="Graph-Graph.html#t:Node">Node</a> n -> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Graph-Graph.html#t:Node">Node</a> n -> <a href="Graph-Graph.html#t:Node">Node</a> n -> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:o:ic:Arbitrary:Arbitrary:5" class="instance expander" onclick="toggleSection('i:o:ic:Arbitrary:Arbitrary:5')"></span> Arbitrary e => Arbitrary (<a href="Graph-Graph.html#t:Edge">Edge</a> e)</span> <a href="src/Graph.QuickCheck.html#line-35" class="link">Source</a> <a href="#v:-36-fArbitraryEdge" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:o:ic:Arbitrary:Arbitrary:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:arbitrary">arbitrary</a> :: Gen (<a href="Graph-Graph.html#t:Edge">Edge</a> e)</p><p class="src"><a href="#v:shrink">shrink</a> :: <a href="Graph-Graph.html#t:Edge">Edge</a> e -> [<a href="Graph-Graph.html#t:Edge">Edge</a> e]</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:o:ic:Arbitrary:Arbitrary:6" class="instance expander" onclick="toggleSection('i:o:ic:Arbitrary:Arbitrary:6')"></span> Arbitrary n => Arbitrary (<a href="Graph-Graph.html#t:Node">Node</a> n)</span> <a href="src/Graph.QuickCheck.html#line-24" class="link">Source</a> <a href="#v:-36-fArbitraryNode" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:o:ic:Arbitrary:Arbitrary:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:arbitrary">arbitrary</a> :: Gen (<a href="Graph-Graph.html#t:Node">Node</a> n)</p><p class="src"><a href="#v:shrink">shrink</a> :: <a href="Graph-Graph.html#t:Node">Node</a> n -> [<a href="Graph-Graph.html#t:Node">Node</a> n]</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:o:ic:Show:Show:7" class="instance expander" onclick="toggleSection('i:o:ic:Show:Show:7')"></span> <a href="../base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="Graph-Graph.html#t:NodeContext">NodeContext</a> n e)</span> <a href="src/Graph.QuickCheck.html#line-71" class="link">Source</a> <a href="#v:-36-fShowNodeContext" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:o:ic:Show:Show:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Graph-Graph.html#t:NodeContext">NodeContext</a> n e -> <a href="../base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Graph-Graph.html#t:NodeContext">NodeContext</a> n e -> <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Graph-Graph.html#t:NodeContext">NodeContext</a> n e] -> <a href="../base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:o:ic:Arbitrary:Arbitrary:8" class="instance expander" onclick="toggleSection('i:o:ic:Arbitrary:Arbitrary:8')"></span> (Arbitrary n, Arbitrary e) => Arbitrary (<a href="Graph-Graph.html#t:Graph">Graph</a> n e)</span> <a href="src/Graph.QuickCheck.html#line-46" class="link">Source</a> <a href="#v:-36-fArbitraryGraph" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:o:ic:Arbitrary:Arbitrary:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:arbitrary">arbitrary</a> :: Gen (<a href="Graph-Graph.html#t:Graph">Graph</a> n e)</p><p class="src"><a href="#v:shrink">shrink</a> :: <a href="Graph-Graph.html#t:Graph">Graph</a> n e -> [<a href="Graph-Graph.html#t:Graph">Graph</a> n e]</p></div></div></td></tr></table></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>