欢迎来到麦多课文档分享! | 帮助中心 海量文档,免费浏览,给你所需,享你所想!
麦多课文档分享
全部分类
  • 标准规范>
  • 教学课件>
  • 考试资料>
  • 办公文档>
  • 学术论文>
  • 行业资料>
  • 易语言源码>
  • ImageVerifierCode 换一换
    首页 麦多课文档分享 > 资源分类 > PPT文档下载
    分享到微信 分享到微博 分享到QQ空间

    Actor-Oriented Design- A focus on domain-specific languages.ppt

    • 资源ID:378017       资源大小:1.29MB        全文页数:41页
    • 资源格式: PPT        下载积分:2000积分
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    二维码
    微信扫一扫登录
    下载资源需要2000积分(如需开发票,请勿充值!)
    邮箱/手机:
    温馨提示:
    如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如需开发票,请勿充值!如填写123,账号就是123,密码也是123。
    支付方式: 支付宝扫码支付    微信扫码支付   
    验证码:   换一换

    加入VIP,交流精品资源
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    Actor-Oriented Design- A focus on domain-specific languages.ppt

    1、Actor-Oriented Design: A focus on domain-specific languages for embedded systems,Edward A. Lee Professor, UC Berkeley Director, Center for Hybrid and Embedded Software Systems (CHESS),Formal Methods and Models for Codesign (MEMOCODE2004) June 22-25, 2004 San Diego, California,Abstract,Concurrent, do

    2、main-specific languages such as Simulink, LabVIEW, Modelica, VHDL, SystemC, and OPNET provide modularization mechanisms that are significantly different from those in prevailing object-oriented languages such as C+ and Java. In these languages, components are concurrent objects that communicate via

    3、messaging, rather than abstract data structures that interact via procedure calls. Although the concurrency and communication semantics differ considerably between languages, they share enough common features that we consider them to be a family. We call them actor-oriented languages. Actor-oriented

    4、 languages, like object-oriented languages, are about modularity of software. I will argue that we can adapt for actor-oriented languages many (if not all) of the innovations of OO design, including concepts such as the separation of interface from implementation, strong typing of interfaces, subtyp

    5、ing, classes, inheritance, and aspects. I will show some preliminary implementations of these mechanisms in a Berkeley system called Ptolemy II.,The Questions,Is this a good way to do design? How does it relate to prevailing SW engineering? Does it support abstraction and modularity? Will it scale?

    6、Can it become mainstream?,Platforms,A platform is a set of designs.Relations between platforms represent design processes.,big gap,Progress,Many useful technical developments amount to creation of new platforms.microarchitecturesoperating systemsvirtual machinesprocessor coresconfigurable ISAs,Recen

    7、t Action,Giving the red platforms useful modeling properties (e.g. verification, SystemC, UML, MDA)Getting from red platforms to blue platforms (e.g. correctness, efficiency, synthesis of tools),Better Platforms,Platforms with modeling properties that reflect requirements of the application, not acc

    8、idental properties of the implementation.,How to View This Design,From above: Signal flow graph with linear, time-invariant components.,From below: Synchronous concurrent composition of components,Actor-Oriented Platforms,Actor oriented models compose concurrent components according to a model of co

    9、mputation.Time and concurrency become key parts of the programming model.,Actor-Oriented Design,Actor Orientation vs. Object Orientation,Identified limitations of object orientation: Says little or nothing about concurrency and time Concurrency typically expressed with threads, monitors, semaphores

    10、Components tend to implement low-level communication protocols Re-use potential is disappointing,OO interface definition gives procedures that have to be invoked in an order not specified as part of the interface definition.,actor-oriented interface definition says “Give me text and Ill give you spe

    11、ech”,Actor oriented,Object oriented,The First (?) Actor-Oriented Programming Language The On-Line Graphical Specification of Computer Procedures W. R. Sutherland, Ph.D. Thesis, MIT, 1966,MIT Lincoln Labs TX-2 Computer,Bert Sutherland with a light pen,Partially constructed actor-oriented model with a

    12、 class definition (top) and instance (below).,Bert Sutherland used the first acknowledged object-oriented framework (Sketchpad, created by his brother, Ivan Sutherland) to create the first actor-oriented programming framework.,Your Speaker in 1966,Modern Examples of Actor-Oriented Component Framewor

    13、ks,Simulink (The MathWorks) Labview (National Instruments) Modelica (Linkoping) OPNET (Opnet Technologies) Polis & Metropolis (UC Berkeley) Gabriel, Ptolemy, and Ptolemy II (UC Berkeley) OCP, open control platform (Boeing) GME, actor-oriented meta-modeling (Vanderbilt) SPW, signal processing worksys

    14、tem (Cadence) System studio (Synopsys) ROOM, real-time object-oriented modeling (Rational) Easy5 (Boeing) Port-based objects (U of Maryland) I/O automata (MIT) VHDL, Verilog, SystemC (Various) ,Except Ptolemy, all of these define a fixed model of computation.,Ptolemy II Framework for Experimenting w

    15、ith AO Design,Basic Ptolemy II infrastructure:,Actors in 2004: “Capsules” (UML-RT) and “Composite Structures” (UML-2),UML-RT borrowed from Selics ROOM the notion of “capsules,” which structurally look like actors.UML-2 is introducing the notion of “composite structures,” which also look like actors.

    16、UML capsules and composite structures specify abstract syntax (and a concrete syntax), but no semantics.What this says is that there is huge potential for actor-oriented design to be done wrong,Why Use the Term “Actors”,The term “actors” was introduced in the 1970s by Carl Hewitt of MIT to describe

    17、autonomous reasoning agents.The term evolved through the work of Gul Agha and others to refer to a family of concurrent models of computation, irrespective of whether they were being used to realize autonomous reasoning agents.The term “actor” has also been used since 1974 in the dataflow community

    18、in the same way, to represent a concurrent model of computation.But UML uses the term “actor” in its use cases.,Does Actor-Oriented Design Offer Best-Of-Class SW Engineering Methods?,Abstraction procedures/methods classes Modularity subclasses inheritance interfaces polymorphism aspects Correctness

    19、type systems,Example of an Actor-Oriented Framework: Simulink,Observation,By itself, hierarchy is a very weak abstraction mechanism.,Tree Structured Hierarchy,Does not represent common class definitions. Only instances.Multiple instances of the same hierarchical component are copies.,hierarchical co

    20、mponent,leaf components: instances of an OO class,Alternative Hierarchy: Roles and Instances,class,role hierarchy (“design-time” view),one definition, multiple containers,Role Hierarchy,Multiple instances of the same hierarchical component are represented by classes with multiple containers.This mak

    21、es hierarchical components more like leaf components.,hierarchical class,A Motivating Application: Modeling Sensor Networks,These 49 sensor nodes are actors that are instances of the same class, defined as:,Making these objects instances of a class rather than copies reduced the XML representation o

    22、f the model from 1.1 Mbytes to 87 kBytes, and offered a number of other advantages.,Model of Massimo Franceschettis “small world” phenomenon with 49 sensor nodes.,Subclasses, Inheritance? Interfaces, Subtypes? Aspects?,Now that we have classes, can we bring in more of the modern programming world? s

    23、ubclasses? inheritance? interfaces? subtypes? aspects?,Example Using AO Classes,instance,instance,subclass,inherited actors,override actors,local class definition,execution,Inner Classes,Local class definitions are important to achieving modularity.,Ordering Relations,Mathematically, this structure

    24、is a doubly-nested diposet, the formal properties of which help to define a clean inheritance semantics. The principle we follow is that local changes override global changes.,Defining Actor Interfaces: Ports and Parameters,input ports,output port,p1,p2,p3,parameters:,a1 = value,a2 = value,input/out

    25、put port,port,Example:,Actor Subtypes,a1: Int = value,p3: Double,p1: Int,Example of a simple type lattice:,Covariant,Contravariant,Actor Subtypes (cont),a1: Int = value,p3: Double,p1: Int,p3: Int,Remove (ignore) or add parameters,subtype relation,p4: Double,Remove (ignore) input ports,Add output por

    26、ts,Subtypes can have:Fewer input portsMore output portsOf course, the types of these can have co/contravariant relationships with the supertype.,Observations,Subtypes can remove (or ignore) parameters and also add new parameters because parameters always have a default value (unlike inputs, which a

    27、subtype cannot add)Subtypes cannot modify the types of parameters (unlike ports). Co/contravariant at the same time.PortParameters are ports with default values. They can be removed or added just like parameters because they provide default values.Are there similar exceptions to co/contravariance in

    28、 OO languages?,Composing Actors,A connection implies a type constraint. Can:,Source,in: Int,Sink,out: Int,in: Double,out: Int,in: Unknown,out: Int,check compatibility,perform conversions,infer types,The Ptolemy II type system does all three.,What Happens to Type Constraints When a Subclass Adds Conn

    29、ections?,Type resolution results may be different in different subclasses of the same base class (connection with let-bound variables in a Hindley-Milner type system?),Source,Sink,t1 = t2,BaseClass,t1,t2,Abstract Actors?,Suppose one of the contained actors is an interface only. Such a class definiti

    30、on cannot be instantiated (it is abstract). Concrete subclasses would have to provide implementations for the interface.Is this useful?,Implementing Multiple Interfaces An Example,energy: Double,EnergyConsumer interface has a single output port that produces a Double representing the energy consumed

    31、 by a firing.,in: Event,Event is a peculiar type that can yield a token of any type. It is the bottom of the type lattice.,A Model Using Such an Actor,out: Double,out: Double,power: Double,in: Double,EnergyConsumingFilter,Source,in: Double,in: Double,Sink,EnergyTabulator,Heterarchy? Multi-View Model

    32、ing? Aspects?,This is multi-view modeling, similar to what GME (Vanderbilt) can do.,Is this an actor-oriented version of aspect-oriented programming?,Recursive Containment Can Hierarchical Classes Contain Instances of Themselves?,class,role hierarchy,instance hierarchy,class,instance,instance,instan

    33、ce,Note that in this case, unrolling cannot occur at “compile time”.,Early Realization of this in Ptolemy Classic,FFT implementation in Ptolemy Classic (1995) used a partial evaluation strategy on higher-order components.,recursive reference,Conclusion,Actor-oriented design remains a relatively immature area, but one that is progressing rapidly.It has huge potential.Many questions remain,


    注意事项

    本文(Actor-Oriented Design- A focus on domain-specific languages.ppt)为本站会员(eveningprove235)主动上传,麦多课文档分享仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文档分享(点击联系客服),我们立即给予删除!




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1 

    收起
    展开