List And Single Operator Explicitness Pattern

There is a pattern I've encountered in life that maximizes explicitness and reference-ability. I've used it on TopsTagModelTwo and recommend it for the ItemizedClearLogic recommendation. Basically, "expressions" are reduced to their "thinnest" practical representation, and each "step" is uniquely labelled. Each step is limited to one operator or equivalent. I find it highly useful for documentation, debate logic referencing and dissection, and debugging-like tools. I don't claim to have invented it, but have really found that it clicks for clarity when encountered in various forms for various purposes. If there is a need to break down steps for just about any sequence-able process for clarity, discussion purposes, study and/or dissection, please consider some form of this pattern. (I wish legal-ease at the bottom of those big mortgage and service contracts would use this.)

Rough illustration for an assignment example:

Before:

  x = a + b * c(q,r) + d
After:
  1. t01 = c(q, r)   // user-defined function
  2. t02 = times(b, t01)
  3. t03 = plus(a, t02)
  4. x = plus(t03, d)
Note that sometimes the working "variable names" and step numbers can be combined or substituted for each other to simplify the list. For example, one could do the following with the above:
  t01 = c(q, r)
  t02 = times(b, t01)
  t03 = plus(a, t02)
  t04 = plus(t03, d)
  t05 = assign(x, t04)  // simply puts a copy in t05
--top


See also: AbstractSyntaxTree


CategoryCommunication, CategoryDocumentation


EditText of this page (last edited December 9, 2013) or FindPage with title or text search