首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 46 毫秒
1.
Compile‐time metaprograms are programs executed during the compilation of a source file, usually targeting to update its source code. Even though metaprograms are essentially programs, they are typically treated as exceptional cases without sharing common practices and development tools. Toward this direction, we identify a set of primary requirements related to language implementation, metaprogramming features, software engineering support, and programming environments and elaborate on addressing these requirements in the implementation of a metaprogramming language. In particular, we introduce the notion of integrated compile‐time metaprograms, as coherent programs assembled from specific metacode fragments present in the source code. We show the expressiveness of this programming model and illustrate its advantages through various metaprogram scenarios. Additionally, we present an integrated tool chain, supporting full‐scale build features and compile‐time metaprogram debugging. Copyright © 2013 John Wiley & Sons, Ltd.  相似文献   

2.
A good programming language alone is not sufficient for economic software production. The programming environment has a significant influence on the productivity of software engineers. Providing a programmer with information about an object-oriented software system requires extracting information from the source code, e.g. class, method and variable names. We use separate structure files for holding this information and take advantage of proven tools such as make and the C preprocessor for keeping the structure files up to date and for processing software systems that heavily use macros. In this paper we describe the concepts used for comfortable processing of C++ software systems, and discuss interesting design and implementation aspects, including structure files, the applied make mechanism and the exploitation of the C preprocessor.  相似文献   

3.
4.
A challenging issue in the construction and maintenance of large application systems is how to determine which components need to be rebuilt after change, when and in which order. Rebuilding is typically recompilation and linking, but may also include update of derivable components such as cross-reference databases and re-creation of library indexes. Type definitions or schema, and data values in a file store, database or persistent store may also need to be rebuilt. The main purpose of this paper is to describe how persistent language technology can be exploited to enhance build management. In particular, the paper describes a method for transactional, incremental linking and the implementation of its support. To help implement this method, and to make it safer and more efficient to carry out rebuild activities in general, we have defined a set of automatically checkable constraints on the software. The build management tool we have implemented, the Builder, derives rebuild dependencies automatically and offers partitioning of dependency graphs—a means to defer or avoid unnecessary rebuilding. The Builder is implemented in a persistent programming language and provides build management for applications written in the language. It exploits features such as strong typing, runtime linguistic reflection, and referential integrity provided by the language processing technology. The Builder operates over both programs and (complex) data, which is in contrast to conventional language-centred tools. © 1997 by John Wiley & Sons, Ltd.  相似文献   

5.
6.
Software developers rely on a build system to compile their source code changes and produce deliverables for testing and deployment. Since the full build of large software systems can take hours, the incremental build is a cornerstone of modern build systems. Incremental builds should only recompile deliverables whose dependencies have been changed by a developer. However, in many organizations, such dependencies still are identified by build rules that are specified and maintained (mostly) manually, typically using technologies like make. Incomplete rules lead to unspecified dependencies that can prevent certain deliverables from being rebuilt, yielding incomplete results, which leave sources and deliverables out-of-sync. In this paper, we present a case study on unspecified dependencies in the make-based build systems of the glib, openldap, linux and qt open source projects. To uncover unspecified dependencies in make-based build systems, we use an approach that combines a conceptual model of the dependencies specified in the build system with a concrete model of the files and processes that are actually exercised during the build. Our approach provides an overview of the dependencies that are used throughout the build system and reveals unspecified dependencies that are not yet expressed in the build system rules. During our analysis, we find that unspecified dependencies are common. We identify 6 common causes in more than 1.2 million unspecified dependencies.  相似文献   

7.
国产异构众核处理器是我国打破国际技术壁垒,在高性能计算领域取得突破的关键环节.围绕国产超算的软件生态环境建设,采用智能源码转换的方法盘活海量多核架构的遗产代码是加速软件研发效率,推动领域发展的重要途径.针对国产运算核心不支持C++编译的现状,基于开源的ANTLR语言翻译工具,提出了一种面向异构众核处理器的智能化C++语...  相似文献   

8.
We present a novel approach to combined textual and visual programming by allowing visual, interactive objects to be embedded within textual source code and segments of source code to be further embedded within those objects. We retain the strengths of text‐based source code, while enabling visual programming where it is beneficial. Additionally, embedded objects and code provide a simple object‐oriented approach to adding a visual form of LISP‐style macros to a language. The ability to freely combine source code and visual, interactive objects with one another allows for the construction of interactive programming tools and experimentation with novel programming language extensions. Our visual programming system is supported by a type coercion‐based presentation protocol that displays normal Java and Python objects in a visual, interactive form. We have implemented our system within a prototype interactive programming environment called ‘The Larch Environment’. Copyright © 2013 John Wiley & Sons, Ltd.  相似文献   

9.
Lars Engebretsen 《Software》2006,36(15):1643-1654
This paper describes some of the author's experiences from a C++ implementation of a concordance program for texts in Old West Norse (also known as Old Icelandic) and Runic Swedish. Since the input to the program used a character repertoire that no standard one‐byte character encoding covers, it was natural to use Unicode to represent data both inside the program and in external files. Inside the program, each character was represented with C++ ‘wide characters’; the input and output was represented in UTF‐8. The author constructed C++ code conversion facets that convert data between those two representations during file I/O. This enabled him to successfully compile, and run, the concordance program on both Linux (Fedora Core 3 with gcc 3.4.2) and Windows XP (using Visual C++ .NET 2003). The only necessary change to the source when changing platform was isolated to the lines selecting which code conversion facet to use—all other pieces of code remained unchanged. In particular, the author could still use the standard C++ locale framework for collation and code conversion, in spite of the fact that the library‐provided code conversion facets had been replaced. Copyright © 2006 John Wiley & Sons, Ltd.  相似文献   

10.
Model-based development (MBD) holds the promise to capture potential timing problems in embedded software during the early phases of the development, securing the production of bug-free embedded software. For most MBD approaches, the source code is just an intermediate artifact that can be generated automatically from the models. This assumption clashes with an undeniable fact: a large share of the commercial embedded software exploits existing libraries or is developed using C/C++ natively. A way to reconcile the ambitions of MBD with the use of a programming language is by offering new language constructs and an innovative compilation tool-chain that prevents model error and timing problems “by construction.” However, the persistent popularity of C/C++ among embedded programmers and the limited availability of tools have severely limited the uptake of alternative programming languages for embedded software. Therefore, we propose an original route. Our language proposal, named Tice, has been shaped as a C++ active library. Tice retains full compatibility with existing C++ code, which can be integrated easily into new Tice-based projects. The enforcement of Tice syntax and semantics can be made by a standard C++ compiler, forgoing the need for new tools. In this article, we describe Tice's syntax, semantics, and model of computation and communication. We demonstrate Tice's practical applicability on an industrial scale use-case and give ample evidence for Tice's efficient compilation using off-the-shelf C++ compilers. Finally, we show Tice's code generation process.  相似文献   

11.
This paper presents simple techniques that can be used to automate recompilation and avoid unnecessary recompilation in modular programming languages. The basic technique generates a Makefile that reflects the dependencies among modules. This technique is demonstrated for programs written in SR, although it can easily be adapted to other modular languages. The recompilation problem for SR programs is complicated by the flexible way components can be placed in source files and by how an SR module's specification and implementation can be combined. A small modification to the basic technique reduces the amount of unnecessary compilation. This ‘semi-smart’ approach is worth the small extra effort. The techniques described in this paper should be considered as an inexpensive, yet reasonably effective, alternative to smart recompilation. These techniques are especially applicable when the language's compiler cannot easily be modified.  相似文献   

12.
O. Benediktsson 《Software》1977,7(5):655-659
The standard I/O facility for sequential disk/tape file handling in a Fortran IV IBM 360/370 Disk Operating System environment has some marked shortcomings, the most serious of which is that blocking of records is not provided for. This paper describes SAMFOR4 (Sequential Access Method in Fortran IV), a set of Fortran callable subprograms and a file declaration facility that enables the Fortran programmer to access and create ‘standard’ sequential files. Thus inter language compatibility of files is obtained. A manyfold increase in effectiveness may also be achieved.  相似文献   

13.
刘有耀  杨鹏程 《计算机应用》2016,36(9):2422-2426
针对当前大量遗产代码无法重复利用的问题,设计一种新的编译工具将C的串行代码转换为基于MPI+OpenMP的混合并行编程代码,降低了并行编程的开发成本。首先,通过对JavaCC的优化,实现一种可以解析C语言的词法和语法分析器,进行源代码分析并生成抽象语法树;其次,根据语法树对源代码进行控制依赖性和数据依赖性分析,产生可并行化的语句块分区;再次,按照提出的并行代码生成方法得到目标代码;最后,基于Visual Studio 2010构建目标代码仿真验证环境。实验结果表明,该工具可以较为理想地实现串行代码自动并行化,与手工编写的代码在加速比上的误差为8.2%~18.4%。  相似文献   

14.
We define a mixed imperative/declarative programming language: declarative contracts are enforced upon imperatively described behaviors. This paper describes the semantics of the language, making use of the notion of Discrete Controller Synthesis (DCS). We target the application domain of adaptive and reconfigurable systems: our language can serve programming closed-loop adaptation controllers, enabling flexible execution of functionalities w.r.t. changing resource and environment conditions. DCS is integrated into a1 programming language compiler, which facilitates its use by users and programmers, performing executable code generation. The tool is concretely built upon the basis of a reactive programming language compiler, where the nodes describe behaviors that can be modeled in terms of transition systems. Our compiler integrates this with a DCS tool, making it a new environment for formal methods. We define the trace semantics of our contracts language, describe its compilation and establish its correctness, and discuss implementation and examples.  相似文献   

15.
Programmers build large‐scale systems with multiple languages to leverage legacy code and languages best suited to their problems. For instance, the same program may use Java for ease of programming and C to interface with the operating system. These programs pose significant debugging challenges, because programmers need to understand and control code across languages, which often execute in different environments. Unfortunately, traditional multilingual debuggers require a single execution environment. This paper presents a novel composition approach to building portable mixed‐environment debuggers, in which an intermediate agent interposes on language transitions, controlling and reusing single‐environment debuggers. We implement debugger composition in Blink, a debugger for Java, C, and the Jeannie programming language. We show that Blink is (i) simple: it requires modest amounts of new code; (ii) portable: it supports multiple Java virtual machines, C compilers, operating systems, and component debuggers; and (iii) powerful: composition eases debugging, while supporting new mixed‐language expression evaluation and Java native interface bug diagnostics. To demonstrate the generality of interposition, we build prototypes and demonstrate debugger language transitions with C for five of six other languages (Caml, Common Lisp, C#, Perl 5, Python, and Ruby) without modifications to their debuggers. Using real‐world case studies, we show that diagnosing language interface errors require prior single‐environment debuggers to restart execution multiple times, whereas Blink directly diagnoses them with one execution. Copyright © 2014 John Wiley & Sons, Ltd.  相似文献   

16.
17.
网络管理日益重要,SNMP以其简单、灵活的特点而得到广泛应用。MIB库是网络管理中的资源以及属性的集合,是网管的核心,要访问MIB库,必须将其转换成C语言。MIB库转换成C文件,先要按照一定的语法格式编写MIB文件,将新编写的MIB文件放入MIB库中,然后根据是转换简单变量还是表变量使用NET-SNMP源码包自带的模板转换。经实验证明,这种方法能够简单快速地将MIB文件转换成C文件,并且转换后的C文件代码格式统一,经过少量的修改,就可以重新编译到SNMP源码包中使用。  相似文献   

18.
J. S. Briggs 《Software》1984,14(5):491-500
The programming language Ada defines a separate compilation mechanism which must enforce the language rules in the same manner when compiling a program either in several units or as one compilation unit. Two implementations of the Ada program library required by this mechanism are described. Each has an associated compiler manager program which is the user's interface to the library. The first maintains a central map file containing the library structure. The second uses the UNIX tool make to maintain the library and permits more flexibility in the UNIX operating system environment. Higher level tools could use the second manager as a component part.  相似文献   

19.
基于AT89S52和FATl6的SD卡读写系统设计   总被引:1,自引:0,他引:1  
采用SD卡的SPI通信模式,用单片机编程模拟SPI总线时序,实现AT89S52对SD卡的读写。利用晶体管加下拉电阻的方法实现SD卡与AT89S52的电平匹配。介绍了SD卡接口规范,SD卡SPI接口时的指令与响应时序。详细介绍了FAT16文件系统的文件组织与存储原理,以及SD卡指令结构。研究了软件模拟SPI接口时序的编程实现,给出了软件模拟SPI接口的汇编代码,以及单片机读写SD卡和读写FAT16文件系统的软件流程。  相似文献   

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

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