DOC PREVIEW
Berkeley ELENG C249A - Modeling and Visualization of CFSM Networks in JavaTime

This preview shows page 1-2-20-21 out of 21 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Modeling and Visualization of CFSM Networks in JavaTimeOutlineIntroductionJavaTime Component PackageThe Abstract Reactive ModelThe javatime.jcp.ar PackageModeling CFSM’s in ARThe javatime.jcp.cfsm PackageEsterel-style Programs in JavaCFSM VisualizationVisualization ProbesAnimation and InstrumentationVisualization ProtocolsAnatomy of a ProtocolMulti-Syntax EditingSlide 16Design ExampleDesign Example - EsterelDesign Example - JavaTimeConclusionsMore ConclusionsModeling and Visualization of CFSM Networks in JavaTi meMichael ShilmanJames Shin YoungEE249 Project PresentationDecember 8, 1998Outline•Introduction•JavaTime Components•Abstract Reactive Model•Modeling of CFSM’s•AR and CFSM JavaTime Packages•Visualization of CFSM Networks•Design Example - Seatbelt Controller•ConclusionsIntroduction•The JavaTime Project–Collection of tools, libraries, and methodologies for embedded systems design.–Use JavaTM, enhanced via packages, as textual design input syntax.–Graphical input syntax and visualization infrastructure.–Common model for system representation•Goals for EE249–Incorporate CFSM model into JavaTime environment.–Describe, visualize, and execute CFSM networks on standard Java platforms.JavaTime Component Package•Components–Central design entities.•Ports–Access points for connecting components.C o n t a i n e rC o m p o n e n tC o n n e c t i o nP o r t•Connections–Relation between ports.•Containers–Hierarchical nesting of components and containersThe Abstract Reactive Model•Components react to all input events.•Events are changes in signal values.•Fully asynchronous communication.–No events happen “at the same time.”•Networks for abstraction–Temporal and structural abstraction –Fundamental-mode asynchronous assumption.–All internal signals converge to a stable value before output is emitted.•Used in JavaTime as building block for describing other models.The jav ati me.jcp.ar Package•ARComponent–User specifies behavior by defining the react(ARPort p, Object v) method.•ARNetwork–Executes components contained within according to semantics of AR model.•ARThread–Enables Esterel-style description of component behavior.public class Foo extends ARComponent { public void react() { // do something }}Modeling CFSM’s in AR•CFSM’s are modeled as AR components with two implicit ports.–Activate input, runnable output•Transitions of CFSM’s controlled by scheduler component.S c h e d u l e rC F S M N e t w o r ka c t i v a t er u n n a b l eC F S MC F S MC F S MThe javati me.jcp.cfsm Package•Implemented using the javatime.jcp.ar package.•CFSM–User specifies behavior by defining transition() method.–eventPresent(Input I) method tests for presence of events.•CFSMNet–Contains a scheduler component responsible for activating CFSM’s.•CFSMThread–Esterel-style input for CFSM’s.public class Bar extends CFSM { public void transition() { // do something }}Esterel-style Programs in Java•Esterel provides compact syntax for synchronous reactive programming.–await, do watching, ||, etc.•Construct similar conveniences in Java.–Provided in ARThread, CFSMThread classes.–await, awaitWatching, methods.–Uses standard Java threads,monitors to implement Esterel-like facilities.–Maintains compatibility with standard Java syntax, tools, and execution platforms.public class Blah extends ARThread { public void run() { while(true) { // do something await(); } }}CFSM Visualization•Focus on infrastructure rather than application–Make it easy to construct visualizations, rather than trying to pre-package all possible visualizations.–Able to develop in parallel with modeling effort.D e s i g nC u s t o mV i s u a l i z a t i o n sE d i t o r sP r o b e s•Our goal: view, edit, and animate component networks at different levels of abstractionVisualization Probes•Components which sample signals to construct visualizations.–Modular and easy to write; drag and drop just like any other component.–Probe to modify network display as system executes, via protocol-based API.Image probes at different stages in a JPEG decoderAnimation and Instrumentation•Listener interface allows monitoring of execution state.•Instrumentation by procedural insertion of probes.–Simple traversal of JCP design hierarchy.•Code instrumentation using JavaTime AST tools.–Create extra output ports to communicate instrumentation results.Visualization Protocols•Software protocols for reusable visualization surfaces.–Support for incremental update.–Read/modification capabilities.•Sample protocols:Protocol Data typesGeometry Shape, color, line thickness, etc.Graph Graph, node, edge.Tuple String, number, tuple.Schematic Component, port, network, connection.Anatomy of a Protocolj a v a t i m e . j c pS c h e m a t i c M o d e l{ n e t , c o m p o n e n t , p o r t , c o n n e c t i o n }{ g r a p h , n o d e , e d g e }{ s h a p e , c o l o r , l i n e , . . . }G r a p hM o d e lV i e wFilters:- scheduler, activate/runnable ports- visualization probesFilters:- scheduler, activate/runnable ports- visualization probesMultiple views:- standard- sketch- ...Multiple views:- standard- sketch- ...Multi-Syntax Editing•Different visual syntax for different models of computation.–Illustrate relationship between different models.CFSM ViewAR ViewDesign Example•Implemented the POLIS seatbelt controller example using javatime.jcp.cfsm package.•Original design–CFSM behavior described with two Esterel modules.–CFSM network described in Ptolemy.•Ported design–CFSM’s described as Java classes.–Network also a Java class.Design Example - Esterelmodule belt_control:input reset, key_on, key_off, belt_on, end_5, end_10;output alarm(boolean), start_timer;loop do emit alarm(false); every key_on do do emit start_timer; await end_5; emit alarm(true); await end_10; watching [key_off or belt_on]; emit alarm(false); end watching resetend.Design Example - JavaTimepublic void run() { Condition watch = new Condition() { public boolean isTrue() { return (eventPresent(_reset) || eventPresent(_keyOff) || eventPresent(_beltOn)); } }; while (true) { try { emit(_alarm,Boolean.FALSE); awaitWatching(_reset); if (eventPresent(_keyOn))


View Full Document

Berkeley ELENG C249A - Modeling and Visualization of CFSM Networks in JavaTime

Documents in this Course
Load more
Download Modeling and Visualization of CFSM Networks in JavaTime
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Modeling and Visualization of CFSM Networks in JavaTime and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Modeling and Visualization of CFSM Networks in JavaTime 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?