tcltk_print_node_for_dot(NodeID,Options) :-
animation_mode(AM),
visited_expression(NodeID,CurT),
extract_b_store(CurT,CurBT),
extract_full_store(CurBT,CurTemp),
(NodeID=root -> preference(dot_print_root,true) ; true),
(member(shape/Shape,Options) -> true ; dot_node_shape(NodeID,CurTemp,Shape)),
% TO DO: penwidth=2.0, fillcolor="#F1F2D8"
(find_invariant_error(AM,NodeID,CurTemp,_)
-> get_preference(dot_invariant_violated_node_colour,NodeColor),
Style=filled
; counterexample_node(NodeID)
-> get_preference(dot_counterexample_node_colour,NodeColor),
(is_goal_node(NodeID) -> Style = 'rounded,filled', get_preference(dot_goal_node_colour,FillColor)
; Style=none, FillColor=none)
; is_goal_node(NodeID)
-> get_preference(dot_goal_node_colour,NodeColor),
Style='rounded,filled'
; (preference(dot_fill_normal_nodes,true) -> Style='rounded,filled' ; Style=none),
(member(color/NodeColor,Options) -> true ; dot_node_color(NodeID,NodeColor))
),
(member(fontsize/FSize,Options) -> true ; get_preference(dot_node_font_size,FSize)),
(Style=none
-> format('~w [shape=~w, color=\"~w\", fontsize=~w',[NodeID,Shape,NodeColor,FSize])
; FillColor=none
-> format('~w [shape=~w, style=\"~w\", color=\"~w\", fontsize=~w',[NodeID,Shape,Style, NodeColor,FSize])
; format('~w [shape=~w, style=\"~w\", color=\"~w\", fillcolor=\"~w\", fontsize=~w',
[NodeID,Shape,Style, NodeColor,FillColor,FSize])
),
(member(pendwidth/PenWidth,Options) -> true ; get_preference(dot_node_penwidth,PenWidth)),
(PenWidth = 1 -> true ; print(', penwidth='), print(PenWidth)),
write(', label=\"'),"
(member(extralabel/ExtraLbl,Options) -> print_escaped(ExtraLbl), print('\\n') ; true),
(preference(dot_print_node_ids,true) -> print(NodeID), print(':\\n') ; true),
(preference(dot_print_node_info,true)
-> convert_state_to_string(CurT,StateAsString),
print_escaped(StateAsString) % quoted encode; except for
; true
),
(preference(dot_print_node_properties,true)
-> print_node_properties(NodeID)
; true
),
print('\"];'),nl,"
fail.
tcltk_print_node_for_dot(_NodeID,_) :- nl.