- Jan 22, 2010
-
-
Erwan Jahier authored
cf test/should_work/NONREG/fresh_name.lus where the local variable _n1e1_1 was defined twice ! The fix contist the following idea : prefix fresh var name by "_", except if at least one user ident begins by "_". In that case, we try to prefix them by "_1", and then "_2", and so on. We take the first possible one. nb : this won't work if the user defined idents from "_1" to "_1073741823" (on 32-bits machine), but I bet that this compiler would die before anyway...
-
- Jan 20, 2010
-
-
Erwan Jahier authored
-
- Mar 11, 2009
-
-
Erwan Jahier authored
expanser to expand the mentioned node.
-
- Feb 10, 2009
-
-
Erwan Jahier authored
2 source transformations), we add an entry in the EvalType and the EvalClock tables. Otherwise, when we use EvalType.lookup or EvalClock.lookup, an error migth be raised.
-
- Feb 06, 2009
-
-
Erwan Jahier authored
with a non-empty body (instead of just the first node).
-
- Feb 05, 2009
-
-
Erwan Jahier authored
-
Erwan Jahier authored
some_clk" should be written "(x:some_type) when some_clk"
-
- Feb 03, 2009
-
-
Erwan Jahier authored
-
- Jan 30, 2009
-
-
Erwan Jahier authored
-
- Jan 23, 2009
-
-
Erwan Jahier authored
-
- Dec 12, 2008
-
-
Erwan Jahier authored
In short, the rationale for this change, is that it is having a recursive node_exp is - useless, - too complicated, - wrong w.r.t. nesting iterator calls In long: - It is useless because, at the Eff level, a node cannot call itself via one of its static arg (which was where the recursivity came from). - and indeed, it is much simpler to consider that a static arg node can only be ident.long that identifies a node alias. This means of course, that nested iterators have been unnested before, inventing alias node names along the way... And polymorphism makes thing difficult once again. - But the *big* problem with a recursive node_exp is that it make things very complicated to (lic)dump nested iterator call because of polymorphism! Actually, it even makes thing complicated when the iterators were themselves not nested in the source code ! Some ugly things were done in LicDump to unnest those calls when printing node_exp. But this uglyness have a price: tricky code, and bugs! Indeed, nested iterators calls were wong for example when using the --inline-iterator mode (but i would not be surprised that is wrong in other cases...). Hence, LicDump is simpler, but of course LazyCompiler is more complicated. But this is reasonable: a pretty-printer is not supposed to be complicated.
-
- Dec 08, 2008
-
-
Erwan Jahier authored
-
- Nov 28, 2008
-
-
Erwan Jahier authored
-
- Nov 26, 2008
-
-
Erwan Jahier authored
-
- Nov 20, 2008
-
-
Erwan Jahier authored
(--inline-iterators) to activate it. nb : do not inline completely nested iterator calls (yet, cf TODO).
-
- Oct 23, 2008
-
-
Erwan Jahier authored
by position). Rename ExpandPack into InstanciateModel.
-
- Sep 17, 2008
-
-
Erwan Jahier authored
-
- Sep 15, 2008
-
-
Erwan Jahier authored
-
- Aug 28, 2008
-
-
Erwan Jahier authored
-
- Aug 25, 2008
-
-
Erwan Jahier authored
The idea is the following: each time a nested iterator call (map<<map<<n,3>>,4>>) is encountered, we create a fresh alias name (create_alias_name) ad we add it in the node_alias_tbl. At the end of the compilation, LicDump.dump_node_alias is called, which prints the definition of those node aliases. For example, the expression "map<<map<<n,3>>,4>>" is printed like this: map<<_node_alias1, 4>> and later, the node alias is defined: node _node_alias1(x:int) returns(y:int); let y = map<<n,3>>(x); tel;
-
- Aug 19, 2008
-
-
Erwan Jahier authored
as many new local variables as necessary so that an expression is made at most of one operator. The rational for that is to obtain a lic code that is trivial to clock check (nested node calls, for example, make it less simple). The old behavior can still be obtained using --keep-nested-calls. During that change, I realised that I did not clock check asserts. Hence, I have also added this check.
-
- Jul 22, 2008
-
-
Erwan Jahier authored
-
- Jul 04, 2008
-
-
Erwan Jahier authored
profiles constain only named types. Typically, instead of printing: node toto(x: int ^ 4) ... print something like : type int4 = int ^ 4 node toto(x: int4) ... Moreover, in order to avoid name clashes, we prefix all user name type by "_".
-
- Jun 26, 2008
-
-
Erwan Jahier authored
Not yet implemented (assert false): iterators, struct Add a UnifyClock module, and rename Unify into UnifyType. nb : a lot of test are now broken, because - the clock checking is now plugged ;-) - iterators, struct are not yet implemented
-
- Jun 03, 2008
-
-
Erwan Jahier authored
SolveIdent.recognize_predef_op that replaces node call by Predef constructor when necessary, via a complete traversal of the SyntaxTree (instead of doing it in the parser). The rationales for this change are that: - it is quite tedious to do it in parser as multiple locations are involved - I did missed some locations - It makes the parser more focused on parsing issues - that traversal is a first step do deal with idref solving (hence the name of the new module that contains that function Note that lsrc/test/should_work/fab_test/lecteur.lus was using "plus" as a variable ident, which raised an error, which
-
- May 30, 2008
-
-
Erwan Jahier authored
(well, for the first file, the numbers were ok :-). Also, begin to sort out a little bit the mess in the Global module. Moreover, augment the necessary print level of most internal structure dumping function.
-
Erwan Jahier authored
no node is provided at the command-line. Instead, compile all items even if the --compile-all-items option is not provided.
-
Erwan Jahier authored
Also, in verbose mode, print the full path of the openned files.
-
- May 28, 2008
-
-
Erwan Jahier authored
-
- May 20, 2008
-
-
Erwan Jahier authored
-
Erwan Jahier authored
-
- May 15, 2008
-
-
Erwan Jahier authored
t, and a node returning such a t, the compiler was actually returning the type definition of t (instead of the abstract type). In order to fix that, it was necessary to add in argument of Lazycompiler.solve_x_idref a flag (named provide_flag) indicating whether the item being compiled appears in the provide, or in the body part of the package. This fix triggered another bug that we also fix: indeed, it is not correct to return a compile error when the provided parameters of a node is not equal to its implementation. Indeed, such parameters can be abstract type that are defined in that package. The test "should_work/packEnvTest/packages.lus" is now ok.
-
- May 02, 2008
-
-
Erwan Jahier authored
not compile them is (well, was) the default...). also, during pretty-printing, remove the type in the constant definition (e.g., "const x = 42;" instead of "const x = 42:int;"), except if it is an abstract constant of course
-
- Apr 02, 2008
-
-
Erwan Jahier authored
tests. Also, Add the possibility to have several lustre files in the command-line arguments. remove the power operator. Define a lustre.lus that contains a packaged version of Lustre predefined operators. It will be in the standard lustre library, and should be accessible directly (path).
-
Erwan Jahier authored
For non-regression tests, do not use Lazycompiler.test function anymore and just use LazyCompiler.node_check instead. put in the new file compiledDataDump.ml all the stuff related to string convertions of CompiledData items.
-
- Feb 15, 2008
-
-
Erwan Jahier authored
To do that, we : (1) totally remove (in the ocaml code) the use of "oper", and use "node" instead. Indeed, a node is a memoryfull operator, as opposed to function that are memoryless operators. However, lus2lic does not really care about memoryless and memoryfull information. Therefore I prefer to use node everywhere, and to flag node_info to indicate whether it has memories or not. (2) change the syntaxTreeCore type to make it more general. Indeed, the distinction between functions and nodes was - redundant: extern nodes and (extern) functions were handled differently (NodeExtern versus ExtNode (was named FUNC before)). - and incomplete: it was not possible to provide static parameters to function, nor to define functions with body, etc. Now a function is just a memoryless node. The check that function indeed use no memory will be done later. (3) also, change the parser so that functions with body are accepted. (4) in order to do it step by step, I add the "extern" keyword" so that extern nodes and functions are more easy to parse. I will remove it later.
-
- Feb 12, 2008
-
-
Erwan Jahier authored
Better error msgs. Renaming idents.
-
- Feb 06, 2008
-
-
Erwan Jahier authored
src/syntaxTreeCore.ml (new file) Split syntaxTree.ml into syntaxTree.ml and syntaxTreeCore.ml. The idea is that lic2loc should be able to use syntaxTreeCore.ml verbatim. src/lxm.ml src/lxm.mli remove pack_name from this module, so that it can be shared with lic2loc too (this is mandatory since it is used by SyntaxTreeCore) src/compile.ml src/compiledData.ml src/evalConst.ml src/evalConst.mli src/evalType.ml src/evalType.mli src/expandPack.ml src/lazyCompiler.ml src/main.ml src/parser.mly src/symbolTab.ml src/symbolTab.mli src/syntaxTab.ml src/syntaxTreeDump.ml src/syntaxTreeDump.mli src/test/Makefile src/test/packs.lus src/test/test.res.exp opening SyntaxTreeCore module, and inline the definition of Lxm.pack_name. Also, begin to replace oper by node or predef_node in identifiers, in order to get a more consistant naming scheme.
-
- Jan 30, 2008
-
-
Erwan Jahier authored
src/lxm.ml: src/global: (new file) Add the lustre file name in error messages. src/compiledData.ml: Better Data structure dumping (string_of_type_eff,string_of_const_eff), and more dumping (LazyCompiler.check_const_interface). src/lazyCompiler.ml: Fix a bug that prevented enum constants to be exported. Indeed, in LazyCompiler.const_check_interface_do, only extern constants (Extern_const_eff) were accepted in the provided part, whereas enum contants (Enum_const_eff) should also be accepted. Force constants interface checking in LazyCompiler.test. src/test/Makefile: src/test/onlyroll.lus: src/test/heater_control.lus: src/test/pfs.lus: Some more test files.
-
Erwan Jahier authored
Try to split this 400 lines (!) function. + Factorize some duplicated code.
-