next up previous
Next: Local Propagation and Rule Up: Background Previous: The Need for Domain-Specific


PowerForms Language

PowerForms [7] is one such language for declarative specification of field formats and interdependencies in a XML-like language that has been designed for incremental input validation. The format specification for a named textual field is expressed as a standard regular expression. More information about PowerForms can be found in [10] [26]. This expression is then converted to a minimised deterministic finite automata and the states of the automaton are used to show the validity status of a field. The field with the associated automata is annotated with a traffic light icon displaying red, yellow or green light corresponding to whether the automaton is in crash, reject or accept state when run on the field value as input. Formally, let L denote the set of strings accepted by the finite automata associated with a particular field format and v be the current field value the three possible states are described as: A format for a field that can only accept 3-digit positive integers can be specified as:
  < constraint field="B1">
    < repeat count="3">
       < charrange id="number" low="0" high="9"/>
    </ repeat>
  </ constraint>

Figure 2 shows a form field for which valid values are field values that conform to the above format specification. This field when given a decimal value is shown invalid by means of a red light.

Figure 2: Field validation in PowerForms.
\includegraphics[scale = 0.8, keepaspectratio]{single.eps}

Any auto-completion mechanism should ensure that auto-completed fields have values that conform to the specified field formats. For instance in our purchase order example we would not like to deduce price if a user enters a negative item quantity. The traffic lights also makes a user aware that a field has been auto-completed by reflecting the change in states of the associated automaton as a result of auto-completion.


next up previous
Next: Local Propagation and Rule Up: Background Previous: The Need for Domain-Specific
Sunil Kothari 2006-04-29