[Bro] About IDs in MutableVals

Christian Kreibich christian at whoop.org
Wed Dec 8 04:45:00 PST 2004

Hi Robin,

On Fri, 2004-12-03 at 17:22, Robin Sommer wrote:
> On Fri, Dec 03, 2004 at 15:49 +0000, Christian Kreibich wrote:
> > Okay it's much clearer now, thanks! I guess what's still confusing me is
> > why is this happening at the MutableVal level and not in Vals directly?
> Basically it's just an optimization. We could just as well assign
> global names to all values -- but we don't need to. A global name is
> only required when a Val can actually be changed. If it can't, it

Do you mean "can be changed" as opposed to "be replaced by a new val"?

> will never be referenced by one of the operations transfered during
> synchronization (for example, an assignment to an integer always
> creates a new Val and destroys the old one).

So when a field's value in a mutable val changes, it's the mutable val
that is flagged as changed and not that individual val -- is that it?

> Optimizing even further, we need only assign global names to MutableVals
> which are actually synchronized (or, in the future, persistent).

I think that's what's confusing me. A better way to put my question is
probably: if I want a val to be synchronized/persistent, it seems it has
to be a mutable val (i.e., a table/set or a record). Right?

> > I think this also comes back to the properties in MutableVals that I
> > don't quite understand -- why are these not attributes?
> Which kind of attributes are you refering to? (The term "attribute"
> is quite is overloaded in Bro...). The attributes which are
> associated with Vals are RecordVals which don't really fit here
> (frankly, right now I can't remember what they are for... :-). The
> attributes associated with IDs are more appropiate (and, in fact,
> general, values contained in MutableVals are not bound to any ID.
> Therefore, these attributes don't help for Vals.

Ah right! I meant the ones associated with vals, but I didn't think of
the val/id difference in context of the serialization. Thanks!


More information about the Bro mailing list