It generates the HTML code for a resolution tree, and writes it to the file tree.html in the directory given by htmlpath.