Automatic documentation of program