首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
This paper describes experiences from implementing key parts of a compiler for Modelica, an object-oriented language supporting declarative modeling and simulation of complex physical systems. Our implementation uses the attribute-grammar based tool JastAdd. In particular, we discuss the implementation of Modelica name analysis which is highly context-dependent, type analysis which is based on structural subtyping, and flattening which is a fundamental part of the Modelica compilation process.of so called modifications, Modelica.  相似文献   

2.
We introduce a new architecture for the design of a tool for modeling and simulation of continuous and hybrid systems. The environment includes a compiler based on Modelica, a modular and a causal standard specification language for physical systems modeling (the tool supports models composed using certain component classes defined in the Modelica Standard Library, and the instantiation, parameterization and connection of these MSL components are described using a subset of Modelica). Models are defined in Modelica and are translated into DEVS models. DEVS theory (originally defined for modeling and simulation of discrete event systems) was extended in order to permit defining these of models. The different steps in the compiling process are show, including how to model these dynamic systems under the discrete event abstraction, including examples of model simulation with their execution results.  相似文献   

3.
This paper introduces the JStar parallel programming language, which is a Java-based declarative language aimed at discouraging sequential programming, encouraging massively parallel programming, and giving the compiler and runtime maximum freedom to try alternative parallelisation strategies. We describe the execution semantics and runtime support of the language, several optimisations and parallelism strategies, with some benchmark results.  相似文献   

4.
Modern web application development frameworks provide web application developers with high-level abstractions to improve their productivity. However, their support for static verification of applications is limited. Inconsistencies in an application are often not detected statically, but appear as errors at run-time. The reports about these errors are often obscure and hard to trace back to the source of the inconsistency. A major part of this inadequate consistency checking can be traced back to the lack of linguistic integration of these frameworks. Parts of an application are defined with separate domain-specific languages, which are not checked for consistency with the rest of the application. Examples include regular expressions, query languages and XML-based languages for definition of user interfaces. We give an overview and analysis of typical problems arising in development with frameworks for web application development, with Ruby on Rails, Lift and Seam as representatives.To remedy these problems, in this paper, we argue that domain-specific languages should be designed from the ground up with static verification and cross-aspect consistency checking in mind, providing linguistic integration of domain-specific sub-languages. We show how this approach is applied in the design of WebDSL, a domain-specific language for web applications, by examining how its compiler detects inconsistencies not caught by web frameworks, providing accurate and clear error messages. Furthermore, we show how this consistency analysis can be expressed with a declarative rule-based approach using the Stratego transformation language.  相似文献   

5.
An Object Grammar is a variation on traditional BNF grammars, where the notation is extended to support declarative bidirectional mappings between text and object graphs. The two directions for interpreting Object Grammars are parsing and formatting. Parsing transforms text into an object graph by recognizing syntactic features and creating the corresponding object structure. In the reverse direction, formatting recognizes object graph features and generates an appropriate textual presentation. The key to Object Grammars is the expressive power of the mapping, which decouples the syntactic structure from the graph structure. To handle graphs, Object Grammars support declarative annotations for resolving textual names that refer to arbitrary objects in the graph structure. Predicates on the semantic structure provide additional control over the mapping. Furthermore, Object Grammars are compositional so that languages may be defined in a modular fashion. We have implemented our approach to Object Grammars as one of the foundations of the Ensō system and illustrate the utility of our approach by showing how it enables definition and composition of domain-specific languages (DSLs).  相似文献   

6.
In wireless sensor networks (WSNs), energy is valuable because it is scarce. This causes their life time to be determined by their ability to use the available energy in an effective and frugal manner. In most of the earlier sensor network applications, the main requirement consisted mainly of data collection but transmitting all of the raw data out of the network may be prohibitively expensive (in terms of communication) or impossible at given data collection rates.In the last decade, the use of the database paradigm has emerged as a feasible solution to manage data in a WSN context. There are various sensor network query processors (SNQPs) (implementing in-network declarative query processing) that provide data reduction, aggregation, logging, and auditing facilities. These SNQPs view the wireless sensor network as a distributed database over which declarative query processor can be used to program a WSN application with much less effort. They allow users to pose declarative queries that provide an effective and efficient means to obtain data about the physical environment, as users would not need to be concerned with how sensors are to acquire the data, or how nodes transform and/or transmit the data.This paper surveys novel approaches of handling query processing by the current SNQP literature, the expressiveness of their query language, the support provided by their compiler/optimizer to generate efficient query plans and the kind of queries supported. We introduce the challenges and opportunities of research in the field of in-network sensor network query processing as well as illustrate the current status of research and future research scopes in this field.  相似文献   

7.
In this paper, we introduce Canis, a high-level domain-specific language that enables declarative specifications of data-driven chart animations. By leveraging data-enriched SVG charts, its grammar of animations can be applied to the charts created by existing chart construction tools. With Canis, designers can select marks from the charts, partition the selected marks into mark units based on data attributes, and apply animation effects to the mark units, with the control of when the effects start. The Canis compiler automatically synthesizes the Lottie animation JSON files [Aira], which can be rendered natively across multiple platforms. To demonstrate Canis’ expressiveness, we present a wide range of chart animations. We also evaluate its scalability by showing the effectiveness of our compiler in reducing the output specification size and comparing its performance on different platforms against D3.  相似文献   

8.
Modelica是一种基于方程的陈述式建模语言,它具有面向对象、数组化表示、连续离散混合和可重用等多种特征,基于Modelica构建的模型和模型库通常规模庞大且结构复杂。编译Modelica模型的时间开销较大。本文从Modelica模型编译的角度出发,结合现有的序列化方法,提出以模型序列化来取代模型编译的部分工作,从而达到提升Modelica模型编译效率的目的。文中实现的Modelica模型序列化技术已在多领域物理系统建模与仿真平台MWorks中进行了验证与应用。  相似文献   

9.
We investigate the design of declarative, domain-specific languages for constructing interactive visualizations. By separating specification from execution, declarative languages can simplify development, enable unobtrusive optimization, and support retargeting across platforms. We describe the design of the Protovis specification language and its implementation within an object-oriented, statically-typed programming language (Java). We demonstrate how to support rich visualizations without requiring a toolkit-specific data model and extend Protovis to enable declarative specification of animated transitions. To support cross-platform deployment, we introduce rendering and event-handling infrastructures decoupled from the runtime platform, letting designers retarget visualization specifications (e.g., from desktop to mobile phone) with reduced effort. We also explore optimizations such as runtime compilation of visualization specifications, parallelized execution, and hardware-accelerated rendering. We present benchmark studies measuring the performance gains provided by these optimizations and compare performance to existing Java-based visualization tools, demonstrating scalability improvements exceeding an order of magnitude.  相似文献   

10.
支持多语种,多平台是当前编译技术的发展趋势,它适应了当有计算机系统迅猛更新的需要,汇编系统作为多语种,多平台编译中必不可少的重要组成部分,是实现多平台支持的关键,文中提出了一个适用于不同计算机平台的多平台汇编系统的模型,在此基础上讨论了汇编系统中多平台支持技术的3个2要素;平台配置机制,指令系统支持方式和目标文件处理策略,并描述了相应的设计与实现方法。  相似文献   

11.
Constraint-based functional design verification for conceptual design   总被引:12,自引:0,他引:12  
In the early stages of mechanical product design, designers not only need to determine the physical structure of the design, but also need to verify that the design functions properly with the allowable values or ranges of values of the relevant design attributes. Existing work on design verification is either aimed at specific design problems, which are generally carried out at the downstream design stages, or aimed at deriving design behavior using a behavioral simulation approach. Functional design verification has largely been neglected by the research society. To tackle this problem, we propose a generic constraint-based approach that is based on a comprehensive functional design model. A number of strategies are proposed for the approach, including strategies for design variables reduction, variable dependency graph development, constraint propagation, and dynamic verification of a design over an assigned set of attributes (variables). The approach is implemented as part of a functional modeling design environment. A simple design verification case is presented to illustrate our approach.  相似文献   

12.
陈述式基于方程仿真模型的约简   总被引:1,自引:1,他引:1  
为解决复杂多领域连续系统的高效仿真问题,研究了陈述式基于方程仿真模型的约简策略.基于符号处理技术,提出了一种模型约简方法.该方法从方程的规范转换入手,通过消除特定形式方程缩减系统规模,将整个方程系统规划分解为一个可顺序求解的子系统序列.给出的实例表明文中约简方法效果显著.文中策略与算法已在多领域物理系统混合建模与仿真平台EMWorks中实现.  相似文献   

13.
14.
Andr van Delft 《Software》1999,29(7):605-616
We present an extension to the Java language with support for physical dimensions and units of measurement. This should reduce programming errors in scientific and technological areas. We discuss various aspects of dimensions and units, and then design principles for support in programming languages. An overview of earlier work shows that some language extensions focused on units, whereas we argue that dimensions are a better starting point; units can then simply be treated as constants. Then we present the Java extension, and show how to define and use dimensions and units. The communication between the program and the outer world gets special attention. The programmer can still make dimensional errors there, but we claim the risk is reduced. It has been simple to build support for this extension into an existing Java compiler. We outline the applied technique. Copyright © 1999 John Wiley & Sons, Ltd.  相似文献   

15.
Maude is a high-level language and a high-performance system supporting executable specification and declarative programming in rewriting logic. Since rewriting logic contains equational logic, Maude also supports equational specification and programming in its sublanguage of functional modules and theories. The underlying equational logic chosen for Maude is membership equational logic, that has sorts, subsorts, operator overloading, and partiality definable by membership and equality conditions. Rewriting logic is reflective, in the sense of being able to express its own metalevel at the object level. Reflection is systematically exploited in Maude endowing the language with powerful metaprogramming capabilities, including both user-definable module operations and declarative strategies to guide the deduction process. This paper explains and illustrates with examples the main concepts of Maude's language design, including its underlying logic, functional, system and object-oriented modules, as well as parameterized modules, theories, and views. We also explain how Maude supports reflection, metaprogramming and internal strategies. The paper outlines the principles underlying the Maude system implementation, including its semicompilation techniques. We conclude with some remarks about applications, work on a formal environment for Maude, and a mobile language extension of Maude.  相似文献   

16.
面向嵌入式系统的优化编译器生成器设计   总被引:4,自引:0,他引:4  
构造嵌入式系统是一个硬件软件的协同设计问题 .嵌入式软件的有效开发需要相应编译器的支持 .由于嵌入式系统存储空间有限 ,所以编译器生成的机器代码必须非常紧凑 .我们可以使用编译器的生成器来提高编译器的开发效率 .本文给出了一种编译器生成器的设计原理 ,利用该编译器生成器可以迅速生成面向某种指令系统和机器特征 ,并且能够对输出代码进行自动紧凑的编译器  相似文献   

17.
18.
This article presents a database programming language, Thémis, which supports subtyping and class hierarchies, and allows for the definition of integrity constraints in a global and declarative way. We first describe the salient features of the language: types, names, classes, integrity constraints (including methods), and transactions. The inclusion of methods into integrity constraints allows an increase of the declarative power of these constraints. Indeed, the information needed to define a constraint is not always stored in the database through attributes, but is sometimes computed or derived data. Then, we address the problem of efficiently checking constraints. More specifically, we consider two different problems: (1) statically reducing the number of constraints to be checked, and (2) generating an efficient run-time checker. Using simple strategies, one can significantly improve the efficiency of the verification. We show how to reduce the number of constraints to be checked by characterizing the portions of the database that are involved in both the constraints and in a transaction. We also show how to generate efficient algorithms for checking a large class of constraints. We show how all the techniques presented exploit the underlying type system, which provides significant help in solving (1) and (2). Last, the current status of the Thémis prototype is presented.  相似文献   

19.
《Software, IEEE》2002,19(5):18-20
In its first release of the .NET Framework, Microsoft has provided a defined method for adding declarative information (metadata) to runtime entities in the platform. These entities include classes, methods, properties, and instance or class variables. Using .NET, you can also add declarative information to the assembly, which is a unit of deployment that is conceptually similar to a .dll or .exe file. An assembly includes attributes that describe its identity (name, version, and culture), informational attributes that provide additional product or company information, manifest attributes that describe configuration information, and strong name attributes that describe whether the assembly is signed using public key encryption. The program can retrieve this metadata at runtime to control how the program interacts with services such as serialization and security. We compare design decisions made using custom attributes in .NET with the Java platform.  相似文献   

20.
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号