




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
ReRe欧空局Ariane 波音737Max坠 海湾战争中爱国者飞 当我们说软件是正确的:程序的行为符合
intfoo(inta,intb)returna+
输入 →
Formal(a>=0&&b<=0)||(a<=0&&b>=0)(a>=0&&b>=0&&a+b>=0)(a<=0&&b<=0&&a+b<=
foo(0,1)=1;foo(INT_MAX,1)=ERROR;foo(INT_MAX-1,1)=INT_MAX;foo(INT_MAX,INT_MIN)=-1;我们朴素的愿望:希望测试能变异算子(mutationExecuteExecutetestExecutetest变异算子(mutation变异算子(mutation 1971DeMilloHamlet面向中间表示:Javabytecode,LLVM-Android、MPI基于变异的缺陷自动定位(mutation-basedfaultlocalization)传统定位方法:基于测试覆盖信息对语句排序(spectrum-basedfault基于变异的方法:通过观察变异对测试结果CProteum(108mutationWinMut(IR-JavaMajor[ByReneJavaLanch(IR-based)[ByPITest(CommercialSoftware-artifactInfrastructureRepository(somehowDefects4JManyBugs挑战1:BugDeepMutationICSME-19]、LEAM[ASE-挑战2:挑战2:阻碍变异分析走向工业实践的是可扩展性(Scalability)M个变异,N变异分析的计算复杂度:O(M)+𝑇𝑡𝑜𝑡𝑎𝑙=∑𝑚∈𝑀𝑡𝑠𝑒𝑒𝑑,𝑚+ 𝑡𝑐𝑜𝑚𝑝𝑖𝑙𝑒,𝑚+ ∑𝑛∈𝑁在实际规模的程序中,M挑战3:ii!=
for(inti=0;i<10;
for(inti=
面向挑战1:buggy->面向挑战2:4包括开源模型和商用闭源模型(实验还在扩展中GPT-3.5-TurboGPT-4-TurboAPI23090Java(JavaBaselineDefects4Jv1.20395ConDefects45JavaLEAM[ASE-muBert[ICST- 实缺陷作为Few-shot时间代价(秒平均生成1k等价变异率(按95%置信度和5%误差幅度采样AST节点类型(例如,aba–babfoo(ab)ASTBLEUASTOchiai(语义相似度指标P2:P1few-shotP3:P2P4:P1基于大模型的变异生成:不同的Few-shot我们将所有工具生成的变异数限制为最少的一个analyzebytesttestqualityanalyzebytesttestqualityassessment→mutationfaultlocalization→passorvoidtest_foo(){assert(foo(a,b,c)==RES);EachmutanthasasyntacticTestfoo(inta,intb,Testfoo(inta,intb,intc){intd=a+b;inte=(++d)+c;returne;foo(inta,intb,intc){intd=(++a)+b;inte=d+c;returne;foo(inta,intb,intc){intd=a+b;inte=d+c;returne;foo(inta,intb,intc){intd=(a+1)+b;inte=d+c;returne;returnreturnreturnCyclesrepresentstates,thenumbersinsideareidArrowsrepresentstatetransitionsbyexecutingthelabelstatementintd=a+b;inte=d+c;returne;intd=(a+1)+b;inte=d+c;returnintdintd=(++a)+b;inte=d+c;returnintd=a+inte=(++d)+return
return
Therearealotofredundantcomputation.Forexample,theexecutionfromthebeginningtothestate0 Theinterpreterforkschild-processeswhenencountersamutatedstatement.returnStartwithaprocesscarryingallreturnreturnReplacemutatedstatementswithSSEd=a+b;inte=d+c;returne;intd=interpret(a,b,ADD);inte=Theinterpreterforkschild-processeswhenencountersamutatedstatement.returnStartwithaprocesscarryingallreturnreturnReplacemutatedstatementswithSSEd=a+b;inte=d+c;returne;intd=interpret(a,b,ADD);inte=interpret(d,c,ADD);returne;intd=(a+1)+b;inte=d+c;intd=(++a)+b;inte=d+c;intd=a+inte=(++d)+returnreturnreturnreturnTheredundancyafterthefirstlineisstillalivebeforethestate0Wangetal.,ThelabelbelowistheexecutedexpressioninsideinterpreterWangetal.,ThelabelbelowistheexecutedexpressioninsideinterpreterTheinterpreterTheinterpreteralsocarriesallmutantsItclustersthemutantsofonestatementbyEMS,andforksnewprocessforeach
returnintintd=interpret(a,b,ADD);inte=interpret(d,c,ADD);returne;M1,Instrumentasreturn return
return
2.AccMutinvolves2.AccMutinvolvesalotof AccMutisunabletomergemorereturnM3isSplitcauseitisinareturnTheinterpreterinvocationsinachildprocessisuselessM1andM2aresplitbythevalueofthevariablea,however,whichhasnoeffectonthefinalresult
1 returnreturn
return return Fewer ContinuouslyinterpretabasicblockreturnFewer ContinuouslyinterpretabasicblockreturnreturnDirectlyexecutetheoriginreturnInthechildprocessofaformerOnlycomparethevariableeMergeallthemutantsinasingleAvoidinvokingtheM1,M2,2.Onlycomparethevariablesthatmayaffectthefinal1.Enlargeanalysisscopefromastatementtoabasic3.Avoidunnecessarily3.AvoidunnecessarilyinterpretingmutatedSmallerLLVM-IR中
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025标准版合同咨询服务协议示例
- 地下水开发打井工程合同示范文本
- 幼儿园教师主题方案撰写的问题与优化策略
- 犍为一中2013级文科后期内化复习计划222
- 航标管理制度解读
- 提升小学语文单元整体教学效果的策略与实践方案
- 企业财务合规管理与风险控制实战
- 贵金属催化剂行业发展趋势与市场前景解析
- 产科教融合促进高质量教师培养的有效路径
- 结婚新郎单独致辞
- JGJ107-2016钢筋机械连接技术规程
- (高清版)WST 402-2024 临床实验室定量检验项目参考区间的制定
- 围墙拆除工程施工方案
- 性发育异常疾病课件
- 清水河储能电站施工方案设计
- 从汽车检测看低空飞行器检测发展趋势
- 《短视频拍摄与制作》课件-3短视频中期拍摄
- 中铁投资公司招聘笔试题
- 2024年十堰市中小学教师职称晋升水平能力测试题附答案
- 中药热奄包在急性胃炎治疗中的应用研究
- 观光小火车方案
评论
0/150
提交评论