about summary refs log tree commit diff homepage
path: root/lib/Core/Differentiator.h
blob: 70e83848e8c480795534b556406254c01fbdc12b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//===-- Differentiator.h ----------------------------------------*- C++ -*-===//
//
//                     The KLEE Symbolic Virtual Machine
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Class to perform actual execution, hides implementation details from external
// interpreter.
//
//===----------------------------------------------------------------------===//

#ifndef KLEE_DIFFERENTIATOR_H
#define KLEE_DIFFERENTIATOR_H

#include "llvm/Support/raw_ostream.h"

#include <cstdint>
#include <map>
#include <string>

namespace klee {  

struct Differentiator {
  std::uint64_t revA, revB;
  // arg_k => v
  std::vector<std::string> args;
  // k => (out!k!a, out!k!b)
  std::map<std::string, std::pair<std::string, std::string>> outputs;
  // rev => stdout
  std::map<std::uint64_t, std::string> stdouts;
  Differentiator(std::uint64_t a, std::uint64_t b) : revA{a}, revB{b} {}
};

/// Write convenient representation for debugging
llvm::raw_ostream &operator<<(llvm::raw_ostream&, const Differentiator&);
} // End klee namespace

#endif /* KLEE_DIFFERENTIATOR_H */