Title: Automated Software Engineering with Concurrent Class Machines
1Automated Software Engineering with Concurrent
Class Machines
Radu Grosu SUNY at Stony Brook joint work with Y.
Liu, S. Smolka, S.Stoller, J. Yan SUNY at Stony
Brook
2Motivation (ASE)
- Automated OO software development method
- OO language for req.specification/modeling/implem
, - transition semantics capturing OO constructs,
- trace semantics supporting compositional
refinement, - analysis exploiting OO structure,
- generation of optimized (and monitored) code.
- Close the gap between
- object oriented methods (UML,OMT,),
- formal methods (Model Checking, Static
Analysis,).
3Concurrent Class Machines (CCM)
- Modeling language for concurrent OO systems
- classes, inheritance, objects, object creation
- methods, exceptions, multithreading,
- abstract collection types, nondeterminism.
- 2. Observational trace semantics
- class machine refinement,
- modular reasoning.
- 3. Code generation and analysis
- prototype code generation.
- exploits the hierarchy information (in progress),
4Readers/Writers Problem
Resource
Class Diagram
res
m
Monitor
1
1
m
Client
WrCap
5Classes
attributes
Monitor
Call entry point
return exit point
methods
Method signature
6Transitions
Monitor
transition (atomic)
guard (blocking)
assignments (parallel)
method can be declared atomic
7Call Hierarchy (Boxes)
RdCap
local variables
return expression
choice point (nondeterminism)
return variable
method invocation box
object creation box
exception exit point
8Concurrency
Client extends Thread
-m Monitor
main() void r Resource c Client
new Resource
r
m
c.start
new Monitor(r)
run() void
thread start box
thread run method
9Operational Semantics
Transition system A (S, s0, ?)
10Method Invocation Box
Client
-m Monitor
run() int r Resource i int
i
b
v
v
11Method Invocation Box (Call)
Client
-m Monitor
run() int r Resource i int
i
b
v
v
12Method Invocation Box (Return)
Client
-m Monitor
run() int r Resource i int
i
b
v
v
13Environment (Interface) Objects
Static vars, streams
Allow compositional modeling reasoning
- Their body is not known and not part of ?
- Allow any update of public objects. The latter
are - determined via an escape analysis.
14Denotational Semantics
- Execution of CCM m
- s0-gt s1-gt s2-gt -gt sn
- si-gt si1 is a CCM transition in ? or
- si-gt si1 is an environment transition.
- Set of Traces Lm of m
- Projection of executions on global variables.
- Object escape analysis is necessary.
- Refinement m lt n
- Inclusion of the sets of traces Lm ? Ln
- Compositional w.r.t. beh/arch hierarchies.
15Modular Reasoning
lt
N
N
N
N
lt
N
N
lt
M
M
M
M
Sub-CCM refinement
Super-CCM refinement
16Wrap Up
- Modeling language for concurrent OO systems
- classes, inheritance, objects, object creation
- methods, exceptions, multithreading,
- abstract collection types, nondeterminism.
- 2. Observational trace semantics
- class machine refinement,
- modular reasoning.
- 3. Code generation and analysis
- prototype code generation.
- exploits the hierarchy information (in progress),