1 / 16

Automated Software Engineering with Concurrent Class Machines

Automated 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. Motivation (ASE). Automated OO software development method: OO language for req.specification/modeling/implem,

Download Presentation

Automated Software Engineering with Concurrent Class Machines

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Automated 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

  2. Motivation (ASE) • Automated OO software development method: • OO language forreq.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,…).

  3. Concurrent 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),

  4. Readers/Writers Problem RdCap Thread Resource Class Diagram res m Monitor 1 * 1 m * Client WrCap

  5. Classes res: Resource; -free: boolean; ar: int; +Monitor(r:Resource) +acqRd(): void +acqWr(): void +relRd(): void +relWr(): void attributes Monitor Call entry point return exit point methods Method signature

  6. res: Resource; -free: boolean; ar: int; +Monitor(r:Resource) +acqRd() free | ar > 0 -> free := false; ar := ar+1 +acqWr() +relRd() +relWr() Transitions Monitor transition (atomic) guard (blocking) assignments (parallel) method can be declared atomic

  7. Call Hierarchy (Boxes) -m: Monitor; -inCS: boolean; +RdCap(m:Monitor) +acq():void throws MonExc +rel():void throws MonExc new MonExc +read():int throws MonExc v: int;e:MonExc v inCs e ! inCS e v m.res.read() RdCap local variables return expression choice point (nondeterminism) return variable method invocation box object creation box exception exit point

  8. Concurrency c.start c c new Client(m) new Client(m) 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

  9. Operational Semantics Ctrl Stack Ctrl Stack Frame Stack Frame Stack Ctrl Stack Ctrl Stack Frame Stack Frame Stack ni f’0k0 fiki ni fiki f0k0 n0 n’0 f0k0-1 fiki-1 biki fiki-1 f0k0-1 biki b0k0 b0k0 … … … … … … t0 … … … … bi1 f00 fi0 fi0 f00 bi1 b01 b01 t0:Thread t0:Thread ti:Thread ti:Thread … … Attr’t0 Attrt0 … … Attrti Attrti Object Pool Object Pool Transition system A* = (S, s0, )

  10. Method Invocation Box Ctrl Stack Frame Stack b.c f … … r.read() RResource Resource +read(): int +read(): int Client -m: Monitor +run(): int r: Resource; i: int i b v v

  11. Method Invocation Box (Call) Ctrl Stack Frame Stack b.c f … … r.read()  RResource Resource c fb +read(): int +read(): int b f … … Ctrl Stack Frame Stack Client -m: Monitor +run(): int r: Resource; i: int i b v v

  12. Method Invocation Box (Return) Ctrl Stack Frame Stack b.r f[v/i] … … r.read()  RResource Resource r fb +read(): int +read(): int b f … … Ctrl Stack Frame Stack Client -m: Monitor +run(): int r: Resource; i: int i b v v

  13. Environment (Interface) Objects Client Ctrl Stack Frame Stack -m: Monitor b.r f[v/i] +run(): int r: Resource; i: int … … i r.read() b Resource v +read(): int 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.

  14. Denotational Semantics • Execution of CCM m • s0-> s1-> s2->… -> sn • si-> si+1 is a CCM transition in  or • si-> si+1 is an environment transition. • Set of Traces Lm of m • Projection of executions on global variables. • Object escape analysisis necessary. • Refinement m < n • Inclusion of the sets of tracesLm  Ln • Compositionalw.r.t.beh/arch hierarchies.

  15. Modular Reasoning M M’ = < lfp N N M < N M M’ M’ < N M Fixpoint induction < N’ N N’ N < N N < M M’ M M Sub-CCM refinement Super-CCM refinement

  16. Wrap 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),

More Related