[sledge] Add Trm.height

Reviewed By: da319

Differential Revision: D24532357

fbshipit-source-id: 32fb92d91
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent 8381e149a3
commit 82826db011

@ -496,3 +496,4 @@ let subtrms e = Iter.from_labelled_iter (iter_subtrms e)
(** Query *)
let fv e = Var.Set.of_iter (vars e)
let rec height e = 1 + Iter.fold ~f:(fun x -> max (height x)) (subtrms e) 0

@ -96,6 +96,7 @@ val map : t -> f:(t -> t) -> t
val seq_size_exn : t -> t
val seq_size : t -> t option
val fv : t -> Var.Set.t
val height : t -> int
(** Traverse *)

Loading…
Cancel
Save