Changeset 13632


Ignore:
Timestamp:
Oct 1, 2019 3:16:50 PM (2 months ago)
Author:
Jonathan Kämpe
Message:

#5837 Renamed some classes

Location:
branches/dev-cw-evaluator/Compiler
Files:
5 edited
4 moved

Legend:

Unmodified
Added
Removed
  • branches/dev-cw-evaluator/Compiler/ModelicaFlatTree/src/jastadd/ConstantEvaluation/ExternalConstantEvaluation.jrag

    r13631 r13632  
    2626import java.util.TimerTask;
    2727
    28 import org.jmodelica.common.evaluation.Compiler;
     28import org.jmodelica.common.evaluation.ExternalFunctionCompiler;
    2929import org.jmodelica.common.evaluation.ExternalFunction;
    3030import org.jmodelica.common.evaluation.ExternalProcessCache;
  • branches/dev-cw-evaluator/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/common/evaluation/ExternalFunctionCompiler.java

    r13631 r13632  
    88import org.jmodelica.util.exceptions.CcodeCompilationException;
    99
    10 public interface Compiler<K, E extends External<K>> extends LogContainer {
     10public interface ExternalFunctionCompiler<K, E extends External<K>> extends LogContainer {
    1111    public String compileExternal(E ext) throws FileNotFoundException, CcodeCompilationException;
    1212
  • branches/dev-cw-evaluator/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/common/evaluation/ExternalFunctionExecutableDynamic.java

    r13631 r13632  
    33import java.util.ArrayList;
    44
    5 class DynamicExternalFunctionExecutable extends ExternalFunctionExecutable {
     5class ExternalFunctionExecutableDynamic extends ExternalFunctionExecutable {
    66    private ArrayList<String> executable;
    77   
    8     public DynamicExternalFunctionExecutable(ArrayList<String> executable) {
     8    public ExternalFunctionExecutableDynamic(ArrayList<String> executable) {
    99        this.executable = executable;
    1010    }
  • branches/dev-cw-evaluator/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/common/evaluation/ExternalFunctionExecutableGenerated.java

    r13631 r13632  
    33import java.io.File;
    44
    5 class CompiledExternalFunctionExecutable extends ExternalFunctionExecutable {
     5class ExternalFunctionExecutableGenerated extends ExternalFunctionExecutable {
    66    private String executable;
    77   
    8     public CompiledExternalFunctionExecutable(String executable) {
     8    public ExternalFunctionExecutableGenerated(String executable) {
    99        this.executable = executable;
    1010    }
  • branches/dev-cw-evaluator/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/common/evaluation/ExternalFunctionImpl.java

    r13631 r13632  
    1515 * Represents an external function that has been compiled successfully.
    1616 */
    17 class CompiledExternalFunction<K extends Variable<V, T>, V extends Value, T extends Type<V>, E extends External<K>> implements ExternalFunction<K, V> {
    18     Compiler<K, E> compiler;
     17class ExternalFunctionImpl<K extends Variable<V, T>, V extends Value, T extends Type<V>, E extends External<K>> implements ExternalFunction<K, V> {
     18    ExternalFunctionCompiler<K, E> compiler;
    1919    ExternalFunctionExecutable extFunctionExecutable;
    2020    ProcessBuilder processBuilder;
    2121    private String msg;
    2222
    23     public CompiledExternalFunction(Compiler<K, E> compiler, External<K> ext, ExternalFunctionExecutable extFunctionExecutable) {
     23    public ExternalFunctionImpl(ExternalFunctionCompiler<K, E> compiler, External<K> ext, ExternalFunctionExecutable extFunctionExecutable) {
    2424        this.compiler = compiler;
    2525        this.extFunctionExecutable = extFunctionExecutable;
  • branches/dev-cw-evaluator/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/common/evaluation/ExternalProcessCacheImpl.java

    r13631 r13632  
    3333    private final LinkedHashSet<ExternalFunction<K, V>> livingCachedExternals = new LinkedHashSet<ExternalFunction<K, V>>();
    3434
    35     private final Compiler<K, E> mc;
    36 
    37     public ExternalProcessCacheImpl(Compiler<K, E> mc) {
     35    private final ExternalFunctionCompiler<K, E> mc;
     36
     37    public ExternalProcessCacheImpl(ExternalFunctionCompiler<K, E> mc) {
    3838        this.mc = mc;
    3939    }
     
    152152                    arguments.add(0, executable); /* Needs to be first */
    153153                   
    154                     extFunctionExecutable = new DynamicExternalFunctionExecutable(arguments);
     154                    extFunctionExecutable = new ExternalFunctionExecutableDynamic(arguments);
    155155                   
    156156                    debugMsg = "Succesfully connected external function '" + ext.getName() + "' to the evaluator '"
     
    159159                    executable = mc.compileExternal(ext);
    160160                   
    161                     extFunctionExecutable = new CompiledExternalFunctionExecutable(executable);
     161                    extFunctionExecutable = new ExternalFunctionExecutableGenerated(executable);
    162162                   
    163163                    debugMsg = "Succesfully compiled external function '" + ext.getName() + "' to executable '"
     
    168168                    ef = new MappedExternalFunction<K,V,T,E>(mc, ext, extFunctionExecutable, livingCachedExternals);
    169169                } else {
    170                     ef = new CompiledExternalFunction<K,V,T,E>(mc, ext, extFunctionExecutable);
     170                    ef = new ExternalFunctionImpl<K,V,T,E>(mc, ext, extFunctionExecutable);
    171171                }
    172172                time = System.currentTimeMillis() - time;
  • branches/dev-cw-evaluator/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/common/evaluation/ExternalProcessMultiCache.java

    r13631 r13632  
    5454    private Map<String, ExternalProcessCache<K, V, T, E>> map = new LinkedHashMap<>();
    5555
    56     private Compiler<K, E> mc;
     56    private ExternalFunctionCompiler<K, E> mc;
    5757
    58     public ExternalProcessMultiCache(Compiler<K, E> mc) {
     58    public ExternalProcessMultiCache(ExternalFunctionCompiler<K, E> mc) {
    5959        this.mc = mc;
    6060    }
  • branches/dev-cw-evaluator/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/common/evaluation/MappedExternalFunction.java

    r13631 r13632  
    1616 * object constructor only called once.
    1717 */
    18 class MappedExternalFunction<K extends Variable<V, T>, V extends Value, T extends Type<V>, E extends External<K>> extends CompiledExternalFunction<K,V,T,E> {
     18class MappedExternalFunction<K extends Variable<V, T>, V extends Value, T extends Type<V>, E extends External<K>> extends ExternalFunctionImpl<K,V,T,E> {
    1919
    2020    private Map<String, ExternalFunction<K, V>> lives = new HashMap<>();
     
    2323    private final int externalConstantEvaluationMaxProc;
    2424
    25     public MappedExternalFunction(Compiler<K,E> compiler, External<K> ext, ExternalFunctionExecutable extFunctionExecutable, LinkedHashSet<ExternalFunction<K, V>> livingCachedExternals) {
     25    public MappedExternalFunction(ExternalFunctionCompiler<K,E> compiler, External<K> ext, ExternalFunctionExecutable extFunctionExecutable, LinkedHashSet<ExternalFunction<K, V>> livingCachedExternals) {
    2626        super(compiler, ext, extFunctionExecutable);
    2727        this.livingCachedExternals = livingCachedExternals;
  • branches/dev-cw-evaluator/Compiler/ModelicaFrontEnd/test/junit/org/jmodelica/test/common/ExternalProcessCacheTest.java

    r13631 r13632  
    99import java.io.IOException;
    1010
    11 import org.jmodelica.common.evaluation.Compiler;
     11import org.jmodelica.common.evaluation.ExternalFunctionCompiler;
    1212import org.jmodelica.common.evaluation.ExternalFunction;
    1313import org.jmodelica.common.evaluation.ExternalProcessCache;
     
    7575    class ExternalProcessCacheMock<K extends Variable<V,T>, V extends Value, T extends Type<V>, E extends External<K>> extends ExternalProcessMultiCache<K,V,T,E> {
    7676
    77         public ExternalProcessCacheMock(Compiler<K,E> mc) {
     77        public ExternalProcessCacheMock(ExternalFunctionCompiler<K,E> mc) {
    7878            super(mc);
    7979        }
     
    111111    }
    112112
    113     class CompilerMock implements Compiler<VariableMock, ExternalMock> {
     113    class CompilerMock implements ExternalFunctionCompiler<VariableMock, ExternalMock> {
    114114
    115115        @Override
Note: See TracChangeset for help on using the changeset viewer.