/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.hs /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- MAYBE proof of /export/starexec/sandbox2/benchmark/theBenchmark.hs # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty H-Termination with start terms of the given HASKELL could not be shown: (0) HASKELL (1) LR [EQUIVALENT, 0 ms] (2) HASKELL (3) CR [EQUIVALENT, 0 ms] (4) HASKELL (5) IFR [EQUIVALENT, 14 ms] (6) HASKELL (7) BR [EQUIVALENT, 0 ms] (8) HASKELL (9) COR [EQUIVALENT, 2 ms] (10) HASKELL (11) LetRed [EQUIVALENT, 15 ms] (12) HASKELL (13) NumRed [SOUND, 23 ms] (14) HASKELL ---------------------------------------- (0) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (1) LR (EQUIVALENT) Lambda Reductions: The following Lambda expression "\vu15->case vu15 of { (']' : [],t) -> ([],t) : []; _ -> []} " is transformed to "readl0 vu15 = case vu15 of { (']' : [],t) -> ([],t) : []; _ -> []} ; " The following Lambda expression "\vu16->case vu16 of { (xs,u) -> (x : xs,u) : []; _ -> []} " is transformed to "readl1 x vu16 = case vu16 of { (xs,u) -> (x : xs,u) : []; _ -> []} ; " The following Lambda expression "\vu17->case vu17 of { (x,t) -> concatMap (readl1 x) (readl' t); _ -> []} " is transformed to "readl2 vu17 = case vu17 of { (x,t) -> concatMap (readl1 x) (readl' t); _ -> []} ; " The following Lambda expression "\vu18->case vu18 of { (']' : [],t) -> ([],t) : []; _ -> []} " is transformed to "readl'0 vu18 = case vu18 of { (']' : [],t) -> ([],t) : []; _ -> []} ; " The following Lambda expression "\vu19->case vu19 of { (xs,v) -> (x : xs,v) : []; _ -> []} " is transformed to "readl'1 x vu19 = case vu19 of { (xs,v) -> (x : xs,v) : []; _ -> []} ; " The following Lambda expression "\vu20->case vu20 of { (x,u) -> concatMap (readl'1 x) (readl' u); _ -> []} " is transformed to "readl'2 vu20 = case vu20 of { (x,u) -> concatMap (readl'1 x) (readl' u); _ -> []} ; " The following Lambda expression "\vu21->case vu21 of { (',' : [],t) -> concatMap readl'2 (reads t); _ -> []} " is transformed to "readl'3 vu21 = case vu21 of { (',' : [],t) -> concatMap readl'2 (reads t); _ -> []} ; " The following Lambda expression "\vu13->case vu13 of { pr -> pr : []; _ -> []} " is transformed to "readList0 vu13 = case vu13 of { pr -> pr : []; _ -> []} ; " The following Lambda expression "\vu14->case vu14 of { ('[' : [],s) -> concatMap readList0 (readl s); _ -> []} " is transformed to "readList1 vu14 = case vu14 of { ('[' : [],s) -> concatMap readList0 (readl s); _ -> []} ; " The following Lambda expression "\r->concatMap readList1 (lex r)" is transformed to "readList2 r = concatMap readList1 (lex r); " The following Lambda expression "\nd->n * radix + d" is transformed to "readInt0 radix n d = n * radix + d; " The following Lambda expression "\vu77->case vu77 of { (ds,r) -> (foldl1 (readInt0 radix) (map (fromIntegral . digToInt) ds),r) : []; _ -> []} " is transformed to "readInt1 radix digToInt vu77 = case vu77 of { (ds,r) -> (foldl1 (readInt0 radix) (map (fromIntegral . digToInt) ds),r) : []; _ -> []} ; " The following Lambda expression "\vu54->case vu54 of { (ch,''' : t) -> if ch /= ''' : [] then (''' : ch ++ ''' : [],t) : [] else []; _ -> []} " is transformed to "lex0 vu54 = case vu54 of { (ch,''' : t) -> if ch /= ''' : [] then (''' : ch ++ ''' : [],t) : [] else []; _ -> []} ; " The following Lambda expression "\vu56->case vu56 of { (str,u) -> (ch ++ str,u) : []; _ -> []} " is transformed to "lexString0 ch vu56 = case vu56 of { (str,u) -> (ch ++ str,u) : []; _ -> []} ; " The following Lambda expression "\vu57->case vu57 of { (ch,t) -> concatMap (lexString0 ch) (lexString t); _ -> []} " is transformed to "lexString1 vu57 = case vu57 of { (ch,t) -> concatMap (lexString0 ch) (lexString t); _ -> []} ; " The following Lambda expression "\vu58->case vu58 of { '\' : t -> ([],t) : []; _ -> []} " is transformed to "lexStrItem0 vu58 = case vu58 of { '\' : t -> ([],t) : []; _ -> []} ; " The following Lambda expression "\vu55->case vu55 of { (str,t) -> ('"' : str,t) : []; _ -> []} " is transformed to "lex1 vu55 = case vu55 of { (str,t) -> ('"' : str,t) : []; _ -> []} ; " The following Lambda expression "\vu63->case vu63 of { (e,u) -> ('.' : ds ++ e,u) : []; _ -> []} " is transformed to "lexFracExp0 ds vu63 = case vu63 of { (e,u) -> ('.' : ds ++ e,u) : []; _ -> []} ; " The following Lambda expression "\vu64->case vu64 of { (ds,t) -> concatMap (lexFracExp0 ds) (lexExp t); _ -> []} " is transformed to "lexFracExp1 vu64 = case vu64 of { (ds,t) -> concatMap (lexFracExp0 ds) (lexExp t); _ -> []} ; " The following Lambda expression "\vu65->case vu65 of { (ds,u) -> (e : c : ds,u) : []; _ -> []} " is transformed to "lexExp0 e c vu65 = case vu65 of { (ds,u) -> (e : c : ds,u) : []; _ -> []} ; " The following Lambda expression "\vu66->case vu66 of { c : t -> if c `elem` '+' : '-' : [] then concatMap (lexExp0 e c) (lexDigits t) else []; _ -> []} " is transformed to "lexExp1 e vu66 = case vu66 of { c : t -> if c `elem` '+' : '-' : [] then concatMap (lexExp0 e c) (lexDigits t) else []; _ -> []} ; " The following Lambda expression "\vu67->case vu67 of { (ds,t) -> (e : ds,t) : []; _ -> []} " is transformed to "lexExp2 e vu67 = case vu67 of { (ds,t) -> (e : ds,t) : []; _ -> []} ; " The following Lambda expression "\vu59->case vu59 of { (sym,t) -> (c : sym,t) : []; _ -> []} " is transformed to "lex2 c vu59 = case vu59 of { (sym,t) -> (c : sym,t) : []; _ -> []} ; " The following Lambda expression "\vu60->case vu60 of { (nam,t) -> (c : nam,t) : []; _ -> []} " is transformed to "lex3 c vu60 = case vu60 of { (nam,t) -> (c : nam,t) : []; _ -> []} ; " The following Lambda expression "\vu61->case vu61 of { (fe,t) -> (c : ds ++ fe,t) : []; _ -> []} " is transformed to "lex4 c ds vu61 = case vu61 of { (fe,t) -> (c : ds ++ fe,t) : []; _ -> []} ; " The following Lambda expression "\vu62->case vu62 of { (ds,s) -> concatMap (lex4 c ds) (lexFracExp s); _ -> []} " is transformed to "lex5 c vu62 = case vu62 of { (ds,s) -> concatMap (lex4 c ds) (lexFracExp s); _ -> []} ; " The following Lambda expression "\ab->(a,b)" is transformed to "zip0 a b = (a,b); " The following Lambda expression "\vu46->case vu46 of { ([],[]) -> x : []; _ -> []} " is transformed to "read0 x vu46 = case vu46 of { ([],[]) -> x : []; _ -> []} ; " The following Lambda expression "\vu47->case vu47 of { (x,t) -> concatMap (read0 x) (lex t); _ -> []} " is transformed to "read1 vu47 = case vu47 of { (x,t) -> concatMap (read0 x) (lex t); _ -> []} ; " The following Lambda expression "\vu68->case vu68 of { (cs@(_ : _),t) -> (cs,t) : []; _ -> []} " is transformed to "nonnull0 vu68 = case vu68 of { (cs@(_ : _),t) -> (cs,t) : []; _ -> []} ; " The following Lambda expression "\vu48->case vu48 of { (')' : [],u) -> (x,u) : []; _ -> []} " is transformed to "mandatory0 x vu48 = case vu48 of { (')' : [],u) -> (x,u) : []; _ -> []} ; " The following Lambda expression "\vu49->case vu49 of { (x,t) -> concatMap (mandatory0 x) (lex t); _ -> []} " is transformed to "mandatory1 vu49 = case vu49 of { (x,t) -> concatMap (mandatory0 x) (lex t); _ -> []} ; " The following Lambda expression "\vu50->case vu50 of { ('(' : [],s) -> concatMap mandatory1 (optional s); _ -> []} " is transformed to "mandatory2 vu50 = case vu50 of { ('(' : [],s) -> concatMap mandatory1 (optional s); _ -> []} ; " The following Lambda expression "\vu88->case vu88 of { (k,t) -> (`negate` k,t) : []; _ -> []} " is transformed to "readExp'0 vu88 = case vu88 of { (k,t) -> (`negate` k,t) : []; _ -> []} ; " The following Lambda expression "\vu86->case vu86 of { (ds',t) -> (read (ds ++ ds'),length ds',t) : []; _ -> []} " is transformed to "readFix0 ds vu86 = case vu86 of { (ds',t) -> (read (ds ++ ds'),length ds',t) : []; _ -> []} ; " The following Lambda expression "\vu87->case vu87 of { (ds,d) -> concatMap (readFix0 ds) (lexFrac d); _ -> []} " is transformed to "readFix1 vu87 = case vu87 of { (ds,d) -> concatMap (readFix0 ds) (lexFrac d); _ -> []} ; " The following Lambda expression "\vu82->case vu82 of { (k,t) -> (fromRational (n % 1 * 10 ^^ (k - d)),t) : []; _ -> []} " is transformed to "readFloat0 n d vu82 = case vu82 of { (k,t) -> (fromRational (n % 1 * 10 ^^ (k - d)),t) : []; _ -> []} ; " The following Lambda expression "\vu83->case vu83 of { (n,d,s) -> concatMap (readFloat0 n d) (readExp s); _ -> []} " is transformed to "readFloat1 vu83 = case vu83 of { (n,d,s) -> concatMap (readFloat0 n d) (readExp s); _ -> []} ; " The following Lambda expression "\vu84->case vu84 of { ('N' : 'a' : 'N' : [],t) -> (0 / 0,t) : []; _ -> []} " is transformed to "readFloat2 vu84 = case vu84 of { ('N' : 'a' : 'N' : [],t) -> (0 / 0,t) : []; _ -> []} ; " The following Lambda expression "\vu85->case vu85 of { ('I' : 'n' : 'f' : 'i' : 'n' : 'i' : 't' : 'y' : [],t) -> (1 / 0,t) : []; _ -> []} " is transformed to "readFloat3 vu85 = case vu85 of { ('I' : 'n' : 'f' : 'i' : 'n' : 'i' : 't' : 'y' : [],t) -> (1 / 0,t) : []; _ -> []} ; " The following Lambda expression "\vu80->case vu80 of { (n,[]) -> (n,s) : []; _ -> []} " is transformed to "read''0 s vu80 = case vu80 of { (n,[]) -> (n,s) : []; _ -> []} ; " The following Lambda expression "\vu81->case vu81 of { (str,s) -> concatMap (read''0 s) (readPos str); _ -> []} " is transformed to "read''1 readPos vu81 = case vu81 of { (str,s) -> concatMap (read''0 s) (readPos str); _ -> []} ; " The following Lambda expression "\vu78->case vu78 of { (x,t) -> (`negate` x,t) : []; _ -> []} " is transformed to "read'0 vu78 = case vu78 of { (x,t) -> (`negate` x,t) : []; _ -> []} ; " The following Lambda expression "\vu79->case vu79 of { ('-' : [],s) -> concatMap read'0 (read'' s); _ -> []} " is transformed to "read'1 vu79 = case vu79 of { ('-' : [],s) -> concatMap read'0 (read'' s); _ -> []} ; " The following Lambda expression "\n_->n + 1" is transformed to "length0 n _ = n + 1; " The following Lambda expression "\d->fromEnum d - fromEnum_0" is transformed to "readDec0 d = fromEnum d - fromEnum_0; " The following Lambda expression "\vu69->case vu69 of { ([],s') -> (mne,s') : []; _ -> []} " is transformed to "lexEsc0 mne vu69 = case vu69 of { ([],s') -> (mne,s') : []; _ -> []} ; " The following Lambda expression "\vu70->case vu70 of { (c,mne) -> concatMap (lexEsc0 mne) (lexmatch mne s : []); _ -> []} " is transformed to "lexEsc1 s vu70 = case vu70 of { (c,mne) -> concatMap (lexEsc0 mne) (lexmatch mne s : []); _ -> []} ; " The following Lambda expression "\(_,zs)->zs" is transformed to "zs0 (_,zs) = zs; " The following Lambda expression "\(ys,_)->ys" is transformed to "ys0 (ys,_) = ys; " ---------------------------------------- (2) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (3) CR (EQUIVALENT) Case Reductions: The following Case expression "case vu20 of { (x,u) -> concatMap (readl'1 x) (readl' u); _ -> []} " is transformed to "readl'20 (x,u) = concatMap (readl'1 x) (readl' u); readl'20 _ = []; " The following Case expression "case vu19 of { (xs,v) -> (x : xs,v) : []; _ -> []} " is transformed to "readl'10 x (xs,v) = (x : xs,v) : []; readl'10 x _ = []; " The following Case expression "case vu21 of { (',' : [],t) -> concatMap readl'2 (reads t); _ -> []} " is transformed to "readl'30 (',' : [],t) = concatMap readl'2 (reads t); readl'30 _ = []; " The following Case expression "case vu17 of { (x,t) -> concatMap (readl1 x) (readl' t); _ -> []} " is transformed to "readl20 (x,t) = concatMap (readl1 x) (readl' t); readl20 _ = []; " The following Case expression "case vu18 of { (']' : [],t) -> ([],t) : []; _ -> []} " is transformed to "readl'00 (']' : [],t) = ([],t) : []; readl'00 _ = []; " The following Case expression "case vu14 of { ('[' : [],s) -> concatMap readList0 (readl s); _ -> []} " is transformed to "readList10 ('[' : [],s) = concatMap readList0 (readl s); readList10 _ = []; " The following Case expression "case vu13 of { pr -> pr : []; _ -> []} " is transformed to "readList00 pr = pr : []; readList00 _ = []; " The following Case expression "case vu16 of { (xs,u) -> (x : xs,u) : []; _ -> []} " is transformed to "readl10 x (xs,u) = (x : xs,u) : []; readl10 x _ = []; " The following Case expression "case vu15 of { (']' : [],t) -> ([],t) : []; _ -> []} " is transformed to "readl00 (']' : [],t) = ([],t) : []; readl00 _ = []; " The following Case expression "case vu55 of { (str,t) -> ('"' : str,t) : []; _ -> []} " is transformed to "lex10 (str,t) = ('"' : str,t) : []; lex10 _ = []; " The following Case expression "case vu57 of { (ch,t) -> concatMap (lexString0 ch) (lexString t); _ -> []} " is transformed to "lexString10 (ch,t) = concatMap (lexString0 ch) (lexString t); lexString10 _ = []; " The following Case expression "case vu56 of { (str,u) -> (ch ++ str,u) : []; _ -> []} " is transformed to "lexString00 ch (str,u) = (ch ++ str,u) : []; lexString00 ch _ = []; " The following Case expression "case vu58 of { '\' : t -> ([],t) : []; _ -> []} " is transformed to "lexStrItem00 ('\' : t) = ([],t) : []; lexStrItem00 _ = []; " The following Case expression "case vu59 of { (sym,t) -> (c : sym,t) : []; _ -> []} " is transformed to "lex20 c (sym,t) = (c : sym,t) : []; lex20 c _ = []; " The following Case expression "case vu67 of { (ds,t) -> (e : ds,t) : []; _ -> []} " is transformed to "lexExp20 e (ds,t) = (e : ds,t) : []; lexExp20 e _ = []; " The following Case expression "case vu65 of { (ds,u) -> (e : c : ds,u) : []; _ -> []} " is transformed to "lexExp00 e c (ds,u) = (e : c : ds,u) : []; lexExp00 e c _ = []; " The following Case expression "case vu62 of { (ds,s) -> concatMap (lex4 c ds) (lexFracExp s); _ -> []} " is transformed to "lex50 c (ds,s) = concatMap (lex4 c ds) (lexFracExp s); lex50 c _ = []; " The following Case expression "case vu66 of { c : t -> if c `elem` '+' : '-' : [] then concatMap (lexExp0 e c) (lexDigits t) else []; _ -> []} " is transformed to "lexExp10 e (c : t) = if c `elem` '+' : '-' : [] then concatMap (lexExp0 e c) (lexDigits t) else []; lexExp10 e _ = []; " The following Case expression "case vu60 of { (nam,t) -> (c : nam,t) : []; _ -> []} " is transformed to "lex30 c (nam,t) = (c : nam,t) : []; lex30 c _ = []; " The following Case expression "case vu61 of { (fe,t) -> (c : ds ++ fe,t) : []; _ -> []} " is transformed to "lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex40 c ds _ = []; " The following Case expression "case vu63 of { (e,u) -> ('.' : ds ++ e,u) : []; _ -> []} " is transformed to "lexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lexFracExp00 ds _ = []; " The following Case expression "case vu64 of { (ds,t) -> concatMap (lexFracExp0 ds) (lexExp t); _ -> []} " is transformed to "lexFracExp10 (ds,t) = concatMap (lexFracExp0 ds) (lexExp t); lexFracExp10 _ = []; " The following Case expression "case vu47 of { (x,t) -> concatMap (read0 x) (lex t); _ -> []} " is transformed to "read10 (x,t) = concatMap (read0 x) (lex t); read10 _ = []; " The following Case expression "case vu46 of { ([],[]) -> x : []; _ -> []} " is transformed to "read00 x ([],[]) = x : []; read00 x _ = []; " The following Case expression "case vu68 of { (cs@(_ : _),t) -> (cs,t) : []; _ -> []} " is transformed to "nonnull00 (cs@(_ : _),t) = (cs,t) : []; nonnull00 _ = []; " The following Case expression "case vu84 of { ('N' : 'a' : 'N' : [],t) -> (0 / 0,t) : []; _ -> []} " is transformed to "readFloat20 ('N' : 'a' : 'N' : [],t) = (0 / 0,t) : []; readFloat20 _ = []; " The following Case expression "case vu85 of { ('I' : 'n' : 'f' : 'i' : 'n' : 'i' : 't' : 'y' : [],t) -> (1 / 0,t) : []; _ -> []} " is transformed to "readFloat30 ('I' : 'n' : 'f' : 'i' : 'n' : 'i' : 't' : 'y' : [],t) = (1 / 0,t) : []; readFloat30 _ = []; " The following Case expression "case vu82 of { (k,t) -> (fromRational (n % 1 * 10 ^^ (k - d)),t) : []; _ -> []} " is transformed to "readFloat00 n d (k,t) = (fromRational (n % 1 * 10 ^^ (k - d)),t) : []; readFloat00 n d _ = []; " The following Case expression "case vu88 of { (k,t) -> (`negate` k,t) : []; _ -> []} " is transformed to "readExp'00 (k,t) = (`negate` k,t) : []; readExp'00 _ = []; " The following Case expression "case vu86 of { (ds',t) -> (read (ds ++ ds'),length ds',t) : []; _ -> []} " is transformed to "readFix00 ds (ds',t) = (read (ds ++ ds'),length ds',t) : []; readFix00 ds _ = []; " The following Case expression "case vu83 of { (n,d,s) -> concatMap (readFloat0 n d) (readExp s); _ -> []} " is transformed to "readFloat10 (n,d,s) = concatMap (readFloat0 n d) (readExp s); readFloat10 _ = []; " The following Case expression "case vu87 of { (ds,d) -> concatMap (readFix0 ds) (lexFrac d); _ -> []} " is transformed to "readFix10 (ds,d) = concatMap (readFix0 ds) (lexFrac d); readFix10 _ = []; " The following Case expression "case vu77 of { (ds,r) -> (foldl1 (readInt0 radix) (map (fromIntegral . digToInt) ds),r) : []; _ -> []} " is transformed to "readInt10 radix digToInt (ds,r) = (foldl1 (readInt0 radix) (map (fromIntegral . digToInt) ds),r) : []; readInt10 radix digToInt _ = []; " The following Case expression "case concatMap read1 (reads s) of { x : [] -> x; [] -> error []; _ -> error []} " is transformed to "read2 (x : []) = x; read2 [] = error []; read2 _ = error []; " The following Case expression "case vu54 of { (ch,''' : t) -> if ch /= ''' : [] then (''' : ch ++ ''' : [],t) : [] else []; _ -> []} " is transformed to "lex00 (ch,''' : t) = if ch /= ''' : [] then (''' : ch ++ ''' : [],t) : [] else []; lex00 _ = []; " The following Case expression "case vu48 of { (')' : [],u) -> (x,u) : []; _ -> []} " is transformed to "mandatory00 x (')' : [],u) = (x,u) : []; mandatory00 x _ = []; " The following Case expression "case vu49 of { (x,t) -> concatMap (mandatory0 x) (lex t); _ -> []} " is transformed to "mandatory10 (x,t) = concatMap (mandatory0 x) (lex t); mandatory10 _ = []; " The following Case expression "case vu50 of { ('(' : [],s) -> concatMap mandatory1 (optional s); _ -> []} " is transformed to "mandatory20 ('(' : [],s) = concatMap mandatory1 (optional s); mandatory20 _ = []; " The following Case expression "case vu79 of { ('-' : [],s) -> concatMap read'0 (read'' s); _ -> []} " is transformed to "read'10 ('-' : [],s) = concatMap read'0 (read'' s); read'10 _ = []; " The following Case expression "case vu78 of { (x,t) -> (`negate` x,t) : []; _ -> []} " is transformed to "read'00 (x,t) = (`negate` x,t) : []; read'00 _ = []; " The following Case expression "case vu80 of { (n,[]) -> (n,s) : []; _ -> []} " is transformed to "read''00 s (n,[]) = (n,s) : []; read''00 s _ = []; " The following Case expression "case vu81 of { (str,s) -> concatMap (read''0 s) (readPos str); _ -> []} " is transformed to "read''10 readPos (str,s) = concatMap (read''0 s) (readPos str); read''10 readPos _ = []; " The following Case expression "case concatMap (lexEsc1 s) table of { pr : _ -> pr : []; [] -> []} " is transformed to "lexEsc2 (pr : _) = pr : []; lexEsc2 [] = []; " The following Case expression "case vu69 of { ([],s') -> (mne,s') : []; _ -> []} " is transformed to "lexEsc00 mne ([],s') = (mne,s') : []; lexEsc00 mne _ = []; " The following Case expression "case vu70 of { (c,mne) -> concatMap (lexEsc0 mne) (lexmatch mne s : []); _ -> []} " is transformed to "lexEsc10 s (c,mne) = concatMap (lexEsc0 mne) (lexmatch mne s : []); lexEsc10 s _ = []; " ---------------------------------------- (4) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (5) IFR (EQUIVALENT) If Reductions: The following If expression "if c `elem` '+' : '-' : [] then concatMap (lexExp0 e c) (lexDigits t) else []" is transformed to "lexExp100 e c t True = concatMap (lexExp0 e c) (lexDigits t); lexExp100 e c t False = []; " The following If expression "if primGEqNatS x y then Succ (primDivNatS (primMinusNatS x y) (Succ y)) else Zero" is transformed to "primDivNatS0 x y True = Succ (primDivNatS (primMinusNatS x y) (Succ y)); primDivNatS0 x y False = Zero; " The following If expression "if ch /= ''' : [] then (''' : ch ++ ''' : [],t) : [] else []" is transformed to "lex000 ch t True = (''' : ch ++ ''' : [],t) : []; lex000 ch t False = []; " The following If expression "if n >= 0 then x ^ n else recip (x ^ (`negate` n))" is transformed to "prPr0 x n True = x ^ n; prPr0 x n False = recip (x ^ (`negate` n)); " The following If expression "if b then mandatory else optional" is transformed to "readParen0 True = mandatory; readParen0 False = optional; " The following If expression "if primGEqNatS x y then primModNatS (primMinusNatS x y) (Succ y) else Succ x" is transformed to "primModNatS0 x y True = primModNatS (primMinusNatS x y) (Succ y); primModNatS0 x y False = Succ x; " ---------------------------------------- (6) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (7) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. Binding Reductions: The bind variable of the following binding Pattern "xs@(vxv : vxw)" is replaced by the following term "vxv : vxw" The bind variable of the following binding Pattern "xs@(vxz : vyu)" is replaced by the following term "vxz : vyu" The bind variable of the following binding Pattern "cs@(vyz : vzu)" is replaced by the following term "vyz : vzu" The bind variable of the following binding Pattern "s@(wvz : wwu)" is replaced by the following term "wvz : wwu" ---------------------------------------- (8) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (9) COR (EQUIVALENT) Cond Reductions: The following Function with conditions "readl'00 (']' : [],t) = ([],t) : []; readl'00 vw = []; " is transformed to "readl'00 (wxv : wxw,t) = readl'002 (wxv : wxw,t); readl'00 vw = readl'000 vw; " "readl'000 vw = []; " "readl'001 True (wxv : [],t) = ([],t) : []; readl'001 wxx wxy = readl'000 wxy; " "readl'002 (wxv : wxw,t) = readl'001 (wxv == ']') (wxv : wxw,t); readl'002 wxz = readl'000 wxz; " The following Function with conditions "readList10 ('[' : [],s) = concatMap readList0 (readl s); readList10 vx = []; " is transformed to "readList10 (wyw : wyx,s) = readList102 (wyw : wyx,s); readList10 vx = readList100 vx; " "readList100 vx = []; " "readList101 True (wyw : [],s) = concatMap readList0 (readl s); readList101 wyy wyz = readList100 wyz; " "readList102 (wyw : wyx,s) = readList101 (wyw == '[') (wyw : wyx,s); readList102 wzu = readList100 wzu; " The following Function with conditions "readl00 (']' : [],t) = ([],t) : []; readl00 wu = []; " is transformed to "readl00 (wzx : wzy,t) = readl002 (wzx : wzy,t); readl00 wu = readl000 wu; " "readl000 wu = []; " "readl001 True (wzx : [],t) = ([],t) : []; readl001 wzz xuu = readl000 xuu; " "readl002 (wzx : wzy,t) = readl001 (wzx == ']') (wzx : wzy,t); readl002 xuv = readl000 xuv; " The following Function with conditions "readl'30 (',' : [],t) = concatMap readl'2 (reads t); readl'30 ww = []; " is transformed to "readl'30 (xuy : xuz,t) = readl'302 (xuy : xuz,t); readl'30 ww = readl'300 ww; " "readl'300 ww = []; " "readl'301 True (xuy : [],t) = concatMap readl'2 (reads t); readl'301 xvu xvv = readl'300 xvv; " "readl'302 (xuy : xuz,t) = readl'301 (xuy == ',') (xuy : xuz,t); readl'302 xvw = readl'300 xvw; " The following Function with conditions "takeWhile p [] = []; takeWhile p (x : xs)|p xx : takeWhile p xs|otherwise[]; " is transformed to "takeWhile p [] = takeWhile3 p []; takeWhile p (x : xs) = takeWhile2 p (x : xs); " "takeWhile0 p x xs True = []; " "takeWhile1 p x xs True = x : takeWhile p xs; takeWhile1 p x xs False = takeWhile0 p x xs otherwise; " "takeWhile2 p (x : xs) = takeWhile1 p x xs (p x); " "takeWhile3 p [] = []; takeWhile3 xvz xwu = takeWhile2 xvz xwu; " The following Function with conditions "gcd' x 0 = x; gcd' x y = gcd' y (x `rem` y); " is transformed to "gcd' x xwv = gcd'2 x xwv; gcd' x y = gcd'0 x y; " "gcd'0 x y = gcd' y (x `rem` y); " "gcd'1 True x xwv = x; gcd'1 xww xwx xwy = gcd'0 xwx xwy; " "gcd'2 x xwv = gcd'1 (xwv == 0) x xwv; gcd'2 xwz xxu = gcd'0 xwz xxu; " The following Function with conditions "gcd 0 0 = error []; gcd x y = gcd' (abs x) (abs y) where { gcd' x 0 = x; gcd' x y = gcd' y (x `rem` y); } ; " is transformed to "gcd xxv xxw = gcd3 xxv xxw; gcd x y = gcd0 x y; " "gcd0 x y = gcd' (abs x) (abs y) where { gcd' x xwv = gcd'2 x xwv; gcd' x y = gcd'0 x y; ; gcd'0 x y = gcd' y (x `rem` y); ; gcd'1 True x xwv = x; gcd'1 xww xwx xwy = gcd'0 xwx xwy; ; gcd'2 x xwv = gcd'1 (xwv == 0) x xwv; gcd'2 xwz xxu = gcd'0 xwz xxu; } ; " "gcd1 True xxv xxw = error []; gcd1 xxx xxy xxz = gcd0 xxy xxz; " "gcd2 True xxv xxw = gcd1 (xxw == 0) xxv xxw; gcd2 xyu xyv xyw = gcd0 xyv xyw; " "gcd3 xxv xxw = gcd2 (xxv == 0) xxv xxw; gcd3 xyx xyy = gcd0 xyx xyy; " The following Function with conditions "lexString ('"' : s) = ('"' : [],s) : []; lexString s = concatMap lexString1 (lexStrItem s); " is transformed to "lexString (xzu : s) = lexString4 (xzu : s); lexString s = lexString2 s; " "lexString2 s = concatMap lexString1 (lexStrItem s); " "lexString3 True (xzu : s) = ('"' : [],s) : []; lexString3 xzv xzw = lexString2 xzw; " "lexString4 (xzu : s) = lexString3 (xzu == '"') (xzu : s); lexString4 xzx = lexString2 xzx; " The following Function with conditions "lexStrItem ('\' : '&' : s) = ('\' : '&' : [],s) : []; lexStrItem ('\' : c : s)|isSpace cconcatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem s = lexLitChar s; " is transformed to "lexStrItem (yvv : yvz) = lexStrItem7 (yvv : yvz); lexStrItem (xzz : yuw) = lexStrItem4 (xzz : yuw); lexStrItem s = lexStrItem1 s; " "lexStrItem1 s = lexLitChar s; " "lexStrItem2 xzz c s True = concatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem2 xzz c s False = lexStrItem1 (xzz : c : s); " "lexStrItem3 True (xzz : c : s) = lexStrItem2 xzz c s (isSpace c); lexStrItem3 yux yuy = lexStrItem1 yuy; " "lexStrItem4 (xzz : yuw) = lexStrItem3 (xzz == '\') (xzz : yuw); lexStrItem4 yuz = lexStrItem1 yuz; " "lexStrItem5 True (yvv : yvx : s) = ('\' : '&' : [],s) : []; lexStrItem5 ywu ywv = lexStrItem4 ywv; " "lexStrItem6 True (yvv : yvx : s) = lexStrItem5 (yvx == '&') (yvv : yvx : s); lexStrItem6 yww ywx = lexStrItem4 ywx; " "lexStrItem7 (yvv : yvz) = lexStrItem6 (yvv == '\') (yvv : yvz); lexStrItem7 ywy = lexStrItem4 ywy; " The following Function with conditions "lexStrItem00 ('\' : t) = ([],t) : []; lexStrItem00 yx = []; " is transformed to "lexStrItem00 (yxu : t) = lexStrItem002 (yxu : t); lexStrItem00 yx = lexStrItem000 yx; " "lexStrItem000 yx = []; " "lexStrItem001 True (yxu : t) = ([],t) : []; lexStrItem001 yxv yxw = lexStrItem000 yxw; " "lexStrItem002 (yxu : t) = lexStrItem001 (yxu == '\') (yxu : t); lexStrItem002 yxx = lexStrItem000 yxx; " The following Function with conditions "lexExp (e : s)|e `elem` 'e' : 'E' : []concatMap (lexExp1 e) (s : []) ++ concatMap (lexExp2 e) (lexDigits s); lexExp s = ([],s) : []; " is transformed to "lexExp (e : s) = lexExp5 (e : s); lexExp s = lexExp3 s; " "lexExp3 s = ([],s) : []; " "lexExp4 e s True = concatMap (lexExp1 e) (s : []) ++ concatMap (lexExp2 e) (lexDigits s); lexExp4 e s False = lexExp3 (e : s); " "lexExp5 (e : s) = lexExp4 e s (e `elem` 'e' : 'E' : []); lexExp5 yxz = lexExp3 yxz; " The following Function with conditions "lexFracExp ('.' : c : cs)|isDigit cconcatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp s = lexExp s; " is transformed to "lexFracExp (yyv : yyy) = lexFracExp5 (yyv : yyy); lexFracExp s = lexFracExp2 s; " "lexFracExp2 s = lexExp s; " "lexFracExp3 yyv c cs True = concatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp3 yyv c cs False = lexFracExp2 (yyv : c : cs); " "lexFracExp4 True (yyv : c : cs) = lexFracExp3 yyv c cs (isDigit c); lexFracExp4 yyz yzu = lexFracExp2 yzu; " "lexFracExp5 (yyv : yyy) = lexFracExp4 (yyv == '.') (yyv : yyy); lexFracExp5 yzv = lexFracExp2 yzv; " The following Function with conditions "lex [] = ([],[]) : []; lex (c : s)|isSpace clex (dropWhile isSpace s); lex (''' : s) = concatMap lex0 (lexLitChar s); lex ('"' : s) = concatMap lex1 (lexString s) where { lex1 vu55 = lex10 vu55; ; lex10 (str,t) = ('"' : str,t) : []; lex10 yy = []; ; lexStrItem ('\' : '&' : s) = ('\' : '&' : [],s) : []; lexStrItem ('\' : c : s)|isSpace cconcatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem s = lexLitChar s; ; lexStrItem0 vu58 = lexStrItem00 vu58; ; lexStrItem00 ('\' : t) = ([],t) : []; lexStrItem00 yx = []; ; lexString ('"' : s) = ('"' : [],s) : []; lexString s = concatMap lexString1 (lexStrItem s); ; lexString0 ch vu56 = lexString00 ch vu56; ; lexString00 ch (str,u) = (ch ++ str,u) : []; lexString00 ch yv = []; ; lexString1 vu57 = lexString10 vu57; ; lexString10 (ch,t) = concatMap (lexString0 ch) (lexString t); lexString10 yw = []; } ; lex (c : s)|isSingle c(c : [],s) : []|isSym cconcatMap (lex2 c) (span isSym s : [])|isAlpha cconcatMap (lex3 c) (span isIdChar s : [])|isDigit cconcatMap (lex5 c) (span isDigit s : [])|otherwise[] where { isIdChar c = isAlphaNum c || c `elem` '_' : ''' : []; ; isSingle c = c `elem` ',' : ';' : '(' : ')' : '[' : ']' : '{' : '}' : '_' : '`' : []; ; isSym c = c `elem` '!' : '@' : '#' : '$' : '%' : '&' : '*' : '+' : '.' : '/' : '<' : '=' : '>' : '?' : '\' : '^' : '|' : ':' : '-' : '~' : []; ; lex2 c vu59 = lex20 c vu59; ; lex20 c (sym,t) = (c : sym,t) : []; lex20 c vuu = []; ; lex3 c vu60 = lex30 c vu60; ; lex30 c (nam,t) = (c : nam,t) : []; lex30 c vuv = []; ; lex4 c ds vu61 = lex40 c ds vu61; ; lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex40 c ds zy = []; ; lex5 c vu62 = lex50 c vu62; ; lex50 c (ds,s) = concatMap (lex4 c ds) (lexFracExp s); lex50 c zz = []; ; lexExp (e : s)|e `elem` 'e' : 'E' : []concatMap (lexExp1 e) (s : []) ++ concatMap (lexExp2 e) (lexDigits s); lexExp s = ([],s) : []; ; lexExp0 e c vu65 = lexExp00 e c vu65; ; lexExp00 e c (ds,u) = (e : c : ds,u) : []; lexExp00 e c yz = []; ; lexExp1 e vu66 = lexExp10 e vu66; ; lexExp10 e (c : t) = lexExp100 e c t (c `elem` '+' : '-' : []); lexExp10 e zv = []; ; lexExp100 e c t True = concatMap (lexExp0 e c) (lexDigits t); lexExp100 e c t False = []; ; lexExp2 e vu67 = lexExp20 e vu67; ; lexExp20 e (ds,t) = (e : ds,t) : []; lexExp20 e zu = []; ; lexFracExp ('.' : c : cs)|isDigit cconcatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp s = lexExp s; ; lexFracExp0 ds vu63 = lexFracExp00 ds vu63; ; lexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lexFracExp00 ds zx = []; ; lexFracExp1 vu64 = lexFracExp10 vu64; ; lexFracExp10 (ds,t) = concatMap (lexFracExp0 ds) (lexExp t); lexFracExp10 zw = []; } ; " is transformed to "lex [] = lex19 []; lex (c : s) = lex18 (c : s); lex (zux : s) = lex16 (zux : s); lex (yzy : s) = lex14 (yzy : s); lex (c : s) = lex12 (c : s); " "lex12 (c : s) = lex11 c s (isSingle c) where { isIdChar c = isAlphaNum c || c `elem` '_' : ''' : []; ; isSingle c = c `elem` ',' : ';' : '(' : ')' : '[' : ']' : '{' : '}' : '_' : '`' : []; ; isSym c = c `elem` '!' : '@' : '#' : '$' : '%' : '&' : '*' : '+' : '.' : '/' : '<' : '=' : '>' : '?' : '\' : '^' : '|' : ':' : '-' : '~' : []; ; lex11 c s True = (c : [],s) : []; lex11 c s False = lex9 c s (isSym c); ; lex2 c vu59 = lex20 c vu59; ; lex20 c (sym,t) = (c : sym,t) : []; lex20 c vuu = []; ; lex3 c vu60 = lex30 c vu60; ; lex30 c (nam,t) = (c : nam,t) : []; lex30 c vuv = []; ; lex4 c ds vu61 = lex40 c ds vu61; ; lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex40 c ds zy = []; ; lex5 c vu62 = lex50 c vu62; ; lex50 c (ds,s) = concatMap (lex4 c ds) (lexFracExp s); lex50 c zz = []; ; lex6 c s True = []; ; lex7 c s True = concatMap (lex5 c) (span isDigit s : []); lex7 c s False = lex6 c s otherwise; ; lex8 c s True = concatMap (lex3 c) (span isIdChar s : []); lex8 c s False = lex7 c s (isDigit c); ; lex9 c s True = concatMap (lex2 c) (span isSym s : []); lex9 c s False = lex8 c s (isAlpha c); ; lexExp (e : s) = lexExp5 (e : s); lexExp s = lexExp3 s; ; lexExp0 e c vu65 = lexExp00 e c vu65; ; lexExp00 e c (ds,u) = (e : c : ds,u) : []; lexExp00 e c yz = []; ; lexExp1 e vu66 = lexExp10 e vu66; ; lexExp10 e (c : t) = lexExp100 e c t (c `elem` '+' : '-' : []); lexExp10 e zv = []; ; lexExp100 e c t True = concatMap (lexExp0 e c) (lexDigits t); lexExp100 e c t False = []; ; lexExp2 e vu67 = lexExp20 e vu67; ; lexExp20 e (ds,t) = (e : ds,t) : []; lexExp20 e zu = []; ; lexExp3 s = ([],s) : []; ; lexExp4 e s True = concatMap (lexExp1 e) (s : []) ++ concatMap (lexExp2 e) (lexDigits s); lexExp4 e s False = lexExp3 (e : s); ; lexExp5 (e : s) = lexExp4 e s (e `elem` 'e' : 'E' : []); lexExp5 yxz = lexExp3 yxz; ; lexFracExp (yyv : yyy) = lexFracExp5 (yyv : yyy); lexFracExp s = lexFracExp2 s; ; lexFracExp0 ds vu63 = lexFracExp00 ds vu63; ; lexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lexFracExp00 ds zx = []; ; lexFracExp1 vu64 = lexFracExp10 vu64; ; lexFracExp10 (ds,t) = concatMap (lexFracExp0 ds) (lexExp t); lexFracExp10 zw = []; ; lexFracExp2 s = lexExp s; ; lexFracExp3 yyv c cs True = concatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp3 yyv c cs False = lexFracExp2 (yyv : c : cs); ; lexFracExp4 True (yyv : c : cs) = lexFracExp3 yyv c cs (isDigit c); lexFracExp4 yyz yzu = lexFracExp2 yzu; ; lexFracExp5 (yyv : yyy) = lexFracExp4 (yyv == '.') (yyv : yyy); lexFracExp5 yzv = lexFracExp2 yzv; } ; " "lex13 True (yzy : s) = concatMap lex1 (lexString s) where { lex1 vu55 = lex10 vu55; ; lex10 (str,t) = ('"' : str,t) : []; lex10 yy = []; ; lexStrItem (yvv : yvz) = lexStrItem7 (yvv : yvz); lexStrItem (xzz : yuw) = lexStrItem4 (xzz : yuw); lexStrItem s = lexStrItem1 s; ; lexStrItem0 vu58 = lexStrItem00 vu58; ; lexStrItem00 (yxu : t) = lexStrItem002 (yxu : t); lexStrItem00 yx = lexStrItem000 yx; ; lexStrItem000 yx = []; ; lexStrItem001 True (yxu : t) = ([],t) : []; lexStrItem001 yxv yxw = lexStrItem000 yxw; ; lexStrItem002 (yxu : t) = lexStrItem001 (yxu == '\') (yxu : t); lexStrItem002 yxx = lexStrItem000 yxx; ; lexStrItem1 s = lexLitChar s; ; lexStrItem2 xzz c s True = concatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem2 xzz c s False = lexStrItem1 (xzz : c : s); ; lexStrItem3 True (xzz : c : s) = lexStrItem2 xzz c s (isSpace c); lexStrItem3 yux yuy = lexStrItem1 yuy; ; lexStrItem4 (xzz : yuw) = lexStrItem3 (xzz == '\') (xzz : yuw); lexStrItem4 yuz = lexStrItem1 yuz; ; lexStrItem5 True (yvv : yvx : s) = ('\' : '&' : [],s) : []; lexStrItem5 ywu ywv = lexStrItem4 ywv; ; lexStrItem6 True (yvv : yvx : s) = lexStrItem5 (yvx == '&') (yvv : yvx : s); lexStrItem6 yww ywx = lexStrItem4 ywx; ; lexStrItem7 (yvv : yvz) = lexStrItem6 (yvv == '\') (yvv : yvz); lexStrItem7 ywy = lexStrItem4 ywy; ; lexString (xzu : s) = lexString4 (xzu : s); lexString s = lexString2 s; ; lexString0 ch vu56 = lexString00 ch vu56; ; lexString00 ch (str,u) = (ch ++ str,u) : []; lexString00 ch yv = []; ; lexString1 vu57 = lexString10 vu57; ; lexString10 (ch,t) = concatMap (lexString0 ch) (lexString t); lexString10 yw = []; ; lexString2 s = concatMap lexString1 (lexStrItem s); ; lexString3 True (xzu : s) = ('"' : [],s) : []; lexString3 xzv xzw = lexString2 xzw; ; lexString4 (xzu : s) = lexString3 (xzu == '"') (xzu : s); lexString4 xzx = lexString2 xzx; } ; lex13 yzz zuu = lex12 zuu; " "lex14 (yzy : s) = lex13 (yzy == '"') (yzy : s); lex14 zuv = lex12 zuv; " "lex15 True (zux : s) = concatMap lex0 (lexLitChar s); lex15 zuy zuz = lex14 zuz; " "lex16 (zux : s) = lex15 (zux == ''') (zux : s); lex16 zvu = lex14 zvu; " "lex17 c s True = lex (dropWhile isSpace s); lex17 c s False = lex16 (c : s); " "lex18 (c : s) = lex17 c s (isSpace c); lex18 zvw = lex16 zvw; " "lex19 [] = ([],[]) : []; lex19 zvy = lex18 zvy; " The following Function with conditions "reduce x y|y == 0error []|otherwisex `quot` d :% (y `quot` d) where { d = gcd x y; } ; " is transformed to "reduce x y = reduce2 x y; " "reduce2 x y = reduce1 x y (y == 0) where { d = gcd x y; ; reduce0 x y True = x `quot` d :% (y `quot` d); ; reduce1 x y True = error []; reduce1 x y False = reduce0 x y otherwise; } ; " The following Function with conditions "signumReal x|x == 00|x > 01|otherwise-1; " is transformed to "signumReal x = signumReal3 x; " "signumReal1 x True = 1; signumReal1 x False = signumReal0 x otherwise; " "signumReal0 x True = -1; " "signumReal2 x True = 0; signumReal2 x False = signumReal1 x (x > 0); " "signumReal3 x = signumReal2 x (x == 0); " The following Function with conditions "undefined |Falseundefined; " is transformed to "undefined = undefined1; " "undefined0 True = undefined; " "undefined1 = undefined0 False; " The following Function with conditions "readExp (e : s)|e `elem` 'e' : 'E' : []readExp' s; readExp s = (0,s) : []; " is transformed to "readExp (e : s) = readExp2 (e : s); readExp s = readExp0 s; " "readExp0 s = (0,s) : []; " "readExp1 e s True = readExp' s; readExp1 e s False = readExp0 (e : s); " "readExp2 (e : s) = readExp1 e s (e `elem` 'e' : 'E' : []); readExp2 zwu = readExp0 zwu; " The following Function with conditions "readExp' ('-' : s) = concatMap readExp'0 (readDec s); readExp' ('+' : s) = readDec s; readExp' s = readDec s; " is transformed to "readExp' (zxv : s) = readExp'5 (zxv : s); readExp' (zww : s) = readExp'3 (zww : s); readExp' s = readExp'1 s; " "readExp'1 s = readDec s; " "readExp'2 True (zww : s) = readDec s; readExp'2 zwx zwy = readExp'1 zwy; " "readExp'3 (zww : s) = readExp'2 (zww == '+') (zww : s); readExp'3 zwz = readExp'1 zwz; " "readExp'4 True (zxv : s) = concatMap readExp'0 (readDec s); readExp'4 zxw zxx = readExp'3 zxx; " "readExp'5 (zxv : s) = readExp'4 (zxv == '-') (zxv : s); readExp'5 zxy = readExp'3 zxy; " The following Function with conditions "lexFrac ('.' : s) = lexDigits s; lexFrac s = ([],s) : []; " is transformed to "lexFrac (zyu : s) = lexFrac2 (zyu : s); lexFrac s = lexFrac0 s; " "lexFrac0 s = ([],s) : []; " "lexFrac1 True (zyu : s) = lexDigits s; lexFrac1 zyv zyw = lexFrac0 zyw; " "lexFrac2 (zyu : s) = lexFrac1 (zyu == '.') (zyu : s); lexFrac2 zyx = lexFrac0 zyx; " The following Function with conditions "readFloat20 ('N' : 'a' : 'N' : [],t) = (0 / 0,t) : []; readFloat20 vwv = []; " is transformed to "readFloat20 (zzu : vuux,t) = readFloat204 (zzu : vuux,t); readFloat20 vwv = readFloat200 vwv; " "readFloat200 vwv = []; " "readFloat201 True (zzu : zzw : zzy : [],t) = (0 / 0,t) : []; readFloat201 vuuy vuuz = readFloat200 vuuz; " "readFloat202 True (zzu : zzw : zzy : zzz,t) = readFloat201 (zzy == 'N') (zzu : zzw : zzy : zzz,t); readFloat202 vuvu vuvv = readFloat200 vuvv; " "readFloat203 True (zzu : zzw : vuuv,t) = readFloat202 (zzw == 'a') (zzu : zzw : vuuv,t); readFloat203 vuvw vuvx = readFloat200 vuvx; " "readFloat204 (zzu : vuux,t) = readFloat203 (zzu == 'N') (zzu : vuux,t); readFloat204 vuvy = readFloat200 vuvy; " The following Function with conditions "readFloat30 ('I' : 'n' : 'f' : 'i' : 'n' : 'i' : 't' : 'y' : [],t) = (1 / 0,t) : []; readFloat30 vwx = []; " is transformed to "readFloat30 (vuwv : vvvu,t) = readFloat309 (vuwv : vvvu,t); readFloat30 vwx = readFloat300 vwx; " "readFloat300 vwx = []; " "readFloat301 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuyx : [],t) = (1 / 0,t) : []; readFloat301 vvvv vvvw = readFloat300 vvvw; " "readFloat302 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuyx : vuyy,t) = readFloat301 (vuyx == 'y') (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuyx : vuyy,t); readFloat302 vvvx vvvy = readFloat300 vvvy; " "readFloat303 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuzu,t) = readFloat302 (vuyv == 't') (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuzu,t); readFloat303 vvvz vvwu = readFloat300 vvwu; " "readFloat304 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuzw,t) = readFloat303 (vuxz == 'i') (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuzw,t); readFloat304 vvwv vvww = readFloat300 vvww; " "readFloat305 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuzy,t) = readFloat304 (vuxx == 'n') (vuwv : vuwx : vuwz : vuxv : vuxx : vuzy,t); readFloat305 vvwx vvwy = readFloat300 vvwy; " "readFloat306 True (vuwv : vuwx : vuwz : vuxv : vvuu,t) = readFloat305 (vuxv == 'i') (vuwv : vuwx : vuwz : vuxv : vvuu,t); readFloat306 vvwz vvxu = readFloat300 vvxu; " "readFloat307 True (vuwv : vuwx : vuwz : vvuw,t) = readFloat306 (vuwz == 'f') (vuwv : vuwx : vuwz : vvuw,t); readFloat307 vvxv vvxw = readFloat300 vvxw; " "readFloat308 True (vuwv : vuwx : vvuy,t) = readFloat307 (vuwx == 'n') (vuwv : vuwx : vvuy,t); readFloat308 vvxx vvxy = readFloat300 vvxy; " "readFloat309 (vuwv : vvvu,t) = readFloat308 (vuwv == 'I') (vuwv : vvvu,t); readFloat309 vvxz = readFloat300 vvxz; " The following Function with conditions "g x n|even ng (x * x) (n `quot` 2)|otherwisef x (n - 1) (x * y); " is transformed to "g x n = g2 x n; " "g0 x n True = f x (n - 1) (x * y); " "g1 x n True = g (x * x) (n `quot` 2); g1 x n False = g0 x n otherwise; " "g2 x n = g1 x n (even n); " The following Function with conditions "f vwy 0 y = y; f x n y = g x n where { g x n|even ng (x * x) (n `quot` 2)|otherwisef x (n - 1) (x * y); } ; " is transformed to "f vwy vvyu y = f4 vwy vvyu y; f x n y = f0 x n y; " "f0 x n y = g x n where { g x n = g2 x n; ; g0 x n True = f x (n - 1) (x * y); ; g1 x n True = g (x * x) (n `quot` 2); g1 x n False = g0 x n otherwise; ; g2 x n = g1 x n (even n); } ; " "f3 True vwy vvyu y = y; f3 vvyv vvyw vvyx vvyy = f0 vvyw vvyx vvyy; " "f4 vwy vvyu y = f3 (vvyu == 0) vwy vvyu y; f4 vvyz vvzu vvzv = f0 vvyz vvzu vvzv; " The following Function with conditions "^ x 0 = 1; ^ x n|n > 0f x (n - 1) x where { f vwy 0 y = y; f x n y = g x n where { g x n|even ng (x * x) (n `quot` 2)|otherwisef x (n - 1) (x * y); } ; } ; ^ vwz vxu = error []; " is transformed to "^ x vvzy = pr4 x vvzy; ^ x n = pr2 x n; ^ vwz vxu = pr0 vwz vxu; " "pr0 vwz vxu = error []; " "pr2 x n = pr1 x n (n > 0) where { f vwy vvyu y = f4 vwy vvyu y; f x n y = f0 x n y; ; f0 x n y = g x n where { g x n = g2 x n; ; g0 x n True = f x (n - 1) (x * y); ; g1 x n True = g (x * x) (n `quot` 2); g1 x n False = g0 x n otherwise; ; g2 x n = g1 x n (even n); } ; ; f3 True vwy vvyu y = y; f3 vvyv vvyw vvyx vvyy = f0 vvyw vvyx vvyy; ; f4 vwy vvyu y = f3 (vvyu == 0) vwy vvyu y; f4 vvyz vvzu vvzv = f0 vvyz vvzu vvzv; ; pr1 x n True = f x (n - 1) x; pr1 x n False = pr0 x n; } ; pr2 vvzw vvzx = pr0 vvzw vvzx; " "pr3 True x vvzy = 1; pr3 vvzz vwuu vwuv = pr2 vwuu vwuv; " "pr4 x vvzy = pr3 (vvzy == 0) x vvzy; pr4 vwuw vwux = pr2 vwuw vwux; " The following Function with conditions "dropWhile p [] = []; dropWhile p (vxv : vxw)|p vxvdropWhile p vxw|otherwisevxv : vxw; " is transformed to "dropWhile p [] = dropWhile3 p []; dropWhile p (vxv : vxw) = dropWhile2 p (vxv : vxw); " "dropWhile0 p vxv vxw True = vxv : vxw; " "dropWhile1 p vxv vxw True = dropWhile p vxw; dropWhile1 p vxv vxw False = dropWhile0 p vxv vxw otherwise; " "dropWhile2 p (vxv : vxw) = dropWhile1 p vxv vxw (p vxv); " "dropWhile3 p [] = []; dropWhile3 vwvu vwvv = dropWhile2 vwvu vwvv; " The following Function with conditions "lex00 (ch,''' : t) = lex000 ch t (ch /= ''' : []); lex00 vxy = []; " is transformed to "lex00 (ch,vwvy : t) = lex003 (ch,vwvy : t); lex00 vxy = lex001 vxy; " "lex001 vxy = []; " "lex002 True (ch,vwvy : t) = lex000 ch t (ch /= ''' : []); lex002 vwvz vwwu = lex001 vwwu; " "lex003 (ch,vwvy : t) = lex002 (vwvy == ''') (ch,vwvy : t); lex003 vwwv = lex001 vwwv; " The following Function with conditions "span p [] = ([],[]); span p (vxz : vyu)|p vxz(vxz : ys,zs)|otherwise([],vxz : vyu) where { vu43 = span p vyu; ; ys = ys0 vu43; ; ys0 (ys,vyw) = ys; ; zs = zs0 vu43; ; zs0 (vyv,zs) = zs; } ; " is transformed to "span p [] = span3 p []; span p (vxz : vyu) = span2 p (vxz : vyu); " "span2 p (vxz : vyu) = span1 p vxz vyu (p vxz) where { span0 p vxz vyu True = ([],vxz : vyu); ; span1 p vxz vyu True = (vxz : ys,zs); span1 p vxz vyu False = span0 p vxz vyu otherwise; ; vu43 = span p vyu; ; ys = ys0 vu43; ; ys0 (ys,vyw) = ys; ; zs = zs0 vu43; ; zs0 (vyv,zs) = zs; } ; " "span3 p [] = ([],[]); span3 vwwy vwwz = span2 vwwy vwwz; " The following Function with conditions "lexmatch (x : xs) (y : ys)|x == ylexmatch xs ys; lexmatch xs ys = (xs,ys); " is transformed to "lexmatch (x : xs) (y : ys) = lexmatch2 (x : xs) (y : ys); lexmatch xs ys = lexmatch0 xs ys; " "lexmatch0 xs ys = (xs,ys); " "lexmatch1 x xs y ys True = lexmatch xs ys; lexmatch1 x xs y ys False = lexmatch0 (x : xs) (y : ys); " "lexmatch2 (x : xs) (y : ys) = lexmatch1 x xs y ys (x == y); lexmatch2 vwxw vwxx = lexmatch0 vwxw vwxx; " The following Function with conditions "absReal x|x >= 0x|otherwise`negate` x; " is transformed to "absReal x = absReal2 x; " "absReal0 x True = `negate` x; " "absReal1 x True = x; absReal1 x False = absReal0 x otherwise; " "absReal2 x = absReal1 x (x >= 0); " The following Function with conditions "mandatory20 ('(' : [],s) = concatMap mandatory1 (optional s); mandatory20 wux = []; " is transformed to "mandatory20 (vwyu : vwyv,s) = mandatory202 (vwyu : vwyv,s); mandatory20 wux = mandatory200 wux; " "mandatory200 wux = []; " "mandatory201 True (vwyu : [],s) = concatMap mandatory1 (optional s); mandatory201 vwyw vwyx = mandatory200 vwyx; " "mandatory202 (vwyu : vwyv,s) = mandatory201 (vwyu == '(') (vwyu : vwyv,s); mandatory202 vwyy = mandatory200 vwyy; " The following Function with conditions "mandatory00 x (')' : [],u) = (x,u) : []; mandatory00 x wuy = []; " is transformed to "mandatory00 x (vwzv : vwzw,u) = mandatory002 x (vwzv : vwzw,u); mandatory00 x wuy = mandatory000 x wuy; " "mandatory000 x wuy = []; " "mandatory001 True x (vwzv : [],u) = (x,u) : []; mandatory001 vwzx vwzy vwzz = mandatory000 vwzy vwzz; " "mandatory002 x (vwzv : vwzw,u) = mandatory001 (vwzv == ')') x (vwzv : vwzw,u); mandatory002 vxuu vxuv = mandatory000 vxuu vxuv; " The following Function with conditions "read'10 ('-' : [],s) = concatMap read'0 (read'' s); read'10 wvw = []; " is transformed to "read'10 (vxuy : vxuz,s) = read'102 (vxuy : vxuz,s); read'10 wvw = read'100 wvw; " "read'100 wvw = []; " "read'101 True (vxuy : [],s) = concatMap read'0 (read'' s); read'101 vxvu vxvv = read'100 vxvv; " "read'102 (vxuy : vxuz,s) = read'101 (vxuy == '-') (vxuy : vxuz,s); read'102 vxvw = read'100 vxvw; " The following Function with conditions "lexEsc (c : s)|c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : [](c : [],s) : []; lexEsc ('^' : c : s)|c >= '@' && c <= '_'('^' : c : [],s) : []; lexEsc ('o' : s) = prefix 'o' (span isOctDigit s) : []; lexEsc ('x' : s) = prefix 'x' (span isHexDigit s) : []; lexEsc (wvz : wwu)|isDigit wvzspan isDigit (wvz : wwu) : []|isUpper wvzlexEsc2 (concatMap (lexEsc1 (wvz : wwu)) table); lexEsc wwv = []; " is transformed to "lexEsc (c : s) = lexEsc16 (c : s); lexEsc (vxxy : vxyv) = lexEsc14 (vxxy : vxyv); lexEsc (vxwz : s) = lexEsc11 (vxwz : s); lexEsc (vxwu : s) = lexEsc8 (vxwu : s); lexEsc (wvz : wwu) = lexEsc6 (wvz : wwu); lexEsc wwv = lexEsc3 wwv; " "lexEsc3 wwv = []; " "lexEsc5 wvz wwu True = span isDigit (wvz : wwu) : []; lexEsc5 wvz wwu False = lexEsc4 wvz wwu (isUpper wvz); " "lexEsc4 wvz wwu True = lexEsc2 (concatMap (lexEsc1 (wvz : wwu)) table); lexEsc4 wvz wwu False = lexEsc3 (wvz : wwu); " "lexEsc6 (wvz : wwu) = lexEsc5 wvz wwu (isDigit wvz); lexEsc6 vxvy = lexEsc3 vxvy; " "lexEsc7 True (vxwu : s) = prefix 'x' (span isHexDigit s) : []; lexEsc7 vxwv vxww = lexEsc6 vxww; " "lexEsc8 (vxwu : s) = lexEsc7 (vxwu == 'x') (vxwu : s); lexEsc8 vxwx = lexEsc6 vxwx; " "lexEsc9 True (vxwz : s) = prefix 'o' (span isOctDigit s) : []; lexEsc9 vxxu vxxv = lexEsc8 vxxv; " "lexEsc11 (vxwz : s) = lexEsc9 (vxwz == 'o') (vxwz : s); lexEsc11 vxxw = lexEsc8 vxxw; " "lexEsc12 vxxy c s True = ('^' : c : [],s) : []; lexEsc12 vxxy c s False = lexEsc11 (vxxy : c : s); " "lexEsc13 True (vxxy : c : s) = lexEsc12 vxxy c s (c >= '@' && c <= '_'); lexEsc13 vxyw vxyx = lexEsc11 vxyx; " "lexEsc14 (vxxy : vxyv) = lexEsc13 (vxxy == '^') (vxxy : vxyv); lexEsc14 vxyy = lexEsc11 vxyy; " "lexEsc15 c s True = (c : [],s) : []; lexEsc15 c s False = lexEsc14 (c : s); " "lexEsc16 (c : s) = lexEsc15 c s (c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : []); lexEsc16 vxzu = lexEsc14 vxzu; " The following Function with conditions "lexLitChar [] = []; lexLitChar (c : s)|c /= '\'(c : [],s) : []|otherwisemap (prefix '\') (lexEsc s) where { lexEsc (c : s)|c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : [](c : [],s) : []; lexEsc ('^' : c : s)|c >= '@' && c <= '_'('^' : c : [],s) : []; lexEsc ('o' : s) = prefix 'o' (span isOctDigit s) : []; lexEsc ('x' : s) = prefix 'x' (span isHexDigit s) : []; lexEsc (wvz : wwu)|isDigit wvzspan isDigit (wvz : wwu) : []|isUpper wvzlexEsc2 (concatMap (lexEsc1 (wvz : wwu)) table); lexEsc wwv = []; ; lexEsc0 mne vu69 = lexEsc00 mne vu69; ; lexEsc00 mne ([],s') = (mne,s') : []; lexEsc00 mne wwx = []; ; lexEsc1 s vu70 = lexEsc10 s vu70; ; lexEsc10 s (c,mne) = concatMap (lexEsc0 mne) (lexmatch mne s : []); lexEsc10 s wwy = []; ; lexEsc2 (pr : www) = pr : []; lexEsc2 [] = []; ; prefix c (t,s) = (c : t,s); ; table = ('\127','D' : 'E' : 'L' : []) : asciiTab; } ; " is transformed to "lexLitChar [] = lexLitChar3 []; lexLitChar (c : s) = lexLitChar2 (c : s); " "lexLitChar2 (c : s) = lexLitChar1 c s (c /= '\') where { lexEsc (c : s) = lexEsc16 (c : s); lexEsc (vxxy : vxyv) = lexEsc14 (vxxy : vxyv); lexEsc (vxwz : s) = lexEsc11 (vxwz : s); lexEsc (vxwu : s) = lexEsc8 (vxwu : s); lexEsc (wvz : wwu) = lexEsc6 (wvz : wwu); lexEsc wwv = lexEsc3 wwv; ; lexEsc0 mne vu69 = lexEsc00 mne vu69; ; lexEsc00 mne ([],s') = (mne,s') : []; lexEsc00 mne wwx = []; ; lexEsc1 s vu70 = lexEsc10 s vu70; ; lexEsc10 s (c,mne) = concatMap (lexEsc0 mne) (lexmatch mne s : []); lexEsc10 s wwy = []; ; lexEsc11 (vxwz : s) = lexEsc9 (vxwz == 'o') (vxwz : s); lexEsc11 vxxw = lexEsc8 vxxw; ; lexEsc12 vxxy c s True = ('^' : c : [],s) : []; lexEsc12 vxxy c s False = lexEsc11 (vxxy : c : s); ; lexEsc13 True (vxxy : c : s) = lexEsc12 vxxy c s (c >= '@' && c <= '_'); lexEsc13 vxyw vxyx = lexEsc11 vxyx; ; lexEsc14 (vxxy : vxyv) = lexEsc13 (vxxy == '^') (vxxy : vxyv); lexEsc14 vxyy = lexEsc11 vxyy; ; lexEsc15 c s True = (c : [],s) : []; lexEsc15 c s False = lexEsc14 (c : s); ; lexEsc16 (c : s) = lexEsc15 c s (c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : []); lexEsc16 vxzu = lexEsc14 vxzu; ; lexEsc2 (pr : www) = pr : []; lexEsc2 [] = []; ; lexEsc3 wwv = []; ; lexEsc4 wvz wwu True = lexEsc2 (concatMap (lexEsc1 (wvz : wwu)) table); lexEsc4 wvz wwu False = lexEsc3 (wvz : wwu); ; lexEsc5 wvz wwu True = span isDigit (wvz : wwu) : []; lexEsc5 wvz wwu False = lexEsc4 wvz wwu (isUpper wvz); ; lexEsc6 (wvz : wwu) = lexEsc5 wvz wwu (isDigit wvz); lexEsc6 vxvy = lexEsc3 vxvy; ; lexEsc7 True (vxwu : s) = prefix 'x' (span isHexDigit s) : []; lexEsc7 vxwv vxww = lexEsc6 vxww; ; lexEsc8 (vxwu : s) = lexEsc7 (vxwu == 'x') (vxwu : s); lexEsc8 vxwx = lexEsc6 vxwx; ; lexEsc9 True (vxwz : s) = prefix 'o' (span isOctDigit s) : []; lexEsc9 vxxu vxxv = lexEsc8 vxxv; ; lexLitChar0 c s True = map (prefix '\') (lexEsc s); ; lexLitChar1 c s True = (c : [],s) : []; lexLitChar1 c s False = lexLitChar0 c s otherwise; ; prefix c (t,s) = (c : t,s); ; table = ('\127','D' : 'E' : 'L' : []) : asciiTab; } ; " "lexLitChar3 [] = []; lexLitChar3 vxzx = lexLitChar2 vxzx; " ---------------------------------------- (10) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (11) LetRed (EQUIVALENT) Let/Where Reductions: The bindings of the following Let/Where expression "readParen False readList2 where { readList0 vu13 = readList00 vu13; ; readList00 pr = pr : []; readList00 wv = []; ; readList1 vu14 = readList10 vu14; ; readList10 (wyw : wyx,s) = readList102 (wyw : wyx,s); readList10 vx = readList100 vx; ; readList100 vx = []; ; readList101 True (wyw : [],s) = concatMap readList0 (readl s); readList101 wyy wyz = readList100 wyz; ; readList102 (wyw : wyx,s) = readList101 (wyw == '[') (wyw : wyx,s); readList102 wzu = readList100 wzu; ; readList2 r = concatMap readList1 (lex r); ; readl s = concatMap readl0 (lex s) ++ concatMap readl2 (reads s); ; readl' s = concatMap readl'0 (lex s) ++ concatMap readl'3 (lex s); ; readl'0 vu18 = readl'00 vu18; ; readl'00 (wxv : wxw,t) = readl'002 (wxv : wxw,t); readl'00 vw = readl'000 vw; ; readl'000 vw = []; ; readl'001 True (wxv : [],t) = ([],t) : []; readl'001 wxx wxy = readl'000 wxy; ; readl'002 (wxv : wxw,t) = readl'001 (wxv == ']') (wxv : wxw,t); readl'002 wxz = readl'000 wxz; ; readl'1 x vu19 = readl'10 x vu19; ; readl'10 x (xs,v) = (x : xs,v) : []; readl'10 x vv = []; ; readl'2 vu20 = readl'20 vu20; ; readl'20 (x,u) = concatMap (readl'1 x) (readl' u); readl'20 wx = []; ; readl'3 vu21 = readl'30 vu21; ; readl'30 (xuy : xuz,t) = readl'302 (xuy : xuz,t); readl'30 ww = readl'300 ww; ; readl'300 ww = []; ; readl'301 True (xuy : [],t) = concatMap readl'2 (reads t); readl'301 xvu xvv = readl'300 xvv; ; readl'302 (xuy : xuz,t) = readl'301 (xuy == ',') (xuy : xuz,t); readl'302 xvw = readl'300 xvw; ; readl0 vu15 = readl00 vu15; ; readl00 (wzx : wzy,t) = readl002 (wzx : wzy,t); readl00 wu = readl000 wu; ; readl000 wu = []; ; readl001 True (wzx : [],t) = ([],t) : []; readl001 wzz xuu = readl000 xuu; ; readl002 (wzx : wzy,t) = readl001 (wzx == ']') (wzx : wzy,t); readl002 xuv = readl000 xuv; ; readl1 x vu16 = readl10 x vu16; ; readl10 x (xs,u) = (x : xs,u) : []; readl10 x vy = []; ; readl2 vu17 = readl20 vu17; ; readl20 (x,t) = concatMap (readl1 x) (readl' t); readl20 vz = []; } " are unpacked to the following functions on top level "readListReadl'302 (xuy : xuz,t) = readListReadl'301 (xuy == ',') (xuy : xuz,t); readListReadl'302 xvw = readListReadl'300 xvw; " "readListReadList1 vu14 = readListReadList10 vu14; " "readListReadList102 (wyw : wyx,s) = readListReadList101 (wyw == '[') (wyw : wyx,s); readListReadList102 wzu = readListReadList100 wzu; " "readListReadl s = concatMap readListReadl0 (lex s) ++ concatMap readListReadl2 (reads s); " "readListReadl'002 (wxv : wxw,t) = readListReadl'001 (wxv == ']') (wxv : wxw,t); readListReadl'002 wxz = readListReadl'000 wxz; " "readListReadl' s = concatMap readListReadl'0 (lex s) ++ concatMap readListReadl'3 (lex s); " "readListReadl0 vu15 = readListReadl00 vu15; " "readListReadList00 pr = pr : []; readListReadList00 wv = []; " "readListReadl'30 (xuy : xuz,t) = readListReadl'302 (xuy : xuz,t); readListReadl'30 ww = readListReadl'300 ww; " "readListReadl'001 True (wxv : [],t) = ([],t) : []; readListReadl'001 wxx wxy = readListReadl'000 wxy; " "readListReadl'20 (x,u) = concatMap (readListReadl'1 x) (readListReadl' u); readListReadl'20 wx = []; " "readListReadl'2 vu20 = readListReadl'20 vu20; " "readListReadl001 True (wzx : [],t) = ([],t) : []; readListReadl001 wzz xuu = readListReadl000 xuu; " "readListReadl10 x (xs,u) = (x : xs,u) : []; readListReadl10 x vy = []; " "readListReadl'1 x vu19 = readListReadl'10 x vu19; " "readListReadList0 vu13 = readListReadList00 vu13; " "readListReadList101 True (wyw : [],s) = concatMap readListReadList0 (readListReadl s); readListReadList101 wyy wyz = readListReadList100 wyz; " "readListReadl20 (x,t) = concatMap (readListReadl1 x) (readListReadl' t); readListReadl20 vz = []; " "readListReadList100 vx = []; " "readListReadl'000 vw = []; " "readListReadl2 vu17 = readListReadl20 vu17; " "readListReadl'301 True (xuy : [],t) = concatMap readListReadl'2 (reads t); readListReadl'301 xvu xvv = readListReadl'300 xvv; " "readListReadl1 x vu16 = readListReadl10 x vu16; " "readListReadl002 (wzx : wzy,t) = readListReadl001 (wzx == ']') (wzx : wzy,t); readListReadl002 xuv = readListReadl000 xuv; " "readListReadList2 r = concatMap readListReadList1 (lex r); " "readListReadl00 (wzx : wzy,t) = readListReadl002 (wzx : wzy,t); readListReadl00 wu = readListReadl000 wu; " "readListReadl000 wu = []; " "readListReadl'10 x (xs,v) = (x : xs,v) : []; readListReadl'10 x vv = []; " "readListReadl'3 vu21 = readListReadl'30 vu21; " "readListReadl'00 (wxv : wxw,t) = readListReadl'002 (wxv : wxw,t); readListReadl'00 vw = readListReadl'000 vw; " "readListReadl'0 vu18 = readListReadl'00 vu18; " "readListReadList10 (wyw : wyx,s) = readListReadList102 (wyw : wyx,s); readListReadList10 vx = readListReadList100 vx; " "readListReadl'300 ww = []; " The bindings of the following Let/Where expression "gcd' (abs x) (abs y) where { gcd' x xwv = gcd'2 x xwv; gcd' x y = gcd'0 x y; ; gcd'0 x y = gcd' y (x `rem` y); ; gcd'1 True x xwv = x; gcd'1 xww xwx xwy = gcd'0 xwx xwy; ; gcd'2 x xwv = gcd'1 (xwv == 0) x xwv; gcd'2 xwz xxu = gcd'0 xwz xxu; } " are unpacked to the following functions on top level "gcd0Gcd'1 True x xwv = x; gcd0Gcd'1 xww xwx xwy = gcd0Gcd'0 xwx xwy; " "gcd0Gcd'2 x xwv = gcd0Gcd'1 (xwv == 0) x xwv; gcd0Gcd'2 xwz xxu = gcd0Gcd'0 xwz xxu; " "gcd0Gcd'0 x y = gcd0Gcd' y (x `rem` y); " "gcd0Gcd' x xwv = gcd0Gcd'2 x xwv; gcd0Gcd' x y = gcd0Gcd'0 x y; " The bindings of the following Let/Where expression "reduce1 x y (y == 0) where { d = gcd x y; ; reduce0 x y True = x `quot` d :% (y `quot` d); ; reduce1 x y True = error []; reduce1 x y False = reduce0 x y otherwise; } " are unpacked to the following functions on top level "reduce2Reduce0 vxzy vxzz x y True = x `quot` reduce2D vxzy vxzz :% (y `quot` reduce2D vxzy vxzz); " "reduce2D vxzy vxzz = gcd vxzy vxzz; " "reduce2Reduce1 vxzy vxzz x y True = error []; reduce2Reduce1 vxzy vxzz x y False = reduce2Reduce0 vxzy vxzz x y otherwise; " The bindings of the following Let/Where expression "lexLitChar1 c s (c /= '\') where { lexEsc (c : s) = lexEsc16 (c : s); lexEsc (vxxy : vxyv) = lexEsc14 (vxxy : vxyv); lexEsc (vxwz : s) = lexEsc11 (vxwz : s); lexEsc (vxwu : s) = lexEsc8 (vxwu : s); lexEsc (wvz : wwu) = lexEsc6 (wvz : wwu); lexEsc wwv = lexEsc3 wwv; ; lexEsc0 mne vu69 = lexEsc00 mne vu69; ; lexEsc00 mne ([],s') = (mne,s') : []; lexEsc00 mne wwx = []; ; lexEsc1 s vu70 = lexEsc10 s vu70; ; lexEsc10 s (c,mne) = concatMap (lexEsc0 mne) (lexmatch mne s : []); lexEsc10 s wwy = []; ; lexEsc11 (vxwz : s) = lexEsc9 (vxwz == 'o') (vxwz : s); lexEsc11 vxxw = lexEsc8 vxxw; ; lexEsc12 vxxy c s True = ('^' : c : [],s) : []; lexEsc12 vxxy c s False = lexEsc11 (vxxy : c : s); ; lexEsc13 True (vxxy : c : s) = lexEsc12 vxxy c s (c >= '@' && c <= '_'); lexEsc13 vxyw vxyx = lexEsc11 vxyx; ; lexEsc14 (vxxy : vxyv) = lexEsc13 (vxxy == '^') (vxxy : vxyv); lexEsc14 vxyy = lexEsc11 vxyy; ; lexEsc15 c s True = (c : [],s) : []; lexEsc15 c s False = lexEsc14 (c : s); ; lexEsc16 (c : s) = lexEsc15 c s (c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : []); lexEsc16 vxzu = lexEsc14 vxzu; ; lexEsc2 (pr : www) = pr : []; lexEsc2 [] = []; ; lexEsc3 wwv = []; ; lexEsc4 wvz wwu True = lexEsc2 (concatMap (lexEsc1 (wvz : wwu)) table); lexEsc4 wvz wwu False = lexEsc3 (wvz : wwu); ; lexEsc5 wvz wwu True = span isDigit (wvz : wwu) : []; lexEsc5 wvz wwu False = lexEsc4 wvz wwu (isUpper wvz); ; lexEsc6 (wvz : wwu) = lexEsc5 wvz wwu (isDigit wvz); lexEsc6 vxvy = lexEsc3 vxvy; ; lexEsc7 True (vxwu : s) = prefix 'x' (span isHexDigit s) : []; lexEsc7 vxwv vxww = lexEsc6 vxww; ; lexEsc8 (vxwu : s) = lexEsc7 (vxwu == 'x') (vxwu : s); lexEsc8 vxwx = lexEsc6 vxwx; ; lexEsc9 True (vxwz : s) = prefix 'o' (span isOctDigit s) : []; lexEsc9 vxxu vxxv = lexEsc8 vxxv; ; lexLitChar0 c s True = map (prefix '\') (lexEsc s); ; lexLitChar1 c s True = (c : [],s) : []; lexLitChar1 c s False = lexLitChar0 c s otherwise; ; prefix c (t,s) = (c : t,s); ; table = ('\127','D' : 'E' : 'L' : []) : asciiTab; } " are unpacked to the following functions on top level "lexLitChar2LexEsc15 c s True = (c : [],s) : []; lexLitChar2LexEsc15 c s False = lexLitChar2LexEsc14 (c : s); " "lexLitChar2LexEsc12 vxxy c s True = ('^' : c : [],s) : []; lexLitChar2LexEsc12 vxxy c s False = lexLitChar2LexEsc11 (vxxy : c : s); " "lexLitChar2LexEsc11 (vxwz : s) = lexLitChar2LexEsc9 (vxwz == 'o') (vxwz : s); lexLitChar2LexEsc11 vxxw = lexLitChar2LexEsc8 vxxw; " "lexLitChar2LexLitChar1 c s True = (c : [],s) : []; lexLitChar2LexLitChar1 c s False = lexLitChar2LexLitChar0 c s otherwise; " "lexLitChar2LexEsc16 (c : s) = lexLitChar2LexEsc15 c s (c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : []); lexLitChar2LexEsc16 vxzu = lexLitChar2LexEsc14 vxzu; " "lexLitChar2Table = ('\127','D' : 'E' : 'L' : []) : asciiTab; " "lexLitChar2LexEsc (c : s) = lexLitChar2LexEsc16 (c : s); lexLitChar2LexEsc (vxxy : vxyv) = lexLitChar2LexEsc14 (vxxy : vxyv); lexLitChar2LexEsc (vxwz : s) = lexLitChar2LexEsc11 (vxwz : s); lexLitChar2LexEsc (vxwu : s) = lexLitChar2LexEsc8 (vxwu : s); lexLitChar2LexEsc (wvz : wwu) = lexLitChar2LexEsc6 (wvz : wwu); lexLitChar2LexEsc wwv = lexLitChar2LexEsc3 wwv; " "lexLitChar2LexEsc8 (vxwu : s) = lexLitChar2LexEsc7 (vxwu == 'x') (vxwu : s); lexLitChar2LexEsc8 vxwx = lexLitChar2LexEsc6 vxwx; " "lexLitChar2LexEsc0 mne vu69 = lexLitChar2LexEsc00 mne vu69; " "lexLitChar2LexLitChar0 c s True = map (lexLitChar2Prefix '\') (lexLitChar2LexEsc s); " "lexLitChar2LexEsc14 (vxxy : vxyv) = lexLitChar2LexEsc13 (vxxy == '^') (vxxy : vxyv); lexLitChar2LexEsc14 vxyy = lexLitChar2LexEsc11 vxyy; " "lexLitChar2LexEsc13 True (vxxy : c : s) = lexLitChar2LexEsc12 vxxy c s (c >= '@' && c <= '_'); lexLitChar2LexEsc13 vxyw vxyx = lexLitChar2LexEsc11 vxyx; " "lexLitChar2Prefix c (t,s) = (c : t,s); " "lexLitChar2LexEsc4 wvz wwu True = lexLitChar2LexEsc2 (concatMap (lexLitChar2LexEsc1 (wvz : wwu)) lexLitChar2Table); lexLitChar2LexEsc4 wvz wwu False = lexLitChar2LexEsc3 (wvz : wwu); " "lexLitChar2LexEsc00 mne ([],s') = (mne,s') : []; lexLitChar2LexEsc00 mne wwx = []; " "lexLitChar2LexEsc6 (wvz : wwu) = lexLitChar2LexEsc5 wvz wwu (isDigit wvz); lexLitChar2LexEsc6 vxvy = lexLitChar2LexEsc3 vxvy; " "lexLitChar2LexEsc9 True (vxwz : s) = lexLitChar2Prefix 'o' (span isOctDigit s) : []; lexLitChar2LexEsc9 vxxu vxxv = lexLitChar2LexEsc8 vxxv; " "lexLitChar2LexEsc1 s vu70 = lexLitChar2LexEsc10 s vu70; " "lexLitChar2LexEsc7 True (vxwu : s) = lexLitChar2Prefix 'x' (span isHexDigit s) : []; lexLitChar2LexEsc7 vxwv vxww = lexLitChar2LexEsc6 vxww; " "lexLitChar2LexEsc2 (pr : www) = pr : []; lexLitChar2LexEsc2 [] = []; " "lexLitChar2LexEsc3 wwv = []; " "lexLitChar2LexEsc5 wvz wwu True = span isDigit (wvz : wwu) : []; lexLitChar2LexEsc5 wvz wwu False = lexLitChar2LexEsc4 wvz wwu (isUpper wvz); " "lexLitChar2LexEsc10 s (c,mne) = concatMap (lexLitChar2LexEsc0 mne) (lexmatch mne s : []); lexLitChar2LexEsc10 s wwy = []; " The bindings of the following Let/Where expression "concatMap readFloat1 (readFix r) ++ concatMap readFloat2 (lex r) ++ concatMap readFloat3 (lex r) where { lexFrac (zyu : s) = lexFrac2 (zyu : s); lexFrac s = lexFrac0 s; ; lexFrac0 s = ([],s) : []; ; lexFrac1 True (zyu : s) = lexDigits s; lexFrac1 zyv zyw = lexFrac0 zyw; ; lexFrac2 (zyu : s) = lexFrac1 (zyu == '.') (zyu : s); lexFrac2 zyx = lexFrac0 zyx; ; readExp (e : s) = readExp2 (e : s); readExp s = readExp0 s; ; readExp' (zxv : s) = readExp'5 (zxv : s); readExp' (zww : s) = readExp'3 (zww : s); readExp' s = readExp'1 s; ; readExp'0 vu88 = readExp'00 vu88; ; readExp'00 (k,t) = (`negate` k,t) : []; readExp'00 vvx = []; ; readExp'1 s = readDec s; ; readExp'2 True (zww : s) = readDec s; readExp'2 zwx zwy = readExp'1 zwy; ; readExp'3 (zww : s) = readExp'2 (zww == '+') (zww : s); readExp'3 zwz = readExp'1 zwz; ; readExp'4 True (zxv : s) = concatMap readExp'0 (readDec s); readExp'4 zxw zxx = readExp'3 zxx; ; readExp'5 (zxv : s) = readExp'4 (zxv == '-') (zxv : s); readExp'5 zxy = readExp'3 zxy; ; readExp0 s = (0,s) : []; ; readExp1 e s True = readExp' s; readExp1 e s False = readExp0 (e : s); ; readExp2 (e : s) = readExp1 e s (e `elem` 'e' : 'E' : []); readExp2 zwu = readExp0 zwu; ; readFix r = concatMap readFix1 (lexDigits r); ; readFix0 ds vu86 = readFix00 ds vu86; ; readFix00 ds (ds',t) = (read (ds ++ ds'),length ds',t) : []; readFix00 ds vvy = []; ; readFix1 vu87 = readFix10 vu87; ; readFix10 (ds,d) = concatMap (readFix0 ds) (lexFrac d); readFix10 vvz = []; ; readFloat0 n d vu82 = readFloat00 n d vu82; ; readFloat00 n d (k,t) = (fromRational (n % 1 * 10 ^^ (k - d)),t) : []; readFloat00 n d vwu = []; ; readFloat1 vu83 = readFloat10 vu83; ; readFloat10 (n,d,s) = concatMap (readFloat0 n d) (readExp s); readFloat10 vww = []; ; readFloat2 vu84 = readFloat20 vu84; ; readFloat20 (zzu : vuux,t) = readFloat204 (zzu : vuux,t); readFloat20 vwv = readFloat200 vwv; ; readFloat200 vwv = []; ; readFloat201 True (zzu : zzw : zzy : [],t) = (0 / 0,t) : []; readFloat201 vuuy vuuz = readFloat200 vuuz; ; readFloat202 True (zzu : zzw : zzy : zzz,t) = readFloat201 (zzy == 'N') (zzu : zzw : zzy : zzz,t); readFloat202 vuvu vuvv = readFloat200 vuvv; ; readFloat203 True (zzu : zzw : vuuv,t) = readFloat202 (zzw == 'a') (zzu : zzw : vuuv,t); readFloat203 vuvw vuvx = readFloat200 vuvx; ; readFloat204 (zzu : vuux,t) = readFloat203 (zzu == 'N') (zzu : vuux,t); readFloat204 vuvy = readFloat200 vuvy; ; readFloat3 vu85 = readFloat30 vu85; ; readFloat30 (vuwv : vvvu,t) = readFloat309 (vuwv : vvvu,t); readFloat30 vwx = readFloat300 vwx; ; readFloat300 vwx = []; ; readFloat301 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuyx : [],t) = (1 / 0,t) : []; readFloat301 vvvv vvvw = readFloat300 vvvw; ; readFloat302 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuyx : vuyy,t) = readFloat301 (vuyx == 'y') (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuyx : vuyy,t); readFloat302 vvvx vvvy = readFloat300 vvvy; ; readFloat303 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuzu,t) = readFloat302 (vuyv == 't') (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuzu,t); readFloat303 vvvz vvwu = readFloat300 vvwu; ; readFloat304 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuzw,t) = readFloat303 (vuxz == 'i') (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuzw,t); readFloat304 vvwv vvww = readFloat300 vvww; ; readFloat305 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuzy,t) = readFloat304 (vuxx == 'n') (vuwv : vuwx : vuwz : vuxv : vuxx : vuzy,t); readFloat305 vvwx vvwy = readFloat300 vvwy; ; readFloat306 True (vuwv : vuwx : vuwz : vuxv : vvuu,t) = readFloat305 (vuxv == 'i') (vuwv : vuwx : vuwz : vuxv : vvuu,t); readFloat306 vvwz vvxu = readFloat300 vvxu; ; readFloat307 True (vuwv : vuwx : vuwz : vvuw,t) = readFloat306 (vuwz == 'f') (vuwv : vuwx : vuwz : vvuw,t); readFloat307 vvxv vvxw = readFloat300 vvxw; ; readFloat308 True (vuwv : vuwx : vvuy,t) = readFloat307 (vuwx == 'n') (vuwv : vuwx : vvuy,t); readFloat308 vvxx vvxy = readFloat300 vvxy; ; readFloat309 (vuwv : vvvu,t) = readFloat308 (vuwv == 'I') (vuwv : vvvu,t); readFloat309 vvxz = readFloat300 vvxz; } " are unpacked to the following functions on top level "readFloatReadFloat301 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuyx : [],t) = (1 / 0,t) : []; readFloatReadFloat301 vvvv vvvw = readFloatReadFloat300 vvvw; " "readFloatReadFix r = concatMap readFloatReadFix1 (lexDigits r); " "readFloatReadFix1 vu87 = readFloatReadFix10 vu87; " "readFloatReadExp2 (e : s) = readFloatReadExp1 e s (e `elem` 'e' : 'E' : []); readFloatReadExp2 zwu = readFloatReadExp0 zwu; " "readFloatReadFix00 ds (ds',t) = (read (ds ++ ds'),length ds',t) : []; readFloatReadFix00 ds vvy = []; " "readFloatReadFloat30 (vuwv : vvvu,t) = readFloatReadFloat309 (vuwv : vvvu,t); readFloatReadFloat30 vwx = readFloatReadFloat300 vwx; " "readFloatLexFrac0 s = ([],s) : []; " "readFloatReadFix0 ds vu86 = readFloatReadFix00 ds vu86; " "readFloatReadExp'3 (zww : s) = readFloatReadExp'2 (zww == '+') (zww : s); readFloatReadExp'3 zwz = readFloatReadExp'1 zwz; " "readFloatLexFrac1 True (zyu : s) = lexDigits s; readFloatLexFrac1 zyv zyw = readFloatLexFrac0 zyw; " "readFloatReadExp (e : s) = readFloatReadExp2 (e : s); readFloatReadExp s = readFloatReadExp0 s; " "readFloatReadFloat300 vwx = []; " "readFloatReadExp'00 (k,t) = (`negate` k,t) : []; readFloatReadExp'00 vvx = []; " "readFloatReadExp0 s = (0,s) : []; " "readFloatReadFloat1 vu83 = readFloatReadFloat10 vu83; " "readFloatReadFloat204 (zzu : vuux,t) = readFloatReadFloat203 (zzu == 'N') (zzu : vuux,t); readFloatReadFloat204 vuvy = readFloatReadFloat200 vuvy; " "readFloatReadFloat2 vu84 = readFloatReadFloat20 vu84; " "readFloatReadFloat10 (n,d,s) = concatMap (readFloatReadFloat0 n d) (readFloatReadExp s); readFloatReadFloat10 vww = []; " "readFloatReadFloat306 True (vuwv : vuwx : vuwz : vuxv : vvuu,t) = readFloatReadFloat305 (vuxv == 'i') (vuwv : vuwx : vuwz : vuxv : vvuu,t); readFloatReadFloat306 vvwz vvxu = readFloatReadFloat300 vvxu; " "readFloatLexFrac (zyu : s) = readFloatLexFrac2 (zyu : s); readFloatLexFrac s = readFloatLexFrac0 s; " "readFloatReadFloat308 True (vuwv : vuwx : vvuy,t) = readFloatReadFloat307 (vuwx == 'n') (vuwv : vuwx : vvuy,t); readFloatReadFloat308 vvxx vvxy = readFloatReadFloat300 vvxy; " "readFloatReadFloat307 True (vuwv : vuwx : vuwz : vvuw,t) = readFloatReadFloat306 (vuwz == 'f') (vuwv : vuwx : vuwz : vvuw,t); readFloatReadFloat307 vvxv vvxw = readFloatReadFloat300 vvxw; " "readFloatReadFloat200 vwv = []; " "readFloatReadFloat3 vu85 = readFloatReadFloat30 vu85; " "readFloatReadExp'4 True (zxv : s) = concatMap readFloatReadExp'0 (readDec s); readFloatReadExp'4 zxw zxx = readFloatReadExp'3 zxx; " "readFloatReadFloat305 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuzy,t) = readFloatReadFloat304 (vuxx == 'n') (vuwv : vuwx : vuwz : vuxv : vuxx : vuzy,t); readFloatReadFloat305 vvwx vvwy = readFloatReadFloat300 vvwy; " "readFloatReadExp1 e s True = readFloatReadExp' s; readFloatReadExp1 e s False = readFloatReadExp0 (e : s); " "readFloatReadFloat303 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuzu,t) = readFloatReadFloat302 (vuyv == 't') (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuzu,t); readFloatReadFloat303 vvvz vvwu = readFloatReadFloat300 vvwu; " "readFloatReadFloat20 (zzu : vuux,t) = readFloatReadFloat204 (zzu : vuux,t); readFloatReadFloat20 vwv = readFloatReadFloat200 vwv; " "readFloatReadExp'5 (zxv : s) = readFloatReadExp'4 (zxv == '-') (zxv : s); readFloatReadExp'5 zxy = readFloatReadExp'3 zxy; " "readFloatReadFloat309 (vuwv : vvvu,t) = readFloatReadFloat308 (vuwv == 'I') (vuwv : vvvu,t); readFloatReadFloat309 vvxz = readFloatReadFloat300 vvxz; " "readFloatReadFix10 (ds,d) = concatMap (readFloatReadFix0 ds) (readFloatLexFrac d); readFloatReadFix10 vvz = []; " "readFloatReadExp'1 s = readDec s; " "readFloatReadFloat202 True (zzu : zzw : zzy : zzz,t) = readFloatReadFloat201 (zzy == 'N') (zzu : zzw : zzy : zzz,t); readFloatReadFloat202 vuvu vuvv = readFloatReadFloat200 vuvv; " "readFloatReadFloat203 True (zzu : zzw : vuuv,t) = readFloatReadFloat202 (zzw == 'a') (zzu : zzw : vuuv,t); readFloatReadFloat203 vuvw vuvx = readFloatReadFloat200 vuvx; " "readFloatReadFloat304 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuzw,t) = readFloatReadFloat303 (vuxz == 'i') (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuzw,t); readFloatReadFloat304 vvwv vvww = readFloatReadFloat300 vvww; " "readFloatReadFloat302 True (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuyx : vuyy,t) = readFloatReadFloat301 (vuyx == 'y') (vuwv : vuwx : vuwz : vuxv : vuxx : vuxz : vuyv : vuyx : vuyy,t); readFloatReadFloat302 vvvx vvvy = readFloatReadFloat300 vvvy; " "readFloatReadExp'2 True (zww : s) = readDec s; readFloatReadExp'2 zwx zwy = readFloatReadExp'1 zwy; " "readFloatReadExp' (zxv : s) = readFloatReadExp'5 (zxv : s); readFloatReadExp' (zww : s) = readFloatReadExp'3 (zww : s); readFloatReadExp' s = readFloatReadExp'1 s; " "readFloatReadFloat0 n d vu82 = readFloatReadFloat00 n d vu82; " "readFloatReadFloat201 True (zzu : zzw : zzy : [],t) = (0 / 0,t) : []; readFloatReadFloat201 vuuy vuuz = readFloatReadFloat200 vuuz; " "readFloatReadFloat00 n d (k,t) = (fromRational (n % 1 * 10 ^^ (k - d)),t) : []; readFloatReadFloat00 n d vwu = []; " "readFloatLexFrac2 (zyu : s) = readFloatLexFrac1 (zyu == '.') (zyu : s); readFloatLexFrac2 zyx = readFloatLexFrac0 zyx; " "readFloatReadExp'0 vu88 = readFloatReadExp'00 vu88; " The bindings of the following Let/Where expression "pr1 x n (n > 0) where { f vwy vvyu y = f4 vwy vvyu y; f x n y = f0 x n y; ; f0 x n y = g x n where { g x n = g2 x n; ; g0 x n True = f x (n - 1) (x * y); ; g1 x n True = g (x * x) (n `quot` 2); g1 x n False = g0 x n otherwise; ; g2 x n = g1 x n (even n); } ; ; f3 True vwy vvyu y = y; f3 vvyv vvyw vvyx vvyy = f0 vvyw vvyx vvyy; ; f4 vwy vvyu y = f3 (vvyu == 0) vwy vvyu y; f4 vvyz vvzu vvzv = f0 vvyz vvzu vvzv; ; pr1 x n True = f x (n - 1) x; pr1 x n False = pr0 x n; } " are unpacked to the following functions on top level "pr2F4 vwy vvyu y = pr2F3 (vvyu == 0) vwy vvyu y; pr2F4 vvyz vvzu vvzv = pr2F0 vvyz vvzu vvzv; " "pr2F3 True vwy vvyu y = y; pr2F3 vvyv vvyw vvyx vvyy = pr2F0 vvyw vvyx vvyy; " "pr2F vwy vvyu y = pr2F4 vwy vvyu y; pr2F x n y = pr2F0 x n y; " "pr2F0 x n y = pr2F0G y x n; " "pr2Pr1 x n True = pr2F x (n - 1) x; pr2Pr1 x n False = pr0 x n; " The bindings of the following Let/Where expression "concatMap lex1 (lexString s) where { lex1 vu55 = lex10 vu55; ; lex10 (str,t) = ('"' : str,t) : []; lex10 yy = []; ; lexStrItem (yvv : yvz) = lexStrItem7 (yvv : yvz); lexStrItem (xzz : yuw) = lexStrItem4 (xzz : yuw); lexStrItem s = lexStrItem1 s; ; lexStrItem0 vu58 = lexStrItem00 vu58; ; lexStrItem00 (yxu : t) = lexStrItem002 (yxu : t); lexStrItem00 yx = lexStrItem000 yx; ; lexStrItem000 yx = []; ; lexStrItem001 True (yxu : t) = ([],t) : []; lexStrItem001 yxv yxw = lexStrItem000 yxw; ; lexStrItem002 (yxu : t) = lexStrItem001 (yxu == '\') (yxu : t); lexStrItem002 yxx = lexStrItem000 yxx; ; lexStrItem1 s = lexLitChar s; ; lexStrItem2 xzz c s True = concatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem2 xzz c s False = lexStrItem1 (xzz : c : s); ; lexStrItem3 True (xzz : c : s) = lexStrItem2 xzz c s (isSpace c); lexStrItem3 yux yuy = lexStrItem1 yuy; ; lexStrItem4 (xzz : yuw) = lexStrItem3 (xzz == '\') (xzz : yuw); lexStrItem4 yuz = lexStrItem1 yuz; ; lexStrItem5 True (yvv : yvx : s) = ('\' : '&' : [],s) : []; lexStrItem5 ywu ywv = lexStrItem4 ywv; ; lexStrItem6 True (yvv : yvx : s) = lexStrItem5 (yvx == '&') (yvv : yvx : s); lexStrItem6 yww ywx = lexStrItem4 ywx; ; lexStrItem7 (yvv : yvz) = lexStrItem6 (yvv == '\') (yvv : yvz); lexStrItem7 ywy = lexStrItem4 ywy; ; lexString (xzu : s) = lexString4 (xzu : s); lexString s = lexString2 s; ; lexString0 ch vu56 = lexString00 ch vu56; ; lexString00 ch (str,u) = (ch ++ str,u) : []; lexString00 ch yv = []; ; lexString1 vu57 = lexString10 vu57; ; lexString10 (ch,t) = concatMap (lexString0 ch) (lexString t); lexString10 yw = []; ; lexString2 s = concatMap lexString1 (lexStrItem s); ; lexString3 True (xzu : s) = ('"' : [],s) : []; lexString3 xzv xzw = lexString2 xzw; ; lexString4 (xzu : s) = lexString3 (xzu == '"') (xzu : s); lexString4 xzx = lexString2 xzx; } " are unpacked to the following functions on top level "lex13LexStrItem6 True (yvv : yvx : s) = lex13LexStrItem5 (yvx == '&') (yvv : yvx : s); lex13LexStrItem6 yww ywx = lex13LexStrItem4 ywx; " "lex13LexString2 s = concatMap lex13LexString1 (lex13LexStrItem s); " "lex13LexString3 True (xzu : s) = ('"' : [],s) : []; lex13LexString3 xzv xzw = lex13LexString2 xzw; " "lex13LexStrItem (yvv : yvz) = lex13LexStrItem7 (yvv : yvz); lex13LexStrItem (xzz : yuw) = lex13LexStrItem4 (xzz : yuw); lex13LexStrItem s = lex13LexStrItem1 s; " "lex13LexStrItem2 xzz c s True = concatMap lex13LexStrItem0 (dropWhile isSpace s : []); lex13LexStrItem2 xzz c s False = lex13LexStrItem1 (xzz : c : s); " "lex13Lex1 vu55 = lex13Lex10 vu55; " "lex13LexStrItem00 (yxu : t) = lex13LexStrItem002 (yxu : t); lex13LexStrItem00 yx = lex13LexStrItem000 yx; " "lex13Lex10 (str,t) = ('"' : str,t) : []; lex13Lex10 yy = []; " "lex13LexStrItem7 (yvv : yvz) = lex13LexStrItem6 (yvv == '\') (yvv : yvz); lex13LexStrItem7 ywy = lex13LexStrItem4 ywy; " "lex13LexString1 vu57 = lex13LexString10 vu57; " "lex13LexStrItem000 yx = []; " "lex13LexStrItem3 True (xzz : c : s) = lex13LexStrItem2 xzz c s (isSpace c); lex13LexStrItem3 yux yuy = lex13LexStrItem1 yuy; " "lex13LexStrItem4 (xzz : yuw) = lex13LexStrItem3 (xzz == '\') (xzz : yuw); lex13LexStrItem4 yuz = lex13LexStrItem1 yuz; " "lex13LexString4 (xzu : s) = lex13LexString3 (xzu == '"') (xzu : s); lex13LexString4 xzx = lex13LexString2 xzx; " "lex13LexString00 ch (str,u) = (ch ++ str,u) : []; lex13LexString00 ch yv = []; " "lex13LexString0 ch vu56 = lex13LexString00 ch vu56; " "lex13LexStrItem002 (yxu : t) = lex13LexStrItem001 (yxu == '\') (yxu : t); lex13LexStrItem002 yxx = lex13LexStrItem000 yxx; " "lex13LexString10 (ch,t) = concatMap (lex13LexString0 ch) (lex13LexString t); lex13LexString10 yw = []; " "lex13LexStrItem001 True (yxu : t) = ([],t) : []; lex13LexStrItem001 yxv yxw = lex13LexStrItem000 yxw; " "lex13LexStrItem1 s = lexLitChar s; " "lex13LexString (xzu : s) = lex13LexString4 (xzu : s); lex13LexString s = lex13LexString2 s; " "lex13LexStrItem0 vu58 = lex13LexStrItem00 vu58; " "lex13LexStrItem5 True (yvv : yvx : s) = ('\' : '&' : [],s) : []; lex13LexStrItem5 ywu ywv = lex13LexStrItem4 ywv; " The bindings of the following Let/Where expression "span1 p vxz vyu (p vxz) where { span0 p vxz vyu True = ([],vxz : vyu); ; span1 p vxz vyu True = (vxz : ys,zs); span1 p vxz vyu False = span0 p vxz vyu otherwise; ; vu43 = span p vyu; ; ys = ys0 vu43; ; ys0 (ys,vyw) = ys; ; zs = zs0 vu43; ; zs0 (vyv,zs) = zs; } " are unpacked to the following functions on top level "span2Ys vyuu vyuv = span2Ys0 vyuu vyuv (span2Vu43 vyuu vyuv); " "span2Ys0 vyuu vyuv (ys,vyw) = ys; " "span2Zs0 vyuu vyuv (vyv,zs) = zs; " "span2Zs vyuu vyuv = span2Zs0 vyuu vyuv (span2Vu43 vyuu vyuv); " "span2Span0 vyuu vyuv p vxz vyu True = ([],vxz : vyu); " "span2Vu43 vyuu vyuv = span vyuu vyuv; " "span2Span1 vyuu vyuv p vxz vyu True = (vxz : span2Ys vyuu vyuv,span2Zs vyuu vyuv); span2Span1 vyuu vyuv p vxz vyu False = span2Span0 vyuu vyuv p vxz vyu otherwise; " The bindings of the following Let/Where expression "lex11 c s (isSingle c) where { isIdChar c = isAlphaNum c || c `elem` '_' : ''' : []; ; isSingle c = c `elem` ',' : ';' : '(' : ')' : '[' : ']' : '{' : '}' : '_' : '`' : []; ; isSym c = c `elem` '!' : '@' : '#' : '$' : '%' : '&' : '*' : '+' : '.' : '/' : '<' : '=' : '>' : '?' : '\' : '^' : '|' : ':' : '-' : '~' : []; ; lex11 c s True = (c : [],s) : []; lex11 c s False = lex9 c s (isSym c); ; lex2 c vu59 = lex20 c vu59; ; lex20 c (sym,t) = (c : sym,t) : []; lex20 c vuu = []; ; lex3 c vu60 = lex30 c vu60; ; lex30 c (nam,t) = (c : nam,t) : []; lex30 c vuv = []; ; lex4 c ds vu61 = lex40 c ds vu61; ; lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex40 c ds zy = []; ; lex5 c vu62 = lex50 c vu62; ; lex50 c (ds,s) = concatMap (lex4 c ds) (lexFracExp s); lex50 c zz = []; ; lex6 c s True = []; ; lex7 c s True = concatMap (lex5 c) (span isDigit s : []); lex7 c s False = lex6 c s otherwise; ; lex8 c s True = concatMap (lex3 c) (span isIdChar s : []); lex8 c s False = lex7 c s (isDigit c); ; lex9 c s True = concatMap (lex2 c) (span isSym s : []); lex9 c s False = lex8 c s (isAlpha c); ; lexExp (e : s) = lexExp5 (e : s); lexExp s = lexExp3 s; ; lexExp0 e c vu65 = lexExp00 e c vu65; ; lexExp00 e c (ds,u) = (e : c : ds,u) : []; lexExp00 e c yz = []; ; lexExp1 e vu66 = lexExp10 e vu66; ; lexExp10 e (c : t) = lexExp100 e c t (c `elem` '+' : '-' : []); lexExp10 e zv = []; ; lexExp100 e c t True = concatMap (lexExp0 e c) (lexDigits t); lexExp100 e c t False = []; ; lexExp2 e vu67 = lexExp20 e vu67; ; lexExp20 e (ds,t) = (e : ds,t) : []; lexExp20 e zu = []; ; lexExp3 s = ([],s) : []; ; lexExp4 e s True = concatMap (lexExp1 e) (s : []) ++ concatMap (lexExp2 e) (lexDigits s); lexExp4 e s False = lexExp3 (e : s); ; lexExp5 (e : s) = lexExp4 e s (e `elem` 'e' : 'E' : []); lexExp5 yxz = lexExp3 yxz; ; lexFracExp (yyv : yyy) = lexFracExp5 (yyv : yyy); lexFracExp s = lexFracExp2 s; ; lexFracExp0 ds vu63 = lexFracExp00 ds vu63; ; lexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lexFracExp00 ds zx = []; ; lexFracExp1 vu64 = lexFracExp10 vu64; ; lexFracExp10 (ds,t) = concatMap (lexFracExp0 ds) (lexExp t); lexFracExp10 zw = []; ; lexFracExp2 s = lexExp s; ; lexFracExp3 yyv c cs True = concatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp3 yyv c cs False = lexFracExp2 (yyv : c : cs); ; lexFracExp4 True (yyv : c : cs) = lexFracExp3 yyv c cs (isDigit c); lexFracExp4 yyz yzu = lexFracExp2 yzu; ; lexFracExp5 (yyv : yyy) = lexFracExp4 (yyv == '.') (yyv : yyy); lexFracExp5 yzv = lexFracExp2 yzv; } " are unpacked to the following functions on top level "lex12LexExp20 e (ds,t) = (e : ds,t) : []; lex12LexExp20 e zu = []; " "lex12LexExp2 e vu67 = lex12LexExp20 e vu67; " "lex12LexExp100 e c t True = concatMap (lex12LexExp0 e c) (lexDigits t); lex12LexExp100 e c t False = []; " "lex12LexExp4 e s True = concatMap (lex12LexExp1 e) (s : []) ++ concatMap (lex12LexExp2 e) (lexDigits s); lex12LexExp4 e s False = lex12LexExp3 (e : s); " "lex12Lex8 c s True = concatMap (lex12Lex3 c) (span lex12IsIdChar s : []); lex12Lex8 c s False = lex12Lex7 c s (isDigit c); " "lex12LexExp00 e c (ds,u) = (e : c : ds,u) : []; lex12LexExp00 e c yz = []; " "lex12IsSym c = c `elem` '!' : '@' : '#' : '$' : '%' : '&' : '*' : '+' : '.' : '/' : '<' : '=' : '>' : '?' : '\' : '^' : '|' : ':' : '-' : '~' : []; " "lex12Lex5 c vu62 = lex12Lex50 c vu62; " "lex12Lex3 c vu60 = lex12Lex30 c vu60; " "lex12Lex4 c ds vu61 = lex12Lex40 c ds vu61; " "lex12LexExp10 e (c : t) = lex12LexExp100 e c t (c `elem` '+' : '-' : []); lex12LexExp10 e zv = []; " "lex12LexFracExp3 yyv c cs True = concatMap lex12LexFracExp1 (lexDigits (c : cs)); lex12LexFracExp3 yyv c cs False = lex12LexFracExp2 (yyv : c : cs); " "lex12LexFracExp10 (ds,t) = concatMap (lex12LexFracExp0 ds) (lex12LexExp t); lex12LexFracExp10 zw = []; " "lex12LexExp1 e vu66 = lex12LexExp10 e vu66; " "lex12Lex7 c s True = concatMap (lex12Lex5 c) (span isDigit s : []); lex12Lex7 c s False = lex12Lex6 c s otherwise; " "lex12LexExp5 (e : s) = lex12LexExp4 e s (e `elem` 'e' : 'E' : []); lex12LexExp5 yxz = lex12LexExp3 yxz; " "lex12Lex9 c s True = concatMap (lex12Lex2 c) (span lex12IsSym s : []); lex12Lex9 c s False = lex12Lex8 c s (isAlpha c); " "lex12LexExp (e : s) = lex12LexExp5 (e : s); lex12LexExp s = lex12LexExp3 s; " "lex12LexFracExp4 True (yyv : c : cs) = lex12LexFracExp3 yyv c cs (isDigit c); lex12LexFracExp4 yyz yzu = lex12LexFracExp2 yzu; " "lex12Lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex12Lex40 c ds zy = []; " "lex12Lex20 c (sym,t) = (c : sym,t) : []; lex12Lex20 c vuu = []; " "lex12LexFracExp0 ds vu63 = lex12LexFracExp00 ds vu63; " "lex12IsIdChar c = isAlphaNum c || c `elem` '_' : ''' : []; " "lex12Lex50 c (ds,s) = concatMap (lex12Lex4 c ds) (lex12LexFracExp s); lex12Lex50 c zz = []; " "lex12LexFracExp2 s = lex12LexExp s; " "lex12Lex6 c s True = []; " "lex12LexFracExp (yyv : yyy) = lex12LexFracExp5 (yyv : yyy); lex12LexFracExp s = lex12LexFracExp2 s; " "lex12Lex2 c vu59 = lex12Lex20 c vu59; " "lex12LexExp0 e c vu65 = lex12LexExp00 e c vu65; " "lex12LexExp3 s = ([],s) : []; " "lex12Lex11 c s True = (c : [],s) : []; lex12Lex11 c s False = lex12Lex9 c s (lex12IsSym c); " "lex12LexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lex12LexFracExp00 ds zx = []; " "lex12LexFracExp1 vu64 = lex12LexFracExp10 vu64; " "lex12IsSingle c = c `elem` ',' : ';' : '(' : ')' : '[' : ']' : '{' : '}' : '_' : '`' : []; " "lex12LexFracExp5 (yyv : yyy) = lex12LexFracExp4 (yyv == '.') (yyv : yyy); lex12LexFracExp5 yzv = lex12LexFracExp2 yzv; " "lex12Lex30 c (nam,t) = (c : nam,t) : []; lex12Lex30 c vuv = []; " The bindings of the following Let/Where expression "readParen0 b where { mandatory r = concatMap mandatory2 (lex r); ; mandatory0 x vu48 = mandatory00 x vu48; ; mandatory00 x (vwzv : vwzw,u) = mandatory002 x (vwzv : vwzw,u); mandatory00 x wuy = mandatory000 x wuy; ; mandatory000 x wuy = []; ; mandatory001 True x (vwzv : [],u) = (x,u) : []; mandatory001 vwzx vwzy vwzz = mandatory000 vwzy vwzz; ; mandatory002 x (vwzv : vwzw,u) = mandatory001 (vwzv == ')') x (vwzv : vwzw,u); mandatory002 vxuu vxuv = mandatory000 vxuu vxuv; ; mandatory1 vu49 = mandatory10 vu49; ; mandatory10 (x,t) = concatMap (mandatory0 x) (lex t); mandatory10 wuz = []; ; mandatory2 vu50 = mandatory20 vu50; ; mandatory20 (vwyu : vwyv,s) = mandatory202 (vwyu : vwyv,s); mandatory20 wux = mandatory200 wux; ; mandatory200 wux = []; ; mandatory201 True (vwyu : [],s) = concatMap mandatory1 (optional s); mandatory201 vwyw vwyx = mandatory200 vwyx; ; mandatory202 (vwyu : vwyv,s) = mandatory201 (vwyu == '(') (vwyu : vwyv,s); mandatory202 vwyy = mandatory200 vwyy; ; optional r = g r ++ mandatory r; ; readParen0 True = mandatory; readParen0 False = optional; } " are unpacked to the following functions on top level "readParenOptional vyuw r = vyuw r ++ readParenMandatory vyuw r; " "readParenMandatory vyuw r = concatMap (readParenMandatory2 vyuw) (lex r); " "readParenMandatory202 vyuw (vwyu : vwyv,s) = readParenMandatory201 vyuw (vwyu == '(') (vwyu : vwyv,s); readParenMandatory202 vyuw vwyy = readParenMandatory200 vyuw vwyy; " "readParenMandatory000 vyuw x wuy = []; " "readParenMandatory0 vyuw x vu48 = readParenMandatory00 vyuw x vu48; " "readParenMandatory001 vyuw True x (vwzv : [],u) = (x,u) : []; readParenMandatory001 vyuw vwzx vwzy vwzz = readParenMandatory000 vyuw vwzy vwzz; " "readParenMandatory10 vyuw (x,t) = concatMap (readParenMandatory0 vyuw x) (lex t); readParenMandatory10 vyuw wuz = []; " "readParenMandatory00 vyuw x (vwzv : vwzw,u) = readParenMandatory002 vyuw x (vwzv : vwzw,u); readParenMandatory00 vyuw x wuy = readParenMandatory000 vyuw x wuy; " "readParenMandatory2 vyuw vu50 = readParenMandatory20 vyuw vu50; " "readParenMandatory20 vyuw (vwyu : vwyv,s) = readParenMandatory202 vyuw (vwyu : vwyv,s); readParenMandatory20 vyuw wux = readParenMandatory200 vyuw wux; " "readParenMandatory200 vyuw wux = []; " "readParenMandatory1 vyuw vu49 = readParenMandatory10 vyuw vu49; " "readParenReadParen0 vyuw True = readParenMandatory vyuw; readParenReadParen0 vyuw False = readParenOptional vyuw; " "readParenMandatory201 vyuw True (vwyu : [],s) = concatMap (readParenMandatory1 vyuw) (readParenOptional vyuw s); readParenMandatory201 vyuw vwyw vwyx = readParenMandatory200 vyuw vwyx; " "readParenMandatory002 vyuw x (vwzv : vwzw,u) = readParenMandatory001 vyuw (vwzv == ')') x (vwzv : vwzw,u); readParenMandatory002 vyuw vxuu vxuv = readParenMandatory000 vyuw vxuu vxuv; " The bindings of the following Let/Where expression "readParen False read' where { read' r = read'' r ++ concatMap read'1 (lex r); ; read'' r = concatMap (read''1 readPos) (lex r); ; read''0 s vu80 = read''00 s vu80; ; read''00 s (n,[]) = (n,s) : []; read''00 s wvv = []; ; read''1 readPos vu81 = read''10 readPos vu81; ; read''10 readPos (str,s) = concatMap (read''0 s) (readPos str); read''10 readPos wvu = []; ; read'0 vu78 = read'00 vu78; ; read'00 (x,t) = (`negate` x,t) : []; read'00 wvx = []; ; read'1 vu79 = read'10 vu79; ; read'10 (vxuy : vxuz,s) = read'102 (vxuy : vxuz,s); read'10 wvw = read'100 wvw; ; read'100 wvw = []; ; read'101 True (vxuy : [],s) = concatMap read'0 (read'' s); read'101 vxvu vxvv = read'100 vxvv; ; read'102 (vxuy : vxuz,s) = read'101 (vxuy == '-') (vxuy : vxuz,s); read'102 vxvw = read'100 vxvw; } " are unpacked to the following functions on top level "readSignedRead'1 vyux vu79 = readSignedRead'10 vyux vu79; " "readSignedRead' vyux r = readSignedRead'' vyux r ++ concatMap (readSignedRead'1 vyux) (lex r); " "readSignedRead'00 vyux (x,t) = (`negate` x,t) : []; readSignedRead'00 vyux wvx = []; " "readSignedRead''00 vyux s (n,[]) = (n,s) : []; readSignedRead''00 vyux s wvv = []; " "readSignedRead'10 vyux (vxuy : vxuz,s) = readSignedRead'102 vyux (vxuy : vxuz,s); readSignedRead'10 vyux wvw = readSignedRead'100 vyux wvw; " "readSignedRead'100 vyux wvw = []; " "readSignedRead'' vyux r = concatMap (readSignedRead''1 vyux vyux) (lex r); " "readSignedRead''0 vyux s vu80 = readSignedRead''00 vyux s vu80; " "readSignedRead'101 vyux True (vxuy : [],s) = concatMap (readSignedRead'0 vyux) (readSignedRead'' vyux s); readSignedRead'101 vyux vxvu vxvv = readSignedRead'100 vyux vxvv; " "readSignedRead'0 vyux vu78 = readSignedRead'00 vyux vu78; " "readSignedRead'102 vyux (vxuy : vxuz,s) = readSignedRead'101 vyux (vxuy == '-') (vxuy : vxuz,s); readSignedRead'102 vyux vxvw = readSignedRead'100 vyux vxvw; " "readSignedRead''10 vyux readPos (str,s) = concatMap (readSignedRead''0 vyux s) (readPos str); readSignedRead''10 vyux readPos wvu = []; " "readSignedRead''1 vyux readPos vu81 = readSignedRead''10 vyux readPos vu81; " The bindings of the following Let/Where expression "g x n where { g x n = g2 x n; ; g0 x n True = f x (n - 1) (x * y); ; g1 x n True = g (x * x) (n `quot` 2); g1 x n False = g0 x n otherwise; ; g2 x n = g1 x n (even n); } " are unpacked to the following functions on top level "pr2F0G0 vyuy x n True = pr2F x (n - 1) (x * vyuy); " "pr2F0G vyuy x n = pr2F0G2 vyuy x n; " "pr2F0G2 vyuy x n = pr2F0G1 vyuy x n (even n); " "pr2F0G1 vyuy x n True = pr2F0G vyuy (x * x) (n `quot` 2); pr2F0G1 vyuy x n False = pr2F0G0 vyuy x n otherwise; " ---------------------------------------- (12) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (13) NumRed (SOUND) Num Reduction:All numbers are transformed to their corresponding representation with Succ, Pred and Zero. ---------------------------------------- (14) Obligation: mainModule Main module Main where { import qualified Prelude; }