1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 |
|
---|
4 | namespace HeuristicLab.BenchmarkSuite {
|
---|
5 | using System.Linq;
|
---|
6 |
|
---|
7 | using HeuristicLab.BenchmarkSuite.Problems;
|
---|
8 | using HeuristicLab.Problems.Instances;
|
---|
9 |
|
---|
10 | public class BenchmarkSuiteInstanceProvider : ProblemInstanceProvider<Data> {
|
---|
11 | private const string name = "General Program Synthesis Benchmark Suite";
|
---|
12 | private const string referencePublication =
|
---|
13 | "T. Helmuth and L. Spector, \"Detailed Problem Descriptions for General Program Synthesis Benchmark Suite\", Technical Report UM-CS-2015-006, School of Computer Science, University of Massachusetts Amherst, 2015.";
|
---|
14 | private static readonly Uri webLink = new Uri("https://web.cs.umass.edu/publication/docs/2015/UM-CS-2015-006.pdf");
|
---|
15 |
|
---|
16 | public override string Name
|
---|
17 | {
|
---|
18 | get { return name; }
|
---|
19 | }
|
---|
20 |
|
---|
21 | public override string Description
|
---|
22 | {
|
---|
23 | get { return ""; }
|
---|
24 | }
|
---|
25 |
|
---|
26 | public override Uri WebLink
|
---|
27 | {
|
---|
28 | get { return webLink; }
|
---|
29 | }
|
---|
30 |
|
---|
31 | public override string ReferencePublication
|
---|
32 | {
|
---|
33 | get { return referencePublication; }
|
---|
34 | }
|
---|
35 |
|
---|
36 | public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
|
---|
37 | yield return new CountOdds();
|
---|
38 | //yield return new CollatzNumbers();
|
---|
39 | yield return new Checksum();
|
---|
40 | //yield return new CompareStringLengths();
|
---|
41 | //yield return new Digits();
|
---|
42 | //yield return new DoubleLetters();
|
---|
43 | //yield return new EvenSquares();
|
---|
44 | //yield return new ForLoopIndex();
|
---|
45 | //yield return new Grades();
|
---|
46 | //yield return new LastIndexOfZero();
|
---|
47 | //yield return new Median();
|
---|
48 | //yield return new MirrorImage();
|
---|
49 | //yield return new NegativeToZero();
|
---|
50 | //yield return new NumberIo();
|
---|
51 | //yield return new PigLatin();
|
---|
52 | //yield return new ReplaceSpaceWithNewline();
|
---|
53 | }
|
---|
54 |
|
---|
55 | public override Data LoadData(IDataDescriptor descriptor) {
|
---|
56 | var benchmarkSuiteDataDescriptor = (IBenchmarkSuiteDataDescriptor)descriptor;
|
---|
57 |
|
---|
58 | return benchmarkSuiteDataDescriptor.CreateData();
|
---|
59 | }
|
---|
60 | }
|
---|
61 | }
|
---|