Title: Software Engineering, Collaborative Systems, other stuff
1Software Engineering, Collaborative Systems,
other stuff
- David Stotts
- Dept. of Computer Science
- Univ. of North Carolina at Chapel Hill
- August2003
2Recent Projects
- JAX/AJAX Informal formal methods for regression
testing - HUnit Automated regression testing for Haskell
- Ovaltine/Ovid Hypermedia links in real-time
video - CobWeb Model Checking coordination protocols
- EDPs and Design Pattern discovery
- DeCo Environmental modeling and federation
- dPP/dXP Collaborative, agile software
development - Transparent video facetop
3Research Projects
- Design Pattern discovery
- DeCo Federated Scientific Models
- dPP/dXP distributed Pair Programming
- Transparent Video Facetop
4Elemental Design Patterns and Design
Pattern Discovery
5Example Pattern
Comp 204 fall
6In reality, they look like this
// Composite pattern -- Structural example using
Systemusing System.Textusing
System.Collections// "Component"abstract
class Component // Fields protected string
name // Constructors public Component(
string name ) this.name name //
Methods abstract public void Add(Component
c) abstract public void Remove( Component c
) abstract public void Display( int depth
)// "Composite"Class Composite
Component // Fields private ArrayList
children new ArrayList() // Constructors
public Composite( string name ) base( name )
// Methods public override void Add(
Component component ) children.Add( component
) public override void Remove( Component
component ) children.Remove( component )
public override void Display( int depth )
Console.WriteLine( new String( '-', depth )
name ) // Display each of the node's
children foreach( Component component in
children ) component.Display( depth 2
)
// "Leaf"class Leaf Component //
Constructors public Leaf( string name ) base(
name ) // Methods public override void
Add( Component c ) Console.WriteLine("Cannot
add to a leaf") public override void
Remove( Component c ) Console.WriteLine("Canno
t remove from a leaf") public override void
Display( int depth ) Console.WriteLine( new
String( '-', depth ) name ) public class
Client public static void Main( string args
) // Create a tree structure Composite
root new Composite( "root" ) root.Add( new
Leaf( "Leaf A" )) root.Add( new Leaf( "Leaf
B" )) Composite comp new Composite(
"Composite X" ) comp.Add( new Leaf( "Leaf
XA" ) ) comp.Add( new Leaf( "Leaf XB" )
) root.Add( comp ) root.Add( new Leaf(
"Leaf C" )) // Add and remove a leaf
Leaf l new Leaf( "Leaf D" ) root.Add( l
) root.Remove( l ) // Recursively
display nodes root.Display( 1 )
7Or this
// Purpose. Composite //
Strategy. Use recursive composition
// to create a
heterogeneous aggregate include ltstring.hgt
// that can be treated
homogeneously. enum NodeType FileT, DirT
// int g_indent 0
// Benefit. No more type checking and
// type casting
(coupling between Dir class File
// and File is gone, Dir is
only public //
coupled to abstract base class) File( char n
) type_ FileT strcpy( name_, n )
class AbsFile NodeType getType()
return type_ public void ls()
virtual void ls() 0 for
(int i0 i lt g_indent i) protected
cout ltlt ' ' char
name_20 cout ltlt name_ ltlt endl
static int indent_ private
NodeType type_
int AbsFileindent_ 0 char
name_20
class File public AbsFile
public class Dir
File( char n ) public
strcpy( name_,
n ) Dir( char n ) type_ DirT
void ls() strcpy( name_, n ) total_ 0
for (int i0 i lt indent_ i)
NodeType getType() return type_
cout ltlt ' ' void add( File f )
cout ltlt name_ ltlt endl
files_total_ f void
ls() class Dir
public AbsFile for (int i0 i lt
g_indent i) public cout ltlt ' '
Dir( char n ) cout ltlt
name_ ltlt "" ltlt endl strcpy( name_, n
) total_ 0 g_indent 3
void add( AbsFile f ) for (int
i0 i lt total_ i) files_total_
f if (files_i-gtgetType()
void ls() DirT)
for (int i0 i lt indent_ i)
((Dir) files_i)-gtls() cout ltlt '
' else
cout ltlt name_ ltlt "" ltlt endl
files_i-gtls() indent_ 3
g_indent - 3 for
(int i0 i lt total_ i) private
files_i-gtls()
NodeType type_
indent_ - 3 char name_20
private File files_10
AbsFile files_10 int
total_ int
total_
void main( void ) void
main( void )
Dir one("1"), two("2"), thr("3")
Dir one("1"), two("2"), thr("3") File
a("a"), b("b"), c("c"), File a("a"),
b("b"), c("c"), d("d"), e("e")
d("d"), e("e") one.add( a )
one.add( a )
one.add( (File) two ) one.add(
two ) one.add( b )
one.add( b ) two.add( c )
two.add( c ) two.add( d )
two.add( d ) two.add(
(File) thr ) two.add( thr )
thr.add( e ) thr.add(
e ) one.ls()
one.ls()
8Or this
(defgeneric add-dependent (dm dependent
ampoptional recursivep) see below for the
optional args (documentation quotAdd
DEPENDENT as a dependent of DM. Return
DMquot)) (defgeneric delete-dependent (dm
dependent ampoptional recursivep)
(documentation quotRemove DEPENDENT from
DM. Return DMquot)) No DELETE-DEPENDENT-IF
(defgeneric map-dependents (f dm)
(documentation quotMap F over the
dependents of DM. Return DMquot)) No
cursors. (defgeneric make-collection-for-dependen
t-mixin (dm)) (defclass dependent-mixin ()
something that has dependents. We expose the
DEPENDENTS slot. ((dependents reader
dependents-of))) (defmethod make-collection-for-d
ependent-mixin ((dm dependent-mixin))
(make-instance 'simple-childed-mixin)) (defmethod
initialize-instance after ((dm dependent-mixin)
ampkey) (setf (slot-value dm
'dependents) (make-collection-for-dependent-mixin
dm))) (defmethod add-dependent ((dm
dependent-mixin) dependee ampoptional
recursivep) (declare (ignorable recursivep))
(add-child (dependents-of dm) dependee)
dm) (defmethod delete-dependent ((dm
dependent-mixin) dependee ampoptional
recursivep) (declare (ignorable recursivep))
(delete-child (dependents-of dm) dependee)
dm) (defmethod map-dependents (f (dm
dependent-mixin)) (map-over f (dependents-of
dm)) dm)
9Patterns Intertwingled
- All non-trivial designs
- involve many
- cross-mixed
- patterns
Same class might be a component in 4 or 5
patterns
10Redirect In Family
11Redirect In Family Isotope
12SPQR System
Source code
gcc
gcc2oml
gcc parse tree
object XML
oml2otter
Source-code-specific otter clauses
Found patterns report
Rho calculus compos rules
EDP catalog
python
Otter theorem prover
Otter proofs
13Extended Example
14Rho Calculus Definitions
15Found Patterns
16Object Recursion - Annotated
17Decorator Pattern
18Decorator - Annotated
19Architecture for Federated Environmental Modeling
- Atmosphere, Meterology, Hydrology, Soil
Chemistry, Geology, Marine Biology... - Different research communities, specialties
- Different models different mathematics
different abstractions and domains of
discourse... different software architectures - Limited interactions, difficult information
exchange
20Multi-media Modeling
- To EnviSci this means dirt AND air AND
watersheds in one analytical context - Currently done with manual data communications
I ask you for some rainfall data from your
atmosphere model I take it and make an input
file in the format my soil model needs to
generate runoff data for an estuary model... - Further complications to get me some rain data,
you may need from my soil model some evaporation
data feedback loops
21Multi-media Modeling
Air model
Water model
soil model
22Not so fast...
- spatial scale mismatch
- time scale mismatch
- mathematical method mismatch (finite elements vs.
pdes vs. genetic algs vs. simulated annealing,
e.g.) - Error tracking and bounding during execution
23Multi-media Modeling
Air model
5 minute steps
Water model
3 hour steps
soil model
1 month steps
24Multi-media Modeling
Mismatch management module
Air model
5 minute steps
Water model
3 hour steps
soil model
1 month steps
25DeCo
- Functional layer (Haskell) for gluing together
environmental (scientific) models, handling
mismatches in data, timing, space scale - Current trials
- Neuse river hydro model (Alperin)
- Sedimentation model (Bowen)
- Together can answer questions like
- If we dump X tons of substance Y in the Neuse at
New Bern in May, what concentration of Y will we
find 6 cm deep in the mud at the river mouth 6
months later? - Herington MS Thesis
26New Areas
- Human lung model biochemistry, fluid dynamics,
protein motors and cilia mechanics, cell
physiology for cystic fibrosis research
27New Areas
- Bioinformatics
- searching genome databases with disparate set of
tools each tool used for a partial solution, and
one tool producing as output the data needed as
input for another
28Project Goals
- Modular framework for scientific model
interconnection and interoperation - Methods of composing models
- Support for distributed model data and net-based
model execution
29Distributed Pair Programming and
Collaborative Software Engineering
30Extreme Programming (XP)
- Lightweight development process
- Test-first development, rapid spin cycle,
client-centered requirements - Code Refactoring
- Pair Programming
- COMP 290 spring
31?? Distributed XP ??
- What if the programmer pairs are not co-located?
- Are productivity benefits of XP maintained?
- PCAnywhere, collaboration tools
- Joint experiments with Laurie Williams (NCSU)
32Findings
- Distance matters is a truism among
collaborative systems researchers ( Olson
Olson ) - Studies of graduate programmers (136, 16, 12, 2)
- Paired, non-paired, co-located, distributed
We are finding that distance doesnt always
matter doesnt matter as much as thought
33Video-Enhanced Environment
- In all studies, dPP programmers say
- we need a whiteboard
- we miss facial expressions
- we cant point at what we are sharing
- We are constructing a video-enhanced dPP
environment to address these issues
34Environment Schematic
Right-hand user, can reach from seat, write on
projected digital whiteboard
Shared PC projection
projector
keyboard, etc.
Partner / whiteboard
projection
programmer
camera
projector
35Alternatives
Partner projection
Shared PC projection
Less useful for whiteboard , Perhaps more
effective with multi-screen unified wide display
keyboard, etc.
camera
programmer
projector
projector
3690º Projector Setup
Daily use 2 PCs switched between 2 projectors and
a monitor
dPP use Both projectors at once, one for
communication, one for shared PC desktop
37Solving the Pointing Problem
Vis-a-vid Transparent Video FaceTop
Single-user track finger, drive mouse, self-image
provides cues not found in other UIs
Collaborative put two people on one shared
screen, Each sees the other pointing
38VaV Mac Prototype Demo
39Come join us in our Lab
40End of Presentation