h$>F,ʥ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) 2021 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela  Safe-Inferred(c) 2021 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None code-conjureO(n)". Compares the simplicity of two s. An expression e1 is strictly simpler than another expression e2 if the first of the following conditions to distingish between them is: e1 is smaller in size/length than e2 , e.g.: x + y < x + (y + z);or, e1$ has less variable occurrences than e2,or, e1# has fewer distinct constants than e2 , e.g.:  1 + 1 < 0 + 1.9They're otherwise considered of equal complexity, e.g.: x + y and y + z. 9> (xx -+- yy) `compareComplexity` (xx -+- (yy -+- zz)) LT 0> (xx -+- yy) `compareComplexity` (xx -+- xx) EQ 1> (xx -+- xx) `compareComplexity` (one -+- xx) GT 5> (one -+- one) `compareComplexity` (zero -+- one) LT 0> (xx -+- yy) `compareComplexity` (yy -+- zz) EQ 6> (zero -+- one) `compareComplexity` (one -+- zero) EQ code-conjure/Makes the function in an application a variable code-conjureExpands recursive calls on an expression until the given size limit is reached. )> recursexpr 6 (ff xx) (ff xx) f x :: Int > recursexpr 6 (ff xx) (one -+- ff xx) 1 + (1 + (1 + (1 + f x))) :: Int > recursexpr 6 (ff xx) (if' pp one (xx -*- ff xx)) (if p then 1 else x * (if p then 1 else x * f x)) :: Int > recursexpr 6 (ff xx) (if' pp one (xx -*- ff (gg xx))) (if p then 1 else x * (if p then 1 else g x * f (g (g x)))) :: Int code-conjureChecks if the given recursive call apparently terminates. The first argument indicates the functional variable indicating the recursive call. (> apparentlyTerminates ffE (ff xx) False 5> apparentlyTerminates ffE (if' pp zero (ff xx)) True7This function only allows recursion in the else clause: 6> apparentlyTerminates ffE (if' pp (ff xx) zero) False apparentlyTerminates ffE (if' (odd' (ff xx)) zero zero) False code-conjureChecks if the given functional expression may refrain from evaluating its next argument. +> mayNotEvaluateArgument (plus :$ xx) False *> mayNotEvaluateArgument (andE :$ pp) TrueThis returns false for non-funcional value even if it involves an application which may not evaluate its argument. 1> mayNotEvaluateArgument (andE :$ pp :$ qq) False;This currently works by checking if the function is an if,  or . code-conjureCreates an if  of the type of the given proxy. :> ifFor (undefined :: Int) if :: Bool -> Int -> Int -> Int > ifFor (undefined :: String) if :: Bool -> [Char] -> [Char] -> [Char]You need to provide this as part of your building blocks on the background if you want recursive functions to be considered and produced.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) 2021 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela Nonep code-conjure Class of  types. Functions are  if all their arguments are ,  and able.For atomic types that are , instances are defined as: >instance Conjurable Atomic where conjureTiers = reifyTiersFor atomic types that are both  and , instances are defined as: instance Conjurable Atomic where conjureTiers = reifyTiers conjureEquality = reifyEquality3For types with subtypes, instances are defined as: instance Conjurable Composite where conjureTiers = reifyTiers conjureEquality = reifyEquality conjureSubTypes x = conjureType y . conjureType z . conjureType w where (Composite ... y ... z ... w ...) = xAbove x, y, z and w are just proxies. The Proxy. type was avoided for backwards compatibility.Please see the source code of Conjure.Conjurable for more examples.(cf. , , ) code-conjureReturns  the  function encoded as an  when available or  otherwise. code-conjureReturns   of values encoded as s when possible or  otherwise. code-conjure)A reification over a collection of types.4Represented as a transformation of a list to a list. code-conjure4Single reification of some functions over a type as s.7A hole, an if function, an equality function and tiers. code-conjure1Reifies equality to be used in a conjurable type.)This is to be used in the definition of  of  typeclass instances: instance ... => Conjurable where ... conjureEquality = reifyEquality ... code-conjure1Reifies equality to be used in a conjurable type.)This is to be used in the definition of  of  typeclass instances: instance ... => Conjurable where ... conjureTiers = reifyTiers ...(c) 2021 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None#$'  code-conjureArguments to be passed to  or  . See  for the defaults. code-conjuredefaults to 60 code-conjure0defaults to 9, keep greater than maxEquationSize code-conjure defaults to 1 code-conjure(defaults to 5, keep smaller than maxSize code-conjuredefaults to 60 code-conjureDefault arguments to conjure.60 testsfunctions of up to 9 symbolsmaximum of 1 recursive call#pruning with equations up to size 5recursion up to 60 symbols. code-conjureLike  but in the pure world.Returns a triple whose: 4first element is the number of candidates consideredsecond element is the number of defined points in the given function6third element is a list of implementations encoded as 0s paired with the number of matching points. code-conjureLike $ but allows setting options through  and . code-conjure;Conjures an implementation of a partially defined function.Takes a  with the name of a function, a partially-defined function from a conjurable type, and a list of building blocks encoded as s.For example, given: square :: Int -> Int square 0 = 0 square 1 = 1 square 2 = 4 background :: [Expr] background = [ val (0::Int) , val (1::Int) , value "+" ((+) :: Int -> Int -> Int) , value "*" ((*) :: Int -> Int -> Int) ](The conjure function does the following: > conjure "square" square background square :: Int -> Int -- looking through 815 candidates, 100% match, 3/3 assignments square x = x * xThe background is defined with  and . code-conjureLike  but allows setting the maximum size of considered expressions instead of the default value of 9. /conjureWithMaxSize 10 "function" function [...] code-conjureLike $ but allows setting options through /. 8conjureWith args{maxSize = 11} "function" function [...]  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) 2021 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela None,r      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstsusvswsxsyszs{s|s}s~s)code-conjure-0.1.0-J2tgjHWsakJEvEA3hLI72t Conjure.Expr Conjure.UtilsConjure.ConjurableConjure.EngineConjure$express-0.1.6-GVboVqtCaOK6NW7flDzNwtData.Express.Fixturessixtuple quintuple quadrupletriplecommapair-|-justjustBooljustInt nothingBool nothingIntnothingcompare'if'-<--<=--/=--$-elem'insert'sort'length'null'tail'head'-++--:-unitconsCharconsBoolconsIntconsnilCharnilBoolnilInt emptyStringnilyysxxsis_ordEord' lineBreakspacedeeceebeeaeccsddccc_even'odd'absEabs'negateEnegate'const'idStringidBoolsidIntsidCharidBoolidIntidEid'times-*-plus-+-ggE-?-ggffEffminusTwominusOnethreetwoonezeroii'kkjjiixx'zzyyxxi_-||--&&-not'implies-==>-orEandEnotEtruefalsepp'rrqqppb_Data.Express.CanonfastMostSpecificVariationfastMostGeneralVariationfastCanonicalVariationsmostSpecificCanonicalVariationmostGeneralCanonicalVariationcanonicalVariations isCanonicalcanonicalization canonicalizeisCanonicalWithcanonicalizationWithcanonicalizeWithData.Express.InstancespreludeNameInstances findValidApp validApps listVarsWith lookupNames lookupNamemkComparisonLEmkComparisonLT mkEquation mkComparisonisEqOrdisOrdisEqisEqOrdTisOrdTisEqTlookupComparison mkNameWithmkNamemkOrdLessEqualmkOrdmkEq reifyName reifyEqOrdreifyOrdreifyEqData.Express.Match isSubexprOf hasInstanceOf isInstanceOf matchWithmatchData.Express.Express.DerivederiveExpressCascadingderiveExpressIfNeeded deriveExpressData.Express.ExpressexprExpressData.Express.Foldunfoldfold unfoldTriofoldTrio unfoldPairfoldPairfoldAppData.Express.HolefilllistVarsAsTypeOflistVarsnubHolesholesisHolehole holeAsTypeOf varAsTypeOfData.Express.Map renameVarsBy////- mapSubexprs mapConstsmapVars mapValuesData.Express.CoreheightdepthsizearitynubVarsvars nubConstsconsts nubValuesvalues nubSubexprssubexprsisAppisValueisVarisConstisGroundhasVar unfoldAppcompareQuicklycompareLexicographicallycompareComplexityshowExpr showPrecExpr showOpExpr toDynamicevlevalevaluateisFun isWellTyped isIllTypedmtypetyptypvar$$valvalue:$ValueExprData.Express.Name.DerivederiveNameCascadingderiveNameIfNeeded deriveNameData.Express.NamenamesnameNameData.Express.Utils.StringvariableNamesFromTemplatecountcompareSimplicityfunToVar recursexprapparentlyTerminatesmayNotEvaluateArgumentapplicationOldifFor ConjurableconjureArgumentHolesconjureEquality conjureTiersconjureSubTypes Reification Reification1 conjureType reifyEquality reifyTiers conjureIfsconjureMkEquationconjureTiersForcanonicalApplicationcanonicalVarApplication$fConjurable(,,,,,,)$fConjurable(,,,,,)$fConjurable(,,,,)$fConjurable(,,,)$fConjurableComplex$fConjurableRatio$fConjurableWord64$fConjurableWord32$fConjurableWord16$fConjurableWord8$fConjurableWord$fConjurableInt64$fConjurableInt32$fConjurableInt16$fConjurableInt8$fConjurableDouble$fConjurableFloat$fConjurableOrdering$fConjurable->$fConjurableEither$fConjurableMaybe$fConjurable(,,)$fConjurable(,)$fConjurable[]$fConjurableChar$fConjurableInteger$fConjurableInt$fConjurableBool$fConjurable()ArgsmaxTestsmaxSizemaxRecursiveCallsmaxEquationSizemaxRecursionSizeargsconjpure conjpureWithconjureconjureWithMaxSize conjureWithcandidateExprsbaseGHC.Base++GHC.Listfilterzip Data.Tuplefstsndmap$Data.Typeable.InternalTypeable Data.Foldableelemminimummaximumfoldr1productsumfoldl1foldl'nullfoldlfoldrlength<>Monoidmconcatmemptymappend GHC.MaybeMaybeNothingJustghc-prim GHC.TypesTyCon Data.ListisSubsequenceOfData.Traversable mapAccumR mapAccumL Data.TypeabletypeOf7typeOf6typeOf5typeOf4typeOf3typeOf2typeOf1 rnfTypeReptypeRepFingerprint typeRepTyCon typeRepArgs splitTyConAppmkFunTy funResultTygcast2gcast1gcasteqTcast showsTypeReptypeReptypeOfTypeReprnfTyContyConFingerprint tyConName tyConModule tyConPackagefindnotElem minimumBy maximumByallanyorand concatMapconcat Data.MonoidFirstgetFirstLastgetLastApgetApData.Semigroup.InternalDualgetDualEndoappEndoAllgetAllAnygetAnySumgetSumProduct getProductAltgetAlt Data.OldListunwordswordsunlineslinesunfoldrsortOnsortBysort permutations subsequencestailsinitsgroupBygroupdeleteFirstsByunzip7unzip6unzip5unzip4zipWith7zipWith6zipWith5zipWith4zip7zip6zip5zip4genericReplicate genericIndexgenericSplitAt genericDrop genericTake genericLengthinsertByinsert partition transpose intercalate intersperse intersectBy intersectunionByunion\\deleteBydeletenubBynub isInfixOf isSuffixOf isPrefixOf findIndices findIndex elemIndices elemIndex stripPrefix dropWhileEnd Data.ProxyProxyData.Type.Equality:~:Refl:~~:HReflunzip3unzipzipWith3zipWithzip3!!lookupreversebreakspansplitAtdroptake dropWhile takeWhilecycle replicaterepeatiterate'iteratescanr1scanrscanl'scanl1scanlfoldl1'initlasttailunconshead Data.MaybemapMaybe catMaybes listToMaybe maybeToList fromMaybefromJust isNothingisJustmaybe Data.Function&onfixswapuncurrycurryflip.constid GHC.Classes&&||&leancheck-0.9.4-FE4c8WiMHKqIlWOgN0M2EhTest.LeanCheck.CoreListableGHC.ShowShowEq==tiersStringData.Express.Utils.Typeable->:: typesInListtypesIn mkCompareTymkComparisonTyisFunTyfunTyCon orderingTyintTyboolTy elementTyresultTy argumentTyunFunTy finalResultTytyArity compareTy&speculate-0.4.6-3dvgZGQ91aaFMKTlywXRbGTest.Speculate.EnginepsortBysubConsequenceconditionalEquivalencesconditionalTheoryFromThyAndRepssemiTheoryFromThyAndRepsequivalencesBetweenclassesFromSchemasAndVariablesclassesFromSchemasdistinctFromSchemasconsider(theoryAndRepresentativesFromAtomsKeepingrepresentativesFromAtomsKeepingtheoryFromAtomsKeeping!theoryAndRepresentativesFromAtomsrepresentativesFromAtomstheoryFromAtoms expansionsexpansionsWithexpansionsOfTypeTest.Speculate.ReasondiscardRedundantEquations defaultKeep initialize theorizeBytheorizefinalizefinalEquationsshowThyprintThy canonicalRule canonicalEqncanonicalizeEqncollapsecomposesimplifyorientdeducecompleteappendequivalentInstance equivalent criticalPairsnormalizedCriticalPairs reductions1 isRootNormalE isRootNormalisNormal normalizeE normalize keepMaxOfkeepUpToLengthemptyThy|==|updateEquationsBy updateRulesByokThyThykeepE closureLimitcompareE canReduceTorules equationsTest.Speculate.Reason.OrderdwoBy|>Test.Speculate.Expr.GroundisFalseisTrue trueRatioinequalless lessOrEqual condEqualM condEqualequal groundBindsgroundsTest.Speculate.Expr.EquateunConditionalEquationmkConditionalEquation unComparison isEquation unEquationTest.Speculate.Expr.InstancepreludeInstances maybeHoleOfTyholeOfTy lookupTiersT lookupTiers isListableT isListable mkListable reifyListablereifyInstancesreifyInstances1 InstancesTest.Speculate.Expr.CorehasCanonInstanceOfisCanonInstanceOf unificationunifyisConstantNamed isAssignmentunrepeatedVarscompareComplexityThenIndexcompareLexicographicallyByBinds