Resource Aware ML, Version 1.4.2, July 2018 Typechecking module ... Typecheck successful. Stack-based typecheck successful. Analyzing function db_query ... Trying degree: 1 == db_query : ['a; 'b] -> float option Non-zero annotations of the argument: 4.00 <-- (*, *) Non-zero annotations of result: Simplified bound: 4.00 -- Mode: upper Metric: steps Degree: 1 Run time: 0.01 seconds #Constraints: 6 ==== Analyzing function append ... Trying degree: 1 == append : ['a list; 'a list] -> 'a list Non-zero annotations of the argument: 9.00 <-- ([::(*)], []) 3.00 <-- ([], []) Non-zero annotations of result: Simplified bound: 3.00 + 9.00*M where M is the number of ::-nodes of the 1st component of the argument -- Mode: upper Metric: steps Degree: 1 Run time: 0.01 seconds #Constraints: 33 ==== Analyzing function partition ... Trying degree: 1 == partition : [['a; 'b] -> bool * 'b; 'a list * 'a list * 'b; 'a list] -> 'a list * 'a list * 'b Non-zero annotations of the argument: 24.00 <-- (*, ([], [], *), [::(*)]) 3.00 <-- (*, ([], [], *), []) Non-zero annotations of result: Simplified bound: 3.00 + 24.00*Y where Y is the number of ::-nodes of the 3rd component of the argument -- Mode: upper Metric: steps Degree: 1 Run time: 0.02 seconds #Constraints: 83 ==== Analyzing function quicksort ... Trying degree: 1, 2 == quicksort : ['a -> ['a; 'b] -> bool * 'b; 'b; 'a list] -> 'a list * 'b Non-zero annotations of the argument: 33.00 <-- (*, *, [::(*); ::(*)]) 60.00 <-- (*, *, [::(*)]) 5.00 <-- (*, *, []) Non-zero annotations of result: Simplified bound: 5.00 + 43.50*M + 16.50*M^2 where M is the number of ::-nodes of the 3rd component of the argument -- Mode: upper Metric: steps Degree: 2 Run time: 0.18 seconds #Constraints: 805 ==== Analyzing function foldl ... Trying degree: 1 == foldl : [['a; 'b] -> 'a; 'a; 'b list] -> 'a Non-zero annotations of the argument: 10.00 <-- (*, *, [::(*)]) 3.00 <-- (*, *, []) Non-zero annotations of result: Simplified bound: 3.00 + 10.00*M where M is the number of ::-nodes of the 3rd component of the argument -- Mode: upper Metric: steps Degree: 1 Run time: 0.02 seconds #Constraints: 29 ==== Analyzing function average_grade ... Trying degree: 1 == average_grade : [int; int list] -> float Non-zero annotations of the argument: 36.00 <-- (*, [::(*)]) 20.00 <-- (*, []) Non-zero annotations of result: Simplified bound: 20.00 + 36.00*M where M is the number of ::-nodes of the 2nd component of the argument -- Mode: upper Metric: steps Degree: 1 Run time: 0.03 seconds #Constraints: 90 ==== Analyzing function greater_eq ... Trying degree: 1 == greater_eq : [int; int; int list] -> bool * int list Non-zero annotations of the argument: 72.00 <-- (*, *, [::(*)]) 53.00 <-- (*, *, []) Non-zero annotations of result: Simplified bound: 53.00 + 72.00*M where M is the number of ::-nodes of the 3rd component of the argument -- Mode: upper Metric: steps Degree: 1 Run time: 0.06 seconds #Constraints: 203 ==== Analyzing function sort_students ... Trying degree: 1, 2, 3 == sort_students : [int list; int list] -> int list Non-zero annotations of the argument: 72.00 <-- ([::(*); ::(*)], [::(*)]) 86.00 <-- ([::(*); ::(*)], []) 61.00 <-- ([::(*)], []) 14.00 <-- ([], []) Non-zero annotations of result: Simplified bound: 14.00 - 36.00*L*M + 36.00*L*M^2 + 18.00*M + 43.00*M^2 where L is the number of ::-nodes of the 2nd component of the argument M is the number of ::-nodes of the 1st component of the argument -- Mode: upper Metric: steps Degree: 3 Run time: 2.22 seconds #Constraints: 8951 ==== Analyzing function map ... Trying degree: 1 == map : ['a -> 'b; 'a list] -> 'b list Non-zero annotations of the argument: 11.00 <-- (*, [::(*)]) 3.00 <-- (*, []) Non-zero annotations of result: Simplified bound: 3.00 + 11.00*M where M is the number of ::-nodes of the 2nd component of the argument -- Mode: upper Metric: steps Degree: 1 Run time: 0.11 seconds #Constraints: 33 ==== Analyzing function make_table ... Trying degree: 1, 2 == make_table : [int list; int list] -> (int * (int * float) list) list Non-zero annotations of the argument: 27.00 <-- ([::(*)], [::(*)]) 21.00 <-- ([::(*)], []) 9.00 <-- ([], []) Non-zero annotations of result: Simplified bound: 9.00 + 27.00*L*M + 21.00*M where L is the number of ::-nodes of the 2nd component of the argument M is the number of ::-nodes of the 1st component of the argument -- Mode: upper Metric: steps Degree: 2 Run time: 0.20 seconds #Constraints: 366 ==== Analyzing function find ... Trying degree: 1 == find : ['a -> bool; ('a * 'b) list] -> 'b Non-zero annotations of the argument: 12.00 <-- (*, [::(*, *)]) 2.00 <-- (*, []) Non-zero annotations of result: Simplified bound: 2.00 + 12.00*M where M is the number of ::-nodes of the 2nd component of the argument -- Mode: upper Metric: steps Degree: 1 Run time: 0.13 seconds #Constraints: 34 ==== Analyzing function lookup ... Trying degree: 1, 2 == lookup : [int; int; (int * (int * 'a) list) list] -> 'a Non-zero annotations of the argument: 17.00 <-- (*, *, [::(*, [::(*, *)])]) 17.00 <-- (*, *, [::(*, [])]) 8.00 <-- (*, *, []) Non-zero annotations of result: Simplified bound: 8.00 + 17.00*L*M + 17.00*M where M is the number of ::-nodes of the 3rd component of the argument L is the maximal number of ::-nodes of the 2nd component in the ::-nodes of the 3rd component of the argument -- Mode: upper Metric: steps Degree: 2 Run time: 0.19 seconds #Constraints: 180 ==== Analyzing function average_grade' ... Trying degree: 1, 2, 3 == average_grade' : [int; int list; (int * (int * float) list) list] -> float * (int * (int * float) list) list Non-zero annotations of the argument: 17.00 <-- (*, [::(*)], [::(*, [::(*, *)])]) 17.00 <-- (*, [::(*)], [::(*, [])]) 33.00 <-- (*, [::(*)], []) 23.00 <-- (*, [], []) Non-zero annotations of result: Simplified bound: 23.00 + 17.00*L*M + 17.00*L*M*Y + 33.00*M where L is the number of ::-nodes of the 3rd component of the argument Y is the maximal number of ::-nodes of the 2nd component in the ::-nodes of the 3rd component of the argument M is the number of ::-nodes of the 2nd component of the argument -- Mode: upper Metric: steps Degree: 3 Run time: 0.53 seconds #Constraints: 1096 ==== Analyzing function greater_eq' ... Trying degree: 1, 2, 3 == greater_eq' : [int list; int; int; (int * (int * float) list) list] -> bool * (int * (int * float) list) list Non-zero annotations of the argument: 34.00 <-- ([::(*)], *, *, [::(*, [::(*, *)])]) 34.00 <-- ([::(*)], *, *, [::(*, [])]) 66.00 <-- ([::(*)], *, *, []) 69.00 <-- ([], *, *, []) Non-zero annotations of result: Simplified bound: 69.00 + 34.00*L*M + 34.00*L*M*Y + 66.00*M where L is the number of ::-nodes of the 4th component of the argument Y is the maximal number of ::-nodes of the 2nd component in the ::-nodes of the 4th component of the argument M is the number of ::-nodes of the 1st component of the argument -- Mode: upper Metric: steps Degree: 3 Run time: 1.14 seconds #Constraints: 2580 ==== Analyzing function sort_students_efficient ... Trying degree: 1, 2, 3 A bound for sort_students_efficient could not be derived. The linear program is infeasible. -- Mode: upper Metric: steps Degree: 3 Run time: 6.36 seconds #Constraints: 19397 ====