首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 125 毫秒
1.
陈继锋 《计算机科学》2008,35(7):274-276
提出了一种新的带数组和循环的路径测试数据自动生成的方法.该方法只考虑数组中与路径中谓词函数有关的数组元素,将循环中的同一变量名在每一次执行时用不同的变量参数来替代,从而较好地解决了路径中数组循环有效处理的问题.为有效、简单地自动生成测试数据,建立了谓词函数关于输入变量的线性约束系统.当谓词函数为线性表达式时,不需要计算其线性算术表示,仅计算非线性函数谓词函数的线性算术表示,且不需计算路径中的谓词片和确定输入依赖集,以及构造谓词函数关于输入变量增量的线性约束系统.理论分析和实例验证该方法具有简单、直观、有效且计算量小等特点.  相似文献   

2.
针对字符串谓词边界 ,提出了一个ON—OFF测试点自动生成算法。通过对字符串输入变量的每一字符 ,构造其线性分支函数 ,进行Korel的分支函数极小化 ,动态生成给定字符串谓词边界的ON—OFF测试点。实验表明 :该算法是行之有效的。  相似文献   

3.
通过构造新的程序流图,利用Fibonacci法优化选取路径.为指定的分支生成测试数据。提出了路径测试数据生成代价的概念,并给出了代价的计算方法。当所选路径的分支谓词均为线性表达式时,直接求解线性约束集即可生成测试数据,或判定路径不可行;当分支谓词含有非线性表达式时,利用均差近似导数将非线性函数线性化,通过简单的迭代,亦能容易生成测试数据或判定路径在很大程度上不可行。若所选路径不可行或在很大程度上不可行,则选取新的路径,重复以上过程,直至求出所期望的数据,或无新的路径被选取,给定分支不可达。实例和实验表明,算法可行、有效。  相似文献   

4.
基于谓词切片的字符串测试数据自动生成   总被引:3,自引:0,他引:3  
字符串谓词使用相当普遍,如何实现字符串测试数据的自动生成是一个有待解决的问题,针对字符串谓词,讨论了路径Path上给定谓词的谓词切片的动态生成算法,以及基于谓词切片的字符串测试数据自动生成方法,并给出了字符串间距离的定义,利用程序DUC(Definithon-Use-Control)表达式,构造谓词的谓词切片,对任意的输入,通过执行谓词切片,获取谓词中变量的当前值,进而对谓词中变量的每一字符进行分支函数极小化,动态生成给定字符串谓词边界的ON-OFF测试点,实验表明,该方法是行之有效的。  相似文献   

5.
Gupta方法的改进   总被引:2,自引:0,他引:2  
单锦辉  王戟  齐治昌  吴建平 《计算机学报》2002,25(12):1378-1386
Gupta等提出一种线性化谓词函数的方法(简称Gupta方法),为指定程序路径自动生成测试数据。该文给出了一种模型语言,研究静态,动态数据依赖关系的性质以及Gupta方法中各概念的形式化定义,将Gupta等提出的谓词出推广为路径静态切片,证明了路径静态切片构造算法的正确性,对Gupta方法的改进,省略了构造谓词片和输入依赖集的过程,改进后的方法构造线性约束的效率更高,以改进后的方法为核心算法,开发了面向路径的测试数据自动生成的原型工具,并用实际的程序路径对该工具进行实际,结果表明改进后的方法是比较有效的。  相似文献   

6.
基于选择性冗余思想,提出了一种测试数据自动生成算法.算法首先利用分支函数线性逼近和极小化方法,找出程序中所有可行路径,同时对部分可行路径自动生成适合的初始测试数据集;当利用分支函数线性逼近和极小化方法无法得到正确的测试数据时,基于使得测试数据集最小的原理和选择性冗余思想,针对未被初始测试数据集覆盖的谓词和子路径进行测试数据的增补.由于新算法结合谓词切片和DUC表达式,可以从源端判断子路径是否可行,因此能有效地降低不可行路径对算法性能的影响.算法分析和实验结果表明,该算法有效地减少了测试数据数量,提高了测试性能.  相似文献   

7.
冯玉才  余艳  周淳 《计算机工程》2004,30(12):68-70
研究了Gupta方法中的关键步骤——谓词函数的线性约束系统的建立,指出用Gupta方法建立的线性约束系统本身可能存在不相容、无法找到测试数据的问题;提出了一种算法来解决这一问题,提高了软件测试数据自动生成的有效性。  相似文献   

8.
多矩阵变量线性矩阵方程(LME)约束解的计算问题在参数识别、结构设计、振动理论、自动控制理论等领域都有广泛应用。本文借鉴求线性矩阵方程(LME)同类约束最小二乘解的迭代算法,通过构造等价的线性矩阵方程组,建立了求多矩阵变量LME的一种异类约束最小二乘解的迭代算法,并证明了该算法的收敛性。在不考虑舍入误差的情况下,利用该算法不仅可在有限步计算后得到LME的一组异类约束最小二乘解,而且选取特殊初始矩阵时,可求得LME的极小范数异类约束最小二乘解。另外,还可求得指定矩阵在该LME的异类约束最小二乘解集合中的最佳逼近解。算例表明,该算法是有效的。  相似文献   

9.
一种量子神经网络模型学习算法及应用   总被引:4,自引:0,他引:4  
提出一种量子神经网络模型及学习算法. 首先基于生物神经元信息处理机制和量子计算原理构造出一种量子神经元, 该神经元由加权、聚合、活化、激励四部分组成. 然后由量子神经元构造出三层量子神经网络模型, 其输入和输出为实值向量, 权值和活性值为量子比特. 基于梯度下降法构造了该模型的超线性收敛学习算法. 通过模式识别和函数逼近两种仿真结果表明该模型及算法是有效的.  相似文献   

10.
针对约束系统中非线性谓词函数、指针、数组等复杂运算的求解问题,运用约束满足搜索算法,通过减少约束方程组中参数变量的个数,逐步缩小参数变量的取值范围,提出基于符号法求解约束的改进算法。对含有非线性谓词、数组的程序实例进行实验,结果表明改进算法能有效生成测试用例。  相似文献   

11.
Classical linear time-invariant system simulation methods are based on a transfer function, impulse response, or input/state/output representation. We present a method for computing the response of a system to a given input and initial conditions directly from a trajectory of the system, without explicitly identifying the system from the data. Similar to the classical approach for simulation, the classical approach for control is model-based: first a model representation is derived from given data of the plant and then a control law is synthesised using the model and the control specifications. We present an approach for computing a linear quadratic tracking control signal that circumvents the identification step. The results are derived assuming exact data and the simulated response or control input is constructed off-line.  相似文献   

12.
In this paper, stochastic optimal strategy for unknown linear discrete‐time system quadratic zero‐sum games in input‐output form with communication imperfections such as network‐induced delays and packet losses, otherwise referred to as networked control system (NCS) zero‐sum games, relating to the H optimal control problem is solved in a forward‐in‐time manner. First, the linear discrete‐time zero sum state space representation is transformed into a linear NCS in the state space form after incorporating random delays and packet losses and then into the input‐output form. Subsequently, the stochastic optimal approach, referred to as adaptive dynamic programming (ADP), is introduced which estimates the cost or value function to solve the infinite horizon optimal regulation of unknown linear NCS quadratic zero‐sum games in the presence of communication imperfections. The optimal control and worst case disturbance inputs are derived based on the estimated value function in the absence of state measurements. An update law for tuning the unknown parameters of the value function estimator is derived and Lyapunov theory is used to show that all signals are asymptotically stable (AS) and that the estimated control and disturbance signals converge to optimal control and worst case disturbances, respectively. Simulation results are included to verify the theoretical claims.  相似文献   

13.
This paper defines an algorithm for predicting worst-case and best-case execution times, and determining execution-time constraints of control-flow paths through real-time programs using their partial correctness semantics. The algorithm produces a linear approximation of path traversal conditions, worst-case and best-case execution times and strongest postconditions for timed paths in abstract real-time programs. Also shown are techniques for determining the set of control-flow paths with decidable worst-case and best-case execution times. The approach is based on a weakest liberal precondition semantics and relies on supremum and infimum calculations similar to standard computations from linear programming and Presburger arithmetic. The methodology is applicable to any executable language with a predicate transformer semantics and hence provides a verification basis for both high-level language and assembly code execution-time analysis.  相似文献   

14.
We describe a class of models that predict how the instantaneous firing rate of a neuron depends on a dynamic stimulus. The models utilize a learnt pointwise nonlinear transform of the stimulus, followed by a linear filter that acts on the sequence of transformed inputs. In one case, the nonlinear transform is the same at all filter lag-times. Thus, this "input nonlinearity" converts the initial numerical representation of stimulus value to a new representation that provides optimal input to the subsequent linear model. We describe algorithms that estimate both the input nonlinearity and the linear weights simultaneously; and present techniques to regularise and quantify uncertainty in the estimates. In a second approach, the model is generalized to allow a different nonlinear transform of the stimulus value at each lag-time. Although more general, this model is algorithmically more straightforward to fit. However, it has many more degrees of freedom than the first approach, thus requiring more data for accurate estimation. We test the feasibility of these methods on synthetic data, and on responses from a neuron in rodent barrel cortex. The models are shown to predict responses to novel data accurately, and to recover several important neuronal response properties.  相似文献   

15.
Beling 《Algorithmica》2008,31(4):459-478
Abstract. We study the computational complexity of linear programs with coefficients that are real algebraic numbers under a Turing machine model of computation. After reviewing a method for exact representation of algebraic numbers under the Turing model, we show that the fundamental tasks of comparison and arithmetic can be performed in polynomial time. Our technique for establishing polynomial-time algorithms for comparison and arithmetic is distinct from the usual resultant-based approaches, and has the advantage that it provides a natural framework for analysis of the complexity of computational tasks, such as Gaussian elimination, that involve a sequence of arithmetic operations. Our main contribution is to show that a variant of the ellipsoid method can be used to solve linear programming in time polynomial in the encoding size of the problem coefficients and the degree of any algebraic extension that contains those coefficients.  相似文献   

16.
In both [3] and [8], the authors review the implementation of the basic operations in interval arithmetic, and in particular discuss the different approaches given in the literature for interval division when the divisor interval contains zero. In these papers, and in the references therein, the basic operations are defined for real or extended real interval operands.Division by an interval containing zero is a special case of an interval function for which the input arguments contain points outside the domain of the underlying point function. A number of approaches exist in the literature, [7], [12], to remove restrictions on the domain of interval functions and hence obtain a closed, exception-free interval system.In this paper, we present an alternative approach to remove restrictions on the domain of interval functions and to guarantee the inclusion property in all situations, even when some input intervals contain points that lie outside the domain of the underlying point function. To achieve this, we allow for the (efficient) set-based representation of non-real results. The computed intervals are sharp, yet contain more information and the resulting interval system is closed and exception-free. We also show how the presented ideas can be implemented in an interval arithmetic library. The performance overhead is negligible compared to the fact that the implementation using the new approach offers 100% reliability in return.The structure of the paper is as follows. We set off with a motivating example in Sect. 1. In Sect. 2, we review various approaches to interval division and then introduce vset-division of real intervals, based on the newly introduced concept of value set or vset. In Sect. 3, we give a formal definition of real vset-intervals and arithmetic on these intervals. We prove a number of essential properties and point out the likenesses and differences with other approaches. Finally, in Sect. 4, we discuss the implementation of vset-interval arithmetic in a floating-point context.Research assistant FWO Vlaanderen.  相似文献   

17.
An eigenvalue-based characterization of positive realness of transfer functions of a single-input single output time-invariant linear system is derived. Based on this characterization, we propose an efficient computational procedure to determine if a given transfer function is positive real. The input for this eigenvalue-based test is any given, not necessarily minimal, state-space representation of the linear system. The test only involves standard matrix computations, such as computing eigenvalues of a matrix or a matrix pencil. Results of numerical experiments are reported  相似文献   

18.
Recent improvements in propositional satisfiability techniques (SAT) made it possible to tackle successfully some hard real-world problems (e.g., model-checking, circuit testing, propositional planning) by encoding into SAT. However, a purely Boolean representation is not expressive enough for many other real-world applications, including the verification of timed and hybrid systems, of proof obligations in software, and of circuit design at RTL level. These problems can be naturally modeled as satisfiability in linear arithmetic logic (LAL), that is, the Boolean combination of propositional variables and linear constraints over numerical variables. In this paper we present MathSAT, a new, SAT-based decision procedure for LAL, based on the (known approach) of integrating a state-of-the-art SAT solver with a dedicated mathematical solver for LAL. We improve MathSAT in two different directions. First, the top‐level line procedure is enhanced and now features a tighter integration between the Boolean search and the mathematical solver. In particular, we allow for theory-driven backjumping and learning, and theory-driven deduction; we use static learning in order to reduce the number of Boolean models that are mathematically inconsistent; we exploit problem clustering in order to partition mathematical reasoning; and we define a stack-based interface that allows us to implement mathematical reasoning in an incremental and backtrackable way. Second, the mathematical solver is based on layering; that is, the consistency of (partial) assignments is checked in theories of increasing strength (equality and uninterpreted functions, linear arithmetic over the reals, linear arithmetic over the integers). For each of these layers, a dedicated (sub)solver is used. Cheaper solvers are called first, and detection of inconsistency makes call of the subsequent solvers superfluous. We provide a through experimental evaluation of our approach, by taking into account a large set of previously proposed benchmarks. We first investigate the relative benefits and drawbacks of each proposed technique by comparison with respect to a reference option setting. We then demonstrate the global effectiveness of our approach by a comparison with several state-of-the-art decision procedures. We show that the behavior of MathSAT is often superior to its competitors, both on LAL and in the subclass of difference logic. This work has been partly supported by ISAAC, a European-sponsored project, contract no. AST3-CT-2003-501848; by ORCHID, a project sponsored by Provincia Autonoma di Trento; and by a grant from Intel Corporation. The work of T. Junttila has also been supported by the Academy of Finland, project 53695. S. Schulz has also been supported by a grant of the Italian Ministero dell'Istruzione, dell'Università e della Ricerca and the University of Verona.  相似文献   

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

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