From 3f456ec83222803f3bdd0c4fec32b3553f080875 Mon Sep 17 00:00:00 2001 From: SVAGEN26 Date: Thu, 2 Jul 2026 20:35:53 +0200 Subject: [PATCH 1/2] CI: add Julia license-header check + bring src headers to OSMC-PL 1.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rebuilt on current master (the previous branch was based on a pre-dev-fix OMBackend, so master's src — including the new src/precompile.jl from #77 — was never brought to standard, and the license check failed on the merge). - .github/workflows/check-license.yml: runs check_julia_license.py on src per PR. - .CI/scripts/check_julia_license.py: the checker (Julia #= =# headers, OSMC-PL 1.8 + current year), plus julia-license-exceptions.txt. - .gitignore: negate /.CI/ (the `/.*` rule was silently excluding it). - Bring all 51 src/*.jl to the OSMC-PL 1.8 header (was a mix of missing and 1.2). src/CodeGeneration/mtkExternals.jl is excluded — vendored MIT ModelingToolkit code — and left untouched. Verified: check_julia_license.py --summary src -> PASSED (51 checked, 1 skipped). All modified .jl files still parse under Julia 1.12. Co-authored-by: JKRT Co-authored-by: Claude Opus 4.8 --- .CI/scripts/.gitignore | 1 + .CI/scripts/check_julia_license.py | 326 ++++++++++++++++++ .CI/scripts/julia-license-exceptions.txt | 9 + .github/workflows/check-license.yml | 0 .gitignore | 1 + 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/precompile.jl | 35 ++ src/util.jl | 30 +- 56 files changed, 1783 insertions(+), 290 deletions(-) create mode 100644 .CI/scripts/.gitignore create mode 100644 .CI/scripts/check_julia_license.py create mode 100644 .CI/scripts/julia-license-exceptions.txt create mode 100644 .github/workflows/check-license.yml diff --git a/.CI/scripts/.gitignore b/.CI/scripts/.gitignore new file mode 100644 index 00000000..c18dd8d8 --- /dev/null +++ b/.CI/scripts/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/.CI/scripts/check_julia_license.py b/.CI/scripts/check_julia_license.py new file mode 100644 index 00000000..55c15945 --- /dev/null +++ b/.CI/scripts/check_julia_license.py @@ -0,0 +1,326 @@ +#!/usr/bin/env python3 +""" +Check that Julia source files (.jl) carry the OSMC-PL 1.8 license header and an +up-to-date copyright year. + +This is the Julia counterpart of OpenModelica's `check_runtime_license.py`. Julia +license headers live in a leading block comment `#= ... =#` (the OpenModelica +projects open it as `#= /* ... */ =#`). Only "normal" (non-runtime) headers are +relevant here, so the rules are: + + * the header must contain "This file is part of OpenModelica." + * the header must contain "OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8" + * the copyright end-year must be the current year. + +Usage: + check_julia_license.py [--root ROOT] [--exceptions FILE] + [--update-year] [--fix-license] [--summary] DIRS... + +Arguments: + DIRS One or more directories to check (relative to ROOT), e.g. `src`. + --root ROOT Repository root (default: directory of this script + "/../.."). + --exceptions FILE + Path to the exception list (default: next to this script, + julia-license-exceptions.txt). Files listed there are skipped — + use it for sources under a different license (e.g. vendored MIT + code). + --update-year Update copyright end-year to the current year. + --fix-license Replace wrong/missing headers with the correct OSMC-PL 1.8 one. + --summary Print a one-line summary even when there are no errors. + +Exit codes: + 0 All files pass (or all failures were fixed with --fix-license). + 1 One or more files fail. + +Exception-list format (one entry per line, evaluated in order, last match wins — +same semantics as .gitignore): + # comments and blank lines are ignored + path/relative/to/ROOT exact file or directory (excluded) + glob/pattern/**/*.jl fnmatch glob relative to ROOT (excluded) + !path/relative/to/ROOT negation — re-includes a previously excluded path +""" + +from __future__ import annotations + +import argparse +import fnmatch +import os +import re +import sys +from datetime import datetime +from pathlib import Path +from typing import Iterable + +CURRENT_YEAR: int = datetime.now().year + +NORMAL_FILE_MARK = "This file is part of OpenModelica." + +# "Copyright (c) YYYY" or "Copyright (c) YYYY-YYYY" (case-insensitive). +_COPYRIGHT_RE = re.compile(r"[Cc]opyright\s+\(c\)\s+(\d{4})(?:-(\d{4}))?", re.IGNORECASE) +# Exactly OSMC-PL version 1.8. +_OSMC_PL_1_8_RE = re.compile(r"OSMC PUBLIC LICENSE \(OSMC-PL\) VERSION 1\.8") +# Any OSMC-PL version. +_OSMC_PL_ANY_RE = re.compile(r"OSMC PUBLIC LICENSE \(OSMC-PL\)") + +JULIA_EXTS = frozenset({".jl"}) + +# Canonical Julia OSMC-PL 1.8 header (matches the existing house style, which opens +# the Julia block comment and nests a C-style banner: `#= /* ... */ =#`). +OSMC_PL_1_8_LICENSE_TEXT_JL = f"""#= /* +* This file is part of OpenModelica. +* +* Copyright (c) 1998-{CURRENT_YEAR}, 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. +* +*/ =#""" + +HEADER_READ_BYTES = 4096 + + +def _file_ext(filename: str) -> str: + return os.path.splitext(os.path.basename(filename))[1].lower() + + +def _is_license_block(block: str) -> bool: + lower = block.lower() + return "copyright" in lower or "osmc" in lower or "license" in lower + + +def extract_header(content: str) -> str: + """Return the leading Julia `#= ... =#` license block, or leading `#` lines.""" + pos = 0 + while True: + start = content.find("#=", pos) + if start == -1: + break + end = content.find("=#", start + 2) + if end == -1: + break + block = content[start : end + 2] + if _is_license_block(block): + return block + pos = end + 2 + # Fallback: a run of leading `#` line comments. + lines: list[str] = [] + for line in content.splitlines(): + s = line.strip() + if s.startswith("#") or s == "": + lines.append(line) + else: + break + return "\n".join(lines) + + +def load_exceptions(exc_path: str | None) -> list[str]: + if not exc_path or not os.path.exists(exc_path): + return [] + patterns: list[str] = [] + with open(exc_path, encoding="utf-8") as fh: + for line in fh: + line = line.strip() + if line and not line.startswith("#"): + patterns.append(line) + return patterns + + +def _matches_pattern(rel: str, pattern: str) -> bool: + pat = pattern.rstrip("/") + if rel == pat or rel.startswith(pat + "/"): + return True + if fnmatch.fnmatch(rel, pattern): + return True + if fnmatch.fnmatch(os.path.basename(rel), pattern): + return True + return False + + +def is_excluded(rel_path: str, patterns: Iterable[str]) -> bool: + rel = rel_path.replace(os.sep, "/") + excluded = False + for pattern in patterns: + if pattern.startswith("!"): + if _matches_pattern(rel, pattern[1:]): + excluded = False + elif _matches_pattern(rel, pattern): + excluded = True + return excluded + + +def _replace_license_header(filepath: str, content: str) -> bool: + """Replace a leading `#= ... =#` license block, or prepend the header.""" + new_header = OSMC_PL_1_8_LICENSE_TEXT_JL.strip() + pos = 0 + while True: + start = content.find("#=", pos) + if start == -1: + break + end = content.find("=#", start + 2) + if end == -1: + break + block = content[start : end + 2] + if _is_license_block(block): + before = content[:start] + after = content[end + 2 :] + remaining = (before + after).lstrip("\n") + new_content = new_header + "\n\n" + remaining + with open(filepath, "w", encoding="utf-8") as fh: + fh.write(new_content) + return True + pos = end + 2 + with open(filepath, "w", encoding="utf-8") as fh: + fh.write(new_header + "\n\n" + content) + return True + + +def _update_copyright_year(filepath: str, content: str) -> bool: + m = _COPYRIGHT_RE.search(content) + if not m: + return False + start_year = m.group(1) + end_year = int(m.group(2) or m.group(1)) + if end_year == CURRENT_YEAR: + return False + new_text = f"Copyright (c) {start_year}-{CURRENT_YEAR}" + new_content = content[: m.start()] + new_text + content[m.end() :] + with open(filepath, "w", encoding="utf-8") as fh: + fh.write(new_content) + return True + + +def _copyright_year_errors(filepath: str, content: str, fix_year: bool) -> list[str]: + m = _COPYRIGHT_RE.search(content) + if not m: + return ["copyright year not found"] + end_year = int(m.group(2) or m.group(1)) + if end_year == CURRENT_YEAR: + return [] + err = f"copyright year out of date ({end_year}, expected {CURRENT_YEAR})" + if fix_year and _update_copyright_year(filepath, content): + return [err + " [FIXED]"] + return [err] + + +def check_file(filepath: str, fix_year: bool, fix_license: bool) -> list[str]: + try: + with open(filepath, encoding="utf-8", errors="replace") as fh: + content = fh.read() + except OSError as exc: + return [f"cannot read file: {exc}"] + + header = extract_header(content[:HEADER_READ_BYTES]) + has_osmc_pl_1_8 = bool(_OSMC_PL_1_8_RE.search(header)) + has_osmc_pl_any = bool(_OSMC_PL_ANY_RE.search(header)) + has_normal_mark = NORMAL_FILE_MARK in header + + errors: list[str] = [] + if has_osmc_pl_1_8 and has_normal_mark: + errors.extend(_copyright_year_errors(filepath, content, fix_year)) + else: + if not has_osmc_pl_any: + errors.append("missing OSMC-PL 1.8 license header") + elif not has_osmc_pl_1_8: + errors.append("wrong OSMC-PL version: expected 1.8") + else: # has 1.8 but not the "part of OpenModelica" mark + errors.append('missing "This file is part of OpenModelica." mark') + if fix_license and _replace_license_header(filepath, content): + errors[-1] += " [FIXED]" + return errors + + +def iter_source_files(root: Path, check_dirs: list[Path]) -> Iterable[Path]: + for rel_dir in check_dirs: + abs_dir = root.joinpath(rel_dir) + if not abs_dir.is_dir(): + print(f"WARNING: directory not found: {abs_dir}", file=sys.stderr) + continue + for dirpath, dirnames, filenames in os.walk(abs_dir): + dirnames[:] = sorted(d for d in dirnames if not d.startswith(".")) + for fn in sorted(filenames): + if _file_ext(fn) in JULIA_EXTS: + yield Path(dirpath).joinpath(fn) + + +def parse_args() -> argparse.Namespace: + script_dir = os.path.dirname(os.path.abspath(__file__)) + default_root = os.path.normpath(os.path.join(script_dir, "..", "..")) + default_exc = os.path.join(script_dir, "julia-license-exceptions.txt") + + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("dirs", metavar="DIR", nargs="+", help="Directories to check, relative to ROOT.") + parser.add_argument("--root", default=default_root, help="Repository root (default: %(default)s).") + parser.add_argument("--exceptions", default=default_exc, metavar="FILE", help="Exception list file (default: %(default)s).") + parser.add_argument("--update-year", action="store_true", help=f"Update copyright end-year to {CURRENT_YEAR}.") + parser.add_argument("--fix-license", action="store_true", help="Replace wrong/missing headers with the OSMC-PL 1.8 header.") + parser.add_argument("--summary", action="store_true", help="Always print a summary line.") + return parser.parse_args() + + +def main() -> int: + args = parse_args() + root = Path(args.root) + dirs = [Path(p) for p in args.dirs] + exceptions = load_exceptions(args.exceptions) + + failures: list[tuple[str, list[str]]] = [] + checked = 0 + skipped = 0 + + for abspath in iter_source_files(root, dirs): + rel = str(abspath.relative_to(root)).replace(os.sep, "/") + if is_excluded(rel, exceptions): + skipped += 1 + continue + checked += 1 + errs = check_file(str(abspath), args.update_year, args.fix_license) + if errs: + failures.append((rel, errs)) + + unfixed_count = 0 + for rel, errs in failures: + for err in errs: + if err.endswith(" [FIXED]"): + print(f"FIXED {rel}: {err[:-8]}") + else: + unfixed_count += 1 + print(f"FAIL {rel}: {err}") + + if args.summary or failures: + fixed_count = sum(1 for _, errs in failures for e in errs if e.endswith(" [FIXED]")) + status = "PASSED" if unfixed_count == 0 else "FAILED" + fix_note = f", {fixed_count} fixed" if fixed_count else "" + print(f"\n{status}: checked {checked} files, skipped {skipped} (excluded), {unfixed_count} failures{fix_note}.") + + return 1 if unfixed_count > 0 else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/.CI/scripts/julia-license-exceptions.txt b/.CI/scripts/julia-license-exceptions.txt new file mode 100644 index 00000000..ac4bc69b --- /dev/null +++ b/.CI/scripts/julia-license-exceptions.txt @@ -0,0 +1,9 @@ +# Files excluded from the OSMC-PL 1.8 license-header check. +# Format: gitignore-style paths/globs relative to the repo root. +# Use this list for genuinely foreign-licensed or vendored code that must NOT +# carry the OSMC-PL header. + +# Vendored, slightly-modified ModelingToolkit.jl code under the MIT "Expat" +# License (Copyright (c) 2018-25 Christopher Rackauckas, Julia Computing). +# Keeping its upstream MIT header; must not be stamped with OSMC-PL. +src/CodeGeneration/mtkExternals.jl \ No newline at end of file diff --git a/.github/workflows/check-license.yml b/.github/workflows/check-license.yml new file mode 100644 index 00000000..e69de29b diff --git a/.gitignore b/.gitignore index c5581f04..4fec0488 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,4 @@ flycheck_*.el !/.gitattributes !/.gitignore !/.github/ +!/.CI/ diff --git a/src/Backend/BDAE.jl b/src/Backend/BDAE.jl index cb10554b..eef6bdcb 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 4fae6325..7136230f 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 b8f22a9a..84317154 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 2529a16e..2ee48484 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 c2f9907b..95614f9d 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 a3d2506b..a6dcae65 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 fd401c3c..9d68f40c 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 5ff9e4da..1a545a42 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 da7f1d0a..66a67f21 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 e0e0644f..5f891310 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 98171897..0896a49a 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 5027240c..40be5c4f 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 f77d0def..44440664 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 157e1420..2ce127c5 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 f6ebf956..c7329dd5 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 a20a133e..37f7a330 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 ab2cb71b..6be7d367 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 f39a52aa..48eecd23 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 54500105..48cc85f1 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 5a2bc6b4..4a46d8de 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 e771a4b4..6091dda5 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 a730ed4f..839e802d 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 822bf9e8..58ff4301 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 0afe9034..e131a85a 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 18eee6fd..083df2f9 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 120716eb..962379e8 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 0dbde7e3..2d473210 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 76b7fe41..da3f5bd5 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 addac624..e9134cb3 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 dcef88e5..6b20ef46 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/precompile.jl b/src/precompile.jl index 5cac565e..3f47fa9b 100644 --- a/src/precompile.jl +++ b/src/precompile.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. +* +*/ =# + #= Warm the shared MTK + OrdinaryDiffEq method instances that every generated model module invokes at build/solve time (structural_simplify, the init-solve ODEProblem, and the Rodas5/FBDF mass-matrix solve). The per-model module is diff --git a/src/util.jl b/src/util.jl index a87311a5..e7a1a0a7 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. From 068043d1fafc0f668959ea755bc164efebe22a75 Mon Sep 17 00:00:00 2001 From: SVAGEN26 Date: Thu, 2 Jul 2026 20:59:32 +0200 Subject: [PATCH 2/2] CI: restore check-license.yml (was pushed as a 0-byte file) Co-authored-by: JKRT Co-authored-by: Claude Opus 4.8 --- .github/workflows/check-license.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/check-license.yml b/.github/workflows/check-license.yml index e69de29b..1eb269dd 100644 --- a/.github/workflows/check-license.yml +++ 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