text stringlengths 1 24.5M |
|---|
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/constant.h"
#include "smt/expr.h"
#include "util/compiler.h"
#include <bit>
#include <cassert>
#include <cmath>
// TODO: remove cstring when migrated to std::bit_cast
#include <cst... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/value.h"
#include <string>
#include <string_view>
#include <utility>
#include <variant>
#include <vector>
namespace IR {
class Constant : public Value {
public:
C... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/fast_math.h"
#include "ir/attrs.h"
#include "util/spaceship.h"
#include "util/unionfind.h"
#include <map>
#include <vector>
#define DEBUG_FMF
#ifdef DEBUG_FMF
# include <iostream... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/expr.h"
namespace IR {
smt::expr float_refined(const smt::expr &a, const smt::expr &b);
}
|
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/function.h"
#include "ir/instr.h"
#include "util/errors.h"
#include "util/hash.h"
#include "util/sort.h"
#include "util/unionfind.h"
#include <algorithm>
#include <fstream>
#includ... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/attrs.h"
#include "ir/instr.h"
#include "ir/precondition.h"
#include "ir/value.h"
#include "smt/expr.h"
#include "util/compiler.h"
#include <memory>
#include <ostream... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/functions.h"
using namespace smt;
namespace IR {
expr PtrInput::implies(const PtrInput &rhs) const {
return implies_attrs(rhs) && val == rhs.val && idx == rhs.idx;
}
expr Ptr... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/state_value.h"
#include "smt/expr.h"
namespace IR {
struct PtrInput {
unsigned idx = 0;
StateValue val;
smt::expr byval = smt::expr::mkUInt(0, 1);
smt::expr... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/globals.h"
#include "smt/expr.h"
#include <string_view>
using namespace smt;
using namespace std;
namespace IR {
unsigned num_locals_src = 128;
unsigned num_locals_tgt = 128;
un... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
namespace smt { class expr; }
namespace IR {
/// Upperbound of the number of local blocks
extern unsigned num_locals_src, num_locals_tgt;
/// Number of constant global variable... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/instr.h"
#include "ir/function.h"
#include "ir/globals.h"
#include "ir/type.h"
#include "smt/expr.h"
#include "smt/exprs.h"
#include "smt/solver.h"
#include "util/compiler.h"
#incl... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/attrs.h"
#include "ir/value.h"
#include <string>
#include <utility>
#include <vector>
#define RAUW(val) ... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/memory.h"
#include "ir/function.h"
#include "ir/globals.h"
#include "ir/state.h"
#include "ir/value.h"
#include "smt/solver.h"
#include "util/compiler.h"
#include "util/config.h"
#... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/attrs.h"
#include "ir/functions.h"
#include "ir/pointer.h"
#include "ir/state_value.h"
#include "ir/type.h"
#include "smt/expr.h"
#include "smt/exprs.h"
#include "uti... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/pointer.h"
#include "ir/function.h"
#include "ir/memory.h"
#include "ir/globals.h"
#include "ir/state.h"
using namespace IR;
using namespace smt;
using namespace std;
using namesp... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/attrs.h"
#include "ir/state_value.h"
#include "smt/expr.h"
#include "smt/exprs.h"
#include <ostream>
#include <set>
namespace IR {
class Memory;
class Pointer {
... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/precondition.h"
#include "smt/expr.h"
#include "smt/solver.h"
#include "util/compiler.h"
#include <cassert>
#include <sstream>
using namespace smt;
using namespace std;
using name... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/constant.h"
#include "ir/value.h"
#include <string>
#include <string_view>
#include <vector>
namespace smt { class Model; }
namespace IR {
class Predicate {
public... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/state.h"
#include "ir/function.h"
#include "ir/globals.h"
#include "smt/smt.h"
#include "smt/solver.h"
#include "util/config.h"
#include "util/errors.h"
#include <algorithm>
#inclu... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/attrs.h"
#include "ir/memory.h"
#include "ir/state_value.h"
#include "smt/expr.h"
#include "smt/exprs.h"
#include <array>
#include <map>
#include <ostream>
#include <... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/state_value.h"
#include "ir/globals.h"
#include "util/compiler.h"
#include <tuple>
using namespace smt;
using namespace std;
namespace IR {
StateValue StateValue::mkIf(const exp... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/expr.h"
#include <ostream>
#include <utility>
#include <vector>
namespace IR {
struct StateValue {
smt::expr value, non_poison;
StateValue() {}
StateValue(s... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/type.h"
#include "ir/globals.h"
#include "ir/state.h"
#include "smt/solver.h"
#include "util/compiler.h"
#include <array>
#include <cassert>
#include <numeric>
#include <sstream>
... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/attrs.h"
#include "smt/expr.h"
#include <functional>
#include <memory>
#include <optional>
#include <ostream>
#include <string>
#include <utility>
#include <vector>
... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/value.h"
#include "ir/function.h"
#include "ir/instr.h"
#include "ir/globals.h"
#include "smt/expr.h"
#include "util/compiler.h"
#include "util/config.h"
#include <sstream>
using ... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/attrs.h"
#include "ir/state.h"
#include "ir/type.h"
#include "smt/expr.h"
#include <ostream>
#include <string>
#include <variant>
namespace smt { class Model; }
nam... |
#include "ir/x86_intrinsics.h"
using namespace smt;
using namespace std;
// the shape of a vector is stored as <# of lanes, element bits>
static constexpr std::pair<uint8_t, uint8_t> binop_shape_op0[] = {
#define PROCESS(NAME, A, B, C, D, E, F) std::make_pair(C, D),
#include "x86_intrinsics_binop.inc"
#undef PROCESS
... |
#pragma once
#include "ir/instr.h"
namespace IR {
class X86IntrinBinOp final : public Instr {
public:
enum Op {
#define PROCESS(NAME, A, B, C, D, E, F) NAME,
#include "x86_intrinsics_binop.inc"
#undef PROCESS
};
private:
Value *a, *b;
Op op;
public:
X86IntrinBinOp(Type &type, std::string &&name, Value &a,... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#ifdef ARGS_SRC_TGT
config::src_unroll_cnt = opt_src_unrolling_factor;
config::tgt_unroll_cnt = opt_tgt_unrolling_factor;
#else
config::src_unroll_cnt = opt_unrolling_factor;
config::tgt_unroll... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/config.h"
#include "util/random.h"
#include "llvm/Support/CommandLine.h"
#include <filesystem>
namespace fs = std::filesystem;
namespace {
llvm::cl::OptionCategory alive_cmdarg... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "llvm_util/compare.h"
#include "llvm_util/llvm2alive.h"
#include "llvm_util/llvm_optimizer.h"
#include "smt/smt.h"
#include "tools/transform.h"
#include "util/config.h"
#include <sstr... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/smt.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/IR/Function.h"
#include <ostream>
namespace llvm_util {
struct Verifier {
llvm::TargetLibraryI... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "llvm_util/known_fns.h"
#include "llvm_util/utils.h"
#include "ir/function.h"
#include "ir/instr.h"
#include "llvm/IR/Constants.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "l... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <memory>
#include <vector>
namespace llvm {
class CallInst;
class Function;
class TargetLibraryInfo;
}
namespace IR {
class BasicBlock;
class FnAttrs;
class Instr;
clas... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "llvm_util/llvm2alive.h"
#include "ir/x86_intrinsics.h"
#include "llvm_util/known_fns.h"
#include "llvm_util/utils.h"
#include "util/sort.h"
#include "llvm/ADT/SmallVector.h"
#include ... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/function.h"
#include <optional>
#include <ostream>
#include <string>
#include <vector>
namespace llvm {
class DataLayout;
class Function;
class TargetLibraryInfo;
}
... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "llvm_optimizer.h"
#include "llvm/CodeGen/CommandFlags.h"
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Target/TargetMachine.h"
using name... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <string>
#include <string_view>
namespace llvm {
class Module;
}
namespace llvm_util {
std::string optimize_module(llvm::Module &M, std::string_view optArgs);
}
|
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "llvm_util/utils.h"
#include "ir/constant.h"
#include "ir/function.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/I... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/instr.h"
#include <functional>
#include <ostream>
#include <string>
namespace llvm {
class APInt;
class BasicBlock;
class CallInst;
class ConstantExpr;
class DataLay... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/ctx.h"
#include "smt/smt.h"
#include "util/config.h"
#include <cstdlib>
#include <iostream>
#include <string_view>
#include <z3.h>
using namespace std;
using util::config::dbg;
... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
typedef struct _Z3_context *Z3_context;
typedef struct _Z3_params* Z3_params;
namespace smt {
class context {
Z3_context ctx;
Z3_params no_timeout_param;
public:
Z3_conte... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/expr.h"
#include "smt/exprs.h"
#include "smt/ctx.h"
#include "smt/smt.h"
#include "util/compiler.h"
#include <algorithm>
#include <bit>
#include <cassert>
#include <climits>
#incl... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <compare>
#include <cstdint>
#include <ostream>
#include <set>
#include <string>
#include <unordered_set>
#include <utility>
#include <vector>
typedef struct _Z3_context... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/exprs.h"
#include "smt/smt.h"
#include "util/compiler.h"
#include <algorithm>
#include <vector>
using namespace std;
namespace smt {
void AndExpr::add(const expr &e, unsigned l... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/expr.h"
#include "util/compiler.h"
#include "util/spaceship.h"
#include <cassert>
#include <compare>
#include <map>
#include <optional>
#include <ostream>
#include <... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/smt.h"
#include "smt/ctx.h"
#include "smt/solver.h"
#include "util/version.h"
#include <cstdint>
#include <string>
#include <z3.h>
using namespace util;
using namespace std;
nam... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <cstdint>
#include <string>
namespace smt {
struct smt_initializer {
smt_initializer();
~smt_initializer();
void reset();
private:
void init();
void destroy(... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/solver.h"
#include "smt/ctx.h"
#include "util/compiler.h"
#include "util/config.h"
#include "util/file.h"
#include <cassert>
#include <fstream>
#include <iomanip>
#include <iostre... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/expr.h"
#include <cassert>
#include <ostream>
#include <string>
#include <utility>
typedef struct _Z3_func_interp* Z3_func_interp;
typedef struct _Z3_model* Z3_mode... |
// TEST-ARGS: -O3 -mllvm -tv-batch-opts
int f(int x) {
return x + 1 - 1;
}
// CHECK: -- FROM THE BITCODE AFTER
// CHECK: -- TO THE BITCODE AFTER
// CHECK: -- DONE: |
// TEST-ARGS: -mllvm -tv-time-verify
int f(int x) {
return x + 1 - 1;
}
// CHECK: Took
|
// TEST-ARGS: -O3
// A simple test that checks whether InferFunctionAttrsPass is skipped and
// SimplifyCFGPass is not skipped.
int f(){ return 0; }
// CHECK: InferFunctionAttrsPass : Skipping
// CHECK-NOT: SimplifyCFGPass : Skipping
|
// TEST-ARGS: -O3 -mllvm -tv-tgt-unroll=2 -mllvm -tv-src-unroll=2
void a() {
for (;;)
for (int b; b;)
;
}
// Since it has 'ERROR: Precondition is always false', this CHECK is necessary
// (otherwise this test will fail)
// CHECK: Transformation seems to be correct
|
// TEST-ARGS: -O3 -mllvm -tv-tgt-unroll=2 -mllvm -tv-src-unroll=2 -mllvm -tv-smt-to=10000 -mllvm -tv-disable-undef-input -mllvm -tv-disable-poison-input
short *d;
void e(int a, int b, int c) {
for (int f = 0; f < b; f += c)
a = d[c];
}
|
// TEST-ARGS: -O3 -mllvm -tv-alias-stats -mllvm -tv-parallel=unrestricted -mllvm --max-subprocesses=2
int f(int *x, int *y) {
return *x + *y;
}
// CHECK: Alias sets statistics
|
// TEST-ARGS: -O3 -mllvm -tv-quiet
int f(int x) {
return x + 1 - x;
}
// CHECK-NOT: @f
|
// TEST-ARGS: -O2
static int x;
void fn() {
x = 0;
}
|
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "cache/cache.h"
#include "llvm_util/llvm2alive.h"
#include "llvm_util/utils.h"
#include "smt/smt.h"
#include "smt/solver.h"
#include "tools/transform.h"
#include "util/symexec.h"
#incl... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <cassert>
#include <csignal>
#include <cstdlib>
#include <errno.h>
#include <fcntl.h>
#include <iostream>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <u... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "cache/cache.h"
#include "llvm_util/compare.h"
#include "llvm_util/llvm2alive.h"
#include "llvm_util/llvm_optimizer.h"
#include "llvm_util/utils.h"
#include "smt/smt.h"
#include "tools... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/smt.h"
#include "smt/solver.h"
#include "tools/alive_parser.h"
#include "util/config.h"
#include "util/file.h"
#include "util/version.h"
#include <cstdlib>
#include <iostream>
#in... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <cstdint>
#include <string>
#include <string_view>
namespace tools {
enum token {
#define TOKEN(x) x,
#include "tools/tokens.h"
#undef TOKEN
};
struct yylval_t {
uni... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "tools/alive_parser.h"
#include "ir/constant.h"
#include "ir/precondition.h"
#include "ir/value.h"
#include "tools/alive_lexer.h"
#include "util/compiler.h"
#include <cassert>
#include... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "tools/transform.h"
#include <string>
#include <string_view>
#include <vector>
namespace IR { class Type; }
namespace tools {
std::vector<Transform> parse(std::string_... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "cache/cache.h"
#include "llvm_util/compare.h"
#include "llvm_util/llvm2alive.h"
#include "llvm_util/llvm_optimizer.h"
#include "smt/smt.h"
#include "tools/transform.h"
#include "util/... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
TOKEN(END)
TOKEN(ABS)
TOKEN(ADD)
TOKEN(AND)
TOKEN(ARRAY_TYPE_PREFIX)
TOKEN(ARROW)
TOKEN(ASHR)
TOKEN(ASSUME)
TOKEN(BAND)
TOKEN(BITCAST)
TOKEN(BITREVERSE)
TOKEN(BSWAP)
TOKEN(BOR)
TOKEN(CALL)
TOKE... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "tools/transform.h"
#include "ir/globals.h"
#include "ir/state.h"
#include "smt/expr.h"
#include "smt/smt.h"
#include "smt/solver.h"
#include "util/config.h"
#include "util/dataflow.h"... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/function.h"
#include "ir/state.h"
#include "smt/solver.h"
#include "util/errors.h"
#include <memory>
#include <ostream>
#include <string>
#include <unordered_map>
cl... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "cache/cache.h"
#include "ir/memory.h"
#include "llvm_util/llvm2alive.h"
#include "llvm_util/utils.h"
#include "smt/smt.h"
#include "smt/solver.h"
#include "tools/transform.h"
#include... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/compiler.h"
#include <algorithm>
#include <bit>
#include <cctype>
#ifdef _MSC_VER
#include <intrin.h>
#endif
using namespace std;
#if defined(__clang__) && __clang_major__ < 1... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <cassert>
#include <cstdint>
#include <string_view>
#include <utility>
#ifdef _MSC_VER
# define UNREACHABLE() __assume(0)
#elif defined(__GNUC__)
# define UNREACHABLE() ... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/config.h"
#include <iostream>
using namespace std;
static ostream *debug_os = &cerr;
namespace util::config {
bool symexec_print_each_value = false;
bool skip_smt = false;
st... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <string>
#include <ostream>
namespace util::config {
extern bool symexec_print_each_value;
extern bool skip_smt;
// don't dump if empty
extern std::string smt_benchma... |
/**
* \file
* Functions and types for CRC checks.
*
* Generated on Mon Aug 22 17:42:14 2022
* by pycrc v0.9.2, https://pycrc.org
* using the configuration:
* - Width = 64
* - Poly = 0x000000000000001b
* - XorIn = 0x0000000000000000
* - ReflectIn = True
* - XorOut = 0x... |
/**
* \file
* Functions and types for CRC checks.
*
* Generated on Mon Aug 22 17:42:03 2022
* by pycrc v0.9.2, https://pycrc.org
* using the configuration:
* - Width = 64
* - Poly = 0x000000000000001b
* - XorIn = 0x0000000000000000
* - ReflectIn = True
* - XorOut = 0x... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "ir/function.h"
#include <unordered_map>
namespace util {
template <typename DataTy>
class DenseDataFlow {
std::unordered_map<const IR::BasicBlock*, DataTy> bb_data;
... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/errors.h"
using namespace std;
namespace util {
Errors::Errors(const char *str, bool is_unsound) {
add(str, is_unsound);
}
Errors::Errors(string &&str, bool is_unsound) {
... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <ostream>
#include <set>
#include <string>
#include <utility>
namespace util {
struct AliveException {
std::string msg;
bool is_unsound;
public:
AliveException(s... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/file.h"
#include "util/random.h"
#include <cstring>
#include <filesystem>
#include <fstream>
#include <sstream>
using namespace std;
namespace fs = std::filesystem;
namespace u... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <memory>
#include <string>
#include <string_view>
namespace util {
class file_reader {
std::unique_ptr<char[]> buf;
size_t sz;
public:
file_reader(const char *fi... |
#include <cstring>
// halfsip(2,4) hash
// Inspired from https://github.com/veorq/SipHash/blob/master/halfsiphash.c
// In public domain
#define ROTL(x, b) (uint32_t)(((x) << (b)) | ((x) >> (32 - (b))))
#define U32TO8_LE(p, v) \
(p)[0] = (uint8_t)((v)); \
(p)[1] = (uint8_t)((v) >> 8); \
(p)[2] =... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/parallel.h"
#include "util/compiler.h"
#include <cassert>
#include <cstring>
#include <cstdlib>
#include <fcntl.h>
#include <fstream>
#include <sstream>
#include <string>
#includ... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <ostream>
#include <poll.h>
#include <sstream>
#include <sys/types.h>
#include <tuple>
#include <vector>
struct childProcess {
int pipe[2];
pid_t pid;
/*
* in a... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/compiler.h"
#include "util/parallel.h"
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <fcntl.h>
#include <string>
#include <sys/stat.h>
#include <unistd.h>
us... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/parallel.h"
bool null::init() {
return true;
}
void null::getToken() {
}
void null::putToken() {
}
std::tuple<pid_t, std::ostream *, int> null::limitedFork() {
static int... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/parallel.h"
bool unrestricted::init() {
return parallel::init();
}
void unrestricted::getToken() {
}
void unrestricted::putToken() {
}
std::tuple<pid_t, std::ostream *, int... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/random.h"
#include <random>
using namespace std;
static default_random_engine re;
static void seed() {
static bool seeded = false;
if (!seeded) {
random_device rd;
... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <string>
namespace util {
std::string get_random_str(unsigned num_chars);
}
|
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/sort.h"
#include <algorithm>
#include <functional>
using namespace std;
namespace util {
// simple Tarjan topological sort ignoring loops
vector<unsigned> top_sort(const edges... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <unordered_set>
#include <vector>
namespace util {
using edgesTy = std::vector<std::unordered_set<unsigned>>;
std::vector<unsigned> top_sort(const edgesTy &edges);
... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#if defined(__clang__) && defined(__APPLE__)
#include <compare>
#include <map>
#if (__clang_major__ < 14 || (__clang_major__ == 14 && __clang_patchlevel__ == 0))
namespace std ... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/stopwatch.h"
#include <cassert>
#include <iomanip>
using namespace std;
using namespace std::chrono;
static auto now() {
return steady_clock::now();
}
namespace util {
Stop... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <chrono>
#include <ostream>
#include <functional>
namespace util {
class StopWatch {
std::chrono::steady_clock::time_point start, end;
#ifndef NDEBUG
bool stopped =... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/symexec.h"
#include "ir/function.h"
#include "ir/state.h"
#include "util/config.h"
using namespace IR;
using namespace std;
using util::config::dbg;
static void sym_exec_instr(... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
namespace IR { class State; }
namespace util {
void sym_exec_init(IR::State &s);
void sym_exec(IR::State &s);
}
|
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/unionfind.h"
using namespace std;
namespace util {
UnionFind::UnionFind(unsigned n) {
for (unsigned i = 0; i < n; ++i) {
id.push_back(i);
}
}
unsigned UnionFind::mk()... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include <vector>
namespace util {
class UnionFind final {
std::vector<unsigned> id;
public:
UnionFind(unsigned n = 0);
unsigned mk();
unsigned find(unsigned i);
unsig... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "util/version.h"
#include "version_gen.h"
#define xstr(s) str(s)
#define str(s) #s
namespace util {
// clang-format off
const char alive_version[] = {
xstr(ALIVE_VERSION_MACRO)
};... |
#pragma once
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
namespace util {
extern const char alive_version[];
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.