23 #include <boost/random.hpp> 24 #include <boost/filesystem/path.hpp> 42 typedef boost::random::variate_generator<boost::mt19937&, boostIntDistrib >
boostIntGenerator;
82 static void parseTestWithTypes(std::string& _test, std::map<std::string, std::string>
const& _varMap);
95 static std::string rndRLPSequence(
int _depth, std::string& _debug);
98 static std::string randomUniIntHex(
u256 _maxVal = 0);
99 static u256 randomUniInt(
u256 _maxVal = 0);
103 static std::string getPushCode(
int _value);
104 static std::string getPushCode(std::string
const& _hex);
105 static int recursiveRLP(std::string& _result,
int _depth, std::string& _debug);
106 static void refreshSeed();
107 static std::vector<std::string> getTypes();
109 static boost::random::mt19937
gen;
static boostIntGenerator randUniIntGen
Generate random UniformInt from uniIntDist.
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
static boostIntDistrib opCodeDist
0..255 opcodes
static boostIntGenerator randOpCodeGen
Generate random value from opCodeDist.
static boostUInt64Generator randUInt64Gen
Generate random uInt64.
boost::random::variate_generator< boost::mt19937 &, boostDescreteDistrib > boostWeightGenerator
void addAddress(dev::Address const &_address)
void setWeight(dev::eth::Instruction _opCode, int _weight)
static boost::random::mt19937 gen
Random generator.
boost::random::discrete_distribution boostDescreteDistrib
UniValue generate(const JSONRPCRequest &request)
Fixed-size raw-byte array container type, with an API optimised for storing hashes.
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> u256
Instruction
Virtual machine bytecode instruction.
dev::Address getRandomAddress() const
boostDescreteDistrib opCodeProbability
static boostUint64Distrib uInt64Dist
0..2**64
std::vector< dev::Address > addressList
static boostIntGenerator randOpLengGen
Generate random length from opLengDist.
boost::random::uniform_int_distribution boostIntDistrib
static boostIntDistrib opLengDist
1..32 byte string
boost::random::variate_generator< boost::mt19937 &, boostUint64Distrib > boostUInt64Generator
boost::uniform_int< uint64_t > boostUint64Distrib
boost::random::variate_generator< boost::mt19937 &, boostIntDistrib > boostIntGenerator
std::map< int, int > mapWeights
static boostIntDistrib uniIntDist
0..0x7fffffff
Helper functions to work with json::spirit and test files.