Subject: Fw: Divide and Conquer

From: "Lee Beaumont" <[email-masked]>
Date: Wed, 10 Sep 2003 11:11:58 -0400

I am interested in the IRML vs. P debate going on here. With the proposal of P I believe Alex has tackled two problems at once. Perhaps if these are separated, more clarity can lead to more progress. The two problems I see being confounded and addressed are:
1) What style syntax should be used in the language?, and
2) What expressive power should be allowed.

These issues go to the root of the requirements for a rules language, and also involve some parochial preferences.

Regarding syntax, people naturally have a prejudice toward either a verbose (e.g. COBOL and XML) style of syntax, or a preference for a terse style (e.g. C and its derivatives, like java and P). My preference is for the terse "C" style, and I believe the success of "C" gives some broader support to that preference. Perhaps this debate over syntax style can be put on a more objective footing by examining:
1) Ease of writing, 
2) Ease of (human) reading,
3) Availability of editors, visulaizers, and verifiers.
4) ease of machine interpretation, including speed, and size

Related to expressive power, I believe the debate needs to focus first on the types of rules that need to be expressed. For example, can the WG establish a "working set" of "pseudo code (or structured English) rules that need to be accommodated. This might include access control , Anonymization, local preferences, natural language translation and other examples chosen from the OPES documents. Then this working set can be expressed (or not) in IRML and P and the results compared.

I hope this is helpful

Lee Beaumont

---

From: Alex Rousskov <[email-masked]>
Date: Wed, 10 Sep 2003 19:28:59 -0600 (MDT)

Furthermore, in order to move to a conclusion faster, I think we
should start with what you propose last: a good set of specific
examples that rules language can handle. I will try to contribute
some real-world ACL examples soon.

Thank you,

Alex.

On Wed, 10 Sep 2003, Lee Beaumont wrote:

> I am interested in the IRML vs. P debate going on here. With the
> proposal of P I believe Alex has tackled two problems at once.
> Perhaps if these are separated, more clarity can lead to more
> progress. The two problems I see being confounded and addressed are:
>
> These issues go to the root of the requirements for a rules
> language, and also involve some parochial preferences.
>
> Regarding syntax, people naturally have a prejudice toward either a
> verbose (e.g. COBOL and XML) style of syntax, or a preference for a
> terse style (e.g. C and its derivatives, like java and P). My
> preference is for the terse "C" style, and I believe the success of
> "C" gives some broader support to that preference. Perhaps this
> debate over syntax style can be put on a more objective footing by
> examining:
>
> 1) Ease of writing,
> Related to expressive power, I believe the debate needs to focus
> first on the types of rules that need to be expressed. For example,
> can the WG establish a "working set" of "pseudo code (or structured
> English) rules that need to be accommodated. This might include
> access control , Anonymization, local preferences, natural language
> translation and other examples chosen from the OPES documents. Then
> this working set can be expressed (or not) in IRML and P and the
> results compared.
>
> I hope this is helpful
>
> Lee Beaumont
>
>

---

From: Alex Rousskov <[email-masked]>
Date: Thu, 11 Sep 2003 10:20:28 -0600 (MDT)

> some real-world ACL examples soon.

Here is a real-world rule example just posted on one of the mailing
lists for network admins. I think the rules are using F5 (f5.com)
language, but I am not sure. Pasted as-is:

 if ((exists http_cookie JSESSIONID) and http_cookie starts_with "1") {
    use slice1-pool
 } else ((exists http_cookie JSESSIONID) and http_cookie starts_with "2") {
    use slice2-pool
 } else {
    use all-pool
 }

Load balancing is not a 100% OPES application, but here is how the
above could be implemented in P, approximately:

  cookie := Http.message.headers.findCookie("JSESSIONID");

  if (cookie and cookie.value.starts_with("1")) {
    service := Services.find("slice1-pool");
  } else
  if (cookie and cookie.value.starts_with("2")) {
    service := Services.find("slice2-pool");
  } else {
    service := Services.find("all-pool");
  }

  Services.applyOne(service);

Depending on the interpreter, the above P code could be more efficient
that the above F5 code because the cookie header will be looked up
only once, even if its value does not start with "1".

Also note that if graceful handling of absent/down services is
required, the above P code can handle such error in one place (the
last line where the service variable is used) rather than three places
in the original F5 code.

HTH,

Alex.

P.S. Can anybody point me to F5 rule language specification?