Skip to content
Snippets Groups Projects
  1. Jan 22, 2010
    • Erwan Jahier's avatar
      Fix a bug in the fresh var names generation. · 0f54289a
      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...
      0f54289a
  2. Jan 20, 2010
  3. Mar 11, 2009
  4. Feb 10, 2009
  5. Feb 06, 2009
  6. Feb 05, 2009
  7. Feb 03, 2009
  8. Jan 30, 2009
  9. Jan 23, 2009
  10. Dec 12, 2008
    • Erwan Jahier's avatar
      Break the recursivity is the Eff.node_exp representation (which fix nested iter. pbs). · 5c722d86
      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.
      5c722d86
  11. Dec 08, 2008
  12. Nov 28, 2008
  13. Nov 26, 2008
  14. Nov 20, 2008
  15. Oct 23, 2008
  16. Sep 17, 2008
  17. Sep 15, 2008
  18. Aug 28, 2008
  19. Aug 25, 2008
    • Erwan Jahier's avatar
      Unnest array iterator calls by modifying the Lic printer. · 65c62005
      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;
      65c62005
  20. Aug 19, 2008
    • Erwan Jahier's avatar
      Split expressions into atomic expressions. In other words, introduce · d7905aff
      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.
      d7905aff
  21. Jul 22, 2008
  22. Jul 04, 2008
  23. Jun 26, 2008
    • Erwan Jahier's avatar
      A new implementation of EvalClock, that is more general. · 5dd64311
      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
      5dd64311
  24. 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
  25. May 30, 2008
  26. May 28, 2008
  27. May 20, 2008
  28. May 15, 2008
    • Erwan Jahier's avatar
      Fix a bug where, when defining a package exporting an abstract type · 16344043
      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.
      6.9.1
      16344043
  29. May 02, 2008
  30. 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
  31. 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
  32. Feb 12, 2008
  33. Feb 06, 2008
    • Erwan Jahier's avatar
      src/syntaxTree.ml · 1a14b111
      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.
      1a14b111
  34. Jan 30, 2008
    • Erwan Jahier's avatar
      src/main.ml: · 36f22c50
      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.
      6.1.1
      36f22c50
    • Erwan Jahier's avatar
      Lazycompiler.do_type: · b6ee23f1
      Erwan Jahier authored
      	Try to split this 400 lines (!) function.
      	+ Factorize some duplicated code.
      b6ee23f1
Loading