首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 140 毫秒
1.
高凤娟  王豫 《软件学报》2020,31(10):2983-3003
随着移动计算、物联网、云计算、人工智能等领域的飞速发展,也涌现出了很多新的编程语言和编译器,但是C/C++语言依旧是最受欢迎的编程语言之一,而数组是C语言最重要的数据结构之一.当在程序中通过数组下标访问数组元素时,必须确保该下标在该数组的边界之内,否则就会导致数组越界.程序中的数组越界缺陷会使得程序在运行时导致系统崩溃,甚至使攻击者可以截取控制流以执行任意恶意代码.当前针对数组越界的静态检查方法无法达到高精度的分析,尤其是无法处理复杂约束和表达式,过多的误报额外增加了开发者的负担.因此,提出了一种基于污点分析的数组越界的静态检测方法.首先,提出流敏感、上下文敏感的按需指针分析方法,实现数组长度区间分析.然后,提出按需污点分析方法,实现数组下标和数组长度污染情况的计算.最后,定义数组越界缺陷判定规则,提出使用后向数据流分析方法,检测数组下标是否越界.在进行数组越界检测的过程中,为了处理程序中的复杂约束和表达式,在分析过程中将调用约束求解器来判断约束的可满足性.如果没有发现相应的语句,则报告数组越界缺陷警报.同时,实现了自动静态分析工具Carraybound,并通过实验展示了方法的有效性.  相似文献   

2.
一种需求驱动的缓冲区溢出检测算法   总被引:1,自引:0,他引:1       下载免费PDF全文
本文提出一种流敏感的静态检测算法。通过需求驱动的控制流分析和数据流分析,建立内存访问语句和函数调用语句发生溢出的线性约束,从而将缓冲区溢出的检测问题转换为线性约束求解问题。我们实现了该算法的原型,实验表明,该原型可以准确而高效地发现实际程序中的缓冲区溢出漏洞。  相似文献   

3.
C语言对内存操作不进行边界安全检测,这使C程序具有高执行效率,但也产生各种安全问题,例如数组越界、指针访问越界、C库函数的非法操作等。基于对象的运行时验证技术能实时监测程序的运行行为,自动找出程序中存在的漏洞。在原有基于对象技术的基础上,改进多维数组和结构体变量的地址范围记录方式,用2次地址查询操作检测指针访问,用平衡二叉树优化存储结构。实验结果表明,改进的方法优于传统的基于对象技术。  相似文献   

4.
采用流敏感的方法分析计算过程内操作动态链状数据结构的指针定值引用链.目的是连接对链状数据结构进行定值的语句和引用这些链状数据结构的语句,具体地,每条对链状数据结构进行定值的语句,算法将找出所有引用被该语句定值的链状数据结构的语句的集合.该算法将被整合到我们设计和开发的并行语言mini-SPC中,指导对操作动态链状数据结构的并行程序的正确分析和程序变换.实验表明基于本文的算法能保证操作动态链状数据结构的指针定值引用链的分析精度,提高分析的效率.  相似文献   

5.
数组越界是软件中普遍存在的一种故障类型,并对软件安全造成了潜在的威胁.传统的故障检测使用程序插装的方法,并相应的以编译优化技术来排除掉多余的数组边界检查.这种检测方法不仅降低了程序运行效率,增加了开销,而且往往不能对故障进行彻底的测试,容易造成漏报.本文在对程序进行静态分析的基础上,通过引入区间概念,建立了整型区间集和数组区间集,进而给出了数组越界的故障模型,模型的建立对软件故障进行了规范.本文随后给出了故障检测算法,最后给出了实验.结果表明这种方法比以往的测试方法具有更强的故障检测能力.  相似文献   

6.
定值-引用类错误是一类非常重要且常见的错误.当前,对这类错误的检测很难同时达到高精度和高可扩展性.通过合理组合敏感和不敏感的检测方法并控制两类方法的实施范围,可以同时达到高检测精度和高可扩展性.提出一种新颖的场景敏感的检测方法,该方法根据触发状态对潜在错误语句分类,识别不同类别语句的触发场景并实施不同开销的检测,在不降低精度的同时最小化检测开销.设计了一个多项式时间复杂度的流敏感、域敏感和上下文敏感的场景分析以进行分类,并基于程序依赖信息识别触发场景,仅对必要的触发场景实施路径敏感的检测.为上述方法实现了一种原型系统——Minerva.通过使用空指针引用错误检测为实例研究以及总代码规模超过290万行,最大单个应用超过200万行的应用验证,用例实验结果表明,Minerva的平均检测时间比当前先进水平的路径敏感检测工具Clang-sa和Saturn分别快3倍和46倍.而Minerva的误报率仅为24%,是Clang-sa和Saturn误报率的1/3左右,并且Minerva未发现漏报已知错误.上述数据表明,所提出的场景敏感的错误检测方法可同时获得高可扩展性和高检测精度.  相似文献   

7.
在基于C#.NET编程中使用foreach语句构建循环结构有利于提高.NET程序的运行效率和设计效率。通过实验先对两类情况的效运行效率进行统计和比较,再进行机理分析来研究差异产生的具体原因,并归纳揭示出foreach语句在程序设计方面的广范适用性,以及对软件设计健壮性的意义。  相似文献   

8.
程序集合论首先是为了解决停机问题,所以定义了while语句的序型w。为清晰区分有if语句的while语句序型的不同,又定义了w [ if ]和w [ if_break ]。因此依据序型能发现循环错误。同时,我们发现对程序路径的判断可用if语句对程序数据集合A的划分和if语句的序型par A作为标准,而且根据parA能发现if语句中的错误。在程序的序型S与哥德尔数的比较过程中,由于哥德尔数根据变量的n元函数决定,因此我们借鉴编译原理的数据流分析,提出程序语句的数据集合分析方法,实现程序理解和程序调试。则程序集合论包括三部分,用在程序设计的全过程和软件理论研究上,有广泛应用。  相似文献   

9.
王旭  陈雨亭 《计算机工程》2012,38(15):35-38,42
在多线程程序中,当2个以上线程在没有顺序约束的条件下访问同一个存储单元时,且其中至少有一个为写访问,则可能会发生数据竞争。为此,提出一种针对X10并行程序的静态数据竞争检测算法,包括源访存对计算、可达访存对计算、时钟同步访存对计算和逃逸访存对计算4个阶段。通过在WALA框架中分析构建程序的调用图,计算源访存对集合,检测出内存访存中可能发生数据竞争的无序对。实验结果表明,该算法可以在不显著增加X10并行程序总体运行时间的情况下,达到比较理想的数据竞争检测效果。  相似文献   

10.
于百胜  黄文虎  姜兴渭 《信息与控制》1998,27(2):141-145,151
在模型故障诊断中,不管采用那一种诊断方式,均首先需要根据测量结果和领域知识产生出最小冲突集合,广义约束传播技术是最有效的产生最小冲突集合的方法之一.本文使用测点元件影响集的概念,对广义约束传播技术进行了改进,改进后的广义约束传播技术可提高诊断的效率.  相似文献   

11.
A new tool path generation method of flank milling considering constraints is proposed for ball-end cutters in this paper. It will not only reduce the machining error range but also meet the following two constraints: (a) The ball end of the milling tool is tangential to the constraint surface; (b) There is no overcut and the minimum error is zero, which is called nonnegative-error constraint. The two constraints are very useful in some situations of engineering applications, such as flank milling impeller blades. Based on the proposed method, two types of cutter will be used to generate tool paths for the same designed surface and constraint surface. The effectiveness and accuracy of the proposed method will be finally proved with some examples.  相似文献   

12.
基于污点指针的二进制代码缺陷检测   总被引:1,自引:0,他引:1       下载免费PDF全文
污点指针严重影响二进制代码数据流和控制流的安全。为此,提出一种二进制代码缺陷检测方法。引入指针污点传播规则,结合路径约束条件和边界约束条件得到缺陷引发条件,构造能够引发4类污点指针代码缺陷的输入数据。在Linux系统下实现ELF二进制代码缺陷检测工具,测试结果表明,该方法能降低测试用例生成数量,并发现Linux系统工具的1个虚函数调用控制缺陷和2个指针内存破坏缺陷。  相似文献   

13.
基于装配约束动态管理的虚拟拆卸   总被引:5,自引:2,他引:5  
装配约束是虚拟拆卸环境下必须考虑的装配体的重要信息,提出虚拟拆卸过程中装配约束的动态管理机制,并实现了基于装配约束导航的虚拟拆卸。装配约束的动态管理包括虚拟环境下装配约束的获取、表达以及拆卸过程中装配约束的动态维护,即装配约束的动态解除和产生,文中用装配约束图表达零件间的装配约束,提出装配约束的间接解除方法,并实现了基于装配约束推理的零件可拆卸方向的推导。最后,通过一个简单装配体的拆卸实例,对文中方法进行了验证。  相似文献   

14.
《Advanced Robotics》2013,27(5):513-538
A method of free gait generation is proposed utilizing the primary/secondary gait for both straight line and circular body trajectories. The primary gait is a fixed sequence of leg transfers with modified leg-ends kinematic limits according to the presence of obstacles, while the secondary gait is a flexible gait which is generated to adjust the leg-end position. The primary gait is generated considering the following four constraints: stability constraint, kinematic constraint, sequential constraint and neighboring constraints. A generalized reference coordinate (GRC) system is introduced to describe the vehicle motion. Using the GRC system, all constraints and obstacle influences are expressed by only one set of equations despite the difference of motion mode. The efficiency of free gait generation is improved with the proposed method, and the trajectory of the vehicle body can be designed more naturally. Simulation results are given to demonstrate the efficiency of the proposed methodology.  相似文献   

15.
Based on the 4 km resolution full-disc data of China's new generation of geostationary meteorological satellite FY-4A/AGRI, using its high temporal resolution and high spectral resolution, a multi-temporal multi-channel threshold combination cloud detection in the Qinghai-Tibet Plateau is proposed. Compared with the China National Meteorological Center cloud detection products and the traditional single-phase cloud detection method, the multi-time phase cloud detection method has an accuracy rate of 94.4%, a false detection rate of 7.2%, and a missed detection rate of 5.6%; In the cloud phase detection, the GPM precipitation and the CALIPSO satellite cloud phase observation were used to evaluate the accuracy of the detection results. The similarity between cloud phase detection result and GPM data reaches 0.883. The result of the cloud phase and the actual CALIPSO observation is also close. The rationality of cloud phase detection is verified, and it is also an auxiliary means for precipitation monitoring in the Qinghai-Tibet Plateau.  相似文献   

16.
针对两个刚体之间的三维几何约束求解问题,依据几何约束的参数结构 分析了角度约束和距离约束的解耦性,给出了角度约束和距离约束可解耦求解的条件;然后 对两个刚体之间的几何约束进行组合分析,总结出约束度不小于2 的几何约束构成的组合只 有几十种,且均可采用几何推理方法进行求解;最后阐述了附加方向约束、冗余约束和矛盾 约束对数值求解的不利影响,提出了三维几何约束组合的分类求解策略,并用实例验证了该 求解策略的有效性。  相似文献   

17.
基于我国新一代静止气象卫星FY-4A/AGRI的4 km分辨率全圆盘数据,利用其高时间分辨率、高光谱分辨率的特点,提出一种青藏高原地区多时相多通道阈值组合的云检测方法,并通过实际案例分析所提出的云检测方法有效可行。结果表明:对比中国国家气象中心云检测产品以及传统单时相云检测方法,多时相云检测方法,其准确率为94.4%,误检率为7.2%,漏检率为5.6%,均优于其他两种方法,体现了多时相检测的优越性;云相态检测中,分别使用GPM降水资料以及CALIPSO卫星云相态观测结果对检测结果进行精度评价,其中冰云分布与GPM实测降水分布相似度达到了0.883,云相态整体检测结果与CALIPSO实际观测的云相态也较吻合,进一步验证了云相态检测的合理性,这也是对青藏高原地区进行降水监测的一种辅助手段。  相似文献   

18.
混合式几何约束满足的研究   总被引:5,自引:1,他引:4  
几何约束系统可以分为陈述式和构造式两类。为了使基于约束的设计更加符合使用要求,参数化CAD系统需要综合满足两类约束。文中研究了三维情况下和构造统一的约束满足策略,通过引入形状自由度的概念,将形状变化和集团变化统一处理。约束系统采用约束图来表示,各个子系统之间的层次结构利用约束层次树来表示。采用剪枝和凝聚相结合的策略实现了欠约束和完备约束系统的分解,使用解析法和数值法对约束进行求解。该策略已经在参数化CAD系统GEMS5.0的二维和三维上实现。  相似文献   

19.
Kriging model is an effective method to overcome huge computational cost for reliability-based design optimization (RBDO) problems. However, the results of RBDO usually depend on constraint boundaries within the local range that contains the RBDO optimum. Determining this local range and building adaptive response surfaces within it can avoid selecting samples in unrelated areas. In this research, a new RBDO process is proposed. In the first phase, Kriging models of constraints are built based on Latin Hypercube sampling method, and updated by two new samples in each iteration. One of these two samples is selected based on SVM and mean squared error to make sure it is located near constraint boundaries. Another one is the deterministic optimum point (DOP) of current Kriging models, which is obtained based on the deterministic optimization and specifies the direction to the RBDO optimum. And the RBDO design point is obtained by SORA. When consecutive RBDO design points are close enough to each other, the local range is determined based on the current RBDO design point and the current DOP. In the second phase, new samples are located on constraint boundaries within the local range to refine Kriging models. The location and the size of the local range is adaptively defined by the RBDO design point and the DOP during each iteration. Several optimization examples are selected to test the computation capability of the proposed method. The results indicate that the new method is more efficient and more accurate.  相似文献   

20.
In this work, we define an extended fuzzy temporal constraint logic (EFTCL) based on possibilistic logic. EFTCL allows us to handle fuzzy temporal constraints between temporal variables and, therefore, enables us to express interrelated events through fuzzy temporal constraints. EFTCL is compatible with a theoretical temporal reasoning model: the fuzzy temporal constraint networks (FTCN). The syntax, the semantics and the deduction and refutation theorems for EFTCL are similar to those defined for the sound and noncomplete fuzzy temporal constraint logic (FTCL). In this paper, a resolution principle for performing inferences which take these constraints into account is proposed for EFTCL. Moreover, we prove the soundness and the completeness of the refutation by resolution in EFTCL.  相似文献   

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

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

京公网安备 11010802026262号