understand软件使用教程

源代码阅读工具(Scientific Toolworks Understand)的特色

1、支持多语言:Ada, C, C++, C#, Java, FORTRAN, Delphi, Jovial, and PL/M ,混合语言的project也支持
2、多平台: Windows/Linux/Solaris/HP-UX/IRIX/MAC OS X
3、代码语法高亮、代码折迭、交叉跳转、书签等基本阅读功能。
4、可以对整个project的architecture、metrics进行分析并输出报表。
5、可以对代码生成多种图(butterfly graph、call graph、called by graph、control flow graph、UML class graph等),在图上点击节点可以跳转到对应的源代码位置。
6、提供Perl API便于扩展。作图全部是用Perl插件实现的,直接读取分析好的数据库作图。
7、内置的目录和文件比较器。
8、支持project的snapshot,并能和自家的TrackBack集成便于监视project的变化。

软件说明

      功能比sourceinsight多些(比如enum的值的显示),而且#ifdef包含的比较多嵌套,sourceinsight如果太多嵌套,有bug. 流程图之类也比sourceinsight完整.sourceinsight的显示明显好多了,而且体积比较小,编辑速度快,可能是用熟的关系,还是sourceinsight比较顺手.
可惜sourceinsight太长时间没有更新了. 现在我一般用sourceinsight,需要看某些SI没有的用understand.另外好像两个软件都不太支持#if (defined(MACRO) || defined(MACRO1))这样的解析.

一、术语 Terminology

Architecture 层级:
An architecture is a hierarchical aggregation of source code units (entities). An architecture can be user created or automatically generated. Architectures need not be complete (that is, an architecture’s flattened expansion need not reference every source entity in the database), nor unique (that is, an architecture’s flattened expansion need not maintain the set property).

层级表示代码单元(或者实体)组成的层次结构,可以由用户手动创建,也可由本 
软件自动生成。一个层级可以不完整(例如一个层级的扁平化扩展有可能不会关联数据库中的所 
有代码实体),也可能不唯一(扁平化扩展的层级可能不会处理其预设属性)。

Database 数据库

The database is where the results of the source code analysis, as well as project settings, are stored. By default, this is a project’s “.udb” file.

代码经分析后产生的中间结果,以及工程设置保存在数据库,其缺省扩展名为“.udb”。

Entity 实体

An Understand “entity” is anything it has information about. In practice this means anything declared or used in your source code and the files that contain the project. Subroutines, variables, and source files are all examples of entities.

Understand 描述的“实体”表示任何包含信息的事物,具体来说,代码中声明或 
者使用的标识、包含工程的文件、子程序、变量、源文件都可以被称为实体。

Project 工程

The set of source code you have analyzed and the settings and parameters chosen. A “project file” contains the list of source files and the project settings.

表示源代码的集合以及相关的配置和参数,工程文件包含源文件清单和工程设置。

Relationship 关联

A particular way that entities relate to one another. The names of relationships come from the syntax and semantics of a programming language. For instance, subroutine entities can have “Call” relationships and “CalledBy” relationships.

互作用的实体之间的关系,关联的名称来源于编程语言的语法和语义,例如过程式实体具有“调用”和“被调用”的关联对象。

Script 脚本

Generally a Perl script. These can be run from within Understand’s GUI, or externally via the “uperl” command. The Understand Perl API provides easy and direct access to all information stored in an Understand database.

通常指perl脚本,脚本可以通过Understand 2.5的图形用户界面或者外部的脚本命令执行。Understand Perl API提供了快捷的访问Understand数据库所有信息的接口。

parts 部件

下面的图形展示了一些Understand 图形用户界面(GUI) 中常用的部件:

understand软件使用教程

常用词汇

单词 释义
Macros
Variables 变量
Constants 常量
Functions 函数
Reference 引用
Metrics 参数
Architectures 架构
parameters 参数
Call 调用
Compiler 编译器
component 组件、部件、元件
portability 可移植性
Cluster 集群
Function Static Variables 静态函数变量
case sensitive 区分大小写
Whole Words Only 整词匹配
layout 布局
summary 综述、总论
features 特征
control-flow graphs 控制流程图

右键菜单

代码编辑窗口的右键菜单提供了很多浏览编辑操作的快捷方式,也提供了相关实体的特定信息。

以下介绍了右键菜单包含的典型的浏览操作(与点击对象有关)

  • View Information 信息查看(参见信息浏览器)

  • Graphic Views 图形视图(参见)

  • Edit Source/Definition 代码编辑(参见)

  • User Tools 用户工具(参见)

  • Explore 浏览(参见层级查看)

  • Find In… 查找(参见多文件查找)

  • Add Favorite 添加到收藏夹(参见收藏夹)

  • Metrics Chart 度量图表(参见)

以下介绍了右键菜单包含的典型的编辑操作(与点击对象有关):

  • Undo/Redo 撤销/重做

  • Cut/Copy/Past 剪切/复制/粘贴(参见文本选择和拷贝)

  • Select All 全选(参见文本选择和拷贝)

  • Jump to Marching Brace 跳到块末

  • Select Block 块选择

  • Hide/Show Inactive Lines 行显示/隐藏

  • Fold All 折叠所有分支

  • Soft Wrap 软包装

  • Comment Selection/Uncomment Selection 注释选择/代码选择

  • 来源:1lang

    声明:本站部分文章及图片转载于互联网,内容版权归原作者所有,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2017年5月19日
下一篇 2017年5月19日

相关推荐