A SOA Approach for Domain-Specific Language .ppt
《A SOA Approach for Domain-Specific Language .ppt》由会员分享,可在线阅读,更多相关《A SOA Approach for Domain-Specific Language .ppt(43页珍藏版)》请在麦多课文档分享上搜索。
1、A SOA Approach for Domain-Specific Language Implementation,Shih-Hsi “Alex” Liu1, Adam Cardenas1, Xang Xiong1, Marjan Mernik2, Barrett R. Bryant3, Jeff Gray4 1California State University, Fresno, USA 2University of Maribor, Slovenia 3University of Alabama at Birmingham, USA 4University of Alabama, US
2、A,IEEE 6th World Congress on Services. Miami, FL, USA. July 5-10, 2010,Outlines,Background: Domain-Specific Languages (DSLs) Challenges of DSL Implementation Existing DSL Implementation methodologies and tools A SOA Approach for DSL Implementation Case Studies Robot language PPCea FDL Discussions Co
3、nclusions,IEEE 6th World Congress on Services. Miami, FL, USA. July 5-10, 2010,Background,A Domain-Specific Language (DSL) is a programming/modeling language that shields accidental complexity by uplifting the abstraction layer to a higher level. A DSL introduces domain-specific constructs and notat
4、ions to facilitate productivity, reliability, maintainability and portability. Up to 510 times productivity improvement Decision, analysis, design and implementation patterns have been identified to assist DSL developers in when and how to develop a DSL.,IEEE 6th World Congress on Services. Miami, F
5、L, USA. July 5-10, 2010,Background (cont.),Example DSLs include: Robot language: An imperative DSL that controls a (Lego Mindstorm NXT) robot to move in different directions and distances. PPCea: An imperative DSL that controls parameter settings to balance an evolution process toward optimization a
6、nd convergence. Feature description language (FDL): A declarative DSL to configure combinations of features. And many others.(e.g., SQL, UNIX shell script, MediaWiki templates etc.),IEEE 6th World Congress on Services. Miami, FL, USA. July 5-10, 2010,Challenges of DSL Impl.,Kosar et al. investigated
7、 that DSL implementation using a compiler or interpreter pattern may suffer from extension/evolution problem Gray et al. also pointed out that DSLs are usually unstable and syntactically and/or semantically evolve due to their frequent need to represent changes in domain concepts. E.g., A DSL for te
8、sting automobile breaks,IEEE 6th World Congress on Services. Miami, FL, USA. July 5-10, 2010,Extension/Evolution: When domain concepts change, then the lexical, syntactical and/or semantic domain constructs need to evolve. Tedious and error-prone. E.g., one new domain statement or one new grammar pr
9、oduction introduced will affect an existing DSL implementation at the lexical, syntactical, and semantic levels in different magnitudes. Interoperability: A DSL is usually implemented by one base language (e.g., Java). What if it is desired to implement a DSL in several different base languages? How
10、 would these base languages communicate with each other? Tool Support: When a new DSL is introduced, corresponding DSL tools should be supported (e.g., DSL debugger). Otherwise, the DSL will have fewer opportunities to be adopted. It requires a great amount of endeavor and promotion.,Challenges of D
11、SL Impl. (cont.),IEEE 6th World Congress on Services. Miami, FL, USA. July 5-10, 2010,AMMA is a platform to implement text-based DSLs using a Model-Driven Engineering approach that is focused on model transformations. Need to describe abstract syntax, concrete syntax and transformation rules of a DS
12、L CoCloRep is a DSL for code clone representation The Generic Modeling Environment (GME) is a metamodeling toolkit for developing graphical DSLs. Metamodel defines a domains syntax, semantics, constraints, and presentation A model is an instance (namely, a DSL program) that conforms to metamodel Int
13、erpreter generates source code from a model or executes a model TCPN is a modeling language for time-colored Petri net,Existing DSL Impl. Methodologies,IEEE 6th World Congress on Services. Miami, FL, USA. July 5-10, 2010,Existing DSL Impl. Methodologies (cont.),Six DSL implementation patterns are id
14、entified: Interpreter/compiler patterns utilize compiler/interpreter techniques; Embedding patterns introduce new DSL constructs from an existing General-Purpose Language (GPL); Preprocessor patterns translate DSL constructs into a base language; Extensible compiler/interpreter patterns add DSL opti
15、mization rules and code generation in the existing compiler/interpreter of a GPL; Commercial off-the-shelf patterns utilize existing tools and/or notations for a specific domain; and A Hybrid pattern is the combination of all of the above. There are many other implementation methodologies/tools for
16、DSLs (e.g., Visual Studio DSL tools, Eclipse GMF, MetaEdit+). These methodologies (not tools) still suffer from the aforementioned three challenges,IEEE 6th World Congress on Services. Miami, FL, USA. July 5-10, 2010,A SOA Approach for DSL Impl.,IEEE 6th World Congress on Services. Miami, FL, USA. J
17、uly 5-10, 2010,Case Study: Robot Language,An imperative DSL that controls a (Lego Mindstorm NXT) robot to move in different directions and distances. The implementation utilizes preprocessing pattern that translates its program into leJOS, a base language for controlling and communicating w/ NXT. NX
18、T allows two types of communication: USB and Bluetooth between two robots or between one robot and one controlling device (a desktop or a laptop).,IEEE 6th World Congress on Services. Miami, FL, USA. July 5-10, 2010,Case Study: Robot Language (cont.),The SOA-based Robot Language is implemented in tw
19、o ways: First Way: A web service is introduced: Each movement control (e.g., Move Up, Move Down, Move Left, or Move Right) is encapsulated in an WebMethod Each WebMethod invokes the corresponding leJOS APIs. The invocations then send the directions and distances to another NXT robot, which preloads
20、a receiver that performs movement commands accordingly Second Way: A web service performs leJOS code generation at runtime using Java Reflection. The code is then loaded to a robot connected w/ the desktop via USB. Both ways utilize WS-BPEL to express a sequence of movements (i.e., a Robot language
21、program) for the robot,IEEE 6th World Congress on Services. Miami, FL, USA. July 5-10, 2010,Case Study: Robot Language (cont.),Experiment 1: A robot is controlled by a desktop/laptop using bluetooth/USB connection. The robot follows a square and then stops.,IEEE 6th World Congress on Services. Miami
22、, FL, USA. July 5-10, 2010,Case Study: Robot Language (cont.),Experiment 2: One robot is controlled by a desktop and a laptop using USB and Bluetooth connections, respectively. The two devices send controls to the robot in turns. The robot moves following the commands from both devices.,USB,Bluetoot
23、h,IEEE 6th World Congress on Services. Miami, FL, USA. July 5-10, 2010,Case Study: Robot Language (cont.),Evolution/Extension: If a new command/control is needed, it can be added to a new WebMethod or a new web service E.g., Make Bell Sound If an existing command needs: Semantic evolution, we concen
24、trate on editing the web service. Lexical and/or syntactical evolution, we concentrate on WSDL. Good modularization and good decoupling: Developers not need to worry too much about coordination among lexical, syntactical, semantic levels. SOA tools coordinate it for you. Traditional DSL implementati
25、on will need to revise lexical, syntactical/grammatical, and/or semantic levels in different magnitudes.,IEEE 6th World Congress on Services. Miami, FL, USA. July 5-10, 2010,Case Study: PPCea,An imperative DSL for Evolutionary Algorithms. It controls parameter settings to balance an evolution proces
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ASOAAPPROACHFORDOMAINSPECIFICLANGUAGEPPT
