/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, 0 ms] (6) HASKELL (7) BR [EQUIVALENT, 5 ms] (8) HASKELL (9) COR [EQUIVALENT, 0 ms] (10) HASKELL (11) LetRed [EQUIVALENT, 0 ms] (12) HASKELL (13) NumRed [SOUND, 32 ms] (14) HASKELL ---------------------------------------- (0) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (1) LR (EQUIVALENT) Lambda Reductions: 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 "\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 "\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 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 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 vu68 of { (cs@(_ : _),t) -> (cs,t) : []; _ -> []} " is transformed to "nonnull00 (cs@(_ : _),t) = (cs,t) : []; nonnull00 _ = []; " 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 b then mandatory else optional" is transformed to "readParen0 True = mandatory; readParen0 False = optional; " The following If expression "if ch /= ''' : [] then (''' : ch ++ ''' : [],t) : [] else []" is transformed to "lex000 ch t True = (''' : ch ++ ''' : [],t) : []; lex000 ch t False = []; " ---------------------------------------- (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 "cs@(wu : wv)" is replaced by the following term "wu : wv" The bind variable of the following binding Pattern "xs@(zz : vuu)" is replaced by the following term "zz : vuu" The bind variable of the following binding Pattern "s@(vux : vuy)" is replaced by the following term "vux : vuy" The bind variable of the following binding Pattern "xs@(vvx : vvy)" is replaced by the following term "vvx : vvy" ---------------------------------------- (8) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (9) COR (EQUIVALENT) Cond Reductions: 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); " "takeWhile1 p x xs True = x : takeWhile p xs; takeWhile1 p x xs False = takeWhile0 p x xs otherwise; " "takeWhile0 p x xs True = []; " "takeWhile2 p (x : xs) = takeWhile1 p x xs (p x); " "takeWhile3 p [] = []; takeWhile3 vwx vwy = takeWhile2 vwx vwy; " The following Function with conditions "lexString ('"' : s) = ('"' : [],s) : []; lexString s = concatMap lexString1 (lexStrItem s); " is transformed to "lexString (vxu : s) = lexString4 (vxu : s); lexString s = lexString2 s; " "lexString2 s = concatMap lexString1 (lexStrItem s); " "lexString3 True (vxu : s) = ('"' : [],s) : []; lexString3 vxv vxw = lexString2 vxw; " "lexString4 (vxu : s) = lexString3 (vxu == '"') (vxu : s); lexString4 vxx = lexString2 vxx; " 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 (vzv : vzz) = lexStrItem7 (vzv : vzz); lexStrItem (vxz : vyw) = lexStrItem4 (vxz : vyw); lexStrItem s = lexStrItem1 s; " "lexStrItem1 s = lexLitChar s; " "lexStrItem2 vxz c s True = concatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem2 vxz c s False = lexStrItem1 (vxz : c : s); " "lexStrItem3 True (vxz : c : s) = lexStrItem2 vxz c s (isSpace c); lexStrItem3 vyx vyy = lexStrItem1 vyy; " "lexStrItem4 (vxz : vyw) = lexStrItem3 (vxz == '\') (vxz : vyw); lexStrItem4 vyz = lexStrItem1 vyz; " "lexStrItem5 True (vzv : vzx : s) = ('\' : '&' : [],s) : []; lexStrItem5 wuu wuv = lexStrItem4 wuv; " "lexStrItem6 True (vzv : vzx : s) = lexStrItem5 (vzx == '&') (vzv : vzx : s); lexStrItem6 wuw wux = lexStrItem4 wux; " "lexStrItem7 (vzv : vzz) = lexStrItem6 (vzv == '\') (vzv : vzz); lexStrItem7 wuy = lexStrItem4 wuy; " The following Function with conditions "lexStrItem00 ('\' : t) = ([],t) : []; lexStrItem00 wz = []; " is transformed to "lexStrItem00 (wvu : t) = lexStrItem002 (wvu : t); lexStrItem00 wz = lexStrItem000 wz; " "lexStrItem000 wz = []; " "lexStrItem001 True (wvu : t) = ([],t) : []; lexStrItem001 wvv wvw = lexStrItem000 wvw; " "lexStrItem002 (wvu : t) = lexStrItem001 (wvu == '\') (wvu : t); lexStrItem002 wvx = lexStrItem000 wvx; " 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 wvz = lexExp3 wvz; " The following Function with conditions "lexFracExp ('.' : c : cs)|isDigit cconcatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp s = lexExp s; " is transformed to "lexFracExp (wwv : wwy) = lexFracExp5 (wwv : wwy); lexFracExp s = lexFracExp2 s; " "lexFracExp2 s = lexExp s; " "lexFracExp3 wwv c cs True = concatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp3 wwv c cs False = lexFracExp2 (wwv : c : cs); " "lexFracExp4 True (wwv : c : cs) = lexFracExp3 wwv c cs (isDigit c); lexFracExp4 wwz wxu = lexFracExp2 wxu; " "lexFracExp5 (wwv : wwy) = lexFracExp4 (wwv == '.') (wwv : wwy); lexFracExp5 wxv = lexFracExp2 wxv; " 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 xu = []; ; lexStrItem ('\' : '&' : s) = ('\' : '&' : [],s) : []; lexStrItem ('\' : c : s)|isSpace cconcatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem s = lexLitChar s; ; lexStrItem0 vu58 = lexStrItem00 vu58; ; lexStrItem00 ('\' : t) = ([],t) : []; lexStrItem00 wz = []; ; lexString ('"' : s) = ('"' : [],s) : []; lexString s = concatMap lexString1 (lexStrItem s); ; lexString0 ch vu56 = lexString00 ch vu56; ; lexString00 ch (str,u) = (ch ++ str,u) : []; lexString00 ch wx = []; ; lexString1 vu57 = lexString10 vu57; ; lexString10 (ch,t) = concatMap (lexString0 ch) (lexString t); lexString10 wy = []; } ; 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 yw = []; ; lex3 c vu60 = lex30 c vu60; ; lex30 c (nam,t) = (c : nam,t) : []; lex30 c yx = []; ; lex4 c ds vu61 = lex40 c ds vu61; ; lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex40 c ds yu = []; ; lex5 c vu62 = lex50 c vu62; ; lex50 c (ds,s) = concatMap (lex4 c ds) (lexFracExp s); lex50 c yv = []; ; 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 xv = []; ; lexExp1 e vu66 = lexExp10 e vu66; ; lexExp10 e (c : t) = lexExp100 e c t (c `elem` '+' : '-' : []); lexExp10 e xx = []; ; 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 xw = []; ; 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 xz = []; ; lexFracExp1 vu64 = lexFracExp10 vu64; ; lexFracExp10 (ds,t) = concatMap (lexFracExp0 ds) (lexExp t); lexFracExp10 xy = []; } ; " is transformed to "lex [] = lex19 []; lex (c : s) = lex18 (c : s); lex (wyx : s) = lex16 (wyx : s); lex (wxy : s) = lex14 (wxy : 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 yw = []; ; lex3 c vu60 = lex30 c vu60; ; lex30 c (nam,t) = (c : nam,t) : []; lex30 c yx = []; ; lex4 c ds vu61 = lex40 c ds vu61; ; lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex40 c ds yu = []; ; lex5 c vu62 = lex50 c vu62; ; lex50 c (ds,s) = concatMap (lex4 c ds) (lexFracExp s); lex50 c yv = []; ; 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 xv = []; ; lexExp1 e vu66 = lexExp10 e vu66; ; lexExp10 e (c : t) = lexExp100 e c t (c `elem` '+' : '-' : []); lexExp10 e xx = []; ; 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 xw = []; ; 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 wvz = lexExp3 wvz; ; lexFracExp (wwv : wwy) = lexFracExp5 (wwv : wwy); lexFracExp s = lexFracExp2 s; ; lexFracExp0 ds vu63 = lexFracExp00 ds vu63; ; lexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lexFracExp00 ds xz = []; ; lexFracExp1 vu64 = lexFracExp10 vu64; ; lexFracExp10 (ds,t) = concatMap (lexFracExp0 ds) (lexExp t); lexFracExp10 xy = []; ; lexFracExp2 s = lexExp s; ; lexFracExp3 wwv c cs True = concatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp3 wwv c cs False = lexFracExp2 (wwv : c : cs); ; lexFracExp4 True (wwv : c : cs) = lexFracExp3 wwv c cs (isDigit c); lexFracExp4 wwz wxu = lexFracExp2 wxu; ; lexFracExp5 (wwv : wwy) = lexFracExp4 (wwv == '.') (wwv : wwy); lexFracExp5 wxv = lexFracExp2 wxv; } ; " "lex13 True (wxy : s) = concatMap lex1 (lexString s) where { lex1 vu55 = lex10 vu55; ; lex10 (str,t) = ('"' : str,t) : []; lex10 xu = []; ; lexStrItem (vzv : vzz) = lexStrItem7 (vzv : vzz); lexStrItem (vxz : vyw) = lexStrItem4 (vxz : vyw); lexStrItem s = lexStrItem1 s; ; lexStrItem0 vu58 = lexStrItem00 vu58; ; lexStrItem00 (wvu : t) = lexStrItem002 (wvu : t); lexStrItem00 wz = lexStrItem000 wz; ; lexStrItem000 wz = []; ; lexStrItem001 True (wvu : t) = ([],t) : []; lexStrItem001 wvv wvw = lexStrItem000 wvw; ; lexStrItem002 (wvu : t) = lexStrItem001 (wvu == '\') (wvu : t); lexStrItem002 wvx = lexStrItem000 wvx; ; lexStrItem1 s = lexLitChar s; ; lexStrItem2 vxz c s True = concatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem2 vxz c s False = lexStrItem1 (vxz : c : s); ; lexStrItem3 True (vxz : c : s) = lexStrItem2 vxz c s (isSpace c); lexStrItem3 vyx vyy = lexStrItem1 vyy; ; lexStrItem4 (vxz : vyw) = lexStrItem3 (vxz == '\') (vxz : vyw); lexStrItem4 vyz = lexStrItem1 vyz; ; lexStrItem5 True (vzv : vzx : s) = ('\' : '&' : [],s) : []; lexStrItem5 wuu wuv = lexStrItem4 wuv; ; lexStrItem6 True (vzv : vzx : s) = lexStrItem5 (vzx == '&') (vzv : vzx : s); lexStrItem6 wuw wux = lexStrItem4 wux; ; lexStrItem7 (vzv : vzz) = lexStrItem6 (vzv == '\') (vzv : vzz); lexStrItem7 wuy = lexStrItem4 wuy; ; lexString (vxu : s) = lexString4 (vxu : s); lexString s = lexString2 s; ; lexString0 ch vu56 = lexString00 ch vu56; ; lexString00 ch (str,u) = (ch ++ str,u) : []; lexString00 ch wx = []; ; lexString1 vu57 = lexString10 vu57; ; lexString10 (ch,t) = concatMap (lexString0 ch) (lexString t); lexString10 wy = []; ; lexString2 s = concatMap lexString1 (lexStrItem s); ; lexString3 True (vxu : s) = ('"' : [],s) : []; lexString3 vxv vxw = lexString2 vxw; ; lexString4 (vxu : s) = lexString3 (vxu == '"') (vxu : s); lexString4 vxx = lexString2 vxx; } ; lex13 wxz wyu = lex12 wyu; " "lex14 (wxy : s) = lex13 (wxy == '"') (wxy : s); lex14 wyv = lex12 wyv; " "lex15 True (wyx : s) = concatMap lex0 (lexLitChar s); lex15 wyy wyz = lex14 wyz; " "lex16 (wyx : s) = lex15 (wyx == ''') (wyx : s); lex16 wzu = lex14 wzu; " "lex17 c s True = lex (dropWhile isSpace s); lex17 c s False = lex16 (c : s); " "lex18 (c : s) = lex17 c s (isSpace c); lex18 wzw = lex16 wzw; " "lex19 [] = ([],[]) : []; lex19 wzy = lex18 wzy; " 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 xuv xuw = lexmatch0 xuv xuw; " The following Function with conditions "undefined |Falseundefined; " is transformed to "undefined = undefined1; " "undefined0 True = undefined; " "undefined1 = undefined0 False; " The following Function with conditions "mandatory20 ('(' : [],s) = concatMap mandatory1 (optional s); mandatory20 zw = []; " is transformed to "mandatory20 (xuz : xvu,s) = mandatory202 (xuz : xvu,s); mandatory20 zw = mandatory200 zw; " "mandatory200 zw = []; " "mandatory201 True (xuz : [],s) = concatMap mandatory1 (optional s); mandatory201 xvv xvw = mandatory200 xvw; " "mandatory202 (xuz : xvu,s) = mandatory201 (xuz == '(') (xuz : xvu,s); mandatory202 xvx = mandatory200 xvx; " The following Function with conditions "mandatory00 x (')' : [],u) = (x,u) : []; mandatory00 x zx = []; " is transformed to "mandatory00 x (xwu : xwv,u) = mandatory002 x (xwu : xwv,u); mandatory00 x zx = mandatory000 x zx; " "mandatory000 x zx = []; " "mandatory001 True x (xwu : [],u) = (x,u) : []; mandatory001 xww xwx xwy = mandatory000 xwx xwy; " "mandatory002 x (xwu : xwv,u) = mandatory001 (xwu == ')') x (xwu : xwv,u); mandatory002 xwz xxu = mandatory000 xwz xxu; " The following Function with conditions "dropWhile p [] = []; dropWhile p (zz : vuu)|p zzdropWhile p vuu|otherwisezz : vuu; " is transformed to "dropWhile p [] = dropWhile3 p []; dropWhile p (zz : vuu) = dropWhile2 p (zz : vuu); " "dropWhile0 p zz vuu True = zz : vuu; " "dropWhile1 p zz vuu True = dropWhile p vuu; dropWhile1 p zz vuu False = dropWhile0 p zz vuu otherwise; " "dropWhile2 p (zz : vuu) = dropWhile1 p zz vuu (p zz); " "dropWhile3 p [] = []; dropWhile3 xxx xxy = dropWhile2 xxx xxy; " The following Function with conditions "lex00 (ch,''' : t) = lex000 ch t (ch /= ''' : []); lex00 vuv = []; " is transformed to "lex00 (ch,xyv : t) = lex003 (ch,xyv : t); lex00 vuv = lex001 vuv; " "lex001 vuv = []; " "lex002 True (ch,xyv : t) = lex000 ch t (ch /= ''' : []); lex002 xyw xyx = lex001 xyx; " "lex003 (ch,xyv : t) = lex002 (xyv == ''') (ch,xyv : t); lex003 xyy = lex001 xyy; " 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 (vux : vuy)|isDigit vuxspan isDigit (vux : vuy) : []|isUpper vuxlexEsc2 (concatMap (lexEsc1 (vux : vuy)) table); lexEsc vuz = []; " is transformed to "lexEsc (c : s) = lexEsc16 (c : s); lexEsc (yvu : yvx) = lexEsc14 (yvu : yvx); lexEsc (yuv : s) = lexEsc11 (yuv : s); lexEsc (xzw : s) = lexEsc8 (xzw : s); lexEsc (vux : vuy) = lexEsc6 (vux : vuy); lexEsc vuz = lexEsc3 vuz; " "lexEsc3 vuz = []; " "lexEsc4 vux vuy True = lexEsc2 (concatMap (lexEsc1 (vux : vuy)) table); lexEsc4 vux vuy False = lexEsc3 (vux : vuy); " "lexEsc5 vux vuy True = span isDigit (vux : vuy) : []; lexEsc5 vux vuy False = lexEsc4 vux vuy (isUpper vux); " "lexEsc6 (vux : vuy) = lexEsc5 vux vuy (isDigit vux); lexEsc6 xzu = lexEsc3 xzu; " "lexEsc7 True (xzw : s) = prefix 'x' (span isHexDigit s) : []; lexEsc7 xzx xzy = lexEsc6 xzy; " "lexEsc8 (xzw : s) = lexEsc7 (xzw == 'x') (xzw : s); lexEsc8 xzz = lexEsc6 xzz; " "lexEsc9 True (yuv : s) = prefix 'o' (span isOctDigit s) : []; lexEsc9 yuw yux = lexEsc8 yux; " "lexEsc11 (yuv : s) = lexEsc9 (yuv == 'o') (yuv : s); lexEsc11 yuy = lexEsc8 yuy; " "lexEsc12 yvu c s True = ('^' : c : [],s) : []; lexEsc12 yvu c s False = lexEsc11 (yvu : c : s); " "lexEsc13 True (yvu : c : s) = lexEsc12 yvu c s (c >= '@' && c <= '_'); lexEsc13 yvy yvz = lexEsc11 yvz; " "lexEsc14 (yvu : yvx) = lexEsc13 (yvu == '^') (yvu : yvx); lexEsc14 ywu = lexEsc11 ywu; " "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 yww = lexEsc14 yww; " 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 (vux : vuy)|isDigit vuxspan isDigit (vux : vuy) : []|isUpper vuxlexEsc2 (concatMap (lexEsc1 (vux : vuy)) table); lexEsc vuz = []; ; lexEsc0 mne vu69 = lexEsc00 mne vu69; ; lexEsc00 mne ([],s') = (mne,s') : []; lexEsc00 mne vvv = []; ; lexEsc1 s vu70 = lexEsc10 s vu70; ; lexEsc10 s (c,mne) = concatMap (lexEsc0 mne) (lexmatch mne s : []); lexEsc10 s vvw = []; ; lexEsc2 (pr : vvu) = 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 (yvu : yvx) = lexEsc14 (yvu : yvx); lexEsc (yuv : s) = lexEsc11 (yuv : s); lexEsc (xzw : s) = lexEsc8 (xzw : s); lexEsc (vux : vuy) = lexEsc6 (vux : vuy); lexEsc vuz = lexEsc3 vuz; ; lexEsc0 mne vu69 = lexEsc00 mne vu69; ; lexEsc00 mne ([],s') = (mne,s') : []; lexEsc00 mne vvv = []; ; lexEsc1 s vu70 = lexEsc10 s vu70; ; lexEsc10 s (c,mne) = concatMap (lexEsc0 mne) (lexmatch mne s : []); lexEsc10 s vvw = []; ; lexEsc11 (yuv : s) = lexEsc9 (yuv == 'o') (yuv : s); lexEsc11 yuy = lexEsc8 yuy; ; lexEsc12 yvu c s True = ('^' : c : [],s) : []; lexEsc12 yvu c s False = lexEsc11 (yvu : c : s); ; lexEsc13 True (yvu : c : s) = lexEsc12 yvu c s (c >= '@' && c <= '_'); lexEsc13 yvy yvz = lexEsc11 yvz; ; lexEsc14 (yvu : yvx) = lexEsc13 (yvu == '^') (yvu : yvx); lexEsc14 ywu = lexEsc11 ywu; ; 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 yww = lexEsc14 yww; ; lexEsc2 (pr : vvu) = pr : []; lexEsc2 [] = []; ; lexEsc3 vuz = []; ; lexEsc4 vux vuy True = lexEsc2 (concatMap (lexEsc1 (vux : vuy)) table); lexEsc4 vux vuy False = lexEsc3 (vux : vuy); ; lexEsc5 vux vuy True = span isDigit (vux : vuy) : []; lexEsc5 vux vuy False = lexEsc4 vux vuy (isUpper vux); ; lexEsc6 (vux : vuy) = lexEsc5 vux vuy (isDigit vux); lexEsc6 xzu = lexEsc3 xzu; ; lexEsc7 True (xzw : s) = prefix 'x' (span isHexDigit s) : []; lexEsc7 xzx xzy = lexEsc6 xzy; ; lexEsc8 (xzw : s) = lexEsc7 (xzw == 'x') (xzw : s); lexEsc8 xzz = lexEsc6 xzz; ; lexEsc9 True (yuv : s) = prefix 'o' (span isOctDigit s) : []; lexEsc9 yuw yux = lexEsc8 yux; ; 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 ywz = lexLitChar2 ywz; " The following Function with conditions "span p [] = ([],[]); span p (vvx : vvy)|p vvx(vvx : ys,zs)|otherwise([],vvx : vvy) where { vu43 = span p vvy; ; ys = ys0 vu43; ; ys0 (ys,vwu) = ys; ; zs = zs0 vu43; ; zs0 (vvz,zs) = zs; } ; " is transformed to "span p [] = span3 p []; span p (vvx : vvy) = span2 p (vvx : vvy); " "span2 p (vvx : vvy) = span1 p vvx vvy (p vvx) where { span0 p vvx vvy True = ([],vvx : vvy); ; span1 p vvx vvy True = (vvx : ys,zs); span1 p vvx vvy False = span0 p vvx vvy otherwise; ; vu43 = span p vvy; ; ys = ys0 vu43; ; ys0 (ys,vwu) = ys; ; zs = zs0 vu43; ; zs0 (vvz,zs) = zs; } ; " "span3 p [] = ([],[]); span3 yxw yxx = span2 yxw yxx; " ---------------------------------------- (10) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (11) LetRed (EQUIVALENT) Let/Where Reductions: The bindings of the following Let/Where expression "concatMap lex1 (lexString s) where { lex1 vu55 = lex10 vu55; ; lex10 (str,t) = ('"' : str,t) : []; lex10 xu = []; ; lexStrItem (vzv : vzz) = lexStrItem7 (vzv : vzz); lexStrItem (vxz : vyw) = lexStrItem4 (vxz : vyw); lexStrItem s = lexStrItem1 s; ; lexStrItem0 vu58 = lexStrItem00 vu58; ; lexStrItem00 (wvu : t) = lexStrItem002 (wvu : t); lexStrItem00 wz = lexStrItem000 wz; ; lexStrItem000 wz = []; ; lexStrItem001 True (wvu : t) = ([],t) : []; lexStrItem001 wvv wvw = lexStrItem000 wvw; ; lexStrItem002 (wvu : t) = lexStrItem001 (wvu == '\') (wvu : t); lexStrItem002 wvx = lexStrItem000 wvx; ; lexStrItem1 s = lexLitChar s; ; lexStrItem2 vxz c s True = concatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem2 vxz c s False = lexStrItem1 (vxz : c : s); ; lexStrItem3 True (vxz : c : s) = lexStrItem2 vxz c s (isSpace c); lexStrItem3 vyx vyy = lexStrItem1 vyy; ; lexStrItem4 (vxz : vyw) = lexStrItem3 (vxz == '\') (vxz : vyw); lexStrItem4 vyz = lexStrItem1 vyz; ; lexStrItem5 True (vzv : vzx : s) = ('\' : '&' : [],s) : []; lexStrItem5 wuu wuv = lexStrItem4 wuv; ; lexStrItem6 True (vzv : vzx : s) = lexStrItem5 (vzx == '&') (vzv : vzx : s); lexStrItem6 wuw wux = lexStrItem4 wux; ; lexStrItem7 (vzv : vzz) = lexStrItem6 (vzv == '\') (vzv : vzz); lexStrItem7 wuy = lexStrItem4 wuy; ; lexString (vxu : s) = lexString4 (vxu : s); lexString s = lexString2 s; ; lexString0 ch vu56 = lexString00 ch vu56; ; lexString00 ch (str,u) = (ch ++ str,u) : []; lexString00 ch wx = []; ; lexString1 vu57 = lexString10 vu57; ; lexString10 (ch,t) = concatMap (lexString0 ch) (lexString t); lexString10 wy = []; ; lexString2 s = concatMap lexString1 (lexStrItem s); ; lexString3 True (vxu : s) = ('"' : [],s) : []; lexString3 vxv vxw = lexString2 vxw; ; lexString4 (vxu : s) = lexString3 (vxu == '"') (vxu : s); lexString4 vxx = lexString2 vxx; } " are unpacked to the following functions on top level "lex13LexString3 True (vxu : s) = ('"' : [],s) : []; lex13LexString3 vxv vxw = lex13LexString2 vxw; " "lex13LexString0 ch vu56 = lex13LexString00 ch vu56; " "lex13LexStrItem00 (wvu : t) = lex13LexStrItem002 (wvu : t); lex13LexStrItem00 wz = lex13LexStrItem000 wz; " "lex13LexString1 vu57 = lex13LexString10 vu57; " "lex13LexStrItem001 True (wvu : t) = ([],t) : []; lex13LexStrItem001 wvv wvw = lex13LexStrItem000 wvw; " "lex13LexStrItem002 (wvu : t) = lex13LexStrItem001 (wvu == '\') (wvu : t); lex13LexStrItem002 wvx = lex13LexStrItem000 wvx; " "lex13LexString4 (vxu : s) = lex13LexString3 (vxu == '"') (vxu : s); lex13LexString4 vxx = lex13LexString2 vxx; " "lex13LexStrItem4 (vxz : vyw) = lex13LexStrItem3 (vxz == '\') (vxz : vyw); lex13LexStrItem4 vyz = lex13LexStrItem1 vyz; " "lex13LexStrItem3 True (vxz : c : s) = lex13LexStrItem2 vxz c s (isSpace c); lex13LexStrItem3 vyx vyy = lex13LexStrItem1 vyy; " "lex13LexString10 (ch,t) = concatMap (lex13LexString0 ch) (lex13LexString t); lex13LexString10 wy = []; " "lex13LexStrItem7 (vzv : vzz) = lex13LexStrItem6 (vzv == '\') (vzv : vzz); lex13LexStrItem7 wuy = lex13LexStrItem4 wuy; " "lex13LexStrItem0 vu58 = lex13LexStrItem00 vu58; " "lex13LexStrItem (vzv : vzz) = lex13LexStrItem7 (vzv : vzz); lex13LexStrItem (vxz : vyw) = lex13LexStrItem4 (vxz : vyw); lex13LexStrItem s = lex13LexStrItem1 s; " "lex13LexStrItem6 True (vzv : vzx : s) = lex13LexStrItem5 (vzx == '&') (vzv : vzx : s); lex13LexStrItem6 wuw wux = lex13LexStrItem4 wux; " "lex13Lex10 (str,t) = ('"' : str,t) : []; lex13Lex10 xu = []; " "lex13LexStrItem000 wz = []; " "lex13LexStrItem2 vxz c s True = concatMap lex13LexStrItem0 (dropWhile isSpace s : []); lex13LexStrItem2 vxz c s False = lex13LexStrItem1 (vxz : c : s); " "lex13Lex1 vu55 = lex13Lex10 vu55; " "lex13LexString (vxu : s) = lex13LexString4 (vxu : s); lex13LexString s = lex13LexString2 s; " "lex13LexStrItem1 s = lexLitChar s; " "lex13LexStrItem5 True (vzv : vzx : s) = ('\' : '&' : [],s) : []; lex13LexStrItem5 wuu wuv = lex13LexStrItem4 wuv; " "lex13LexString00 ch (str,u) = (ch ++ str,u) : []; lex13LexString00 ch wx = []; " "lex13LexString2 s = concatMap lex13LexString1 (lex13LexStrItem s); " The bindings of the following Let/Where expression "span1 p vvx vvy (p vvx) where { span0 p vvx vvy True = ([],vvx : vvy); ; span1 p vvx vvy True = (vvx : ys,zs); span1 p vvx vvy False = span0 p vvx vvy otherwise; ; vu43 = span p vvy; ; ys = ys0 vu43; ; ys0 (ys,vwu) = ys; ; zs = zs0 vu43; ; zs0 (vvz,zs) = zs; } " are unpacked to the following functions on top level "span2Zs yxy yxz = span2Zs0 yxy yxz (span2Vu43 yxy yxz); " "span2Ys0 yxy yxz (ys,vwu) = ys; " "span2Vu43 yxy yxz = span yxy yxz; " "span2Zs0 yxy yxz (vvz,zs) = zs; " "span2Span1 yxy yxz p vvx vvy True = (vvx : span2Ys yxy yxz,span2Zs yxy yxz); span2Span1 yxy yxz p vvx vvy False = span2Span0 yxy yxz p vvx vvy otherwise; " "span2Ys yxy yxz = span2Ys0 yxy yxz (span2Vu43 yxy yxz); " "span2Span0 yxy yxz p vvx vvy True = ([],vvx : vvy); " 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 yw = []; ; lex3 c vu60 = lex30 c vu60; ; lex30 c (nam,t) = (c : nam,t) : []; lex30 c yx = []; ; lex4 c ds vu61 = lex40 c ds vu61; ; lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex40 c ds yu = []; ; lex5 c vu62 = lex50 c vu62; ; lex50 c (ds,s) = concatMap (lex4 c ds) (lexFracExp s); lex50 c yv = []; ; 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 xv = []; ; lexExp1 e vu66 = lexExp10 e vu66; ; lexExp10 e (c : t) = lexExp100 e c t (c `elem` '+' : '-' : []); lexExp10 e xx = []; ; 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 xw = []; ; 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 wvz = lexExp3 wvz; ; lexFracExp (wwv : wwy) = lexFracExp5 (wwv : wwy); lexFracExp s = lexFracExp2 s; ; lexFracExp0 ds vu63 = lexFracExp00 ds vu63; ; lexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lexFracExp00 ds xz = []; ; lexFracExp1 vu64 = lexFracExp10 vu64; ; lexFracExp10 (ds,t) = concatMap (lexFracExp0 ds) (lexExp t); lexFracExp10 xy = []; ; lexFracExp2 s = lexExp s; ; lexFracExp3 wwv c cs True = concatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp3 wwv c cs False = lexFracExp2 (wwv : c : cs); ; lexFracExp4 True (wwv : c : cs) = lexFracExp3 wwv c cs (isDigit c); lexFracExp4 wwz wxu = lexFracExp2 wxu; ; lexFracExp5 (wwv : wwy) = lexFracExp4 (wwv == '.') (wwv : wwy); lexFracExp5 wxv = lexFracExp2 wxv; } " are unpacked to the following functions on top level "lex12LexExp1 e vu66 = lex12LexExp10 e vu66; " "lex12LexExp00 e c (ds,u) = (e : c : ds,u) : []; lex12LexExp00 e c xv = []; " "lex12LexExp5 (e : s) = lex12LexExp4 e s (e `elem` 'e' : 'E' : []); lex12LexExp5 wvz = lex12LexExp3 wvz; " "lex12IsSingle c = c `elem` ',' : ';' : '(' : ')' : '[' : ']' : '{' : '}' : '_' : '`' : []; " "lex12LexFracExp (wwv : wwy) = lex12LexFracExp5 (wwv : wwy); lex12LexFracExp s = lex12LexFracExp2 s; " "lex12LexExp100 e c t True = concatMap (lex12LexExp0 e c) (lexDigits t); lex12LexExp100 e c t False = []; " "lex12LexFracExp3 wwv c cs True = concatMap lex12LexFracExp1 (lexDigits (c : cs)); lex12LexFracExp3 wwv c cs False = lex12LexFracExp2 (wwv : c : cs); " "lex12LexFracExp2 s = lex12LexExp s; " "lex12Lex9 c s True = concatMap (lex12Lex2 c) (span lex12IsSym s : []); lex12Lex9 c s False = lex12Lex8 c s (isAlpha c); " "lex12LexFracExp4 True (wwv : c : cs) = lex12LexFracExp3 wwv c cs (isDigit c); lex12LexFracExp4 wwz wxu = lex12LexFracExp2 wxu; " "lex12LexExp (e : s) = lex12LexExp5 (e : s); lex12LexExp s = lex12LexExp3 s; " "lex12LexExp0 e c vu65 = lex12LexExp00 e c vu65; " "lex12IsSym c = c `elem` '!' : '@' : '#' : '$' : '%' : '&' : '*' : '+' : '.' : '/' : '<' : '=' : '>' : '?' : '\' : '^' : '|' : ':' : '-' : '~' : []; " "lex12LexExp20 e (ds,t) = (e : ds,t) : []; lex12LexExp20 e xw = []; " "lex12Lex5 c vu62 = lex12Lex50 c vu62; " "lex12LexFracExp1 vu64 = lex12LexFracExp10 vu64; " "lex12LexExp3 s = ([],s) : []; " "lex12LexFracExp0 ds vu63 = lex12LexFracExp00 ds vu63; " "lex12LexExp2 e vu67 = lex12LexExp20 e vu67; " "lex12LexExp10 e (c : t) = lex12LexExp100 e c t (c `elem` '+' : '-' : []); lex12LexExp10 e xx = []; " "lex12Lex4 c ds vu61 = lex12Lex40 c ds vu61; " "lex12LexFracExp5 (wwv : wwy) = lex12LexFracExp4 (wwv == '.') (wwv : wwy); lex12LexFracExp5 wxv = lex12LexFracExp2 wxv; " "lex12Lex20 c (sym,t) = (c : sym,t) : []; lex12Lex20 c yw = []; " "lex12LexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lex12LexFracExp00 ds xz = []; " "lex12LexExp4 e s True = concatMap (lex12LexExp1 e) (s : []) ++ concatMap (lex12LexExp2 e) (lexDigits s); lex12LexExp4 e s False = lex12LexExp3 (e : s); " "lex12Lex30 c (nam,t) = (c : nam,t) : []; lex12Lex30 c yx = []; " "lex12Lex50 c (ds,s) = concatMap (lex12Lex4 c ds) (lex12LexFracExp s); lex12Lex50 c yv = []; " "lex12Lex6 c s True = []; " "lex12Lex7 c s True = concatMap (lex12Lex5 c) (span isDigit s : []); lex12Lex7 c s False = lex12Lex6 c s otherwise; " "lex12Lex8 c s True = concatMap (lex12Lex3 c) (span lex12IsIdChar s : []); lex12Lex8 c s False = lex12Lex7 c s (isDigit c); " "lex12Lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex12Lex40 c ds yu = []; " "lex12IsIdChar c = isAlphaNum c || c `elem` '_' : ''' : []; " "lex12Lex3 c vu60 = lex12Lex30 c vu60; " "lex12Lex2 c vu59 = lex12Lex20 c vu59; " "lex12Lex11 c s True = (c : [],s) : []; lex12Lex11 c s False = lex12Lex9 c s (lex12IsSym c); " "lex12LexFracExp10 (ds,t) = concatMap (lex12LexFracExp0 ds) (lex12LexExp t); lex12LexFracExp10 xy = []; " The bindings of the following Let/Where expression "lexLitChar1 c s (c /= '\') where { lexEsc (c : s) = lexEsc16 (c : s); lexEsc (yvu : yvx) = lexEsc14 (yvu : yvx); lexEsc (yuv : s) = lexEsc11 (yuv : s); lexEsc (xzw : s) = lexEsc8 (xzw : s); lexEsc (vux : vuy) = lexEsc6 (vux : vuy); lexEsc vuz = lexEsc3 vuz; ; lexEsc0 mne vu69 = lexEsc00 mne vu69; ; lexEsc00 mne ([],s') = (mne,s') : []; lexEsc00 mne vvv = []; ; lexEsc1 s vu70 = lexEsc10 s vu70; ; lexEsc10 s (c,mne) = concatMap (lexEsc0 mne) (lexmatch mne s : []); lexEsc10 s vvw = []; ; lexEsc11 (yuv : s) = lexEsc9 (yuv == 'o') (yuv : s); lexEsc11 yuy = lexEsc8 yuy; ; lexEsc12 yvu c s True = ('^' : c : [],s) : []; lexEsc12 yvu c s False = lexEsc11 (yvu : c : s); ; lexEsc13 True (yvu : c : s) = lexEsc12 yvu c s (c >= '@' && c <= '_'); lexEsc13 yvy yvz = lexEsc11 yvz; ; lexEsc14 (yvu : yvx) = lexEsc13 (yvu == '^') (yvu : yvx); lexEsc14 ywu = lexEsc11 ywu; ; 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 yww = lexEsc14 yww; ; lexEsc2 (pr : vvu) = pr : []; lexEsc2 [] = []; ; lexEsc3 vuz = []; ; lexEsc4 vux vuy True = lexEsc2 (concatMap (lexEsc1 (vux : vuy)) table); lexEsc4 vux vuy False = lexEsc3 (vux : vuy); ; lexEsc5 vux vuy True = span isDigit (vux : vuy) : []; lexEsc5 vux vuy False = lexEsc4 vux vuy (isUpper vux); ; lexEsc6 (vux : vuy) = lexEsc5 vux vuy (isDigit vux); lexEsc6 xzu = lexEsc3 xzu; ; lexEsc7 True (xzw : s) = prefix 'x' (span isHexDigit s) : []; lexEsc7 xzx xzy = lexEsc6 xzy; ; lexEsc8 (xzw : s) = lexEsc7 (xzw == 'x') (xzw : s); lexEsc8 xzz = lexEsc6 xzz; ; lexEsc9 True (yuv : s) = prefix 'o' (span isOctDigit s) : []; lexEsc9 yuw yux = lexEsc8 yux; ; 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 "lexLitChar2Table = ('\127','D' : 'E' : 'L' : []) : asciiTab; " "lexLitChar2LexEsc1 s vu70 = lexLitChar2LexEsc10 s vu70; " "lexLitChar2LexEsc00 mne ([],s') = (mne,s') : []; lexLitChar2LexEsc00 mne vvv = []; " "lexLitChar2LexEsc6 (vux : vuy) = lexLitChar2LexEsc5 vux vuy (isDigit vux); lexLitChar2LexEsc6 xzu = lexLitChar2LexEsc3 xzu; " "lexLitChar2LexEsc10 s (c,mne) = concatMap (lexLitChar2LexEsc0 mne) (lexmatch mne s : []); lexLitChar2LexEsc10 s vvw = []; " "lexLitChar2LexEsc7 True (xzw : s) = lexLitChar2Prefix 'x' (span isHexDigit s) : []; lexLitChar2LexEsc7 xzx xzy = lexLitChar2LexEsc6 xzy; " "lexLitChar2LexEsc (c : s) = lexLitChar2LexEsc16 (c : s); lexLitChar2LexEsc (yvu : yvx) = lexLitChar2LexEsc14 (yvu : yvx); lexLitChar2LexEsc (yuv : s) = lexLitChar2LexEsc11 (yuv : s); lexLitChar2LexEsc (xzw : s) = lexLitChar2LexEsc8 (xzw : s); lexLitChar2LexEsc (vux : vuy) = lexLitChar2LexEsc6 (vux : vuy); lexLitChar2LexEsc vuz = lexLitChar2LexEsc3 vuz; " "lexLitChar2LexEsc16 (c : s) = lexLitChar2LexEsc15 c s (c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : []); lexLitChar2LexEsc16 yww = lexLitChar2LexEsc14 yww; " "lexLitChar2LexEsc15 c s True = (c : [],s) : []; lexLitChar2LexEsc15 c s False = lexLitChar2LexEsc14 (c : s); " "lexLitChar2LexEsc11 (yuv : s) = lexLitChar2LexEsc9 (yuv == 'o') (yuv : s); lexLitChar2LexEsc11 yuy = lexLitChar2LexEsc8 yuy; " "lexLitChar2Prefix c (t,s) = (c : t,s); " "lexLitChar2LexEsc9 True (yuv : s) = lexLitChar2Prefix 'o' (span isOctDigit s) : []; lexLitChar2LexEsc9 yuw yux = lexLitChar2LexEsc8 yux; " "lexLitChar2LexEsc4 vux vuy True = lexLitChar2LexEsc2 (concatMap (lexLitChar2LexEsc1 (vux : vuy)) lexLitChar2Table); lexLitChar2LexEsc4 vux vuy False = lexLitChar2LexEsc3 (vux : vuy); " "lexLitChar2LexEsc2 (pr : vvu) = pr : []; lexLitChar2LexEsc2 [] = []; " "lexLitChar2LexLitChar0 c s True = map (lexLitChar2Prefix '\') (lexLitChar2LexEsc s); " "lexLitChar2LexEsc13 True (yvu : c : s) = lexLitChar2LexEsc12 yvu c s (c >= '@' && c <= '_'); lexLitChar2LexEsc13 yvy yvz = lexLitChar2LexEsc11 yvz; " "lexLitChar2LexEsc3 vuz = []; " "lexLitChar2LexEsc0 mne vu69 = lexLitChar2LexEsc00 mne vu69; " "lexLitChar2LexLitChar1 c s True = (c : [],s) : []; lexLitChar2LexLitChar1 c s False = lexLitChar2LexLitChar0 c s otherwise; " "lexLitChar2LexEsc14 (yvu : yvx) = lexLitChar2LexEsc13 (yvu == '^') (yvu : yvx); lexLitChar2LexEsc14 ywu = lexLitChar2LexEsc11 ywu; " "lexLitChar2LexEsc5 vux vuy True = span isDigit (vux : vuy) : []; lexLitChar2LexEsc5 vux vuy False = lexLitChar2LexEsc4 vux vuy (isUpper vux); " "lexLitChar2LexEsc12 yvu c s True = ('^' : c : [],s) : []; lexLitChar2LexEsc12 yvu c s False = lexLitChar2LexEsc11 (yvu : c : s); " "lexLitChar2LexEsc8 (xzw : s) = lexLitChar2LexEsc7 (xzw == 'x') (xzw : s); lexLitChar2LexEsc8 xzz = lexLitChar2LexEsc6 xzz; " 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 (xwu : xwv,u) = mandatory002 x (xwu : xwv,u); mandatory00 x zx = mandatory000 x zx; ; mandatory000 x zx = []; ; mandatory001 True x (xwu : [],u) = (x,u) : []; mandatory001 xww xwx xwy = mandatory000 xwx xwy; ; mandatory002 x (xwu : xwv,u) = mandatory001 (xwu == ')') x (xwu : xwv,u); mandatory002 xwz xxu = mandatory000 xwz xxu; ; mandatory1 vu49 = mandatory10 vu49; ; mandatory10 (x,t) = concatMap (mandatory0 x) (lex t); mandatory10 zy = []; ; mandatory2 vu50 = mandatory20 vu50; ; mandatory20 (xuz : xvu,s) = mandatory202 (xuz : xvu,s); mandatory20 zw = mandatory200 zw; ; mandatory200 zw = []; ; mandatory201 True (xuz : [],s) = concatMap mandatory1 (optional s); mandatory201 xvv xvw = mandatory200 xvw; ; mandatory202 (xuz : xvu,s) = mandatory201 (xuz == '(') (xuz : xvu,s); mandatory202 xvx = mandatory200 xvx; ; optional r = g r ++ mandatory r; ; readParen0 True = mandatory; readParen0 False = optional; } " are unpacked to the following functions on top level "readParenMandatory002 yyu x (xwu : xwv,u) = readParenMandatory001 yyu (xwu == ')') x (xwu : xwv,u); readParenMandatory002 yyu xwz xxu = readParenMandatory000 yyu xwz xxu; " "readParenMandatory202 yyu (xuz : xvu,s) = readParenMandatory201 yyu (xuz == '(') (xuz : xvu,s); readParenMandatory202 yyu xvx = readParenMandatory200 yyu xvx; " "readParenMandatory001 yyu True x (xwu : [],u) = (x,u) : []; readParenMandatory001 yyu xww xwx xwy = readParenMandatory000 yyu xwx xwy; " "readParenMandatory2 yyu vu50 = readParenMandatory20 yyu vu50; " "readParenMandatory10 yyu (x,t) = concatMap (readParenMandatory0 yyu x) (lex t); readParenMandatory10 yyu zy = []; " "readParenMandatory00 yyu x (xwu : xwv,u) = readParenMandatory002 yyu x (xwu : xwv,u); readParenMandatory00 yyu x zx = readParenMandatory000 yyu x zx; " "readParenMandatory000 yyu x zx = []; " "readParenMandatory0 yyu x vu48 = readParenMandatory00 yyu x vu48; " "readParenMandatory20 yyu (xuz : xvu,s) = readParenMandatory202 yyu (xuz : xvu,s); readParenMandatory20 yyu zw = readParenMandatory200 yyu zw; " "readParenReadParen0 yyu True = readParenMandatory yyu; readParenReadParen0 yyu False = readParenOptional yyu; " "readParenMandatory200 yyu zw = []; " "readParenOptional yyu r = yyu r ++ readParenMandatory yyu r; " "readParenMandatory yyu r = concatMap (readParenMandatory2 yyu) (lex r); " "readParenMandatory201 yyu True (xuz : [],s) = concatMap (readParenMandatory1 yyu) (readParenOptional yyu s); readParenMandatory201 yyu xvv xvw = readParenMandatory200 yyu xvw; " "readParenMandatory1 yyu vu49 = readParenMandatory10 yyu vu49; " ---------------------------------------- (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; }