From d56184fc383a2e09ed36dd7d053e001b4c6059ca Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Thu, 4 Oct 2018 10:53:19 +0100 Subject: Added missing headers and clang-format the files --- include/klee/ArrayExprOptimizer.h | 35 ++++++++++++++++++++++------------- include/klee/ArrayExprRewriter.h | 25 +++++++++++++++++-------- include/klee/AssignmentGenerator.h | 9 +++++++++ include/klee/util/ArrayExprVisitor.h | 19 ++++++++++++++----- 4 files changed, 62 insertions(+), 26 deletions(-) (limited to 'include') diff --git a/include/klee/ArrayExprOptimizer.h b/include/klee/ArrayExprOptimizer.h index 982136fb..9b62571f 100644 --- a/include/klee/ArrayExprOptimizer.h +++ b/include/klee/ArrayExprOptimizer.h @@ -1,3 +1,12 @@ +//===-- ArrayExprOptimizer.h ----------------------------------------------===// +// +// The KLEE Symbolic Virtual Machine +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #ifndef KLEE_EXPROPTIMIZER_H #define KLEE_EXPROPTIMIZER_H @@ -52,39 +61,39 @@ extern llvm::cl::opt ArrayValueSymbRatio; class Expr; template class ref; -typedef std::map > > array2idx_ty; +typedef std::map>> array2idx_ty; typedef std::vector v_arr_ty; -typedef std::map, std::vector > > mapIndexOptimizedExpr_ty; +typedef std::map, std::vector>> mapIndexOptimizedExpr_ty; class ExprOptimizer { private: - unordered_map > cacheExprOptimized; + unordered_map> cacheExprOptimized; unordered_set cacheExprUnapplicable; - unordered_map > cacheReadExprOptimized; + unordered_map> cacheReadExprOptimized; public: void optimizeExpr(const ref &e, ref &result, bool valueOnly = false); private: - bool computeIndexes(array2idx_ty &arrays, const ref &e, - std::map, std::vector > > &idx_valIdx) - const; + bool + computeIndexes(array2idx_ty &arrays, const ref &e, + std::map, std::vector>> &idx_valIdx) const; ref getSelectOptExpr( const ref &e, std::vector &reads, - std::map > &readInfo, + std::map> &readInfo, bool isSymbolic); ref buildConstantSelectExpr(const ref &index, - std::vector &arrayValues, - Expr::Width width, unsigned elementsInArray) const; + std::vector &arrayValues, + Expr::Width width, + unsigned elementsInArray) const; ref buildMixedSelectExpr(const ReadExpr *re, - std::vector > &arrayValues, - Expr::Width width, unsigned elementsInArray) const; - + std::vector> &arrayValues, + Expr::Width width, unsigned elementsInArray) const; }; } diff --git a/include/klee/ArrayExprRewriter.h b/include/klee/ArrayExprRewriter.h index dafcfef6..3828262a 100644 --- a/include/klee/ArrayExprRewriter.h +++ b/include/klee/ArrayExprRewriter.h @@ -1,3 +1,12 @@ +//===-- ArrayExprRewriter.h -----------------------------------------------===// +// +// The KLEE Symbolic Virtual Machine +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #ifndef LIB_EXPRREWRITER_H_ #define LIB_EXPRREWRITER_H_ @@ -13,23 +22,23 @@ namespace klee { typedef std::vector v_arr_ty; -typedef std::map > > array2idx_ty; -typedef std::map, std::vector > > mapIndexOptimizedExpr_ty; +typedef std::map>> array2idx_ty; +typedef std::map, std::vector>> mapIndexOptimizedExpr_ty; class ExprRewriter { public: - static ref createOptExpr( - const ref &e, const array2idx_ty &arrays, - const std::map, std::vector > > &idx_valIdx); + static ref + createOptExpr(const ref &e, const array2idx_ty &arrays, + const std::map, std::vector>> &idx_valIdx); private: static ref rewrite(const ref &e, const array2idx_ty &arrays, - const std::map, std::vector > > &idx_valIdx); + const std::map, std::vector>> &idx_valIdx); static ref - concatenateOrExpr(const std::vector >::const_iterator begin, - const std::vector >::const_iterator end); + concatenateOrExpr(const std::vector>::const_iterator begin, + const std::vector>::const_iterator end); static ref createEqExpr(const ref &index, const ref &valIndex); diff --git a/include/klee/AssignmentGenerator.h b/include/klee/AssignmentGenerator.h index 835651b8..aa228755 100644 --- a/include/klee/AssignmentGenerator.h +++ b/include/klee/AssignmentGenerator.h @@ -1,3 +1,12 @@ +//===-- AssignmentGenerator.h ---------------------------------------------===// +// +// The KLEE Symbolic Virtual Machine +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #ifndef KLEE_ASSIGNMENTGENERATOR_H #define KLEE_ASSIGNMENTGENERATOR_H diff --git a/include/klee/util/ArrayExprVisitor.h b/include/klee/util/ArrayExprVisitor.h index 70495989..6d7529e9 100644 --- a/include/klee/util/ArrayExprVisitor.h +++ b/include/klee/util/ArrayExprVisitor.h @@ -1,3 +1,12 @@ +//===-- ArrayExprVisitor.h ------------------------------------------------===// +// +// The KLEE Symbolic Virtual Machine +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #ifndef KLEE_ARRAYEXPRVISITOR_H_ #define KLEE_ARRAYEXPRVISITOR_H_ @@ -33,7 +42,7 @@ public: //--------------------------- INDEX-BASED OPTIMIZATION-----------------------// class ConstantArrayExprVisitor : public ExprVisitor { private: - typedef std::map > > bindings_ty; + typedef std::map>> bindings_ty; bindings_ty &arrays; // Avoids adding the same index twice unordered_set addedIndexes; @@ -91,7 +100,7 @@ public: class ArrayReadExprVisitor : public ExprVisitor { private: std::vector &reads; - std::map > &readInfo; + std::map> &readInfo; bool symbolic; bool incompatible; @@ -104,7 +113,7 @@ protected: public: ArrayReadExprVisitor( std::vector &_reads, - std::map > &_readInfo) + std::map> &_readInfo) : ExprVisitor(true), reads(_reads), readInfo(_readInfo), symbolic(false), incompatible(false) {} inline bool isIncompatible() { return incompatible; } @@ -114,14 +123,14 @@ public: class ArrayValueOptReplaceVisitor : public ExprVisitor { private: unordered_set visited; - std::map > optimized; + std::map> optimized; protected: Action visitConcat(const ConcatExpr &); Action visitRead(const ReadExpr &re); public: - ArrayValueOptReplaceVisitor(std::map > &_optimized, + ArrayValueOptReplaceVisitor(std::map> &_optimized, bool recursive = true) : ExprVisitor(recursive), optimized(_optimized) {} }; -- cgit 1.4.1