Skip to content

Exponential Fibonacci isn't terminating #2

Description

@etiamz

The following input program doesn't terminate with :trans 2 in reasonable amount of time:

main = fib n;

fib n = case n of
      Z -> Z
    | S(n') -> case n' of
          Z -> S(Z)
        | S(n'') -> plus (fib S(n'')) (fib n'');

plus x y = case x of
      Z -> y
    | S(x) -> S(plus x y)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions