diff -r 612ee826a409 -r 0d5a171db2f0 src/Pure/search.ML --- a/src/Pure/search.ML Sun Jul 23 12:02:22 2000 +0200 +++ b/src/Pure/search.ML Sun Jul 23 12:04:56 2000 +0200 @@ -38,20 +38,13 @@ end; -(** Instantiation of leftist heaps for best-first search **) +(** Instantiation of heaps for best-first search **) -(*Termless makes the ordering total, allowing duplicates to be found*) -structure MeasureThm : ORDERED = -struct - type T = int * thm - fun eq ((m,th):T, (m',th')) = (m=m' andalso eq_thm(th,th')) - fun lt ((m,th):T, (m',th')) = - (m next(foldr MeasureThmHeap.insert + ([],nonsats) => next(foldr ThmHeap.insert (map pairsize nonsats, nprf_heap)) | (sats,_) => some_of_list sats) and next nprf_heap = - if MeasureThmHeap.isEmpty nprf_heap then None + if ThmHeap.is_empty nprf_heap then None else - let val (n,prf) = MeasureThmHeap.findMin nprf_heap + let val (n,prf) = ThmHeap.min nprf_heap in if !trace_BEST_FIRST then writeln("state size = " ^ string_of_int n) else (); bfs (Seq.list_of (tac prf), - deleteAllMin prf (MeasureThmHeap.deleteMin nprf_heap)) + deleteAllMin prf (ThmHeap.delete_min nprf_heap)) end - fun btac st = bfs (Seq.list_of (tac0 st), MeasureThmHeap.empty) + fun btac st = bfs (Seq.list_of (tac0 st), ThmHeap.empty) in traced_tac btac end; (*Ordinary best-first search, with no initial tactic*)