cs349 - s10 - Lecture 14
CS349 -
Implementing User Interfaces - Spring 2010
Public Service Annoucements
-
Lecture 14 - Production Systems
Typical User Interfaces
Applications are highly interactive
- Users do a lot of small actions
- Application does a little bit of work in response to each action
Many affordances are available at each moment
- Many paths available out of each state
Affordances are relatively modeless
User interface involve human actions
- Humans are not naturally formal
- Neither are user interfaces
- We want a gentle bridge between formal language and metalanguage
Production Systems
Post Production Systems
- Emil Post, 1931
- model of computation
- extensively used in AI
- used a little in software engineering
Production
- <condition> ==> <action>
- What can be in the condition?
- unprocessed events
- external input
- state information
- formalized: values of variables and expressions
- unformalized: answers to questions
- What can be in an action?
- external output (side effects)
- state changes
- formalized: assign values to variables
- unformalized: actions
Production Systems
Collections of productions that are repeatedly executed every time an
event occurs
Olsen's UI Production System Formalism
Model the states without being explicit about the controller/view
Variables
- called `terms'
- enumerated variables
- test with ==
- assign with =
Events
- preceded by
% (Why? Because it's in the ASCII character
set.)
- E.g.,
%LeftMouseDown
Interacting with the controller/view
- Properties of events known only by the controller/view
- E.g.,
?insideQuitButton
- Tell the controller/view how the presentation should change
- E.g.,
!highlightQuitButton
Side effects
- Changes in the world outside the user interface
- E.g.,
extrudeMoney>
External Inputs
- Changes in the world outside the user interface
- E.g.,
>userTakesMoney
- Not very distinct from events
Examples
The Two-State Button
The Three-State Button
A Text Field
Return to: