Title: Schemas, Patterns, Frames and Knowledge in Systems Development
1Schemas, Patterns, Frames and Knowledgein
Systems Development
2Topics
- Schemas, Patterns and Frames in computing and
psychology - A problem The Police Identity Parade
- Multiple levels of Frames
- Repository
- Simulation
- Decision support
- Matching problems
3Schema in Database
Development
descriptive
What is a route?
service
schema
Domain of Discourse
Use
prescriptive
A route is a
4Database Schema in Use
- Schema has a fixed structure with a set of place
holders to allow variation - A slot for the single destination of all buses on
the route - So a route cant have multiple destinations
- But the last 70 goes to Muller Road Depot, not
Centre - So this will have to be a different route
- Or alter schema to allow over-ride destination in
departure - A Schema structures our perception of the world
- We change the schema when the fit is poor
5Minskys Frames
- Marvin Minsky is one of the fathers of artificial
intelligence - When one encounters a new situation (or makes a
substantial change in one's view of the present
problem) one selects from memory a structure
called a Frame. This is a remembered framework to
be adapted to fit reality by changing details as
necessary - A frame is a data-structure for representing a
stereotyped situation, like being in a certain
kind of living room, or going to a child's
birthday party. Attached to each frame are
several kinds of information. Some of this
information is about how to use the frame. Some
is about what one can expect to happen next. Some
is about what to do if these expectations are not
confirmed. - Thinking always begins with suggestive but
imperfect plans and images these are
progressively replaced by betterbut usually
still imperfectideas. - Marvin Minsky, A Framework for Representing
Knowledge, MIT-AI Laboratory Memo 306, June, 1974
6Gestalt psychology
- Gestalt form pattern shape organised whole
or unit - notion of pre-existing schemata, or
organisational frameworks for structuring
information, as opposed to perception built up
from visual stimulus alone. - In the case of visual perception, a schemata
provides a framework within which external
stimuli are sensible. A frogs visual and motor
system is pre-programmed for fly-recognition
7Design Studies
- Cognitive psychologists observe that for an
experienced analyst designing a familiar object
in a familiar domain, the overall task could be
characterised as being dominated by the retrieval
of previously-stored knowledge (Adelson and
Soloway). - Research by Curtis et al has shown the importance
of domain knowledge in design, where domain
knowledge entails understanding of the problems
which occur in a specific application field and
the tried and tested (and the failed) solutions. - Brown and Chandrasekaran identify the strategy of
'Design by Critiquing and Modifying Almost
Correct Designs' as one of four main design
processes (decomposition, design plans, and
constraint solving are the others).
8Pre-structuring
- Hillier, Musgrove and O'Sullivan suggest that
building design is essentially a matter of
prestructuring problems based on the designer's
knowledge - of solution types
- of the 'latencies of the instrumental set' (the
raw materials time) in relation to solution
types - of informal 'codes' which relate problems to
solution types - it is not a matter of whether the problem is
pre-structured but how it is pre-structured, and
whether the designer is prepared to make this
prestructuring the object of his critical
attention - Hillier Musgrove and OSullivan Knowledge and
Design 1972
9Patterns
- Christopher Alexander and colleagues wrote an
influential collection of 253 patterns for
living good solutions to recurring problems in
architecture. - Language intended to provide a basis for
community architecture - Gamma et al picked up this work and applied it to
the emerging area of Object-oriented Programming. - Provides a language for developers to use within
a project - We need the Observer pattern here
- Pattern conferences develop a rich array of
patterns encapsulating the experience of
developers in many software and organisational
contexts.
10Language Patterns
- Web development requires knowledge of many
languages SQL, PHP, JavaScript, CSS, XHTML - Formal languages have common problems to solve,
but solve them in different ways - e.g. separating natural language (comments) form
the formal language - Sequence, iteration and selection
- Strings
- Arrays
- My Language patterns project is attempting to
create a reference book of language patterns and
their solution in a range of languages
11Jacksons Problem Frames
- An inability to discuss problems explicitly has
been one of the most glaring deficiencies of
software practice and theory. Again and again
writers on development methods claim to offer an
analysis of a problem when in fact they offer
only an outline of the solution, leaving the
problem unexplored and unexplained - Jackson adopts a more formal, analytic approach
to problem analysis and has identified a small
number of Problem Frames. more in a later
lecture
12Some Frames in Information Systems
Resource Management
Case handling
Information Display
Decision Support
WorkPiece
Required Behaviour
Classifying
Commanded Behaviour
Matching
(Jacksons Problem Frames)
Transformation
Repository
13Problem Police Identity Parade (PIP)
- Read overview
- In summary
- Police station has to arrange an identity parade
in which a suspect is placed alongside similar
persons and a witness asked to identify a person
seen at the crime.
14What Kind of System is it?
- a repository of data
- a model of a Domain of Discourse
- a decision support system
- For police officers selecting volunteers
- For the witness identifying persons at the scene
of crime - a co-ordinator of human activity
- a tool for the construction of an artefact
- a learning system
- .....
- Real systems have aspects of several kinds but it
helps to focus of each viewpoint in turn, then
integrate them divide and rule
15Repository Frame (Data Store)
- Common to view an information system as a simple
repository of data. - Data is collected, stored, kept safe from falling
into the wrong hands, from being lost. - Data can be extracted, reorganised, removed if no
longer relevant - Data should only be accepted if it conforms to
rules for good data -integrity rules - Also called CRUD (Create, Retrieve, Update,
Destroy) - Repository may be computer based or in some
other form paper, brain, organization
16Repository Frame in PIP
- In the problem, we need to be able to
- store data about suspects and volunteers
- readily retrieve data when required
- keep the data secure from loss, or access by the
wrong people - Metaphor SYSTEM IS A BANK
17Transformation Frame (Process)
- An input in one format or medium is converted
into an output in another format or medium - Converting from the temperature of a room into a
4 bit digital value - Converting from XML to HTML
- Converting from text to speech
- Converting from printed matter to text (OCR)
- Subsidiary Processes
- Parsing understanding the structure of the input
- Filtering out irrelevant parts of the input
- Merging multiple inputs
- Connecting the output of one transformation to
the input of another - METAPHOR system is a PRODUCTION LINE
18Transformations in PIP
- Volunteer interviewed and physical
characteristics recorded - Facial image captured and transformed to an image
on a screen - Typed statements OCRed
19Information Display(Map) Frame
- System contains a model of the domain of
discourse . This model is used to present
re-organised data about the domain of discourse. - Issues
- How much of the real world to model, in what
detail to support needs of users, now and in the
future? - How to ensure that the model and the real world
stay closely in synchrony - that changes to the
real world (a volunteer moves house) are
reflected in the model (address field updated)
quickly and accurately - How best to represent the model for specific
purposes and audiences - Metaphor SYSTEM IS A MAP
20Information Display in PIP
- How is a suspect to be represented in the system
for the purposes of the PIP? - How is a volunteer to be represented?
- How do we know when a volunteer changes in some
relevant way? - Removes beard
- Moves
- Who should be able to view the suspects details?
21Frame relations
- Information Display Frame uses
- Repository for persistent storage of model
- Transformation
- In mapping real world phenomena into symbols in
the repository - In representing symbols in the repository to
observable phenomena
22Other IS Frames to be explored
- Business Level
- Resource Management
- Case handling
- Decision Support
- Business Transaction
-
- Generic Frames
- Matching
- Classifying
23Resource Managment Frame
- Allocation of scarce resources, such as
- seats on flights
- rooms for lectures
- beds for patients
- volunteers to identity parades
- Problem is to maximise utilisation of resources
whilst minimising delay and inconvenience to
parties - Common Issues
- Granularity of resource units
- Handling time
- Modelling and visualising allocations
- Cancellation policy
- Over-booking policy
- Allocation policy - priorities, up-grading
- A common sub-problem is to match a clients needs
to available resources
24Matching situations
- From the easy to the very hard
- A word to a dictionary of valid words
- A poorly typed word to a dictionary of valid
words - T9 speedtexting
- A customer on the phone to bank accounts
- De-duping mailing lists
- CD DB - CD recognition
- Shazam sound sample matching
- COTS selection
- IS development approach selection
25Matching Frame
- Matching typically involve
- A Requirement and multiple Resources
- the sample of music / suspect - Requirement
- the database of tracks /volunteers Resources
- adequate representations of both
- A definition of how to measure how well matched a
Requirement is to a Resource - A process to select the best match
- Automated lt gt human
- One-off ltgt iterative
26Anagrams
- Find an anagram for an English word
- ORCHESTRA
- Matching function
- Break word into letters and sort the letters
- ACEHORRST
- Match with a dictionary in which all words have a
sorted letters field - CARTHORSE
- HORSECART
27Shazam - 2580
- Shazam is a mobile phone application
- It can recognise 1.7 million tracks from a 30 sec
sample new tracks added at 5,000 a week - The track details are texted back within about
30secs - It costs 50p 9p call charge (surcharge only if
successful) - Your personal page shows the tracks you have
tagged - www.shazam.com
28CD DB
- Database of 2.5 million CDs, track details and
supporting matter run by gracenote
(www.gracenote.com) - Used by media players to obtain track info
- Player sends signature of CD sequence of track
lengths in 1/4sec to match against the database
(via HTTP) - Application searches DB for best match and
returns track info to media player. - Matching algorithm described in US Patent
6,061,680
29De-duping
A catalogue from OReilly
C Wallace West England University Coldharbour
Lane Frenchay Bristol BS16 1QY
Ms C Wallace Univ. of the West of
England Frenchay Campus Coldharbour
Lane Bristol BS16 1QY
One person or two?
Mailing lists are reported with 25 40
duplicates.
30Commercial Of the Shelf Software (COTS)
- Software exists for most business needs
- payroll
- order processing
- general ledger
- human resources
- e-commerce
- e.g. SAP, SAGE ..
- Analysts need to match business needs to COTS
capability, and customise generic software for
local business rules.
31Police ID parade
- Currently
- Suspect matched to Volunteers visually by officer
- Information System
- Suspect and Volunteers modelled in database
- System provides list of matching volunteers
32Frame Approach to Development
- Rough description of Problem
- Select suitable Frame(s) to fit Problem
- A well-fitting Frame provides
- standard terminology
- checklist of issues which need to be addressed,
questions which need to be asked - index of solutions to commonly occurring
sub-problems - Frame allows us to draw upon relevant prior
knowledge of this problem type - Identifying appropriate Frames is a Matching
Problem!
33Tutorial Questions
- PIP
- Identify aspects of the Police Identity Parade
problem which map into these Frames - Repository
- Information Display
- Resource Management
- Matching
- What analysis questions do these frames suggest?
- What is left out?
- Matching
- Suggest 3 other applications whose core frame is
matching