[yul-phaser] Add Population class

This commit is contained in:
cameel
2020-02-05 18:13:30 +01:00
parent f0fb046038
commit 7b7c88ae95
4 changed files with 229 additions and 4 deletions
+3 -4
View File
@@ -15,9 +15,8 @@
along with solidity. If not, see <http://www.gnu.org/licenses/>.
*/
#include <tools/yulPhaser/Chromosome.h>
#include <tools/yulPhaser/Exceptions.h>
#include <tools/yulPhaser/Program.h>
#include <tools/yulPhaser/Population.h>
#include <boost/program_options.hpp>
@@ -40,8 +39,8 @@ struct CommandLineParsingResult
void runAlgorithm(string const& _sourcePath)
{
Program::load(_sourcePath).optimize(Chromosome::makeRandom(15).asSequence());
cout << "Program load and optimization successful." << endl;
auto population = Population::makeRandom(_sourcePath, 10);
population.run(nullopt, cout);
}
CommandLineParsingResult parseCommandLine(int argc, char** argv)