October 2009 Commit Log

Number of Commits:
50
Number of Active Developers:
5
stebr461 2009-10-30 17:33 Rev.: 4442

- Annotations in between equation items are now preserved in SCode.

49 lines of code changed in 1 file:

sjoelund.se 2009-10-30 17:20 Rev.: 4441

- Force UNIX line endings in the Eclipse editor

3 lines of code changed in 1 file:

stebr461 2009-10-30 16:13 Rev.: 4439

- Comments and annotations on components are now preserved in SCode format

161 lines of code changed in 17 files:

sjoelund.se 2009-10-30 15:54 Rev.: 4438

- Fixed declaring constants like list<Integer> in packages using implicit instantiation

33 lines of code changed in 4 files:

sjoelund.se 2009-10-30 11:01 Rev.: 4437

- Fixed Types.matchSuperType for METARECORD/UNIONTYPE (was moved from Types.subtype to typeConvert)
- Added Uniontype14.mos to check for this bug
- Added 03_symbolicderivative to the default testsuite since it now works in OpenModelica

111 lines of code changed in 10 files:

stebr461 2009-10-30 10:54 Rev.: 4436

- Annotations are now preserved in SCode format in extends clauses

24 lines of code changed in 6 files:

sjoelund.se 2009-10-29 18:02 Rev.: 4435

- mmc_unbox as macros.
- Changed in cevalScript/SimCodegen generation of functions.
- We now generate all metarecords of referenced uniontypes instead of only the ones created by a METARECORDCALL. This is necessary due to the possibility of external functions (lexers/parsers) generating these structures. It kinda worked before, but was a bit of a hack.
- Codegen.getFunctionCalls(exps), etc renamed to getMatchingExps(exps, matchCalls).

949 lines of code changed in 28 files:

stebr461 2009-10-29 15:15 Rev.: 4434

- Missing file from previous commit

103 lines of code changed in 1 file:

stebr461 2009-10-29 15:15 Rev.: 4433

- Comments and annotations in equations are now preserved in SCode format.

129 lines of code changed in 7 files:

Frenkel TUD 2009-10-29 00:37 Rev.: 4432

- improve comments in DALow.

69 lines of code changed in 1 file:

Frenkel TUD 2009-10-28 23:24 Rev.: 4431

- rewrite sign function as macro, add testcase Sign in mosfiles

59 lines of code changed in 6 files:

Frenkel TUD 2009-10-28 18:06 Rev.: 4430

- move sign into utility.c

16 lines of code changed in 3 files:

stebr461 2009-10-28 17:56 Rev.: 4429

- inline annotations are now preserved as a flag in Exp.CALL

361 lines of code changed in 12 files:

adrpo 2009-10-28 16:46 Rev.: 4427

- reverted the changes from revision r4419 as some of the models in the testsuite fail.
- disabled Java testing for now as there are still some problems with it.

6 lines of code changed in 2 files:

Frenkel TUD 2009-10-28 16:01 Rev.: 4426

- implement sign function (maybe another place is better?)

7 lines of code changed in 1 file:

adrpo 2009-10-28 15:48 Rev.: 4425

- new changes by MathCore broke this test as the warning message has changed.

2 lines of code changed in 1 file:

petar 2009-10-28 14:25 Rev.: 4424

-Merged -r 4222 from MathCoreOSMC branch (connect two-dimensional array of components)

43 lines of code changed in 4 files:

sjoelund.se 2009-10-28 12:30 Rev.: 4420

- Changed CevalScript to generate C code that looks more like the simulation code. We now put all the headers before the bodies so we can have cycles in call graphs.

185 lines of code changed in 13 files:

stebr461 2009-10-28 10:12 Rev.: 4419

- Equation annotations are now preserved

11 lines of code changed in 1 file:

stebr461 2009-10-28 09:27 Rev.: 4418

- Fixed encoding issues

10 lines of code changed in 5 files:

sjoelund.se 2009-10-28 07:39 Rev.: 4417

- Hopefully fixes strcmp not returning only {-1,0,1} on some platforms (it messes with the testsuite)

8 lines of code changed in 3 files:

adrpo 2009-10-28 00:12 Rev.: 4415

- due to changes by Martin S. to Compile.bat copying of MinGW to build directory is no longer required!

5 lines of code changed in 1 file:

sjoelund.se 2009-10-27 17:41 Rev.: 4410

- Adding the magical Eclipse-project encoding fix (so Link?ping doesn't turn into UTF-8 whenever a Linux developer commits)

3 lines of code changed in 1 file:

sjoelund.se 2009-10-27 17:23 Rev.: 4409

- Spelling error

1 lines of code changed in 1 file:

sjoelund.se 2009-10-27 17:20 Rev.: 4408

- Adding modelica_java.jar to the repository (so JDK isn't required to compile OpenModelica)
- Adding c_runtime/java_interface to the default make system. (If no JDK is installed, modelica_java.jar is simply copied to /build/...)

29 lines of code changed in 6 files:

stebr461 2009-10-27 16:49 Rev.: 4407

- Annotations are now preserved in SCode format
- make clean now removes .sigx files

187 lines of code changed in 12 files:

sjoelund.se 2009-10-27 15:55 Rev.: 4406

- Fixed f2c.h (2006 release of f2c fixed a 64-bit bug) and matrix.h (used long int* instead of integer* defined in f2c.h)
- 64-bit Linux can now be used to pass all testcases

131 lines of code changed in 14 files:

sjoelund.se 2009-10-27 13:23 Rev.: 4405

- JarCreator: Transforms backslashes of paths in zip-files to frontslashes. That way both javac.exe and java.exe work properly in Windows.
- testsuite/java/JavaExt.java: Escape the string so backslashes are parsed by OpenModelica.
- testsuite/{java,records}/rtest: Changed to an rtest that is not parallelized since Windows dll's hate that. (Also updated the mos-files since the old one requires // endResult
- testsuite/java/Makefile: Better Windows-support using JAVA_HOME
- c_runtime/java_interface/Makefile*: Better Windows-support using JAVA_HOME

691 lines of code changed in 17 files:

adrpo 2009-10-27 10:08 Rev.: 4402

- made parser/walker/Absyn.mo/Dump.mo to handle failure and equality in the algorithm section
- do not dive into DERIVED classes when querying internal classes in Interactive.mo;
is not correct to dive into derived classes and if we do then we run into stack overflow;
Example: lookup of Env.Env in Env.Env.

69 lines of code changed in 5 files:

adrpo 2009-10-27 07:55 Rev.: 4401

- merged revision 4399 from branches/MathCoreOSMC

Revision: 4399
Author: otto@mathcore.com
Date: 18:14:37, den 26 oktober 2009
Message:
Switched to using CRITICAL_SECTION instead mutexes on windows since it is quicker.
----
Modified : /branches/MathCoreOSMC/Compiler/runtime/corbaimpl.cpp
Modified : /branches/MathCoreOSMC/Compiler/runtime/omc_communication_impl.cpp

11 lines of code changed in 2 files:

Frenkel TUD 2009-10-27 00:07 Rev.: 4400

- sort non scalar variables and known variables befor indexcalculation; aim: code generation write all elements from the non scalar variable in one memory block

585 lines of code changed in 1 file:

sjoelund.se 2009-10-26 16:47 Rev.: 4397

- Fixed the testsuite Makefile (missed a backslash at the end)
- Merged getDefinitions Interactive API function from the Bootstrapping branch
- Fixed some of the Java-related issues OMC has in Windows (don't try to fprintf to stderr before calling abort() - in Windows the string will not get printed)
- It will be necessary to set JAVA_HOME to a JDK if you want to run the java testsuite in Windows. If you call "java" directly, it will load Java from system32, which is a JRE and not a JDK (which means you can't call javac from it). Why Sun decided to install both JRE and JDK by default when downloading a JDK, I do not know.

439 lines of code changed in 14 files:

sjoelund.se 2009-10-26 10:14 Rev.: 4393

- Using Ceval.cevalCallFunction record constructor instead of cevalFunction
- Enabled testsuite/records as a default test to run as it now works

16 lines of code changed in 5 files:

adrpo 2009-10-26 00:46 Rev.: 4392

- due to the connect changes these tests needed update

4 lines of code changed in 3 files:

adrpo 2009-10-26 00:40 Rev.: 4391

- merged latest modifications from branches/MathCoreOSMC

Revision: 4385
Author: bjozac
Date: 11:48:50, den 23 oktober 2009
Message:
Added support for un-connected arrays of connectors
a.b_connector[:].c
This did not generate zero equations for flow variables.
----
Modified : /branches/MathCoreOSMC/Compiler/Connect.mo
Modified : /branches/MathCoreOSMC/Compiler/Env.mo

48 lines of code changed in 2 files:

adrpo 2009-10-26 00:19 Rev.: 4390

- delete the .sigx files on clean otherwise another build will fail.

3 lines of code changed in 2 files:

adrpo 2009-10-25 22:35 Rev.: 4389

- added quotes around $OPENMODELICAHOME/include as otherwise includes doesn't work.

2 lines of code changed in 1 file:

Frenkel TUD 2009-10-24 14:58 Rev.: 4388

- Bugfix Build with MSVC

10 lines of code changed in 2 files:

sjoelund.se 2009-10-23 16:14 Rev.: 4387

- Updated the Makefiles to only run rml2sig/rmldep-new.sh if the file changes (the .sig-file does not always update in order to avoid re-compiling all files depending on the source unless the interface changes). We now also generate a dummy .sigx file which only tells us when rmldep was last run. If you change a lot of files (over time, lots of re-compilations), but never change the function interfaces, this can reduce the compile time by over a minute.

14 lines of code changed in 6 files:

sjoelund.se 2009-10-23 15:42 Rev.: 4386

- Enabled the MetaModelica testsuite by default since the tests now work (even in Windows)
- Merged Bootstrapping branch Revision: 4372 "Some changes for polymorphic function references"
- Inst.addComponentsToEnv: Re-added capability for TCOMPLEX types to be instantiated
- Inst.instEquation2: Added capability for equation-matching of MetaModelica types (needed because record modifications bind the result using equations)
- Types.valuesToMods: Uses typeofValue and valueExp when converting records (they handle metarecords as well)
- Added instructions for the MetaModelica Course

361 lines of code changed in 49 files:

sjoelund.se 2009-10-21 12:30 Rev.: 4382

- Added the new MetaModelica course exercise 00_simplesim to the MetaModelicaDev folder.

417 lines of code changed in 13 files:

sjoelund.se 2009-10-21 09:41 Rev.: 4381

- Added Eclipse projects for the MetaModelicaDev exercises and examples
- Added the working 03_symbolicderivative exercise

2658 lines of code changed in 82 files:

sjoelund.se 2009-10-20 13:46 Rev.: 4380

- Added MetaModelicaDev ex 06 through 11. Modified 03 through 11 to compile and run on latest OMDEV

15014 lines of code changed in 143 files:

sjoelund.se 2009-10-20 10:40 Rev.: 4375

- Renamed the MetaModelicaDev testcases according to the new order in the course

1 lines of code changed in 2 files:

sjoelund.se 2009-10-20 09:41 Rev.: 4373

- Updated the meta/MetaModelicaDev testsuite to also contain Makefiles for RML (01, 02a and 02b so far). RML is still used in the course, but the old zip contains outdated syntax and Makefiles.
- The new RML Makefiles will check whether OMDEV is installed. If it is not, it will assume Linux is used and RML is installed on the path. No more separate Makefile for Linux and Windows.

1126 lines of code changed in 49 files:

sjoelund.se 2009-10-19 14:52 Rev.: 4371

- Fixed MetaModelica crefs to function names containing underscores

4 lines of code changed in 1 file:

sjoelund.se 2009-10-19 14:01 Rev.: 4370

- Merged revisions 3852-4247 of the Bootstrapping branch
- Support for external Java functions
- Typed Java interface to OpenModelica functions using CORBA
- Improved MetaModelica list,tuple,option,uniontype implementations
- MetaModelica matchcontinue expressions
- MetaModelica function references
- Partially evaluated functions
- Improved Record handling
- Improved handling of NORETCALL functions (mainly used in MetaModelica)
- Note that the MetaModelica, Java and Records testcases are not fully working after the merge

Revision: 4347
Author: stebr461
Message:
- Another fix

Revision: 4346
Author: stebr461
Message:
- Fixed the windows makefile

Revision: 4340
Author: stebr461
Message:
- small fix to previous commit

Revision: 4339
Author: stebr461
Message:
- Partially evaluated functions now a separate module

Revision: 4325
Author: sjoelund.se
Message:
- Fixed meta testsuite when using 64-bit Linux

Revision: 4324
Author: sjoelund.se
Message:
- Changed the matchType subsystem. It now passes a function pointer to either matchTypeRegular or matchTypePolymorphic.
- The polymorphic functions that work now are any input, and list,tuple,option,TypeA output.
- Implemented the Builtin list functions using polymorphic types rather than special cases during elaboration.

Revision: 4320
Author: sjoelund.se
Message:
- Added initial support for polymorphic functions. This version doesn't check if the polymorphic type gets bound to another type, or if complex types use polymorphic types within themselves and so on. Further support should be added in Types.matchTypePolymorphic.
- elabCallArgs, etc was extended to pass around PolymorphicBindings; a list of all types that have been bound by the polymorphic function.
- Fixed builtin function clock() (was previosuly only mmc_clock()).
- read_write.c has support added for INT,REAL,etc as input when we expect MMC type.
- The walker was changed to parse replaceable Type_a subtypeof Any to type Type_a = polymorphic<Any> (this fits better internally)

Revision: 4306
Author: sjoelund.se
Message:
- Fixed equation-patterns that look like exp = {true,false}. cref = {true,false} still works as expected.
- Fixed some problems when type aliasing for example type B = list<A>; (07_pam will test this when the complete file is working).

Revision: 4302
Author: sjoelund.se
Message:
- Added the AssignTwoType MetaModelica example. No major issues here, only outdated code (int_real instead of intReal and so on).

Revision: 4299
Author: sjoelund.se
Message:
- Changed simulation_result implementation to use C fprintf instead of C++ iostream. The new implementation is roughly 5 times faster using GCC.

Revision: 4298
Author: sjoelund.se
Message:
- Fixes a bug when pattern matching equations that aren't tuples

Revision: 4297
Author: sjoelund.se
Message:
- Changed unused VALUEBLOCKEQUATIONS to VALUEBLOCKMATCHCASE (contains both algs and equations)
- Moved Patternm.fromEquationsToAlgorithms to Static. They are now translated when the VALUEBLOCK is elaborated since we then have access to the correct environment.

Revision: 4295
Author: sjoelund.se
Message:
- Added support for equation patterns like 2 = 1+1; or 2 = listGet({2},1);
- This uses Static.elabExp within matchcontinue cases. But the local declarations have not been added to the environment. Thus, if you use local variables (very common), the translation from equations to algorithms needs to be performed before we can try to elaborate. I will try to create a new VALUEBLOCK type for matchcontinue cases.

Revision: 4290
Author: sjoelund.se
Message:
- Added support for generating errors and error messages when local variable declarations shadow input/result of a matchcontinue expression

Revision: 4288
Author: sjoelund.se
Message:
Removed ALG_EQUALITY from the walker

Revision: 4284
Author: sjoelund.se
Message:
- Changed the parser to not accept equality(...) for algorithms. It doesn't work in RML, is deprecated, and == already works.
- Changed the parser to accept equality(lhs, rhs) and equality(lhs = rhs) instead of any arbitrary equation
- The walker will translate equality(...) to Absyn.CALL("equality",{lhs,rhs})
- ALG_EQUALITY and EQ_EQUALITY have been removed

Revision: 4281
Author: sjoelund.se
Message:
- Added testcase for the added support of failure(...)
- Fixed issues with builtin list functions not converting arrays like {1} directly

Revision: 4279
Author: sjoelund.se
Message:
- Commented out ALG_FAILURE in walker.g

Revision: 4273
Author: sjoelund.se
Message:
- Added a printAny function in the C runtime for debugging (create an external C function that takes any boxed datatype and apply printAny on it).
- Added the first 3 assignments from the MetaModelica Dev course, as working testcases (01_experiment is disabled by default because looking up constants in packages is very slow right now). They each have their own directory because they supply their own lexers and parsers. They also provide some basic instructions on how to follow the course themselves (make changes to code, type make and see what happens).
- Added ceval for builtin MetaModelica type conversions (intReal, etc).
- Replaced CREF_IDENT("DUMMY__") and CREF_IDENT("WILDCARD__") with CREF_WILD.
- Added code in Patternm to convert EQ_FAILURE to algorithmic code; removed unused Absyn.ALG_FAILURE.
- Updated code for THROW/TRY/CATCH structures in Algorithm/etc.
- Renamed builtin realInteger to realInt (as in RML and the specification).

Revision: 4263
Author: sjoelund.se
Message:
- Added cases for NORETCALL and UNIONTYPE when conveting between DAE.DAE and Exp.DAE

Revision: 4252
Author: sjoelund.se
Message:
- Bugfix for SCode.componentNamesFromElts (when the list contains more than elements; fixes bug in Inst.extractConstantPlusDeps)
- Support for generating the proper list type from a Values.LIST
- Moved the typeConvert (Types.Type to Absyn.TypeSpec) to MetaUtil
- Support for pattern matching of union types and records existing in another package than the one the matchcontinue expression is in
- Static.valueExp: Added cases for METARECORD and LIST
- Types.T_UNIONTYPE now contains a list<Absyn.Path> instead of String
- Types.T_METARECORD now contains no String or Absyn.Path. This is saved in SOME(Absyn.Path) instead

Revision: 4248
Author: stebr461
Message:
- Partially evaluated functions now work with recursive functions.

Revision: 4226
Author: sjoelund.se
Message:
- Fix list constructor to calculate the resulting type better: myTup := (1.0,3.5); {myTup,(1.0,3.5)} {META_TUPLE,TUPLE} -> list<META_TUPLE>
- Some fixes for constants that are using MetaModelica types (ceval->value->exp)
- Started on some builtin array functions

Revision: 4224
Author: sjoelund.se
Message:
- Fixes compilation error when allocating boolean and string arrays

Revision: 4218
Author: sjoelund.se
Message:
- Fix for generating recursive functions (both Modelica and MetaModelica)

Revision: 4217
Author: sjoelund.se
Message:
- Better support for calling NORETCALL functions from Interactive
- Added builtin boolean functions
- Added builtin print,if_exp,tick and clock
- Removed listCar (use listGet instead; it's listed as an actual MetaModelica builtin...)
- Renamed listCdr to listRest, intended to be a builtin list operator
- Added builtin functions for listEmpty and optionNone (renamed; were used for pattern matching but may as well be builtin functions...)

Revision: 4212
Author: sjoelund.se
Message:
- Added MetaModelica builtin Integer operations

Revision: 4211
Author: sjoelund.se
Message:
- Added MetaModelica Builtin Real Operations

Revision: 4210
Author: sjoelund.se
Message:
- Added the MetaModelica builtin String and String Character Conversion operations

Revision: 4209
Author: sjoelund.se
Message:
- Added pattern matching of reals
- Added a few MetaModelica builtin String functions

Revision: 4208
Author: sjoelund.se
Message:
- Type conversion boxes Int,Real,Bool,String when needed (for example when doing listMember(list<Integer>,Integer))
- Added (polymorphic) builtin list functions: listAppend, listReverse, listLength, listMember, listGet, listNth, listDelete. The builtin handler calculates the correct result type.

Revision: 4206
Author: sjoelund.se
Message:
- Added failing testcase MatchCase10

Revision: 4205
Author: sjoelund.se
Message:
- Pattern matching of calls that use mixed positional and named args
- Unboxing of reals

Revision: 4202
Author: sjoelund.se
Message:
- Fixes problems with the SOME(tuple) and tuple::rest constructors

Revision: 4201
Author: sjoelund.se
Message:
- Added support for uniontype calls in matchcontinue pattern matching

Revision: 4199
Author: stebr461
Message:
-Partially evaluated functions now works properly

Revision: 4197
Author: sjoelund.se
Message:
- Added support for pattern matching records (not uniontypes) in matchcontinue expressions
- Added support for case-local variable declarations in matchcontinue expressions

Revision: 4196
Author: sjoelund.se
Message:
- Fixed compilation error in last commit

Revision: 4195
Author: sjoelund.se
Message:
Added better support for NORETCALL functions
Added better type checking for unboxing of boxed datatypes (for example: listCar of list<Integer> using the new builtin handler returns T_BOXED(T_INTEGER), which can be typecast to a regular integer)
Added (better) support for pattern matching of tuple, list and option
- Types.mo: Added T_BOXED and T_NORETCALL
- Added equality operator for boxed datatypes
- listCar/listCdr now check for listEmpty before doing the operation
- Added MetaModelica builtin print
- Added mmc_unbox builtin call
- Algorithm.NORETCALL instead contains an Exp.CALL. This allows it to contain builtin calls

Revision: 4193
Author: adrpo
Message:
- fixed parsing of lists such as: 1::2::3::x.

Revision: 4185
Author: sjoelund.se
Message:
Absyn.ALG_MATCHCASES, Exp.MATCHCASES, Algorithm.MATCHCASES: New expression type that Absyn.MATCHEXP is translated into.
DFA.mo, Patternm.mo: Generates code for the new MATCHCASES datatype. It's designed to use a for-try-switch design of matchcontinue. The C code is a lot simpler than the one used before (state machine with goto and a boolean array to try and track patterns that have already been performed).
CevalScript.cevalInteractiveFunctions: Added setLinker, setLinkerFlags. API calls that allow you to change compiler to g++ (useful when compiling matchcontinue expressions since it uses try/catch).
Codegen.mo: Added String/List equality operators
Static.mo: Added List equality operators
Util.listlistTranspose: "{{1,2,3}{4,5,6}} => {{1,4},{2,5},{3,6}}"
c_runtime/meta_modelica.{c,h}: Added mmc_boxes_equal. Used to compared boxed datatypes (always returns true for now...)

Revision: 4183
Author: sjoelund.se
Message:
- Added expected results for PartialFn{5,6}.mos

Revision: 4176
Author: stebr461
Message:
-First batch of changes for partially evaulated functions
-Main functionality is in SCode.elaborate, which calls a whole barrage of functions in MetaUtil.mo
-elabPartEvalFunction and a case for it added to Static.mo
-Various utility functions added to other modules

Revision: 4173
Author: sjoelund.se
Message:
Added some complicated types/type constructors in testsuite/meta/ComplicatedInteractive.{mo,mos}
{ClassInf,Static}.mo: Added META_RECORD. Rather than having a specialized function in MetaUtil, the regular OpenModelica functions are used to create a METARECORDCALL.
Exp.getFunctionCalls: Added META_TUPLE, META_OPTION to the list of expressions to searchMetaUtil.typeMatching: Changed to return a type instead of a boolean. The function will return the supertype of all other list arguments (before this list(NONE,SOME(1)) resulted in list<NOTYPE> instead of list<Integer>).
Types.mo: Changed some of the matchType-related functions to properly subtype/convert options/lists.

Revision: 4172
Author: sjoelund.se
Message:
runtime/systemimpl.c: Updated to use Values.META_TUPLE
testsuite/java: Updated for the partially working MetaModelica list/tuple
CevalScript.mo: Fixed failtrace
Codegen.generateExpression: META_TUPLE code now generates tuples instead of lists.
Codegen.generateRWType: Generates TYPE_DESC_MMC for LIST and META_TUPLE
Ceval.ceval: Exp.{TUPLE/META_TUPLE} -> Values.META_TUPLE
Interactive.evaluateAlgStmt: Added the possibility to assign results of type T_TUPLE to a variable
MetaUtil.fixMetaTuple: Helper to fix the type when Ceval returns Values.META_TUPLE and you thought the CREF pointed to a Types.T_TUPLE
MetaUtil.mmc_mk_box: New function that creates the correct mmc_mk_box(<n>, ...) or mmc_mk_box<n>(...) depending on the value of <n>
Static.mo: Check type of a Types.Properties using the existing functions instead of PROP(ty, _) = ... This allows us to check for tuples as well.
Types.unparseType, Types.printTypeStr, Types.getAllExpsTt: Added META_TUPLE analogous to TUPLE
Types.matchProp: (T_TUPLE,PROP_TUPLE) -> (T_METATUPLE,PROP)
Types.typeConvert: T_TUPLE->T_METATUPLE
Util.mo: Added listThreadMap32 (3 lists to 2 lists)

Revision: 4161
Author: sjoelund.se
Message:
- Types.mo: Added support to type convert matrices/arrays to lists. This works
for the array constructor as expected, but also allows you to use variables
that are arrays and get them automatically converted to lists (not desired, but
they use identical Exp.Exp and cannot be differentiated).

Revision: 4160
Author: sjoelund.se
Message:
- systemimpl.c: Fixed list copying by doing it in reverse order (and updating
java_interface.c to do the same).
- Types.mo: Added a (very) simple type conversion from ARRAY to LIST. It has
only been tested for one-dimensional arrays so far.
- Ceval.mo: Added ceval for the LIST type.
- It is now possible to call (simple) functions that expect list input using
the Interactive module.

Revision: 4132
Revision: 4132
Author: sjoelund.se
Message:
- Changed Java org.modelica to org.openmodelica

Revision: 4107
Author: sjoelund.se
Message:
- Absyn.ALG_WHEN_A: Changed the name of the field "whenStmt" to "boolExpr"
since it better reflects the function.

Revision: 4106
Author: sjoelund.se
Message:
- Added Exp.TUPLE to ceval (if MetaModelica grammar is activated)

Revision: 4105
Author: sjoelund.se
Message:
- Setting eclipse project default to ISO-8859-1 encoding because the UTF-8
default changes special characters to multi-byte format. This changes .mo files
even if you don't modify the header.

Revision: 4104
Author: sjoelund.se
Message:
- Absyn.ALG_WHILE: Changed the name of the field "whileStmt" to "boolExpr"
since it better reflects its function.

Revision: 4103
Author: sjoelund.se
Message:
* Added testcase/meta/OptionInteractive.mos: Functions with Option type
in/output are now working, as well as any expression returning an Option type
in the Interactive interface.
* Compiler/runtime/systemimpl.c: Values__OPTION to type_desc conversion
* c_runtime/modelica.h: Replaced modelica_uniontype with metamodelica_type
* c_runtime/read_write.h: Replaced {read,write}_modelica_{uniontype,mmc} with
{read,write}_metamodelica_type
* Types.typeConvert: Added placeholder and debug message for T_ARRAY->T_LIST
* Compiler.expTypeStr: Changed from void* and modelica_uniontype to metamodelica_type
* Inst.getUsertypeDimensions: Changed from "option" to "Option"
* Added cases for T_METAOPTION/Exp.META_OPTION
- Types.unparseType
- Types.getAllExpsTt
- Ceval.ceval
- Exp.printExp2Str

Revision: 4102
Author: sjoelund.se
Message:
- Normalized the copyright notice to ISO-8859-10

Revision: 4096
Author: stebr461
Message:
- Added functionality for Absyn.Exp.PARTEVALFUNCTION to the Dump module

Revision: 4095
Author: stebr461
Message:
- Tweaked the grammar rules a bit
- Added new data structure to Exp.Exp for partially evaluated functions
- Added functionality for this data structure to many functions in Exp

Revision: 4094
Author: sjoelund.se
Message:
- Fix testcase/meta/Uniontype13.mos (Uniontype in Record). Broke after merge with Mathcore

Revision: 4092
Author: sjoelund.se
Message:
- Codegen.generateExpression: Using "mmc_mk_none()"/"mmc_mk_some(x)" when
generating C code instead of "mmc_mk_nil()" and "x".
- Exp.typeof: Added cases for OPTION/TUPLE, and fixed the cases for LIST/CONS.
Previously, the type of a LIST(ty=INT) was INT instead of T_LIST(INT)...

Revision: 4088
Author: stebr461
Message:
- added more tests

Revision: 4087
Author: stebr461
Message:
- Added grammar rules for partially evaluated functions
- Added a new record to Absyn.Exp for partially evaluated functions
- Added cases to Absyn.traverseExp, Absyn.getCrefFromExp and Absyn.findIteratorinExp for the new record
- Added test cases for functions whose arguments have default values, and partially evaluated functions as arguments
- Fixed a typographic error in Interactive.mo that prevented compilation

Revision: 4077
Author: sjoelund.se
Message:
- Codegen.mo: Added annotation(JavaMapping="simple") to external Java
functions. This handles only int,double,bool,String and max 1 output value.

Revision: 4076
Author: sjoelund.se
Message:
- Fix Java testsuite makefile for OMDev

Revision: 4075
Author: sjoelund.se
Message:
DefinitionsCreator.java can now translate all .mo-files in Compiler to
a single JAR file.
- {Inst,DAELow,Mod}.mo: Fixed syntax errors
- Removed genericArguments.st and the list of generic types in
functions/records. These now look up all variables and add all generic types
to a string instead (used by the templates directly).
- Interactive.getDefinitions: Correct behaviour when trying to filter out
functions (and speeds up the generation in general).

Revision: 4074
Author: sjoelund.se
Message:
- DFA/Interactive.mo: Uses list<tuple<type_a,type_b>> instead of
list<type_a,type_b>
- Interactive.getDefinitions: Don't add const components to the returned tree.
Also uses the Print buffer to speed up a bit.
- ModelicaString: Uses StringBuffer instead of concatenating 80kB strings byte
by byte.

Revision: 4073
Author: sjoelund.se
Message:
- Updated the Java testsuites for OMDev

Revision: 4072
Author: sjoelund.se
Message:
- Interactive.mo.getDefinitions: Fixed the output to the expected
"(type XYZ list<ABC>)" - it was "(type XYZ list)".
- record.st: Fixed new Class[] to new java.lang.Class[] (in case a package
contains a record named Class; like Absyn.mo does)

Revision: 4070
Author: sjoelund.se
Message:
- Compiler/Util.mo: Fixed syntax in some unused functions (Util.mo is parsed in
the Java testsuite)
- Added the sources and test suite for modelica_java.jar
* make test (in c_runtime/java_interface) runs a jUnit testsuite
* make jar (n c_runtime/java_interface) creates the jar-file (it is not run
by running make in the source root)

Revision: 4068
Author: sjoelund.se
Message:
- Interactive.getDefinitions: Changed the syntax slightly to be more
consistent (LISP-style trees all the way; this made the parser a bit simpler).

Revision: 4067
Author: sjoelund.se
Message:
- Cleaned up in external Java (no more getJavaMethod calls). This makes it
easier to spot which line failed in the C file.
- Fixed bugs when structs/string pointers are not initialized by GCC
- Added support for multiple output uniontype variables

Revision: 4066
Author: sjoelund.se
Message:
- Updated the ext Java dummy test for Win32 and fixed a bug in the jni_md include

Revision: 4065
Author: sjoelund.se
Message:
- Added a dummy test for Java external. This tests the datatypes we currently
can't use OMC (list,option,tuple).

Revision: 4064
Author: sjoelund.se
Message:
- Changed the NONE() representation to use ctor=1 (so it doesn't share it
with the empty list). Only Boolean values seem impossible to distinguish
now.
- java_interface.c:
* Added jobject_to_mmc so any object can be turned into a list, tuple,
record och option.
* Added ctor_index value to the Java ModelicaRecord.
OMCModelicaRecord (which OMC creates) has index -1 for regular records
and >=0 for uniontypes. -2 (default for ModelicaRecord) means a warning
is printed when the record is returned as a uniontype (because type checking
can't be done). The automatically generated interface override get_ctor_index,
so any records created with known "good" records won't generate warnings.
- Interactive.mo: Uses MetaUtil.createMetaClassesInProgram to create the
meta classes instead of parsing this in Java code.

Revision: 4062
Author: stebr461
Message:
- Builtin functions can now be passed as arguments in function calls
- Added test case for passing record constructors as function arguments

Revision: 4061
Author: sjoelund.se
Message:
- Added NewJavaMMC to java_interface.[ch]. It currently only handles
uniontype, integer, real and string.
- Added a field with the record name (rather than path) to the
record_description datatype.
- Added support external Java functions with uniontype arguments (but not
result types yet).
- Added a dummy interface IModelicaRecord which tags ModelicaRecord and is
used as the input type of external Java functions taking uniontypes (because
uniontypes are interfaces, they cannot inherit from ModelicaRecord).

Revision: 4060
Author: sjoelund.se
Message:
Added code for TYPE_DESC_RECORD inside another TYPE_DESC_RECORD. Also added
record-in-record support for external Java functions.
- Codegen.mo: In read/write_modelica_record, pass the fields of the inner
records rather than the full struct as a single argument.
- read_write.c: In order for read/write_modelica_record to work when calling
the function recursively, the functions were split in 2 (one helper function
each). The first function starts the varargs and passes a pointer to it
in each subsequent call.

Revision: 4059
Author: sjoelund.se
Message:
- read_write.[ch]: Added (and tested) the MetaModelica types in regular
records.
- Codegen.generateType: Added case for uniontype
- Inst.daeDeclareComplexVarType: Added case for uniontype (and a warning
message if it fails - finding out this was the function that failed was
really hard because the compiler will then just output an empty DAE).

Revision: 4058
Author: sjoelund.se
Message:
- read_write.[ch]: Changed from passing strings for record and field names
to using the record_description struct.
- Ceval.mo: Disabled cevalFunction (its record constructor doesn't work with
all types, and turning it on means you don't see error messages from the
compiled version)
- Codegen.mo: Generate code that uses record_description instead of field names
from read/write_modelica_record
- Inst.instClass: ty = MetaUtil.createUnionType(c,SOME(ty)); instead of
keeping this in Inst.instElement (other parts of the code also needs to
check for uniontypes...).
- Inst.instElement: Removed the special case for uniontype components.
The general case works fine with the changes to instClass and daeDeclare.
- MetaUtil.createUnionType: Takes a class and a type. If the class has
R_UNIONTYPE restruction, create the correct type, else use the given type.

Revision: 4057
Author: sjoelund.se
Message:
Fixes uniontype constructors in packages, called from a different scope.
- Static.elabCallArgs: Uniontype constructors now send the correct environment
to MetaUtil.createFunctionArgsList (instead of the environment of the call).
- MetaUtil.listToBoxes: Because the name is a String, we need to convert
all dots (.) to underscores (_). The problem is Exp.COMPLEX uses strings
for the name, and not Paths.

Revision: 4056
Author: sjoelund.se
Message:
- Added code in MetaUtil to translate the whole Absyn.Program to use
uniontypes instead of just the classes in the global scope.
- SCode.elaborate: Now 2 functions. The first one translates the uniontypes
in Absyn. This should possibly be done by Parser.parse instead, since
then this function won't have to be run over and over.

Revision: 4055
Author: sjoelund.se
Message:
SCode.mo: Added a warning message when encountering a uniontype in a package
Static.mo: Changed the elabCall RECORD constructor case to also handle
METARECORD. This should ensure that the METARECORD always gets the correct
name.

Revision: 4053
Author: sjoelund.se
Message:
- Codegen.mo: Bugfix of previous commit (it would try to generate the same
record definition twice in some test cases)

Revision: 4052
Author: sjoelund.se
Message:
It's now possible to create uniontypes and call functions with uniontype
input from Interactive sessions.
- meta_modelica.[ch]: Added struct record_description, containing path
and field names. It will be passed in every record box instead of using
several slots in a box to pass the data field names.
- Values.mo: Added a field for record index in RECORD. This is needed
for uniontypes.
- Codegen.mo: Added global record_descriptions for each referenced
RECORD or METARECORDCALL.
- Ceval.mo: Constant evaluation of METARECORDCALL
- Exp.getFunctionCalls: Added METARECORDCALL to the cases, and added
an input option to find all METARECORDCALLs instead of CALLs.

Revision: 4050
Author: stebr461
Message:
-Added a testcase for passing external functions as arguments

Revision: 4049
Author: stebr461
Message:
- fixed a little bug

Revision: 4048
Author: stebr461
Message:
- Proper testcase for passing builtin functions as arguments
- Fixed a small syntax error

Revision: 4046
Author: sjoelund.se
Message:
- Fixed RECORD constructor no longer returning ClassInf.UNKNOWN("") instead
of ClassInf.RECORD(name)
- Added a case for METARECORDCALL when generating the function dependencies

Revision: 4045
Author: stebr461
Message:
-Compiling calls to functions with no output now works properly
-Functions with no output can now be used as arguments in function calls

Revision: 4043
Author: sjoelund.se
Message:
- Adds the possibility to return METARECORDS to the interactive shell.
- Exp.METARECORDCALL: Added list<String> fieldNames so we can pass the fields
when creating the boxed data. This does cost some extra memory, but it means
we can return the value to the Interactive module. It should also be helpful
when debugging datastructures.
- MetaUtil.listToBoxes: Now takes a list<String> fieldNames when creating
the boxed datatype.
- Static.elabCallArgs: Now adds the field names to a METARECORDCALL.
- Values.mo: Added the OPTION type.
- c_runtime/meta_modelica.[ch]: Added mmc_mk_box(<size>,<ctor>,...) (varargs).
- c_runtime/read_write.[ch], Compiler/runtime/systemimpl.c: Added
TYPE_DESC_MMC which contains the MetaModelica-style data, and the ability
to parse it.

Revision: 4040
Author: stebr461
Message:
- Fixed testcases a bit
- Added error handling for empty function call in equations
- Added code generation functionality for empty function calls in algorithms

Revision: 4039
Author: stebr461
Message:
Partial function test cases added/fixed/modified

Revision: 4038
Author: sjoelund.se
Message:
- MetaUtil.listToBoxes: Changed the input to Exp.Type instead of Exp.Exp.
The reason is simple: an Exp.COMPLEX contains list<(String,Exp.Type)> and
we want to be able to box recursive data including records using the same
function.
- MetaUtil.createConstantCExp2: Added cases for Exp.STRING and Exp.COMPLEX

Revision: 4036
Author: sjoelund.se
Message:
- Exp.typeOf: Added METARECORDCALL. This makes it possible to create a
UT using syntax like re := REC1(REC1(REC2(1.5)));

Revision: 4035
Author: sjoelund.se
Message:
- MetaUtil.mo: Added a case for UT arguments in UT constructor
- Added testcases for recursive uniontypes. Note that a constructor like
REC1(REC1(REC2(1))) still doesn't work.

Revision: 4034
Author: sjoelund.se
Message:
- MetaUtil.mo: Changed createConstantCExp to handle more than <type>
constants (like Integer i; i=1; REC1(i) instead of REC(1))
- Static.mo: Fixed code that changed the scope when looking up a metarecord
call.
- Added a testcase using variables as arguments to a metarecord call.

Revision: 4033
Author: stebr461
Message:
- Modified a partial function test case and added a new one that tests built in functions and functions with no output
- Added the following functions to Exp:
getFunctionReferenceList - takes a list of expressions and returns the ones that are Exp.CREF with the type T_FUNCTION_REFERENCE
isFunctionReference - checks if an Exp.Type is a function reference
getFunctionRefs - takes an Exp and returns all the function reference Exp.CREFs it finds in the Exp and its subexpressions
- Added the following functions to SimCodegen:
getReferencedFunctions - creates a list of Absyn.Paths from function references using the new functionality in Exp
getCrefFromExp - extracts an Absyn.CREF from an expression
- Modified SimCodegen.getCalledFunctionsInFunction to handle references as well

Revision: 4030
Author: sjoelund.se
Message:
- testcase/meta/Uniontype[1-3].mos now all work properly
- Added read/write_modelica_uniontype (aliased to modelica_complex)
- Types.mo: Added a case for T_UNIONTYPE in getAllExpsTt
- Added the copyright header to java_interface.[ch]

Revision: 4029
Author: sjoelund.se
Message:
- Interactive.mo: Disabled optimization that interferes with MetaModelica
extensions
- ClassInf.mo: Added UNIONTYPE cases
- Inst.mo: Added UNIONTYPE cases; moved the UT case in instElement higher
so it's run before the more general case
- MetaUtil.mo: mk_box is now called mmc_mk_box
- meta_modelica.[ch]: More functions from yacclib.[ch] present
- testsuite/meta/Uniontype1.mos now works.

Revision: 4026
Author: sjoelund.se
Message:
- Fixed the java testsuite Makefile in Linux

Revision: 4025
Author: sjoelund.se
Message:
- Fixed C/Java runtime for external Java in Windows.
- Dynamic loading of the JVM from registry or environment variables work.
- The Java Runtime DefinitionsCreator was updated to escape backslashes in windows pathnames

Revision: 4024
Author: krsta
Message:
Some minor changes (from public to protected on some functions).

Revision: 4023
Author: krsta
Message:
Checked in merged code from Simon Bj?rkl?n's Union types implementation.

Revision: 4020
Author: sjoelund.se
Message:
- Lookup.mo: buildRecordConstructorClass now adds ALG_ASSIGN statements
to the constructor so it's not a random piece of data.
- Algorithm.mo: Removed warning from print statement (causes testsuite to fail)
- Static.mo: elabCall has a case which fixes problems when looking up
record constructors in packages.
- testsuite/records added. The tests do work fine with one exception.
Record-in-Record can't be returned to the interactive module and exists
as a failing test.
- Ceval.mo changes to cevalCallFunction were not commited because commenting
out the record constructor and Cevalfunc cases change the result of several
other test cases. This is also why these test cases were not added to the
default testsuite.

Revision: 4019
Author: sjoelund.se
Message:
- Added /usr/lib/jvm/default-java as a path to try if JAVA_HOME does not exist

Revision: 4017
Author: stebr461
Message:
- Fixed generation of function names in Codegen.generateRhsCref

Revision: 4016
Author: sjoelund.se
Message:
- Updated Java tests

Revision: 4015
Author: sjoelund.se
Message:
- Ceval.mo: Interpreted record constructors only used for implicit record
constructors (not function calls returning records)
- CevalScript.mo,SimCodegen.mo: Codegen.generateFunctions now returns
record definitions already created (so they won't be duplicated in
CevalScript.mo)
- Exp.mo: T_RECORD wasn't used anymore so it was commented out and
references updated to use COMPLEX.
- Codegen.mo: Updated references from Exp.T_RECORD to COMPLEX.
Codegen.generateFunctions,etc handles Record-in-Record inside
compiled functions (but not when returning values to Interactive,etc).
- DAE.mo, Inst.mo, Lookup.mo, Static.mo: Updated comments

Revision: 4012
Author: sjoelund.se
Message:
- Added a mostly working implementation of external Java.
- Dynamically loads the JVM. Only jni headers are needed to compile the
modified C runtime.
- modelica_java.jar contains the Java runtime, which depends on antlr-3.1.3.jar.
- In order to run the java testsuite, you need to set JAVA_HOME to a working
java installation.
- There is some code for loading the JVM in visual studio, but it has not
been tested.
- The testsuite has been tested using OpenJDK and GCJ
- It could be possible to use the included antlr jar-file instead of forcing
the user to keep antlr/stringtemplate in his CLASSPATH

Revision: 4005
Author: stebr461
Message:
- added a case for T_FUNCTION_REFERENCE in Codegen.generateRhsCref

Revision: 4004
Author: sjoelund.se
Message:
(rev3875 in the TemplateCodegen branch used the following bugfix; originally merged from MathCore)
- got rid of $$$ in the generated code (SimCodegen.mo).

Revision: 4003
Author: stebr461
Message:
- added modelica_fnptr to the c_runtime
- added support for function pointers in type descriptor
- added read and write functions for function pointers

Revision: 4000
Author: sjoelund.se
Message:
- Added code for handling (partial) function arguments from Absyn to
Codegen. The c_runtime has not been modified and because simulations/etc
have some bugs in this branch, the code could not be fully tested or
compiled (although parts have been).

Revision: 3999
Author: krsta
Message:
Union Types test cases

Revision: 3992
Author: sjoelund.se
Message:
- Added optmanager.o to Makefile.common (someone updated the omdev version but forgot about poor Linux users)

Revision: 3991
Author: sjoelund.se
Message:
- Linux fix (extern C shadows C++ includes; ato[if] resides in stdlib.h)

Revision: 3990
Author: krsta
Message:
- Some updates.

Revision: 3989
Author: sjoelund.se
Message:
- Testing write permission

Revision: 3961
Author: krsta
Message:
- Merged code from Simon Bj?rkl?n's branch. This is a code backup, not yet compilable code.

20186 lines of code changed in 234 files:

stebr461 2009-10-19 12:22 Rev.: 4367

-Added the test suite spreadsheet to the testsuite folder

131 lines of code changed in 1 file:

Frenkel TUD 2009-10-19 08:22 Rev.: 4366

- Bugfix Bug 1110

84 lines of code changed in 4 files:

sjoelund.se 2009-10-14 10:02 Rev.: 4361

- Merged c_runtime from Bootstrapping
- Fixed simulation_result.cpp performance issues (<< endl flushes the buffer, \n does not)
- Added the Java-specific runtimes (C and Java)
- Changes to read_write.{c,h} for record-in-record, NORETCALL and MetaModelica types

9149 lines of code changed in 87 files:

September 2009 »

Generated by StatSVN 0.7.0