diff --git a/.CI/scripts/.gitignore b/.CI/scripts/.gitignore new file mode 100644 index 0000000..c18dd8d --- /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 0000000..55c1594 --- /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 0000000..ac4bc69 --- /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 0000000..1eb269d --- /dev/null +++ b/.github/workflows/check-license.yml @@ -0,0 +1,23 @@ +name: Check License Headers + +on: + pull_request: + branches: + - master + +jobs: + check-license: + name: Julia license headers + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Check OSMC-PL 1.8 license header present in src + run: | + python3 .CI/scripts/check_julia_license.py --summary src diff --git a/.gitignore b/.gitignore index c5581f0..4fec048 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 cb10554..eef6bdc 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 4fae632..7136230 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 b8f22a9..8431715 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 e8ed257..f6cd566 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 2529a16..2ee4848 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 c2f9907..95614f9 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 a3d2506..a6dcae6 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 c7a81cd..3768a3c 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 6beb96a..966c4f9 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 7f906ab..b792412 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 fd401c3..9d68f40 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 5ff9e4d..1a545a4 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 5a14779..9e6d20c 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 6e8d992..e42fb21 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 da7f1d0..66a67f2 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 568880f..e147fc1 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 e0e0644..5f89131 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 9817189..0896a49 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 5027240..40be5c4 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 b75c6ad..223dfbe 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 f77d0de..4444066 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 fc389b5..fe3a992 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 157e142..2ce127c 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 f6ebf95..c7329dd 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 137c865..549d05e 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 a20a133..37f7a33 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 5fe7c89..db79e99 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 fabf2b3..c3b553b 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 ab2cb71..6be7d36 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 f39a52a..48eecd2 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 5450010..48cc85f 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 5a2bc6b..4a46d8d 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 6d512d2..d4101bb 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 10aa2ec..11fc369 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 204ca32..419a79a 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 d51b9d8..82447d7 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 e771a4b..6091dda 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 a730ed4..839e802 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 822bf9e..58ff430 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 d58105a..ab8b4fa 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 0afe903..e131a85 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 18eee6f..083df2f 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 120716e..962379e 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 0dbde7e..2d47321 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 76b7fe4..da3f5bd 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 addac62..e9134cb 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 dcef88e..6b20ef4 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 080247b..474df5b 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 e69de29..4341c89 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 5cac565..3f47fa9 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 a87311a..e7a1a0a 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.