forked from mageec/mageec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangeLog
1613 lines (1376 loc) · 63.4 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2016-02-02 Edward Jones <[email protected]>
* CMakeLists.txt: Install newly added scripts.
* scripts/build-and-measure.py: New file.
* scripts/generate-build.py: Likewise.
* scripts/measure-code-size.py: Likewise.
2016-02-02 Edward Jones <[email protected]>
* lib/Driver.cpp (main): Actually return 0 on success.
2016-01-21 Edward Jones <[email protected]>
* lib/Driver.cpp (parseResults): Change results file format to
be a simpler .csv format.
* lib/FileML.cpp (setDecisionConfig): Change decision configuration
file to be a simpler .csv format.
2016-01-21 Edward Jones <[email protected]>
* lib/Database.cpp: Add more debug.
* lib/Driver.cpp: Likewise.
* lib/Framework.cpp: Likewise.
* lib/ML/FileML.cpp: Likewise.
2016-01-20 Edward Jones <[email protected]>
* include/mageec/DatabaseQuery.h (DatabaseQuery): Make move
constructor non-default, as we now have an implementation.
(DatabaseQuery::m_is_init): Add member keeping track of whether
the query is currently initialized and useable.
* include/mageec/Util.h (UUID::data): Return a reference to the
data instead of a copy.
* lib/DatabaseQuery.cpp (DatabaseQuery::DatabaseQuery): Implement
move constructor.
2016-01-13 Edward Jones <[email protected]>
* include/mageec/Attribute.h: Fix doxygen comments.
* include/mageec/AttributeSet.h: Likewise.
* include/mageec/Database.h: Likewise.
* include/mageec/DatabaseQuery.h: Likewise.
* include/mageec/ML.h: Likewise.
2016-01-13 Edward Jones <[email protected]>
* doc/CMakeLists: Make and install pdf documentation.
2016-01-13 Edward Jones <[email protected]>
* lib/Driver.cpp (getMachineLearners): Remove wildcard match for
--ml flag.
(trainDatabase): Add debug when training for each metric.
* lib/FileML.cpp: Fix gcc warnings and errors.
* lib/Util.cpp: Likewise.
2016-01-13 Edward Jones <[email protected]>
* CMakeLists.txt: Use sane defaults for options, add option for
the GCC plugin include directory.
* doc/CMakeLists.txt: Rename all-doc, all-info, all-html, all-pdf to
just doc, info, html and pdf respectively.
* lib/ML/C5/CMakeLists.txt: Added a minimum required version.
2016-01-13 Edward Jones <[email protected]>
* include/mageec/Database.h (Database::addFeaturesAfterPass):
Removed method, continuous feature extraction interface removed.
* lib/Database.cpp (create_compilation_feature_table):
Removed SQL query.
2016-01-13 Edward Jones <[email protected]>
* include/mageec/ML.h: Remove iterative training interfaces.
* include/mageec/ML/C5.h: Likewise.
* include/mageec/ML/FileML.h: Likewise.
* lib/ML/C5.cpp: Likewise.
* lib/ML/FileML.cpp: Likewise.
2016-01-13 Edward Jones <[email protected]>
* include/mageec/Types.h (TypeID ID): Define integer types that
mageec enumerations and IDs are based on.
* lib/Database.cpp: Use mageec::ID where appropriate to improve
type safety.
2016-01-13 Edward Jones <[email protected]>
* include/mageec/Attribute.h: Added file.
* include/mageec/AttributeSet.h: Likewise.
* include/mageec/Feature.h: Removed file.
* include/mageec/FeatureSet.h: Likewise.
* include/mageec/Parameter.h: Likewise.
* include/mageec/ParameterSet.h: Likewise.
* include/mageec/Database.h: Use Attribute.h and AttributeSet.h for
Feature and Parameter definitions.
* include/mageec/ML.h: Likewise.
* include/mageec/ML/C5.h: Likewise.
* include/mageec/ML/FileML.h: Likewise.
* include/mageec/Result.h: Likewise.
* include/mageec/TrainedML.h: Likewise.
* lib/Database.cpp: Likewise.
* lib/ML/C5.cpp: Likewise.
* lib/ML/FileML.cpp: Likewise.
* lib/TrainedML.cpp: Likewise.
2016-01-12 Edward Jones <[email protected]>
* include/mageec/FeatureSet.h (FeatureSet::size): Added method.
* include/mageec/Result.h (Result::getPassName): Removed method.
(Result::getPassSequence): Added method.
* lib/Database.cpp (Database::trainMachineLearner): Extract
the pass sequence from the database as well as the parameters and
features.
(ResultIterator::operator*): Correct select_features query to
extract the correct identifiers.
* lib/ML/C5.cpp (ResultComparator): Removed comparator object.
(ResultFeatureComparator): Added comparator object to compare
feature sets.
(C5Driver::train): Use only the best results for each distinct
feature set. Add training for passes too.
* lib/ML/C5/CMakeLists.txt: Install the c5.0 machine learner binary.
2016-01-12 Edward Jones <[email protected]>
* lib/Driver.cpp: Fix an error which meant the --add-results flag was
ignored.
2016-01-12 Edward Jones <[email protected]>
* include/mageec/Database.h: File formatted with clang-format.
* include/mageec/DatabaseQuery.h: Likewise.
* include/mageec/Decision.h: Likewise.
* include/mageec/Feature.h: Likewise.
* include/mageec/FeatureSet.h: Likewise.
* include/mageec/Framework.h: Likewise.
* include/mageec/ML.h: Likewise.
* include/mageec/ML/C5.h: Likewise.
* include/mageec/ML/FileML.h: Likewise.
* include/mageec/Parameter.h: Likewise.
* include/mageec/ParameterSet.h: Likewise.
* include/mageec/Result.h: Likewise.
* include/mageec/TrainedML.h: Likewise.
* include/mageec/Types.h: Likewise.
* include/mageec/Util.h: Likewise.
* lib/Database.cpp: Likewise.
* lib/DatabaseQuery.cpp: Likewise.
* lib/Driver.cpp: Likewise.
* lib/Framework.cpp: Likewise.
* lib/ML/C5.cpp: Likewise.
* lib/ML/FileML.cpp: Likewise.
* lib/TrainedML.cpp: Likewise.
* lib/Util.cpp: Likewise.
2016-01-12 Edward Jones <[email protected]>
* include/mageec/Database.h: Make file include order consistent.
* include/mageec/DatabaseQuery.h: Likewise.
* include/mageec/Decision.h: Likewise.
* include/mageec/FeatureSet.h: Likewise.
* include/mageec/Framework.h: Likewise.
* include/mageec/ML.h: Likewise.
* include/mageec/ML/FileML.h: Likewise.
* include/mageec/ParameterSet.h: Likewise.
* include/mageec/Result.h: Likewise.
* include/mageec/TrainedML.h: Likewise.
* include/mageec/Types.h: Likewise.
* include/mageec/Util.h: Likewise.
* lib/Database.cpp: Likewise.
* lib/DatabaseQuery.cpp: Likewise.
* lib/Framework.cpp: Likewise.
* lib/ML/FileML.cpp: Likewise.
* lib/TrainedML.cpp: Likewise.
* lib/Util.cpp : Likewise.
2016-01-12 Edward Jones <[email protected]>
* CMakeLists.txt: Remove mageec_test target, as it is unused.
* include/mageec/Database.h (Database::InputResult): New structure for
result input into the database.
(Database::addResults): Update args to use a set of InputResult data.
* lib/Database.cpp (addResults): Likewise.
* lib/Driver.cpp (addResults parseResults): Added function to
parse in results data and insert it into the database.
(main): Call addResults when the --add-results argument is specified.
* lib/Main.cpp: Removed file, as it was unused.
2016-01-12 Edward Jones <[email protected]>
* include/mageec/Util.h: Simplify MAGEEC_ERR and MAGEEC_WARN macros.
* lib/Driver.cpp (printVersion printDatabaseVersion): Prefix version
and database versions in print out so they can be differentiated.
(printHelp): Add print-mls option to help.
(main): Rename print_trained_mls to print_mls.
2016-01-08 Edward Jones <[email protected]>
* include/mageec/TrainedML.h (TrainedML::TrainedML): Added constructor
which does not take a metric or blob argument.
(TrainedML::TrainedML): Removed db argument from constructors as it
was unnecessary.
(TrainedML::m_db): Removed member.
* include/mageec/Util.h (UUID::operator!=): Added method.
(metricToString stringToMetric): Moved functions from Driver.cpp so
that they are accessible to the plugin.
* lib/Database.cpp (Database::getTrainedMachineLearners): Update
creation of TrainedML.
* lib/Driver.cpp (metricToString stringToMetric): Moved functions
to Util.cpp.
(printTrainedMLs): Update so that db_path is optional. Return a
bool result instead of int.
(createDatabase): Return a bool instead of int result.
(trainDatabase): Likewise.
(main): Minor refactor of variable names.
* lib/TrainedML.cpp (TrainedML::TrainedML): Added constructor
implementation.
(TrainedML::TrainedML): Remove db argument from constructors.
* lib/Util.cpp (metricToString stringToMetric): Moved implementation
from Driver.cpp.
2016-01-07 Edward Jones <[email protected]>
* CMakeLists.txt: Add FileML.cpp to ML_SOURCES
* include/mageec/ML.h (IMachineLearner::requiresTraining)
(IMachineLearner::requiresTrainingConfig)
(IMachineLearner::setTrainingConfig)
(IMachineLearner::requiresDecisionConfig)
(IMachineLearner::setDecisionConfig): Added methods.
* include/mageec/ML/C5.h (C5Driver::requiresTraining)
(C5Driver::requiresTrainingConfig C5Driver::setTrainingConfig)
(C5Driver::requiresDecisionConfig C5Driver::setDecisionConfig):
Likewise.
* include/mageec/ML/FileML.h (FileML): Added definition of FileML.
* include/mageec/TrainedML.h (TrainedML::requiresDecisionConfig)
(TrainedML::setDecisionConfig): Added methods.
* lib/Database.cpp (getTrainedMachineLearners): Make IMachineLearner
non-const.
* lib/FileML.cpp (FileML): Added implementation of FileML.
* lib/TrainedML.cpp (TrainedML::TrainedML): Make IMachineLearner
parameter non-const.
(TrainedML::requiresDecisionConfig)
(TrainedML::setDecisionConfig): Added implementations.
2016-01-07 Edward Jones <[email protected]>
* CMakeLists.txt: Renamed MAGEEC_DEBUG definition to MAGEEC_WITH_DEBUG.
* include/mageec/Framework.h (Framework::Framework): Add debug
parameter.
(Framework::setDebug): Added function.
* include/mageec/Util.h (withDebug setDebug): Added method.
(MAGEEC_DBG): Renamed to MAGEEC_DEBUG.
* lib/Database.cpp: Refactor debug handling.
* lib/DatabaseQuery.cpp: Likewise.
* lib/Driver.cpp (DriverMode): Add kAddResult enum value.
(printHelp): Update help to reflect new interface.
(main): Refactor argc parsing, add support for debug flag and
add-result mode.
* lib/Framework.cpp (Framework::Framework): Add debug parameter.
(Framework::setDebug): Added method.
* lib/Main.cpp: Refactor debug handling.
* lib/Util.cpp (with_debug): Added global value to determine if debug
is enabled.
(withDebug setDebug): Added functions.
2016-01-06 Edward Jones <[email protected]>
* CMakeLists.txt: Disable two more clang warnings.
* include/mageec/Util.h: Fix clang warnings.
* lib/Database.cpp: Likewise.
* lib/Driver.cpp: Likewise.
* lib/C5.cpp: Likewise.
* lib/Util.cpp: Likewise.
2016-01-06 Edward Jones <[email protected]>
* include/mageec/Database.h (DatabaseTransaction): New wrapper class
around a database transaction.
* lib/Database.cpp: Use database transactions throughout.
(DatabaseTransaction): Added implementation.
2016-01-06 Edward Jones <[email protected]>
* include/mageec/Database.h (Database::newFeatureGroup): Refine to take
a set of FeatureSetID rather than vector.
(Database::addPasses): Removed method.
(Database::newPassSequence): Method now takes a list of passes to
add to the database.
* include/mageec/Types.h (CompilationID FeatureSetID FeatureGroupID)
(PassID PassSequenceID ParameterSetID ParameterGroupID): Redefined
types to be uint64_t so that they can store a hash.
* include/mageec/Util.h (read64LE wrte64LE): Added functions.
* lib/Database.cpp (create_feature_set_table)
(create_feature_group_table create_parameter_set_table)
(create_pass_sequence_table): Remove query strings to create
some tables.
(Database::init_db): Remove creation of some tables.
(Database::newFeatureSet): The returned FeatureSetID is now a hash of
the input features, the database no longer contains duplicate feature
sets.
(Database::newFeatureGroup): Returned FeatureGroupID is now a hash,
the database no longer contains duplicate feature groups.
(Database::newParameterSet): The returned ParameterSetID is now a
hash of the input features, the database no longer contains duplicate
parameter sets.
(Database::newPassSequence): The returned PassSequenceID is now a
hash of the input passes. The database no longer contains duplicate
pass sequences.
* lib/Main.cpp (main): Updated to use new interfaces.
* lib/Util.cpp (read64LE write64LE): Added function implementations.
2016-01-05 Simon Cook <[email protected]>
* include/mageec/Util.h (uint64_t crc64): Declare crc64.
* lib/Util.cpp (uint64_t crc64): Add crc64 implementation.
2016-01-05 Edward Jones <[email protected]>
* include/mageec/Database.h (Database::addPass): Renamed to addPasses.
Now takes a sequence of the passes to run.
(Database::addResult): Renamed to addResults. Now takes a sequence of
results.
* lib/Database.cpp (Database::addPass): Renamed to addPasses.
(Database::addResult): Renamed to addResults.
* lib/Main.cpp (main): Use updated interfaces for Database::addResult
and Database::addPasses.
2016-01-04 Edward Jones <[email protected]>
* include/mageec/Database.h (ResultIterator::m_query): Added member
to hold the query during execution.
* include/mageec/DatabaseQuery.h (DatabaseQuery::DatabaseQuery):
Enable default move constructor, set others to deleted.
* lib/Database.cpp (Database::trainMachineLearner): Correct feat_iter
and param_iter iterators so that they iterate properly.
(ResultIterator::ResultIterator): Initialize m_query.
(ResultIterator::operator*): Increment feature_iter and param_iter
iterators.
* lib/C5.cpp (C5Driver::train): Fix segfault when assigning C5Context.
2015-12-18 Edward Jones <[email protected]>
* CMakeLists.txt: Allow for older versions of CMake.
2015-12-18 Edward Jones <[email protected]>
* lib/Database.cpp (Database::getTrainedMachineLearners): Fix crash
when there are no trained machine learners in the database.
2015-12-17 Edward Jones <[email protected]>
* include/mageec/Database.h (Database): Make all uses of
IMachineLearner non-const.
* include/mageec/FeatureSet.h: Replace std::endl with newline.
* include/mageec/Framework.h (Framework::getMachineLearners):
Return a set of IMachineLearner interfaces instead of UUIDs.
* include/mageec/ParameterSet.h: Replace std::endl with newline.
* include/mageec/Util.h (dbg out): Added functions.
(MAGEEC_PREFIX MAGEEC_ERR MAGEEC_WARN MAGEEC_DBG MAGEEC_STATUS):
Add macros for debug.
(UUID::operator std::string): Added function.
* lib/Database.cpp (Database): Make all uses of IMachineLearner in
interfaces non-const.
* lib/DatabaseQuery.cpp: Use newline instead of std::endl throughout.
* lib/Driver.cpp (MAGEEC_PREFIX MAGEEC_ERR MAGEEC_WARN MAGEEC_MSG):
macros moved to Util.h.
(metricToString stringToMetric printVersion printDatabaseVersion)
(printHelp getMachineLearners printTrainedMLs printMLInterfaces):
Added functions.
(main): Add implementation for --help, --version, --database-version,
--print-trained-machine-learners and --print-machine-learner-interfaces
options.
* lib/Framework.cpp (Framework::getMachineLearners): Return a
set of IMachineLearner interfaces instead of UUIDs.
* lib/ML/C5.cpp: Replace std::endl with newlines.
* lib/Main.cpp: Likewise.
* lib/Util.cpp (dbg out): Added functions.
2015-12-17 Edward Jones <[email protected]>
* CMakeLists.txt: Install libraries and executables, rename mageec_lib
target to mageec_core.
* doc/CMakeLists.txt: Install documentation.
2015-12-17 Edward Jones <[email protected]>
* include/mageec/Util.h (UUID::parse): Fix to UUID parsing code.
2015-12-17 Edward Jones <[email protected]>
* CMakeLists.txt: Update to build C5 classifier.
* lib/ML/C5/CMakeLists.txt: Added file to build C5.
* lib/ML/C5/attwinnow.c: Added file.
* lib/ML/C5/c50.c: Likewise.
* lib/ML/C5/classify.c: Likewise.
* lib/ML/C5/confmat.c: Likewise.
* lib/ML/C5/construct.c: Likewise.
* lib/ML/C5/contin.c: Likewise.
* lib/ML/C5/defns.i: Likewise.
* lib/ML/C5/discr.c: Likewise.
* lib/ML/C5/extern.i: Likewise.
* lib/ML/C5/formrules.c: Likewise.
* lib/ML/C5/formtree.c: Likewise.
* lib/ML/C5/getdata.c: Likewise.
* lib/ML/C5/getnames.c: Likewise.
* lib/ML/C5/global.c: Likewise.
* lib/ML/C5/gpl.txt: Likewise.
* lib/ML/C5/implicitatt.c: Likewise.
* lib/ML/C5/info.c: Likewise.
* lib/ML/C5/mcost.c: Likewise.
* lib/ML/C5/modelfiles.c: Likewise.
* lib/ML/C5/p-thresh.c: Likewise.
* lib/ML/C5/prune.c: Likewise.
* lib/ML/C5/report.c: Likewise.
* lib/ML/C5/rules.c: Likewise.
* lib/ML/C5/ruletree.c: Likewise.
* lib/ML/C5/siftrules.c: Likewise.
* lib/ML/C5/sort.c: Likewise.
* lib/ML/C5/subset.c: Likewise.
* lib/ML/C5/text.i: Likewise.
* lib/ML/C5/trees.c: Likewise.
* lib/ML/C5/undefined.xsum: Likewise.
* lib/ML/C5/update.c: Likewise.
* lib/ML/C5/utility.c: Likewise.
* lib/ML/C5/xval: Likewise.
* lib/ML/C5/xval.c: Likewise.
2015-12-15 Edward Jones <[email protected]>
* CMakeLists.txt: Add C5 machine learner library target. Added
lib/Util.cpp source file to build.
* include/mageec/Database.h (ResultIterator::operator=): Added method.
(ResultIterator::m_db): Make a pointer rather than reference.
* include/mageec/DatabaseQuery.h (DatabaseQuery::operator<<):
Take a const std::vector<uint8_t>.
* include/mageec/Decision.h (NativeDecision::NativeDecision):
Make constructor public.
* include/mageec/Framework.h (Framework): Fix compile errors.
(Framework::registerMachineLearner): Framework now takes ownership of
machine learner interfaces.
(Framework::hasMachineLearner Framework::getMachineLearners):
Added public methods.
* include/mageec/ML.h (IMachineLearner::~IMachineLearner): Make pure
virtual. Add stub implementation.
(IMachineLearner::train): Replace 'vector' parameters with sets.
* include/mageec/ML/C5.h: Added file.
* include/mageec/Util.h: Factor out read16LE/write16LE.
* lib/Database.cpp: Minor changes to resolve compile errors.
* lib/DatabaseQuery.cpp (DatabaseQuery::operator<<):
Take a const std::vector<uint8_t>.
* lib/Driver.cpp: Fix compile issues and add further diagnostics.
* lib/Framework.cpp (Framework::hasMachineLearner)
(Framework::getMachineLearners): Added implementations.
* lib/ML/C5.cpp: Fix outstanding compile issues.
* lib/Util.cpp: Added file.
2015-12-14 Edward Jones <[email protected]>
* include/mageec/Database.h (version): Make member private.
(ResultIterator::operator++): Replace with ResultIterator::next
member function
* include/mageec/Framework.h (version): Make member private.
* include/mageec/Types.h (FeatureDesc::operator<)
(ParameterDesc::operator<): Added comparison function.
* include/mageec/Util.h (read16LE, write16LE): Add little-endian
read/write functions.
* lib/Database.cpp (Database::trainMachineLearner): Refactor to
use sets of FeatureDesc/ParameterDesc.
(ResultIterator::operator++): Replaced with ResultIterator::next.
* lib/Driver.cpp (trainDatabase): Added function.
(main): Refactor to handle new utility flags and new 'training mode'.
* lib/ML/C5.cpp: Added implementation of C5.0 driver.
* lib/TrainedML.cpp: Add missing include.
2015-10-30 Edward Jones <[email protected]>
* CMakeLists.txt: Rename mageec library target to mageec_lib, tmp
to mageec_test, and add mageec_driver target for the standalone tool.
Set the output names of the library and driver targets.
* include/mageec/Database.h (Database::loadDatabase)
(Database::createDatabase Database::getDatabase):
Add static functions to load or create a new database from a path.
(Database::Database): Make constructor private as the static creation
functions should be used. Change first operand from string to sqlite
object.
* include/mageec/Framework.h (Framework::getDatabase): Use a
std::unique_ptr for return to allow it to fail.
* include/mageec/Util.h (Option): Fix various issues by using
placement new to initialize union member.
* lib/Database.cpp (Database::createDatabase)
(Database::loadDatabase Database::getDatabase): Add implementations.
* lib/Driver.cpp: Added file, driver for the standalone tool.
* lib/Framework.cpp (Framework::getDatabase): Return a
std::unique_ptr<Database>.
* lib/Main.cpp (main): Make db a unique_ptr<Database>.
2015-10-29 Edward Jones <[email protected]>
* include/mageec/Framework.h (Framework::loadMachineLearner):
Return the UUID of the loaded machine learner.
* include/mageec/TrainedML.h (TrainedML::getUUID): Added function.
* include/mageec/Util.h (UUID): Added default copy/move constructors
and assignment.
(UUID::parse): Added method to parse a UUID from a canonical string.
(Option): Fix copy/move constructors and assignment operators.
* lib/Framework.cpp (Framework::loadMachineLearner): Return UUID.
* lib/TrainedML.cpp (TrainedML::getUUID): Added implementation.
2015-10-21 Edward Jones <[email protected]>
Reintroduce the GCC plugin, for feature extraction and pass gating.
* CMakeLists.txt: Refactor, build libraries and add option to build
plguin.
* include/mageec/Feature.h (FeatureBase::print)
(Feature::print): Added methods.
* include/mageec/FeatureSet.h (FeatureSet::addFeature): rename to add.
(FeatureSet::print): Added method.
* include/mageec/Parameter.h (ParameterBase::print)
(Parameter::print): Added methods.
* include/mageec/ParameterSet.h (ParameterSet:addParameter): rename to add.
(ParameterSet::print): Added method.
* lib/Database.cpp (ResultIterator::operator*): Update addFeature/
addParameter calls.
2015-10-01 Edward Jones <[email protected]>
Added ability to train and retrieve results, updated various
interfaces.
* CMakeLists.txt: Define MAGEEC version macros.
* include/mageec/Database.h (Database::newFeatureSet):
Update feature argument.
(Database::newParameterSet): Update parameter argument.
(Database::trainMachineLearner): Remove return.
(ResultIterator::ResultIterator): Remove unnecessary constructors.
(ResultIterator::operator*): Wrap return in util::Option type.
(ResultIterator::m_result_iter): Added private member.
* include/mageec/Feature.h (Feature::fromBlob):
Wrap return in std::unique_ptr, add 'name' argument.
* include/mageec/FeatureSet.h (FeatureSet): Use std::shared_ptr
for the features, add std::initializer_list constructor.
* include/mageec/Framework.h: Check for version defines.
* include/mageec/ML.h (IMachineLearner::makeDecision): Pass
features by const reference.
(IMachineLearner::trainMachineLearner): Rename method to 'train'.
* include/mageec/Parameter.h (Parameter::fromBlob):
Wrap return in std::unique_ptr, add 'name' argument.
* include/mageec/ParameterSet.h (ParameterSet): Use std::shared_ptr
for parameters, add std::initializer_list constructor.
* include/mageec/TrainedML.h (TrainedML::makeDecision):
Make 'features' argument a FeatureSet.
* lib/Database.cpp (create_compilation_table): parameter_set_id
may be NULL.
(Database::trainMachineLearner): Added implemention.
(ResultIterator): Likewise.
* lib/Framework.cpp: Use version defines provided by build system.
* lib/Main.cpp: use namespace mageec, update to match new interfaces.
* lib/TrainedML.cpp (TrainedML::makeDecision): Added implementation.
2015-09-08 Edward Jones <[email protected]>
Added functionality to create pass sequences and results in the
database.
* include/mageec/Database.h (Database::addPass): Make parameters
an optional parameter.
* include/mageec/Util.h (Option::Option): Added nullptr constructor.
* lib/Database.cpp
(create_pass_parameter_table): Removed, pass parameters are stored
in the PassSequencePass table instead.
(create_compilation_feature_table, create_result_table): Make
all fields 'NOT NULL'.
(Database::init_db): Create database in a single transaction.
(Database::addFeaturesAfterPass): Added implementation.
(Database::newPassSequence): Likewise.
(Database::addPass): Likewise.
(Database::addResult): Likewise.
* lib/Main.cpp (main): Sanity check of new functionality.
2015-09-08 Edward Jones <[email protected]>
* lib/Database.cpp (create_pass_sequence_table): Added sql query to
create a new pass sequence table.
(Database::init_db): Construct the new table.
* lib/Main.cpp (main): More elaborate sanity check of implemented
functionality.
2015-09-08 Edward Jones <[email protected]>
* CMakeLists.txt (CMAKE_CXX_FLAGS): Disable -Wweak-vtables warning.
* include/mageec/DatabaseQuery.h
(DatabaseQueryIterator::DatabaseQueryIterator): Add database handle
parameter.
(DatabaseQueryIterator::m_db): Add database handle member.
* include/mageec/Feature.h
(FeatureBase::~FeatureBase): Add destructor definition so that vtable
is emitted.
(Feature::toBlob): Mark override.
* include/mageec/Parameter.h
(ParameterBase::~ParameterBase): Added function.
(ParameterBase::getName): Likewise.
(ParameterBase::toBlob): Likewise.
(ParameterBase::m_name): Added new member to store name for debug.
(Parameter::~Parameter): Added destructor.
(Parameter::toBlob): Added function.
* lib/Database.cpp: Bug fixing of database.
(create_feature_set_table): Added sql query, creates a new table.
(create_feature_group_table): Likewise.
(create_parameter_set_table): Likewise.
(Database::init_db): Create the newly added tables.
(Database::newParameterSet): Added implementation.
* lib/DatabaseQuery.cpp: Pass database handle through to
DatabaseQueryIterator. Add debug, and minor bug fixes.
* lib/Main.cpp: Updated to experiment with new functionality.
2015-09-08 Edward Jones <[email protected]>
* include/mageec/DatabaseQuery.h
(DatabaseQueryIterator::isNull): Added method to check if a result
column is of null type.
(DatabaseQuery::operator<<): Add method to bind a null parameter.
* lib/DatabaseQuery.cpp (DatabaseQueryIterator::isNull)
(DatabaseQuery::operator<<): Added implementations.
2015-09-08 Edward Jones <[email protected]>
* include/mageec/Database.h (Database::newCompilation): Added
optional pass_sequence and parent parameters.
* lib/Database.cpp (create_compilation_table): pass_sequence_id
is optional (may be null).
(Database::newCompilation): Added implementation.
2015-09-08 Edward Jones <[email protected]>
Added further database functionality. The project now compiles a
test program.
* CMakeLists.txt: Added new source dependencies.
(MAGEEC_DEBUG): Added option to toggle debug.
(CMAKE_CXX_FLAGS): Disabled some unnecessary clang warnings.
* include/mageec/Database.h: Fixed warnings.
(Database::Database): Made mls const.
(Database::m_mls): Made member const.
(Database::getMetadata, Database::setMetadata): Made methods const.
(Database::newFeatureSet, Database::newParameterSet): Made feature/
parameter vector arguments const.
* include/mageec/DatabaseQuery.h: Fixed warnings.
(DatabaseQueryIterator::assertDone): Added function.
(DatabaseQuery::m_db): Added member with handle to database.
* include/mageec/Framework.h (Framework::getDatabase): Added create
argument.
(Framework::m_mls): Made m_mls const.
* include/mageec/Util.h: Fixed warnings, added missing cassert include.
* lib/Database.cpp: Fixed warnings and errors, added debug.
(Database::newFeatureGroup): Added implementation.
* lib/DatabaseQuery.cpp: Fixed warnings, added debug.
(DatabaseQueryIterator::assertDone): Added function implementation.
* lib/Framework.cpp: New file.
* lib/Main.cpp: Likewise.
* lib/TrainedML.cpp (makeDecision): Fixed function signature.
2015-09-04 Edward Jones <[email protected]>
Beginning of implementation of database functionality.
* CMakeLists.txt: Added target for testing, fixed CMAKE_CXX_FLAGS.
* include/mageec/Database.h (Database::version): Added version number.
(Database::~Database()): Added function.
(Database::Database): Added bool 'create' argument.
(Database::m_mls): Added member.
(Database::init_db, Database::validate): Added functions.
* include/mageec/DatabaseQuery.h: Added file
(DatabaseQuery, DatabaseQueryBuilder)
(DatabaseQueryIterator): New classes.
* include/mageec/Feature.h (FeatureBase::~FeatureBase)
(FeatureBase::getName, FeatureBase::toBlob): New functions.
(FeatureBase::FeatureBase): Added 'name' arg.
(FeatureBase::m_name): Added member.
(Feature::~Feature, Feature::toBlob, Feature::fromBlob): New functions.
* include/mageec/Framework.h (Framework::version): Added version.
* include/mageec/TrainedML.h (TrainedML::TrainedML): Added blob
argument.
(TrainedML::makeDecision): Removed const.
(TrainedML::m_metric, TrainedML::m_blob): Added members.
* include/mageec/Util.h (Version::operator std::string): Added function.
(UUID::operator==, UUID::operator!=): Added const.
(UUID::m_data): Made member const.
* lib/Database.cpp: Added placeholders for all functions.
(Database::Database, Database::~Database, Database::~init_db)
(Database::validate, Database::isCompatible, Database::getVersion)
(Database::getMetadata, Database::setMetadata)
(Database::getTrainedMachineLearners, Database::NewFeatureSet):
Added initial implementations.
* lib/DatabaseQuery.cpp: Added implementation of all functions.
* lib/TrainedML.cpp: Added placeholders for all functions.
2015-09-02 Edward Jones <[email protected]>
Added support for the cmake build system.
* CMakeLists.txt: Added file.
* doc/CMakeLists.txt: Likewise.
* doc/Doxyfile.in: Added support for cmake.
* doc/mageec-design.texi: Added file, work in progress design documentation.
2015-09-02 Edward Jones <[email protected]>
Redesign of MAGEEC interfaces
* AUTHORS: Updated authors.
* INSTALL: Deleted.
* Makefile.am: Likewise.
* Makefile.in: Likewise.
* NEWS: Likewise.
* aclocal.m4: Likewise.
* compile: Likewise.
* config.guess: Likewise.
* config.sub: Likewise.
* configure: Likewise.
* configure.ac: Likewise.
* depcomp: Likewise.
* doc/Makefile.am: Likewise.
* doc/Makefile.in: Likewise.
* doc/mageec.texi: Updated to reflect that cmake is now used.
* doc/mdate-sh: Deleted.
* gcc_plugin/Makefile.am: Likewise.
* gcc_plugin/Makefile.in: Likewise.
* gcc_plugin/feature-extract.cpp: Likewise.
* gcc_plugin/gcc-callbacks.cpp: Likewise.
* gcc_plugin/gcc-plugin.cpp: Likewise.
* gcc_plugin/mageec-plugin.h: Likewise.
* gcc_plugin/plugin-info.cpp: Likewise.
* include/Makefile.am: Likewise.
* include/Makefile.in: Likewise.
* include/mageec/Database.h: Added file defining new MAGEEC interface.
* include/mageec/Decision.h: Likewise.
* include/mageec/Feature.h: Likewise.
* include/mageec/FeatureSet.h: Likewise.
* include/mageec/Framework.h: Likewise.
* include/mageec/ML.h: Likewise.
* include/mageec/Parameter.h: Likewise.
* include/mageec/ParameterSet.h: Likewise.
* include/mageec/Result.h: Likewise.
* include/mageec/TrainedML.h: Likewise.
* include/mageec/Types.h: Likewise.
* include/mageec/Util.h: Likewise.
* include/mageec/elfhash.h: Deleted.
* include/mageec/mageec-db.h: Likewise.
* include/mageec/mageec-decision.h: Likewise.
* include/mageec/mageec-features.h: Likewise.
* include/mageec/mageec-ml.h: Likewise.
* include/mageec/mageec-passes.h: Likewise.
* include/mageec/mageec-result.h: Likewise.
* include/mageec/mageec.h: Likewise.
* include/mageec/vectormath.h: Likewise.
* install-sh: Likewise.
* ltmain.sh: Likewise.
* m4/ax_boost_base.m4: Likewise.
* m4/ax_boost_python.m4: Likewise.
* m4/ax_python_devel.m4: Likewise.
* m4/libtool.m4: Likewise.
* m4/ltoptions.m4: Likewise.
* m4/ltsugar.m4: Likewise.
* m4/ltversion.m4: Likewise.
* m4/lt~obsolete.m4: Likewise.
* mageec/Makefile.am: Likewise.
* mageec/Makefile.in: Likewise.
* mageec/dbtool.cpp: Likewise.
* mageec/elfhash.cpp: Likewise.
* mageec/features.cpp: Likewise.
* mageec/hasher.cpp: Likewise.
* mageec/mageec.cpp: Likewise.
* mageec/mageechash.cpp: Likewise.
* mageec/passes.cpp: Likewise.
* mageec/python.cpp: Likewise.
* missing: Likewise.
* ml/C5/Makefile.am: Likewise.
* ml/C5/Makefile.in: Likewise.
* ml/C5/attwinnow.c: Likewise.
* ml/C5/c50.c: Likewise.
* ml/C5/classify-defns.h: Likewise.
* ml/C5/classify-global.c: Likewise.
* ml/C5/classify-hooks.c: Likewise.
* ml/C5/classify-sample.c: Likewise.
* ml/C5/classify.c: Likewise.
* ml/C5/confmat.c: Likewise.
* ml/C5/construct.c: Likewise.
* ml/C5/contin.c: Likewise.
* ml/C5/defns.i: Likewise.
* ml/C5/discr.c: Likewise.
* ml/C5/extern.i: Likewise.
* ml/C5/formrules.c: Likewise.
* ml/C5/formtree.c: Likewise.
* ml/C5/getdata.c: Likewise.
* ml/C5/getnames.c: Likewise.
* ml/C5/global.c: Likewise.
* ml/C5/gpl.txt: Likewise.
* ml/C5/implicitatt.c: Likewise.
* ml/C5/info.c: Likewise.
* ml/C5/mcost.c: Likewise.
* ml/C5/modelfiles.c: Likewise.
* ml/C5/p-thresh.c: Likewise.
* ml/C5/prune.c: Likewise.
* ml/C5/report.c: Likewise.
* ml/C5/rules.c: Likewise.
* ml/C5/ruletree.c: Likewise.
* ml/C5/siftrules.c: Likewise.
* ml/C5/sort.c: Likewise.
* ml/C5/subset.c: Likewise.
* ml/C5/text.i: Likewise.
* ml/C5/trees.c: Likewise.
* ml/C5/update.c: Likewise.
* ml/C5/utility.c: Likewise.
* ml/C5/xval: Likewise.
* ml/C5/xval.c: Likewise.
* ml/Makefile.am: Likewise.
* ml/Makefile.in: Likewise.
* ml/database.cpp: Likewise.
* ml/ml.cpp: Likewise.
* testsuite/Makefile.am: Likewise.
* testsuite/Makefile.in: Likewise.
* testsuite/config/site.exp.in: Likewise.
* testsuite/config/unix.exp: Likewise.
* testsuite/gcc_plugin.tests/Makefile.am: Likewise.
* testsuite/gcc_plugin.tests/Makefile.in: Likewise.
* testsuite/gcc_plugin.tests/feature-extract.exp: Likewise.
* testsuite/gcc_plugin.tests/main.c: Likewise.
* testsuite/lib/mageec.exp: Likewise.
* testsuite/mageec.tests/Makefile.am: Likewise.
* testsuite/mageec.tests/Makefile.in: Likewise.
* testsuite/mageec.tests/hash.exp: Likewise.
* testsuite/mageec.tests/test.elf: Likewise.
* testsuite/python.tests/Makefile.am: Likewise.
* testsuite/python.tests/Makefile.in: Likewise.
* testsuite/python.tests/hash.py: Likewise.
* testsuite/python.tests/test-python.exp: Likewise.
* testsuite/python.tests/test.elf: Likewise.
* testsuite/python.tests/test.py: Likewise.
2014-08-05 James Pallister <[email protected]>
Fix #4, GCC plugin segfaults when a call does not have a LHS value.
* gcc_plugin/feature-extract.cpp: Check whether the LHS is a valid
pointer before dereferencing.
2014-08-05 James Pallister <[email protected]>
Fix divide by zero in the feature extractor
* gcc_plugin/feature-extract.cpp: Fix divide by zero if bb_count is
zero
2014-08-01 Simon Cook <[email protected]>
* gcc_plugin/gcc-callbacks.cpp (mageec_pass_gate): Replace fprintf
calls using result to use %i instead %hhi.
* include/mageec/elfhash.h (hashedelf): Change type of data to
unsigned char *.
Add newline to end of file.
* include/mageec/mageec-decision.h (enum decision): Add newline to
end of file.
* include/mageec/mageec-features.h: Add newline to end of file.
(mageec_feature): Add virtual destructor.
(class basic_feature): Add extra int to avoid padding warning.
* include/mageec/mageec-ml.h (mageec_ml): Rename passes to
known_passes.
Add virtual destructor.
(mageec_ml::raw_result): Correct @param comment.
* include/mageec/mageec-passes.h: Add newline to end of file.
(mageec_pass): Add virtual destructor.
* include/mageec/mageec-result.h: Add newline to end of file.
* include/mageec/mageec.h (hash_data): Change type of size
parameter to unsigned long.
* mageec/elfhash.cpp (hashedelf::hash): Remove #pragma GCC.
static_cast realloc calls.
* mageec/features.cpp (pad_string): Change type of length to
long long.
(dump_vector): Change type of variables that hold vector sizes
to unsigned long.
(mageec_feature::~mageec_feature): Added default destructor
to avoid weak vtables.
* mageec/hasher.cpp: Add newline to end of file.
(hash_data): Change type of size parameter to unsigned long.
Change casting for finalhash to static_cast.
* mageec/mageechash.cpp: Add newline to end of file.
* mageec/passes.cpp: Add newline to end of file.
(mageec_pass::~mageec_pass): Added default destructor to avoid
weak vtables.
* ml/C5/Makefile.am: Override parent CFLAGS to remove -Werror.
* ml/C5/Makefile.in: Regenerated.
* ml/database.cpp (database::get_pass_list): Change cast of
const char* to reinterpret_cast.
(database::add_result): Change type of iterator variable to
unsigned long.
Change cast of long long to static_cast<int64_t>.
(database::get_all_results): Change cast of const char* to
reinterpret_cast.
Change building of result object to be C++ compliant.
(const char *database::get_pass_blob): Change cast of char* to
reinterpret_cast.
* ml/ml.cpp (mageec_ml::init): Rename passes to known_passes.
(mageec_ml::all_passes): Likewise.
(mageec_ml::add_result): Change building of result object to be
C++ compliant.
(mageec_ml::make_decision): Change type of iterator variable to
unsigned long.
(mageec_ml::process_results): Likewise.
Rename passes to known_passes.
Change cast of popen to static_cast<FILE *>.
(file_ml::init): Mark pass_file as const.
Change cast of string to use static_cast.
(file_ml::make_decision): Change type of iterator variable and
vector length to unsigned long.
2014-08-01 Simon Cook <[email protected]>
* gcc_plugin/feature-extract.cpp (mageec_featextract_exec): Add
missing features ft16, ft17, ft18, ft19, ft20, ft22, ft23, ft35,
ft39, ft42, ft43, ft44, ft45, ft46.
2014-07-29 Simon Cook <[email protected]>
* doc/Makefile.in: Regenerated
* gcc_plugin/feature-extract.cpp: Replace uses of GCC_MINOR with
GCC_VERSION.
Fix GCC 4.8 headers.
* mageec/Makefile.am: Link with libmageec_learner before libmageec.
* mageec/Makefile.in: Regenerated.
2014-07-11 Simon Cook <[email protected]>
* ml/database.cpp (qinit3): Make prog field in features TEXT.
(qinit4): Remove invalid foreign key constraint.
(get_all_results): Only select results with the lowest energy.
Correct mprintf for feature set selection to use %Q instead of %s.
2014-07-11 Simon Cook <[email protected]>
* gcc_plugin/feature-extract.cpp: Use bversion.h to determine version.
Removed plugin-version.h from includes.
* gcc_plugin/Makefile.am: Build with -fno-rtti.
* gcc_plugin/Makefile.in: Regenerated.
2014-07-09 Simon Cook <[email protected]>
* include/mageec/mageec-ml.h (mageec_ml::init): Add path to database
virtual init function.
(class file_ml): Likewise.
* mageec/Makefile.am: Add rules for building mageecdb
* mageec/Makefile.in: Regenerated.
* mageec/dbtool.cpp: Add initial database management tool.
* ml/ml.cpp (mageec_ml::init): Add path to database function. Modified
COMPILER, VERSION init function to use this instead.
(file_ml::init): Likewise.
2014-07-07 Simon Cook <[email protected]>
* configure.ac: Make test for GCC headers using a C++ compiler instead
of C.
* configure: Regenerated.
2014-07-07 Simon Cook <[email protected]>
* gcc_plugin/feature-extract.cpp: Added conditional includes for GCC
4.9 and above.
(mageec_featextract_exec): Replace FOR_EACH_BB with FOR_ALL_BB_FN for
GCC 4.9 and above.
(pass_data_mageec_featextract): Added for GCC 4.9 and above.
(class mageec_featpass): Likewise.
(make_mageec_pass): Likewise.
(register_featextract): Update pass reference depending on GCC 4.9.
2014-07-07 Simon Cook <[email protected]>
* gcc_plugin/gcc-callbacks.cpp (mageec_pass_gate): Use mageec_config
map for configuration instead of larger set of globals.
* gcc_plugin/gcc-plugin.cpp (parse_arguments): Likewise.
* gcc_plugin/mageec-plugin.h (mageec_print_pass_info): Removed,
replaced with mageec_config.
(mageec_no_decision): Removed, replaced with mageec_config.
(mageec_config): Added.
2014-04-08 James Pallister <[email protected]>
Add an install-exec-hook to symlink the library into the plugins dir.
This allows "gcc -fplugin=mageec" to work.
* gcc_plugin/Makefile.am: Added an install-exec-hook and a uninstall-
hook to add and remove symlinks to the mageec gcc plugin
* gcc_plugin/Makefile.in: Regenerated
2014-04-08 James Pallister <[email protected]>
Make check fix for when not enabling python
* testsuite/config/site.exp.in: Quote @PYTHON@ so if it is not defined
make check does not fail
2014-04-08 James Pallister <[email protected]>
Conditionally enable gcc_plugin tests and python tests based on
--enable-XXX flags given to configure
* testsuite/Makefile.am: Added automake conditional declarations for
the gcc_plugin and python tests
* testsuite/Makefile.in: Regenerated
2014-04-07 Simon Cook <[email protected]>
* configure.ac: Make output formatting of enable python and gcc
more suited to surrounding options.