Skip to content

Commit

Permalink
Remove the CodegenModelica generator.
Browse files Browse the repository at this point in the history
  - This generator is marked as obsolete.

  - We could have probably left this one be for now considering that it
    is quite small and seems to be useful if used.

    However, it is already marked as obsolete.
    Plus we will forget it and end up never removing it.
  • Loading branch information
mahge committed Nov 19, 2020
1 parent 075462a commit ac1e467
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 225 deletions.
1 change: 0 additions & 1 deletion OMCompiler/Compiler/.cmake/meta_modelica_source_list.cmake
Expand Up @@ -412,7 +412,6 @@ set(OMC_MM_BACKEND_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/Template/CodegenFMUCppHpcomOld.mo
${CMAKE_CURRENT_SOURCE_DIR}/Template/CodegenJS.mo
${CMAKE_CURRENT_SOURCE_DIR}/Template/CodegenMidToC.mo
${CMAKE_CURRENT_SOURCE_DIR}/Template/CodegenModelica.mo
${CMAKE_CURRENT_SOURCE_DIR}/Template/CodegenSparseFMI.mo
${CMAKE_CURRENT_SOURCE_DIR}/Template/CodegenUtilSimulation.mo
${CMAKE_CURRENT_SOURCE_DIR}/Template/CodegenXML.mo
Expand Down
4 changes: 0 additions & 4 deletions OMCompiler/Compiler/.cmake/template_compilation.cmake
Expand Up @@ -288,7 +288,3 @@ omc_add_template_target(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/susan_codegen/TplCode
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/susan_codegen/TplCodegenTV.mo)



omc_add_template_target(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/Template/CodegenModelica.tpl)


3 changes: 0 additions & 3 deletions OMCompiler/Compiler/BackEnd/BackendDAEUtil.mo
Expand Up @@ -7640,9 +7640,6 @@ algorithm
BackendDump.graphvizBackendDAE(outSimDAE, "dumpindxdae");
end if;
end if;
if Flags.isSet(Flags.DUMP_TRANSFORMED_MODELICA_MODEL) then
BackendDump.dumpBackendDAEToModelica(outSimDAE, "dumpindxdae");
end if;
if Flags.isSet(Flags.DUMP_BACKENDDAE_INFO) or Flags.isSet(Flags.DUMP_STATESELECTION_INFO) or Flags.isSet(Flags.DUMP_DISCRETEVARS_INFO) then
BackendDump.dumpCompShort(outSimDAE);
end if;
Expand Down
12 changes: 0 additions & 12 deletions OMCompiler/Compiler/BackEnd/BackendDump.mo
Expand Up @@ -59,7 +59,6 @@ import BackendDAEUtil;
import BackendEquation;
import BackendVariable;
import BaseHashSet;
import CodegenModelica;
import ComponentReference;
import DAEDump;
import DAEUtil;
Expand Down Expand Up @@ -619,7 +618,6 @@ end setAdjacencyMatrix1;
// These are functions, that print directly to the standard-stream and separates
// there output (e.g. with some kind of headings).
// - dumpBackendDAE
// - dumpBackendDAEToModelica
// - dumpBackendDAEEqnList
// - dumpBackendDAEVarList
// - dumpComponent
Expand Down Expand Up @@ -656,16 +654,6 @@ algorithm
print("\n");
end dumpBackendDAE;

public function dumpBackendDAEToModelica "This function dumps the BackendDAE.BackendDAE representation to a Modelica file."
input BackendDAE.BackendDAE inBackendDAE;
input String suffix;
protected
String str;
algorithm
str := Tpl.tplString(CodegenModelica.dumpBackendDAE, inBackendDAE);
Error.addMessage(Error.BACKEND_DAE_TO_MODELICA, {suffix, str});
end dumpBackendDAEToModelica;

public function dumpEqSystem
input BackendDAE.EqSystem inEqSystem;
input String heading;
Expand Down
97 changes: 0 additions & 97 deletions OMCompiler/Compiler/Template/CodegenModelica.tpl

This file was deleted.

7 changes: 1 addition & 6 deletions OMCompiler/Compiler/Template/Makefile.common
Expand Up @@ -4,7 +4,7 @@ GENERATED_FILES_BOOT_STAGE2=AbsynDumpTpl.mo CodegenUtil.mo DAEDumpTpl.mo Express
GENERATED_FILES=$(GENERATED_FILES_BOOT_STAGE2) CodegenC.mo CodegenUtilSimulation.mo CodegenEmbeddedC.mo CodegenFMUCommon.mo \
CodegenFMU.mo CodegenFMU1.mo CodegenFMU2.mo CodegenCppCommon.mo CodegenCpp.mo CodegenCppHpcom.mo CodegenFMUCpp.mo \
CodegenOMSI_common.mo CodegenOMSIC.mo CodegenOMSICpp.mo CodegenOMSIC_Equations.mo CodegenFMUCppHpcom.mo CodegenCppInit.mo \
CodegenMidToC.mo CodegenModelica.mo GraphvizDump.mo GraphMLDumpTpl.mo NFInstDumpTpl.mo SimCodeDump.mo CodegenSparseFMI.mo \
CodegenMidToC.mo GraphvizDump.mo GraphMLDumpTpl.mo NFInstDumpTpl.mo SimCodeDump.mo CodegenSparseFMI.mo \
CodegenXML.mo CodegenJS.mo VisualXMLTpl.mo \
CodegenCppCommonOld.mo CodegenCppHpcomOld.mo CodegenCppOld.mo CodegenFMUCppHpcomOld.mo CodegenFMUCppOld.mo
UNUSED=../boot/find-unused-import.sh
Expand Down Expand Up @@ -110,11 +110,6 @@ CodegenOMSIC_Equations.mo : CodegenOMSIC_Equations.tpl SimCodeTV.mo SimCodeBacke
$(OMC) $< > $@.log || (cat $@.log && false)
@echo " " && ($(UNUSED) "$@" || true)

CodegenModelica.mo : CodegenModelica.tpl
@echo " ** CodegenModelica template compilation ** "
$(OMC) $< > $@.log || (cat $@.log && false)
@echo " " && ($(UNUSED) "$@" || true)

DAEDumpTpl.mo : DAEDumpTpl.tpl DAEDumpTV.mo
@echo " ** DAEDumpTpl template compilation ** "
$(OMC) $< > $@.log || (cat $@.log && false)
Expand Down

0 comments on commit ac1e467

Please sign in to comment.