Skip to content
Snippets Groups Projects
  1. Jul 23, 2008
  2. 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
  3. Jun 02, 2008
  4. May 30, 2008
  5. May 29, 2008
  6. May 26, 2008
    • Erwan Jahier's avatar
      I have complety rewritten the way predef operator typing is · b09c78c5
      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
      b09c78c5
  7. 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
  8. May 20, 2008
  9. May 16, 2008
  10. 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
  11. 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
  12. May 02, 2008
  13. Apr 02, 2008
    • 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
  14. 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
  15. Feb 14, 2008
  16. Feb 07, 2008
  17. 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
  18. Jan 30, 2008
  19. Jan 28, 2008
  20. Dec 18, 2007
  21. Dec 17, 2007
  22. Dec 14, 2007
  23. Dec 05, 2007
    • Erwan Jahier's avatar
      More cleanning. · a2eeaef0
      Erwan Jahier authored
      Add basic regression tests.
      
      Add "assert false" statements everywhere it was necessary.
      
      Add the fby operator in the syntax.
      a2eeaef0
  24. Oct 19, 2007
Loading