[PEAK] trellis question

nicky van foreest vanforeest at gmail.com
Sun Jul 17 15:48:22 EDT 2011

Thanks. I'll try to understand this idea from the code.

On 17 July 2011 03:17, P.J. Eby <pje at telecommunity.com> wrote:
> At 11:33 PM 7/16/2011 +0200, nicky van foreest wrote:
>> I wonder how trellis finds out that Sum.tot needs h.a for all the h's
>> in the list. How does it know, for instance, that h.a in the list
>> comprension sum( h.a for h in self.h) corresponds to a Cell? (Is
>> actually h.a stored/corresponds to a Cell?)
> Yes.  A trellis.attr declaration means the attribute is stored in a Cell
> instance, and reading the attribute reads the Cell, causing the dependency
> to be noticed while the 'tot' rule is being executed.  When the 'tot' rule
> is finished, Trellis looks at the read history and sees the list of cells to
> be used as the new dependency list for the 'tot' Cell.

More information about the PEAK mailing list