This predicate prepares the system for visualization output and create a data structure Handle which is used by all other visualization predicates. For every run, the predicate should only be called once. It can not be called again, until the current visualization is closed with close_visualization/1. The predicate only prepares the system, it does not record a execution state on its own.
Possible options are:
top(N,L):-
length(L,N),
L :: 1..N,
alldifferent(L),
create_visualization([],Handle),
add_visualizer(Handle,vector(L),[]),
number_variables(Handle,L,Terms),
root(Handle),
search(Terms,1,first_fail,tree_indomain(Handle,_),complete,[]),
solution(Handle),
close_visualization(Handle).