Ώ_      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn o p q r s t u v w x y z { | } ~         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     None An unpacked  whose  instance is addition. 0This instance is equivalent to the instance for .  %This instance sums the two contained s.   None=This exception is thrown when the connection has been lost.  Replaces EOF  IOException s with the  exception.  Receives a !-able value from a handle. GSpecifically, this function reads in a 64-bit big-endian word with the J size of the raw data to be read, reads that much data in bytes into a   ByteString, and then deserializes the  ByteString to produce the  resulting value. +If the connection has been lost, it throws . Sends a !-able value to a handle. <Specifically, this function serializes the given value to a  ByteString, I and then writes the size of the serialized data in bytes as a 64-bit 5 big-endian word followed by the raw data itself. +If the connection has been lost, it throws . "" Safe-Inferred*The purity of a tree, which can be either   (for pure trees) or   = (for impure trees); the latter case is restricted to monads  that are instances of #- and for which there exists a way to convert ! the monad into an IO action. The two kind arguments, m and n*, correspond to respectively the monad in  on top of which the TreeT/ monad transformer is stacked and the monad in " which the worker will be run. &The purity of trees in the IO monad.     None  An unpacked $ whose  instance is addition. %0This instance is equivalent to the instance for $. &%This instance sums the two contained $s.  %&    %& Safe-Inferred.Newtype wrapper used to indirectly provide an ' instance for Word. ()()None#>This is just a convenient alias for working with pure trees. "The core of the implementation of & is mostly contained in this E type, which provides a list of primitive instructions for trees:  , which caches a value, ", which signals a branch with two  choices, 6, which indicates that there are no more results, and  2, which signals that a break should be taken from J exploration to process any pending requests (only meant to be used in  exceptional cases). This class is like (, but it is designed to work with monad  stacks; at minimum  needs to be defined. 5The next layer down in the monad transformer stack. BRuns the given action in the nested monad and caches the result. GRuns the given action in the nested monad and then does the equivalent  of feeding it into guard, caching the result. :Runs the given action in the nested monad; if it returns *,  then it acts like +, if it returns 'Just x', then it caches the  result. The 7 class provides caching functionality when exploring a L tree, as well as a way to give a worker a chance to process any pending  requests; at minimum   needs to be defined. 3Cache a value in case we explore this node again. This does the same thing as guard but it caches the result. CThis function is a combination of the previous two; it performs a 2 computation which might fail by returning *, and if that happens Q it then backtracks; if it passes then the result is cached and returned. FNote that the previous two methods are essentially specializations of  this method. !FThis function tells the worker to take a break to process any pending G requests; it does nothing if we are not in a parallel setting. GNOTE: You should normally never need to use this function, as requests O are processed whenever a choice point, a cache point, mzero, or a leaf P in the decision tree has been encountered. However, if you have noticed Q that workload steals are taking such a large amount of time that workers P are spending too much time sitting idle while they wait for a workload, P and you can trace this as being due to a computation that takes so much Q time that it almost never gives the worker a chance to process requests, P then you can use this method to ensure that requests are given a chance  to be processed. "#A tree run in an arbitrary monad. %A tree running in the I/2O monad, which you should only be using for doing L things like reading data from an external file or database that will be ! constant for the entire run. &:A pure tree, which is what you should normally be using. '<Explores all the nodes in a pure tree and sums over all the  results in the leaves. (?Explores all the nodes in an impure tree and sums over all the  results in the leaves. )=Explores a tree for its side-effects, ignoring all results. *HExplores all the nodes in a tree until a result (i.e., a leaf) has been E found; if a result has been found then it is returned wrapped in ,,  otherwise * is returned. +Same as *$, but taking an impure tree instead  of pure one. ,LExplores all the nodes in a tree, summing all encountered results (i.e., in O the leaves) until the current partial sum satisfies the condition provided H by the first function. The returned value is a pair where the first O component is all of the results that were found during the exploration and  the second component is -, if the exploration terminated early due to  the condition being met and . otherwise. KNOTE: The condition function is assumed to have two properties: first, it  is assumed to return . for /, and second, it is assumed  that if it returns - for x then it also returns - for   mappend x y and  mappend y x for all values y. The reason for O this is that the condition function is used to indicate when enough < results have been found, and so it should not be - for / 2 as nothing has been found and if it is - for x then it should  not be . for the sum of y with x as this would mean that  having more9 than enough results is no longer having enough results. -Same as ,', but taking an impure tree instead of  a pure tree. .Returns a tree (or some other 0!) with all of the results in the  input list. /2Returns an optimally balanced tree (or some other 0) that O generates all of the elements in the given (inclusive) range; if the lower 5 bound is greater than the upper bound it returns +. 0@This function lets you take a pure tree and transform it into a ' tree with an arbitrary base monad. 1The  instance acts like the 0 instance. 2 Like the + instance, this instance does no caching. 3LThis instance performs no caching but is provided to make it easier to test  running a tree using the 4 monad. 5LThis instance performs no caching but is provided to make it easier to test  running a tree using the 6 monad. 7 Like the + instance, this instance does no caching. 8LThis instance performs no caching but is provided to make it easier to test  running a tree using the 9 monad. :LThis instance performs no caching but is provided to make it easier to test ) running a tree using the List monad. ;For this type, <1 creates a branch node with a choice between two  subtrees and +8 signifies failure which results in backtracking up the  tree. =Two &.s are equal if they have the same structure. >The ?" instance functions just like the 0 instance. - !"#$%&' the (pure) tree to be explored the sum over all results ("the (impure) tree to be explored the sum over all results )"the (impure) tree to be explored * the (pure) tree to be explored  the first result found, if any +"the (impure) tree to be explored  the first result found, if any ,Ea function that determines when the desired results have been found  the (pure) tree to be explored ?the result of the exploration, which includes the results that P were found and a flag indicating if they matched the condition  function ->a function that determines when the desired results have been > found; it is assumed that this function is . for / "the (impure) tree to be explored :the result of the exploration, which includes the results M that were found and a flag indicating if they matched the & condition function .the list (or some other @) of results to generate 1a tree that generates the given list of results /*the (inclusive) lower bound of the range *the (inclusive) upper bound of the range a tree (or other 0/) that generates all the results in the range 02the pure tree to transformed into an impure tree the resulting impure tree A1BCD23578:;=> !"#$%&'()*+,-./0&%"#$ !'()*+,-./0 !"#$%&'()*+,-./0A1BCD23578:;=>None 1PA choice at a branch point to take either the left branch or the right branch. 4$This exception is thrown whenever a & is sent down a path which  is incompatible with it. 5GIndicates that a choice step in a path coincided with a cache point in  a tree, or vice versa. 6IIndicates that a path is too long for a given tree --- that is, the walk G hit a leaf (or a null) before the end of the path was reached. 7LA step in a path through a tree, which can either pass through a point with L a cached result or take a choice to go left or right at a branch point. 8Step through a choice point 9Step through a cache point :A sequence of 7s. ;2Returns the opposite of the given branch choice. < Follows a : through a & to a particular subtree; the M main use case of this function is for a processor which has been given a P particular subtree as its workload to zoom in on that subtree. The way this Q function works is as follows: as long as the remaining path is non-empty, it  explores the &6 until it encounters either a cache point or a choice H point; in the former case the path supplies the cached value in the  9B constructor, and in the latter case the path supplies the branch  to take in the 8/ constructor; when the remaining path is empty  then the resulting & is returned. WARNING: This function is not$ valid for all inputs; it makes the  assumption that the given :! has been derived from the given & so N that the path will always encountered choice points exactly when the tree O does and likewise for cache points. Furthermore, the path must not run out K before the tree hits a leaf. If any of these conditions is violated, a  49 exception will be thrown; in fact, you should hope than N exception is thrown because it will let you know that there is a bug your N code as the alternative is that you accidently give it a path that is not P derived from the given tree but which coincidentally matches it which means Q that it will silently return a nonsensical result. Having said all that, you Q should almost never need to worry about this possibility in practice because O there will normally be only one tree in use at a time and all paths in use # will have come from that tree. =Like <, but for impure trees. 123456E789F:;<=G 123456789:;<= 132798:;<=465 132465E798F:;<=GNone >@Information about the parts of a tree that have been explored. CEThis exception is thrown when one attempts to merge checkpoints that O disagree with each other; this will never happen as long as you only merge A checkpoints that came from the same tree, so if you get this A exception then there is almost certainly a bug in your code. EFInformation about both the current checkpoint and the results we have  gathered so far. I3Simplifies the root of the checkpoint by replacing  !Choicepoint Unexplored Unexplored with  Unexplored;  Choicepoint Explored Explored with Explored; and  CachePoint _ Explored with Explored. HThe = instance is designed to take checkpoints from two different E explorations of a given tree and merge them together to obtain a  checkpoint that indicates all) of the areas that have been explored by ; anyone so far. For example, if the two checkpoints are ChoicePoint Explored  Unexplored and 8ChoicePoint Unexplored (ChoicePoint Explored Unexplored)  then the result will be +ChoicePoint Explored (ChoicePoint Explored  Unexplored). WARNING: This  instance is a partial function that expects ( checkpoints that have come from the same tree; if this E precondition is not met then if you are lucky it will notice the Q inconsistency and throw an exception to let you know that something is wrong Q and if you are not then it will silently give you a nonsense result. You are  veryB unlikely to run into this problem unless for some reason you are P juggling multiple trees and have mixed up which checkpoint goes with which, L which is something that is neither done nor encouraged in this package. J An alias for K in a pure setting. KLThe current state of the exploration of a tree starting from a checkpoint. PLike U0, but left branches include the subtree for the M right branch; the right branches do not need this information because we * always explore the left branch first. TLike X3, but each step keeps track of the subtree for the 3 alternative branch in case we backtrack to it. UThe derivative of >$, used to implement the zipper type X. XMA zipper that allows us to zoom in on a particular point in the checkpoint. YConstructs the initial K for the given tree. ZMConstructs a full checkpoint given a (context) checkpoint zipper with a hole E at your current location and the subcheckpoint at your location. [LConstructs a full checkpoint given a (cursor) checkpoint zipper with a hole E at your current location and the subcheckpoint at your location. \DComputes the current checkpoint given the state of an exploration. ]LIncrementally builds up a full checkpoint given a sequence corresponding to H some cursor at a particular location of the full checkpoint and the 1 subcheckpoint to splice in at that location. KThe main reason that you should use this function is that, as it builds up F the full checkpoint, it makes some important simplifications via.  I, such as replacing ChoicePoint Explored Explored  with Explored;, which both shrinks the size of the checkpoint as well as  making it much, easier to determine if it is equivalent to @. ^GConstructs a full checkpoint given the path to where you are currently O searching and the subcheckpoint at your location, assuming that we have no Q knowledge of anything outside our location (which is indicated by marking it  as ?). _GConstructs a full checkpoint given the path to where you are currently 3 located, assuming that the current location is ? and everything = outside of our location has been fully explored already. `Applies I, everywhere in the checkpoint starting from  the bottom up. aLComputes the path to the current location in the checkpoint as given by the Q context. (Note that this is a lossy conversation because the resulting path D does not contain any information about the branches not taken.) bLComputes the path to the current location in the checkpoint as given by the P cursor. (Note that this is a lossy conversation because the resulting path D does not contain any information about the branches not taken.) cJConverts a context step to a path step by throwing away information about ) the alternative branch (if present). dKConverts a cursor differential to a path step by throwing away information / about the alternative branch (if present). eMInverts a checkpoint so that unexplored areas become explored areas and vice J versa. This function satisfies the law that if you sum the result of N exploring the tree with the original checkpoint and the result of summing K the tree with the inverted checkpoint then (assuming the result monoid O commutes) you will get the same result as exploring the entire tree. That  is to say,  2exploreTreeStartingFromCheckpoint checkpoint tree <> EexploreTreeStartingFromCheckpoint (invertCheckpoint checkpoint) tree == exploreTree tree fFGiven the current state of exploration, perform an additional step of Q exploration, returning any solution that was found and the next state of the " exploration --- which will be * if the entire tree has been  explored. gLike f, but for an impure tree. h?Explores the remaining nodes in a pure tree, starting from the C given checkpoint, and sums over all the results in the leaves. iBExplores the remaining nodes in an impure tree, starting from the C given checkpoint, and sums over all the results in the leaves. jCExplores all the remaining nodes in a pure tree, starting from the P given checkpoint, until a result (i.e., a leaf) has been found; if a result 2 has been found then it is returned wrapped in , , otherwise * is  returned. kSame as j, but for an impure tree. lOExplores all the remaining nodes in a tree, starting from the given checkpoint P and summing all results encountered (i.e., in the leaves) until the current I partial sum satisfies the condition provided by the first parameter. See , for more details. mSame as l, but for an impure tree. 7>?@ABCDIEFGHIHJKJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmLMN0>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm0>BA@?EFGHXUWVTPSRQKLMNOJYCDZ[\]^_I`abcdefghijklm&>BA@?CDIEFGHIHJKJKLMNOPSRQTUWVXYZ[\]^_`abcdefghijklmLMN Nonen;The progress type returned by a worker that has finished. oOThe type of the intermediate value being maintained internally by the worker. p5The type of the final result of exploring the tree. qLThe type of progress, which keeps track of how much of the tree has already  been explored. rEThe result type of the tree, i.e. the type of values at the leaves. sDThis class indicates that a monad has information about the current = exploration mode tag type that can be extracted from it. uSame as v1, but pushes each result to the supervisor as it P is found rather than summing them in the worker until they are requested by M the supervisor, which guarantees that the system will recognize when the P condition has been met as soon as final result needed was found but has the M downside that if there are a large number of results needed then sending Q each one could be much more costly then summing them locally and sending the 8 current total on a regular basis to the supervisor. vGExplore the tree, summing the results, until a condition has been met;  Pull means that each worker'*s results will be kept and summed locally P until a request for them has been received from the supervisor, which means N that there might be a period of time where the collectively found results O meet the condition but the system is unaware of this as they are scattered  amongst the workers. INOTE: If you use this mode then you are responsible for ensuring that a N global progress update happens on a regular basis in order to pull Q the results in from the workers and check to see if the condition has L been met; if you do not do this then the run will not terminate 3 until the tree has been fully explored. w@Explore the tree until a result is found, and if so then stop. xCExplore the entire tree and sum the results in all of the leaves. yMA type indicating the mode of the exploration. Note that this is a GADT for M which the type parameter is unique to each constructor in order to allow ; associated types to be specialized based on the value. LUnfortunately Haddock does not seem to support documenting the constructors P of a GADT, so the documentation for each constructor is located at the type : it is tagged with, all of which are defined after the y  type. ~ Extracts the ># component from a progress value. 7The initial progress at the start of the exploration. 0The initial intermediate value for the worker. nopqrstuvwxyz{|}~nopqrstuvwxyz{|}~y}|{zxwvustrqpon~nopqrstuvwxy}|{z~ None#Generate all valid map colorings.  Generate all unique: valid map colorings. That is, exactly one coloring will J be generated from each class of colorings that are equivalent under a  permutation of colors. number of colors number of countries 8whether two countries are adjacent (must be symmetric) a valid coloring number of colors number of countries 8whether two countries are adjacent (must be symmetric) a (unique) valid coloring  None-*The state during the brute-force search. EThe state while the 180-degree rotational symmetry is being broken. IThe state type while the 90-degree rotational symmetry is being broken. Like 8, but also including the same for the reflection of the F position (i.e., one less than the board size minus the position). 1Represents a position and bit at that position. %Type alias for a list of solutions. KType alias for a solution, which takes the form of a list of coordinates.  The possible board symmetries. <the board is symmetric under all rotations and reflections ,the board is symmetric under all rotations 3the board is symmetric under 180 degree rotations $the board has no symmetries at all 6wrapper stub for the finalize value function pointer 1wrapper stub for the pop value function pointer 2wrapper stub for the push value function pointer IC code that performs a brute-force search for the remaining queens. The P last three arguments are allowed to be NULL, in which case they are ignored $ and only the count is returned. AInterface to the main algorithm; note that  and  need to be O M because of an optimization used in the C part of the code. This function Q takes functions for its first two operators that operate on partial solutions L so that the same algorithm can be used both for generating solutions and N counting them; the advantage of this approach is that it is much easier to P find problems in the generated solution than it is in their count, so we can O test it by looking for problems in the generated solutions, and when we are G assured that it works we can trust it to obtain the correct counts.  Break the reflection symmetry. ?Break the 90-degree rotational symmetry at the current layer. @Break the 180-degree rotational symmetry at the current layer. GUsing brute-force to find placements for all of the remaining queens. >Interface for directly using the brute-force search approach LGenerates the solutions to the n-queens problem with the given board size. QGenerates the solution count to the n-queens problem with the given board size. LCalls C code to perform a brute-force search for the remaining queens. The  types  and  must be O* because this function actually optimizes P for the case where only counting is being done by providing null values for ! the function pointer inputs. 4Interface for directly using the C search approach LGenerates the solutions to the n-queens problem with the given board size. QGenerates the solution count to the n-queens problem with the given board size. ?Computes all rotations and reflections of the given solution. /Computes all rotations of the given solution. Converts coordinates of type  to type $. .Extracts the outermost layers of a solution. Get the openings for a queen (Get the symmetric openings for a queen /Checks if a solution has reflection symmetry. 7Checks if a solution has 90-degree rotation symmetry. 8Checks if a solution has 180-degree rotation symmetry. RReturns the number of equivalent solutions for a solution with a given symmetry. CGets all of the equivalent solutions with an equivalent symmetry. IReflects the bits in a number so that each bit at position i is moved to Q position -i (i.e., what you get when you take a bit at position 0 and rotate ! it i positions to the right) $Reflects the columns of a solution (Rotate a solution left by 180 degrees. 'Rotate a solution left by 90 degrees. (Rotate a solution right by 90 degrees. 3Computes the symmetry class of the given solution FPQ  board size number of queens remaining  row number occupied rows occupied columns occupied negative diagonals occupied positive diagonals Ffunction to push a coordinate on the partial solution; may be NULL ^ Cfunction to pop a coordinate from partial solution; may be NULL ^ 0function to finalize a solution; may be NULL ^ Bfunction that adds a list of coordinates to the partial solution Sfunction that finalizes a partial solution with the given board size and symmetry initial partial solution  board size the final result Cfunction that adds a list of coordinates to the partial solutions Dfunction to break the rotational symmetry for the next inner layer Ofunction to break the 180-degree rotational symmetry for the next inner layer (function to apply a brute-force search partial solution  board size the final result Cfunction that adds a list of coordinates to the partial solutions .function that finalizes the partial solution Dfunction to break the rotational symmetry for the next inner layer Ofunction to break the 180-degree rotational symmetry for the next inner layer (function to apply a brute-force search partial solution current state the final result Cfunction that adds a list of coordinates to the partial solutions .function that finalizes the partial solution Ofunction to break the 180-degree rotational symmetry for the next inner layer (function to apply a brute-force search partial solution current state the final result Cfunction that adds a list of coordinates to the partial solutions .function that finalizes the partial solution partial solution  board size current state the final result Cfunction that adds a list of coordinates to the partial solutions .function that finalizes the partial solution initial solution  board size the final result Cfunction that adds a list of coordinates to the partial solutions .function that finalizes the partial solution partial solution  board size window start current state the final result Cfunction that adds a list of coordinates to the partial solutions .function that finalizes the partial solution initial value the board size the final result  board size given solution 5all rotations and reflections of the given solution  board size given solution %all rotations of the given solution  board size #number of outer layers to extract given solution &the outermost layers of the solution  board size occupied positions -open positions and their corresponding bits  board size occupied positions =open positions and their corresponding bits and reflections  board size given solution 4true if the given solution has reflection symmetry  board size given solution <true if the given solution has 90-degree rotation symmetry  board size given solution =true if the given solution has 180-degree rotation symmetry  board size the symmetry of the solution $a solution with the given symmetry 0the equivalent solutions of the given solution  board size given solution )the solution with its columns reflected  board size given solution +the given solution rotated by 180 degrees  board size given solution /the given solution rotated left by 90 degrees  board size given solution 0the given solution rotated right by 90 degrees  board size given solution $the symmetry of the given solution DD) PQ None LThis newtype wrapper is used to provide an ArgVal instance that ensure that ) an input board size is between 1 and . In general you K do not need to use this type directly but instead can use the function  . This constructs a term for the  cmdtheline" command line parser that expects 5 a valid board size (i.e., a number between 1 and ) at # the given positional argument. LA table with the correct number of solutions for board sizes ranging from 1  to . This data was pulled from  )http://queens.inf.tu-dresden.de/?n=f&l=en. The maximum board size in . In a 64-bit environment O this value is equal to the largest board size for which we know the number O of solutions, which is 26. In a 32-bit environment this value is equal to K the largest board size such that the number of solutions fits within a 2 32-bit (unsigned) integer (i.e., the range of $), which is 18. A partial function4 that returns the number of solutions for the given Q input board size; this should only be used when you are sure that the input  is not greater than . 1Generate solutions to the n-queens problem using Rs. JGenerates the solution count to the n-queens problem with the given board O size; you need to sum over all these counts to obtain the total, which is  done by the ' (and related) functions. FGenerate solutions to the n-queens problem using bitwise-operations. JGenerates the solution count to the n-queens problem with the given board O size; you need to sum over all these counts to obtain the total, which is  done by the ' (and related) functions. LGenerates the solutions to the n-queens problem with the given board size. JGenerates the solution count to the n-queens problem with the given board O size; you need to sum over all these counts to obtain the total, which is  done by the ' (and related) functions. Nthe position in the commonand line arguments where this argument is expected ST ST None'Like &, but running in an arbitrary monad. Like  , but running in the IO monad. A &9 augmented with the ability to get the current location > is a monad transformer that allows you to take any MonadPlus O and add to it the ability to tell where you are in the tree created by the  <s. A > is a result tagged with the location of the leaf at which it  was found. A * identifies a location in a tree; unlike : it only N contains information about the list of branches that have been taken, and E not information about the cached values encounted along the way.  The class 9 allows you to get your current location within a tree. FAppend the path indicated by a checkpoint cursor to the given location' s path. <Append the path indicated by a context to the given location' s path. Append a path to a location' s path. 2Converts a location to a list of branch choices. Converts a list (or other @$) of branch choices to a location.  Contructs a < representing the location within the tree indicated by the T.  Contructs a < representing the location within the tree indicated by the :.  Returns the , at the left branch of the given location. BConvenience function takes a branch choice and returns a location F transformer that appends the branch choice to the given location.  Converts a  to a &.  Converts a  to a ".  Returns the - at the right branch of the given location. 'The location at the root of the tree. Runs a  to obtain the nested monad.  Walks down a & to the subtree at the given . This function is  analogous to <, and shares the  same caveats. Like , but for impure trees. Converts a list (or other @) of solutions to a U from  s to results. Explore all the nodes in a % and sum over all the results in the  leaves. Same as , but for an impure tree. Same as /, but the results are discarded so the tree is ( only explored for its side-effects. HExplores all of the nodes of a tree, returning a list of solutions each 4 tagged with the location at which it was found. Like  but for an impure tree. Like /, but for a subtree whose location is given by : the first argument; the solutions are labeled by the absolute location K within the full tree (as opposed to their relative location within the  subtree). Like  but for an impure trees. Explores all the nodes in a # until a result (i.e., a leaf) has J been found; if a result has been found then it is returned wrapped in  , , otherwise * is returned. Like  but for an impure tree. OExplores all the nodes in a tree until a result (i.e., a leaf) has been found; O if a result has been found then it is returned tagged with the location at & which it was found and wrapped in , , otherwise * is returned. Like  but for an impure tree. Like &, but for a subtree whose location is M given by the first argument; the solution (if present) is labeled by the  absolute; location within the full tree (as opposed to its relative " location within the subtree). Like  but for an impure tree. VThe WD instance performs the comparison using the list of branches in the G path defined by the location, which is obtained using the function  . XThe @ instance constructs a location that is the result of appending G the path in the second argument to the path in the first argument. 9YZa path within the subtree the location of the subtree Athe location within the full tree obtained by following the path N to the subtree and then the path indicated by the checkpoint  cursor the path within the subtree the location of the subtree Athe location within the full tree obtained by following the path K to the subtree and then the path indicated by the context a path within the subtree the location of the subtree Athe location within the full tree obtained by following the path 8 to the subtree and then the given path [\]^_`abVX--/YZ[\]^_`abVXNone A > describes a portion of work to be performed by a worker; it  consists of a :5 to the subtree where the workload is located paired  with a >9 that indicates which parts of that subtree have already  been explored. A $ that consists of the entire tree. 6The depth of the workload, equal to the length of the : component. -Explores the nodes in a pure tree given by a  , and sums ( over all the results in the leaves. Same as  but for an impure tree.  -Explores the nodes in a pure tree given by a  until Q a result (i.e. a leaf) has been found; if a result has been found then it is  returned wrapped in , , otherwise * is returned.  Same as   but for an impure tree.  -Explores the nodes in a pure tree given by a  , summing P all results encountered (i.e., in the leaves) until the current partial sum = satisfies the condition provided by the first parameter. See , for more details.  Same as   but for an impure tree. c>Workloads are ordered first by their depth (the length of the : + component), second by the value of the : component itself, and finally  by the value of the >- component. This ordering was chosen because F there are times where it is nice to be able to conveniently order   s by depth.     cd             cdNone MA progress update sent to the supervisor; it has a component which contains N information about how much of the tree has been explored and what results 5 have been found so far, as well as the remaining  to be completed  by this worker. KA stolen workload sent to the supervisor; in addition to a component with  the stolen  itself, it also has a   component, I which is required in order to maintain the invariant that all of the  @s that the supervisor has on file (both assigned to workers and @ unassigned) plus the current progress equals the full tree. (A convenient type alias for the type of   associated with the  given exploration mode. e;Functions for working with a tree of a particular purity. LThe action that a worker can take to push a result to the supervisor; this 3 type is effectively null (with the exact value f) for all modes  except u. (A convenient type alias for the type of  associated % with the given exploration mode. %The reason why a worker terminated. 8worker was aborted by either an external request or the g or h exceptions Hworker failed; included is the message of the failure (this would have  been a value of type  SomeException" if it were not for the fact that N this value will often have to be sent over communication channels and M exceptions cannot be serialized (as they have unknown type), meaning 0 that it usually has to be turned into a i via j anyway) Hworker completed normally without error; included is the final result (A convenient type alias for the type of  associated with ! the given exploration mode. &The environment of a running worker. the initial path of the worker' s workload  $the thread id of the worker thread !"the request queue for the worker "3an IVar that is filled when the worker terminates #(A convenient type alias for the type of $ associated with ! the given exploration mode. $A queue of worker requests. INOTE: Although the type is a list, and requests are added by prepending O them to the list, it still acts as a queue because the worker will reverse - the list before processing the requests. kA worker request. lGRequest that the worker respond with a stolen workload (if possible). m9Request that the worker respond with a progress update. n Request that the worker abort. %(A convenient type alias for the type of  associated with the  the given exploration mode. oThe p< instance lets you manipulate the final progress value when  the termination reason is . &The &0 function is the workhorse of the parallization N infrastructure; it explores a tree in a separate thread while polling for O requests. Specifically, the worker alternates between stepping through the I tree and checking to see if there are any new requests in the queue. MThe worker is optimized around the observation that the vast majority of its P time is spent exploring the tree rather than responding to requests, and so P the amount of overhead needed to check if any requests are present needs to L be minimized at the cost of possibly delaying a response to an incoming ) request. For this reason, it uses an q for the queue to minimize the ) cost of peeking at it rather than an MVar or some other thread Q synchronization variable; the trade-off is that if a request is added to the P queue by a different processor then it might not be noticed immediately the L caches get synchronized. Likewise, the request queue uses the List type  rather than something like  Data.Sequence# for simplicity; the vast majority I of the time the worker will encounter an empty list, and on the rare E occasion when the list is non-empty it will be short enough that  r)ing it will not pose a significant cost. FAt any given point in the exploration, there is an initial path which P locates the subtree that was given as the original workload, a cursor which  indicates the subtree within this subtree that makes up the current J workload, and the context which indicates the current location in the Q subtree that is being explored. All workers start with an empty cursor; when P a workload is stolen, decisions made early on in the the context are frozen L and moved into the cursor because if they were not then when the worker Q backtracked it would explore a workload that it just gave away, resulting in ' some results being observed twice. KThe worker terminates either if it finishes exploring all the nodes in its L (current) workload, if an error occurs, or if it is aborted either via.  the g and h# exceptions or by an abort request ! placed in the request queue. 'Sends a request to abort. (FSends a request for a progress update along with a response action to 3 perform when the progress update is available. )DSends a request to steal a workload along with a response action to 3 perform when the progress update is available. sSends a request to a worker. *LExplores a tree with the specified purity using the given mode by forking a P worker thread and waiting for it to finish; it exists to facilitate testing N and benchmarking and is not a function that you are likely to ever have a  need for yourself. 1 teuvwx !"#$klmn%oyz&!the mode in to explore the tree the purity of the tree 2the action to run when the worker has terminated  the tree the workload for the worker Ethe action to push a result to the supervisor; this should be equal  to f% except when the exploration mode is u.  the environment for the worker '(the request queue 4the action to perform when the update is available )the request queue 4the action to perform when the update is available s*{|}~  !"#$%&'()* %$# !"&'()* teuvwx !"#$knml%oyz&'()s*{|}~None+KA message from a worker to the supervisor; the worker id is assumed to be 8 known based on from where the message was received. ,;The worker has quit the system and is no longer available -^The worker has responded to the workload steal request with possibly the stolen workload (and *< if it was not possible to steal a workload at this time). .YThe worker has responded to the progress update request with the given progress update. /8The worker has finished with the given final progress. 0SThe worker encountered a failure with the given message while exploring the tree. 1+A message from the supervisor to a worker. HNOTE: It is your responsibility not to send a workload to a worker that O already has one; if you do then the worker will report an error and N then terminate. The converse, however, is not true: it is okay to M send a progress request to a worker without a workload because the P worker might have finished between when you sent the message and when  it was received. 2-stop what you are doing and quit the system 3$start exploring the given workload 4request a stolen workload 5request a progress update 6HThis data structure contains callbacks to be invoked when a message has 5 been received, depending on the kind of message. 8Eto be called when a progress update has been received from a worker 9Pto be called when a (possibly) stolen workload has been received from a worker :Vto be called when a failure (with the given message) has been received from a worker ;Gto be called when a worker has finished with the given final progress <Kto be called when a worker has quit the system and is no longer available =Convenient type alias for the +' type for the given exploration mode. >IContinually performs the given IO action to read a message from a worker L with the given id and calls one of the given callbacks depending on the  content of the message. ? The same as > except that instead of < giving it an IO action to fetch a message you provide a  from which 7 messsages (assumed to be deserializable) are read. +,-./0123456789:;<=>:the callbacks to invoke when a message has been received )an action that fetches the next message =the id of the worker from which messages are being received san IO action that continually processes incoming messages from a worker until it quits, at which point it returns ?:the callbacks to invoke when a message has been received /the handle from which messages should be read =the id of the worker from which messages are being received san IO action that continually processes incoming messages from a worker until it quits, at which point it returns +,-./0123456789:;<=>?+0/.-,=6789:;<15432>?+0/.-,154326789:;<=>?None-@MStatistics for a value obtained by integrating a value that is a function of N time --- i.e., a quantity that holds a single value at any given point in  time. B4the number of points at which the function changed C8the average value of the function over the time period D=the standard deviation of the function over the time period E8the minimum value of the function over the time period F8the maximum value of the function over the time period GUStatistics for a value obtained by collecting a number of independent measurements. Ithe number of measurements Jthe average value Kthe standard deviation Lthe minimum measurement value Mthe maximum measurement value N$Statistics gathered about the run. Pthe start time of the run Qthe end time of the run Rthe wall time of the run SAthe fraction of the time the supervisor spent processing events TQthe fraction of the time the supervisor spent processing events while inside the SupervisorMonad U)the number of calls made to functions in ,LogicGrowsOnTrees.Parallel.Common.Supervisor V9the average amount of time per call made to functions in ,LogicGrowsOnTrees.Parallel.Common.Supervisor W;the fraction of the total time that workers were occupied XBstatistics for how long it took for workers to obtain a workload YBstatistics for the time needed to steal a workload from a worker Z=statistics for the number of workers waiting for a workload [Gstatistics for the number of available workloads waiting for a worker \ostatistics for the instantaneous rate at which workloads were requested (using an exponentially decaying sum) ]|statistics for the instantaneous time needed for workloads to be stolen (using an exponentially decaying weighted average) ^ESupervisor callbacks provide the means by which the supervisor logic N communicates to the adapter, usually in order to tell it what it wants to  say to various workers. `5send a progress update request to the given workers a4send a workload steal request to the given workers bWreceive the result of the global progress update that was requested by the controller c-send the given workload to the given worker dThis is just a sum of f and the e. eLThis is the constraint placed on the types that can be used as worker ids. fPThis is the constraint placed on the monad in which the supervisor is running. g A convenient type alias for the h, associated with a given exploration mode. h(The outcome of running the supervisor. j&the reason the supervisor terminated kthe statistics for the run l0the workers that were present when it finished m A convenient type alias for the n, associated with a given exploration mode. n+The reason why the supervisor terminated. othe supervisor failed to explore the tree; included is the worker where the failure occured as well as the message and the current progress at the time of failure pLthe supervisor completed exploring the tree; included is the final result qcthe supervisor aborted before finishing; included is the current progress at the time it aborted @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeL@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq  012:;=>?ABCFGJMNP@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnqpo      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeNone rA r6 is a specification of an event loop to be run inside  the v4; it exists in order to help the supervisor get an O estimate for how much time it is spending doing work as opposed to waiting L for a message from a worker so that it can generate accurate statistics F about how much of the time it was occupied at the end of the run. sAn s/ is an event loop that you implement manually; = note that it must run forever until the logic in the v Q decides to exit --- although you can always force it to abort by calling  7. This mode exists for testing rather than to be used P by an adapter, but if you do use it then you take on responsibility for  calling  and  when M respectively the supervisor has begun and ended processing events so ? that the supervisor occupation statistics are correct. tA t0 has an event loop that executes an action that K checks whether an event has occurred and if so then reacts to that P event. The first argument is the supervisor action that initializes the N system, the second argument is an action that checks whether an event P has occurred, and the third argument is the supervisor action to run in  response to an event. uA u0 has an event loop that executes an action that O pauses the thread until an event occurs and then reacts to that event. Q The first argument is the supervisor action that initializes the system, H the second argument is an action that blocks until an event has L occurred, and the third argument is the supervisor action to run in  response to the event. vKThis is the monad in which the supervisor logic is run; it keeps track of O the state of the system including the current workers and their workloads, K the current progress of the system, which workers we are waiting for a 2 progress update or stolen workload from, etc. wHInforms the supervisor that a worker has been added to the system; the I supervisor will attempt to obtain a workload for it, stealing one if  necessary. xIRequest that a global progress update be performed; the supervisor will M send progress update requests to all workers, and when it has received a , response from everyone it will call the b callback in  the ^. yNInforms the supervisor that a progress update has been received by a worker. zGInforms the supervisor that a worker has responded to a workload steal  request; a *8 indicates that the worker did not have a workload that , could be stolen (which occurs if it hadn'!t taken any branches at the time  the request was received). {EInforms the supervisor that a worker has failed; the system will be F terminated and the given message returned as the failure message. |KInforms the supervisor that a worker has finished its current workload and ' returned the given final progress. }KInforms the supervisor that a worker has finished its current workload and L returned the given final progress; the worker will be removed after its ' final progress has been processed. ~KInforms the supervisor that a worker has finished its current workload and A returned the given final progress; if the first argument is - then the  worker will be removed. GInforms the supervisor that a worker (which might have been active and 5 possibly even waited on for a progress update and/or stolen workload) has J been removed; the worker will be removed from the set of workers with P pending requests and its workload will be returned to the pool of available  workloads. Like +, but only acts if the worker is present. Aborts the supervisor. <Signals that the supervisor has begun processing an event. f0Changes the occupied status of the supervisor. ?Signals that the supervisor has finished processing an event. MSets the workload buffer size, which is the minimum number of workloads that P the supervisor will attempt to have available at all times so that requests D for new workloads from workers can be responded to immediately. LNormally the default value of 4 will be fine, but if you run into a problem L where the amount of time needed to steal a workload is greater than the M average time between requests for new workloads, then setting this to be L proportional to the time needed to steal a workload divided by the time ( between workload requests may help. *Gets the current progress of the system. =Gets the current statistics of the system. (Unlike the other "get" P operations, there is a small but non-zero cost to do this as the statistics @ exist in an intermediate state that needs to be finalized.) FGets the number of workers that are currently present in the system. MIf there exists any workers waiting for a workload, it returns the id of one  of them wrapped in ,; it not, it returns *. (This is useful, N for example, if you want to reduce the number of workers as it is best to 5 start by removing ones that are currently idle.) ,Turns off debug mode; for more details see . +Turns on debug mode; for more details see . JSets whether the supervisor is in debug mode; when it is in this mode it L performs continuous self-consistency checks. This mode is intended for ) assisting in debugging new adapters. KRuns the supervisor in the given exploration mode with the given callbacks  and program. Like ( but starting from the given progress. g;Converts a supervisor program into an infinite loop in the v. -Runs the supervisor with a raw action in the v. MNOTE: You should not normally use this function, as it exists primarily for " testing purposes; see r for details. Like ( but starting from the given progress. *hirstuvjklwxyz{|}~fgmnopqP@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~P@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]dfe^_`abcvhijklgrutsnqpomwxyz{|}~$hirutsvjklwxyz{|}~fgmnopqNone>A basic supervisor request queue monad, which has an implicit  A object that it uses to communicate with the supervisor loop. #A basic supervisor request queue. )the queue of requests to the supervisor Ka list of callbacks to invoke when a global progress update has completed "a list of the controller threads A supervisor request. LThis class provides the set of supervisor requests common to all adapters. Abort the supervisor. vFork a new thread running in this monad; all controller threads are automnatically killed when the run is finished. PRequest the current progress, invoking the given callback with the result; see  for the synchronous version. QRequest the number of workers, invoking the given callback with the result; see  for the synchronous version. fRequest that a global progress update be performed, invoking the given callback with the result; see  for the synchronous version. ASets the size of the workload buffer; for more information, see  (which links to the ,LogicGrowsOnTrees.Parallel.Common.Supervisor module). Like ), but blocks until the result is ready. Like ), but blocks until the result is ready. Like 7, but blocks until the progress update has completed. EGeneral utility function for converting an asynchronous request to a % synchronous request; it uses an MVar' to hold the result of the request and  blocks until the MVar has been filled. Adds a callback to the given N that will be invoked when the current global progress update has completed. 5Enqueues a supervisor request into the given queue. Like 6, but does not return until the request has been run Constructs a new . "Attempt to pop a request from the . +Processes all of the requests in the given , and returns when  the queue has been emptied. ]Invokes all of the callbacks with the given progress and then clears the list of callbacks. [Creates a supervisor program that loops forever processing requests from the given queue. Forks a controller thread; it's r" is added the list in the request - queue. We deliberately do not return the r from this function ! because you must always call  to kill the controller F thread as this makes sure that all child threads also get killed. 5Kill all the controller threads and their children.  Submits a ; to the supervisor and invokes the given callback with the < result when it is available. (This function is used by   and .) 7initialization code to run before the loop is started the request queue the request queue the controller thread sthe request queue tustuNone0(A convenient type alias for the type of . associated with the given exploration mode. 9A type that represents the reason why a run terminated. =the run failed with the given progress for the given reason /the run completed with the given final result -the run was aborted with the given progress (A convenient type alias for the type of . associated with the given exploration mode. .A type that represents the outcome of a run. qstatistics gathered during the run, useful if the system is not scaling with the number of workers as it should #the reason why the run terminated The 5 type specifies the information that is given to the " driver in the main functions. Hconfiguration information shared between the supervisor and the worker 6configuration information specific to the supervisor Xprogram information; should at a minimum put a brief description of the program in the v field Baction that initializes the global state of each process --- that H is, once for each running instance of the executable, which N depending on the adapter might be a supervisor, a worker, or both yin the supervisor, gets the starting progress for the exploration; this is where a checkpoint is loaded, if one exists ;in the supervisor, responds to the termination of the run @constructs the exploration mode given the shared configuration 4constructs the tree given the shared configuration $the purity of the constructed tree gconstruct the controller, which runs in the supervisor and handles things like periodic checkpointing The ? is the core type that abstracts the various adapters behind a O common interface that can be invoked by the main functions; it specifies a P function that is called to start the run with a set of parameters specified  in . L(Unfortunately in haddock the type signature below can be difficult to read N because it puts all of the type on a single line; the type is essentially  just a map from  to result_monad (), but involving a P bunch of type variables and some constraints on them. It might be easier to ) click the link to go to the source.) Note that the controller_monad) type parameter is within an existential Q type; this is because the user of the driver should not need to know what it  is. KExplore the given pure tree in parallel; the results in the leaves will be  summed up using the  instance. IExplore the given IO tree in parallel; the results in the leaves will be  summed up using the  instance. LExplore the given impure tree in parallel; the results in all of the leaves  will be summed up using the  instance. KExplore the given pure tree in parallel, stopping if a solution is found. IExplore the given IO tree in parallel, stopping if a solution is found. MExplore the given impure tree in parallel, stopping if a solution is found. KExplore the given pure tree in parallel until the sum of results meets the  given condition. IExplore the given IO tree in parallel until the sum of results meets the  given condition. MExplore the given impure tree in parallel until the sum of results meets the  given condition. KExplore the given pure tree in parallel until the sum of results meets the  given condition. IExplore the given IO tree in parallel until the sum of results meets the  given condition. MExplore the given impure tree in parallel until the sum of results meets the  given condition. MThis is just like the previous functions, except that it is generalized over H all tree purities and exploration modes. (In fact, the specialized 7 functions are just wrappers around this function.) 5Explore the given pure tree in parallel; the results . in the leaves will be summed up using the  instance. 'Explore the given IO tree in parallel; : the results in the leaves will be summed up using the  instance. /Explore the given impure tree in parallel; the = results in all of the leaves will be summed up using the  instance. KExplore the given pure tree in parallel, stopping if a solution is found. LExplore the given tree in parallel in IO, stopping if a solution is found. MExplore the given impure tree in parallel, stopping if a solution is found. KExplore the given pure tree in parallel until the sum of results meets the  given condition. IExplore the given IO tree in parallel until the sum of results meets the  given condition. MExplore the given impure tree in parallel until the sum of results meets the  given condition. KExplore the given pure tree in parallel until the sum of results meets the  given condition. IExplore the given IO tree in parallel until the sum of results meets the  given condition. MExplore the given impure tree in parallel until the sum of results meets the  given condition.  Converts a h to a . GParse the command line options using the given term and term info (the Q latter of which has the program name added to it); if successful return the * result, otherwise throw an exception. bwxyz{|}~\the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information a function that runs an m action in the  monad \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information a function that runs an m action in the  monad \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information Wa condition function that signals when we have found all of the result that we wanted \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information Wa condition function that signals when we have found all of the result that we wanted \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information Wa condition function that signals when we have found all of the result that we wanted a function that runs an m action in the  monad \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information Wa condition function that signals when we have found all of the result that we wanted \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information Wa condition function that signals when we have found all of the result that we wanted \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information Wa condition function that signals when we have found all of the result that we wanted a function that runs an m action in the  monad \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information ?a function that constructs the exploration mode given the tree P configuration; note that the constructor that this function returns M is restricted by the value of the exploration_mode type variable the purity of the tree \the driver for the desired adapter (note that all drivers can be specialized to this type) Ha term with any configuration information needed to construct the tree Iinformation about the program; should look something like the following: U defTI { termDoc = "count the number of n-queens solutions for a given board size" } Da callback that will be invoked with the outcome of the run and the E tree configuration information; note that if the run was  O then the checkpoint file will be deleted if this function finishes  successfully Pthe function that constructs the tree given the tree configuration information \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the tree to explore \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the tree to explore in IO a function that runs an m action in the  monad \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the (impure) tree to explore \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the tree to explore \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the tree to explore in IO a function that runs an m action in the  monad \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the impure tree to explore Wa condition function that signals when we have found all of the result that we wanted \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the tree to explore Wa condition function that signals when we have found all of the result that we wanted \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the tree to explore in IO Wa condition function that signals when we have found all of the result that we wanted a function that runs an m action in the  monad \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the impure tree to explore Wa condition function that signals when we have found all of the result that we wanted \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the tree to explore Wa condition function that signals when we have found all of the result that we wanted \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the tree to explore in IO Wa condition function that signals when we have found all of the result that we wanted a function that runs an m action in the  monad \the driver for the desired adapter (note that all drivers can be specialized to this type) Ba callback that will be invoked with the outcome of the run; note  that if the run was " then the checkpoint file will be ; deleted if this function finishes successfully the impure tree to explore CNOPQRSTUVWXYZ[\]CNOPQRSTUVWXYZ[\]8wxyz{|}~  NoneCA set of callbacks invoked by the supervisor code in this module. #create a worker with the given id =destroy the worker with the given id; ideally this should be P implemented by signaling the worker to quit and then waiting for an  acknowledgement >destroy all of the workers in the given list in a manner that P ensures they all terminate promptly; this will be called at the end + of the run (successful or not) 4send a progress update request to the given worker 3send a workload steal request to the given worker %send a workload to the given worker >This is the monad in which the adapter specific code is run. 9The type of worker ids used by this module (an alias for ). A  is a  but with the F additional ability to change the number of workers in the system. IChange the number of workers; the first argument is a map that computes K the new number of workers given the old number of workers, and the O second argument is a callback that will be invoked with the new number  of workers. See . for the synchronous version of this request. HIf you just want to set the number of workers to some fixed value, then  see  / . ?This is the monad in which the workgroup controller will run. Like ,, but it blocks until the number of workers < has been changed and returns the new number of workers. uRequest that the number of workers be set to the given amount, invoking the given callback when this has been done. Like M, but blocks until the number of workers has been set to the desired value. IExplores a tree using a workgroup; this function is only intended to be K used by adapters where the number of workers can be changed on demand. *-the mode in which we are exploring the tree 7the initial adapter specific state of the inner monad @a function that constructs a set of callbacks to be used by the L supervisor loop in this function to do things like creating and P destroying workers; it is given a set of callbacks that allows the I adapter specific code to signal conditions to the supervisor )the initial progress of the exploration rthe controller, which is at the very least responsible for deciding how many workers should be initially created 6789:;<6789:;<None<This is the monad in which the thread controller will run. FThis is the driver for the threads adapter. The number of workers is 6 specified via. the (required) command-line option -n;  I is called exactly once to make sure that there is an equal number of  capabilities. MChanges the number of a parallel workers to equal the number of capabilities  as reported by . 1Explore the pure tree and sum over all results. Like  but with a starting progress. Like # but with the tree running in IO. Like  but with a starting progress. Like " but with a generic impure tree. Like !, but with a starting progress. 6Explore the pure tree until a result has been found. Like  but with a starting progress. Like # but with the tree running in IO. Like  but with a starting progress. Like " but with a generic impure tree. Like !, but with a starting progress. BExplore the pure tree until the sum of resuts meets a condition. Like  but with a starting progress. Like # but with the tree running in IO. Like  but with a starting progress. Like " but with a generic impure tree. Like  but with a starting progress. BExplore the pure tree until the sum of resuts meets a condition.  Like , but with a starting result.  Like # but with the tree running in IO.  Like  , but with a starting result.  Like " but with a generic impure tree.  Like  !, but with a starting progress. GExplores the given tree using multiple threads to achieve parallelism. IThis function grants access to all of the functionality of this adapter, P but because its generality complicates its use (primarily the fact that the N types are dependent on the first parameter) you may find it easier to use ? one of the specialized functions in the preceding section. zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (pure) tree the outcome of the run the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (pure) tree the outcome of the run zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number 'the tree (which runs in the IO monad) the outcome of the run the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number 'the tree (which runs in the IO monad) the outcome of the run a function that runs the tree's monad in IO zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (impure) tree the outcome of the run a function that runs the tree's monad in IO the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (impure) tree zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (pure) tree the outcome of the run the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (pure) tree the outcome of the run zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number 'the tree (which runs in the IO monad) the outcome of the run the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number 'the tree (which runs in the IO monad) the outcome of the run a function that runs the tree's monad in IO zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (impure) tree the outcome of the run a function that runs the tree's monad in IO the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (impure) tree the outcome of the run Wa condition function that signals when we have found all of the result that we wanted zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (pure) tree the outcome of the run Wa condition function that signals when we have found all of the result that we wanted the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (pure) tree the outcome of the run Wa condition function that signals when we have found all of the result that we wanted zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number 'the tree (which runs in the IO monad) the outcome of the run Wa condition function that signals when we have found all of the result that we wanted the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number 'the tree (which runs in the IO monad) the outcome of the run Wa condition function that signals when we have found all of the result that we wanted a function that runs the tree's monad in IO zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (impure) tree the outcome of the run Wa condition function that signals when we have found all of the result that we wanted a function that runs the tree's monad in IO the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (impure) tree the outcome of the run Wa condition function that signals when we have found all of the result that we wanted zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (pure) tree the outcome of the run  Wa condition function that signals when we have found all of the result that we wanted the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (pure) tree the outcome of the run  Wa condition function that signals when we have found all of the result that we wanted zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number 'the tree (which runs in the IO monad) the outcome of the run  Wa condition function that signals when we have found all of the result that we wanted the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number 'the tree (which runs in the IO monad) the outcome of the run  Wa condition function that signals when we have found all of the result that we wanted a function that runs the tree's monad in IO zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (impure) tree the outcome of the run  Wa condition function that signals when we have found all of the result that we wanted a function that runs the tree's monad in IO the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number the (impure) tree the outcome of the run the exploration mode the purity of the tree the starting progress zthe controller loop, which at the very least must start by increasing the number of workers from 0 to the desired number  the tree the outcome of the run ANOPQRSTUVWXYZ[\]     ANOPQRSTUVWXYZ[\]          NoneERuns a loop that continually fetches and reacts to messages from the ' supervisor until the worker quits.  The same as 4, but it lets you provide handles through which the K messages will be sent and received. (Note that the reading and writing  handles might be the same.) !the mode in to explore the tree the purity of the tree  the tree +the action used to fetch the next message xthe action to send a message to the supervisor; note that this might occur in a different thread from the worker loop !the mode in to explore the tree the purity of the tree  the tree 9handle from which messages from the supervisor are read 8handle to which messages to the supervisor are written NoneKDatatype representing the arity and depth of a tree, used for command line  argument processing (see ). (Newtype wrapper for arities that has an ' instance that enforces that  the arity be at least 2. JConstructs a configuration term that expects the arity and depth to be at / the given command line argument positions. ;A convenience function used when you have an value of type  for the 2 arity of the tree rather than a value of type $ and want to construct  a value of type . PGenerate a perfectly balanced tree with the given leaf value, arity, and leaf. Like  but with  WordSum 1 at the leaves. MComputes the number of leaves in a perfect tree. It returns a value of type  $* so that it can be easily compared to the   value returned by O the tree generators, but a consequence of this is that it will overflow if  the arity and/"or depth arguments are too large. 9the position of the arity parameter in the command line 9the position of the depth parameter in the command line "the value to place at the leaves Hthe arity of the tree (i.e., number of branches at each internal node) the depth of the tree Hthe arity of the tree (i.e., number of branches at each internal node) the depth of the tree Hthe arity of the tree (i.e., number of branches at each internal node) the depth of the tree     !"##$%%&'()*+,-./01234567789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWWXXYZ[\]]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                         !"#$%&'()*+,-./01234566789:;<=>??@ABCDEEFGHIJKKLMNOPQRSTUVWXYZZ[\]^_`abccdefghijklmnopqrstuvwxyz{|}~~;<>?         ! "#  $  %  &  ' "()*+,-.  /012345 "678 9: ;<=>?@ABCDEFGHIJ KL  MNO  PMQR S TU V  W X Y Z [ \ ] ^ _`abcde fg fh ij klmnopq ir st uvwxbyz{|}~ }     {q !"#$%&'()*+,-./0r1stx23yz456~789:;<=>?@ABCDEFGHIJKLMNOpP}QRSTU VWXYZ[\]]^_``abcddefghijklmnoppqrrstuv  wxyz{|}~ V V}}LogicGrowsOnTrees-1.0.0LogicGrowsOnTrees.Utils.IntSumLogicGrowsOnTrees.Utils.Handle!LogicGrowsOnTrees.Parallel.PurityLogicGrowsOnTrees.Utils.WordSumLogicGrowsOnTrees.Utils.Word_LogicGrowsOnTreesLogicGrowsOnTrees.PathLogicGrowsOnTrees.Checkpoint*LogicGrowsOnTrees.Parallel.ExplorationMode&LogicGrowsOnTrees.Examples.MapColoring*LogicGrowsOnTrees.Examples.Queens.Advanced!LogicGrowsOnTrees.Examples.QueensLogicGrowsOnTrees.LocationLogicGrowsOnTrees.Workload(LogicGrowsOnTrees.Parallel.Common.Worker)LogicGrowsOnTrees.Parallel.Common.Message,LogicGrowsOnTrees.Parallel.Common.Supervisor.LogicGrowsOnTrees.Parallel.Common.RequestQueueLogicGrowsOnTrees.Parallel.Main+LogicGrowsOnTrees.Parallel.Common.Workgroup*LogicGrowsOnTrees.Parallel.Adapter.Threads)LogicGrowsOnTrees.Parallel.Common.Process#LogicGrowsOnTrees.Utils.PerfectTree;LogicGrowsOnTrees.Parallel.Common.Supervisor.ImplementationIntSum getIntSumConnectionLostfilterEOFExceptionsreceivesendPurity ImpureAtopIOPure io_purityWordSum getWordSumWord_getWordTreeInstructionTreeTInstructionProcessPendingRequestsNullChoiceCacheMonadExplorableTrans NestedMonad runAndCacherunAndCacheGuardrunAndCacheMaybeMonadExplorablecache cacheGuard cacheMaybeprocessPendingRequestsTreeT unwrapTreeTTreeIOTree exploreTree exploreTreeTexploreTreeTAndIgnoreResultsexploreTreeUntilFirstexploreTreeTUntilFirstexploreTreeUntilFoundexploreTreeTUntilFoundallFrombetween endowTree BranchChoice RightBranch LeftBranch WalkError%PastTreeIsInconsistentWithPresentTreeTreeEndedBeforeEndOfWalkStep ChoiceStep CacheStepPathoppositeBranchChoiceOfsendTreeDownPathsendTreeTDownPath Checkpoint UnexploredExplored ChoicePoint CachePointInconsistentCheckpointsProgressprogressCheckpointprogressResultsimplifyCheckpointRootExplorationStateExplorationTStateexplorationStateContextexplorationStateCheckpointexplorationStateTree ContextStepRightBranchContextStepLeftBranchContextStepCacheContextStepContextCheckpointDifferential ChoicePointD CachePointDCheckpointCursorinitialExplorationStatecheckpointFromContextcheckpointFromCursorcheckpointFromExplorationStatecheckpointFromSequencecheckpointFromInitialPathcheckpointFromUnexploredPathsimplifyCheckpointpathFromContextpathFromCursorpathStepFromContextSteppathStepFromCursorDifferentialinvertCheckpoint%stepThroughTreeStartingFromCheckpoint&stepThroughTreeTStartingFromCheckpoint!exploreTreeStartingFromCheckpoint"exploreTreeTStartingFromCheckpoint+exploreTreeUntilFirstStartingFromCheckpoint,exploreTreeTUntilFirstStartingFromCheckpoint+exploreTreeUntilFoundStartingFromCheckpoint,exploreTreeTUntilFoundStartingFromCheckpointWorkerFinishedProgressForWorkerIntermediateValueForFinalResultFor ProgressFor ResultForHasExplorationModeExplorationModeForFoundModeUsingPushFoundModeUsingPull FirstModeAllModeExplorationMode"checkpointFromIntermediateProgressinitialProgressinitialWorkerIntermediateValuecoloringSolutionscoloringUniqueSolutionsNQueensSearchStates_number_of_queens_remainings_rows_occupied_rowss_occupied_columnss_occupied_negative_diagonalss_occupied_positive_diagonalsNQueensBreak180Stateb180_number_of_queens_remainingb180_window_startb180_window_sizeb180_occupied_rowsb180_occupied_columns b180_occupied_negative_diagonals b180_occupied_positive_diagonals&b180_occupied_right_positive_diagonalsNQueensBreak90Stateb90_number_of_queens_remainingb90_window_startb90_window_sizeb90_occupied_rows_and_columnsb90_occupied_negative_diagonalsb90_occupied_positive_diagonalsPositionAndBitWithReflectionPositionAndBitNQueensSolutionsNQueensSolutionNQueensSymmetry AllSymmetries AllRotations Rotate180Only NoSymmetriesmkFinalizeValue mkPopValue mkPushValue*c_LogicGrowsOnTrees_Queens_count_solutionsnqueensGeneric nqueensStartnqueensBreak90nqueensBreak180 nqueensSearchnqueensBruteForceGenericnqueensBruteForceSolutionsnqueensBruteForceCountnqueensCSearchnqueensCGenericnqueensCSolutions nqueensCCountallRotationsAndReflectionsOfallRotationsOfconvertSolutionToWordextractExteriorFromSolution getOpeningsgetSymmetricOpeningshasReflectionSymmetryhasRotate90SymmetryhasRotate180SymmetrymultiplicityForSymmetrymultiplySolution reflectBitsreflectSolution rotate180 rotateLeft rotateRight symmetryOf BoardSize getBoardSizemakeBoardSizeTermAtPositionnqueens_correct_countsnqueens_maximum_sizenqueensCorrectCountnqueensUsingSetsSolutionsnqueensUsingSetsCountnqueensUsingBitsSolutionsnqueensUsingBitsCountnqueensSolutions nqueensCountLocatableTreeTunwrapLocatableTreeTLocatableTreeIO LocatableTree LocatableTunwrapLocatableTSolutionsolutionLocationsolutionResultLocationMonadLocatable getLocationapplyCheckpointCursorToLocationapplyContextToLocationapplyPathToLocationbranchingFromLocationlabelFromBranchinglabelFromContext labelFromPath leftBranchOf"locationTransformerForBranchChoicenormalizeLocatableTreenormalizeLocatableTreeT rightBranchOf rootLocation runLocatableTsendTreeDownLocationsendTreeTDownLocationsolutionsToMapexploreLocatableTreeexploreLocatableTreeT%exploreLocatableTreeTAndIgnoreResultsexploreTreeWithLocationsexploreTreeTWithLocations"exploreTreeWithLocationsStartingAt#exploreTreeTWithLocationsStartingAtexploreLocatableTreeUntilFirstexploreLocatableTreeUntilFirstT!exploreTreeUntilFirstWithLocation"exploreTreeTUntilFirstWithLocation+exploreTreeUntilFirstWithLocationStartingAt,exploreTreeTUntilFirstWithLocationStartingAtWorkload workloadPathworkloadCheckpointentire_workload workloadDepthexploreTreeWithinWorkloadexploreTreeTWithinWorkload#exploreTreeUntilFirstWithinWorkload$exploreTreeTUntilFirstWithinWorkload#exploreTreeUntilFoundWithinWorkload$exploreTreeTUntilFoundWithinWorkloadProgressUpdateprogressUpdateProgressprogressUpdateRemainingWorkloadStolenWorkloadstolenWorkloadProgressUpdatestolenWorkloadProgressUpdateForWorkerPushActionForWorkerTerminationReasonForWorkerTerminationReason WorkerAborted WorkerFailedWorkerFinishedWorkerEnvironmentForWorkerEnvironmentworkerInitialPathworkerThreadIdworkerPendingRequestsworkerTerminationFlagWorkerRequestQueueForWorkerRequestQueueStolenWorkloadForforkWorkerThreadsendAbortRequestsendProgressUpdateRequestsendWorkloadStealRequestexploreTreeGenericMessageForSupervisor WorkerQuitFinishedFailedMessageForWorker QuitWorker StartWorkloadRequestWorkloadStealRequestProgressUpdateMessageForSupervisorReceiversreceiveProgressUpdateFromWorkerreceiveStolenWorkloadFromWorkerreceiveFailureFromWorkerreceiveFinishedFromWorkerreceiveQuitFromWorkerMessageForSupervisorFor#receiveAndProcessMessagesFromWorker.receiveAndProcessMessagesFromWorkerUsingHandleFunctionOfTimeStatistics timeCount timeAverage timeStdDevtimeMintimeMax!IndependentMeasurementsStatistics statCount statAverage statStdDevstatMinstatMax RunStatistics runStartTime runEndTime runWallTimerunSupervisorOccupationrunSupervisorMonadOccupationrunNumberOfCallsrunAverageTimePerCallrunWorkerOccupationrunWorkerWaitTimesrunStealWaitTimesrunWaitingWorkerStatisticsrunAvailableWorkloadStatistics-runInstantaneousWorkloadRequestRateStatistics+runInstantaneousWorkloadStealTimeStatisticsSupervisorCallbacks broadcastProgressUpdateToWorkersbroadcastWorkloadStealToWorkersreceiveCurrentProgresssendWorkloadToWorkerSupervisorFullConstraintSupervisorWorkerIdConstraintSupervisorMonadConstraintSupervisorOutcomeForSupervisorOutcomesupervisorTerminationReasonsupervisorRunStatisticssupervisorRemainingWorkersSupervisorTerminationReasonForSupervisorTerminationReasonSupervisorFailureSupervisorCompletedSupervisorAbortedSupervisorProgramUnrestrictedProgramPollingProgramBlockingProgramSupervisorMonad addWorkerperformGlobalProgressUpdatereceiveProgressUpdatereceiveStolenWorkloadreceiveWorkerFailurereceiveWorkerFinishedreceiveWorkerFinishedAndRemoved$receiveWorkerFinishedWithRemovalFlag removeWorkerremoveWorkerIfPresentabortSupervisorbeginSupervisorOccupiedendSupervisorOccupiedsetWorkloadBufferSizegetCurrentProgressgetCurrentStatisticsgetNumberOfWorkerstryGetWaitingWorkerdisableSupervisorDebugModeenableSupervisorDebugModesetSupervisorDebugMode runSupervisorrunSupervisorStartingFromrunUnrestrictedSupervisor%runUnrestrictedSupervisorStartingFromRequestQueueReader RequestQueuerequests receiverscontrollerThreadsRequestRequestQueueMonadabortforkgetCurrentProgressAsyncgetNumberOfWorkersAsyncrequestProgressUpdateAsyncrequestProgressUpdate syncAsyncaddProgressReceiverenqueueRequestenqueueRequestAndWaitnewRequestQueuetryDequeueRequestprocessAllRequestsreceiveProgressrequestQueueProgramforkControllerThreadkillControllerThreadsgetQuantityAsyncTerminationReasonForTerminationReasonFailure CompletedAborted RunOutcomeFor RunOutcome runStatisticsrunTerminationReasonDriverParametersshared_configuration_termsupervisor_configuration_term program_infoinitializeGlobalStategetStartingProgressnotifyTerminatedconstructExplorationMode constructTreepurityconstructControllerDrivermainForExploreTreemainForExploreTreeIOmainForExploreTreeImpuremainForExploreTreeUntilFirstmainForExploreTreeIOUntilFirst"mainForExploreTreeImpureUntilFirst%mainForExploreTreeUntilFoundUsingPull'mainForExploreTreeIOUntilFoundUsingPull+mainForExploreTreeImpureUntilFoundUsingPull%mainForExploreTreeUntilFoundUsingPush'mainForExploreTreeIOUntilFoundUsingPush+mainForExploreTreeImpureUntilFoundUsingPush genericMainsimpleMainForExploreTreesimpleMainForExploreTreeIOsimpleMainForExploreTreeImpure"simpleMainForExploreTreeUntilFirst$simpleMainForExploreTreeIOUntilFirst(simpleMainForExploreTreeImpureUntilFirst+simpleMainForExploreTreeUntilFoundUsingPull-simpleMainForExploreTreeIOUntilFoundUsingPull1simpleMainForExploreTreeImpureUntilFoundUsingPull+simpleMainForExploreTreeUntilFoundUsingPush-simpleMainForExploreTreeIOUntilFoundUsingPush1simpleMainForExploreTreeImpureUntilFoundUsingPush&extractRunOutcomeFromSupervisorOutcome mainParserWorkgroupCallbacks createWorker destroyWorkerkillAllWorkerssendProgressUpdateRequestTosendWorkloadStealRequestTosendWorkloadTo InnerMonadWorkerIdWorkgroupRequestQueueMonadchangeNumberOfWorkersAsyncWorkgroupControllerMonadCunwrapCchangeNumberOfWorkerssetNumberOfWorkersAsyncsetNumberOfWorkers runWorkgroupThreadsControllerMonaddriver(changeNumberOfWorkersToMatchCapabilitiesexploreTreeStartingFrom exploreTreeIOexploreTreeIOStartingFromexploreTreeTStartingFrom!exploreTreeUntilFirstStartingFromexploreTreeIOUntilFirst#exploreTreeIOUntilFirstStartingFrom"exploreTreeTUntilFirstStartingFromexploreTreeUntilFoundUsingPull*exploreTreeUntilFoundUsingPullStartingFrom exploreTreeIOUntilFoundUsingPull,exploreTreeIOUntilFoundUsingPullStartingFromexploreTreeTUntilFoundUsingPull+exploreTreeTUntilFoundUsingPullStartingFromexploreTreeUntilFoundUsingPush*exploreTreeUntilFoundUsingPushStartingFrom exploreTreeIOUntilFoundUsingPush,exploreTreeIOUntilFoundUsingPushStartingFromexploreTreeTUntilFoundUsingPush+exploreTreeTUntilFoundUsingPushStartingFrom runExplorer runWorkerrunWorkerUsingHandles ArityAndDeptharitydepthAritygetArity makeArityAndDepthTermAtPositionsformArityAndDepth perfectTreetrivialPerfectTreenumberOfLeavesghc-prim GHC.TypesIntbase Data.MonoidMonoid$fSerializeIntSum$fMonoidIntSumcereal-0.3.5.2Data.Serialize Serialize$fExceptionConnectionLosttransformers-0.3.0.0Control.Monad.IO.ClassMonadIOWord$fSerializeWordSum$fMonoidWordSumcmdtheline-0.2.3 System.Console.CmdTheLine.ArgValArgVal $fArgValMaybe $fArgValWord_ Data.MaybeNothing Control.MonadmzeroJustTrueFalsemempty MonadPlus $fMonoidTreeT$fMonadExplorableTransMaybeT$fMonadExplorableMaybeTControl.Monad.Trans.MaybeMaybeT$fMonadExplorableMaybeMaybe$fMonadExplorableTransListT$fMonadExplorableListTControl.Monad.Trans.ListListT$fMonadExplorable[]$fMonadPlusTreeTmplus $fEqTreeT$fAlternativeTreeTControl.Applicative Alternative Data.FoldableFoldable $fShowTreeT$fMonadTransTreeT$fMonadExplorableTransTreeT$fMonadExplorableTreeT$fExceptionWalkError$fSerializeBranchChoice$fSerializeStep$fMonoidCheckpoint"$fExceptionInconsistentCheckpoints$fSerializeCheckpoint$fMonoidProgress$fShowContextStep$fFunctorProgress$fSerializeProgressData.Typeable.InternalTypeablecontainers-0.5.0.0Data.IntSet.BaseIntSet$fArgValBoardSize Data.Map.BaseMap $fOrdLocation GHC.ClassesOrd$fMonoidLocationunwrapLocation$$fMonadExplorableTransLocatableTreeT$fMonadTransLocatableTreeT$fMonoidLocatableT $fMonadExplorableTransLocatableT$fMonadPlusLocatableT$fMonadLocatableLocatableT$fAlternativeLocatableT$fShowLocation $fOrdWorkload$fSerializeWorkloadTreeFunctionsForPurity void-0.6.1 Data.VoidabsurdGHC.IO.Exception ThreadKilled UserInterruptGHC.BaseStringGHC.Showshow WorkerRequestWorkloadStealRequestedProgressUpdateRequestedAbortRequested $fFunctorWorkerTerminationReasonFunctor GHC.IORefIORefGHC.Listreverse sendRequest$fSerializeProgressUpdatewalksteprun$fSerializeStolenWorkloaddebugMcheckpointFromSettingcomputeProgressUpdategetTreeFunctionsForPuritytryStealWorkloadworkloadFromSettingGHC.IO.Handle.TypesHandle$fSerializeMessageForSupervisor$fSerializeMessageForWorkerExponentiallyDecayingSum_last_decaying_sum_timestamp_decaying_sum_valueSupervisorErrorSupervisorWorkerManagementErrorSupervisorInconsistencyErrorWorkerManagementErrorWorkerNotActiveWorkerNotKnownWorkerAlreadyHasWorkloadWorkerAlreadyKnown$SpaceFullyExploredButWorkloadsRemainConflictingWorkloads,ActiveWorkersRemainedAfterSpaceFullyExploredInconsistencyError(SpaceFullyExploredButSearchNotTerminatedOutOfSourcesForNewWorkloadsIncompleteWorkspaceinfoM$fExceptionSupervisorError$fShowSupervisorError $fExceptionWorkerManagementError$fShowWorkerManagementError$fExceptionInconsistencyError$fShowInconsistencyErrorExponentiallyWeightedAverage_last_average_timestamp_current_average_valuedecaying_sum_valuelast_decaying_sum_timestampRetiredOccupationStatistics_occupied_time _total_timecurrent_average_valuelast_average_timestampOccupationStatistics _start_time_last_occupied_change_time_total_occupied_time_is_currently_occupied occupied_time total_timeIndependentMeasurements timeDataMin timeDataMaxtimeDataVarianceis_currently_occupiedlast_occupied_change_time start_timetotal_occupied_timeFunctionOfTime_number_of_samples_previous_value_previous_time _first_moment_second_moment_minimum_value_maximum_value$fMonoidIndependentMeasurementsInterpolatedFunctionOfTime_interpolated_function_of_time first_moment maximum_value minimum_valuenumber_of_samples previous_timeprevious_value second_momentStepFunctionOfTime_step_function_of_timeinterpolated_function_of_timeSupervisorConstants callbacks _current_time_exploration_modestep_function_of_timeSupervisorState'_waiting_workers_or_available_workloads_known_workers_active_workers_available_workers_for_steal_workers_pending_workload_steal _workers_pending_progress_update_current_progress _debug_mode!_supervisor_occupation_statistics_worker_occupation_statistics%_retired_worker_occupation_statistics_worker_wait_time_statistics_steal_request_matcher_queue_steal_request_failures_workload_steal_time_statistics _waiting_worker_count_statistics$_available_workload_count_statistics$_instantaneous_workload_request_rate/_instantaneous_workload_request_rate_statistics"_instantaneous_workload_steal_time-_instantaneous_workload_steal_time_statistics_time_spent_in_supervisor_monad_workload_buffer_size_number_of_calls current_timeexploration_modeSpecializationOfFunctionOfTime"zoomFunctionOfTimeWithInterpolatorSupervisorStateConstraintSupervisorReaderConstraint AbortMonadunwrapAbortMonadInsideAbortMonad ContextMonadunwrapContextMonadInsideContextMonadactive_workersavailable_workers_for_steal#available_workload_count_statisticscurrent_progress debug_mode#instantaneous_workload_request_rate.instantaneous_workload_request_rate_statistics!instantaneous_workload_steal_time,instantaneous_workload_steal_time_statistics known_workersnumber_of_calls$retired_worker_occupation_statisticssteal_request_failuressteal_request_matcher_queue supervisor_occupation_statisticstime_spent_in_supervisor_monadwaiting_worker_count_statistics&waiting_workers_or_available_workloadsworker_occupation_statisticsworker_wait_time_statisticsworkers_pending_progress_updateworkers_pending_workload_stealworkload_buffer_sizeworkload_steal_time_statisticsabortSupervisorWithReason"addPointToExponentiallyDecayingSum&addPointToExponentiallyWeightedAveragebeginWorkerOccupiedchangeOccupiedStatuschangeSupervisorOccupiedStatuschangeWorkerOccupiedStatuscheckWhetherMoreStealsAreNeededclearPendingProgressUpdate"computeExponentialDecayCoefficient'computeInstantaneousRateFromDecayingSumdeactivateWorkerdequeueWorkerForStealendWorkerOccupiedenqueueWorkerForStealenqueueWorkloadextractFunctionOfTimeStatistics-extractFunctionOfTimeStatisticsWithFinalPoint(extractIndependentMeasurementsStatisticsfinishWithResultgetCurrentCheckpointgetOccupationFractiongetWorkerDepth&initialFunctionForStartingTimeAndValue*initialInterpolatedFunctionForStartingTime2initialInterpolatedFunctionForStartingTimeAndValue"initialStepFunctionForStartingTime*initialStepFunctionForStartingTimeAndValueliftContextToAbortliftUserToAbortliftUserToContextlocalWithinAbortlocalWithinContext postValidateretireManyOccupationStatisticsretireOccupationStatistics retireWorkerretireAndDeactivateWorkersendCurrentProgressToUsertimePassedSincetryToObtainWorkloadForupdateCurrentProgressupdateFunctionOfTimeupdateFunctionOfTimeUsingLens%updateInstataneousWorkloadRequestRate#updateInstataneousWorkloadStealTimevalidateWorkerKnownvalidateWorkerKnownAndActivevalidateWorkerNotKnownzoomFunctionOfTime4$fSpecializationOfFunctionOfTimeStepFunctionOfTimeα<$fSpecializationOfFunctionOfTimeInterpolatedFunctionOfTimeα%$fCalcVarianceIndependentMeasurements!$fCalcMeanIndependentMeasurements"$fCalcCountIndependentMeasurements2$fStatMonoidIndependentMeasurementsNominalDiffTime#$fMonoidRetiredOccupationStatistics'$fMonadStateSupervisorStateContextMonad%$fMonadStateSupervisorStateAbortMonad,$fMonadReaderSupervisorConstantsContextMonad*$fMonadReaderSupervisorConstantsAbortMonadrunSupervisorProgramWrappableIntoSupervisorMonadwrapIntoSupervisorMonadunwrapSupervisorMonad*$fWrappableIntoSupervisorMonadContextMonad($fWrappableIntoSupervisorMonadAbortMonad$fMonadStatesSupervisorMonad$fMonadReadereSupervisorMonad$fMonadTransSupervisorMonad GHC.Conc.SyncThreadIdforkControllerThread'$fRequestQueueMonadReaderT$fHasExplorationModeReaderT System.Console.CmdTheLine.CommontermDocSharedConfigurationlogging_configurationtree_configurationSupervisorConfigurationmaybe_checkpoint_configuration(maybe_workload_buffer_size_configurationstatistics_configurationStatisticsConfigurationshow_wall_timesshow_supervisor_occupation show_supervisor_monad_occupationshow_supervisor_callsshow_worker_occupationshow_worker_wait_timesshow_steal_wait_timesshow_numbers_of_waiting_workers#show_numbers_of_available_workloads)show_instantaneous_workload_request_rates'show_instantaneous_workload_steal_timesLoggingConfiguration log_levelCheckpointConfigurationcheckpoint_pathcheckpoint_intervalnoticeM$fSerializeLoggingConfigurationIOdefault_terminfodispatchToMainFunctioncheckpoint_configuration_termlogging_configuration_termstatistics_configuration_term-maybe_workload_buffer_size_configuration_termmakeSharedConfigurationTermcheckpointLoopcontrollerLoop maybeForkIOremoveFileIfExistsshowStatisticswriteCheckpointFile$fArgValPriority$fSerializeSharedConfigurationWorkgroupState _pending_quit_next_worker_id_next_priority_removal_queueRemovalPriorityWorkgroupMonadWorkgroupStateMonad next_prioritynext_worker_id pending_quit removal_queuebumpWorkerRemovalPriority fireAWorker hireAWorker liftInnerliftInnerToSupervisornumberOfWorkersremoveWorkerFromRemovalQueue4$fWorkgroupRequestQueueMonadWorkgroupControllerMonad,$fHasExplorationModeWorkgroupControllerMonadsetNumCapabilitiesgetNumCapabilitiesfromJustOrBust*$fHasExplorationModeThreadsControllerMonad $fArgValArity