Kamil Śliwak
b776021870
[yul-phaser] Command-line options for altering weights used by CodeSize metric
2020-05-20 16:47:23 +02:00
Kamil Śliwak
40dfac7683
[yul-phaser] Require specifying weights for Program::codeSize()
2020-05-20 16:47:23 +02:00
hrkrshnn
4a001d568e
Removed null members from JSON output
2020-05-20 16:56:33 +05:30
chriseth
0be56a0abf
Merge remote-tracking branch 'origin/develop' into breaking
2020-05-12 17:48:53 +02:00
chriseth
3312150d7f
Merge pull request #8878 from ethereum/selecting-yul-optimisation-steps-in-strict-assembly-mode
...
Selecting Yul optimisation steps in strict assembly mode
2020-05-11 16:05:57 +02:00
Alex Beregszaszi
c31a93b3f2
Remove boost::filesystem where it is not needed
...
A two uses in CommonIO remain for the compiler (plus testing/tools use it extensively)
2020-05-11 11:19:11 +01:00
Alex Beregszaszi
338e55be10
Add header guard to two files
2020-05-11 10:44:20 +01:00
Kamil Śliwak
e8aec6de54
More information about --yul-optimizations option in READMEs and docs
2020-05-08 22:29:57 +02:00
Kamil Śliwak
5d4b9022f0
yul-phaser README: --no-optimize-yul options is not really necessary
2020-05-08 22:05:04 +02:00
Harikrishnan Mulackal
92cf61d4f9
fixed compilation tests and upgraded ext. tests branch
2020-05-05 21:11:15 +05:30
Harikrishnan Mulackal
aed6c22318
solidity-upgrade can now change now to block.timestamp
2020-05-05 21:11:15 +05:30
chriseth
e306fdc251
Merge pull request #8741 from ethereum/dot-syntax-upgrade
...
[BREAKING] solidity-upgrade dot syntax for gas and value
2020-04-28 18:29:49 +02:00
hrkrshnn
644ae320a4
Fixed infinite loops
2020-04-27 17:37:18 +05:30
Kamil Śliwak
ee915008bd
[yul-phaser] README
2020-04-24 17:31:50 +02:00
Kamil Śliwak
163e35dd23
[yul-phaser] Tweak default values according to experiment results
...
- Long chromosomes in the intial population are better. Set minimum and maximum to 100.
- The classic algorithm does not work well without elite. 50% performed better but I think it might be too large. Let's set it to 25%.
- Switch to uniform crossover since this is what was used in most experiments and performed well.
2020-04-24 17:31:50 +02:00
Kamil Śliwak
35395a4b9c
[yul-phaser] Phaser: Missing word in --metric-aggregator option description
2020-04-24 17:31:50 +02:00
Kamil Śliwak
424edecd21
[yul-phaser] Phaser: List all available values of enum options in --help
2020-04-24 17:31:50 +02:00
Kamil Śliwak
e19d8d1fa3
[yul-phaser] GeneticAlgorithm::runNextRound(): Fix outdated docstring
2020-04-24 17:31:50 +02:00
hrkrshnn
eb4cff56f7
Upgrade dot syntax for gas and value
2020-04-24 16:22:07 +05:30
hrkrshnn
e2e32d372f
virtual modifiers (in Abstract contracts) allow empty bodies
2020-04-23 17:26:59 +05:30
Kamil Śliwak
c2effd4e98
[yul-phaser] Mutations: Minor style tweak, missing space in the ternary operator
2020-04-20 15:30:10 +02:00
Kamil Śliwak
d9e2735361
[yul-phaser] Add options for selecting crossover operator used by the algorithms
2020-04-20 15:30:10 +02:00
Kamil Śliwak
ad89b477c8
[yul-phaser] GeneticAlgorithms: Add methods for selecting a crossover operator
2020-04-20 15:30:10 +02:00
Kamil Śliwak
1ada2a52fb
[yul-phaser] Mutations: Add two-point and uniform crossover operators
2020-04-20 15:30:10 +02:00
chriseth
aff1e93caa
Merge pull request #8571 from aarlt/clang-tidy-apply-modernize-pass-by-value
...
clang-tidy: Apply modernize-pass-by-value.
2020-04-15 12:06:25 +02:00
chriseth
703b6efb55
Merge pull request #8515 from imapp-pl/yul-phaser-classic-genetic-algorithm
...
[yul-phaser] Classic genetic algorithm
2020-04-15 12:01:51 +02:00
Alexander Arlt
aac7a1e434
Apply modernize-pass-by-value.
2020-04-14 10:32:13 -05:00
chriseth
823a119117
Merge pull request #8570 from aarlt/clang-tidy-apply-modernize-use-emplace
...
clang-tidy: Apply modernize-use-emplace.
2020-04-07 17:28:50 +02:00
Kamil Śliwak
0efea99fa5
[yul-phaser] Phaser: Allow selecting the classic algorithm on the command line
2020-04-06 19:06:08 +02:00
Kamil Śliwak
f6783c60b2
[yul-phaser] GeneticAlgorithms: Add ClassicGeneticAlgorithm
2020-04-06 19:06:08 +02:00
Kamil Śliwak
879f6e17e9
[yul-phaser] GenerationalElitistWithExclusivePools: Refactor runNextRound() for less nesting and more readability
2020-04-06 19:06:08 +02:00
Kamil Śliwak
8c86a4983d
[yul-phaser] Population: Add combine()
2020-04-06 19:06:08 +02:00
Kamil Śliwak
ef8d0888af
[yul-phaser] Population: Add symmetricCrossoverWithRemainder()
2020-04-06 19:06:08 +02:00
Kamil Śliwak
59011fcde6
[yul-phaser] Mutations: Add mutationSequence()
2020-04-06 19:06:08 +02:00
Kamil Śliwak
0837a62d5c
[yul-phaser] Mutations: Add symmetricRandomPointCrossover()
2020-04-06 19:06:08 +02:00
Kamil Śliwak
b6f8ecf755
[yul-phaser] Selections+PairSelections: Add RandomSubset and PairsFromRandomSubset
2020-04-06 19:06:08 +02:00
Kamil Śliwak
7381068dcc
[yul-phaser] Make the Population constructor that takes individuals public and use it to speed up some operations
2020-04-06 19:06:08 +02:00
Alexander Arlt
cae6e7769f
Apply modernize-use-override.
2020-04-02 18:00:44 -05:00
Alexander Arlt
90bb1d8a7c
Apply modernize-use-emplace.
2020-04-02 17:35:48 -05:00
Alexander Arlt
616fd8df1e
Apply modernize-use-nullptr.
2020-04-01 12:46:19 -05:00
chriseth
ff35bf69de
Merge pull request #8539 from random-internet-cat/population-op-plus
...
Convert operator+(Population, Population) into a hidden friend
2020-03-30 16:22:57 +02:00
Jason Cobb
c184844932
Remove forward declaration of class Population
2020-03-26 18:57:43 -04:00
Jason Cobb
e16c0c4133
Convert operator+(Population, Population) into a hidden friend
2020-03-25 23:54:30 -04:00
Kamil Śliwak
e41ea6d25e
[yul-phaser] Add --show-seed option and don't print seed by default
2020-03-25 10:21:18 +01:00
Kamil Śliwak
3f524ccfe5
[yul-phaser] Population: Print individuals in a more compact way
2020-03-25 10:21:18 +01:00
Kamil Śliwak
10e8d3616c
[yul-phaser] AlgorithmRunner: Print total time when showing only the top chromosome
2020-03-25 10:21:18 +01:00
Kamil Śliwak
58e3fca3de
[yul-phaser] AlgorithmRunner: Measure CPU time rather than wall-clock time
2020-03-25 10:21:18 +01:00
Kamil Śliwak
cd16a6e178
[yul-phaser] Add --show-cache-stats option
2020-03-25 10:21:18 +01:00
Kamil Śliwak
3e35decf2b
[yul-phaser] ProgramCache: Add ability to gather cache stats
2020-03-25 10:21:18 +01:00
Kamil Śliwak
d33ba54a38
[yul-phaser] Add print-optimised-programs and print-optimised-asts modes
2020-03-25 10:21:18 +01:00
Kamil Śliwak
1272a9335c
[yul-phaser] Add --mode option
2020-03-25 10:21:18 +01:00
Kamil Śliwak
47c3b558f2
[yul-phaser] AlgorithmRunner: Print elapsed time after each round
2020-03-25 10:21:18 +01:00
Kamil Śliwak
c875b3d944
[yul-phaser] Add --show-only-top-chromosome and --hide-round options
2020-03-25 10:21:18 +01:00
Kamil Śliwak
ec10a3d378
[yul-phaser] Add --show-initial-population option
2020-03-25 10:21:18 +01:00
Kamil Śliwak
98db50ccac
[yul-phaser] Add --program-cache option
2020-03-24 17:39:24 +01:00
Kamil Śliwak
3b49fbb8a5
[yul-phaser] Add ProgramCacheFactory class
2020-03-24 17:39:24 +01:00
Kamil Śliwak
e2ff9698d3
[yul-phaser] AlgorithmRunner: Add support for ProgramCache
2020-03-24 17:39:24 +01:00
Kamil Śliwak
259f738f17
[yul-phaser] ProgramBasedMetric: Add the ability to use ProgramCache
2020-03-24 17:39:24 +01:00
Kamil Śliwak
8b443627e2
[yul-phaser] Add ProgramCache class
2020-03-24 17:39:24 +01:00
chriseth
f89e154693
Merge pull request #8514 from imapp-pl/yul-phaser-prefix-option
...
[yul-phaser] --prefix option
2020-03-24 17:35:45 +01:00
Kamil Śliwak
a66ceb11c6
[yul-phaser] Add --prefix option
2020-03-23 16:31:35 +01:00
Kamil Śliwak
29186f9951
[yul-phaser] Program: Switch from using parseCode() to parseObject()
2020-03-23 16:31:19 +01:00
Kamil Śliwak
7107ef13a7
[yul-phaser] Program: Add parseObject()
2020-03-23 16:31:19 +01:00
Kamil Śliwak
905147321b
[yul-phaser] Phaser: Change default metric to RelativeCodeSize
2020-03-18 16:28:16 +01:00
Kamil Śliwak
d86652cb96
[yul-phaser] Add --metric-aggregator option
2020-03-18 16:28:16 +01:00
Kamil Śliwak
bc46323bed
[yul-phaser] Phaser: Accepting multiple input programs
...
- Use average of metric values for individual programs as the overall metric.
2020-03-18 16:28:16 +01:00
Kamil Śliwak
01050940fd
[yul-phaser] Add --relative-metric-scale option
2020-03-18 16:28:16 +01:00
Kamil Śliwak
8e64c5c6f0
[yul-phaser] Add --metric option
2020-03-18 16:28:16 +01:00
Kamil Śliwak
e4a360947b
[yul-phaser] Add FitnessMetricCombination and derived classes for average, sum, min and max
2020-03-18 16:28:16 +01:00
Kamil Śliwak
0e03839e62
[yul-phaser] Add RelativeProgramSize metric
2020-03-18 16:28:15 +01:00
Kamil Śliwak
7edbbe4edd
[yul-phaser] Make FitnessMetric::evaluate() non-const
2020-03-18 16:28:15 +01:00
Kamil Śliwak
0913fd1aac
[yul-phaser] Extract ProgramBasedMetric base class from ProgramSize
2020-03-18 16:28:15 +01:00
Kamil Śliwak
7a1f6a27db
[yul-phaser] More data accessors in metric and algorithm classes
2020-03-18 13:30:58 +01:00
Kamil Śliwak
2563e7a7e3
[yul-phaser] Add --no-randomise-duplicates option
2020-03-18 13:30:58 +01:00
Kamil Śliwak
18f0d6eb94
[yul-phaser] AlgorithmRunner: Duplicate chromosome randomisation
2020-03-18 13:30:58 +01:00
Kamil Śliwak
b11eff7c88
[yul-phaser] Add options for all algorithm-specific parameters
2020-03-18 13:30:58 +01:00
Kamil Śliwak
55ea92dbec
[yul-phaser] Add --min-chromosome-length and --max-chromosome-length options
2020-03-18 13:30:58 +01:00
Kamil Śliwak
3f7ada1689
[yul-phaser] Add --population-autosave option
2020-03-18 13:30:58 +01:00
Kamil Śliwak
1b5960111d
[yul-phaser] AlgorithmRunner: Population autosave
2020-03-18 13:30:58 +01:00
Kamil Śliwak
04c7c56d84
[yul-phaser] Add --population-from-file option
2020-03-18 13:30:58 +01:00
Kamil Śliwak
ff99d25bc3
[yul-phaser] Common: Add readLinesFromFile()
2020-03-18 13:30:58 +01:00
Kamil Śliwak
5e00b57e02
[yul-phaser] Add --population option
2020-03-18 13:30:58 +01:00
Kamil Śliwak
af090876b5
[yul-phaser] Add --random-population option
2020-03-18 13:30:58 +01:00
Kamil Śliwak
d8e5f8f965
[yul-phaser] Add --rounds option
2020-03-18 13:30:58 +01:00
Kamil Śliwak
63f13c5b18
[yul-phaser] Add --chromosome-repetitions option
2020-03-18 13:30:58 +01:00
Kamil Śliwak
760e7c3cc5
[yul-phaser] Don't return exit code from Phaser::main() and just assume 0 if it does not throw.
2020-03-16 20:32:59 +01:00
Kamil Śliwak
d86b5019dc
[yul-phaser] Phaser: Returning exit code 0 instead of 2 when --help is requested
...
- I don't think we really need to discern it from normal operation. It's what user requested so it's a success.
2020-03-16 20:32:59 +01:00
Kamil Śliwak
f05a07d0cc
[yul-phaser] Create BadInput exception hierarchy and make exceptions used by Phaser more specific
2020-03-16 20:32:59 +01:00
Kamil Śliwak
53803801f7
[yul-phaser] Move handling of boost::program_options::error to the top-level exception handler
2020-03-16 20:32:59 +01:00
Kamil Śliwak
4e90c598b3
[yul-phaser] main: Dealing with uncaught exceptions
2020-03-16 20:32:59 +01:00
Kamil Śliwak
c7051e1386
[yul-phaser] Program: Explicitly return variants values
...
- Otherwise the code fails to build with on GCC 7.4.0 on Ubuntu in the CI pipeline
2020-03-16 20:32:59 +01:00
Kamil Śliwak
8ca0d90aae
[yul-phaser] Returning an ErrorList from Program::load() if program has errors and printing them in Phaser
2020-03-16 20:32:59 +01:00
Kamil Śliwak
9ef63a9789
[yul-phaser] Program: Output operator for ErrorList
...
- It does not seem universal enough to put it in liblangutil but in the scope of yul-phaser it's generic enough so I'm going to keep it together with Program.
2020-03-16 20:32:59 +01:00
Kamil Śliwak
98fcba8ef3
[yul-phaser] Phaser: Reimplement << and >> operators using serializeChoice() and deserializeChoice()
2020-03-13 11:21:23 +01:00
Kamil Śliwak
deaf1d0c6f
[yul-phaser] Add serializeChoice() and deserializeChoice()
2020-03-13 11:21:23 +01:00
Kamil Śliwak
0c3de9ef99
[yul-phaser] Add Common module
2020-03-13 11:21:23 +01:00
Kamil Śliwak
a80512a71d
[yul-phaser] Phaser: Name option parameters in command-line help
2020-03-13 11:21:23 +01:00
Kamil Śliwak
df90cf5d7a
[yul-phaser] Phaser: Make all option descriptions consistenly end with a full stop
2020-03-13 11:21:23 +01:00
Kamil Śliwak
ffc21632b6
[yul-phaser] Phaser: Split command-line option description into groups
2020-03-13 11:21:23 +01:00
Kamil Śliwak
7cf5c4e266
[yul-phaser] Phaser: Extract preparation of option description into a separate function
2020-03-13 11:21:23 +01:00