UML/MDA技术研究

研究UML/MDA/软件工程技术,欢迎同道人互相交流。

袁峰ID:yuandafeng
106162次访问,排名810好友0人,关注者0
yuandafeng的文章
原创 56 篇
翻译 0 篇
转载 4 篇
评论 99 篇
袁峰的公告
如非声明,均属原创
转载请注明出处,谢谢!

  
   管理

与我联系

栏目

最近评论
qpzkzp:wow power leveling
qpzkzp:wow power leveling
papam:想拥有你自己的手机软件下载主页吗?风格,背景,幻灯片,广告位全部可定制化,独立子域名!

想制作自己个人DIY的手机写真集和手机电子书吗。

中国手机网姐妹站胖胖网
http://www.papam.cn
给您提供发布软件的最佳平台,优秀的软件还可能获得网站推广宣传哦!

欢迎前来交流!
yuandafeng:对啊,涵涛是这方面的专家,下次我买手机之前一定要好好咨询资讯你 :)
gehantao:欢迎尝试WindowsMobile!
欢迎光临我的博客http://blog.csdn.net/gehantao
文章分类
收藏
    相册
    网站
    JavaEye软工版
    MDACHINA
    OMG-MDA
    UMLCHINA
    相关英文blog
    Alan Cameron
    Andrej Koelewijn
    Cockburn
    Don Box
    Grady Booch
    H.S. Lahman
    Jean Bézivin
    Keith Short
    MartinFowler
    Stefan Tilkov
    Steve Cook
    Stuart Kent
    相关中文blog
    J2EE与ERP禅话
    MDA之路(RSS)
    矇矇的秘密基地
    阿飞外传
    存档
    软件项目交易
    订阅我的博客
    XML聚合  FeedSky
    订阅到鲜果
    订阅到Google
    订阅到抓虾
    订阅到BlogLines
    订阅到Yahoo
    订阅到GouGou
    订阅到飞鸽
    订阅到Rojo
    订阅到newsgator
    订阅到netvibes

    原创 [转载] 语法和语义收藏

    新一篇: 4个Gmail邀请,有需要的留下mail。 | 旧一篇: MDA:两种MDAer

    转自steve的blog

    其实说得也很简单,转载以备忘。
    更详细的可以去看Keith Short的这本书:Adapted from Models, Frameworks and Tools,网上有下载。

    Graphical languages – semantics vs syntax

    Recent postings have talked about “semantics” of graphical languages.  When I was involved in UML development this word caused a lot of argument and confusion.  In my view, it goes like this.

     

    A graphical language has three primary aspects: concrete syntax, abstract syntax, and semantics.  Concrete syntax (notation) defines what the language actually looks like on the screen or the paper: the shapes, connections, adornments and textual annotations that the user sees and manipulates, and the gestures used to manipulate them.  Abstract syntax (grammar) gives names to the concepts that the notation depicts, and defines which configurations of these are valid.  Often, the abstract syntax for a graphical language is defined using a model, itself expressed using a graphical language.  Some people call this a “metamodel”; my colleagues and I usually call it a domain model.  Usually such a model is insufficient on its own, and must be supplemented by an additional set of constraints, sometimes called “well-formedness rules”.  A typical such rule would be the constraint that an inheritance graph must not form cycles.

     

    Semantics is none of the above, although terms such as “static semantics” or “short-range semantics” have been used to refer to what I called abstract syntax.  Semantics define what valid expressions in the language mean. (Aside: saying “expressions in the language” is very easy when talking about textual languages, whereas thinking of a diagram as an expression may feel a little uncomfortable.  You have to get used to it.)  The way to give meaning to an expression is to map it to one or more other interesting structures whose meaning is known. To define semantics objectively, the mapping and the meaning of the result must both be precisely defined.

     

    A mapping of the graphical language to statements in a natural language does not give objective semantics, although it may be useful.  A precise mapping of the graphical language to a programming language gives objective semantics to the extent that the programming language does: which is high, in the case of popular standardized languages.  If such a mapping exists it probably means that the diagram is a visualization of some aspect of the structure of the program. Another useful target for semantic mappings is expressions in some logical formalism, such as set theory, predicate logic or abstract algebra.  Examples of diagrams with this kind of semantics are Venn diagrams and Petri nets.  A final useful target for semantic mappings is another graphical language, which itself has well-defined semantics.

     

    You might observe that abstract syntax involves a mapping from expressions in the language to the structure {valid, invalid}, and therefore is a kind of degenerate semantics.  I prefer to distinguish validity from meaning.  You might also observe that it might be desirable to give some kind of meaning to invalid expressions.  To do that, you’d have to introduce different kinds of validity.

    发表于 @ 2005年01月19日 09:13:00|评论(loading...)|编辑

    新一篇: 4个Gmail邀请,有需要的留下mail。 | 旧一篇: MDA:两种MDAer

    评论

    #袁峰 发表于2005-01-19 15:08:00  IP: 159.226.5.*
    恩,这个工作很有意义,你的数学功底一定很好。
    I am Looking forward to your achievement ;)
    #xiterator 发表于2005-01-19 13:47:00  IP: 211.162.246.*
    Another useful target for semantic mappings is expressions in some logical formalism, such as set theory, predicate logic or abstract algebra. ---i am doing the mapping UML (hopely whole UML) to an executable algebra(multi-sort algebra with equal logic and rewriting logic) programming(maude), now hard-reading the UML AS for action expressions in OO.
    #xiterator 发表于2005-01-19 21:37:00  IP: 211.162.246.*
    可惜我的数学功底很一般。发现下述问题不能较合适的解决(也许我尚未发现):在UML(或MOF)的spec中,

    1)对Class的实例如何构造出InstanceSpecification的实例谈的太少了。也缺乏显式的元级操作(在一些映射中到有,如JMI),如:创建包,类,属性等的实例,约束在估值时机,约束在Activities中的估值策略等。

    2)想把Activities的实例(M1过程定义的元表示)和类的实例(M1类的元表示)混合起来直接在元级执行,确要设计执行栈结构(尙未找到规范,感觉有些低级且非规范的嫌疑大了)。

    从您的blog中看到不少有意思的信息,希望多交流。
    #袁峰 发表于2005-01-19 22:29:00  IP: 159.226.5.*

    1) JMI是MOF的Java mapping。其中提供的反射接口是MOF中定义的实现。

    MOF2的Reflection package中的Factory类提供有接口:
    create(metaClass: Class): Object
    Creates an object that is an instance of the metaClass. Object::metaClass == metaClass and metaClass.isInstance(object)
    == true.

    在MOF1.4中对应于那四个反射类,你肯定也看过了。

    2) 这方面的规范应该是没有,而且也不会专门制定这个的规范吧。
    #xin_xi@mail.csdn.net  发表于2005-06-14 13:08:00  IP: 61.186.252.*
    Thank you very much!
    发表评论  


    当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
    Csdn Blog version 3.1a
    Copyright © 袁峰