Did you know? you can turn terms into graphviz (.dot) filesSearch Documentation:
SWI-Prolog owl logoPredicate read_line_to_codes/3