Analysis_and_optimization.Pedantic_dist_warningstype compiletime_val = | Opaque| Number of float * string| Param of string * Middle.Expr.Typed.t Middle.Transformation.t| Data of stringUseful information about an expression. Opaque means we don't know anything.
type dist_info = {name : string;loc : Middle.Location_span.t;args : (compiletime_val * Middle.Expr.Typed.Meta.t) Core.List.t;}Info about a distribution occurrences that's useful for checking that distribution properties are met
Value constraint as a range. The bools are true if the bound is inclusive
type var_constraint = | Range of range| Ordered| PositiveOrdered| Simplex| UnitVector| CholeskyCorr| CholeskyCov| Correlation| CovarianceValue constraint for an argument
Constraint paired with a name for user messages
val unit_range : var_constraint_namedval exclusive_unit_range : var_constraint_namedval positive_range : var_constraint_namedval nonnegative_range : var_constraint_namedval simplex : var_constraint_namedval ordered : var_constraint_namedval correlation : var_constraint_namedval cholesky_correlation : var_constraint_namedval covariance : var_constraint_namedval cholesky_covariance : var_constraint_namedval bounds_out_of_range : range -> Mir_utils.bound_values -> boolCheck for inconsistency between a distribution argument's value range and the declared bounds of a variable
val transform_mismatch_constraint :
var_constraint ->
Middle.Expr.Typed.t Middle.Transformation.t ->
boolCheck for inconsistency between a distribution argument's constraint and the constraint transformation of a variable
val value_out_of_range : range -> float -> boolCheck for inconsistency between a distribution argument's range and a literal value
val value_mismatch_constraint : var_constraint -> float -> boolCheck for inconsistency between a distribution argument's constraint and a literal value
val arg_number : arg_info -> intval constr_mismatch_message : string -> string -> arg_info -> string -> stringval constr_literal_mismatch_message :
string ->
string ->
arg_info ->
string ->
stringval constr_mismatch_warning :
var_constraint_named ->
arg_info ->
dist_info ->
(Middle.Location_span.t * string) optionReturn a warning if the argn-th argument doesn't match its constraints
val uniform_dist_warning :
dist_info ->
(Middle.Location_span.t * string) optionWarning for all uniform distributions with a parameter
val lkj_corr_dist_warning :
dist_info ->
(Middle.Location_span.t * string) optionWarn about all non-Cholesky lkj_corr distributions
val gamma_arg_dist_warning :
dist_info ->
(Middle.Location_span.t * string) optionWarning particular to gamma and inv_gamma, when A=B<1
val distribution_warning :
dist_info ->
(Middle.Location_span.t * string) Core.List.tGenerate all of the warnings that are relevant to a given distribution
val distribution_warnings :
dist_info Core.Set.Poly.t ->
(Middle.Location_span.t * string) Core.Set.Poly.tGenerate the distribution warnings for a program