logtk

Core types and algorithms for logic
IN THIS PACKAGE
Module Logtk . Position . Build
type t
val empty : t

Empty builder (position=Stop)

val to_pos : t -> position

Extract current position

val of_pos : position -> t

Start from a given position

val prefix : position -> t -> t

Prefix the builder with the given position

val suffix : t -> position -> t

Append position at the end

All the following builders add elements to the end of the builder. This is useful when a term is traversed and positions of subterms are needed, since positions are easier to build in the wrong order (leaf-to-root).

val type_ : t -> t
val left : t -> t

Add left at the end

val right : t -> t

Add left at the end

val body : t -> t
val head : t -> t
val arg : int -> t -> t

Arg position at the end

include Interfaces.PRINT with type t := t
val to_string : t -> string