Skip to content
Snippets Groups Projects
  1. Feb 25, 2009
  2. Oct 23, 2008
  3. Oct 22, 2008
  4. Sep 15, 2008
  5. Sep 01, 2008
  6. Aug 29, 2008
  7. Aug 28, 2008
  8. Jul 01, 2008
  9. Jun 13, 2008
  10. Jun 09, 2008
    • Erwan Jahier's avatar
      When evaluating the type of a node call, check that the arguments and · 0096fda9
      Erwan Jahier authored
      the parameters  input types are  compatible with Unify.f.   Apply (if
      necessary) the resulting substitution to the output parameters.
      
      Also,  when checking array  concat, try  to unify  the types  of both
      arrays instead of just checking their equality.
      
      This of course triggers some errors in the non-reg tests.  One of
      this error is due to a bug in the parser, where the list of parameter
      was inversed twice. I've also fixed that in this change.
      0096fda9
    • Erwan Jahier's avatar
      Use type_eff_ext everywhere I was using type_eff (and rename · 00c67618
      Erwan Jahier authored
      type_eff_ext into type_eff btw). The  rationale is to be able to type
      alias           on           polymorphic          nodes           (cf
      test/should_fail/semantics/bad_call03.lus,  that now  have  a correct
      error msg).  It also makes  to code more compact (no more translation
      from one  to the  other), and more  general (type_eff_ext  being more
      general than type_eff).  User polymorphic nodes should be easy now.
      
      move all the code in parsey.mly into parserUtil.ml (ease the debug).
      00c67618
  11. Jun 06, 2008
  12. Jun 03, 2008
    • Erwan Jahier's avatar
      Wrap the parser output with a new function, · e64e1031
      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
      e64e1031
  13. Jun 02, 2008
  14. May 30, 2008
  15. May 29, 2008
  16. May 28, 2008
  17. May 27, 2008
  18. May 21, 2008
    • Erwan Jahier's avatar
      Add support to be able to use iterators in node aliases. · 65b93560
      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.
      6.13.0
      65b93560
  19. May 20, 2008
  20. May 07, 2008
    • Erwan Jahier's avatar
      In symbolTab.ml, change · 956514c2
      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).
      6.9.0
      956514c2
  21. May 02, 2008
  22. Apr 02, 2008
    • Erwan Jahier's avatar
      Add a --compile-all-items option, and use it in the non-regression · b6db7c6b
      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).
      6.8.0
      b6db7c6b
    • Erwan Jahier's avatar
      Add stuff to output the lic file. · 2b30a91d
      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.
      6.7.0
      2b30a91d
  23. Mar 20, 2008
    • Erwan Jahier's avatar
      Add two new modules, Predef and PredefSemantics, that deals with predefined · 4c0a0b1f
      Erwan Jahier authored
      operators. Predef contains the abstract syntax of those operators (taken
      for SyntaxTreeCore.by_pos_op), and PredefSemantics contains:
      
       - const_eval: that says how to statically evaluate constants
       - type_eval: that provides the type profile of predef operators
       - clock_eval: that provides the clock profile of predef operators
      
      The code in EvalConst that dealt with predef const evaluation is now in
      Predef.const_eval
      4c0a0b1f
  24. Mar 14, 2008
  25. Mar 11, 2008
    • Erwan Jahier's avatar
      Simplify the node_eff representation as well as change the names · 57431a16
      Erwan Jahier authored
      used in order to make it homogoneous with what is done in SyntaxTreeCore.ml
      
      This commit is related to the previous one actually.
      
      Also remove all this story of node_half_eff that is not
      used (yet), and that may not be useful (we'll see later).
      
      Also continue to fix the representation of SyntaxTrreCore.node_info :
       -> remove the node alias
       -> put the corresponding infomation in node_body field
       -> rename node_body field into node_def
       -> associate to node_def (instead of a body option) a new union
      type made of Abstract, Extern, Alias of ..., Body of ...
      
      This allows us to
       - remove an "assert false" to deal with node with body and alias
      (this new presentation makes it impossible)
       - Deal with Abstract node properly
      57431a16
    • Erwan Jahier's avatar
      Simplify significantly the node representation. The rational for this · 7f628ceb
      Erwan Jahier authored
      change is
      	- make the parser simpler
      	- make the compilation simpler
      	- make everything simpler actually...
      	- accepts more correct programs.
      	- etc.
      
      Indeed, before, we had specific syntax nodes for
      	- extern nodes
      	- aliased nodes
      	- abstract nodes
      	- normal nodes
      which leads to duplicate code everywhere. Now, we have a more generic
      representation.
      
      The nice thing is that the parser is much simpler, and a lot of
      duplicated code is avoided (for example, extern and abstract nodes do
      now share the same code).
      
      The bad thing is that we have more "assert false" lying everywere due
      to this «too rich» representation, in order to deal with cases
      that can never happen. For exemple, we have to do something with
      nodes that have  both an alias and a body. This cannot happen of
      course, so we issue an "assert false", which is a little bit painful,
      as it have been rejected by the parser anyway.
      
      Moreover, for some reason, external node params could not be clocked,
      and cannot have static params. Maybe it is not possible to compile
      such nodes (I don't know yet), but we should not raise a syntax error IMHO.
      
      Somehow, what was done was very similar to ask the parser to perform type
      checking.
      6.3.0
      7f628ceb
  26. Mar 06, 2008
  27. Feb 21, 2008
    • Erwan Jahier's avatar
      Fix the examples so that slice "1..2" are written "1 ..2" to turn · 4e616e89
      Erwan Jahier authored
      around a lexing bug that I don't know how to fix yet.
      4e616e89
    • Erwan Jahier's avatar
      Write a more generic src/test/Makefile · 648fa2ee
      Erwan Jahier authored
      Add Some lustre files that are automatically tested thanks to the
      generic Makefile (from the Youssef compiler).
      
      Test files are organized as follows :
      
       - files in directories that are under the "should_fail" directory
        do triggers errors, but it is intented
      
      	should_fail/syntax
      	should_fail/type
      	should_fail/semantics
      
       - and files that should not trigger any error:
      
      	should_work/
      648fa2ee
  28. Feb 20, 2008
  29. Feb 15, 2008
    • Erwan Jahier's avatar
      Resolve the inconsistant use of node and oper identifiers in the code. · de2a5f14
      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.
      de2a5f14
  30. Feb 12, 2008
  31. Feb 07, 2008
Loading