Skip to content

Commit

Permalink
Updates to v1.22.0 documentation (#11439)
Browse files Browse the repository at this point in the history
* Updated UsersGuide porting guide regarding expression subscripting

* Updated information about encryption. (#11438)
  • Loading branch information
casella committed Oct 28, 2023
1 parent 2036284 commit 65a01d6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
38 changes: 29 additions & 9 deletions doc/UsersGuide/source/encryption.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@ OpenModelica Encryption

The encryption module allows the library developers to encrypt their libraries
for different platforms. Note that you need a special version of OpenModelica
with encryption support. Contact us if you want one.
with encryption support to do that, which is only released in binary form. This
version contains an OpenModelica-specific private key that is used internally
to decrypt the encrypted libraries for code generation only, not for display
purposes.

If you are a library developer and are interested in distributing your library
in encrypted form for use with OpenModelica, please contact us for further
information. Please note that distributing the special version of OpenModelica
with encryption support to the users of your library requires you to be a Level
2 member of the Open Source Modelica Consortium.

If you are a user of an encrypted library that is supported by OpenModelica,
please contact your library supplier for information on how to get the special
version of OpenModelica that runs it.

Encrypting the Library
----------------------
Expand All @@ -29,12 +42,19 @@ from the mos script or from **OMEdit** `File > Load Encrypted Package`.
Notes
-----

- There is no license management and obfuscation of the generated code and
files. However just a basic encryption and decryption is supported along with
full support for protection access annotation as defined in
Modelica specification 18.9. This means that anyone who has an OpenModelica
version with encryption support can encrypt or decrypt files.

- OpenModelica encryption is based on
- Encryption support in OpenModelica does not include any license management,
i.e., restricting the usage of a certain libraries based on some conditions,
e.g., having paid a fee. It is only meant to prevent end users from seeing
the Modelica source code of the encrypted parts of the libraries, for reasons
of confidentiality or IP protection.
- The parts of the library that are protected by encryption are specified
by the access control annotations defined by the Modelica Language Specification,
`Section 18.9 <https://specification.modelica.org/maint/3.6/annotations.html#access-control-to-protect-intellectual-property>`_.
- The generated C code corresponding to the encrypted parts of the library is
obfuscated: all comments are removed, and all component names are replaced by
generic names such as n1, n2, n3, etc. This prevents easy reverse-engineering
of the encrypted library starting from generated simulation code.
- Encryption in OpenModelica is based on the
`SEMLA (Standardized Encryption of Modelica Libraries and Artifacts) <https://github.com/modelon-community/SEMLA>`_
module from Modelon AB.
module from Modelon AB, which provides a tool-independent framework for Modelica
library encryption.
8 changes: 5 additions & 3 deletions doc/UsersGuide/source/porting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ and should be fixed by putting the variable *z* in the protected section:
Subscripting of expressions
---------------------------

There is a proposal of allowing expression subscripting, e.g.
Some libraries use expression subscripting, e.g.

.. code-block:: modelica
Expand All @@ -289,8 +289,10 @@ There is a proposal of allowing expression subscripting, e.g.
end M;
This construct is already accepted by some Modelica tools, but is not yet
included in the current Modelica specification 3.5, nor even in the current working
draft of 3.6, so it is not currently supported by OpenModelica.
included in the current Modelica Specification 3.6, so it is not supported
in OpenModelica up to version 1.22.0. It has now been included in the draft
for the 3.7 language specification, so it will be implemented in the future
also by OpenModelica.

Incomplete specification of initial conditions
----------------------------------------------
Expand Down

0 comments on commit 65a01d6

Please sign in to comment.