Skip to content
Snippets Groups Projects
  1. Mar 23, 2022
  2. Jul 01, 2021
  3. Aug 29, 2019
  4. Aug 22, 2017
  5. Aug 18, 2017
    • erwan's avatar
      Do dep-loop checking before removing alias, otherwise some variables disappear ! · b13c9efb
      erwan authored
      And it is now done only by Lic2soc (L2lCheckLoops is not used anymore)
      
      Also, during this change, I was bitten again by the « "__" versus "::" in ident
      names » problem again.
      
      The core of this problem is due to the fact that I use LicDump both for
      (1) dealing with internal ident names
      (2) generating lustre files
      
      Because of (2), ident names may depend on the ec or the v4 option. hence, internal
      names were sometimes translated with "__" instead of "::".
      
      To (try to) fix that, I've added a boolean flag to all "to_string" functions that
      states whether the function is used for internal purposes, or for generating lustre
      files.
      
      It was quite a boring change, that triggered other problems, that I've fixed
      in this (too long) commit :
       - -esa should force -en, otherwise bad things happen (-esa is used for -ec anyway)
       - in -esa mode, #/nor inputs tuples of bool, not arrays
       - fix the list of predi op that returns a type different that its arg (SocPredef)
      b13c9efb
  6. Jun 20, 2017
  7. Nov 30, 2016
  8. Sep 05, 2016
  9. Jan 14, 2016
  10. Mar 03, 2015
  11. Feb 27, 2015
  12. Jan 19, 2015
    • Erwan Jahier's avatar
      Add a --optimize-ite/-oite option that transforms if/then/else into merge when possible. · d783b03e
      Erwan Jahier authored
      Indeed it is possible when each branch of the ite updates no memory.
      This is done in the new L2lOptimIte module.
      
      For the time being, it does detect when the node has no memory. It
      only looks at the declaration: nodes have memory, and not functions.
      
      I should infer that information and raise warnings or errors if what
      I infer is not compatible with waht is declared (will come later).
      
      Also split ActionsDep into ActionsDep and Action.
      
      Also fix a bug in L2lsplit where deeply nested (>2) merge were not
      splitted.
      d783b03e
  13. Jan 14, 2015
    • Erwan Jahier's avatar
      Fix a bug when using -esa -en -2c on programs with assert · 79e85ff2
      Erwan Jahier authored
      Report by willie (cf mail of 8/10/2014 to get the file)
      
      file:/tmp/modes3x2.lus
      
      lus2lic -esa -en -2c /tmp/modes3x2.lus -n modes3x2
      
      But it gives an error of:
      Error. in file "/mnt/A/wsept/modes3x2_pre_orig_lus2lic_en_esa/modes3x2.lus",
      line 74, col 8 to 8, token '#': only one operator per equation is allowed
      (v04_0, v04_1).
      
      Which is the line:
      assert #(on_off, toggle);
      
      -----------------------------------------------------------------
      
      Actually, refuse programs that uses "#" or "nor" run with -esa and
      -2c|-exec
      
      That means that willie program is now rejected.
      
      Nevertheless, that change migth fix some other programs (that uses
      arrays, and used with -esa and -exec or -2c).
      79e85ff2
  14. Oct 09, 2014
  15. Oct 02, 2014
  16. Aug 14, 2014
    • Erwan Jahier's avatar
      lic2soc: fix the translation of the current operator into SOC. · d3061085
      Erwan Jahier authored
      nb : the -exec mode was working because I did not use the generated soc,
      which was completely wrong.
      
      Note that to do that, I have modified the CURRENT variant of
      Lic.val_exp, to attach it the clock the current holds on. Indeed, the
      clock is mandatory to generated correct code...
      
      In an ideal world, this clock information may have explicitely been
      set by the user ("current(clk_of_X,X)" instead of "current(X)"), but
      for historical reason, it is not the case.
      
      Hence, this information is added as soon as it is available, namely,
      during clock checking.
      d3061085
  17. Oct 23, 2013
    • Erwan Jahier's avatar
      A tentative to fix a bug in clock checking appearing in a program of · cc1ab2b7
      Erwan Jahier authored
      Timothy Bourke (trigerred where the clock of some args are some other
      args and when the names of variables are shared between the caller
      and the callee).
      
      The problem is in UnifyClock.f or (in evalClock.ml) ; the current
      change in evalClock.ml fixes the pb in Tim's program, but I suspect
      it is still buggy.
      cc1ab2b7
  18. May 22, 2013
    • Erwan Jahier's avatar
      Fix a bug when expanding nodes (-en). A Node that calls a node that · 499a3f47
      Erwan Jahier authored
      itself calls another node on a non-trivial clock (i.e., using a when)
      was not producing correct code.
      
      I've fixed this by performing the fix-point on nodes rather than on
      equations. Indeed its more natural and efficient, and it avoid the
      problem above. However, I did not really fix the problem, but just
      turn around it. All tests seems to work fine though.
      
      nb : #FAILS=81->80 (and -2 unresolved, but because I fixed the prog)
      499a3f47
  19. Apr 25, 2013
  20. Apr 23, 2013
    • Erwan Jahier's avatar
      Fix several issues w.r.t. clocks during node expansion. · cb891dc4
      Erwan Jahier authored
      (1) equations such as
       (x,y,z)=[0,0,0];
      were generated with -en unless -ec was specified.
      
      I've fixed that by always breaking tuples, even when global_opt.ec
      is false (this condition was strange anyway).
      
      (2) During node expansion, I create a fresh variable for each local
      var in the expanded node, but old var names were still appering in
      clock expression
      
      indeed, consider that example :
      var
        c:bool;
        x when c :bool;
      
      I was generating something equivalent to
      
      var
        c_fresh:bool;
        x_fresh when c :bool;
      
      bou... Of course, it was working because in -ec mode, I need to
      remove clock annotation when declaring local variables, which was
      hidding the problem.
      
      nb : because I've change test_lus2lic_no_node to use -lv4 instead of
      -ec to generate the lustre oracle, which exposes new pbs (cf above).
      
      (3) When expanding a node on the base clock with arguments on another
      clock, I was not propagating that information (let's keep the
      finger-crossed and hope the current fix is complete).
      
      nb : the number of failing test cases is the same (5 new pass, but 5
      new fail!!), but it actually is a progression. Indeed, the new test
      failures ares due to the fact that this current change fixes a
      problem that expose yet another one!
      
      Actually, the newly exposed bug is not in the compliler, but in the
      oracle I generate via the --auto-test option ; indeed, for testing
      nodes which not all interface variables are one the base clock, I
      should generate oracle that do take them into account.
      cb891dc4
  21. Apr 12, 2013
    • Erwan Jahier's avatar
      lus2lic is now working from ldbg and ltop. · fa71e77c
      Erwan Jahier authored
      As far as ldbg is concerned, it only traces the toplevel node, at
      call event.
      
      Note that I needed to rename quite a lot of modules to avoid name clashes
      between lus2lic.a and ltop.
      
      I've also merged the Verbose module with the one of Lutin so that
      they can be shared (there were sharing 95% already).
      fa71e77c
  22. Apr 10, 2013
  23. Apr 03, 2013
  24. Mar 27, 2013
    • Erwan Jahier's avatar
      Rework the type of Lic expressions w.r.t. predef expressions. · 28f47082
      Erwan Jahier authored
      1) At the Lic level, there's no reason to distinguish betwenn node
      calls, and predef node calls. Indeed it makes things simpler and more
      homogeneous afterwards.
      
      2) int strings are only converted when necessary (constant evaluation).
      
      3) const are handled directly under Lic.by_pos_op instead of being under
         PREDEF_CALL, which make things easier and more logical.
      28f47082
  25. Mar 25, 2013
  26. Feb 20, 2013
  27. Feb 06, 2013
  28. Feb 04, 2013
  29. Feb 01, 2013
  30. Jan 31, 2013
  31. Jan 18, 2013
  32. Jan 16, 2013
  33. Dec 20, 2012
  34. Dec 13, 2012
    • Erwan Jahier's avatar
      Documentation et renommage des modules. · 65dfa567
      Erwan Jahier authored
      nb: les tests ne passent toujours bien sur.
      
      * Partie lus -> AST
      
      predef.ml -> srcPredef.ml
      syntaxTreeCore.ml -> astCore.ml
      syntaxTree.ml     -> astV6.ml
      syntaxTreeDump.mli-> astV6Dump.mli
      
      * Partie Ast -> Ast
      
      solveIdent.mli -> astRecognizePredef.mli
      syntaxTab.mli -> astTab.mli
      symbolTab.mli -> astTabSymbol.mli
      
      * Partie  AST -> lic (static evaluation)
      
      eff.ml  -> lic.ml
      getEff.mli -> ast2lic.mli
      lazyCompiler.mli -> licTab.mli
      builtIn.ml -> licMetaOp.ml
      predefEval*.ml -> licEval*.ml
      name.mli -> licName.mli
      
      * Partie Lic -> Lic
      
      uniqueOutput.mli      -> l2lCheckOutputs.mli
      structArrayExpand.mli -> l2lExpandArrays.mli
      nodesExpand.mli       -> l2lExpandNodes.mli
      doNoPoly.ml           -> l2lRmPoly.ml
      doAliasTypes.ml       -> l2lAliasType.ml
      doSplit.ml            -> l2lSplit.ml
      65dfa567
  35. Jul 13, 2012
    • Pascal Raymond's avatar
      Menage dans les val_exp : · 0934086d
      Pascal Raymond authored
      IDENT remplacé par VAR_REF/CONST_REF
      - plus de node_exp dans les CALL, juste une ref (node_key)
      - reste a faire pareil pour les NodeStaticArgEff
      0934086d
  36. Jul 12, 2012
  37. Jul 11, 2012
    • Pascal Raymond's avatar
      Debut de DoNoPoly, qui necessite une modif assez · 4e1418a0
      Pascal Raymond authored
      importante du mecanisme de UnifyType :
      - fait :
        * definition de Eff.poly_match
        * TypeVar type_var au lieu de Any/Overload
          avec type_var = Any | AnyNum
          (pour l'instant et pour longtemps ?!)
      - à faire :
        * revoir UnifyType pour qu'il rende un poly_match
        * stocker là où c'est nécessaire les poly_match
          calculés lors du type check
          (pour les CALL et peut-être les sargs ?)
      4e1418a0
  38. Apr 14, 2010
  39. May 26, 2009
    • Erwan Jahier's avatar
      Attach the clock of Eff.val_exp to the val_exp itself, instead of · e7ef1b90
      Erwan Jahier authored
      maintaining (ugly and error-prone) hash tables.
      
      That change revealed an untriggered bug in EvalClock.check_args: it was wrong
      to add in subst the substitutions made of the parameters and the arguments (it
      is enough to unify the clocks of the pars and of the args). For instance, consider
      the node (in should_work/clock/clock.lus)
      
         node clock5(x :  bool; y:  bool when x; z: bool when y)
      
      and the call
      
        z2 = clock5(a, b when a, c when e);
      
      I was adding y/b in the subst, which was wrong.
      
      Other minor changes:
       - move const_to_val_eff from Eff to UnifyClock.
       - GetEff.translate_val_exp now returns a substitution, in order to be able
         to unify clock vars and propagate the resulting substitution.
      e7ef1b90
Loading