- Jul 23, 2008
-
-
Erwan Jahier authored
to avoid name clashes in the lic.
-
- 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
-
- Jun 02, 2008
-
-
Erwan Jahier authored
before '..'.
-
- 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.
-
- May 29, 2008
-
-
Erwan Jahier authored
package. Better error msg when instanciating a model by provided a wrong number of arguments.
-
- May 26, 2008
-
-
Erwan Jahier authored
performed. The resulting code is both more compact, and more general. It is more general, since that predef operators are now represented by node_exp_eff, exactly as user nodes. Hence, all the functions that were operating on user nodes via node_exp_eff (such as, node aliasing) works for free on predef op! In order to be able to perform that generalisation, it was necessary to extend sligthly the data structure used to represent the node profile in CompiledData.node_exp_eff with information indicating if a variable is polymorphic or overloaded. Not that, currently, polymorphic or overloaded variables can only be introduced by predef operators. But I think it would be easy to add those notions for normal user nodes after this change. New non-reg files boolred now compiles. Those involving - boolred - alias on predef.op
-
- May 21, 2008
-
-
Erwan Jahier authored
Also, node aliased to other nodes were handled poorly: I was replacing in the syntax tree the node by its alias. Now, I really define the alias node using the aliases one. For instance, node toto(x:t) returns (y:t); let ... tel node titi = toto; node tutu(...) returns(...); let ... z = titi(a); tel was compiled into node toto(x:t) returns (y:t); let ... tel node tutu(...) returns(...); let ... z = toto(a); tel Now, I generate node toto(x:t) returns (y:t); let ... tel node titi(i1:t) returns (o1:t); let o1 =toto(i1); tel node tutu(...) returns(...); let ... z = titi(a); tel which is equivalent, but closer to the original program.
-
- May 20, 2008
-
-
Erwan Jahier authored
(support for fill, red, etc. is coming soon). In order to add support for iterators, I have extended the by_pos_op (and the by_pos_op_eff) data type with a list of static arguments. In other words, iterators are handled as a particular case of predefined operators.
-
- May 16, 2008
-
-
Erwan Jahier authored
command-line) to compile a node in a package that does not exist.
-
- 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 07, 2008
-
-
Erwan Jahier authored
type 'a hereflagged = Here of 'a | NotHere of Ident.long into type 'a elt = Local of 'a | Imported of Ident.long * static_arg list i.e., i am basically doing two things: - fix poor naming - adding static arg to nodes indeed, when compiling an equation that involves nodes defined in another package, I need to check that the static args and the static params match. Therefore I need to have the static params ! Therefore I add them (I will use them in the next commit). Moreover, in SyntaxTreeCore.node_info, the static_params list was an option type, which is a bit weird (empty lists are enough to represent node with no static params).
-
- 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
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 14, 2008
-
-
Erwan Jahier authored
-
- Feb 07, 2008
-
-
Erwan Jahier authored
oper -> node func -> extern node node -> (user) node
-
Erwan Jahier authored
CALL_BY_NAME -> STRUCT_n STRUCT_EXP_n -> STRUCT_anonymous_n flaged -> flagged
-
- 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
Try to split this 400 lines (!) function. + Factorize some duplicated code.
-
- Jan 28, 2008
-
-
Erwan Jahier authored
-
- Dec 18, 2007
-
-
Erwan Jahier authored
-
- Dec 17, 2007
-
-
Erwan Jahier authored
-
- Dec 14, 2007
-
-
Erwan Jahier authored
-
Erwan Jahier authored
Ident.t is now an abstract data type (instead of a string). fullid is turned into an Ident.long, and is also made abstract.
-
- Dec 05, 2007
-
-
Erwan Jahier authored
Add basic regression tests. Add "assert false" statements everywhere it was necessary. Add the fby operator in the syntax.
-
- Oct 19, 2007
-
-
Erwan Jahier authored
-