From c251162c869989a048101ad2769cfd3d27a403b2 Mon Sep 17 00:00:00 2001 From: SVAGEN26 Date: Wed, 24 Jun 2026 11:58:00 +0200 Subject: [PATCH] CI: check OSMC-PL 1.8 license header in Julia src files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a CI check that every `.jl` file under `src/` carries the OSMC-PL 1.8 license header with an up-to-date copyright year, mirroring OpenModelica's `check_runtime_license.py` (adapted for Julia `#= ... =#` block comments). - `.CI/scripts/check_julia_license.py`: the checker (supports --fix-license, --update-year, --summary and a `.CI/scripts/julia-license-exceptions.txt` exclusion list with .gitignore-style semantics). - `.CI/scripts/julia-license-exceptions.txt`: excludes src/CodeGeneration/mtkExternals.jl, which is vendored ModelingToolkit code under the MIT "Expat" License — NOT OSMC-PL. - `.github/workflows/check-license.yml`: runs it on `src` for pull requests. - Upgraded the existing OSMC-PL 1.2 headers (and added missing ones) to the OSMC-PL 1.8 header so the check passes. mtkExternals.jl is left untouched. Co-Authored-By: JKRT Co-Authored-By: Claude Opus 4.8 --- .github/workflows/check-license.yml | 23 +++++++ src/Backend/BDAE.jl | 28 ++++---- src/Backend/BDAECreate.jl | 31 +++++---- src/Backend/BDAEUtil.jl | 30 +++++---- src/Backend/Backend.jl | 35 ++++++++++ src/Backend/BackendEquation.jl | 28 ++++---- src/Backend/Causalize.jl | 28 ++++---- src/Backend/backendDump.jl | 30 +++++---- src/BackendUtil/BackendUtil.jl | 35 ++++++++++ src/BackendUtil/GraphAlgorithms.jl | 35 ++++++++++ .../AlgorithmicCodeGeneration.jl | 35 ++++++++++ src/CodeGeneration/CodeGeneration.jl | 65 ++++++++++--------- src/CodeGeneration/CodeGenerationUtil.jl | 30 +++++---- src/CodeGeneration/DAEInitSolve.jl | 35 ++++++++++ src/CodeGeneration/DECodeGeneration.jl | 30 +++++++-- src/CodeGeneration/DirectRHSGeneration.jl | 34 +++++----- src/CodeGeneration/DiscreteDummyDemotion.jl | 30 +++++++-- src/CodeGeneration/MTK_CodeGeneration.jl | 30 +++++---- src/CodeGeneration/MTK_CodeGenerationUtil.jl | 30 +++++++-- src/CodeGeneration/algorithmic.jl | 35 ++++++++++ src/CodeGeneration/arrayUtils.jl | 35 ++++++++++ src/CodeGeneration/codeGen.jl | 35 ++++++++++ src/CodeGeneration/exprRewrite.jl | 35 ++++++++++ src/CodeGeneration/iMTKGen.jl | 35 ++++++++++ src/CodeGeneration/modelicaBuiltins.jl | 35 ++++++++++ src/CodeGeneration/mtkDump.jl | 35 ++++++++++ src/CodeGeneration/structuralCallbacks.jl | 65 ++++++++++--------- src/FrontendUtil/AbsynUtil.jl | 35 ++++++++++ src/FrontendUtil/FrontendUtil.jl | 35 ++++++++++ src/FrontendUtil/Prefix.jl | 35 ++++++++++ src/FrontendUtil/Util.jl | 35 ++++++++++ src/OMBackend.jl | 28 ++++---- src/Runtime/Runtime.jl | 30 +++++---- src/Runtime/RuntimeUtil.jl | 35 ++++++++++ src/Runtime/reconfiguration.jl | 35 ++++++++++ src/SimulationCode/SimulationCode.jl | 28 ++++---- src/SimulationCode/simCodeAlgorithmic.jl | 35 ++++++++++ src/SimulationCode/simCodeCheck.jl | 35 ++++++++++ src/SimulationCode/simCodeData.jl | 35 ++++++++++ src/SimulationCode/simCodeDump.jl | 28 ++++---- src/SimulationCode/simCodeExpBridge.jl | 35 ++++++++++ src/SimulationCode/simCodeFunctions.jl | 30 +++++---- src/SimulationCode/simCodeStructureTypes.jl | 35 ++++++++++ src/SimulationCode/simCodeStructureUtil.jl | 35 ++++++++++ src/SimulationCode/simCodeTraverse.jl | 35 ++++++++++ src/SimulationCode/simCodeUtil.jl | 35 ++++++++++ .../simulationCodeTransformation.jl | 28 ++++---- src/backendAPI.jl | 30 +++++---- src/backendUtils.jl | 35 ++++++++++ src/globalConstants.jl | 35 ++++++++++ src/util.jl | 30 +++++---- 51 files changed, 1434 insertions(+), 290 deletions(-) create mode 100644 .github/workflows/check-license.yml diff --git a/.github/workflows/check-license.yml b/.github/workflows/check-license.yml new file mode 100644 index 00000000..1eb269dd --- /dev/null +++ b/.github/workflows/check-license.yml @@ -0,0 +1,23 @@ +name: Check License Headers + +on: + pull_request: + branches: + - master + +jobs: + check-license: + name: Julia license headers + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Check OSMC-PL 1.8 license header present in src + run: | + python3 .CI/scripts/check_julia_license.py --summary src diff --git a/src/Backend/BDAE.jl b/src/Backend/BDAE.jl index 5234f48d..aedcf402 100644 --- a/src/Backend/BDAE.jl +++ b/src/Backend/BDAE.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,21 +7,25 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * diff --git a/src/Backend/BDAECreate.jl b/src/Backend/BDAECreate.jl index 2c32e1e6..3f806b1d 100644 --- a/src/Backend/BDAECreate.jl +++ b/src/Backend/BDAECreate.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,27 +7,32 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# + """ This module contain the various functions that are related to the lowering of the DAE IR into Backend DAE IR (BDAE IR). BDAE IR is the representation we use diff --git a/src/Backend/BDAEUtil.jl b/src/Backend/BDAEUtil.jl index a45cbebd..f55ffea0 100644 --- a/src/Backend/BDAEUtil.jl +++ b/src/Backend/BDAEUtil.jl @@ -1,33 +1,37 @@ #= /* * This file is part of OpenModelica. * -* Copyright (c) 1998-2026, Open Source Modelica Consortiurm (OSMC), +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), * c/o Linköpings universitet, Department of Computer and Information Science, * SE-58183 Linköping, Sweden. * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# module BDAEUtil diff --git a/src/Backend/Backend.jl b/src/Backend/Backend.jl index e8ed2571..f6cd5663 100644 --- a/src/Backend/Backend.jl +++ b/src/Backend/Backend.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= The backend of OMBackend.. =# diff --git a/src/Backend/BackendEquation.jl b/src/Backend/BackendEquation.jl index d0bec683..ebdbc4b3 100644 --- a/src/Backend/BackendEquation.jl +++ b/src/Backend/BackendEquation.jl @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# module BackendEquation diff --git a/src/Backend/Causalize.jl b/src/Backend/Causalize.jl index 247d5c07..81122e41 100644 --- a/src/Backend/Causalize.jl +++ b/src/Backend/Causalize.jl @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# module Causalize diff --git a/src/Backend/backendDump.jl b/src/Backend/backendDump.jl index 1a9fc13d..4b8c6bf4 100644 --- a/src/Backend/backendDump.jl +++ b/src/Backend/backendDump.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# #= This file contains functions to translate backend structures into a Julia string representation. =# diff --git a/src/BackendUtil/BackendUtil.jl b/src/BackendUtil/BackendUtil.jl index c7a81cd5..3768a3c4 100644 --- a/src/BackendUtil/BackendUtil.jl +++ b/src/BackendUtil/BackendUtil.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + " Generic algorithms for backend processing Author: John Tinnerholm diff --git a/src/BackendUtil/GraphAlgorithms.jl b/src/BackendUtil/GraphAlgorithms.jl index 6beb96a9..966c4f90 100644 --- a/src/BackendUtil/GraphAlgorithms.jl +++ b/src/BackendUtil/GraphAlgorithms.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + " This files contains the various graph algorithms. diff --git a/src/CodeGeneration/AlgorithmicCodeGeneration.jl b/src/CodeGeneration/AlgorithmicCodeGeneration.jl index 7f906ab5..b792412c 100644 --- a/src/CodeGeneration/AlgorithmicCodeGeneration.jl +++ b/src/CodeGeneration/AlgorithmicCodeGeneration.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + module AlgorithmicCodeGeneration import ..SimulationCode import ..Absyn diff --git a/src/CodeGeneration/CodeGeneration.jl b/src/CodeGeneration/CodeGeneration.jl index 1ac7da3d..66a4ab9d 100644 --- a/src/CodeGeneration/CodeGeneration.jl +++ b/src/CodeGeneration/CodeGeneration.jl @@ -1,34 +1,37 @@ -#= -# This file is part of OpenModelica. -# -# Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), -# c/o Linköpings universitet, Department of Computer and Information Science, -# SE-58183 Linköping, Sweden. -# -# All rights reserved. -# -# THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -# THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. -# ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -# RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -# ACCORDING TO RECIPIENTS CHOICE. -# -# The OpenModelica software and the Open Source Modelica -# Consortium (OSMC) Public License (OSMC-PL) are obtained -# from OSMC, either from the above address, -# from the URLs: http:www.ida.liu.se/projects/OpenModelica or -# http:www.openmodelica.org, and in the OpenModelica distribution. -# GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. -# -# This program is distributed WITHOUT ANY WARRANTY; without -# even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH -# IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. -# -# See the full OSMC Public License conditions for more details. -# -Author: John Tinnerholm, john.tinnerholm@liu.se -=# +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# module CodeGeneration diff --git a/src/CodeGeneration/CodeGenerationUtil.jl b/src/CodeGeneration/CodeGenerationUtil.jl index 7949854d..6e0afa71 100644 --- a/src/CodeGeneration/CodeGenerationUtil.jl +++ b/src/CodeGeneration/CodeGenerationUtil.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# #= # Author: John Tinnerholm (johti17) diff --git a/src/CodeGeneration/DAEInitSolve.jl b/src/CodeGeneration/DAEInitSolve.jl index 5a147792..9e6d20c2 100644 --- a/src/CodeGeneration/DAEInitSolve.jl +++ b/src/CodeGeneration/DAEInitSolve.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= Two-phase Newton solver for DAE consistent-IC. Shared by DirectRHS and MTK pre-solve paths. diff --git a/src/CodeGeneration/DECodeGeneration.jl b/src/CodeGeneration/DECodeGeneration.jl index 6e8d9929..e42fb211 100644 --- a/src/CodeGeneration/DECodeGeneration.jl +++ b/src/CodeGeneration/DECodeGeneration.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,9 +7,31 @@ * * All rights reserved. * -* This program is distributed WITHOUT ANY WARRANTY. See the OSMC Public License -* for details. -=# +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# #= Direct DifferentialEquations.jl code generation (DEMode). diff --git a/src/CodeGeneration/DirectRHSGeneration.jl b/src/CodeGeneration/DirectRHSGeneration.jl index 006d7ce4..54b74598 100644 --- a/src/CodeGeneration/DirectRHSGeneration.jl +++ b/src/CodeGeneration/DirectRHSGeneration.jl @@ -1,33 +1,37 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), -* c/o Linkoepings universitet, Department of Computer and Information Science, -* SE-58183 Linkoeping, Sweden. +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# #= Direct RHS Generation for OM.jl diff --git a/src/CodeGeneration/DiscreteDummyDemotion.jl b/src/CodeGeneration/DiscreteDummyDemotion.jl index 568880fc..e147fc12 100644 --- a/src/CodeGeneration/DiscreteDummyDemotion.jl +++ b/src/CodeGeneration/DiscreteDummyDemotion.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,9 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. -=# +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# #= Discrete-dummy demotion: figure out which discrete variables should NOT diff --git a/src/CodeGeneration/MTK_CodeGeneration.jl b/src/CodeGeneration/MTK_CodeGeneration.jl index 6331f0a7..67e51fad 100644 --- a/src/CodeGeneration/MTK_CodeGeneration.jl +++ b/src/CodeGeneration/MTK_CodeGeneration.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# #= Author: John Tinnerholm diff --git a/src/CodeGeneration/MTK_CodeGenerationUtil.jl b/src/CodeGeneration/MTK_CodeGenerationUtil.jl index 9172b1f5..a7816cef 100644 --- a/src/CodeGeneration/MTK_CodeGenerationUtil.jl +++ b/src/CodeGeneration/MTK_CodeGenerationUtil.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,9 +7,31 @@ * * All rights reserved. * -* This program is distributed WITHOUT ANY WARRANTY. See the OSMC Public License -* for details. -=# +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# #= MTK / Symbolics-specific lowering helpers carved out of CodeGenerationUtil. diff --git a/src/CodeGeneration/algorithmic.jl b/src/CodeGeneration/algorithmic.jl index 783ae26f..fef6b260 100644 --- a/src/CodeGeneration/algorithmic.jl +++ b/src/CodeGeneration/algorithmic.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= Code generation for algorithmic Modelica. author:johti17 diff --git a/src/CodeGeneration/arrayUtils.jl b/src/CodeGeneration/arrayUtils.jl index b75c6ade..223dfbea 100644 --- a/src/CodeGeneration/arrayUtils.jl +++ b/src/CodeGeneration/arrayUtils.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= Array utility functions for code generation. Handles conversion between Modelica's nested vector representation diff --git a/src/CodeGeneration/codeGen.jl b/src/CodeGeneration/codeGen.jl index 516d9547..2fc0d036 100644 --- a/src/CodeGeneration/codeGen.jl +++ b/src/CodeGeneration/codeGen.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= This file contains the code generation for the DifferentialEquations.jl backend. diff --git a/src/CodeGeneration/exprRewrite.jl b/src/CodeGeneration/exprRewrite.jl index fc389b54..fe3a9928 100644 --- a/src/CodeGeneration/exprRewrite.jl +++ b/src/CodeGeneration/exprRewrite.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= Expr-level equation rewriting. Operates directly on Julia Expr trees instead of the old Symbolics round-trip. diff --git a/src/CodeGeneration/iMTKGen.jl b/src/CodeGeneration/iMTKGen.jl index 39876e40..00b54ed6 100644 --- a/src/CodeGeneration/iMTKGen.jl +++ b/src/CodeGeneration/iMTKGen.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= iMTKGen.jl — in-backend MTK path: reuses generateMTKCode and the generated module's `simulateFromBuild`. Builds + runs structural_simplify in the backend at translate time and caches the raw build tuple; simulate remakes the diff --git a/src/CodeGeneration/modelicaBuiltins.jl b/src/CodeGeneration/modelicaBuiltins.jl index df8077b9..38877e99 100644 --- a/src/CodeGeneration/modelicaBuiltins.jl +++ b/src/CodeGeneration/modelicaBuiltins.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= Modelica built-in function implementations for Julia code generation. diff --git a/src/CodeGeneration/mtkDump.jl b/src/CodeGeneration/mtkDump.jl index 137c8655..549d05e2 100644 --- a/src/CodeGeneration/mtkDump.jl +++ b/src/CodeGeneration/mtkDump.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= MTKDump — MTK-stage dump helpers. diff --git a/src/CodeGeneration/structuralCallbacks.jl b/src/CodeGeneration/structuralCallbacks.jl index 52ea9f4e..299c776f 100644 --- a/src/CodeGeneration/structuralCallbacks.jl +++ b/src/CodeGeneration/structuralCallbacks.jl @@ -1,34 +1,37 @@ -#= -# This file is part of OpenModelica. -# -# Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), -# c/o Linköpings universitet, Department of Computer and Information Science, -# SE-58183 Linköping, Sweden. -# -# All rights reserved. -# -# THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -# THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. -# ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -# RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -# ACCORDING TO RECIPIENTS CHOICE. -# -# The OpenModelica software and the Open Source Modelica -# Consortium (OSMC) Public License (OSMC-PL) are obtained -# from OSMC, either from the above address, -# from the URLs: http:www.ida.liu.se/projects/OpenModelica or -# http:www.openmodelica.org, and in the OpenModelica distribution. -# GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. -# -# This program is distributed WITHOUT ANY WARRANTY; without -# even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH -# IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. -# -# See the full OSMC Public License conditions for more details. -# - Author: John Tinnerholm, john.tinnerholm@liu.se -=# +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# """ Creates the structural callbacks diff --git a/src/FrontendUtil/AbsynUtil.jl b/src/FrontendUtil/AbsynUtil.jl index 5fe7c89c..db79e990 100644 --- a/src/FrontendUtil/AbsynUtil.jl +++ b/src/FrontendUtil/AbsynUtil.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + module AbsynUtil using MetaModelica diff --git a/src/FrontendUtil/FrontendUtil.jl b/src/FrontendUtil/FrontendUtil.jl index fabf2b3c..c3b553ba 100644 --- a/src/FrontendUtil/FrontendUtil.jl +++ b/src/FrontendUtil/FrontendUtil.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + module FrontendUtil import Absyn diff --git a/src/FrontendUtil/Prefix.jl b/src/FrontendUtil/Prefix.jl index 211c988c..06d2efd8 100644 --- a/src/FrontendUtil/Prefix.jl +++ b/src/FrontendUtil/Prefix.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + module Prefix using MetaModelica diff --git a/src/FrontendUtil/Util.jl b/src/FrontendUtil/Util.jl index 07a3d246..d81c83ed 100644 --- a/src/FrontendUtil/Util.jl +++ b/src/FrontendUtil/Util.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + module Util import Absyn diff --git a/src/OMBackend.jl b/src/OMBackend.jl index 781b7e7f..a50d1f0c 100644 --- a/src/OMBackend.jl +++ b/src/OMBackend.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,21 +7,25 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * diff --git a/src/Runtime/Runtime.jl b/src/Runtime/Runtime.jl index 651eb98d..074b5a5d 100644 --- a/src/Runtime/Runtime.jl +++ b/src/Runtime/Runtime.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# #= Simulation runtime implemented based on the integrator interface from DifferentialEquations.jl. diff --git a/src/Runtime/RuntimeUtil.jl b/src/Runtime/RuntimeUtil.jl index 6d512d23..d4101bb8 100644 --- a/src/Runtime/RuntimeUtil.jl +++ b/src/Runtime/RuntimeUtil.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + module RuntimeUtil import Absyn diff --git a/src/Runtime/reconfiguration.jl b/src/Runtime/reconfiguration.jl index 10aa2ecb..11fc369a 100644 --- a/src/Runtime/reconfiguration.jl +++ b/src/Runtime/reconfiguration.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + function reconfiguration() #= Rerun OCC algorithms. diff --git a/src/SimulationCode/SimulationCode.jl b/src/SimulationCode/SimulationCode.jl index 204ca32d..419a79a6 100644 --- a/src/SimulationCode/SimulationCode.jl +++ b/src/SimulationCode/SimulationCode.jl @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# """ File: SimulationCode.jl diff --git a/src/SimulationCode/simCodeAlgorithmic.jl b/src/SimulationCode/simCodeAlgorithmic.jl index d51b9d85..82447d74 100644 --- a/src/SimulationCode/simCodeAlgorithmic.jl +++ b/src/SimulationCode/simCodeAlgorithmic.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + abstract type ModelicaFunction end struct MODELICA_FUNCTION <: ModelicaFunction diff --git a/src/SimulationCode/simCodeCheck.jl b/src/SimulationCode/simCodeCheck.jl index b191a5cc..c0c9fd97 100644 --- a/src/SimulationCode/simCodeCheck.jl +++ b/src/SimulationCode/simCodeCheck.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= simCodeCheck.jl diff --git a/src/SimulationCode/simCodeData.jl b/src/SimulationCode/simCodeData.jl index d87a8ea5..48883b73 100644 --- a/src/SimulationCode/simCodeData.jl +++ b/src/SimulationCode/simCodeData.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= TODO: Remove DAE structure from this file s.t simcode can stand alone. diff --git a/src/SimulationCode/simCodeDump.jl b/src/SimulationCode/simCodeDump.jl index a3c216ca..5816496c 100644 --- a/src/SimulationCode/simCodeDump.jl +++ b/src/SimulationCode/simCodeDump.jl @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# using DataStructures """ diff --git a/src/SimulationCode/simCodeExpBridge.jl b/src/SimulationCode/simCodeExpBridge.jl index d58105ab..ab8b4fae 100644 --- a/src/SimulationCode/simCodeExpBridge.jl +++ b/src/SimulationCode/simCodeExpBridge.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= Phase 4 SimCode-Exp infrastructure (additive). The SimCode-native `Exp` hierarchy is defined in `simCodeData.jl`. diff --git a/src/SimulationCode/simCodeFunctions.jl b/src/SimulationCode/simCodeFunctions.jl index 92190207..f4dddd99 100644 --- a/src/SimulationCode/simCodeFunctions.jl +++ b/src/SimulationCode/simCodeFunctions.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# #= The code in this file is used to convert frontend functions to a definition that can be used by the backend, and the code generators there. diff --git a/src/SimulationCode/simCodeStructureTypes.jl b/src/SimulationCode/simCodeStructureTypes.jl index 6adca91b..e44885e8 100644 --- a/src/SimulationCode/simCodeStructureTypes.jl +++ b/src/SimulationCode/simCodeStructureTypes.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= simCodeStructureTypes.jl SimCode-native type representation. `DAE.Type` carries frontend/back-end baggage diff --git a/src/SimulationCode/simCodeStructureUtil.jl b/src/SimulationCode/simCodeStructureUtil.jl index a98f69a3..fc0d9f07 100644 --- a/src/SimulationCode/simCodeStructureUtil.jl +++ b/src/SimulationCode/simCodeStructureUtil.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= simCodeStructureUtil.jl Conversion / projection machinery and the DAE-wrapping boundary constructors diff --git a/src/SimulationCode/simCodeTraverse.jl b/src/SimulationCode/simCodeTraverse.jl index e3ef13ed..db5a62df 100644 --- a/src/SimulationCode/simCodeTraverse.jl +++ b/src/SimulationCode/simCodeTraverse.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= SIM-Exp-native tree traversal primitives. Mirrors `FrontendUtil.Util.traverseExpTopDown` / `traverseExpBottomUp` but diff --git a/src/SimulationCode/simCodeUtil.jl b/src/SimulationCode/simCodeUtil.jl index 7b38d2b5..ffa368d2 100644 --- a/src/SimulationCode/simCodeUtil.jl +++ b/src/SimulationCode/simCodeUtil.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + #= This file contains various utility functions related to simulation code. =# diff --git a/src/SimulationCode/simulationCodeTransformation.jl b/src/SimulationCode/simulationCodeTransformation.jl index 90085fbd..ae954fc0 100644 --- a/src/SimulationCode/simulationCodeTransformation.jl +++ b/src/SimulationCode/simulationCodeTransformation.jl @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# """ Converts the variable type in the backend DAE to the corresponding simulation code type. diff --git a/src/backendAPI.jl b/src/backendAPI.jl index cfe2b791..222f06ec 100644 --- a/src/backendAPI.jl +++ b/src/backendAPI.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# using MetaModelica using ExportAll diff --git a/src/backendUtils.jl b/src/backendUtils.jl index 080247bc..474df5bb 100644 --- a/src/backendUtils.jl +++ b/src/backendUtils.jl @@ -1,3 +1,38 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + """ ``` debugWrite(filename::String, data::String) diff --git a/src/globalConstants.jl b/src/globalConstants.jl index e69de29b..4341c896 100644 --- a/src/globalConstants.jl +++ b/src/globalConstants.jl @@ -0,0 +1,35 @@ +#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), +* c/o Linköpings universitet, Department of Computer and Information Science, +* SE-58183 Linköping, Sweden. +* +* All rights reserved. +* +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. +* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. +* +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL +* +* This program is distributed WITHOUT ANY WARRANTY; without +* even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH +* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. +* +* See the full OSMC Public License conditions for more details. +* +*/ =# + diff --git a/src/util.jl b/src/util.jl index cb75e80a..648f7db3 100644 --- a/src/util.jl +++ b/src/util.jl @@ -1,4 +1,4 @@ -#= +#= /* * This file is part of OpenModelica. * * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), @@ -7,27 +7,31 @@ * * All rights reserved. * -* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR -* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. +* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF AGPL VERSION 3 LICENSE OR +* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES -* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, -* ACCORDING TO RECIPIENTS CHOICE. +* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL +* VERSION 3, ACCORDING TO RECIPIENTS CHOICE. +* +* The OpenModelica software and the OSMC (Open Source Modelica Consortium) +* Public License (OSMC-PL) are obtained from OSMC, either from the above +* address, from the URLs: +* http://www.openmodelica.org or +* https://github.com/OpenModelica/ or +* http://www.ida.liu.se/projects/OpenModelica, +* and in the OpenModelica distribution. * -* The OpenModelica software and the Open Source Modelica -* Consortium (OSMC) Public License (OSMC-PL) are obtained -* from OSMC, either from the above address, -* from the URLs: http:www.ida.liu.se/projects/OpenModelica or -* http:www.openmodelica.org, and in the OpenModelica distribution. -* GNU version 3 is obtained from: http:www.gnu.org/copyleft/gpl.html. +* GNU AGPL version 3 is obtained from: +* https://www.gnu.org/licenses/licenses.html#GPL * * This program is distributed WITHOUT ANY WARRANTY; without -* even the implied warranty of MERCHANTABILITY or FITNESS +* even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * -=# +*/ =# #= This file contains utility macros used by the backend.