Skip to content
Snippets Groups Projects
  • Erwan Jahier's avatar
    e7ef1b90
    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
    History
    Attach the clock of Eff.val_exp to the val_exp itself, instead of
    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.