2017-11-23 1 views

Antwort

1

Das Problem ist, dass Sie in der Definition von isABB Klammern fehlen.

Es sollte lauten:

predicate isABB (t:Tree<int>) 
{ 
match t 
    case Empty => true 
    case Node(l,d,r) => isABB(l) && isABB(r) 
         && (forall x :: x in multisetOfTree(l) ==> x <= t.root) 
         && (forall x :: x in multisetOfTree(r) ==> t.root <= x) 
} 
+0

Ups, danke, Paqui –

Verwandte Themen