1. A design method for generating optimal designs by automatic design space exploration, the method comprising: parsing source code to generate a parse tree; generating clusters based on the parse tree, each of the clusters including a group of source codes which can operate independently; generating a log file based on a structure and contents of the cluster; and comparing a first log file of a previous cluster with a second log file of a current cluster to re-use previous exploration result based on a comparison result, the first log file being obtained from a previous design space exploration, the second log file being generated from a current operation.