Spaces
Explore
Communities
Statistics
Reports
Cluster
Status
Help
Haskell 2019-04-01 06.52 pair #433316066
details
property
value
status
complete
benchmark
FiniteMap_plusFM_6.hs
ran by
Akihisa Yamada
cpu timeout
1200 seconds
wallclock timeout
300 seconds
memory limit
137438953472 bytes
execution host
n063.star.cs.uiowa.edu
space
full_haskell
run statistics
property
value
solver
AProVE
configuration
standard
runtime (wallclock)
162.858 seconds
cpu usage
192.386
user time
189.169
system time
3.21651
max virtual memory
1.8285568E7
max residence set size
6066224.0
stage attributes
key
value
starexec-result
MAYBE
output
188.92/161.89 MAYBE 191.26/162.57 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 191.26/162.57 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 191.26/162.57 191.26/162.57 191.26/162.57 H-Termination with start terms of the given HASKELL could not be shown: 191.26/162.57 191.26/162.57 (0) HASKELL 191.26/162.57 (1) LR [EQUIVALENT, 0 ms] 191.26/162.57 (2) HASKELL 191.26/162.57 (3) CR [EQUIVALENT, 0 ms] 191.26/162.57 (4) HASKELL 191.26/162.57 (5) BR [EQUIVALENT, 0 ms] 191.26/162.57 (6) HASKELL 191.26/162.57 (7) COR [EQUIVALENT, 11 ms] 191.26/162.57 (8) HASKELL 191.26/162.57 (9) LetRed [EQUIVALENT, 0 ms] 191.26/162.57 (10) HASKELL 191.26/162.57 (11) NumRed [SOUND, 12 ms] 191.26/162.57 (12) HASKELL 191.26/162.57 191.26/162.57 191.26/162.57 ---------------------------------------- 191.26/162.57 191.26/162.57 (0) 191.26/162.57 Obligation: 191.26/162.57 mainModule Main 191.26/162.57 module FiniteMap where { 191.26/162.57 import qualified Main; 191.26/162.57 import qualified Maybe; 191.26/162.57 import qualified Prelude; 191.26/162.57 data FiniteMap b a = EmptyFM | Branch b a Int (FiniteMap b a) (FiniteMap b a) ; 191.26/162.57 191.26/162.57 instance (Eq a, Eq b) => Eq FiniteMap a b where { 191.26/162.57 } 191.26/162.57 addToFM :: Ord a => FiniteMap a b -> a -> b -> FiniteMap a b; 191.26/162.57 addToFM fm key elt = addToFM_C (\old new ->new) fm key elt; 191.26/162.57 191.26/162.57 addToFM_C :: Ord b => (a -> a -> a) -> FiniteMap b a -> b -> a -> FiniteMap b a; 191.26/162.57 addToFM_C combiner EmptyFM key elt = unitFM key elt; 191.26/162.57 addToFM_C combiner (Branch key elt size fm_l fm_r) new_key new_elt | new_key < key = mkBalBranch key elt (addToFM_C combiner fm_l new_key new_elt) fm_r 191.26/162.57 | new_key > key = mkBalBranch key elt fm_l (addToFM_C combiner fm_r new_key new_elt) 191.26/162.57 | otherwise = Branch new_key (combiner elt new_elt) size fm_l fm_r; 191.26/162.57 191.26/162.57 emptyFM :: FiniteMap a b; 191.26/162.57 emptyFM = EmptyFM; 191.26/162.57 191.26/162.57 findMax :: FiniteMap a b -> (a,b); 191.26/162.57 findMax (Branch key elt _ _ EmptyFM) = (key,elt); 191.26/162.57 findMax (Branch key elt _ _ fm_r) = findMax fm_r; 191.26/162.57 191.26/162.57 findMin :: FiniteMap a b -> (a,b); 191.26/162.57 findMin (Branch key elt _ EmptyFM _) = (key,elt); 191.26/162.57 findMin (Branch key elt _ fm_l _) = findMin fm_l; 191.26/162.57 191.26/162.57 mkBalBranch :: Ord a => a -> b -> FiniteMap a b -> FiniteMap a b -> FiniteMap a b; 191.26/162.57 mkBalBranch key elt fm_L fm_R | size_l + size_r < 2 = mkBranch 1 key elt fm_L fm_R 191.26/162.57 | size_r > sIZE_RATIO * size_l = case fm_R of { 191.26/162.57 Branch _ _ _ fm_rl fm_rr | sizeFM fm_rl < 2 * sizeFM fm_rr -> single_L fm_L fm_R 191.26/162.57 | otherwise -> double_L fm_L fm_R; 191.26/162.57 } 191.26/162.57 | size_l > sIZE_RATIO * size_r = case fm_L of { 191.26/162.57 Branch _ _ _ fm_ll fm_lr | sizeFM fm_lr < 2 * sizeFM fm_ll -> single_R fm_L fm_R 191.26/162.57 | otherwise -> double_R fm_L fm_R; 191.26/162.57 } 191.26/162.57 | otherwise = mkBranch 2 key elt fm_L fm_R where { 191.26/162.57 double_L fm_l (Branch key_r elt_r _ (Branch key_rl elt_rl _ fm_rll fm_rlr) fm_rr) = mkBranch 5 key_rl elt_rl (mkBranch 6 key elt fm_l fm_rll) (mkBranch 7 key_r elt_r fm_rlr fm_rr); 191.26/162.57 double_R (Branch key_l elt_l _ fm_ll (Branch key_lr elt_lr _ fm_lrl fm_lrr)) fm_r = mkBranch 10 key_lr elt_lr (mkBranch 11 key_l elt_l fm_ll fm_lrl) (mkBranch 12 key elt fm_lrr fm_r); 191.26/162.57 single_L fm_l (Branch key_r elt_r _ fm_rl fm_rr) = mkBranch 3 key_r elt_r (mkBranch 4 key elt fm_l fm_rl) fm_rr; 191.26/162.57 single_R (Branch key_l elt_l _ fm_ll fm_lr) fm_r = mkBranch 8 key_l elt_l fm_ll (mkBranch 9 key elt fm_lr fm_r); 191.26/162.57 size_l = sizeFM fm_L; 191.26/162.57 size_r = sizeFM fm_R; 191.26/162.57 }; 191.26/162.57 191.26/162.57 mkBranch :: Ord a => Int -> a -> b -> FiniteMap a b -> FiniteMap a b -> FiniteMap a b; 191.26/162.57 mkBranch which key elt fm_l fm_r = let { 191.26/162.57 result = Branch key elt (unbox (1 + left_size + right_size)) fm_l fm_r; 191.26/162.57 } in result where { 191.26/162.57 balance_ok = True; 191.26/162.57 left_ok = case fm_l of { 191.26/162.57 EmptyFM-> True; 191.26/162.57 Branch left_key _ _ _ _-> let { 191.26/162.57 biggest_left_key = fst (findMax fm_l); 191.26/162.57 } in biggest_left_key < key; 191.26/162.57 } ; 191.26/162.57 left_size = sizeFM fm_l; 191.26/162.57 right_ok = case fm_r of { 191.26/162.57 EmptyFM-> True; 191.26/162.57 Branch right_key _ _ _ _-> let { 191.26/162.57 smallest_right_key = fst (findMin fm_r); 191.26/162.57 } in key < smallest_right_key; 191.26/162.57 } ; 191.26/162.57 right_size = sizeFM fm_r; 191.26/162.57 unbox :: Int -> Int; 191.26/162.57 unbox x = x; 191.26/162.57 }; 191.26/162.57 191.26/162.57 mkVBalBranch :: Ord b => b -> a -> FiniteMap b a -> FiniteMap b a -> FiniteMap b a; 191.26/162.57 mkVBalBranch key elt EmptyFM fm_r = addToFM fm_r key elt; 191.26/162.57 mkVBalBranch key elt fm_l EmptyFM = addToFM fm_l key elt;
popout
output may be truncated. 'popout' for the full output.
job log
popout
actions
all output
return to Haskell 2019-04-01 06.52