Modeling and Visualization of CFSM Networks in JavaTime - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Modeling and Visualization of CFSM Networks in JavaTime

Description:

Use JavaTM, enhanced via packages, as textual design input syntax. ... All internal signals converge to a stable value before output is emitted. ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 22
Provided by: jamessh9
Category:

less

Transcript and Presenter's Notes

Title: Modeling and Visualization of CFSM Networks in JavaTime


1
Modeling and Visualization of CFSM Networks in
JavaTime
  • Michael Shilman
  • James Shin Young
  • EE249 Project Presentation
  • December 8, 1998

2
Outline
  • Introduction
  • JavaTime Components
  • Abstract Reactive Model
  • Modeling of CFSMs
  • AR and CFSM JavaTime Packages
  • Visualization of CFSM Networks
  • Design Example - Seatbelt Controller
  • Conclusions

3
Introduction
  • 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.

4
JavaTime Component Package
  • Components
  • Central design entities.
  • Ports
  • Access points for connecting components.
  • Connections
  • Relation between ports.
  • Containers
  • Hierarchical nesting of components and containers

5
The 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.

6
The javatime.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

7
Modeling CFSMs in AR
  • CFSMs are modeled as AR components with two
    implicit ports.
  • Activate input, runnable output
  • Transitions of CFSMs controlled by scheduler
    component.

8
The javatime.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 CFSMs.
  • CFSMThread
  • Esterel-style input for CFSMs.

public class Bar extends CFSM public
void transition() // do something
9
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()

10
CFSM Visualization
  • Our goal view, edit, and animate component
    networks at different levels of abstraction
  • 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.

11
Visualization 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 decoder
12
Animation 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.

13
Visualization Protocols
  • Software protocols for reusable visualization
    surfaces.
  • Support for incremental update.
  • Read/modification capabilities.
  • Sample protocols

14
Anatomy of a Protocol
Multiple views - standard - sketch - ...
Filters - scheduler, activate/runnable ports -
visualization probes
15
Multi-Syntax Editing
  • Different visual syntax for different models of
    computation.
  • Illustrate relationship between different models.

CFSM View
AR View
16
(No Transcript)
17
Design 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
  • CFSMs described as Java classes.
  • Network also a Java class.

18
Design Example - Esterel
  • module 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 reset
  • end.

19
Design Example - JavaTime
  • public 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)) try
emit(_startTimer) awaitWatching(_end5,
watch) emit(_alarm,Boolean.TRUE)
awaitWatching(_end10, watch)
catch (WatchException e) if
(eventPresent(_reset)) throw e
emit(_alarm,Boolean.FALS
E) catch (WatchException e)

20
Conclusions
  • Java as an input syntax for reactive systems.
  • Resulting specification not as concise as
    Esterel...
  • but provides compatibility with standard Java
    tools.
  • Programming language extensions as packages.
  • Extends utility of a language without
    compromising compatibility.
  • Avoid high overhead of new language development
    a good option for niche domains.
  • Relationship between AR and CFSM models.
  • CFSM networks can be modeled as AR systems.
  • The reverse is probably also true.

21
More Conclusions
  • Visual editing and animation of systems
  • Multi-syntax editing reveals relationship between
    models of computation.
  • Software protocols enable rapid development of
    interactive visualizations.
  • Visualization probes simplify user-level
    construction of visualizations.
Write a Comment
User Comments (0)
About PowerShow.com