MagicHaskeller-0.8.6.2: Automatic inductive functional programmer by systematic searchContentsIndex
MagicHaskeller.ProgGenSF
Synopsis
type ProgGenSF = PGSF AnnExpr
data Expression e => PGSF e
Documentation
type ProgGenSF = PGSF AnnExpr
data Expression e => PGSF e

Program generator with synergetic filtration. This program generator employs filtration by random testing, and rarely generate semantically equivalent expressions more than once, while different expressions will eventually appear (for most of the types, represented with Prelude types, whose arguments are instance of Arbitrary and which return instance of Ord). The idea is to apply random numbers to the generated expressions, compute the quotient set of the resulting values at each depth of the search tree, and adopt the complete system of representatives for the depth and push the remaining expressions to one step deeper in the search tree. (Thus, adoption of expressions that may be equivalent to another already-generated-expression will be postponed until their "uniqueness" is proved.) As a result, (unlike ProgGen,) expressions with size N may not appear at depth N but some deeper place.

ProgGenSF is more efficient along with a middle-sized primitive set (like reallyall found in LibTH.hs), but is slower than ProgGen for a small-sized one.

Also note that ProgGenSF depends on hard use of unsafe* stuff, so if there is a bug, it may segfault....

show/hide Instances
Produced by Haddock version 2.7.2