ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
numpy_random Class Reference

np.random. More...

#include <numpy_random.h>

Public Member Functions

 numpy_random (python_converter &converter, const nlohmann::json &call)
exprt get ()

Static Public Member Functions

static bool is_random_call (const nlohmann::json &call, const nlohmann::json &ast)
static std::optional< std::vector< std::size_t > > output_shape (const nlohmann::json &call, const nlohmann::json &ast)
 The literal output shape of a random call that returns an array, read from the source; nullopt for a scalar result or a shape it rejects.
static std::string list_annotation (const nlohmann::json &call, const nlohmann::json &ast)
 "list" for a random call that returns an array, so the annotator types it and arithmetic on it as it does a numpy constructor's result; empty for a scalar.

Detailed Description

np.random.

<name>(...) as a nondeterministic over-approximation (ADR-NP-002): each sample is a fresh symbol constrained to the support of its distribution. Probabilities, uniformity and generator state are not modelled. Arguments are evaluated once, in source order, and validated before any sample is drawn.

Constructor & Destructor Documentation

◆ numpy_random()

numpy_random::numpy_random ( python_converter & converter,
const nlohmann::json & call )

Member Function Documentation

◆ get()

exprt numpy_random::get ( )

◆ is_random_call()

bool numpy_random::is_random_call ( const nlohmann::json & call,
const nlohmann::json & ast )
static

◆ list_annotation()

std::string numpy_random::list_annotation ( const nlohmann::json & call,
const nlohmann::json & ast )
static

"list" for a random call that returns an array, so the annotator types it and arithmetic on it as it does a numpy constructor's result; empty for a scalar.

◆ output_shape()

std::optional< std::vector< std::size_t > > numpy_random::output_shape ( const nlohmann::json & call,
const nlohmann::json & ast )
static

The literal output shape of a random call that returns an array, read from the source; nullopt for a scalar result or a shape it rejects.


The documentation for this class was generated from the following files: