首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 218 毫秒
1.
词法分析是程序编译中的重要组成模块,它的任务是识别源程序中最小的语法单位.本文使用flex作为构建词法分析工具,把应用推广到数据文件分析中,并以生物大数据文件为例子,使用词法分析工具构建数据文件分析器,对文件中的数据进行检索和分析,展示词法分析工具的广阔应用.  相似文献   

2.
计算机程序是由开发者使用编程语言编写、被计算机识别并执行的一系列指令.大型程序源代码通常逻辑复杂,句法抽象,造成较大的认知困难.计算机程序可视化以直观形象的方法呈现计算机程序的代码结构、执行过程和运行结果,增强用户理解和调试程序的能力.从程序执行流程出发,根据程序执行的前、中、后3个阶段分析其可视化目标,并介绍已有可视化方法.在程序执行前阶段,使用可视化对代码组织和潜在异常进行多层级、多维度的展示;在程序执行中阶段,利用可视化辅助算法理解、运行调试和状态监测;在程序执行后阶段,运用可视化进行性能评估优化和异常检测.介绍程序可视化在在线编程调试、算法可视化等多种应用场景下的实际应用案例.最后,总结程序可视化现阶段工作的分类以及存在的不足,并指出高泛化性的算法理解可视化和教育领域的运行调试可视化等是未来工作的研究方向.  相似文献   

3.
编译器前端自动构造的研究与实现   总被引:2,自引:0,他引:2  
王馨梅  王冬芳 《微机发展》2004,14(4):82-83,88
编译器是高级语言的工作基础,它本身是一种复杂的程序。文中研究并实现了编译器前端的自动构造技术,能大大提高编译类软件的开发效率。重点讨论了如何合理设置接口,以便综合运用词法、语法分析器的自动构造工具LEX和YACC。提出了预置三级错误陷阱来分别俘获源程序词法、语法、语义错误的思想,能减少错误级联,并能更准确地报告错误的性质。作者已应用该技术编写出一个面向C语言的并行语言编译器前端,验证了该技术是可行的和高效的。  相似文献   

4.
施海彬 《福建电脑》2014,(1):141-143
词法分析器是编译器的第一阶段,其从左到右读入程序的源文件,而后分解出有意义的词法单元。大多数编译器的词法分析器都采用手工实现,所以学习、实现词法分析器在教学上有重要意义。本系统使用新的系统级程序语言GO语言,并利用其内置的字典数据类型,构建出几个查找表,简化了程序,实现了C语言的词法分析器。  相似文献   

5.
LR分析法在词法分析器自动构造中的应用   总被引:7,自引:2,他引:7  
温敬和 《计算机工程》2001,27(7):188-190
提出了一种新的自动构造编译程序词法分析器的方法,LR分析法通常用于语法分析,但只要适当修改LR分析总控程序,就可将LR分析法用于词法分析器的自动构造。该方法的优点不仅在于将词法分析器自动构造方法与语法分析器自动构造方法统一,简化了编译程序的设计和构造,而且该方法自动化程序较高,只要确定描述单词的文法和词形编码表,便可自动生成任何程序设计语言编译程序的词法分析器。  相似文献   

6.
编译器是高级语言的工作基础,它本身是一种复杂的程序.文中研究并实现了编译器前端的自动构造技术,能大大提高编译类软件的开发效率.重点讨论了如何合理设置接口,以便综合运用词法、语法分析器的自动构造工具LEX和YACC.提出了预置三级错误陷阱来分别俘获源程序词法、语法、语义错误的思想,能减少错误级联,并能更准确地报告错误的性质.作者已应用该技术编写出一个面向C语言的并行语言编译器前端,验证了该技术是可行的和高效的.  相似文献   

7.
数据结构可视化技术是程序理解与调试的一种重要支撑。为解决其中一类应用广泛的数据结构--单链结构的可视化问题,提出一种实时识别与可视化布局算法。首先根据结点入度、主前驱指针和次前驱点集合等结点属性变化对单链结构特征变化的影响,对程序执行过程中的单链结构进行实时识别;然后结合基于图标的静态可视化技术以及动画技术,建立面向单链结构的可视化动作集合及可视化布局方法,形成与程序执行过程步骤实时对应的单链结构可视化表达。最后将该算法应用于新一代集成开发环境AnyviewC的研发与实践中。  相似文献   

8.
利用YACC与LEX来完成VHDL语言高级综合前端的词法与语法分析器设计。介绍词法分析模块,语法分析模块以及错误处理模块的设计方法。利用Windows平台卞的Parser Generator 2.0生成词法与语法的C文件,在Visual C++6.0中编译该C文件,生成可执行程序。  相似文献   

9.
即时编译技术是改进动态语言性能的有效手段。基于踪迹(Trace)的即时编译技术能够在运行时识别出频繁执行的程序片段(热踪)并进行编译优化,在相当多的场景下能够提高程序整体的执行效率。然而,这种涉及底层代码优化的即时编译系统开发难度较大,导致其应用范围受到一定限制。为此,一种针对C语言子集CMinus的热踪编译技术被提出。利用这种热踪编译技术及其支撑工具,任何能够翻译为CMinus的开发语言都可以使用该技术提高程序执行效率,任何采用CMinus语言实现的算法也都可以得到热踪编译的支持。实验结果表明这种即时编译技术能够有效地提高程序的执行效率。  相似文献   

10.
为了满足测试覆盖分析和软件调试等程序分析技术对插桩技术的需求,提出了插桩模型,开发了一款实用的插桩工具。基于双缓冲技术,构建词法分析器和语法分析器。在语法分析归约时同步收集插桩信息,然后根据插桩策略执行插桩,生成目标文件。得到的程序运行时信息被应用于影响广泛的四种软件自动调试分析方法。对于这四种方法。缺陷语句均被准确识别为最可疑语句。应用结果表明,该方法能够为准确高效的程序分析提供必要的运行时信息。  相似文献   

11.
当前程序切片的相关理论已经较为成熟,但针对Java程序的静态切片工具却非常少见。为便于展开切片应用研究,设计并实现了一个基于系统依赖图的Eclipse切片插件——Slithice。该插件支持不同粒度的底层分析和系统依赖图构建,从而可以使切片算法能够在精度和性能之间进行权衡,适应各种规模程序的分析需要。  相似文献   

12.
Parallel programming is orders of magnitudes more complex than writing sequential programs. This is particularly true for programming distributed memory multiprocessor architectures based on message passing programming models. Apart from understanding the sequential parts of the parallel program, new degrees of freedom lead to additional problems. Understanding the synchronization and communication behavior of parallel programs is the most critical issue in programming distributed memory multiprocessors. The paper describes methods and tools for visualization and animation of the dynamic execution of parallel programs. Based on an evaluation and classification of existing visualization environments, the visualization and animation tool VISTOP (VISualization TOol for Parallel Systems) is presented as part of the integrated tool environment TOPSY S (TOols for Parallel SYStems) for programming distributed memory multiprocessors. VISTOP supports the interactive on-line visualization of message passing programs based on various views; in particular, a process graph based concurrency view for detecting synchronization and communication bugs.  相似文献   

13.
Object-oriented languages are widely used in software development to help the developer in using dynamic data structures which evolve during program execution. However, the task of program comprehension and performance analysis necessitates the understanding of data structures used in a program. Particularly, in understanding which application programming interface (API) objects are used during runtime of a program. The objective of this work is to give a compact view of the complete program code information at a single glance and to provide the user with an interactive environment to explore details of a given program. This work presents a novel interactive visualization tool for collection framework usage, in a Java program, based on hierarchical treemap. A given program is instrumented during execution time and data recorded into a log file. The log file is then converted to extensible markup language (XML)-based tree format which proceeds to the visualization component. The visualization provides a global view to the usage of collection API objects at different locations during program execution. We conduct an empirical study to evaluate the impact of the proposed visualization in program comprehension. The experimental group (having the proposed tool support), on average, completes the tasks in 45% less time as compared to the control group (not provided with the proposed tool). Results show that the proposed tool enables to comprehend more information with less effort and time. We have also evaluated the performance of the proposed tool using 20 benchmark software tools. The proposed tool is anticipated to help the developer in understanding Java programs and assist in program comprehension and maintenance by identifying APIs usage and their patterns.  相似文献   

14.
While the development of one software verification tool is often seen as a difficult task, the realization of a tool combining various verification techniques is even more complex. This paper presents an innovative tool for verification of C programs called Sante (Static ANalysis and TEsting). We show how several tools based on heterogeneous techniques such as abstract interpretation, dependency analysis, program slicing, constraint solving and test generation can be combined within one tool. We describe the integration of these tools and discuss particular aspects of each underlying tool that are beneficial for the whole combination.  相似文献   

15.

Software visualization is a program comprehension technique used in the context of software maintenance, reverse engineering, and software evolution analysis. In the last decade, researchers have been exploring 3D representations for visualizing programs. Among these representations, one of the most popular is the city metaphor, which represents a target program as a city. Recently, this metaphor has been also implemented in interactive software visualization tools using Virtual Reality (VR) in an immersive 3D environment medium. We report the results of a study to assess the city metaphor implemented in a VR-based tool and in a 3D-based tool with respect to users’ feelings, emotions, and thinking. To this end, we contrasted these tools with a non-visual exploration tool (i.e., Eclipse). The main result of our study is: the use of the city metaphor implemented in a VR-based tool positively affects users’ feelings and emotions, while the thinking about this implementation is positive and comparable with that of a traditional 3D implementation of the city metaphor and it is slightly better than the thinking about a non-visual exploration tool (i.e., Eclipse).

  相似文献   

16.
基于QT4的SQLite可视化管理工具的研究与开发   总被引:1,自引:0,他引:1  
针对基于Linux平台的SQLite数据库可视化管理工具在嵌入式开发中应用较少的现状,以Qt4为图形界面应用程序框架,利用信号/槽机制和完全面向对象的设计理念,开发出跨平台的嵌入式数据库SQLite可视化管理工具.该工具能够稳定运行于Linux、嵌入式Linux以及Windows平台,避免了在Linux平台下直接使用SQL命令或接口函数调试程序的繁琐与不便,为嵌入式系统开发提供了方便,并使得普通用户操作SQLite数据库成为可能,具有实际应用价值.  相似文献   

17.
基于图形处理器(graphics processing unit, GPU)加速设备的高性能计算机已经成为目前高性能计算领域的一个重要发展趋势.然而,在当前的GPU设备上开发高效的并行程序仍然是一件非常复杂的事情.针对这一问题,1)总结了影响GPU程序性能的5类关键性能指标;2)采用NVIDIA公司提供的CUPTI底层接口,设计并实现了一套GPU程序性能分析工具集,该工具集可以有效地分析GPU程序的性能行为;3)采用该工具集对著名的GPU评测程序集Rodinia中的17个程序和一个真实应用程序进行了负载特征分析.总结出常见性能瓶颈的典型原因,并给出一些开发高效GPU程序的建议.  相似文献   

18.
Benchmarks are heavily used in different areas of computer science to evaluate algorithms and tools. In program analysis and testing, open‐source and commercial programs are routinely used as benchmarks to evaluate different aspects of algorithms and tools. Unfortunately, many of these programs are written by programmers who introduce different biases, not to mention that it is very difficult to find programs that can serve as benchmarks with high reproducibility of results. We propose a novel approach for generating random benchmarks for evaluating program analysis and testing tools and compilers. Our approach uses stochastic parse trees, where language grammar production rules are assigned probabilities that specify the frequencies with which instantiations of these rules will appear in the generated programs. We implemented our tool for Java and applied it to generate a set of large benchmark programs of up to 5M lines of code each with which we evaluated different program analysis and testing tools and compilers. The generated benchmarks let us independently rediscover several issues in the evaluated tools. Copyright © 2014 John Wiley & Sons, Ltd.  相似文献   

19.
In a previous paper we described a self-documented file and a collection of general purpose programs or tools that facilitates the management and analysis of biological data. The tools can be specified in a pipeline to accomplish a specific analysis task. However, we found that it was difficult for investigators to learn the UNIX command language for specifying pipelines, specify selection tasks through a command language, and visualize the data as they were transformed and rearranged. To alleviate these problems we developed an object-oriented user interface for the pipeline programs. The system consists of four major programs for visualization: Vedit, Vgraf, Vscan, and V spread. Vedit is a simple text editor, Vgraf is a flexible graphics program, Vscan facilitates scanning graphically through large files, and Vspread provides spreadsheet-like capabilities. To demonstrate how the visualization programs are used together to accomplish the needed analysis we describe two case studies and then discuss how well the system accomplished the goals of visualization, short learning curve, and user adaptability.  相似文献   

20.
We present the Memory Trace Visualizer (MTV), a tool that provides interactive visualization and analysis of the sequence of memory operations performed by a program as it runs. As improvements in processor performance continue to outpace improvements in memory performance, tools to understand memory access patterns are increasingly important for optimizing data intensive programs such as those found in scientific computing. Using visual representations of abstract data structures, a simulated cache, and animating memory operations, MTV can expose memory performance bottlenecks and guide programmers toward memory system optimization opportunities. Visualization of detailed memory operations provides a powerful and intuitive way to expose patterns and discover bottlenecks, and is an important addition to existing statistical performance measurements.  相似文献   

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

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