模型检测

合集下载

模型检测分析报告范文

模型检测分析报告范文

模型检测分析报告范文尊敬的用户,以下内容为一份模型检测分析报告范文:报告内容:1. 简介本报告旨在对某一模型的检测分析进行全面评估,以确定其在特定领域的可靠性和准确性。

该模型的目标是根据给定的输入数据进行预测和分析。

2. 数据集分析在这一部分,我们将对模型使用的数据集进行详细分析。

包括数据集的大小、数据类型、数据分布、数据质量等方面的内容。

通过对数据集的分析,我们可以判断数据集的有效性和可用性,进而评估模型在数据集上的性能。

3. 特征工程特征工程是模型检测分析中非常关键的一步。

在这一部分,我们将对模型使用的特征进行详细分析。

包括特征的含义、特征的类型、特征的处理方法等方面的内容。

通过对特征工程的分析,我们可以判断模型对特征的利用程度和效果。

4. 模型结构在这一部分,我们将对模型的结构进行详细分析。

包括模型的层数、模型的连接方式、模型的激活函数等方面的内容。

通过对模型结构的分析,我们可以判断模型的复杂度和适应性。

5. 训练过程在这一部分,我们将对模型的训练过程进行详细分析。

包括模型的损失函数、优化方法、训练集和验证集的划分等方面的内容。

通过对训练过程的分析,我们可以判断模型的收敛情况和训练效果。

6. 模型评估在这一部分,我们将对模型的评估结果进行详细分析。

包括模型的准确率、精确率、召回率等指标的计算和解释,以及对结果的可靠性和可解释性的评估。

通过对评估结果的分析,我们可以判断模型的性能和实用性。

7. 结论在这一部分,我们将对整个模型的检测分析做出总结和结论。

通过对每个部分的详细分析,我们可以得出对模型的综合评价。

同时,我们还可以提出对模型改进的建议,以便进一步提升模型的性能和效果。

-以上为范文内容,仅供参考。

目标检测模型训练

目标检测模型训练

目标检测模型训练目标检测模型训练是指使用机器学习技术,通过大量的训练数据来训练一个模型,使其能够准确地在图像或视频中识别和定位目标物体。

目标检测在计算机视觉领域具有广泛的应用,包括无人驾驶、智能监控、人脸识别等。

目标检测模型训练的关键步骤包括数据收集、数据标注、模型选择、模型训练和模型评估等。

首先,数据收集是目标检测模型训练的基础。

数据收集可以通过拍摄现有环境中的图像或视频, 也可以通过网络获取数据。

数据的多样性和质量对训练出准确的模型至关重要。

然后,对收集到的数据进行标注是非常重要的一步。

数据标注是指在图像或视频中标记出目标物体的位置和分类信息。

数据标注可以手工完成,也可以借助一些开源的标注工具。

数据标注的准确性决定了最后模型的准确性。

模型选择是选择适合目标检测任务的模型架构。

在目标检测领域,常用的模型包括RCNN、Fast RCNN、Faster RCNN、YOLO、SSD等。

不同的模型有不同的优势和适用场景,选择合适的模型对于模型的准确性和效率至关重要。

模型训练是目标检测模型训练的核心步骤。

首先,需要将数据集划分为训练集和验证集。

训练集用于训练模型的参数,而验证集用于评估模型的性能。

然后,需要将数据进行预处理,包括图像尺寸的调整、数据增强等。

数据增强可以通过旋转、翻转、剪裁等方式来增加数据的多样性。

接着,将数据输入到模型中进行训练,并通过计算损失函数来更新模型的参数。

训练模型通常需要使用GPU进行加速,因为目标检测任务通常需要大量的计算资源。

模型评估是评估训练好的模型在测试集上的性能。

评估指标包括准确率、召回率、F1值、平均准确率(AP)等。

准确率是指模型正确预测的目标与实际目标的比例,召回率是指模型能够检测到的目标与实际目标的比例,F1值是综合了准确率和召回率的指标,平均准确率是对不同类别的目标进行综合评估的指标。

评估结果可以帮助我们了解模型的性能,进而调整模型和优化训练流程。

除了上述的关键步骤,还有一些技术和方法可以进一步提高目标检测模型的性能。

yolo 目标检测模型的检测流程

yolo 目标检测模型的检测流程

yolo 目标检测模型的检测流程下载温馨提示:该文档是我店铺精心编制而成,希望大家下载以后,能够帮助大家解决实际的问题。

文档下载后可定制随意修改,请根据实际需要进行相应的调整和使用,谢谢!并且,本店铺为大家提供各种各样类型的实用资料,如教育随笔、日记赏析、句子摘抄、古诗大全、经典美文、话题作文、工作总结、词语解析、文案摘录、其他资料等等,如想了解不同资料格式和写法,敬请关注!Download tips: This document is carefully compiled by theeditor. I hope that after you download them,they can help yousolve practical problems. The document can be customized andmodified after downloading,please adjust and use it according toactual needs, thank you!In addition, our shop provides you with various types ofpractical materials,such as educational essays, diaryappreciation,sentence excerpts,ancient poems,classic articles,topic composition,work summary,word parsing,copy excerpts,other materials and so on,want to know different data formats andwriting methods,please pay attention!yolo 目标检测模型的检测流程一、数据准备阶段。

模型检验的技巧

模型检验的技巧

模型检验的技巧
1. 样本分析:检验模型的可靠性和有效性,必须有一定的数据支持,在样本分析中,对数据进行统计分析,比较模型预测结果和实际结果是否一致,以及其他统计指标如偏度、峰度、正态性等是否符合预期要求。

2. 残差分析:对于一般的线性模型,需要进行残差分析,以判断残差中是否存在结构性的误差,并后续进行修正。

残差图是最常用的方法之一,能够检测模型的偏差和异方差性等情况。

3. 交叉验证:通过取样技巧将数据拆分成训练集和测试集,使用训练集建模,测试集测试,以验证模型在新数据上的普适性。

4. 独立验证:有时需要使用独立验证集对模型进行验证。

与训练集和测试集不同,独立验证集是在建立模型之前就确定的,然后使用该数据集在模型外进行测试,以判断模型的预测精度。

5. 效果风险评估:除了定量的统计方法外,还可以考虑使用效果风险评估的方法来检验模型。

效果风险评估通常涉及到建立敏感度分析、模拟、蒙特卡洛模拟等方法,以探索模型的内在不确定性。

检测模型与识别模型

检测模型与识别模型

检测模型与识别模型检测模型和识别模型在机器视觉和图像处理领域中具有不同的应用和功能。

检测模型主要用于从图像中检测出特定的物体或目标,例如人脸、物体、文字等。

这种模型通常采用特征提取和分类器设计等技术,从输入的图像中提取出有意义的信息,并对其进行分类或标签化。

检测模型可以用于人脸识别、物体跟踪、文字识别等任务。

识别模型则更侧重于对图像中的内容进行理解和识别,例如场景识别、语义分割等。

这种模型通常采用深度学习技术,通过对大量的训练数据进行学习,自动提取图像中的深层特征,并根据这些特征进行分类或标签化。

识别模型可以用于自动驾驶、智能助手、智能家居等场景。

总的来说,检测模型和识别模型在应用和技术上存在一定的差异,但它们都是机器视觉和图像处理领域的重要组成部分,广泛应用于各个领域中。

检测模型和识别模型的应用场景非常广泛,包括但不限于以下领域:1.安全领域:检测模型和识别模型可以用于人脸识别、指纹识别等,提高安全性和便利性。

2.军事领域:检测模型和识别模型可以用于地形勘察、飞行物识别等,提高军事侦察和作战能力。

3.交通领域:检测模型和识别模型可以用于车牌号识别、交通标志识别等,提高交通管理和安全水平。

4.医疗领域:检测模型和识别模型可以用于心电图、B超、健康管理、营养学等,提高医疗诊断和治疗水平。

5.生活领域:检测模型和识别模型可以用于智能家居、购物、智能测肤等,提高生活便利性和智能化水平。

6.此外,检测模型和识别模型还可以应用于人流量统计、行人闯入/越界检测、人群密集/拥堵检测预警、在岗离岗检测等领域,提高公共安全和管理水平。

检测模型和识别模型的应用场景非常广泛,涵盖了安全、军事、交通、医疗、生活等多个领域,是现代社会不可或缺的一部分。

BIM工程师如何进行模型碰撞检测分析

BIM工程师如何进行模型碰撞检测分析

BIM工程师如何进行模型碰撞检测分析在建筑信息模型(BIM)的整个工作流程中,模型碰撞检测分析是至关重要的一环。

BIM工程师负责通过进行模型的碰撞检测分析,以发现并解决可能在设计和施工过程中出现的问题。

本文将介绍BIM工程师如何进行模型碰撞检测分析,帮助他们提高工作效率和项目质量。

首先,BIM工程师需要对碰撞检测的概念有一个清晰的理解。

碰撞检测是指在建筑物或结构物的设计和施工过程中,通过使用BIM软件对不同模型元素之间的冲突进行检测和解决。

这些冲突可能是构件之间的重叠、干涉或不适当的间距。

以往,这些问题往往在施工现场才能被发现,导致项目时间延误和额外成本。

但通过使用BIM软件进行模型碰撞检测分析,可以在项目开始之前就解决这些问题,从而实现高效的施工过程和高质量的设计成果。

其次,BIM工程师需要了解主要的碰撞检测软件和工具。

目前市场上有许多强大的BIM软件可以用于模型碰撞检测分析,例如Navisworks、Revit、Tekla等。

这些软件具有先进的碰撞检测算法和可视化功能,可以准确地检测并显示冲突情况。

同时,这些软件还可以生成详细的碰撞报告,帮助BIM工程师迅速解决冲突问题。

选择适合自己工作需要的工具,并熟练运用它们,是BIM工程师进行模型碰撞检测分析的关键。

接下来,BIM工程师需要在进行模型碰撞检测分析之前,对模型进行准备工作。

首先,检查导入模型的质量和完整性,确保模型中没有错误或缺失。

然后,根据项目要求,设置适当的碰撞检测规则和约束条件。

这些规则和约束条件将决定软件如何识别和报告冲突情况。

在设置过程中,BIM工程师应该考虑项目的具体需求和优先级,并根据不同的工程阶段进行设置调整。

在准备阶段,BIM工程师还应该对模型进行合理的分类和组织,以便在后续的碰撞检测分析中更好地管理和查找信息。

然后,BIM工程师可以开始进行模型碰撞检测分析。

通过选择合适的碰撞检测工具,加载模型并设置相应的规则,BIM工程师可以开始自动或手动检测模型中的碰撞问题。

软件测试中的模型检验及优化技术研究

软件测试中的模型检验及优化技术研究

软件测试中的模型检验及优化技术研究随着信息化时代的到来,软件应用已经广泛应用于各个领域,从机器人到医疗器械,从智能家居到无人驾驶。

软件测试的重要性也变得越来越凸显。

如何快速、准确地检验软件的质量,是每一个软件开发者都需要面对的问题。

在这篇文章中,我们将探讨软件测试中的模型检验及优化技术。

一、什么是软件测试模型软件测试模型是一种用于描述测试对象及测试目标的模型。

它能够将整个测试过程进行抽象和规划,为软件测试提供了一个清晰、明确的框架,能够使测试者更加有效地进行测试。

目前,市面上主流的软件测试模型主要有三种:瀑布模型、迭代模型和敏捷模型。

其中瀑布模型是比较传统的模型,具有难以更改已完成步骤、缺乏灵活性等缺点;而迭代模型和敏捷模型则更为灵活,适合需要不断变化和升级的项目。

二、软件测试模型的检验方法在软件开发行业中,模型检验也是一个非常重要的环节。

模型检验的目的是验证模型的正确性,提高模型的可用性和完整性。

目前,模型检验的主要方法有形式化方法、模型检测和模型基础测试。

其中,形式化方法和模型检测是比较严谨的方法,需要较高的数学和逻辑推理能力;而模型基础测试则更为实用而灵活,能够提高测试的效率和质量。

三、优化技术在进行软件测试的过程中,优化技术也是非常重要的。

通过实施优化技术,能够提高测试效率和质量,同时节约测试成本。

在下面,我们将分享一些常用的优化技术。

1. 分层测试法分层测试法是一种将软件系统分层进行测试的方法。

通过对每一层进行有效的测试,能够分析出不同层级的性能和生产效益。

同时,分层测试法也能够大幅减少测试成本,避免测试资源被浪费。

2. 基于质量模型的测试基于质量模型的测试是一种基于软件质量模型的测试方法。

该方法是通过对软件系统进行建模来评估软件系统的性能。

这种方法能够有效地提高软件的可靠性和可维护性,同时减少测试时间和成本。

3. 代码覆盖测试在进行软件测试的过程中,代码覆盖测试也是非常重要的。

通过对软件源代码进行分析,能够找出潜在的错误和漏洞。

模型检验方法

模型检验方法

模型检验方法在机器学习中,模型检验是至关重要的步骤之一。

它涉及使用一系列技术和方法来评估模型的性能和可靠性。

一个好的模型应该能够准确地预测未知数据的结果,并且避免过度拟合和欠拟合。

以下是一些常见的模型检验方法:1. 训练/测试数据集划分该方法是一种将数据分为两部分的简单技术。

一部分用于训练模型,而另一部分则用于测试模型。

这样做的好处是模型不会太适应训练数据,从而提高了它的泛化能力。

2. 交叉验证该技术通过使用多个数据集来测试模型。

在统计学中,交叉验证可用于观察在一个数据集上训练的模型在测试数据集上的性能。

它通常可以提供更好的性能估计和更可靠的模型。

3. K-近邻测试K-近邻测试是一种有监督学习算法,它可以在分类和回归问题上进行预测。

该方法使用训练数据来建立模型,然后使用测试数据来测试模型的性能。

这种方法允许比较不同算法的效果。

4. 自助抽样自助抽样是一种有放回的抽样技术,它通过使用原始数据的随机样本来运行多个测试。

这种方法可以减少测试数据集的大小,并提高模型的可靠性。

5. ROC曲线该技术是一种常见的模型性能检验方法,可用于分类问题。

ROC曲线绘制真阳性和假阳性之间的关系。

它可以检测模型的性能并确定最佳分类阈值。

总之,模型检验是确保机器学习模型有效性和可行性的关键步骤。

必须仔细考虑不同的技术和方法,以便提高模型的可靠性和性能。

因此,使用适当的模型检验方法可以帮助开发人员和数据分析师使用正确的算法,并且有助于提高预测准确性,提高模型的可靠性和性能。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

An I/O Efficient Model Checking Algorithm for Large-Scale SystemsLijun Wu,Huijia Huang,Kaile Su,Shaowei Cai,and Xiaosong ZhangAbstract—Model checking is a powerful approach for the formal verification of hardware and software systems.However, this approach suffers from the state space explosion problem, which limits its application to large-scale systems due to space shortage.To overcome this drawback,one of the most effective solutions is to use external memory algorithms.In this paper, we propose an I/O efficient model checking algorithm for large-scale systems.To lower I/O complexity and improve time efficiency,we combine three new techniques:1)a linear hash-sorting technique;2)a cached duplicate detection technique;and 3)a dynamic path management technique.We show that the new algorithm has a lower I/O complexity than state-of-the-art I/O efficient model checking algorithms,including detect accepting cycle,maximal accepting predecessors,and iterative-deepening depth-first search.In addition,the experiments show that our algorithm obviously outperforms these three algorithms on the selected representative benchmarks in terms of performance.Index Terms—Duplicate detection,dynamic search path management,linear hash-sorting,model checking,state space explosion.I.I NTRODUCTIONM ODEL checking is a powerful approach for the formal verification of hardware and software systems.When applicable,it automatically checks whether or not a system satisfies a given specification via detection of counterexamples. There have been a lot of efforts applying model check-ing in hardware verification[1]–[4].However,this approach severely suffers from the state space explosion problem,which renders it inapplicable to large-scale systems due to space shortage[5].Practical model checking algorithms mainly fall into two types:1)internal memory algorithms;and2)external algorithms.To overcome the state space explosion problem, Manuscript received November22,2013;revised May4,2014;accepted June9,2014.Date of publication July8,2014;date of current version April22,2015.This work was supported in part by the National Natural Sci-ence Foundation of China under Grants61370072and61073033and in part by the Australian Research Council Discovery under Grant DP110101211. L.Wu is with the School of Computer Science and Engineering,University of Electronic Science and Technology of China,Chengdu611731,China and also with the School of Information Technology and Electrical Engi-neering,University of Queensland,Brisbane,Qld.4072,Australia(e-mail: wljuestc@).H.Huang and X.Zhang are with the School of Computer Science and Engineering,University of Electronic Science and Technology of China,Chengdu611731,China(e-mail:gzzsudocwlj@; xiaosongzhanguestc@).K.Su is with the Institute for Integrated and Intelligent Systems,Griffith University,Brisbane,Qld.4072,Australia(e-mail:kailesuuestc@). S.Cai is with the State Key Laboratory of Computer Science,Institute of Software,Chinese Academy of Sciences,Beijing,China and the Queensland Research Laboratory National ICT Australia,Brisbane,Australia(e-mail: shaoweicaiuestc@).Digital Object Identifier10.1109/TVLSI.2014.2330061internal memory algorithms focus on reducing system size or representation.To this end,many techniques are introduced, such as partial order reduction[6],symmetry reduction[7], abstraction[8],compositional approach[9],symbolic model checking[10],symbolic trajectory evaluation(STE),automata theory[11],and bounded model checking[12].Nevertheless, due to the internal memory limitation,internal memory algo-rithms become inapplicable to real-life industrial systems with large scale.Compared with internal memory,external memory devices (disks)can provide much larger space.In addition,in the past few years,there have been enormous increase in the capacity of magnetic disks,with little increase in their cost,resulting in dramatic reductions in the cost per byte.Magnetic disk is about two and a half orders of magnitude cheaper than the semiconductor memory[13],which suggests the idea of using external memory in model checking large-scale systems. Because external memory access is orders of magnitude slower than internal memory access[14],[15],the main concern for external memory algorithms is to reduce the number of I/O operations so as to improve their time efficiency.In this paper,we propose an I/O efficient model checking algorithm for large-scale systems based on nested depth-first search[16],called IOEMC.To lower I/O complexity and improve time efficiency,we combine three new techniques: 1)a linear hash-sorting algorithm denoted by LHS;2)a cached duplicate detection technique denoted by CDD;and3)a dynamic path management technique denoted by DPM.The algorithm LHS aims to quickly locate a record in a hash table on disk by the hash value of a state.Whenever the hash table storing visited states in the internal memory is full,it merges the hash table into the sorted hash table in external memory and sorts the new hash table in external memory by a special technique.The I/O complexity of this algorithm is linear in the size of the two hash tables together.The CDD technique allows almost all duplicate detections to be performed in internal memory by efficient management of visited states. With LHS together,CDD significantly reduces the cost of duplicate detection.The scheme DPM makes two stacks of the nested depth-first search,dynamically share the same memory section,and solves the memory dithering problem by efficient management of stacks and states,where the memory dithering refers to the phenomenon that states are frequently moved into and out of the internal memory(see Section V-D),which may significantly increase the number of I/O operations and thus reduce the efficiency of an algorithm.For demonstrating the effectiveness of IOEMC,we compare it with state-of-the-art I/O efficient linear temporal logic(LTL)1063-8210©2014IEEE.Translations and content mining are permitted for academic research only.Personal use is also permitted,but republication/redistribution requires IEEE permission.See /publications_standards/publications/rights/index.html for more information.model checking algorithms,including detect accepting cycle (DAC)[14],maximal accepting predecessors (MAP)[17],and iterative-deepening depth-first search (IDDFS)[18].The com-plexity comparisons show that IOEMC has lower I/O complex-ity than DAC,MAP,and IDDFS.Furthermore,the experiments show that the time efficiency of IOEMC is obviously better than its competitors.The rest of this paper is organized as follows.We describe a running example in Section II.Section III provides some necessary knowledge used in this paper.In Section IV,we introduce the related work.And then,we propose an I/O effi-cient LTL model checking algorithm for large-scale systems based on LHS,CDD,and DPM in Section V.In Sections VI and VII,we compare our algorithm’s I/O complexity and practical performance with that of DAC,MAP,and IDDFS.Section VIII discusses the parameter used in the dynamic path management technique DPM and state number limit.Finally,we conclude this paper in Section IX.II.E XAMPLEIn order to illustrate the related concepts and our algorithm,we use I T C 99,b 15(std )as a running example,which is also a benchmark in the experiment of this paper.I T C 99,b 15(std )is a standard 80386processor (subset)that has 671VHDL (VHSIC Hardware Description Language)lines,three processes,8922gates,36primary inputs,70primary outputs,449flip-flops,21logic-zero,nine logic-one,and 53018faults in complete fault list,where VHSIC is the abbreviation of very high speed integrated circuit.Its RT (register transfer)level VHDL description can be found in [19].Two properties to be verified for I T C 99,b 15(std )are as follows.1)P 1:AG (reset= 1 ∧Pro 0@s 3),meaning that whenever 80386processor is reset,the system process Pro 0will forever stay at the third state s 3.2)P 2:E F (reset= 1 ∧Pro 0@s 3),meaning that there is one path such that the system process Pro 0will even-tually research the third state s 3along the path when 80386processor is reset.III.P RELIMINARIESIn this section,we provide a brief introduction of some nec-essary notions used in this paper.Please refer to [5]and [20]for more details.A.Model Checking and AutomataModel checking is a technique that checks if a system satisfies the given specification,where the specification is the property that the system needs to satisfy,which is expressed by a logical formula.For example,the verified properties of the benchmark I T C 99,B 15(std )are expressed by AG (reset= 1 ∧Pro 0@s 3)and E F (reset= 1 ∧Pro 0@s 3).The automata-theoretic approach is one of the most efficient model checking techniques.Formally,a finite automaton (over finite words)M is a five tuple ( ,Q , ,Q 0,F )such as follows.1)is the finite alphabet.The letters inare used for transition labels.2)Q is the finite set of states.3) ⊆Q × ×Q is the transition relation,(q 1,a ,q 2)∈ means that state q 1transits to state q 2through the edge labeled with letter a .The a is called a transition label.4)Q 0⊆Q is the set of initial states.5)F is the set of final states (or accepting states).We use L (M )to denote the language accepted by M .Suppose the specification (or property)that the system needs to satisfy is expressed by LTL formula ϕ,the negation ¬ϕof the specifi-cation is translated into automaton S =( ,Q 2, 2,Q 02,F 2),and the system to be verified is translated into automaton A =( ,Q 1, 1,Q 01,F 1).According to [5]and [14],model checking is to check whether or not there is an accepting cycle accessible from some initial state in the intersection automaton of A and S which is denoted by A ∩S ,where a cycle is a path that first vertex (state)and last vertex of the path are the same,and an accepting cycle is a cycle going through some accepting vertex.If there exists such a cycle,then the path consisting of the accepting cycle and the path from some initial state to the cycle is a counterexample;otherwise,the system satisfies the given specification.Thus,transition labels can be ignored,which does not affect the verification results.The intersection of automata of A and S is an automaton that accepts language L (A )∩L (S ).Note that intersection of automata here is different from that of sets.Because accepting states from both automata may appear together only finitely many times even if they appear individually infinitely often [5],setting F =F 1×F 2does not work.Hence,we build A ∩S following the method in [5].Namely,A ∩S =( ,Q 1×Q 2×{0,1,2}, ,Q 01×Q 02×0,Q 1×Q 2×2),whereis the alphabet,Q 1×Q 2×{0,1,2}is the state set, isthe transition relation,Q 01×Q 02×0is the initial state set,Q 1×Q 2×2is the accepting state set of A ∩S ,respectively.The transition relation of A ∩S is defined as following:let (r i ,q j ,x ),(r m ,q n ,y )∈Q 1×Q 2×{0,1,2}be two states.((r i ,q j ,x ),a ,(r m ,q n ,y ))∈ if and only if the following conditions hold:1)(r i ,a ,r m )∈ 1and (q j ,a ,q n )∈ 2,that is,the local components agree with the transitions of A and S ;2)the third component is affected by the accepting condi-tions of A and S ;3)if x =0and r m ∈F 1,then y =1;4)if x =1and q n ∈F 2,then y =2;5)if x =2then y =0;6)otherwise,y =x .Fig.1shows an automaton that has a counterexample,where s 1is an initial state marked with an incoming arrow,s 5is an accepting state marked with a double circle,the path s 3s 4s 5s 6s 3is an accepting cycle,and the path s 1s 2s 3s 4s 5s 6s 3is a counterexample.B.I/O Complexity ModelBecause the access to information stored on an external memory device is orders of magnitude slower than the accessWU et al.:I/O EFFICIENT MODEL CHECKING ALGORITHM907Fig.1.Automaton with a counterexample.to information stored in the internal memory [14],[15],complexities of external memory algorithms are usually mea-sured in terms of the number of I/O operations.Here,an I/O operation is a transfer of data from a disk to internal memory or from internal memory to a disk.For example,for the benchmark I T C 99,B 15(std ),P 1,our algorithm costs in total 210I/O operations when finding one counterexample.For complexity analysis of external memory algorithms,a widely used model is the model of Aggarwal and Vitter [20].In the model,the number of I/O operations is usually described by O (scan (N ))and O (sort (N )),standing for O (N /B )and O (N /B ·log M /B (N /B )),respectively,where N denotes the total number of states of system,M denotes the number of states that fits into the internal memory,B denotes the number of states that can be transferred in a single I/O operation,and O (N /B )denotes the same order as N /B .IV.R ELATED W ORKDifferent I/O efficient algorithms for LTL model checking have been proposed.Most algorithms are based on nondepth-first search (non-DFS)which include breadth-first search (BFS)and A*[14],[21]–[27],because they utilize the delayed duplicate detection technique which is incompatible with DFS [25].The technique needs to maintain a set of visited states on disk to prevent them from being reexplored.It is based on the observation [21]that a newly generated state does not need to be checked against the state table immediately;one can postpone the checking until an entire level of the search has been explored and then check all states in the level together by linearly reading the table from the disk.To the best of our knowledge,in the last few years,among this kind of algorithms,DAC [14],MAP [27],and IDDFS [18]achieve state-of-the-art performance and represent the most recent advances.The algorithm DAC [14]adapts an existing non-DFS-based accepting cycle detection algorithm one way catch them young [28]to the I/O efficient setting.The algorithm first inserts all reachable vertices into an approximation set.After that,it repeatedly reduces the approximation set until a fixpoint is reached.In detail,vertices violating the condition are gradually removed from the approximation set using two procedures.One procedure removes those vertices from the approximation set that lie outside any cycle.The other removes vertices lying on nonaccepting cycles.Finally,if the approximation set is empty,there is no accepting cycle in the graph,otherwise the presence of an accepting cycle is ensured.The algorithm isespecially useful for verification of large systems with valid properties.But,it needs to create the whole state space.Since DAC does not work on-the-fly,Barnat et al.[14],the same authors of DAC,further proposed an on-the-fly algorithm:MAP algorithm [17],[27],which is a revisiting resistant algorithm for I/O efficient LTL model checking.Revisiting resistant graph algorithms are those that signif-icantly reduce the number of expensive I/O operations at the price of reexploration of edges (or vertices)in internal memory.They are actually an improvement on the delayed duplicate detection technique.The idea of the delayed dupli-cate detection technique is to postpone the duplicate check of single vertex against disk and perform them together in a group,for the reduction of the number of I/O operations.In the case of BFS traversal,the group (also called candidate set)consists typically of a single BFS level.However,if the level is small,the utility of delaying duplicate detection drops down.A possible solution is to maximize the group by exploring more BFS levels at once which will lead to revisiting of vertices due to cycles.However,even though vertex revisits result in performing more (cheap)operations in internal memory,it might significantly reduce the number of expensive I/O operations.Thus,revisiting resistant algorithms are expected to be more I/O efficient than nonresistant ones in practice.The main idea behind the MAP algorithm is based on the fact that each accepting vertex lying on an accepting cycle is its own accepting predecessor.Instead of expensive computing and storing of all accepting predecessors for each (accepting)vertex,the algorithm computes and stores a single representative accepting predecessor for each vertex,namely the maximal one in a suitable ordering of vertices.Experiments showed the algorithm outperformed previous I/O efficient algorithms on invalid LTL properties.The IDDFS is a 5-bit semiexternal LTL model checking algorithm proposed in [18].Semiexternal graph algorithms are algorithms,in which the vertices but not the edges fit in memory [29].The IDDFS uses heuristic EPH to construct a minimal perfect hash function from the vertex set stored on disk,which allows compressing V to 5|V |bits,and only needs to store the 5|V |bits but not V into internal memory,where V is the vertex set of a graph.Thus,the algorithm can handle spaces that are orders of magnitudes larger than internal memory.However,IDDFS still has a limitation on the size of the graph because it needs 5bits of internal memory for every vertex.This algorithm works on-the-fly by applying iterative-deepening strategy.V.I/O E FFICIENT M ODEL C HECKINGFOR L ARGE -S CALE S YSTEMSIn this section,we propose an I/O efficient LTL model checking algorithm based on the nested depth-first search [16],namely IOEMC.The IOEMC incorporates three key ideas:1)a new linear hash-sorting algorithm LHS;2)a new dupli-cate detection technique CDD;and 3)a dynamic search path management scheme DPM.By using linear hash-sorting algorithm and new duplicate detection technique,IOEMC can significantly reduce the time cost of duplicate detection of908IEEE TRANSACTIONS ON VERY LARGE SCALE INTEGRATION(VLSI)SYSTEMS,VOL.23,NO.5,MAY2015states.In addition,IOEMC also solves the memory dithering problem by using DPM technique.Wefirst present related data structures and memory usage. And then,LHS,CDD,and DPM techniques are proposed. Finally,we describe the model checking algorithm IOEMC, which is based on the above techniques.In the following, #(Q)expresses the number of elements in Q,and we assume that the algorithm can read or write B records from or into external memory in each I/O operation.A.Data Structures and Memory UsageThe IOEMC needs a database DB on disk and two stacks stack1and stack2in the internal memory for two DFSs, respectively.There are four tables in DB,explained as follows.1)Tables tableDD1and tableDD2:They are used forduplicate detection of states and have the same data structure that consists of twofields:statefield and hash field,which store those visited states and their hash values,respectively.Both tableDD1and tableDD2are sorted in nondecreasing order by hash values.Those records with the same hash value are located together.2)Tables tableP1and tableP2:They store the states onthe path in thefirst DFS and ones on the path in the second DFS,respectively.In our algorithm,the internal memory space is divided into code segment and data segment.The data segment is divided into two equal parts:T1and T2.Thefirst one is further divided into two subparts T11and T12,which are of the same size and store two hash tables H1and H2for two DFSs,respectively. Each element in H1and H2is a tuple(h,s),where s is a visited state,and h is the hash value of the state,and all elements in H1or H2are stored in time sequence.The other part T2is shared by stack1and stack2in a dynamic way. Note that the aim of using tuples is to accelerate the search of disk tables tableDD1and tableDD2,and to avoid hash collision.By using tuples,we cannot only search the disk tables sorted by hash values quickly,but also differentiate two different states even if they share the same hash value.B.Linear Hash-Sorting AlgorithmIn this section,we propose a linear hash-sorting algorithm LHS,which is used to reduce I/O complexity and improve the practical performance of our model checking algorithm.The hash-sorting problem we consider in this paper is described as follows.1)Problem Instance:There are m tuples in Q and n recordsin tableDD,where Q consists of thefirst(#(H)·ρ1) tuples of H,H may be H1or H2,ρ1is a parameter with0<ρ1<1,and tableDD may be tableDD1or tableDD2,sorted in nondecreasing order by hash val-ues.The records with the same hash value in tableDD are located together.2)Goal:Q is empty,and the m tuples are appended intotableDD,and the(n+m)records in tableDD are sorted in nondecreasing order by hash values.The hash-sorting algorithm is outlined in Algorithm1and described as follows.Algorithm1Linear Hash-Sorting Algorithm1)The algorithm appends m empty records into tableDD.2)The algorithm reads B records from the(n−B+1)thto the n th in tableDD to the internal memory by invok-ing the function read(),and replaces these records in tableDD with B empty records by calling the function empty().Every record corresponds to a tuple.This needs only one I/O operation.Suppose t is the smallest hash value in the B records.If there are k1tuples inQ whose hash values are larger than or equal to t,then the algorithm moves(B+k1)tuples,including the k1 tuples and the B tuples read before,into tableDD to cover the records from the(n+m−B−k1+1)th to the (n+m)th in turn by hash value’s nondecreasing order,by invoking the function store().After that,the algorithm deletes the(B+k1)tuples from the internal memory, by calling the function Delete().3)The algorithm continues to read B records from the(n−2B+1)th to the(n−B)th in tableDD to the internal memory and replaces these records in tableDD with B empty records,then does like(2).4)This goes on until Q is empty or thefirst record intableDD is dealt with.Note that we move only thefirst(#(H)·ρ1)tuples of H into external memory in order to improve the efficiency of duplicate detection(see Section V-C).Lemma1:The total number of I/O operations that the hash-sorting algorithm executes is smaller than or equal to(m+2n)/B.Proof:From the process described in Algorithm1,we can observe that the i th loop mainly executes two types of operations:one is to read B records from disk to the internal memory;the other is to move(B+k i)tuples to disk,where 1≤i≤n/B.Thus,the i th loop needs((B+k i)/B+1)I/OWU et al.:I/O EFFICIENT MODEL CHECKING ALGORITHM909TABLE IS TATES B EFORE M ERGING.(a)S TATES IN I NTERNAL M EMORY.(b)S TATES ON DISKTABLE IIS TATES A FTER M ERGING.(a)S TATES IN M EMORY.(b)S TATES ON D ISK.(c)F INAL RESULToperations in total.Thus,the overall number of I/O operationsthe algorithm executes is((B+k1)/B+1)+((B+k2)/B+1)+···+((B+k n/B)/B+1).Because k1+k2+···+k n/Bis equal to m,the total number of I/O operations is smallerthan or equal to(m+2n)/B.Thus,the I/O complexity of thisalgorithm is O(n+m),linear in the input size.In the following,we still use the example I T C 99,B15(std)to illustrate how the hash storing algorithm isworking.Note that every state is denoted by its hash value.Table I shows the states in the internal memory and thestates in table on disk before merging,which are sorted innondecreasing order by hash values.Our aim is to mergethose in the internal memory into a table on disk.The last line“−−−”in Table I(b)means1000empty records are appended,where1000is equal to the number of the states in theinternal memory.The100states can be transferred in a singleI/O operation.After performing sequentially the followingoperations:1)moving the last100states in Table I(b)(whichare from4409to5833)into the internal memory;2)sortingthem in the internal memory;and3)moving the states in theinternal memory whose hash value are greater than or equalto4409into Table I(b),the corresponding result is shown inTable II(a)and(b).This goes on until all records in Table I(b)are handled.Thefinal result is shown in Table II(c)on thedisk.C.Cached Duplicate Detection TechniqueIn this section,we propose a cached duplicate detectiontechnique CDD,which can significantly improve the perfor-mance of IOEMC.In our duplicate detection technique,the visited states aredivided into two groups:1)the recent states;and2)thehistorical states.The recent states are the ones generatedmost recently and stored in the hash table H in the internalmemory,and the historical states are the ones stored in thehash table tableDD on disk,where H may be H1or H2,andtableDD may be tableDD1or tableDD2.When H is full,CDD invokes LHS to move only thefirst(#(H)·ρ1)tuplesin H into tableDD and sorts the new tableDD.Thus,thecorresponding states become historical states.In the following,we describe how to perform duplicatedetection of a state.When a state is generated,CDDfirstchecks by the hash value of the state whether or not it isin H in the internal memory,which costs no I/O operation.If this is the case,then the state was visited before.Otherwise,CDD further checks by the hash value of the state whether ornot the state is in tableDD in external memory.If this is thecase,then the state was visited before;otherwise,the state isa new state.In general,if we selectρ1<0.05,then duplicate detectionsof almost all states are carried out in the internal memory.We give an intuitive explanation as follows.Suppose thedata segment is allocated2G memory and every state needs500bits of internal memory and every hash value needs12bits.Then,H1should be0.5G of size and can hold220tuples nearest generated.When H1is full and the algorithmmoves thefirst(#(H)·ρ1)tuples of the hash table H intoexternal memory,the tuple number of H1is still close to220becauseρ1<0.05.In general,the probability that the cur-rently generated state goes back beyond the220states nearestgenerated is extremely small.Therefore,for most states,theirduplicate detections are executed in the internal memory.To verify our argument,we conduct some experiments tofigure out the proportion of states whose duplicate detec-tions are performed in internal memory.The selected bench-marks and experimental environment are the same as that ofSection VII.The experimental results are listed in Table III.The experiments show that for all models,the rates of thenumber of states whose duplicate detections are carried out ininternal memory to that of all generated states are at least90%.In addition,we also observe that settingρ1=0.02yields thebest performance for most large-scale models.The main causeis as follows.There is a tradeoff about time consumption inthe setting ofρ1.As the value ofρ1decreases,the numberof visited states stored in internal memory increases,whichsaves time for duplicate detection,but this also results in morefrequent movement of state blocks from the internal memoryto the disk,leading to more time of state management,andvice versa.The above analysis and experimental evidence show CDDcan significantly reduce the cost of duplicate detection dueto the fact that almost all duplicate detections of IOEMC arecarried out in internal memory and tableDD is sorted by hashvalues.910IEEE TRANSACTIONS ON VERY LARGE SCALE INTEGRATION(VLSI)SYSTEMS,VOL.23,NO.5,MAY2015TABLE IIIR ATES OF D UPLICATE D ETECTIONS IN I NTERNAL MEMORYD.Dynamic Search Path ManagementThe search path management includes the static anddynamic ones.The static management means the algorithmallocatesfixed internal memory sections to two stacks of the nested depth-first search,while the dynamic one means twostacks share the same internal memory section.Thus,thedynamic management can more efficiently make use of the internal memory.In this section,we introduce a scheme fordynamic search path management,called DPM.During search,when T2is full and a new state is generated, in order to avoid memory overflow,we need to move statesfrom the two stacks to DB.However,this may result in the phenomenon that states are frequently moved inside andoutside the internal memory.In the following,we analyze how this phenomenon occurs. Suppose we swap M2states at a time between T2and the disk,where M2is the number of states that T2can hold.When T2is full,if we transfer all states in T2to the disk,then T2 becomes empty.In succession,if the algorithm needs to popa state from stack1or stack2because of backtracking,then immediately those M2states just moved to the disk have tobe moved back to the internal memory,and thus T2becomesfull.Afterward,if another new state is generated and needs to be pushed into stack1or stack2,then the M2states have tobe moved outside the internal memory again to make spacefor the new state,and so on.We call such a phenomenon of frequent state movement memory dithering,which cansignificantly increase disk accesses and thus the algorithm’s I/O complexity.In order to avoid memory dithering,we present an efficientscheme which works as follows.1)When T2is full,the algorithm moves only some states(not all)of stack1and stack2into the database to makememory space for new states.For stack1,the algorithm moves k1(=#(stack1)·ρ2)states from the bottom of the stack into tableP1by invoking the function Append(),and releases the corresponding memory space,whereρ2is a parameter with0<ρ2<1.Along with this,the bottom pointer of stack1points to the(k1+1)th state.For stack2,the algorithm handles it in the same way.This procedure is implemented in the Dmem-DB()function,as shown in Algorithm 2.2)When stack1becomes empty,if tableP1is notempty,then the algorithm pushes k1states stored most Algorithm2Dynamic Full-Memory Managementrecently in tableP1into stack1in turn by calling the function Push(),and deletes them from tableP1 by invoking Delete(),where k1=min(#(tableP1), (M2−#(stack2)·ρ2)).When stack2is empty,thealgorithm works similarly.The corresponding procedure is implemented in DDB-mem()function and is outlined in Algorithm3.Note that by reserving some states in both stacks when T2is full,we ensure there are always some states in both stacks,which to some extend reduces the memory dithering phenomenon.E.Model Checking Algorithm IOEMCBased on LHS,CDD,and DPM,we design the IOEMC algorithm.The IOEMC is an I/O efficient on-the-fly model checking algorithm based on the nested depth-first search. We use V0to denote the initial state set and F to denote the accepting state set.Also,we assume the state transition graph of the automata is implicitly given from the function successor(x)that generates all successors of the state x.。

相关文档
最新文档