Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10049


Ignore:
Timestamp:
10/17/13 15:15:49 (9 years ago)
Author:
gkronber
Message:

#2026 created a separate plugin for the classes for the GPDL code generation backend. To remove references to HL code from the core compiler code.

Location:
branches/HeuristicLab.Problems.GPDL
Files:
10 added
3 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/GpdlEditor.cs

    r10031 r10049  
    2727using HeuristicLab.MainForm.WindowsForms;
    2828using HeuristicLab.Optimization;
     29using HeuristicLab.Problems.GPDL.CodeGen;
    2930using HeuristicLab.Problems.Instances;
    3031using HeuristicLab.Problems.Instances.Views;
     
    4950        // generate an OSGA to solve the problem
    5051        var osga = new OffspringSelectionGeneticAlgorithm();
    51         osga.Problem = parser.problem;
     52        var problemGenerator = new ProblemGenerator();
     53        osga.Problem = problemGenerator.GenerateFromAst(parser.AbstractSyntaxTree);
    5254        osga.Engine = new SequentialEngine.SequentialEngine();
    5355        osga.PopulationSize.Value = 500;
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.Views/3.4/HeuristicLab.Problems.GPDL.Views-3.4.csproj

    r9846 r10049  
    259259  </ItemGroup>
    260260  <ItemGroup>
     261    <ProjectReference Include="..\..\HeuristicLab.Problems.GPDL.CodeGen\3.4\HeuristicLab.Problems.GPDL.CodeGen-3.4.csproj">
     262      <Project>{F8481248-2A5B-48A0-A485-D3E1619C1E44}</Project>
     263      <Name>HeuristicLab.Problems.GPDL.CodeGen-3.4</Name>
     264    </ProjectReference>
    261265    <ProjectReference Include="..\..\HeuristicLab.Problems.GPDL\3.4\HeuristicLab.Problems.GPDL-3.4.csproj">
    262266      <Project>{E4EE5AFB-D552-447B-8A16-6CBE7938AF32}</Project>
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL.sln

    r10031 r10049  
    3232EndProject
    3333Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Grammars-3.3", "HeuristicLab.Grammars\3.3\HeuristicLab.Grammars-3.3.csproj", "{A5452B63-B33B-4F9F-9E81-98B75EDB5612}"
     34EndProject
     35Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.GPDL.CodeGen-3.4", "HeuristicLab.Problems.GPDL.CodeGen\3.4\HeuristicLab.Problems.GPDL.CodeGen-3.4.csproj", "{F8481248-2A5B-48A0-A485-D3E1619C1E44}"
    3436EndProject
    3537Global
     
    103105    {A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Release|x86.ActiveCfg = Release|x86
    104106    {A5452B63-B33B-4F9F-9E81-98B75EDB5612}.Release|x86.Build.0 = Release|x86
     107    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     108    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Debug|Any CPU.Build.0 = Debug|Any CPU
     109    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Debug|x64.ActiveCfg = Debug|x64
     110    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Debug|x64.Build.0 = Debug|x64
     111    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Debug|x86.ActiveCfg = Debug|x86
     112    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Debug|x86.Build.0 = Debug|x86
     113    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Release|Any CPU.ActiveCfg = Release|Any CPU
     114    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Release|Any CPU.Build.0 = Release|Any CPU
     115    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Release|x64.ActiveCfg = Release|x64
     116    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Release|x64.Build.0 = Release|x64
     117    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Release|x86.ActiveCfg = Release|x86
     118    {F8481248-2A5B-48A0-A485-D3E1619C1E44}.Release|x86.Build.0 = Release|x86
    105119  EndGlobalSection
    106120  GlobalSection(SolutionProperties) = preSolution
     
    110124    {582440C3-BB33-4683-A5EC-673AB51A7AB3} = {3768D612-38EB-47D8-9E79-75D8E5AB00A8}
    111125  EndGlobalSection
     126  GlobalSection(Performance) = preSolution
     127    HasPerformanceSessions = true
     128  EndGlobalSection
    112129EndGlobal
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/GPDef.atg

    r9872 r10049  
    2828
    2929COMPILER GPDef
    30   public HeuristicLab.Optimization.ISingleObjectiveHeuristicOptimizationProblem problem;
    31  
     30public GPDefNode AbstractSyntaxTree { get; private set; }
     31
    3232CHARACTERS
    3333  letter = 'A'..'Z' + 'a'..'z'.
     
    5757                                                                                    FitnessFunctionNode fitnessFunNode = null;
    5858                                                                                    TerminalNode tNode = null;
    59                                                                                     problem = null;
    6059                                                                                    string src = "";
    6160                                                                                  .)
     
    108107                                                                                  (. if(errors.count > 0) throw new FatalError("Syntactic or semantic errors found."); .)
    109108    "END" ident                                                                   (.
    110                                                                                     var gen = new ProblemGenerator();
    111                                                                                     problem = gen.GenerateFromAst(gpDef);
     109                                                                                    AbstractSyntaxTree = gpDef;
    112110                                                                                  .)
    113111    '.'
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/HeuristicLab.Problems.GPDL-3.4.csproj

    r9872 r10049  
    5050    <DebugType>pdbonly</DebugType>
    5151    <Optimize>true</Optimize>
    52     <OutputPath>bin\Release\</OutputPath>
     52    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    5353    <DefineConstants>TRACE</DefineConstants>
    5454    <ErrorReport>prompt</ErrorReport>
     
    9393  </PropertyGroup>
    9494  <ItemGroup>
    95     <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    96       <SpecificVersion>False</SpecificVersion>
    97       <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath>
    98       <Private>False</Private>
    99     </Reference>
    100     <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    101       <SpecificVersion>False</SpecificVersion>
    102       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll</HintPath>
    103       <Private>False</Private>
    104     </Reference>
    105     <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    106       <SpecificVersion>False</SpecificVersion>
    107       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath>
    108       <Private>False</Private>
    109     </Reference>
    110     <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    111       <SpecificVersion>False</SpecificVersion>
    112       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
    113       <Private>False</Private>
    114     </Reference>
    115     <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    116       <SpecificVersion>False</SpecificVersion>
    117       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
    118       <Private>False</Private>
    119     </Reference>
    120     <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    121       <SpecificVersion>False</SpecificVersion>
    122       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath>
    123       <Private>False</Private>
    124     </Reference>
    125     <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    126       <SpecificVersion>False</SpecificVersion>
    127       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
    128       <Private>False</Private>
    129     </Reference>
    130     <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    131       <SpecificVersion>False</SpecificVersion>
    132       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
    133       <Private>False</Private>
    134     </Reference>
    135     <Reference Include="HeuristicLab.ParallelEngine-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    136       <SpecificVersion>False</SpecificVersion>
    137       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.ParallelEngine-3.3.dll</HintPath>
    138       <Private>False</Private>
    139     </Reference>
    140     <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    141       <SpecificVersion>False</SpecificVersion>
    142       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
    143       <Private>False</Private>
    144     </Reference>
    145     <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    146       <SpecificVersion>False</SpecificVersion>
    147       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
    148       <Private>False</Private>
    149     </Reference>
    150     <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    151       <SpecificVersion>False</SpecificVersion>
    152       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
    153       <Private>False</Private>
    154     </Reference>
    155     <Reference Include="HeuristicLab.Problems.Instances.DataAnalysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    156       <SpecificVersion>False</SpecificVersion>
    157       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.DataAnalysis-3.3.dll</HintPath>
    158       <Private>False</Private>
    159     </Reference>
    160     <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    161       <SpecificVersion>False</SpecificVersion>
    162       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
    163       <Private>False</Private>
    164     </Reference>
    165     <Reference Include="HeuristicLab.Selection-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    166       <SpecificVersion>False</SpecificVersion>
    167       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Selection-3.3.dll</HintPath>
    168       <Private>False</Private>
    169     </Reference>
    170     <Reference Include="HeuristicLab.SequentialEngine-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    171       <SpecificVersion>False</SpecificVersion>
    172       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.SequentialEngine-3.3.dll</HintPath>
    173       <Private>False</Private>
    174     </Reference>
    17595    <Reference Include="System" />
    17696    <Reference Include="System.Core">
     
    193113    <Compile Include="Grammar.cs" />
    194114    <Compile Include="Parser.cs" />
    195     <Compile Include="ProblemGenerator.cs" />
    196115    <Compile Include="Scanner.cs" />
    197     <Compile Include="Util.cs" />
     116    <Compile Include="Util.cs">
     117      <SubType>Code</SubType>
     118    </Compile>
    198119    <None Include="GPDef.atg" />
    199120    <None Include="HeuristicLab.snk" />
    200     <Compile Include="Plugin.cs" />
    201121    <Compile Include="Properties\AssemblyInfo.cs" />
    202     <None Include="Plugin.cs.frame" />
    203122    <None Include="Properties\AssemblyInfo.cs.frame" />
    204123  </ItemGroup>
  • branches/HeuristicLab.Problems.GPDL/HeuristicLab.Problems.GPDL/3.4/Parser.cs

    r9872 r10049  
    2828  int errDist = minErrDist;
    2929
    30 public HeuristicLab.Optimization.ISingleObjectiveHeuristicOptimizationProblem problem;
    31  
     30public GPDefNode AbstractSyntaxTree { get; private set; }
     31
    3232
    3333
     
    107107    FitnessFunctionNode fitnessFunNode = null;
    108108    TerminalNode tNode = null;
    109     problem = null;
    110109    string src = "";
    111110   
     
    181180    Expect(12);
    182181    Expect(1);
    183     var gen = new ProblemGenerator();
    184     problem = gen.GenerateFromAst(gpDef);
     182    AbstractSyntaxTree = gpDef;
    185183   
    186184    Expect(13);
Note: See TracChangeset for help on using the changeset viewer.