The Alchemy Project Jay Lepreau Matthew Flatt Eric Eide Alastair Reid John Regehr University of Utah Contract F33615-00-C-1696 October 26, 2001 1 Problem Description Embedded RT software development too difficult, prone to error, expensive System-level programming using components is especially hard Embedded sys, VM, middleware, OS Non-local constraints Need build-time assurance Existing code Performance 2 Project Objectives & Technical Approach Robust, flexible component composition … provides: A mostly static architecture Design rules checked at system build time Aspects implemented using components “Weaving” by composition “Product line” flexibility, increased reuse AOP Architectural clarity Other: Explore new compile-time metaprogramming system as aspect language for Java Cross-layer RT QoS provision 3 Artist’s Conception 4 Knit: Components for C External component definition and linking language Discussed at previous PI meetings Released Feb’01, open source Gaining experience and refining it Version 2 in progress 5 Jiazzi: Components for Java Support for component programming on a large scale Jiazzi components… are not stored in hierarchical namespace. import and export signatures. are parameterized by imports. are defined and composed using an external language. Flexible class extensions (mixins) Groups of related mixin functionality (aspects) 6 Maya: Compile-time Metaprogramming for Java “Macros on crack” Semantic actions in the parser are generic functions Maya “macros” are methods on the generic functions New syntax returned to parser Is hygienic and referentially transparent 7 Maya and AspectJ AspectJ: language support for cross-cutting concerns Maya: compile-time metaprogramming JSE 8 “Task Isolation” in Java For real-time in particular For QoS in general For robustness JSR-121… more later 9 Contribution to PCES Goals Unified model for components and aspects Increased predictability, cross-layer Promote technology adoption Functional and non-functional aspects Design rule checking (constraints) Support product families & evolution in Java & C Java: aspects via components and language Component mining Minimal changes to existing code Usable today: Knit, Jiazzi, Maya: open source 10 Contributions to Military Apps Family of JVMs: the OVM product line Composable RT schedulers Task isolation Resource controls VM services, footprint Object representation Design / configure time assurances Component reuse Principled use of COTS software } } } Predictable, resilient run-time behavior Fit constrained execution envs. Cheaper, faster, better development 11 Military Apps (cont’d) Kernel CPU reservations for UAV OEP Benefits: Increased predictability Isolation of timing faults for C++ soon, Java later Challenges: Param calibration for multithreaded apps Adjustable safety margin Make reservations controllable from remote nodes 12 Military Apps (cont’d) Jiazzi’ed event service in Boeing OEP Java-based ORB (w/ Wash U) Aspect weaving in UAV Java code At compile time using Maya At runtime using Handi-Wrap 13 Metrics Systems metrics: UAV & Linux/RK CPU resv: quantified improvement in predictability OVM product family: footprint SW Engineering metrics Reduced module “coupling” in Jiazzi’ed systems Constraints: fewer incorrect systems composed by students, in a controlled study Mining: quicker to componentize, in a controlled study 14 Project Tasks/Schedule OVM mobile processes as Alchemy components Resource management in OVM w/Alchemy checking Alchemy-configured memory management in OVM Jiazzi + weaver release CPU resv in UAV Maya release Alchemy-configured data layout in OVM Alchemy-configured feature selection in OVM Jiazzi release 2001 Jiazzi + constraint checker Initial OVM as Alchemy components Knit release Blue: tools Black: tool use 15 Technical Progress & Accomplishments 1. Jiazzi: components for Java New release (Aug’01) On-site meeting with OVM team (Sep’01) Applied Jiazzi to OVM “Repository” subsystem OOPSLA paper (Oct’01) 16 Accomplishments (cont’d) 2. Knit: components for C “Shearing” -- extracting code that implements a component Required in order to import and export types Applied to RTLinux apps, the MzScheme VM, and the OSKit 17 Accomplishments (cont’d) 3. Component mining tools and methodology Tools to extract components from existing code Human-guided heuristic process (“lather, rinse, repeat”) Knit/C tools applied to Moab active network OS MzScheme virtual machine OSKit OS components … by 3 different people. Tools improved markedly. Jiazzi/Java next 18 Accomplishments (cont’d) 4. Maya: Metaprogramming for Java Thesis signed (Aug’01) Implemented Handi-Wrap tool for runtime metaprogramming (Sep’01) Initial release (Oct ’01) AOSD paper under review (Oct ’01) 19 Next Milestones Jiazzi CPU reservations in UAV OEP (1Q02) Java “Task” isolation First non-beta release (4Q01) Construct OVM from Jiazzi components (1Q02) RT-Java components (4Q02) G.Back PhD thesis signed (any day!) JSR-121 release (1Q02) Maya PLDI submission (Nov ’01) Integrate with Jiazzi? 20 Collaborations OVM team (Purdue, UMD, SUNY) BBN: CPU reservations across UAV/OS Alchemy-configured feature selection in OVM Deliver RT-JVM components (w/ Purdue) Wash Univ: Jiazzi’ed event service in Boeing OEP’s Java-based ORB 21 Technology Transition/Transfer Software releases & users described earlier: OVM, BBN OEP, Boeing OEP? Sun JSR-121: “pseudo-task” isolation Highly relevant to real-time & robustness Potential alternate base for RT-Java A natural resource boundary OS abstractions, GC mechanisms Long line of OS/lang. research at Utah Utah has leading role in Expert Group Will be in JDK 1.5 (3Q02) Just first stage: control; next: sharing, resource management 22 Program Issues none 23 Utah Alchemy Project DARPA PCES Program www.cs.utah.edu/flux/alchemy 24