Subject: Re: [netmod] Y18: fix "when" expression context node problem

From: Randy Presuhn <[email-masked]>
Date: Wed, 26 Mar 2014 22:35:39 +0800 (GMT+08:00)

Hi -

>From: Andy Bierman <[email-masked]>
>Sent: Mar 26, 2014 10:17 PM
>To: Martin Bjorklund <[email-masked]>
>Cc: "[email-masked]" <[email-masked]>
>Subject: Re: [netmod] Y18: fix "when" expression context node problem
...
>> How can we state that there MUST NOT be any ciruclar references in
>> when expressions?
>>
>>
>This is way too difficult for a compiler to detect.
>It takes somebody (like a YANG doctor) to spot the issue
>and say "change this to a choice-stmt, or use must-stmt instead".

I don't see why it should be substantially more difficult
than, say, detecting indirect circular references in
spreadsheet formulas.  One would need to apply similar
reasoning anyway to unravel ordering dependencies between
various bits and pieces of configuration.

Do you have a case in mind more pathological than that?

Randy

---

From: Andy Bierman <[email-masked]>
Date: Wed, 26 Mar 2014 07:48:22 -0700

On Wed, Mar 26, 2014 at 7:35 AM, Randy Presuhn <[email-masked]
> wrote:

> Do you have a case in mind more pathological than that?
XPath can select values by wildcard, axis, partial string match, etc.
There are many ways to reference a node without specifying it by name.
Even if every node could be identified, it would be complicated to validate
every when-stmt against every other when-stmt to isolate the overlaps.

> Randy
Andy

---

From: Jernej Tuljak <[email-masked]>
Date: Wed, 26 Mar 2014 15:49:37 +0100

> Do you have a case in mind more pathological than that?

Unknown extension XPath functions that return node-sets come to mind. A 
compiler that does not support a specific function could not possibly 
detect a loop since it would not be able to follow certain location 
paths and match them to the data nodes.

Jernej

>
> Randy
>
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod