From 8f57d941567e1cce7c3b65ab7a73c382f210b9e3 Mon Sep 17 00:00:00 2001 From: davis-matthew Date: Sun, 13 Aug 2023 21:42:01 -0400 Subject: [PATCH] Spelling Fixes --- README.md | 4 +- svf-llvm/CMakeLists.txt | 2 +- .../include/SVF-LLVM/GEPTypeBridgeIterator.h | 2 +- .../include/SVF-LLVM/SymbolTableBuilder.h | 2 +- svf-llvm/lib/BreakConstantExpr.cpp | 2 +- svf-llvm/lib/ICFGBuilder.cpp | 4 +- svf-llvm/lib/LLVMModule.cpp | 6 +-- svf-llvm/lib/SVFIRBuilder.cpp | 10 ++--- svf-llvm/lib/SVFIRExtAPI.cpp | 4 +- svf-llvm/lib/SymbolTableBuilder.cpp | 4 +- svf-llvm/tools/MTA/MTAResultValidator.cpp | 2 +- svf/include/AbstractExecution/ConsExeState.h | 2 +- .../AbstractExecution/IntervalExeState.h | 2 +- svf/include/AbstractExecution/IntervalValue.h | 2 +- svf/include/AbstractExecution/SymState.h | 2 +- svf/include/CFL/CFGrammar.h | 2 +- svf/include/CFL/GrammarBuilder.h | 6 +-- svf/include/FastCluster/fastcluster.h | 8 ++-- svf/include/Graphs/CHG.h | 2 +- svf/include/Graphs/ConsG.h | 6 +-- svf/include/Graphs/GenericGraph.h | 4 +- svf/include/Graphs/GraphTraits.h | 2 +- svf/include/Graphs/GraphWriter.h | 2 +- svf/include/Graphs/IRGraph.h | 2 +- svf/include/Graphs/PTACallGraph.h | 2 +- svf/include/Graphs/VFGNode.h | 4 +- svf/include/MSSA/MSSAMuChi.h | 4 +- svf/include/MSSA/MemRegion.h | 2 +- svf/include/MSSA/MemSSA.h | 2 +- svf/include/MTA/FSMPTA.h | 2 +- svf/include/MTA/MHP.h | 2 +- svf/include/MTA/TCT.h | 2 +- svf/include/MemoryModel/ConditionalPT.h | 2 +- svf/include/MemoryModel/MutablePointsToDS.h | 4 +- .../MemoryModel/PersistentPointsToDS.h | 2 +- svf/include/MemoryModel/PointerAnalysis.h | 2 +- svf/include/MemoryModel/PointsTo.h | 2 +- svf/include/SABER/SaberCondAllocator.h | 2 +- svf/include/SABER/SrcSnkDDA.h | 2 +- svf/include/SVFIR/SVFFileSystem.h | 6 +-- svf/include/SVFIR/SVFIR.h | 2 +- svf/include/SVFIR/SVFStatements.h | 38 +++++++++---------- svf/include/SVFIR/SVFType.h | 10 ++--- svf/include/SVFIR/SVFValue.h | 2 +- svf/include/SVFIR/SVFVariables.h | 6 +-- svf/include/SVFIR/SymbolTableInfo.h | 6 +-- svf/include/Util/Casting.h | 2 +- svf/include/Util/CoreBitVector.h | 4 +- svf/include/Util/DPItem.h | 2 +- svf/include/Util/NodeIDAllocator.h | 2 +- svf/include/Util/Options.h | 2 +- svf/include/Util/SVFBugReport.h | 2 +- svf/include/Util/SVFUtil.h | 8 ++-- svf/include/Util/WorkList.h | 2 +- svf/include/Util/cJSON.h | 2 +- svf/include/WPA/Andersen.h | 2 +- svf/include/WPA/FlowSensitive.h | 2 +- svf/include/WPA/WPASolver.h | 2 +- .../AbstractExecution/SVFIR2ConsExeState.cpp | 2 +- svf/lib/CFL/CFGNormalizer.cpp | 4 +- svf/lib/CFL/CFLAlias.cpp | 4 +- svf/lib/CFL/CFLGraphBuilder.cpp | 4 +- svf/lib/CFL/CFLVF.cpp | 2 +- svf/lib/DDA/ContextDDA.cpp | 2 +- svf/lib/FastCluster/fastcluster.cpp | 6 +-- svf/lib/Graphs/ConsG.cpp | 2 +- svf/lib/Graphs/SVFGOPT.cpp | 4 +- svf/lib/Graphs/VFG.cpp | 4 +- svf/lib/MSSA/MemRegion.cpp | 2 +- svf/lib/MTA/FSMPTA.cpp | 2 +- svf/lib/MTA/LockAnalysis.cpp | 2 +- svf/lib/MTA/MHP.cpp | 2 +- svf/lib/MemoryModel/AccessPath.cpp | 4 +- svf/lib/SABER/ProgSlice.cpp | 2 +- svf/lib/SABER/SaberCondAllocator.cpp | 2 +- svf/lib/SVFIR/SVFIR.cpp | 6 +-- svf/lib/SVFIR/SVFValue.cpp | 6 +-- svf/lib/SVFIR/SymbolTableInfo.cpp | 4 +- svf/lib/Util/NodeIDAllocator.cpp | 4 +- svf/lib/Util/Options.cpp | 14 +++---- svf/lib/Util/SVFUtil.cpp | 4 +- svf/lib/WPA/Andersen.cpp | 12 +++--- svf/lib/WPA/VersionedFlowSensitive.cpp | 4 +- 83 files changed, 163 insertions(+), 163 deletions(-) diff --git a/README.md b/README.md index 313558279..75d752948 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ * [DDA](https://github.com/SVF-tools/SVF/tree/master/svf/include/DDA) (demand-driven analysis): flow-sensitive, context-sensitive points-to analysis ([FSE'16](https://yuleisui.github.io/publications/fse16.pdf), [TSE'18](https://yuleisui.github.io/publications/tse18.pdf)); * [MSSA](https://github.com/SVF-tools/SVF/tree/master/svf/include/MSSA) (memory SSA form construction): memory regions, side-effects, SSA form ([JSS'18](https://yuleisui.github.io/publications/jss18.pdf)); * [SABER](https://github.com/SVF-tools/SVF/tree/master/svf/include/SABER) (memory error checking): memory leaks and double-frees ([ISSTA'12](https://yuleisui.github.io/publications/issta12.pdf), [TSE'14](https://yuleisui.github.io/publications/tse14.pdf), [ICSE'18](https://yuleisui.github.io/publications/icse18a.pdf)); -* [MTA](https://github.com/SVF-tools/SVF/tree/master/svf/include/MTA) (analysis of mutithreaded programs): value-flows for multithreaded programs ([CGO'16](https://yuleisui.github.io/publications/cgo16.pdf)); +* [MTA](https://github.com/SVF-tools/SVF/tree/master/svf/include/MTA) (analysis of multithreaded programs): value-flows for multithreaded programs ([CGO'16](https://yuleisui.github.io/publications/cgo16.pdf)); * [CFL](https://github.com/SVF-tools/SVF/tree/master/svf/include/CFL) (context-free-reachability analysis): standard CFL solver, graph and grammar ([OOPSLA'22](https://yuleisui.github.io/publications/oopsla22.pdf), [PLDI'23](https://yuleisui.github.io/publications/pldi23.pdf)); * [SVFIR](https://github.com/SVF-tools/SVF/tree/master/svf/include/SVFIR) and [MemoryModel](https://github.com/SVF-tools/SVF/tree/master/svf/include/MemoryModel) (SVFIR): SVFIR, memory abstraction and points-to data structure ([SAS'21](https://yuleisui.github.io/publications/sas21.pdf)); -* [Graphs](https://github.com/SVF-tools/SVF/tree/master/svf/include/Graphs): generating a variety of graphs, including call graph, ICFG, class hirachary graph, constraint graph, value-flow graph for static analyses and code embedding ([OOPSLA'20](https://yuleisui.github.io/publications/oopsla20.pdf), [TOSEM'21](https://yuleisui.github.io/publications/tosem21.pdf)) +* [Graphs](https://github.com/SVF-tools/SVF/tree/master/svf/include/Graphs): generating a variety of graphs, including call graph, ICFG, class hierarchy graph, constraint graph, value-flow graph for static analyses and code embedding ([OOPSLA'20](https://yuleisui.github.io/publications/oopsla20.pdf), [TOSEM'21](https://yuleisui.github.io/publications/tosem21.pdf)) SVF's doxygen document is available [here](https://svf-tools.github.io/SVF-doxygen/html). diff --git a/svf-llvm/CMakeLists.txt b/svf-llvm/CMakeLists.txt index fd05f5f9b..b16fa17e3 100644 --- a/svf-llvm/CMakeLists.txt +++ b/svf-llvm/CMakeLists.txt @@ -45,7 +45,7 @@ else() set(IN_SOURCE_BUILD 1) endif() -# SVF-LLVM containes LLVM Libs +# SVF-LLVM contains LLVM Libs file(GLOB SVFLLVM_SOURCES lib/*.cpp) add_llvm_library(SvfLLVM STATIC ${SVFLLVM_SOURCES}) diff --git a/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h b/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h index 8e6c33af6..4b4b59b32 100644 --- a/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h +++ b/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h @@ -89,7 +89,7 @@ class generic_bridge_gep_type_iterator : public std::iterator() const { return operator*(); diff --git a/svf-llvm/include/SVF-LLVM/SymbolTableBuilder.h b/svf-llvm/include/SVF-LLVM/SymbolTableBuilder.h index 2f917645b..07502e3b0 100644 --- a/svf-llvm/include/SVF-LLVM/SymbolTableBuilder.h +++ b/svf-llvm/include/SVF-LLVM/SymbolTableBuilder.h @@ -94,7 +94,7 @@ class SymbolTableBuilder void analyzeStaticObjType(ObjTypeInfo* typeinfo, const Value* val); ///Get a reference to the components of struct_info. - /// Number of flattenned elements of an array or struct + /// Number of flattened elements of an array or struct u32_t getNumOfFlattenElements(const Type* T); ///Get a reference to StructInfo. diff --git a/svf-llvm/lib/BreakConstantExpr.cpp b/svf-llvm/lib/BreakConstantExpr.cpp index 54148556a..5fc194d96 100644 --- a/svf-llvm/lib/BreakConstantExpr.cpp +++ b/svf-llvm/lib/BreakConstantExpr.cpp @@ -222,7 +222,7 @@ BreakConstantGEPs::runOnModule (Module & module) { // // For other instructions, we want to insert instructions replacing - // constant expressions immediently before the instruction using the + // constant expressions immediately before the instruction using the // constant expression. // if (ConstantExpr * CE = hasConstantGEP (I->getOperand(index))) diff --git a/svf-llvm/lib/ICFGBuilder.cpp b/svf-llvm/lib/ICFGBuilder.cpp index 50e0a463a..0d52d1b85 100644 --- a/svf-llvm/lib/ICFGBuilder.cpp +++ b/svf-llvm/lib/ICFGBuilder.cpp @@ -42,7 +42,7 @@ using namespace LLVMUtil; void ICFGBuilder::build(SVFModule* svfModule) { DBOUT(DGENERAL, outs() << pasMsg("\t Building ICFG ...\n")); - // Add the unqiue global ICFGNode at the entry of a program (before the main method). + // Add the unique global ICFGNode at the entry of a program (before the main method). icfg->addGlobalICFGNode(); for (Module &M : LLVMModuleSet::getLLVMModuleSet()->getLLVMModules()) @@ -79,7 +79,7 @@ void ICFGBuilder::processFunEntry(const Function* fun, WorkList& worklist) for (InstVec::const_iterator nit = insts.begin(), enit = insts.end(); nit != enit; ++nit) { - ICFGNode* instNode = getOrAddBlockICFGNode(LLVMModuleSet::getLLVMModuleSet()->getSVFInstruction(*nit)); //add interprocedure edge + ICFGNode* instNode = getOrAddBlockICFGNode(LLVMModuleSet::getLLVMModuleSet()->getSVFInstruction(*nit)); //add interprocedural edge icfg->addIntraEdge(FunEntryICFGNode, instNode); worklist.push(*nit); } diff --git a/svf-llvm/lib/LLVMModule.cpp b/svf-llvm/lib/LLVMModule.cpp index 40f02f44b..7390051ec 100644 --- a/svf-llvm/lib/LLVMModule.cpp +++ b/svf-llvm/lib/LLVMModule.cpp @@ -48,7 +48,7 @@ using namespace SVF; LLVM may generate two global arrays @llvm.global_ctors and @llvm.global_dtors that contain constructor and destructor functions for global variables. They are not called explicitly, so we have to add them in the svf.main function. - The order to call these constructor and desctructor functions are also + The order to call these constructor and destructor functions are also specified in the global arrays. Related part in LLVM language reference: https://llvm.org/docs/LangRef.html#the-llvm-global-ctors-global-variable @@ -466,7 +466,7 @@ void LLVMModuleSet::preProcessBCs(std::vector &moduleNameVec) mset->prePassSchedule(); std::string preProcessSuffix = ".pre.bc"; - // Get the existing module names, remove old extention, add preProcessSuffix + // Get the existing module names, remove old extension, add preProcessSuffix for (u32_t i = 0; i < moduleNameVec.size(); i++) { u32_t lastIndex = moduleNameVec[i].find_last_of("."); @@ -685,7 +685,7 @@ void LLVMModuleSet::addSVFMain() } // Only create svf.main when the original main function is found, and also - // there are global contructor or destructor functions. + // there are global constructor or destructor functions. if (orgMain && getModuleNum() > 0 && (ctor_funcs.size() > 0 || dtor_funcs.size() > 0)) { diff --git a/svf-llvm/lib/SVFIRBuilder.cpp b/svf-llvm/lib/SVFIRBuilder.cpp index 4a0ce9afe..800910e4e 100644 --- a/svf-llvm/lib/SVFIRBuilder.cpp +++ b/svf-llvm/lib/SVFIRBuilder.cpp @@ -244,7 +244,7 @@ void SVFIRBuilder::initialiseNodes() } assert(pag->getTotalNodeNum() >= symTable->getTotalSymNum() - && "not all node been inititalize!!!"); + && "not all node have been initialized!!!"); } @@ -296,7 +296,7 @@ bool SVFIRBuilder::computeGepOffset(const User *V, AccessPath& ap) const ConstantInt* op = SVFUtil::dyn_cast(offsetVal); // if Options::ModelConsts() is disabled. We will treat whole array as one, - // but we can distinguish different field of an array of struct, e.g. s[1].f1 is differet from s[0].f2 + // but we can distinguish different field of an array of struct, e.g. s[1].f1 is different from s[0].f2 if(const ArrayType* arrTy = SVFUtil::dyn_cast(gepTy)) { if(!op || (arrTy->getArrayNumElements() <= (u32_t)op->getSExtValue())) @@ -433,7 +433,7 @@ void SVFIRBuilder::processCE(const Value* val) } else if (SVFUtil::isa(ref)) { - // we don't handle constant agrgregate like constant vectors + // we don't handle constant aggregate like constant vectors } else if (SVFUtil::isa(ref)) { @@ -492,7 +492,7 @@ void SVFIRBuilder::InitialGlobal(const GlobalVariable *gvar, Constant *C, if (C->getType()->isSingleValueType()) { NodeID src = getValueNode(C); - // get the field value if it is avaiable, otherwise we create a dummy field node. + // get the field value if it is available, otherwise we create a dummy field node. setCurrentLocation(gvar, nullptr); NodeID field = getGlobalVarField(gvar, offset, LLVMModuleSet::getLLVMModuleSet()->getSVFType(C->getType())); @@ -979,7 +979,7 @@ void SVFIRBuilder::visitVAArgInst(VAArgInst &inst) /// = freeze ty /// If is undef or poison, ‘freeze’ returns an arbitrary, but fixed value of type `ty` /// Otherwise, this instruction is a no-op and returns the input -/// For now, we assume is never a posion or undef. +/// For now, we assume is never a poison or undef. void SVFIRBuilder::visitFreezeInst(FreezeInst &inst) { NodeID dst = getValueNode(&inst); diff --git a/svf-llvm/lib/SVFIRExtAPI.cpp b/svf-llvm/lib/SVFIRExtAPI.cpp index 32aa887c6..7fded0e44 100644 --- a/svf-llvm/lib/SVFIRExtAPI.cpp +++ b/svf-llvm/lib/SVFIRExtAPI.cpp @@ -1,4 +1,4 @@ -//===- SVFIR.cpp -- Exteral function IR of SVF ---------------------------------------------// +//===- SVFIR.cpp -- External function IR of SVF ---------------------------------------------// // // SVF: Static Value-Flow Analysis // @@ -649,7 +649,7 @@ void SVFIRBuilder::handleExtCall(const SVFInstruction* svfInst, const SVFFunctio } /// If forkedFun does not pass to spawnee as function type but as void pointer /// remember to update inter-procedural callgraph/SVFIR/SVFG etc. when indirect call targets are resolved - /// We don't connect the callgraph here, further investigation is need to hanle mod-ref during SVFG construction. + /// We don't connect the callgraph here, further investigation is need to handle mod-ref during SVFG construction. } /// create inter-procedural SVFIR edges for hare_parallel_for calls diff --git a/svf-llvm/lib/SymbolTableBuilder.cpp b/svf-llvm/lib/SymbolTableBuilder.cpp index 011bc0a51..7bc27efe2 100644 --- a/svf-llvm/lib/SymbolTableBuilder.cpp +++ b/svf-llvm/lib/SymbolTableBuilder.cpp @@ -461,7 +461,7 @@ void SymbolTableBuilder::handleCE(const Value* val) } else if (SVFUtil::isa(ref)) { - // we don't handle constant agrgregate like constant vectors + // we don't handle constant aggregate like constant vectors collectVal(ref); } else @@ -795,7 +795,7 @@ u32_t SymbolTableBuilder::getObjSize(const Type* ety) return numOfFields; } -/// Number of flattenned elements of an array or struct +/// Number of flattened elements of an array or struct u32_t SymbolTableBuilder::getNumOfFlattenElements(const Type* T) { if(Options::ModelArrays()) diff --git a/svf-llvm/tools/MTA/MTAResultValidator.cpp b/svf-llvm/tools/MTA/MTAResultValidator.cpp index 509e2ecdd..756e0715b 100644 --- a/svf-llvm/tools/MTA/MTAResultValidator.cpp +++ b/svf-llvm/tools/MTA/MTAResultValidator.cpp @@ -114,7 +114,7 @@ CallStrCxt MTAResultValidator::getCxtArg(const Instruction* inst, unsigned int a CallStrCxt cxt; if (0 == x.size()) return cxt; - // Deal with the the second argument that records all callsites + // Deal with the second argument that records all callsites for (std::vector::iterator i = x.begin(); i != x.end(); i++) { std::vector y = split((*i), '.'); diff --git a/svf/include/AbstractExecution/ConsExeState.h b/svf/include/AbstractExecution/ConsExeState.h index 58f8848b0..ef639baf1 100644 --- a/svf/include/AbstractExecution/ConsExeState.h +++ b/svf/include/AbstractExecution/ConsExeState.h @@ -42,7 +42,7 @@ namespace SVF * / / | \ \ \ * true ... c0 c1 ... false constant * \ \ \ | | | - * ⊥ not contant + * ⊥ not constant */ class ConsExeState final : public ExeState { diff --git a/svf/include/AbstractExecution/IntervalExeState.h b/svf/include/AbstractExecution/IntervalExeState.h index bf108e0bd..cf57dff25 100644 --- a/svf/include/AbstractExecution/IntervalExeState.h +++ b/svf/include/AbstractExecution/IntervalExeState.h @@ -264,7 +264,7 @@ class IntervalExeState : public ExeState return (s32_t) e.lb().getNumeral(); } - ///TODO: Create new inteval value + ///TODO: Create new interval value IntervalValue createIntervalValue(double lb, double ub, NodeID id) { _varToItvVal[id] = IntervalValue(lb, ub); diff --git a/svf/include/AbstractExecution/IntervalValue.h b/svf/include/AbstractExecution/IntervalValue.h index d1fd611cc..2d86f77b2 100644 --- a/svf/include/AbstractExecution/IntervalValue.h +++ b/svf/include/AbstractExecution/IntervalValue.h @@ -473,7 +473,7 @@ inline IntervalValue operator+(const IntervalValue &lhs, } } -/// Substract IntervalValues +/// Subtract IntervalValues inline IntervalValue operator-(const IntervalValue &lhs, const IntervalValue &rhs) { diff --git a/svf/include/AbstractExecution/SymState.h b/svf/include/AbstractExecution/SymState.h index 92aae7af9..8bef61ee9 100644 --- a/svf/include/AbstractExecution/SymState.h +++ b/svf/include/AbstractExecution/SymState.h @@ -60,7 +60,7 @@ class SymState /// Constructor SymState(ConsExeState _es, TypeState _as); - /// Desstructor + /// Destructor virtual ~SymState() = default; /// Copy Constructor diff --git a/svf/include/CFL/CFGrammar.h b/svf/include/CFL/CFGrammar.h index 1fb9f1cce..50ecebef4 100644 --- a/svf/include/CFL/CFGrammar.h +++ b/svf/include/CFL/CFGrammar.h @@ -48,7 +48,7 @@ class GrammarBase /// Default Value for Symbol is 0. Symbol() : kind(0), attribute(0), variableAttribute(0) {} - /// Contruct from u32_t move the bit to right field + /// Construct from u32_t move the bit to right field Symbol(const u32_t& num) : kind(num & 0xFF), attribute((num >> 8 ) & 0xFFFF), variableAttribute((num >> 24)) {} /// Conversion of u32_t diff --git a/svf/include/CFL/GrammarBuilder.h b/svf/include/CFL/GrammarBuilder.h index c7a41109e..22be0a3d1 100644 --- a/svf/include/CFL/GrammarBuilder.h +++ b/svf/include/CFL/GrammarBuilder.h @@ -49,7 +49,7 @@ namespace SVF * * Production Format: * -> *; - * LHS and RHS, Seperate by '->', symbol seperate by ' ', end by ';' + * LHS and RHS, Separate by '->', symbol separate by ' ', end by ';' * support '*', '?', '(', ')' * * Input Format: @@ -57,10 +57,10 @@ namespace SVF * M // Specify Start Symbol in Second Line * Terminal: * Addr Copy Store Load Gep Vgep // Specify the order of terminal Addr->0, Copy->1 .. - * Productions: // Each Symbol seperate by 'Space', production end with ';' + * Productions: // Each Symbol separate by 'Space', production end with ';' * M -> V d; // Terminal in NonCapital * M -> dbar V d; // NonTerminal in Capital - * V -> M abar M a M; // LHS and RHS, Seperate by '->' + * V -> M abar M a M; // LHS and RHS, Separate by '->' * V -> ( M ? abar ) * M ? ( a M ? ) *; // Support '(' ')' '?' '*' four regular expression sign * Gep_j -> Gep_i F vgep; // Support variable attribute with variable attribute * Gep_1 -> Gep_2; // Support fix number attribute diff --git a/svf/include/FastCluster/fastcluster.h b/svf/include/FastCluster/fastcluster.h index e70b8ddc4..cb9c8cbfd 100644 --- a/svf/include/FastCluster/fastcluster.h +++ b/svf/include/FastCluster/fastcluster.h @@ -1,5 +1,5 @@ // -// C++ standalone verion of fastcluster by Daniel Muellner +// C++ standalone version of fastcluster by Daniel Muellner // // Copyright: Daniel Muellner, 2011 // Christoph Dalitz, 2020 @@ -25,7 +25,7 @@ void cutree_k(int n, const int* merge, int nclust, int* labels); // // Assigns cluster labels (0, ..., nclust-1) to the n points such -// that the hierarchical clsutering is stopped at cluster distance cdist +// that the hierarchical clustering is stopped at cluster distance cdist // // Input arguments: // n = number of observables @@ -53,7 +53,7 @@ void cutree_cdist(int n, const int* merge, double* height, double cdist, int* la // Output arguments: // merge = allocated (n-1)x2 matrix (2*(n-1) array) for storing result. // Result follows R hclust convention: -// - observabe indices start with one +// - observable indices start with one // - merge[i][] contains the merged nodes in step i // - merge[i][j] is negative when the node is an atom // height = allocated (n-1) array with distances at each merge step @@ -68,7 +68,7 @@ enum hclust_fast_methods HCLUST_METHOD_SINGLE = 0, // complete link with the nearest-neighbor-chain algorithm (Murtagh, 1984) HCLUST_METHOD_COMPLETE = 1, - // omplete link with the nearest-neighbor-chain algorithm (Murtagh, 1984) + // complete link with the nearest-neighbor-chain algorithm (Murtagh, 1984) HCLUST_METHOD_AVERAGE = 2, // median link with the generic algorithm (Müllner, 2011) HCLUST_METHOD_MEDIAN = 3, diff --git a/svf/include/Graphs/CHG.h b/svf/include/Graphs/CHG.h index bccd82438..3a9ba2b5b 100644 --- a/svf/include/Graphs/CHG.h +++ b/svf/include/Graphs/CHG.h @@ -1,4 +1,4 @@ -//===----- CHG.h -- Class hirachary graph ---------------------------// +//===----- CHG.h -- Class hierarchy graph ---------------------------// // // SVF: Static Value-Flow Analysis // diff --git a/svf/include/Graphs/ConsG.h b/svf/include/Graphs/ConsG.h index 848e70d16..4eb482f70 100644 --- a/svf/include/Graphs/ConsG.h +++ b/svf/include/Graphs/ConsG.h @@ -72,7 +72,7 @@ class ConstraintGraph : public GenericGraph return pag->getPTASVFStmtSet(kind); } - /// Wappers used internally, not expose to Andernsen Pass + /// Wrappers used internally, not expose to Andersen Pass //@{ inline NodeID getValueNode(const SVFValue* value) const { @@ -214,9 +214,9 @@ class ConstraintGraph : public GenericGraph /// Used for cycle elimination //@{ - /// Remove edge from old dst target, change edge dst id and add modifed edge into new dst + /// Remove edge from old dst target, change edge dst id and add modified edge into new dst void reTargetDstOfEdge(ConstraintEdge* edge, ConstraintNode* newDstNode); - /// Remove edge from old src target, change edge dst id and add modifed edge into new src + /// Remove edge from old src target, change edge dst id and add modified edge into new src void reTargetSrcOfEdge(ConstraintEdge* edge, ConstraintNode* newSrcNode); /// Remove addr edge from their src and dst edge sets void removeAddrEdge(AddrCGEdge* edge); diff --git a/svf/include/Graphs/GenericGraph.h b/svf/include/Graphs/GenericGraph.h index 60e76135a..b04277490 100644 --- a/svf/include/Graphs/GenericGraph.h +++ b/svf/include/Graphs/GenericGraph.h @@ -248,7 +248,7 @@ class GenericNode } //@} - /// Iterators used for SCC detection, overwrite it in child class if necessory + /// Iterators used for SCC detection, overwrite it in child class if necessary //@{ virtual inline iterator directOutEdgeBegin() { @@ -460,7 +460,7 @@ class GenericGraph /* ! * GenericGraphTraits specializations for generic graph algorithms. - * Provide graph traits for tranversing from a node using standard graph traversals. + * Provide graph traits for traversing from a node using standard graph traversals. */ namespace SVF { diff --git a/svf/include/Graphs/GraphTraits.h b/svf/include/Graphs/GraphTraits.h index d7e43c0bb..eeaadaaf6 100644 --- a/svf/include/Graphs/GraphTraits.h +++ b/svf/include/Graphs/GraphTraits.h @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // // This file defines the little GenericGraphTraits template class that should be -// specialized by classes that want to be iteratable by generic graph iterators. +// specialized by classes that want to be iterable by generic graph iterators. // // This file also defines the marker class Inverse that is used to iterate over // graphs in a graph defined, inverse ordering... diff --git a/svf/include/Graphs/GraphWriter.h b/svf/include/Graphs/GraphWriter.h index cb4ac0ddd..60795adc5 100644 --- a/svf/include/Graphs/GraphWriter.h +++ b/svf/include/Graphs/GraphWriter.h @@ -301,7 +301,7 @@ class GraphWriter const void *DestNodeID, int DestNodePort, const std::string &Attrs) { - if (SrcNodePort > 64) return; // Eminating from truncated part? + if (SrcNodePort > 64) return; // Emanating from truncated part? if (DestNodePort > 64) DestNodePort = 64; // Targeting the truncated part? O << "\tNode" << SrcNodeID; diff --git a/svf/include/Graphs/IRGraph.h b/svf/include/Graphs/IRGraph.h index 7450e3968..f295352b2 100644 --- a/svf/include/Graphs/IRGraph.h +++ b/svf/include/Graphs/IRGraph.h @@ -233,7 +233,7 @@ namespace SVF /* ! * GenericGraphTraits specializations of SVFIR to be used for the generic graph algorithms. - * Provide graph traits for tranversing from a SVFIR node using standard graph traversals. + * Provide graph traits for traversing from a SVFIR node using standard graph traversals. */ template<> struct GenericGraphTraits : public GenericGraphTraits* > { diff --git a/svf/include/Graphs/PTACallGraph.h b/svf/include/Graphs/PTACallGraph.h index 1cfa81864..48966f869 100644 --- a/svf/include/Graphs/PTACallGraph.h +++ b/svf/include/Graphs/PTACallGraph.h @@ -373,7 +373,7 @@ class PTACallGraph : public GenericCallGraphTy return getCallSitePair(id).second; } //@} - /// Whether we have aleady created this call graph edge + /// Whether we have already created this call graph edge PTACallGraphEdge* hasGraphEdge(PTACallGraphNode* src, PTACallGraphNode* dst,PTACallGraphEdge::CEDGEK kind, CallSiteID csId) const; /// Get call graph edge via nodes PTACallGraphEdge* getGraphEdge(PTACallGraphNode* src, PTACallGraphNode* dst,PTACallGraphEdge::CEDGEK kind, CallSiteID csId); diff --git a/svf/include/Graphs/VFGNode.h b/svf/include/Graphs/VFGNode.h index 239644d82..2d88dd670 100644 --- a/svf/include/Graphs/VFGNode.h +++ b/svf/include/Graphs/VFGNode.h @@ -841,7 +841,7 @@ class ArgumentVFGNode : public VFGNode }; /* - * ICFG Node stands for acutal parameter node (top level pointers) + * ICFG Node stands for actual parameter node (top level pointers) */ class ActualParmVFGNode : public ArgumentVFGNode { @@ -962,7 +962,7 @@ class FormalParmVFGNode : public ArgumentVFGNode }; /*! - * Callsite receive paramter + * Callsite receive parameter */ class ActualRetVFGNode: public ArgumentVFGNode { diff --git a/svf/include/MSSA/MSSAMuChi.h b/svf/include/MSSA/MSSAMuChi.h index 4292c860e..84a82d1d8 100644 --- a/svf/include/MSSA/MSSAMuChi.h +++ b/svf/include/MSSA/MSSAMuChi.h @@ -341,7 +341,7 @@ class MSSADEF MRVer* resVer; public: - /// Constructor/Destructer for MSSADEF + /// Constructor/Destructor for MSSADEF //@{ MSSADEF(DEFTYPE t, const MemRegion* m): type(t), mr(m), resVer(nullptr) { @@ -401,7 +401,7 @@ class MSSACHI : public MSSADEF Cond cond; public: typedef typename MSSADEF::DEFTYPE CHITYPE; - /// Constructor/Destructer for MSSACHI + /// Constructor/Destructor for MSSACHI //@{ MSSACHI(CHITYPE t, const MemRegion* m, Cond c): MSSADEF(t,m), opVer(nullptr), cond(c) { diff --git a/svf/include/MSSA/MemRegion.h b/svf/include/MSSA/MemRegion.h index b79fff944..bc49e8355 100644 --- a/svf/include/MSSA/MemRegion.h +++ b/svf/include/MSSA/MemRegion.h @@ -107,7 +107,7 @@ class MemRegion } /// add the hash function here to sort elements and remove - /// and remove duplicated element in the set (binary tree comparision) + /// and remove duplicated element in the set (binary tree comparison) //@{ typedef struct equalMemRegion { diff --git a/svf/include/MSSA/MemSSA.h b/svf/include/MSSA/MemSSA.h index 1555925ad..3424095a6 100644 --- a/svf/include/MSSA/MemSSA.h +++ b/svf/include/MSSA/MemSSA.h @@ -124,7 +124,7 @@ class MemSSA /// Create mu chi for candidate regions in a function virtual void createMUCHI(const SVFFunction& fun); - /// Insert phi for candidate regions in a fucntion + /// Insert phi for candidate regions in a function virtual void insertPHI(const SVFFunction& fun); /// SSA rename for a function virtual void SSARename(const SVFFunction& fun); diff --git a/svf/include/MTA/FSMPTA.h b/svf/include/MTA/FSMPTA.h index a4c3a6606..cfa46ccb6 100644 --- a/svf/include/MTA/FSMPTA.h +++ b/svf/include/MTA/FSMPTA.h @@ -223,7 +223,7 @@ class FSMPTA : public FlowSensitive return mhp->getTCT()->getPTA()->getPAG(); } - /// Create signle instance of flow-sensitive pointer analysis + /// Create single instance of flow-sensitive pointer analysis static FSMPTA* createFSMPTA(SVFModule* module, MHP* m, LockAnalysis* la) { if (mfspta == nullptr) diff --git a/svf/include/MTA/MHP.h b/svf/include/MTA/MHP.h index cf60e2d8c..d5ceeb75e 100644 --- a/svf/include/MTA/MHP.h +++ b/svf/include/MTA/MHP.h @@ -207,7 +207,7 @@ class MHP void updateSiblingThreads(NodeID tid); //@} - /// Thread curTid can be fully joined by parentTid recurively + /// Thread curTid can be fully joined by parentTid recursively bool isRecurFullJoin(NodeID parentTid, NodeID curTid); /// Whether a join site must join a thread t diff --git a/svf/include/MTA/TCT.h b/svf/include/MTA/TCT.h index 1311e5b99..1743d1fae 100644 --- a/svf/include/MTA/TCT.h +++ b/svf/include/MTA/TCT.h @@ -193,7 +193,7 @@ class TCT: public GenericThreadCreateTreeTy { return getGNode(id); } - /// Whether we have aleady created this call graph edge + /// Whether we have already created this call graph edge TCTEdge* hasGraphEdge(TCTNode* src, TCTNode* dst, TCTEdge::CEDGEK kind) const; /// Get call graph edge via nodes TCTEdge* getGraphEdge(TCTNode* src, TCTNode* dst, TCTEdge::CEDGEK kind); diff --git a/svf/include/MemoryModel/ConditionalPT.h b/svf/include/MemoryModel/ConditionalPT.h index 331615b83..d82ae5ab4 100644 --- a/svf/include/MemoryModel/ConditionalPT.h +++ b/svf/include/MemoryModel/ConditionalPT.h @@ -327,7 +327,7 @@ class CondPointsToSet _condPts = cptsSet.pointsTo(); } - /// Get Conditional PointsTo and starndard points-to + /// Get Conditional PointsTo and standard points-to //@{ inline CondPts &pointsTo(void) { diff --git a/svf/include/MemoryModel/MutablePointsToDS.h b/svf/include/MemoryModel/MutablePointsToDS.h index 25be1e5eb..50c029530 100644 --- a/svf/include/MemoryModel/MutablePointsToDS.h +++ b/svf/include/MemoryModel/MutablePointsToDS.h @@ -848,7 +848,7 @@ class MutableIncDFPTData : public MutableDFPTData return it->second.test(var); return false; } - /// Get all var which have new pts informationin loc's IN set + /// Get all var which have new pts information in loc's IN set inline const DataSet& getDFInUpdatedVar(LocID loc) { return inUpdatedVarMap[loc]; @@ -877,7 +877,7 @@ class MutableIncDFPTData : public MutableDFPTData return it->second.test(var); return false; } - /// Get all var which have new pts informationin loc's OUT set + /// Get all var which have new pts information in loc's OUT set inline const DataSet& getDFOutUpdatedVar(LocID loc) { return outUpdatedVarMap[loc]; diff --git a/svf/include/MemoryModel/PersistentPointsToDS.h b/svf/include/MemoryModel/PersistentPointsToDS.h index 3625425b8..016f46f5c 100644 --- a/svf/include/MemoryModel/PersistentPointsToDS.h +++ b/svf/include/MemoryModel/PersistentPointsToDS.h @@ -754,7 +754,7 @@ class PersistentIncDFPTData : public PersistentDFPTDataisPartialReachable(); } - /// Dump SVFG with annotated slice informaiton + /// Dump SVFG with annotated slice information //@{ void dumpSlices(); void annotateSlice(ProgSlice* slice); diff --git a/svf/include/SVFIR/SVFFileSystem.h b/svf/include/SVFIR/SVFFileSystem.h index 5e293530a..6d1e4f0a1 100644 --- a/svf/include/SVFIR/SVFFileSystem.h +++ b/svf/include/SVFIR/SVFFileSystem.h @@ -586,7 +586,7 @@ class SVFIRWriter } /** The following 2 functions are intended to convert SparseBitVectors - * to JSON. But they're buggy. Commentting them out would enable the + * to JSON. But they're buggy. Commenting them out would enable the * toJson(T) where is_iterable_v is true. But that implementation is less * space-efficient if the bitvector contains many elements. * It is observed that upon construction, SVF IR bitvectors contain at most @@ -1147,7 +1147,7 @@ class SVFIRReader if (!basePtr) return; // ptr is nullptr when read ptr = SVFUtil::dyn_cast(basePtr); - ABORT_IFNOT(ptr, "Cast: " << obj->string << " shoudn't have kind " + ABORT_IFNOT(ptr, "Cast: " << obj->string << " shouldn't have kind " << KindBaseHelper::getKind(ptr)); } @@ -1201,7 +1201,7 @@ class SVFIRReader std::enable_if_t> readJson(const cJSON* obj, C& map) { assert(map.empty() && "map should be empty"); - ABORT_IFNOT(jsonIsMap(obj), "expects an map (represted by array)"); + ABORT_IFNOT(jsonIsMap(obj), "expects an map (represented by array)"); jsonForEach(elemJson, obj) { auto jpair = jsonUnpackPair(elemJson); diff --git a/svf/include/SVFIR/SVFIR.h b/svf/include/SVFIR/SVFIR.h index b47423ab5..0a179e073 100644 --- a/svf/include/SVFIR/SVFIR.h +++ b/svf/include/SVFIR/SVFIR.h @@ -327,7 +327,7 @@ class SVFIR : public IRGraph } //@} - /// Due to constaint expression, curInst is used to distinguish different instructions (e.g., memorycpy) when creating GepValVar. + /// Due to constraint expression, curInst is used to distinguish different instructions (e.g., memorycpy) when creating GepValVar. NodeID getGepValVar(const SVFValue* curInst, NodeID base, const AccessPath& ap) const; diff --git a/svf/include/SVFIR/SVFStatements.h b/svf/include/SVFIR/SVFStatements.h index 1787de546..7c2de2853 100644 --- a/svf/include/SVFIR/SVFStatements.h +++ b/svf/include/SVFIR/SVFStatements.h @@ -232,7 +232,7 @@ class SVFStmt : public GenericPAGEdgeTy /* Parent class of Addr, Copy, Store, Load, Call, Ret, NormalGep, VariantGep, ThreadFork, ThreadJoin connecting RHS expression and LHS expression with an assignment (e.g., LHSExpr = RHSExpr) - Only one operand on the right handside of an assignment + Only one operand on the right hand side of an assignment */ class AssignStmt : public SVFStmt { @@ -251,7 +251,7 @@ class AssignStmt : public SVFStmt protected: /// constructor AssignStmt(SVFVar* s, SVFVar* d, GEdgeFlag k) : SVFStmt(s, d, k) {} - /// Constructor to create empty AssignStmt (for SVFIRReader/serilization) + /// Constructor to create empty AssignStmt (for SVFIRReader/serialization) AssignStmt(GEdgeFlag k) : SVFStmt(k) {} public: @@ -316,7 +316,7 @@ class AddrStmt: public AssignStmt friend class SVFIRReader; private: - /// Constructs empty AddrStmt (for SVFIRReader/serilization) + /// Constructs empty AddrStmt (for SVFIRReader/serialization) AddrStmt() : AssignStmt(SVFStmt::Addr) {} AddrStmt(const AddrStmt&); ///< place holder void operator=(const AddrStmt&); ///< place holder @@ -353,7 +353,7 @@ class CopyStmt: public AssignStmt friend class SVFIRReader; private: - /// Constructs empty CopyStmt (for SVFIRReader/serilization) + /// Constructs empty CopyStmt (for SVFIRReader/serialization) CopyStmt() : AssignStmt(SVFStmt::Copy) {} CopyStmt(const CopyStmt&); ///< place holder void operator=(const CopyStmt&); ///< place holder @@ -389,7 +389,7 @@ class StoreStmt: public AssignStmt friend class SVFIRReader; private: - /// Constructs empty StoreStmt (for SVFIRReader/serilization) + /// Constructs empty StoreStmt (for SVFIRReader/serialization) StoreStmt() : AssignStmt(SVFStmt::Store) {} StoreStmt(const StoreStmt&); ///< place holder void operator=(const StoreStmt&); ///< place holder @@ -426,7 +426,7 @@ class LoadStmt: public AssignStmt friend class SVFIRReader; private: - /// Constructs empty LoadStmt (for SVFIRReader/serilization) + /// Constructs empty LoadStmt (for SVFIRReader/serialization) LoadStmt(): AssignStmt(SVFStmt::Load) {} LoadStmt(const LoadStmt&); ///< place holder void operator=(const LoadStmt&); ///< place holder @@ -463,7 +463,7 @@ class GepStmt: public AssignStmt friend class SVFIRReader; private: - /// Constructs empty GepStmt (for SVFIRReader/serilization) + /// Constructs empty GepStmt (for SVFIRReader/serialization) GepStmt() : AssignStmt(SVFStmt::Gep) {} GepStmt(const GepStmt &); ///< place holder void operator=(const GepStmt &); ///< place holder @@ -543,7 +543,7 @@ class CallPE: public AssignStmt const CallICFGNode* call; /// the callsite statement calling from const FunEntryICFGNode* entry; /// the function exit statement calling to protected: - /// Constructs empty CallPE (for SVFIRReader/serilization) + /// Constructs empty CallPE (for SVFIRReader/serialization) CallPE(GEdgeFlag k = SVFStmt::Call) : AssignStmt(k), call{}, entry{} {} public: @@ -604,7 +604,7 @@ class RetPE: public AssignStmt const FunExitICFGNode* exit; /// the function exit statement returned from protected: - /// Constructs empty RetPE (for SVFIRReader/serilization) + /// Constructs empty RetPE (for SVFIRReader/serialization) RetPE(GEdgeFlag k = SVFStmt::Ret) : AssignStmt(k), call{}, exit{} {} public: @@ -671,9 +671,9 @@ class MultiOpndStmt : public SVFStmt protected: OPVars opVars; - /// Constructor, only used by subclassess but not external users + /// Constructor, only used by subclasses but not external users MultiOpndStmt(SVFVar* r, const OPVars& opnds, GEdgeFlag k); - /// Constructs empty MultiOpndStmt (for SVFIRReader/serilization) + /// Constructs empty MultiOpndStmt (for SVFIRReader/serialization) MultiOpndStmt(GEdgeFlag k) : SVFStmt(k) {} public: @@ -743,7 +743,7 @@ class PhiStmt: public MultiOpndStmt typedef std::vector OpICFGNodeVec; private: - /// Constructs empty PhiStmt (for SVFIRReader/serilization) + /// Constructs empty PhiStmt (for SVFIRReader/serialization) PhiStmt() : MultiOpndStmt(SVFStmt::Phi) {} PhiStmt(const PhiStmt&); ///< place holder void operator=(const PhiStmt&); ///< place holder @@ -808,7 +808,7 @@ class SelectStmt: public MultiOpndStmt friend class SVFIRReader; private: - /// Constructs empty SelectStmt (for SVFIRReader/serilization) + /// Constructs empty SelectStmt (for SVFIRReader/serialization) SelectStmt() : MultiOpndStmt(SVFStmt::Select), condition{} {} SelectStmt(const SelectStmt&); ///< place holder void operator=(const SelectStmt&); ///< place holder @@ -863,7 +863,7 @@ class CmpStmt: public MultiOpndStmt friend class SVFIRReader; private: - /// Constructs empty CmpStmt (for SVFIRReader/serilization) + /// Constructs empty CmpStmt (for SVFIRReader/serialization) CmpStmt() : MultiOpndStmt(SVFStmt::Cmp) {} CmpStmt(const CmpStmt&); ///< place holder void operator=(const CmpStmt&); ///< place holder @@ -949,7 +949,7 @@ class BinaryOPStmt: public MultiOpndStmt friend class SVFIRReader; private: - /// Constructs empty BinaryOPStmt (for SVFIRReader/serilization) + /// Constructs empty BinaryOPStmt (for SVFIRReader/serialization) BinaryOPStmt() : MultiOpndStmt(SVFStmt::BinaryOp) {} BinaryOPStmt(const BinaryOPStmt&); ///< place holder void operator=(const BinaryOPStmt&); ///< place holder @@ -1019,7 +1019,7 @@ class UnaryOPStmt: public SVFStmt friend class SVFIRReader; private: - /// Constructs empty UnaryOPStmt (for SVFIRReader/serilization) + /// Constructs empty UnaryOPStmt (for SVFIRReader/serialization) UnaryOPStmt() : SVFStmt(SVFStmt::UnaryOp) {} UnaryOPStmt(const UnaryOPStmt&); ///< place holder void operator=(const UnaryOPStmt&); ///< place holder @@ -1089,7 +1089,7 @@ class BranchStmt: public SVFStmt typedef std::vector> SuccAndCondPairVec; private: - /// Constructs empty BranchStmt (for SVFIRReader/serilization) + /// Constructs empty BranchStmt (for SVFIRReader/serialization) BranchStmt() : SVFStmt(SVFStmt::Branch), cond{}, brInst{} {} BranchStmt(const BranchStmt&); ///< place holder void operator=(const BranchStmt&); ///< place holder @@ -1176,7 +1176,7 @@ class TDForkPE: public CallPE friend class SVFIRReader; private: - /// Constructs empty TDForkPE (for SVFIRReader/serilization) + /// Constructs empty TDForkPE (for SVFIRReader/serialization) TDForkPE() : CallPE(SVFStmt::ThreadFork) {} TDForkPE(const TDForkPE&); ///< place holder void operator=(const TDForkPE&); ///< place holder @@ -1217,7 +1217,7 @@ class TDJoinPE: public RetPE friend class SVFIRReader; private: - /// Constructs empty TDJoinPE (for SVFIRReader/serilization) + /// Constructs empty TDJoinPE (for SVFIRReader/serialization) TDJoinPE() : RetPE(SVFStmt::ThreadJoin) {} TDJoinPE(const TDJoinPE&); ///< place holder void operator=(const TDJoinPE&); ///< place holder diff --git a/svf/include/SVFIR/SVFType.h b/svf/include/SVFIR/SVFType.h index 1d5878500..9bcd8faab 100644 --- a/svf/include/SVFIR/SVFType.h +++ b/svf/include/SVFIR/SVFType.h @@ -147,9 +147,9 @@ class StInfo /// stride represents the number of repetitive elements if this StInfo /// represent an ArrayType. stride is 1 by default. u32_t stride; - /// number of elements after flattenning (including array elements) + /// number of elements after flattening (including array elements) u32_t numOfFlattenElements; - /// number of fields after flattenning (ignoring array elements) + /// number of fields after flattening (ignoring array elements) u32_t numOfFlattenFields; /// Type vector of fields std::vector flattenElementTypes; @@ -214,20 +214,20 @@ class StInfo /// Add field index and element index and their corresponding type void addFldWithType(u32_t fldIdx, const SVFType* type, u32_t elemIdx); - /// Set number of fields and elements of an aggrate + /// Set number of fields and elements of an aggregate inline void setNumOfFieldsAndElems(u32_t nf, u32_t ne) { numOfFlattenFields = nf; numOfFlattenElements = ne; } - /// Return number of elements after flattenning (including array elements) + /// Return number of elements after flattening (including array elements) inline u32_t getNumOfFlattenElements() const { return numOfFlattenElements; } - /// Return the number of fields after flattenning (ignoring array elements) + /// Return the number of fields after flattening (ignoring array elements) inline u32_t getNumOfFlattenFields() const { return numOfFlattenFields; diff --git a/svf/include/SVFIR/SVFValue.h b/svf/include/SVFIR/SVFValue.h index 5894e9039..4856bcc4d 100644 --- a/svf/include/SVFIR/SVFValue.h +++ b/svf/include/SVFIR/SVFValue.h @@ -946,7 +946,7 @@ class SVFConstantInt : public SVFConstantData { return zval; } - // Return the constant as a 64-bit integer value after it has been sign extended as appropriate for the type of this constan + // Return the constant as a 64-bit integer value after it has been sign extended as appropriate for the type of this constant inline s64_t getSExtValue () const { return sval; diff --git a/svf/include/SVFIR/SVFVariables.h b/svf/include/SVFIR/SVFVariables.h index 4f4107223..8a70c5be7 100644 --- a/svf/include/SVFIR/SVFVariables.h +++ b/svf/include/SVFIR/SVFVariables.h @@ -56,8 +56,8 @@ class SVFVar : public GenericPAGNodeTy /// ObjNode: memory object /// RetNode: unique return node /// Vararg: unique node for vararg parameter - /// GepValNode: tempory gep value node for field sensitivity - /// GepValNode: tempory gep obj node for field sensitivity + /// GepValNode: temporary gep value node for field sensitivity + /// GepValNode: temporary gep obj node for field sensitivity /// FIObjNode: for field insensitive analysis /// DummyValNode and DummyObjNode: for non-llvm-value node enum PNODEK @@ -122,7 +122,7 @@ class SVFVar : public GenericPAGNodeTy /// or llvm's metadata, i.e., metadata !4087 bool isConstDataOrAggDataButNotNullPtr() const; - /// Whether this is an isoloated node on the SVFIR graph + /// Whether this is an isolated node on the SVFIR graph bool isIsolatedNode() const; /// Get name of the LLVM value diff --git a/svf/include/SVFIR/SymbolTableInfo.h b/svf/include/SVFIR/SymbolTableInfo.h index 59095bda1..7fdfad0af 100644 --- a/svf/include/SVFIR/SymbolTableInfo.h +++ b/svf/include/SVFIR/SymbolTableInfo.h @@ -200,7 +200,7 @@ class SymbolTableInfo return BlackHole; } - /// Can only be invoked by SVFIR::addDummyNode() when creaing SVFIR from file. + /// Can only be invoked by SVFIR::addDummyNode() when creating SVFIR from file. const MemObj* createDummyObj(SymID symId, const SVFType* type); // @} @@ -312,9 +312,9 @@ class SymbolTableInfo } ///Get a reference to the components of struct_info. - /// Number of flattenned elements of an array or struct + /// Number of flattened elements of an array or struct u32_t getNumOfFlattenElements(const SVFType* T); - /// Flatterned element idx of an array or struct by considering stride + /// Flattened element idx of an array or struct by considering stride u32_t getFlattenedElemIdx(const SVFType* T, u32_t origId); /// Return the type of a flattened element given a flattened index const SVFType* getFlatternedElemType(const SVFType* baseType, u32_t flatten_idx); diff --git a/svf/include/Util/Casting.h b/svf/include/Util/Casting.h index e47201d71..fed46a073 100644 --- a/svf/include/Util/Casting.h +++ b/svf/include/Util/Casting.h @@ -62,7 +62,7 @@ namespace SVF namespace SVFUtil { -//===- Part of llvm/Support/type_traits.h - Simplfied type traits -------*- C++ -*-===// +//===- Part of llvm/Support/type_traits.h - Simplified type traits -------*- C++ -*-===// /// If T is a pointer to X, return a pointer to const X. If it is not, /// return const T. diff --git a/svf/include/Util/CoreBitVector.h b/svf/include/Util/CoreBitVector.h index 44adad0a9..4e7f7d284 100644 --- a/svf/include/Util/CoreBitVector.h +++ b/svf/include/Util/CoreBitVector.h @@ -102,11 +102,11 @@ class CoreBitVector /// Returns true if CBV changed. bool operator-=(const CoreBitVector &rhs); - /// Put intersection of this CBV with complemenet of rhs into this CBV. + /// Put intersection of this CBV with complement of rhs into this CBV. /// Returns true if this CBV changed. bool intersectWithComplement(const CoreBitVector &rhs); - /// Put intersection of lhs with complemenet of rhs into this CBV. + /// Put intersection of lhs with complement of rhs into this CBV. void intersectWithComplement(const CoreBitVector &lhs, const CoreBitVector &rhs); /// Hash for this CBV. diff --git a/svf/include/Util/DPItem.h b/svf/include/Util/DPItem.h index 7f554c91a..867edfd4b 100644 --- a/svf/include/Util/DPItem.h +++ b/svf/include/Util/DPItem.h @@ -37,7 +37,7 @@ namespace SVF { /*! - * Dynamic programming item for CFL researchability search + * Dynamic programming item for CFL reachability search * This serves as a base class for CFL-reachability formulation by matching parentheses. * Extend this class for further sophisticated CFL-reachability items (e.g. field, flow, path) */ diff --git a/svf/include/Util/NodeIDAllocator.h b/svf/include/Util/NodeIDAllocator.h index 57589816a..f31f37208 100644 --- a/svf/include/Util/NodeIDAllocator.h +++ b/svf/include/Util/NodeIDAllocator.h @@ -184,7 +184,7 @@ class NodeIDAllocator /// x in pt(p) and y in pt(p) -> x is reachable from y. static inline std::vector regionObjects(const Map> &graph, size_t numObjects, size_t &numLabels); - // From all the candidates, returns the best mapping for pointsToSets (points-to set -> # occurences). + // From all the candidates, returns the best mapping for pointsToSets (points-to set -> # occurrences). static inline std::pair> determineBestMapping( const std::vector>> &candidates, Map pointsToSets, const std::string &evalSubtitle, double &evalTime); diff --git a/svf/include/Util/Options.h b/svf/include/Util/Options.h index 49f9b07ff..b34d6016e 100644 --- a/svf/include/Util/Options.h +++ b/svf/include/Util/Options.h @@ -61,7 +61,7 @@ class Options /// Align identifiers in each region to a word. static const Option RegionAlign; - /// Predict occurences of points-to sets in the staged points-to set to + /// Predict occurrences of points-to sets in the staged points-to set to /// weigh more common points-to sets as more important. static const Option PredictPtOcc; diff --git a/svf/include/Util/SVFBugReport.h b/svf/include/Util/SVFBugReport.h index 48037d8f3..aa3eadcc9 100644 --- a/svf/include/Util/SVFBugReport.h +++ b/svf/include/Util/SVFBugReport.h @@ -387,7 +387,7 @@ class SVFBugReport } default: { - assert(false && "Abstract Execution does NOT hava his bug type!"); + assert(false && "Abstract Execution does NOT have this bug type!"); break; } } diff --git a/svf/include/Util/SVFUtil.h b/svf/include/Util/SVFUtil.h index 32fa6d35c..05b82074e 100644 --- a/svf/include/Util/SVFUtil.h +++ b/svf/include/Util/SVFUtil.h @@ -202,7 +202,7 @@ inline CallSite getSVFCallSite(const SVFInstruction* inst) /// Match arguments for callsite at caller and callee /// if the arg size does not match then we do not need to connect this parameter -/// unless the callee is a variadic function (the first parameter of variadic function is its paramter number) +/// unless the callee is a variadic function (the first parameter of variadic function is its parameter number) bool matchArgs(const SVFInstruction* cs, const SVFFunction* callee); /// Return LLVM callsite given a value @@ -304,7 +304,7 @@ bool startAnalysisLimitTimer(unsigned timeLimit); void stopAnalysisLimitTimer(bool limitTimerSet); /// Return true if the call is an external call (external library in function summary table) -/// If the libary function is redefined in the application code (e.g., memcpy), it will return false and will not be treated as an external call. +/// If the library function is redefined in the application code (e.g., memcpy), it will return false and will not be treated as an external call. //@{ inline bool isExtCall(const SVFFunction* fun) { @@ -643,7 +643,7 @@ inline const SVFValue* getTaskFuncAtHareParForSite(const SVFInstruction *inst) } //@} -/// Return the task data argument of the parallel_for rountine +/// Return the task data argument of the parallel_for routine //@{ inline const SVFValue* getTaskDataAtHareParForSite(const CallSite cs) { @@ -672,7 +672,7 @@ move(T &&t) noexcept return std::move(t); } -/// void_t is not avaiable until C++17. We define it here for C++11/14. +/// void_t is not available until C++17. We define it here for C++11/14. template struct make_void { typedef void type; diff --git a/svf/include/Util/WorkList.h b/svf/include/Util/WorkList.h index c2b3e1e7b..302efb00f 100755 --- a/svf/include/Util/WorkList.h +++ b/svf/include/Util/WorkList.h @@ -221,7 +221,7 @@ class FIFOWorkList }; /** - * Worlist with "first in last out" order. + * Worklist with "first in last out" order. * New nodes will be pushed at back and popped from back. * Elements in the list are unique as they're recorded by Set. */ diff --git a/svf/include/Util/cJSON.h b/svf/include/Util/cJSON.h index 50174f20d..106e53744 100644 --- a/svf/include/Util/cJSON.h +++ b/svf/include/Util/cJSON.h @@ -111,7 +111,7 @@ typedef struct cJSON /* The type of the item, as above. */ int type; - /* The item's string, if type==cJSON_String and type == cJSON_Raw */ + /* The item's string, if type==cJSON_String and type == cJSON_Raw */ char *valuestring; /* writing to valueint is DEPRECATED, use cJSON_SetNumberValue instead */ int valueint; diff --git a/svf/include/WPA/Andersen.h b/svf/include/WPA/Andersen.h index ed95307ee..7219bfd87 100644 --- a/svf/include/WPA/Andersen.h +++ b/svf/include/WPA/Andersen.h @@ -327,7 +327,7 @@ class Andersen: public AndersenBase void mergeSccNodes(NodeID repNodeId, const NodeBS& subNodes); void mergeSccCycle(); //@} - /// Collapse a field object into its base for field insensitive anlaysis + /// Collapse a field object into its base for field insensitive analysis //@{ virtual void collapsePWCNode(NodeID nodeId); void collapseFields(); diff --git a/svf/include/WPA/FlowSensitive.h b/svf/include/WPA/FlowSensitive.h index 9a3aeee76..79c493170 100644 --- a/svf/include/WPA/FlowSensitive.h +++ b/svf/include/WPA/FlowSensitive.h @@ -75,7 +75,7 @@ class FlowSensitive : public WPASVFGFSSolver, public BVDataPTAImpl /// Destructor ~FlowSensitive() override = default; - /// Create signle instance of flow-sensitive pointer analysis + /// Create single instance of flow-sensitive pointer analysis static FlowSensitive* createFSWPA(SVFIR* _pag) { if (fspta == nullptr) diff --git a/svf/include/WPA/WPASolver.h b/svf/include/WPA/WPASolver.h index 98f46b710..892dd68af 100644 --- a/svf/include/WPA/WPASolver.h +++ b/svf/include/WPA/WPASolver.h @@ -196,7 +196,7 @@ class WPASolver WorkList worklist; public: - /// num of iterations during constaint solving + /// num of iterations during constraint solving u32_t numOfIteration; }; diff --git a/svf/lib/AbstractExecution/SVFIR2ConsExeState.cpp b/svf/lib/AbstractExecution/SVFIR2ConsExeState.cpp index 64d240aaa..4785da7de 100644 --- a/svf/lib/AbstractExecution/SVFIR2ConsExeState.cpp +++ b/svf/lib/AbstractExecution/SVFIR2ConsExeState.cpp @@ -688,7 +688,7 @@ void SVFIR2ConsExeState::initValVar(const ValVar *valVar, u32_t varId) if (const SVFType *type = valVar->getType()) { - // TODO:miss floatpointerty, voidty, labelty, matadataty + // TODO:miss floatpointerty, voidty, labelty, metadataty if (type->getKind() == SVFType::SVFIntegerTy || type->getKind() == SVFType::SVFPointerTy || type->getKind() == SVFType::SVFFunctionTy || diff --git a/svf/lib/CFL/CFGNormalizer.cpp b/svf/lib/CFL/CFGNormalizer.cpp index c9b76568f..b07c30e19 100644 --- a/svf/lib/CFL/CFGNormalizer.cpp +++ b/svf/lib/CFL/CFGNormalizer.cpp @@ -341,13 +341,13 @@ void CFGNormalizer::ebnfSignReplace(char sign, CFGrammar *grammar) s32_t signGroupStart = -1; if (grammar->kindToStr(ebnfProduction[i].kind) == std::string(1, sign)) { - /// If sign assoicate wihout group e.i with single symble + /// If sign associate without group e.i with single symbol assert(i != 1 && "sign in grammar associate with no symbol"); if (grammar->kindToStr(ebnfProduction[i - 1].kind) != std::string(1, ')')) { signGroupStart = i - 1; } - /// sign associate with group of symble by brace pair + /// sign associate with group of symbol by brace pair else { signGroupStart = ebnfBracketMatch(ebnfProduction, i, grammar); diff --git a/svf/lib/CFL/CFLAlias.cpp b/svf/lib/CFL/CFLAlias.cpp index 4d423b37a..4f82cceb1 100644 --- a/svf/lib/CFL/CFLAlias.cpp +++ b/svf/lib/CFL/CFLAlias.cpp @@ -203,7 +203,7 @@ void CFLAlias::initialize() // Normalize CFL Grammar normalizeCFLGrammar(); - // Initialize sovler + // Initialize solver initializeSolver(); } @@ -240,7 +240,7 @@ void CFLAlias::solve() numOfIteration++; solver->solve(); } - } // Only cflgraph built from bc could reanlyze by update call graph + } // Only cflgraph built from bc could reanalyze by update call graph double end = stat->getClk(true); timeOfSolving += (end - start) / TIMEINTERVAL; diff --git a/svf/lib/CFL/CFLGraphBuilder.cpp b/svf/lib/CFL/CFLGraphBuilder.cpp index 510f21605..7774f8188 100644 --- a/svf/lib/CFL/CFLGraphBuilder.cpp +++ b/svf/lib/CFL/CFLGraphBuilder.cpp @@ -377,8 +377,8 @@ CFLGraph* AliasCFLGraphBuilder::buildBiPEGgraph(ConstraintGraph *graph, Kind sta { /// Handle VGep normalize to Normal Gep by connecting all geps' srcs to vgep dest /// Example: In Test Case: Ctest field-ptr-arith-varIdx.c.bc - /// BFS Search the 8 LEVEL up to find the ValueNode, and the number of level search is arbitary - /// the more the level search the more valueNode and the Vgep Dst will possivble connect + /// BFS Search the 8 LEVEL up to find the ValueNode, and the number of level search is arbitrary + /// the more the level search the more valueNode and the Vgep Dst will possibly connect connectVGep(cflGraph, graph, edge->getSrcNode(), edge->getDstNode(), 8, pag); } else diff --git a/svf/lib/CFL/CFLVF.cpp b/svf/lib/CFL/CFLVF.cpp index 6c381176a..6e9472b80 100644 --- a/svf/lib/CFL/CFLVF.cpp +++ b/svf/lib/CFL/CFLVF.cpp @@ -67,7 +67,7 @@ void CFLVF::initialize() // Normalize grammar normalizeCFLGrammar(); - // Initialize sovler + // Initialize solver solver = new CFLSolver(graph, grammar); } diff --git a/svf/lib/DDA/ContextDDA.cpp b/svf/lib/DDA/ContextDDA.cpp index 90133b860..99ee23c3f 100644 --- a/svf/lib/DDA/ContextDDA.cpp +++ b/svf/lib/DDA/ContextDDA.cpp @@ -344,7 +344,7 @@ bool ContextDDA::isHeapCondMemObj(const CxtVar& var, const StoreSVFGNode*) if (gepobj != nullptr) { assert(SVFUtil::isa(_pag->getGNode(gepobj->getBaseNode())) - && "emtpy refVal in a gep object whose base is a non-dummy object"); + && "empty refVal in a gep object whose base is a non-dummy object"); } else { diff --git a/svf/lib/FastCluster/fastcluster.cpp b/svf/lib/FastCluster/fastcluster.cpp index b5f1ebaa6..ad79f6d08 100644 --- a/svf/lib/FastCluster/fastcluster.cpp +++ b/svf/lib/FastCluster/fastcluster.cpp @@ -1,5 +1,5 @@ // -// C++ standalone verion of fastcluster by Daniel Müllner +// C++ standalone version of fastcluster by Daniel Müllner // // Copyright: Christoph Dalitz, 2020 // Daniel Müllner, 2011 @@ -145,7 +145,7 @@ void cutree_cdist(int n, const int* merge, double* height, double cdist, int* la // Output arguments: // merge = allocated (n-1)x2 matrix (2*(n-1) array) for storing result. // Result follows R hclust convention: -// - observabe indices start with one +// - observable indices start with one // - merge[i][] contains the merged nodes in step i // - merge[i][j] is negative when the node is an atom // height = allocated (n-1) array with distances at each merge step @@ -156,7 +156,7 @@ void cutree_cdist(int n, const int* merge, double* height, double cdist, int* la int hclust_fast(int n, double* distmat, int method, int* merge, double* height) { - // call appropriate culstering function + // call appropriate clustering function cluster_result Z2(n-1); if (method == HCLUST_METHOD_SINGLE) { diff --git a/svf/lib/Graphs/ConsG.cpp b/svf/lib/Graphs/ConsG.cpp index 7768850b0..60d0ab43b 100644 --- a/svf/lib/Graphs/ConsG.cpp +++ b/svf/lib/Graphs/ConsG.cpp @@ -298,7 +298,7 @@ StoreCGEdge* ConstraintGraph::addStoreCGEdge(NodeID src, NodeID dst) * * (1) Remove edge from old dst target, * (2) Change edge dst id and - * (3) Add modifed edge into new dst + * (3) Add modified edge into new dst */ void ConstraintGraph::reTargetDstOfEdge(ConstraintEdge* edge, ConstraintNode* newDstNode) { diff --git a/svf/lib/Graphs/SVFGOPT.cpp b/svf/lib/Graphs/SVFGOPT.cpp index 8ca46c6ac..0fb9e1df7 100644 --- a/svf/lib/Graphs/SVFGOPT.cpp +++ b/svf/lib/Graphs/SVFGOPT.cpp @@ -340,7 +340,7 @@ bool SVFGOPT::canBeRemoved(const SVFGNode * node) FormalOUTSVFGNode, MSSAPHISVFGNode>(node)) { /// Now each SVFG edge can only be associated with one call site id, - /// so if this node has both incoming call/ret and outgoting call/ret + /// so if this node has both incoming call/ret and outgoing call/ret /// edges, we don't remove this node. if (isConnectingTwoCallSites(node)) return false; @@ -438,7 +438,7 @@ void SVFGOPT::handleIntraValueFlow() /// 1. keepAllSelfCycle = TRUE: all self cycle edges are kept; /// 2. keepContextSelfCycle = TRUE: all self cycle edges related-to context are kept; /// 3. Otherwise, all self cycle edges are NOT kept. -/// Return TRUE if some self cycle edges remaine in this node. +/// Return TRUE if some self cycle edges remain in this node. bool SVFGOPT::checkSelfCycleEdges(const MSSAPHISVFGNode* node) { bool hasSelfCycle = false; diff --git a/svf/lib/Graphs/VFG.cpp b/svf/lib/Graphs/VFG.cpp index c37948a8c..1d8e472fb 100644 --- a/svf/lib/Graphs/VFG.cpp +++ b/svf/lib/Graphs/VFG.cpp @@ -463,7 +463,7 @@ void VFG::destroy() void VFG::addVFGNodes() { - // initialize dummy definition null pointers in order to uniform the construction + // initialize dummy definition null pointers in order to uniform the construction // to be noted for black hole pointer it has already has address edge connected, // and its definition will be set when processing addr SVFIR edge. addNullPtrVFGNode(pag->getGNode(pag->getNullPtr())); @@ -658,7 +658,7 @@ void VFG::addVFGNodes() if(isInterestedPAGNode(edge->getBranchInst())) addBranchVFGNode(edge); } - // initialize llvm cmp nodes (comparision) + // initialize llvm cmp nodes (comparison) SVFStmt::SVFStmtSetTy& cmps = getPAGEdgeSet(SVFStmt::Cmp); for (SVFStmt::SVFStmtSetTy::iterator iter = cmps.begin(), eiter = cmps.end(); iter != eiter; ++iter) diff --git a/svf/lib/MSSA/MemRegion.cpp b/svf/lib/MSSA/MemRegion.cpp index ac4b3038e..967c99cb8 100644 --- a/svf/lib/MSSA/MemRegion.cpp +++ b/svf/lib/MSSA/MemRegion.cpp @@ -520,7 +520,7 @@ void MRGenerator::collectCallSitePts(const CallICFGNode* cs) /*! - * Recurisively collect all points-to of the whole struct fields + * Recursively collect all points-to of the whole struct fields */ NodeBS& MRGenerator::CollectPtsChain(NodeID id) { diff --git a/svf/lib/MTA/FSMPTA.cpp b/svf/lib/MTA/FSMPTA.cpp index ea15bac7e..a6d12875b 100644 --- a/svf/lib/MTA/FSMPTA.cpp +++ b/svf/lib/MTA/FSMPTA.cpp @@ -499,7 +499,7 @@ void MTASVFGBuilder::handleStoreLoad(const StmtSVFGNode* n1,const StmtSVFGNode* /// Lock /// todo: we only consider all cxtstmt of one instruction in one lock span, /// otherwise we think this instruction is not locked - /// This constrait is too strong. All cxt lock under different cxt cannot be identified. + /// This constraint is too strong. All cxt lock under different cxt cannot be identified. if (ADDEDGE_NOLOCK!=Options::AddModelFlag() && lockana->isProtectedByCommonLock(i1, i2)) diff --git a/svf/lib/MTA/LockAnalysis.cpp b/svf/lib/MTA/LockAnalysis.cpp index e10c59acf..9e6fe99a1 100644 --- a/svf/lib/MTA/LockAnalysis.cpp +++ b/svf/lib/MTA/LockAnalysis.cpp @@ -676,7 +676,7 @@ bool LockAnalysis::isInSameCSSpan(const CxtStmt& cxtStmt1, const CxtStmt& cxtStm return intersects(lockset1,lockset2); } /*! - * Return true if two instructions are inside at least one common contex-sensitive lock span + * Return true if two instructions are inside at least one common context-sensitive lock span */ bool LockAnalysis::isInSameCSSpan(const SVFInstruction *I1, const SVFInstruction *I2) const { diff --git a/svf/lib/MTA/MHP.cpp b/svf/lib/MTA/MHP.cpp index 8068765f2..1a94a921d 100644 --- a/svf/lib/MTA/MHP.cpp +++ b/svf/lib/MTA/MHP.cpp @@ -400,7 +400,7 @@ void MHP::updateAncestorThreads(NodeID curTid) * Exclude sibling thread that never happen in parallel based on ForkJoinAnalysis * * The interleaving of a thread t is not unnecessary to be updated if - * (1) t HB Sibling and t fully joins curTid recusively + * (1) t HB Sibling and t fully joins curTid recursively * or * (2) Sibling HB t */ diff --git a/svf/lib/MemoryModel/AccessPath.cpp b/svf/lib/MemoryModel/AccessPath.cpp index 61b933821..784955b5d 100644 --- a/svf/lib/MemoryModel/AccessPath.cpp +++ b/svf/lib/MemoryModel/AccessPath.cpp @@ -57,7 +57,7 @@ bool AccessPath::isConstantOffset() const } /// Return element number of a type -/// (1) StructType or Array, return flatterned number elements. +/// (1) StructType or Array, return flattened number elements. /// (2) PointerType, return the element number of the pointee /// (3) non-pointer SingleValueType, return 1 u32_t AccessPath::getElementNum(const SVFType* type) const @@ -69,7 +69,7 @@ u32_t AccessPath::getElementNum(const SVFType* type) const } else if (type->isSingleValueType()) { - /// This is a pointer arithmic + /// This is a pointer arithmetic if(const SVFPointerType* pty = SVFUtil::dyn_cast(type)) return getElementNum(pty->getPtrElementType()); else diff --git a/svf/lib/SABER/ProgSlice.cpp b/svf/lib/SABER/ProgSlice.cpp index ecc77948e..86992f6c6 100644 --- a/svf/lib/SABER/ProgSlice.cpp +++ b/svf/lib/SABER/ProgSlice.cpp @@ -165,7 +165,7 @@ void ProgSlice::evalFinalCond2Event(GenericBug::EventStack &eventStack) const * Evaluate Atoms of a condition * TODO: for now we only evaluate one path, evaluate every single path * - * Atom -- a propositional valirable: a, b, c + * Atom -- a propositional variable: a, b, c * Literal -- an atom or its negation: a, ~a * Clause -- A disjunction of some literals: a \vee b * CNF formula -- a conjunction of some clauses: (a \vee b ) \wedge (c \vee d) diff --git a/svf/lib/SABER/SaberCondAllocator.cpp b/svf/lib/SABER/SaberCondAllocator.cpp index b2749f9d8..b44fea9d7 100644 --- a/svf/lib/SABER/SaberCondAllocator.cpp +++ b/svf/lib/SABER/SaberCondAllocator.cpp @@ -466,7 +466,7 @@ SaberCondAllocator::getPHIComplementCond(const SVFBasicBlock* BB1, const SVFBasi { assert(BB1 && BB2 && "expect nullptr BB here!"); - /// avoid both BB0 and BB1 dominate BB2 (e.g., while loop), then BB2 is not necessaryly a complement BB + /// avoid both BB0 and BB1 dominate BB2 (e.g., while loop), then BB2 is not necessarily a complement BB if (dominate(BB1, BB2) && ! dominate(BB0, BB2)) { Condition cond = ComputeIntraVFGGuard(BB1, BB2); diff --git a/svf/lib/SVFIR/SVFIR.cpp b/svf/lib/SVFIR/SVFIR.cpp index 346b0558c..4d301abfa 100644 --- a/svf/lib/SVFIR/SVFIR.cpp +++ b/svf/lib/SVFIR/SVFIR.cpp @@ -381,7 +381,7 @@ GepStmt* SVFIR::addVariantGepStmt(NodeID src, NodeID dst, const AccessPath& ap) /*! * Add a temp field value node, this method can only invoked by getGepValVar - * due to constaint expression, curInst is used to distinguish different instructions (e.g., memorycpy) when creating GepValVar. + * due to constraint expression, curInst is used to distinguish different instructions (e.g., memorycpy) when creating GepValVar. */ NodeID SVFIR::addGepValNode(const SVFValue* curInst,const SVFValue* gepVal, const AccessPath& ap, NodeID i, const SVFType* type) { @@ -533,7 +533,7 @@ NodeID SVFIR::getBaseValVar(NodeID nodeId) } /*! - * It is used to create a dummy GepValVar during global initiailzation. + * It is used to create a dummy GepValVar during global initialization. */ NodeID SVFIR::getGepValVar(const SVFValue* curInst, NodeID base, const AccessPath& ap) const { @@ -693,7 +693,7 @@ bool SVFIR::isNonPointerObj(NodeID id) const } } /* - * If this is a dummy node or node does not have incoming edges and outcoming edges we assume it is not a pointer here. + * If this is a dummy node or node does not have incoming edges and outgoing edges we assume it is not a pointer here. * However, if it is a pointer and it is an argument of a function definition, we assume it is a pointer here. */ bool SVFIR::isValidPointer(NodeID nodeId) const diff --git a/svf/lib/SVFIR/SVFValue.cpp b/svf/lib/SVFIR/SVFValue.cpp index 564dca801..90121c29c 100644 --- a/svf/lib/SVFIR/SVFValue.cpp +++ b/svf/lib/SVFIR/SVFValue.cpp @@ -26,7 +26,7 @@ const SVFType* StInfo::getOriginalElemType(u32_t fldIdx) const const SVFLoopAndDomInfo::LoopBBs& SVFLoopAndDomInfo::getLoopInfo(const SVFBasicBlock* bb) const { - assert(hasLoopInfo(bb) && "loopinfo does not exit (bb not in a loop)"); + assert(hasLoopInfo(bb) && "loopinfo does not exist (bb not in a loop)"); Map::const_iterator mapIter = bb2LoopMap.find(bb); return mapIter->second; } @@ -179,7 +179,7 @@ u32_t SVFBasicBlock::getBBSuccessorPos(const SVFBasicBlock* Succ) return i; i++; } - assert(false && "Didn't find succesor edge?"); + assert(false && "Didn't find successor edge?"); return 0; } @@ -192,7 +192,7 @@ u32_t SVFBasicBlock::getBBSuccessorPos(const SVFBasicBlock* Succ) const return i; i++; } - assert(false && "Didn't find succesor edge?"); + assert(false && "Didn't find successor edge?"); return 0; } diff --git a/svf/lib/SVFIR/SymbolTableInfo.cpp b/svf/lib/SVFIR/SymbolTableInfo.cpp index 7aaf0edc2..df1946293 100644 --- a/svf/lib/SVFIR/SymbolTableInfo.cpp +++ b/svf/lib/SVFIR/SymbolTableInfo.cpp @@ -168,7 +168,7 @@ const MemObj* SymbolTableInfo::createDummyObj(SymID symId, const SVFType* type) return memObj; } -/// Number of flattenned elements of an array or struct +/// Number of flattened elements of an array or struct u32_t SymbolTableInfo::getNumOfFlattenElements(const SVFType* T) { if(Options::ModelArrays()) @@ -177,7 +177,7 @@ u32_t SymbolTableInfo::getNumOfFlattenElements(const SVFType* T) return getTypeInfo(T)->getNumOfFlattenFields(); } -/// Flatterned offset information of a struct or an array including its array fields +/// Flattened offset information of a struct or an array including its array fields u32_t SymbolTableInfo::getFlattenedElemIdx(const SVFType* T, u32_t origId) { if(Options::ModelArrays()) diff --git a/svf/lib/Util/NodeIDAllocator.cpp b/svf/lib/Util/NodeIDAllocator.cpp index 4843a9928..6a99cd31b 100644 --- a/svf/lib/Util/NodeIDAllocator.cpp +++ b/svf/lib/Util/NodeIDAllocator.cpp @@ -287,7 +287,7 @@ std::vector NodeIDAllocator::Clusterer::cluster(BVDataPTAImpl *pta, cons } // Points-to sets which are relevant to a region, i.e., those whose elements - // belong to that region. Pair is for occurences. + // belong to that region. Pair is for occurrences. std::vector>> regionsPointsTos(numRegions); for (const Map::value_type &ptocc : pointsToSets) { @@ -476,7 +476,7 @@ double *NodeIDAllocator::Clusterer::getDistanceMatrix(const std::vector std::floor(existingDistance)) diff --git a/svf/lib/Util/Options.cpp b/svf/lib/Util/Options.cpp index 946f45f66..8b2797a00 100644 --- a/svf/lib/Util/Options.cpp +++ b/svf/lib/Util/Options.cpp @@ -214,7 +214,7 @@ const Option Options::OCGDotGraph( // Program Assignment Graph for pointer analysis (SVFIR.cpp) Option Options::HandBlackHole( "blk", - "Hanle blackhole edge", + "Handle blackhole edge", false ); @@ -461,12 +461,12 @@ const Option Options::MSSAFun( const OptionMap Options::MemPar( "mem-par", - "Memory region partiion strategies (e.g., for SVFG construction)", + "Memory region partition strategies (e.g., for SVFG construction)", MemSSA::MemPartition::IntraDisjoint, { {MemSSA::MemPartition::Distinct, "distinct", "memory region per each object"}, - {MemSSA::MemPartition::IntraDisjoint, "intra-disjoint", "memory regions partioned based on each function"}, - {MemSSA::MemPartition::InterDisjoint, "inter-disjoint", "memory regions partioned across functions"}, + {MemSSA::MemPartition::IntraDisjoint, "intra-disjoint", "memory regions partitioned based on each function"}, + {MemSSA::MemPartition::InterDisjoint, "inter-disjoint", "memory regions partitioned across functions"}, } ); @@ -505,7 +505,7 @@ const Option Options::UsePCG( const Option Options::IntraLock( "intra-lock-td-edge", - "Use simple intra-procedual lock for adding SVFG edges", + "Use simple intra-procedural lock for adding SVFG edges", true ); @@ -798,7 +798,7 @@ OptionMultiple Options::PASelected( { {PointerAnalysis::Andersen_WPA, "nander", "Standard inclusion-based analysis"}, {PointerAnalysis::AndersenSCD_WPA, "sander", "Selective cycle detection inclusion-based analysis"}, - {PointerAnalysis::AndersenSFR_WPA, "sfrander", "Stride-based field representation includion-based analysis"}, + {PointerAnalysis::AndersenSFR_WPA, "sfrander", "Stride-based field representation inclusion-based analysis"}, {PointerAnalysis::AndersenWaveDiff_WPA, "ander", "Diff wave propagation inclusion-based analysis"}, {PointerAnalysis::Steensgaard_WPA, "steens", "Steensgaard's pointer analysis"}, // Disabled till further work is done. @@ -867,7 +867,7 @@ const Option Options::POCRAlias( const Option Options::POCRHybrid( "pocr-hybrid", - "When explicit to true, POCRHybridSolver transfer CFL graph to internal hybird graph representation.", + "When explicit to true, POCRHybridSolver transfer CFL graph to internal hybrid graph representation.", false ); diff --git a/svf/lib/Util/SVFUtil.cpp b/svf/lib/Util/SVFUtil.cpp index 4c1f48bee..e5b9546b5 100644 --- a/svf/lib/Util/SVFUtil.cpp +++ b/svf/lib/Util/SVFUtil.cpp @@ -176,7 +176,7 @@ void SVFUtil::reportMemoryUsageKB(const std::string& infor, OutStream & O) */ bool SVFUtil::getMemoryUsageKB(u32_t* vmrss_kb, u32_t* vmsize_kb) { - /* Get the the current process' status file from the proc filesystem */ + /* Get the current process' status file from the proc filesystem */ char buffer[8192]; FILE* procfile = fopen("/proc/self/status", "r"); if(procfile) @@ -314,7 +314,7 @@ void SVFUtil::stopAnalysisLimitTimer(bool limitTimerSet) /// Match arguments for callsite at caller and callee /// if the arg size does not match then we do not need to connect this parameter -/// unless the callee is a variadic function (the first parameter of variadic function is its paramter number) +/// unless the callee is a variadic function (the first parameter of variadic function is its parameter number) /// e.g., void variadicFoo(int num, ...); variadicFoo(5, 1,2,3,4,5) /// for variadic function, callsite arg size must be greater than or equal to callee arg size bool SVFUtil::matchArgs(const SVFInstruction* cs, const SVFFunction* callee) diff --git a/svf/lib/WPA/Andersen.cpp b/svf/lib/WPA/Andersen.cpp index 9f1703b51..eed2239d6 100644 --- a/svf/lib/WPA/Andersen.cpp +++ b/svf/lib/WPA/Andersen.cpp @@ -68,7 +68,7 @@ AndersenBase::~AndersenBase() } /*! - * Initilize analysis + * Initialize analysis */ void AndersenBase::initialize() { @@ -209,7 +209,7 @@ void AndersenBase::normalizePointsTo() } /*! - * Initilize analysis + * Initialize analysis */ void Andersen::initialize() { @@ -350,7 +350,7 @@ bool Andersen::processLoad(NodeID node, const ConstraintEdge* load) { /// TODO: New copy edges are also added for black hole obj node to /// make gcc in spec 2000 pass the flow-sensitive analysis. - /// Try to handle black hole obj in an appropiate way. + /// Try to handle black hole obj in an appropriate way. // if (pag->isBlkObjOrConstantObj(node) || isNonPointerObj(node)) if (pag->isConstantObj(node) || isNonPointerObj(node)) return false; @@ -370,7 +370,7 @@ bool Andersen::processStore(NodeID node, const ConstraintEdge* store) { /// TODO: New copy edges are also added for black hole obj node to /// make gcc in spec 2000 pass the flow-sensitive analysis. - /// Try to handle black hole obj in an appropiate way + /// Try to handle black hole obj in an appropriate way // if (pag->isBlkObjOrConstantObj(node) || isNonPointerObj(node)) if (pag->isConstantObj(node) || isNonPointerObj(node)) return false; @@ -481,7 +481,7 @@ bool Andersen::processGepPts(const PointsTo& pts, const GepCGEdge* edge) */ inline void Andersen::collapsePWCNode(NodeID nodeId) { - // If a node is a PWC node, collapse all its points-to tarsget. + // If a node is a PWC node, collapse all its points-to target. // collapseNodePts() may change the points-to set of the nodes which have been processed // before, in this case, we may need to re-do the analysis. if (consCG->isPWCNode(nodeId) && collapseNodePts(nodeId)) @@ -864,7 +864,7 @@ void Andersen::updateNodeRepAndSubs(NodeID nodeId, NodeID newRepId) void Andersen::cluster(void) const { - assert(Options::MaxFieldLimit() == 0 && "Andersen::cluster: clustering for Andersen's is currently only supported in field-insesnsitive analysis"); + assert(Options::MaxFieldLimit() == 0 && "Andersen::cluster: clustering for Andersen's is currently only supported in field-insensitive analysis"); Steensgaard *steens = Steensgaard::createSteensgaard(pag); std::vector> keys; for (SVFIR::iterator pit = pag->begin(); pit != pag->end(); ++pit) diff --git a/svf/lib/WPA/VersionedFlowSensitive.cpp b/svf/lib/WPA/VersionedFlowSensitive.cpp index 666b7984a..0de6ccb07 100644 --- a/svf/lib/WPA/VersionedFlowSensitive.cpp +++ b/svf/lib/WPA/VersionedFlowSensitive.cpp @@ -315,7 +315,7 @@ void VersionedFlowSensitive::meldLabel(void) int mSCC = partOf[m]; - // There is an edge from the SCC n belongs to to that m belongs to. + // There is an edge from the SCC n belongs to that m belongs to. sccReliance[nSCC].insert(mSCC); // Ignore edges to delta nodes (prelabeled consume). @@ -385,7 +385,7 @@ void VersionedFlowSensitive::meldLabel(void) // 7. a. Save versions for nodes which need them. // b. Fill in stmtReliance. - // TODO: maybe randomise iteration order for less contention? Needs profiling. + // TODO: maybe randomize iteration order for less contention? Needs profiling. Map &osStmtReliance = this->stmtReliance.at(o); for (size_t i = 0; i < nodesWhichNeedVersions.size(); ++i) {