共查询到20条相似文献,搜索用时 10 毫秒
1.
Keith E. Gorlen 《Software》1987,17(12):899-922
The Object-Oriented Program Support (OOPS) class library is a portable collection of classes similar to those of Smalltalk-80 that has been developed using the C++ programming language under the UNIX operating system. The OOPS library includes generally useful data types, such as String, Date and Time, and most of the Smalltalk-80 collection classes such as OrderedCtn (indexed arrays), LinkedList (singly linked lists), Set (hash tables), and Dictionary (associative arrays). Arbitrarily complex data structures comprised of OOPS and user-defined objects can be stored on disk files or moved between UNIX processes by means of an object I/O facility. The classes Process, Scheduler, Semaphore and SharedQueue provide multiprogramming with coroutines. This paper gives a brief introduction to object-oriented programming and how it is supported by the C+ + programming language. An overview of the OOPS library is also presented, followed by a programming example. The implementation details of two of the class library's more interesting features, object I/O and processes, are described. The paper concludes with a discussion of the differences between the OOPS library and Smalltalk-80 and some observations based on our programming experience with C++ and OOPS. 相似文献
2.
Dynamic storage allocation is an important part of a large class of computer programs written in C and C + +. High-performance algorithms for dynamic storage allocation have been, and will continue to be, of considerable interest. This paper presents detailed measurements of the cost of dynamic storage allocation in 11 diverse C and C + + programs using five very different dynamic storage allocation implementations, including a conservative garbage collection algorithm. Four of the allocator implementations measured are publicly available on the Internet. A number of the programs used in these measurements are also available on the Internet to facilitate further research in dynamic storage allocation. Finally, the data presented in this paper is an abbreviated version of more extensive statistics that are also publicly available on the Internet. 相似文献
3.
Peng Luo Deqing Zou Hai Jin Yajuan Du Jinan Shen 《The Journal of supercomputing》2017,73(9):3999-4019
Concurrent techniques have been widely adopted in software systems, and data race has become a great threat to stability and security of concurrent systems. Previous precise race detection techniques either may miss many races, or are only suitable for some specific programs, such as the programs executed in a virtual machine rather than in actual hardware. To solves these problems, this paper introduces a dynamic predictive race detector, called LayDetect, which detects predictable races in C/C++ programs. LayDetect applies an innovative layering technique, which can detect more races than other detectors, such as FastTrack. We have implemented and evaluated LayDetect with well-known benchmarks and real-world applications. LayDetect has detected 3.7 M races at run-time which is more than that of FastTrack by two orders of magnitude, while the average slowdown (3.0\(\times \)) and space overhead (34.1 MB) of LayDetect are similar to that of FastTrack. 相似文献
4.
Shane McIntosh Bram Adams Meiyappan Nagappan Ahmed E. Hassan 《Automated Software Engineering》2016,23(4):619-647
Software developers rely on a fast build system to incrementally compile their source code changes and produce modified deliverables for testing and deployment. Header files, which tend to trigger slow rebuild processes, are most problematic if they also change frequently during the development process, and hence, need to be rebuilt often. In this paper, we propose an approach that analyzes the build dependency graph (i.e., the data structure used to determine the minimal list of commands that must be executed when a source code file is modified), and the change history of a software system to pinpoint header file hotspots—header files that change frequently and trigger long rebuild processes. Through a case study on the GLib, PostgreSQL, Qt, and Ruby systems, we show that our approach identifies header file hotspots that, if improved, will provide greater improvement to the total future build cost of a system than just focusing on the files that trigger the slowest rebuild processes, change the most frequently, or are used the most throughout the codebase. Furthermore, regression models built using architectural and code properties of source files can explain 32–57 % of these hotspots, identifying subsystems that are particularly hotspot-prone and would benefit the most from architectural refinement. 相似文献
5.
The CADNA library enables one to estimate round-off error propagation using a probabilistic approach. The CADNA_C version enables this estimation in C or C++ programs, while the previous version had been developed for Fortran programs. The CADNA_C version has the same features as the previous one: with CADNA the numerical quality of any simulation program can be controlled. Furthermore by detecting all the instabilities which may occur at run time, a numerical debugging of the user code can be performed. CADNA provides new numerical types on which round-off errors can be estimated. Slight modifications are required to control a code with CADNA, mainly changes in variable declarations, input and output.
New version program summary
Program title: CADNA_CCatalogue identifier: AEGQ_v1_0Program summary URL:http://cpc.cs.qub.ac.uk/summaries/AEGQ_v1_0.htmlProgram obtainable from: CPC Program Library, Queen's University, Belfast, N. IrelandLicensing provisions: Standard CPC licence, http://cpc.cs.qub.ac.uk/licence/licence.htmlNo. of lines in distributed program, including test data, etc.: 60 075No. of bytes in distributed program, including test data, etc.: 710 781Distribution format: tar.gzProgramming language: C++Computer: PC running LINUX with an i686 or an ia64 processor, UNIX workstations including SUN, IBMOperating system: LINUX, UNIXClassification: 6.5Catalogue identifier of previous version: AEAT_v1_0Journal reference of previous version: Comput. Phys. Comm. 178 (2008) 933Does the new version supersede the previous version?: NoNature of problem: A simulation program which uses floating-point arithmetic generates round-off errors, due to the rounding performed at each assignment and at each arithmetic operation. Round-off error propagation may invalidate the result of a program. The CADNA library enables one to estimate round-off error propagation in any simulation program and to detect all numerical instabilities that may occur at run time.Solution method: The CADNA library [1-3] implements Discrete Stochastic Arithmetic [4,5] which is based on a probabilistic model of round-off errors. The program is run several times with a random rounding mode generating different results each time. From this set of results, CADNA estimates the number of exact significant digits in the result that would have been computed with standard floating-point arithmetic.Reasons for new version: The previous version (AEAT_v1_0) enables the estimation of round-off error propagation in Fortran programs [2]. The new version has been developed to enable this estimation in C or C++ programs.Summary of revisions: The CADNA_C source code consists of one assembly language file (cadna_rounding.s) and twenty-three C++ language files (including three header files). cadna_rounding.s is a symbolic link to the assembly file corresponding to the processor and the C++ compiler used. This assembly file contains routines which are frequently called in the CADNA_C C++ files to change the rounding mode. The C++ language files contain the definition of the stochastic types on which the control of accuracy can be performed, CADNA_C specific functions (for instance to enable or disable the detection of numerical instabilities), the definition of arithmetic and relational operators which are overloaded for stochastic variables and the definition of mathematical functions which can be used with stochastic arguments. As a remark, on 64-bit processors, the mathematical library associated with the GNU C++ compiler may provide incorrect results or generate severe bugs with rounding towards −∞ and +∞, which the random rounding mode is based on. Therefore, if CADNA_C is used on a 64-bit processor with the GNU C++ compiler, mathematical functions are computed with rounding to the nearest, otherwise they are computed with the random rounding mode. It must be pointed out that the knowledge of the accuracy of the argument of a mathematical function is never lost.Additional comments: In the library archive, users are advised to read the INSTALL file first. The doc directory contains a user guide named ug.cadna.pdf and a reference guide named, ref_cadna.pdf. The user guide shows how to control the numerical accuracy of a program using CADNA, provides installation instructions and describes test runs.The reference guide briefly describes each function of the library. The source code (which consists of C++ and assembly files) is located in the src directory. The examples directory contains seven test runs which illustrate the use of the CADNA library and the benefits of Discrete Stochastic Arithmetic.Running time: The version of a code which uses CADNA runs at least three times slower than its floating-point version. This cost depends on the computer architecture and can be higher if the detection of numerical instabilities is enabled. In this case, the cost may be related to the number of instabilities detected.References:- [1]
- The CADNA library, URL address: http://www.lip6.fr/cadna.
- [2]
- F. Jézéquel, J.-M. Chesneaux, CADNA: a library for estimating round-off error propagation, Comput. Phys. Comm. 178 (12) (2008) 933-955.
- [3]
- N.S. Scott, F. Jézéquel, C. Denis, J.-M. Chesneaux, Numerical ‘health check’ for scientific codes: the CADNA approach, Comput. Phys. Comm. 176 (8) (2007) 507-521.
- [4]
- J. Vignes, A stochastic arithmetic for reliable scientific computation, Math. Comput. Simulation 35 (1993) 233-261.
- [5]
- J. Vignes, Discrete stochastic arithmetic for validating results of numerical software, Numer. Algorithms 37 (2004) 377-390.
6.
Fortran与C/C++的混合编译 总被引:10,自引:0,他引:10
在长期的数值计算中人们积累了大量宝贵的程序资源--Fortran、C/C 源程序,为了能综合利用这些资源,Win32环境下多采取基于动态链接库DLL的混合编程方法,增加了额外建造、加载DLL的负担.提出一种Fortran与C/C 混合编程的便捷途径:在特定集成开发环境下的混合编译,系统探讨Fortran与C/C 在调用约定上的协调问题,并用典型实例加以说明. 相似文献
7.
8.
程序优化是提高程序运行效率的重要步骤,程序剖析是程序优化的第一步。对于串行语言,程序剖析代码是由编译器通过一个命令行开关自动插入。但是,大部分并行语言编译器都不具有这个功能。该文以并行C++语言的可移植的动态剖析程序(profiler)为例,从两方面对问题进行了论述:首先给出实现可移植动态剖析程序的一般方法;然后分析一个用于pC++插桩(Instrumentation)工具。 相似文献
9.
针对传统实体关系标注方法存在效率低下、错误传播、实体冗余等问题,对于某些领域语料中存在“一实体(主实体)同时与多个实体之间存在重叠关系”的特点,提出一种面向领域实体关系联合抽取的新标注方法。首先,将主实体标注为一个固定标签,将文本中与主实体存在关系的其他每个实体标注为对应实体对间的关系类型,这种对实体和关系进行同步标注的方式节省了至少一半的标注成本;然后,直接对三元组进行建模,而不是分别对实体和关系进行建模,通过标签匹配和映射即可获取三元组数据,从而缓解重叠关系抽取、实体冗余以及错误传播等问题;最后,以作物病虫害领域为例进行实验,测试了来自转换器的双向编码器表征量(BERT)-双向长短期记忆网络(BiLSTM)+条件随机场(CRF)端到端模型在1 619条作物病虫害文档的数据集上的性能。实验结果表明该模型的F1值比基于传统标注方式+BERT模型的流水线方法提高了47.83个百分点;与基于新标注方式+BiLSTM+CRF模型、卷积神经网络(CNN)+BiLSTM+CRF等经典模型的联合学习方法相比,该模型的F1值分别提高了9.55个百分点和10.22个百分点,验证了所提标注方法和模型的有效性。 相似文献
10.
11.
In this paper, we study the problem of mining temporal semantic relations between entities. The goal of the studied problem is to mine and annotate a semantic relation with temporal, concise, and structured information, which can release the explicit, implicit, and diversity semantic relations between entities. The temporal semantic annotations can help users to learn and understand the unfamiliar or new emerged semantic relations between entities. The proposed temporal semantic annotation structure integrates the features from IEEE and Renlifang. We propose a general method to generate temporal semantic annotation of a semantic relation between entities by constructing its connection entities, lexical syntactic patterns, context sentences, context graph, and context communities. Empirical experiments on two different datasets including a LinkedIn dataset and movie star dataset show that the proposed method is effective and accurate. Different from the manually generated annotation repository such as Wikipedia and LinkedIn, the proposed method can automatically mine the semantic relation between entities and does not need any prior knowledge such as ontology or the hierarchical knowledge base. The proposed method can be used on some applications, which proves the effectiveness of the proposed temporal semantic relations on many web mining tasks. 相似文献
12.
13.
对MV单位区间[[0,1]]和n-值MV代数[Ln]的子代数的结构问题及其上重言式之间的关系进行了较为细致的研究。主要结论是:如果MV单位区间[[0,1]]的子代数[M]同构于n-值MV代数[Ln]的子代数,那么,存在正整数[m]满足[(m-1)|(n-1)]使得[M=Lm];如果[M]是MV单位区间[[0,1]]的子代数,那么或[M]为有限MV代数[Ln],或[M]为区间[[0,1]]上包含[{0,1}]的稠密集;若正整数[n-1]可分解为[(m1-1)(m2-1)?(mt-1)],其中[m1-1,m2-1,?,mt-1]是两两互素的正整数,则[Ln]是[Lm1,Lm2,?,Lmt]生成的MV代数;[T([0,1])=n=2∞T(Ln)],其中[T(M)]表示MV代数[M]上全体重言式之集合。 相似文献
14.
姜灵敏 《电脑编程技巧与维护》2012,2(2):133-135
对C++程序设计教材中普遍存在的几个模糊或错误的问题进行了深入分析和研究,包括C++结构体数据内存分配、表达式中混合运算数据类型的转换、派生类和基类构造函数调用顺序等,并通过实验予以澄清. 相似文献
15.
16.
利用计算机高级语言快速实现Gabor变换算法的软件并不多,实现Gabor逆变换算法的软件还是空白。因此,对基于Visual C++实现一维离散Gabor变换算法的软件进行了研究。该软件采用界面形式设计,可分为Gabor变换和Gabor展开(即逆变换)两大模块。通过实验显示了该软件简便高效和快捷的性能。 相似文献
17.
gSOAP is a platform-independent development environment for deploying efficient SOAP/XML Web services in C and C++.We implemented the traditional remote procedure calling (RPC stub-skeleton design for gSOAP, producing the RPC stub and skeleton routines for Web service applications at compile time. The RPC stub and skeleton routines are precompiled, which speeds encoding and decoding at runtime. The skeleton routines expose a C and C++ application as a Web service on the Internet and are responsible for binding SOAP/XML request and response messages to the application at runtime. 相似文献
18.
过程化编程是面向对象编程的基础,它的规律和特点适合采用案例教学、适合进行思维训练.通过对典型案例的剖析,在给出了多种解决方案的过程中,文章的亮点是哲学视野下的思维拓展和思维创新.作为基础编程训练,本文对《C/C++程序设计》课程教学有实用价值. 相似文献
19.
Matlab和Visual C++结合的桥梁--Mideva 总被引:1,自引:0,他引:1
分析了Matlab和Mideva两者的优缺点,并阐述了使用Mideva实现M文件到CPP文件的转换,以及在VisualC++中调用Matlab编写的函数,将VisualC++的许多优点同Matlab的数值运算和图象处理等强大功能结合起来,实现程序的优化。并用一个图像处理的实例讨论了具体实现过程。 相似文献