<div class="notebook"> <div class="nb-cell markdown"> # Drawing an SLDNF tree This examples shows how to draw an SLDNF tree using pack =sldnfdraw=. See the pack [page](http://www.swi-prolog.org/pack/list?p=sldnfdraw) or [github](https://github.com/gavanelli/sldnfdraw) for instructions. Draw the tree: </div> <div class="nb-cell query"> draw_goal(Tree). </div> <div class="nb-cell markdown"> Draw the tree and print the latex code: </div> <div class="nb-cell query"> draw_goal(Tree),format("~s",[Tree]). </div> <div class="nb-cell program prolog" data-background="true"> :- use_module(library(sldnfdraw)). :- if(current_predicate(use_rendering/1)). :- use_rendering(sldnf). :- endif. :- sldnf. :- begin_program. member(X ,[X|_T]). member(X ,[_H|T]):- member(X,T). :-end_program. :-begin_query. member(X,[1,2]), \+ member(X,[1,3]). :-end_query. </div> </div>