- 0.0.1
?- term_to_text(this(is, not, a(pipe))).
this
is
not
a
pipe
true.
Used in library(tracesearch)
to draw search trees with predicate search_tree_tikz/1
Used in library((clp) and library(modeling)
to draw labeling search trees with a new option trace/0 added to predicate labeling/2.
E.g. traced search tree for the 4 queens problem and written in tikz:
\begin{tikzpicture}[
->,
level/.style={sibling distance=6cm/#1}, % sensitive parameter to adjust manually
level distance=2cm
]
\node {{labeling([x1,x2,x3,x4])}}
child {
node {{x1=1}}
child {
node {{x2=3}}
}
child {
node {{x2$\neq$3}}
}
}
child {
node {{x1$\neq$1}}
child {
node {{x1=2}}
child {
node {{[2,4,1,3]}}
}
}
child {
node {{x1$\neq$2}}
child {
node {{x1=3}}
child {
node {{[3,1,4,2]}}
}
}
child {
node {{x1$\neq$3}}
child {
node {{x2=1}}
}
child {
node {{x2$\neq$1}}
}
}
}
}
;
\end{tikzpicture}
Note that in the generated LaTeX tikz picture, the distance parameters generally needs to be ajusted manually.