- Implemented Expression.applyShallow. - Moved some traversal utility functions to the modules for the types they traverse, i.e. ComponentRef, Call, etc. - Moved Expression.ClockKind and its functions to a separate file. - Fixed apply for typed reductions, which would only apply the function to the default and fold expressions without traversing into them.
- When doing branch selection on if-expressions where the branches have different dimensions, also do branch selection on the type of the if-expression.
- Pass the scalarize flag as a bool where it's needed instead of looking up the value of the flag over and over. - Split the array vectorization off to a separate function to make the code cleaner and avoid having to check whether to run the code for every array element. - Simplify binding handling in Flatten.flattenClass.
[NF] Fix subscripting of boxed/unboxed expressions.
- Handle boxed types in Type.subscript. - Add assertion in Type.subscript to catch unhandled types. - Add special rules for unboxed/boxed values in Expression.applySubscript that subscripts the expressions they contain instead of creating unnecessary SUBSCRIPTED_EXPs.
MinGW & other minor fixes - more homogenous handling of LINK_SUNDIALS_STATIC for ida_solver, cvode_solver and radau - signal that we link with static fmilib in FMICommon.h (define FMILIB_STATIC_LIB_ONLY) - more debugging in testsuite/simulation/libraries/common/ModelTesting.mos - change Util.absoluteOrRelative to check for the relative path and if it doesn't exist return the original path to generate better error messages
Handle preExp and varDecls for crefs with subs. (#923)
* Handle preExp and varDecls for crefs with subs.
- We used to throw away any extra expressions and variable declarations needed for it, i.e., if it has some complicated subscript that can not be generated inline.
- If you are sure you have a path (a cref with no subs) then you can use contextCrefNoPrevExp (e.g variable names are just paths. They are just represented as cref). Otherwise contextCref now needs a preEx and varDecls buffer passed to it.
* Fix wrong ordering of buffer arguments.
* Avoid unnecessary code generation.
- This fixes ticket:5994.
- The path we took for crefs with subscripts in function context used to create unnecessary temporaries and exps which we did not notice because they were were thrown away after being created.
- Split up the function to take different paths for normal and parallel functions.
[OSX] Check dylib and binaries for relative paths (#916)
* Check dylib and binaries for relative paths * Fix dylib IDs, rpath, etc in various places * Add sanity check for OMEdit (OSX only; check that OMEdit --help works)
add some sanity checks for CI/Build MINGW - make sure the compiler can build and simulate a simple model with C, C++ and that an FMU can be build - check that linearization works (for matlab) - check that OMEdit can start (not missing any dlls) - add a script to test the sanity, don't build it on the fly as escaping in Windows is alien technology - build more stuff in parallel for mingw/msvc (via all-runtimes target)
fix crash when displaying an error message to test: - git clone https://github.com/OpenModelica/BUAVSystem.git - build model: BUAVSystem.Examples.ValidationCases.IntegratedSystemValidationMar6 - crashes in: RemoveSimpleEquations.mo:3156 because "str "is defined only on one branch
- Added comments for record handling template functions.
- Removed generation of unused record utility function `recordCopyFromVars` which was used to assign to 'record' in simulation contexts. Assigning to record in simulation context is now handled by splitting the assignment (recursively) to each element instead.