From 66bf99407d6ce661e56e75b103d42a623da47ef9 Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Fri, 12 Mar 2021 12:18:48 -0500 Subject: [PATCH 01/31] Convert reads to constrained reads; remove constraints --- src/frontend/Ast_to_Mir.ml | 4 +- src/stan_math_backend/Expression_gen.ml | 13 ++- src/stan_math_backend/Transform_Mir.ml | 138 ++++++++++++++++-------- 3 files changed, 107 insertions(+), 48 deletions(-) diff --git a/src/frontend/Ast_to_Mir.ml b/src/frontend/Ast_to_Mir.ml index e3705a5ec4..5b9f217a95 100644 --- a/src/frontend/Ast_to_Mir.ml +++ b/src/frontend/Ast_to_Mir.ml @@ -829,7 +829,9 @@ let trans_block ud_dists declc block prog = if Utils.is_user_ident decl_id then let constrain_checks = match declc.dconstrain with - | Some Constrain | Some Unconstrain -> + | Some Constrain -> + check_transform_shape decl_id decl_var smeta.loc transform + | Some Unconstrain -> check_transform_shape decl_id decl_var smeta.loc transform @ constrain_decl type_ declc.dconstrain transform decl_id decl_var smeta.loc diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index eb86239ce8..37e9a89559 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -406,9 +406,16 @@ and pp_compiler_internal_fn ut f ppf es = | Some FnReadData -> read_data ut ppf es | Some FnReadParam -> ( match es with - | {Expr.Fixed.pattern= Lit (Str, base_type); _} :: dims -> - pf ppf "@[in__.%s(@,%a)@]" base_type (list ~sep:comma pp_expr) - dims + | {Expr.Fixed.pattern= Lit (Str, constraint_string); _} :: dims -> + let constraint_extension = + if String.is_empty constraint_string then "" + else "_" ^ constraint_string + in + let maybe_comma = if List.is_empty dims then "" else ", " in + pf ppf "@[in__.read%s<%a, jacobian__>(@,lp__%s%a)@]" + constraint_extension pp_unsizedtype_local + (UnsizedType.AutoDiffable, ut) + maybe_comma (list ~sep:comma pp_expr) dims | _ -> raise_s [%message "emit ReadParam with " (es : Expr.Typed.t list)] ) | _ -> gen_fun_app ppf f es diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index a9202f2410..47b66baa0f 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -161,56 +161,106 @@ let data_read smeta (decl_id, st) = ; Stmt.Helpers.for_scalar_inv st bodyfn decl_var smeta ] |> swrap ] -let rec base_ut_to_string = function - | UnsizedType.UMatrix -> "matrix" - | UVector -> "vector" - | URowVector -> "row_vector" - | UReal -> "scalar" - | UInt -> "integer" - | UArray t -> base_ut_to_string t - | t -> - raise_s - [%message "Another place where it's weird to get " (t : UnsizedType.t)] +(* let rec base_ut_to_string = function + * | UnsizedType.UMatrix -> "matrix" + * | UVector -> "vector" + * | URowVector -> "row_vector" + * | UReal -> "scalar" + * | UInt -> "integer" + * | UArray t -> base_ut_to_string t + * | t -> + * raise_s + * [%message "Another place where it's weird to get " (t : UnsizedType.t)] *) + +type constrainaction = Check | Constrain | Unconstrain [@@deriving sexp] + +let check_constraint_to_string t (c : constrainaction) = + match t with + | Program.Ordered -> "ordered" + | PositiveOrdered -> "positive_ordered" + | Simplex -> "simplex" + | UnitVector -> "unit_vector" + | CholeskyCorr -> "cholesky_factor_corr" + | CholeskyCov -> "cholesky_factor" + | Correlation -> "corr_matrix" + | Covariance -> "cov_matrix" + | Lower _ -> ( + match c with + | Check -> "greater_or_equal" + | Constrain | Unconstrain -> "lb" ) + | Upper _ -> ( + match c with Check -> "less_or_equal" | Constrain | Unconstrain -> "ub" ) + | LowerUpper _ -> ( + match c with + | Check -> + raise_s + [%message "LowerUpper is really two other checks tied together"] + | Constrain | Unconstrain -> "lub" ) + | Offset _ | Multiplier _ | OffsetMultiplier _ -> ( + match c with Check -> "" | Constrain | Unconstrain -> "offset_multiplier" ) + | Identity -> "" + +let constrain_constraint_to_string t (c : constrainaction) = + match t with + | Program.CholeskyCorr -> "cholesky_corr" + | _ -> check_constraint_to_string t c let param_read smeta - ( decl_id - , Program.({ out_constrained_st= cst - ; out_unconstrained_st= ucst - ; out_block; _ }) ) = + (decl_id, Program.({out_constrained_st= cst; out_block; out_trans; _})) = if not (out_block = Parameters) then [] else - let decl_id, decl = - match cst = ucst with - | true -> (decl_id, []) - | false -> - let decl_id = decl_id ^ "_in__" in - let d = - Stmt.Fixed.Pattern.Decl - {decl_adtype= AutoDiffable; decl_id; decl_type= Sized ucst} - in - (decl_id, [Stmt.Fixed.{meta= smeta; pattern= d}]) + let ut = SizedType.to_unsized cst in + let decl_var = + Expr.Fixed. + { pattern= Var decl_id + ; meta= + Expr.Typed.Meta.create ~loc:smeta ~type_:ut ~adlevel:AutoDiffable + () } in - let unconstrained_decl_var = - let meta = - Expr.Typed.Meta.create ~loc:smeta - ~type_:SizedType.(to_unsized cst) - ~adlevel:AutoDiffable () - in - Expr.Fixed.{meta; pattern= Var decl_id} + let read = + Expr.( + Helpers.( + internal_funapp FnReadParam + ( Expr.Helpers.str + (constrain_constraint_to_string out_trans Constrain) + :: SizedType.get_dims cst )) + Typed.Meta.{decl_var.meta with type_= ut}) in - let bodyfn var = - let readfnapp (var : Expr.Typed.t) = - Expr.( - Helpers.( - internal_funapp FnReadParam - ( str (base_ut_to_string (SizedType.to_unsized ucst)) - :: SizedType.dims_of ucst )) - Typed.Meta.{var.meta with type_= base_type ucst}) - in - Stmt.Helpers.assign_indexed (SizedType.to_unsized cst) decl_id smeta - readfnapp var - in - decl @ [Stmt.Helpers.for_eigen ucst bodyfn unconstrained_decl_var smeta] + [ Stmt.Fixed. + {pattern= Pattern.Assignment ((decl_id, ut, []), read); meta= smeta} ] + +(* let decl_id, decl = + * match cst = ucst with + * | true -> (decl_id, []) + * | false -> + * let decl_id = decl_id ^ "_in__" in + * let d = + * Stmt.Fixed.Pattern.Decl + * {decl_adtype= AutoDiffable; decl_id; decl_type= Sized ucst} + * in + * (decl_id, [Stmt.Fixed.{meta= smeta; pattern= d}]) + * in + * let unconstrained_decl_var = + * let meta = + * Expr.Typed.Meta.create ~loc:smeta + * ~type_:SizedType.(to_unsized cst) + * ~adlevel:AutoDiffable () + * in + * Expr.Fixed.{meta; pattern= Var decl_id} + * in + * let bodyfn var = + * let readfnapp (var : Expr.Typed.t) = + * Expr.( + * Helpers.( + * internal_funapp FnReadParam + * ( str (base_ut_to_string (SizedType.to_unsized ucst)) + * :: SizedType.dims_of ucst )) + * Typed.Meta.{var.meta with type_= base_type ucst}) + * in + * Stmt.Helpers.assign_indexed (SizedType.to_unsized cst) decl_id smeta + * readfnapp var + * in + * decl @ [Stmt.Helpers.for_eigen ucst bodyfn unconstrained_decl_var smeta] *) let escape_name str = str From 8623456afb6655a54bf0b1f2e5f8241167bf1f0c Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Fri, 12 Mar 2021 12:55:41 -0500 Subject: [PATCH 02/31] Handling constraint argument codegen correctly (with hack) --- src/stan_math_backend/Expression_gen.ml | 12 ++++++++---- src/stan_math_backend/Transform_Mir.ml | 12 +++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index 37e9a89559..39945730d3 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -406,16 +406,20 @@ and pp_compiler_internal_fn ut f ppf es = | Some FnReadData -> read_data ut ppf es | Some FnReadParam -> ( match es with - | {Expr.Fixed.pattern= Lit (Str, constraint_string); _} :: dims -> + | {Expr.Fixed.pattern= Lit (Str, constraint_string); meta=emeta} :: + {Expr.Fixed.pattern= Lit (Int, n_constraint_args_str); _} :: args -> + let n_constraint_args = int_of_string n_constraint_args_str in + let constraint_args, dims = List.split_n args n_constraint_args in let constraint_extension = if String.is_empty constraint_string then "" else "_" ^ constraint_string in - let maybe_comma = if List.is_empty dims then "" else ", " in - pf ppf "@[in__.read%s<%a, jacobian__>(@,lp__%s%a)@]" + let lp_expr = Expr.Fixed.{ pattern = Var "lp__"; meta = emeta} in + let arg_exprs = constraint_args @ [lp_expr] @ dims in + pf ppf "@[in__.read%s<%a, jacobian__>(@,%a)@]" constraint_extension pp_unsizedtype_local (UnsizedType.AutoDiffable, ut) - maybe_comma (list ~sep:comma pp_expr) dims + (list ~sep:comma pp_expr) arg_exprs | _ -> raise_s [%message "emit ReadParam with " (es : Expr.Typed.t list)] ) | _ -> gen_fun_app ppf f es diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index 47b66baa0f..fd841a97f6 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -217,13 +217,23 @@ let param_read smeta Expr.Typed.Meta.create ~loc:smeta ~type_:ut ~adlevel:AutoDiffable () } in + let transform_args = Program.fold_transformation (fun args arg -> args @ [arg]) [] out_trans in + (* this is an absolute hack + + I need to unpack the constraint arguments and the dimensions in codegen, but we pack them all together into a fake function FnReadParam as expressions + So, I'm packing in the number of constraint arguments to read as an int expression + To avoid this hack, keep internal functions as a variant type instead of a normal funapp + *) + let n_args_expression = Expr.Helpers.int (List.length transform_args) in let read = Expr.( Helpers.( internal_funapp FnReadParam ( Expr.Helpers.str (constrain_constraint_to_string out_trans Constrain) - :: SizedType.get_dims cst )) + :: n_args_expression + :: (transform_args + @ (SizedType.get_dims cst)) )) Typed.Meta.{decl_var.meta with type_= ut}) in [ Stmt.Fixed. From 6ce419d8bce870426f154acc83bb4950fa0987b7 Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Fri, 12 Mar 2021 13:19:52 -0500 Subject: [PATCH 03/31] remove old comments --- src/stan_math_backend/Expression_gen.ml | 6 +- src/stan_math_backend/Transform_Mir.ml | 61 +- test/integration/good/code-gen/cl.expected | 70 +- test/integration/good/code-gen/cpp.expected | 2644 +++------- test/integration/good/code-gen/mir.expected | 1442 +----- .../good/code-gen/opencl/cpp.expected | 92 +- .../good/code-gen/profiling/cpp.expected | 42 +- .../good/compiler-optimizations/cpp.expected | 4549 +++++++---------- test/unit/Pedantic_analysis.ml | 1 - 9 files changed, 2648 insertions(+), 6259 deletions(-) diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index 39945730d3..38af3a3d67 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -406,15 +406,15 @@ and pp_compiler_internal_fn ut f ppf es = | Some FnReadData -> read_data ut ppf es | Some FnReadParam -> ( match es with - | {Expr.Fixed.pattern= Lit (Str, constraint_string); meta=emeta} :: - {Expr.Fixed.pattern= Lit (Int, n_constraint_args_str); _} :: args -> + | {Expr.Fixed.pattern= Lit (Str, constraint_string); meta= emeta} + :: {Expr.Fixed.pattern= Lit (Int, n_constraint_args_str); _} :: args -> let n_constraint_args = int_of_string n_constraint_args_str in let constraint_args, dims = List.split_n args n_constraint_args in let constraint_extension = if String.is_empty constraint_string then "" else "_" ^ constraint_string in - let lp_expr = Expr.Fixed.{ pattern = Var "lp__"; meta = emeta} in + let lp_expr = Expr.Fixed.{pattern= Var "lp__"; meta= emeta} in let arg_exprs = constraint_args @ [lp_expr] @ dims in pf ppf "@[in__.read%s<%a, jacobian__>(@,%a)@]" constraint_extension pp_unsizedtype_local diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index fd841a97f6..d0ad69bea0 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -161,17 +161,6 @@ let data_read smeta (decl_id, st) = ; Stmt.Helpers.for_scalar_inv st bodyfn decl_var smeta ] |> swrap ] -(* let rec base_ut_to_string = function - * | UnsizedType.UMatrix -> "matrix" - * | UVector -> "vector" - * | URowVector -> "row_vector" - * | UReal -> "scalar" - * | UInt -> "integer" - * | UArray t -> base_ut_to_string t - * | t -> - * raise_s - * [%message "Another place where it's weird to get " (t : UnsizedType.t)] *) - type constrainaction = Check | Constrain | Unconstrain [@@deriving sexp] let check_constraint_to_string t (c : constrainaction) = @@ -205,6 +194,16 @@ let constrain_constraint_to_string t (c : constrainaction) = | Program.CholeskyCorr -> "cholesky_corr" | _ -> check_constraint_to_string t c +let default_multiplier = 1 +let default_offset = 0 +let transform_args = function + | Program.Offset offset -> + [offset; Expr.Helpers.int default_multiplier] + | Multiplier multiplier -> + [Expr.Helpers.int default_offset; multiplier] + | transform -> + Program.fold_transformation (fun args arg -> args @ [arg]) [] transform + let param_read smeta (decl_id, Program.({out_constrained_st= cst; out_block; out_trans; _})) = if not (out_block = Parameters) then [] @@ -217,7 +216,7 @@ let param_read smeta Expr.Typed.Meta.create ~loc:smeta ~type_:ut ~adlevel:AutoDiffable () } in - let transform_args = Program.fold_transformation (fun args arg -> args @ [arg]) [] out_trans in + let transform_args = transform_args out_trans in (* this is an absolute hack I need to unpack the constraint arguments and the dimensions in codegen, but we pack them all together into a fake function FnReadParam as expressions @@ -231,47 +230,13 @@ let param_read smeta internal_funapp FnReadParam ( Expr.Helpers.str (constrain_constraint_to_string out_trans Constrain) - :: n_args_expression - :: (transform_args - @ (SizedType.get_dims cst)) )) + :: n_args_expression + :: (transform_args @ SizedType.get_dims cst) )) Typed.Meta.{decl_var.meta with type_= ut}) in [ Stmt.Fixed. {pattern= Pattern.Assignment ((decl_id, ut, []), read); meta= smeta} ] -(* let decl_id, decl = - * match cst = ucst with - * | true -> (decl_id, []) - * | false -> - * let decl_id = decl_id ^ "_in__" in - * let d = - * Stmt.Fixed.Pattern.Decl - * {decl_adtype= AutoDiffable; decl_id; decl_type= Sized ucst} - * in - * (decl_id, [Stmt.Fixed.{meta= smeta; pattern= d}]) - * in - * let unconstrained_decl_var = - * let meta = - * Expr.Typed.Meta.create ~loc:smeta - * ~type_:SizedType.(to_unsized cst) - * ~adlevel:AutoDiffable () - * in - * Expr.Fixed.{meta; pattern= Var decl_id} - * in - * let bodyfn var = - * let readfnapp (var : Expr.Typed.t) = - * Expr.( - * Helpers.( - * internal_funapp FnReadParam - * ( str (base_ut_to_string (SizedType.to_unsized ucst)) - * :: SizedType.dims_of ucst )) - * Typed.Meta.{var.meta with type_= base_type ucst}) - * in - * Stmt.Helpers.assign_indexed (SizedType.to_unsized cst) decl_id smeta - * readfnapp var - * in - * decl @ [Stmt.Helpers.for_eigen ucst bodyfn unconstrained_decl_var smeta] *) - let escape_name str = str |> String.substr_replace_all ~pattern:"." ~with_:"_" diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index 5a301f5b01..6dc1262be7 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -576,60 +576,64 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, DUMMY_VAR__); current_statement__ = 1; - alpha_v = in__.vector(k); + assign(alpha_v, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - beta = in__.vector(k); + assign(beta, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, DUMMY_VAR__); current_statement__ = 3; - cuts = in__.vector(k); + assign(cuts, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable cuts"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; current_statement__ = 4; - sigma = in__.scalar(); - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - sigma = stan::math::lb_constrain(sigma, 0, lp__); - } else { - current_statement__ = 4; - sigma = stan::math::lb_constrain(sigma, 0); - } + sigma = in__.read_lb(0, lp__); local_scalar_t__ alpha; alpha = DUMMY_VAR__; current_statement__ = 5; - alpha = in__.scalar(); + alpha = in__.read(lp__); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 6; - phi = in__.scalar(); + phi = in__.read(lp__); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, DUMMY_VAR__); current_statement__ = 7; - X_p = in__.matrix(n, k); + assign(X_p, nil_index_list(), + in__.read, jacobian__>(lp__, + n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, DUMMY_VAR__); current_statement__ = 8; - beta_m = in__.matrix(n, k); + assign(beta_m, nil_index_list(), + in__.read, jacobian__>(lp__, + n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, DUMMY_VAR__); current_statement__ = 9; - X_rv_p = in__.row_vector(n); + assign(X_rv_p, nil_index_list(), + in__.read, jacobian__>(lp__, + n), "assigning variable X_rv_p"); { current_statement__ = 10; lp_accum__.add( @@ -1293,54 +1297,64 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - alpha_v = in__.vector(k); + assign(alpha_v, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - beta = in__.vector(k); + assign(beta, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - cuts = in__.vector(k); + assign(cuts, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable cuts"); double sigma; sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma = in__.scalar(); - current_statement__ = 4; - sigma = stan::math::lb_constrain(sigma, 0); + sigma = in__.read_lb(0, lp__); double alpha; alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - alpha = in__.scalar(); + alpha = in__.read(lp__); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - phi = in__.scalar(); + phi = in__.read(lp__); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - X_p = in__.matrix(n, k); + assign(X_p, nil_index_list(), + in__.read, jacobian__>(lp__, + n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - beta_m = in__.matrix(n, k); + assign(beta_m, nil_index_list(), + in__.read, jacobian__>(lp__, + n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, std::numeric_limits::quiet_NaN()); current_statement__ = 9; - X_rv_p = in__.row_vector(n); + assign(X_rv_p, nil_index_list(), + in__.read, jacobian__>(lp__, + n), "assigning variable X_rv_p"); for (int sym1__ = 1; sym1__ <= k; ++sym1__) { vars__.emplace_back(alpha_v[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= k; ++sym1__) { diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index c336a1d92d..f3a43c9464 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -149,26 +149,20 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> mu = DUMMY_VAR__; current_statement__ = 1; - mu = in__.scalar(); + mu = in__.read(lp__); local_scalar_t__ tau; tau = DUMMY_VAR__; current_statement__ = 2; - tau = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - tau = stan::math::lb_constrain(tau, 0, lp__); - } else { - current_statement__ = 2; - tau = stan::math::lb_constrain(tau, 0); - } + tau = in__.read_lb(0, lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, DUMMY_VAR__); current_statement__ = 3; - theta_tilde = in__.vector(J); + assign(theta_tilde, nil_index_list(), + in__.read, jacobian__>(lp__, + J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, DUMMY_VAR__); @@ -217,20 +211,20 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mu = in__.scalar(); + mu = in__.read(lp__); double tau; tau = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - tau = in__.scalar(); - current_statement__ = 2; - tau = stan::math::lb_constrain(tau, 0); + tau = in__.read_lb(0, lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - theta_tilde = in__.vector(J); + assign(theta_tilde, nil_index_list(), + in__.read, jacobian__>(lp__, + J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, std::numeric_limits::quiet_NaN()); @@ -588,7 +582,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb bar = DUMMY_VAR__; current_statement__ = 1; - bar = in__.scalar(); + bar = in__.read(lp__); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); // Next line prevents compiler griping about no return @@ -620,7 +614,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb bar = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - bar = in__.scalar(); + bar = in__.read(lp__); vars__.emplace_back(bar); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -957,26 +951,20 @@ class eight_schools_ncp_model final : public model_base_crtp(lp__); local_scalar_t__ tau; tau = DUMMY_VAR__; current_statement__ = 2; - tau = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - tau = stan::math::lb_constrain(tau, 0, lp__); - } else { - current_statement__ = 2; - tau = stan::math::lb_constrain(tau, 0); - } + tau = in__.read_lb(0, lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, DUMMY_VAR__); current_statement__ = 3; - theta_tilde = in__.vector(J); + assign(theta_tilde, nil_index_list(), + in__.read, jacobian__>(lp__, + J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, DUMMY_VAR__); @@ -1025,20 +1013,20 @@ class eight_schools_ncp_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mu = in__.scalar(); + mu = in__.read(lp__); double tau; tau = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - tau = in__.scalar(); - current_statement__ = 2; - tau = stan::math::lb_constrain(tau, 0); + tau = in__.read_lb(0, lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - theta_tilde = in__.vector(J); + assign(theta_tilde, nil_index_list(), + in__.read, jacobian__>(lp__, + J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, std::numeric_limits::quiet_NaN()); @@ -6360,509 +6348,172 @@ class mother_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.scalar(); + p_real = in__.read(lp__); local_scalar_t__ p_upper; p_upper = DUMMY_VAR__; current_statement__ = 2; - p_upper = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - p_upper = stan::math::lb_constrain(p_upper, p_real, lp__); - } else { - current_statement__ = 2; - p_upper = stan::math::lb_constrain(p_upper, p_real); - } + p_upper = in__.read_lb(p_real, lp__); local_scalar_t__ p_lower; p_lower = DUMMY_VAR__; current_statement__ = 3; - p_lower = in__.scalar(); - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - p_lower = stan::math::ub_constrain(p_lower, p_upper, lp__); - } else { - current_statement__ = 3; - p_lower = stan::math::ub_constrain(p_lower, p_upper); - } + p_lower = in__.read_ub(p_upper, lp__); std::vector offset_multiplier; offset_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 4; - assign(offset_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), in__.scalar(), - "assigning variable offset_multiplier");} - current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - assign(offset_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain( - offset_multiplier[(sym1__ - 1)], 1, 2, lp__), - "assigning variable offset_multiplier"); - } else { - current_statement__ = 4; - assign(offset_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain( - offset_multiplier[(sym1__ - 1)], 1, 2), - "assigning variable offset_multiplier"); - }} + assign(offset_multiplier, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + 1, 2, lp__, 5), "assigning variable offset_multiplier"); std::vector no_offset_multiplier; no_offset_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 5; - assign(no_offset_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), in__.scalar(), - "assigning variable no_offset_multiplier");} - current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 5; - if (jacobian__) { - current_statement__ = 5; - assign(no_offset_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain( - no_offset_multiplier[(sym1__ - 1)], 0, 2, lp__), - "assigning variable no_offset_multiplier"); - } else { - current_statement__ = 5; - assign(no_offset_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain( - no_offset_multiplier[(sym1__ - 1)], 0, 2), - "assigning variable no_offset_multiplier"); - }} + assign(no_offset_multiplier, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + 0, 2, lp__, 5), "assigning variable no_offset_multiplier"); std::vector offset_no_multiplier; offset_no_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 6; - assign(offset_no_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), in__.scalar(), - "assigning variable offset_no_multiplier");} - current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 6; - if (jacobian__) { - current_statement__ = 6; - assign(offset_no_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain( - offset_no_multiplier[(sym1__ - 1)], 3, 1, lp__), - "assigning variable offset_no_multiplier"); - } else { - current_statement__ = 6; - assign(offset_no_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain( - offset_no_multiplier[(sym1__ - 1)], 3, 1), - "assigning variable offset_no_multiplier"); - }} + assign(offset_no_multiplier, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + 3, 1, lp__, 5), "assigning variable offset_no_multiplier"); std::vector p_real_1d_ar; p_real_1d_ar = std::vector(N, DUMMY_VAR__); current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 7; - assign(p_real_1d_ar, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_real_1d_ar");} - current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 7; - if (jacobian__) { - current_statement__ = 7; - assign(p_real_1d_ar, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(p_real_1d_ar[(sym1__ - 1)], 0, lp__), - "assigning variable p_real_1d_ar"); - } else { - current_statement__ = 7; - assign(p_real_1d_ar, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(p_real_1d_ar[(sym1__ - 1)], 0), - "assigning variable p_real_1d_ar"); - }} + assign(p_real_1d_ar, nil_index_list(), + in__.read_lb, jacobian__>(0, lp__, N), + "assigning variable p_real_1d_ar"); std::vector>> p_real_3d_ar; p_real_3d_ar = std::vector>>(N, std::vector>(M, std::vector(K, DUMMY_VAR__))); current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 8; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 8; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 8; - assign(p_real_3d_ar, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.scalar(), "assigning variable p_real_3d_ar");}}} - current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 8; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 8; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 8; - if (jacobian__) { - current_statement__ = 8; - assign(p_real_3d_ar, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::lb_constrain( - p_real_3d_ar[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], 0, - lp__), "assigning variable p_real_3d_ar"); - } else { - current_statement__ = 8; - assign(p_real_3d_ar, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::lb_constrain( - p_real_3d_ar[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], 0), - "assigning variable p_real_3d_ar"); - }}}} + assign(p_real_3d_ar, nil_index_list(), + in__.read_lb>>, jacobian__>( + 0, lp__, N, M, K), "assigning variable p_real_3d_ar"); Eigen::Matrix p_vec; p_vec = Eigen::Matrix(N); stan::math::fill(p_vec, DUMMY_VAR__); current_statement__ = 9; - p_vec = in__.vector(N); - current_statement__ = 9; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 9; - if (jacobian__) { - current_statement__ = 9; - assign(p_vec, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(p_vec[(sym1__ - 1)], 0, lp__), - "assigning variable p_vec"); - } else { - current_statement__ = 9; - assign(p_vec, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(p_vec[(sym1__ - 1)], 0), - "assigning variable p_vec"); - }} + assign(p_vec, nil_index_list(), + in__.read_lb, jacobian__>(0, + lp__, N), "assigning variable p_vec"); std::vector> p_1d_vec; p_1d_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_vec, DUMMY_VAR__); current_statement__ = 10; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 10; - assign(p_1d_vec, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(N), "assigning variable p_1d_vec");} + assign(p_1d_vec, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable p_1d_vec"); std::vector>>> p_3d_vec; p_3d_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_vec, DUMMY_VAR__); current_statement__ = 11; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 11; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 11; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 11; - assign(p_3d_vec, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.vector(N), "assigning variable p_3d_vec");}}} + assign(p_3d_vec, nil_index_list(), + in__.read>>>, jacobian__>( + lp__, N, M, K, N), "assigning variable p_3d_vec"); Eigen::Matrix p_row_vec; p_row_vec = Eigen::Matrix(N); stan::math::fill(p_row_vec, DUMMY_VAR__); current_statement__ = 12; - p_row_vec = in__.row_vector(N); + assign(p_row_vec, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable p_row_vec"); std::vector> p_1d_row_vec; p_1d_row_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_row_vec, DUMMY_VAR__); current_statement__ = 13; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 13; - assign(p_1d_row_vec, cons_list(index_uni(sym1__), nil_index_list()), - in__.row_vector(N), "assigning variable p_1d_row_vec");} + assign(p_1d_row_vec, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable p_1d_row_vec"); std::vector>>> p_3d_row_vec; p_3d_row_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_row_vec, DUMMY_VAR__); current_statement__ = 14; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 14; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 14; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 14; - assign(p_3d_row_vec, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.row_vector(N), "assigning variable p_3d_row_vec");}}} + assign(p_3d_row_vec, nil_index_list(), + in__.read>>>, jacobian__>( + lp__, N, M, K, N), "assigning variable p_3d_row_vec"); std::vector>> p_ar_mat; p_ar_mat = std::vector>>(4, std::vector>(5, Eigen::Matrix(2, 3))); stan::math::fill(p_ar_mat, DUMMY_VAR__); current_statement__ = 15; - for (int sym1__ = 1; sym1__ <= 4; ++sym1__) { - current_statement__ = 15; - for (int sym2__ = 1; sym2__ <= 5; ++sym2__) { - current_statement__ = 15; - assign(p_ar_mat, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.matrix(2, 3), "assigning variable p_ar_mat");}} - current_statement__ = 15; - for (int sym1__ = 1; sym1__ <= 4; ++sym1__) { - current_statement__ = 15; - for (int sym2__ = 1; sym2__ <= 5; ++sym2__) { - current_statement__ = 15; - for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { - current_statement__ = 15; - for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 15; - if (jacobian__) { - current_statement__ = 15; - assign(p_ar_mat, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), - cons_list(index_uni(sym4__), nil_index_list())))), - stan::math::lub_constrain( - rvalue(p_ar_mat, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), - cons_list(index_uni(sym4__), nil_index_list())))), - "p_ar_mat"), 0, 1, lp__), "assigning variable p_ar_mat"); - } else { - current_statement__ = 15; - assign(p_ar_mat, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), - cons_list(index_uni(sym4__), nil_index_list())))), - stan::math::lub_constrain( - rvalue(p_ar_mat, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), - cons_list(index_uni(sym4__), nil_index_list())))), - "p_ar_mat"), 0, 1), "assigning variable p_ar_mat"); - }}}}} + assign(p_ar_mat, nil_index_list(), + in__.read_lub>>, jacobian__>( + 0, 1, lp__, 4, 5, 2, 3), "assigning variable p_ar_mat"); Eigen::Matrix p_simplex; p_simplex = Eigen::Matrix(N); stan::math::fill(p_simplex, DUMMY_VAR__); - Eigen::Matrix p_simplex_in__; - p_simplex_in__ = Eigen::Matrix((N - 1)); - stan::math::fill(p_simplex_in__, DUMMY_VAR__); - - current_statement__ = 16; - p_simplex_in__ = in__.vector((N - 1)); current_statement__ = 16; - if (jacobian__) { - current_statement__ = 16; - assign(p_simplex, nil_index_list(), - stan::math::simplex_constrain(p_simplex_in__, lp__), - "assigning variable p_simplex"); - } else { - current_statement__ = 16; - assign(p_simplex, nil_index_list(), - stan::math::simplex_constrain(p_simplex_in__), - "assigning variable p_simplex"); - } + assign(p_simplex, nil_index_list(), + in__.read_simplex, jacobian__>( + lp__, N), "assigning variable p_simplex"); std::vector> p_1d_simplex; p_1d_simplex = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_simplex, DUMMY_VAR__); - std::vector> p_1d_simplex_in__; - p_1d_simplex_in__ = std::vector>(N, Eigen::Matrix( - (N - 1))); - stan::math::fill(p_1d_simplex_in__, DUMMY_VAR__); - - current_statement__ = 17; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 17; - assign(p_1d_simplex_in__, - cons_list(index_uni(sym1__), nil_index_list()), - in__.vector((N - 1)), "assigning variable p_1d_simplex_in__");} current_statement__ = 17; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 17; - if (jacobian__) { - current_statement__ = 17; - assign(p_1d_simplex, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::simplex_constrain(p_1d_simplex_in__[(sym1__ - 1)], - lp__), "assigning variable p_1d_simplex"); - } else { - current_statement__ = 17; - assign(p_1d_simplex, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::simplex_constrain(p_1d_simplex_in__[(sym1__ - 1)]), - "assigning variable p_1d_simplex"); - }} + assign(p_1d_simplex, nil_index_list(), + in__.read_simplex>, jacobian__>( + lp__, N, N), "assigning variable p_1d_simplex"); std::vector>>> p_3d_simplex; p_3d_simplex = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_simplex, DUMMY_VAR__); - std::vector>>> p_3d_simplex_in__; - p_3d_simplex_in__ = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix( - (N - 1))))); - stan::math::fill(p_3d_simplex_in__, DUMMY_VAR__); - - current_statement__ = 18; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 18; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 18; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 18; - assign(p_3d_simplex_in__, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.vector((N - 1)), "assigning variable p_3d_simplex_in__");} - }} current_statement__ = 18; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 18; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 18; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 18; - if (jacobian__) { - current_statement__ = 18; - assign(p_3d_simplex, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::simplex_constrain( - p_3d_simplex_in__[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], - lp__), "assigning variable p_3d_simplex"); - } else { - current_statement__ = 18; - assign(p_3d_simplex, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::simplex_constrain( - p_3d_simplex_in__[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]), - "assigning variable p_3d_simplex"); - }}}} + assign(p_3d_simplex, nil_index_list(), + in__.read_simplex>>>, jacobian__>( + lp__, N, M, K, N), "assigning variable p_3d_simplex"); Eigen::Matrix p_cfcov_54; p_cfcov_54 = Eigen::Matrix(5, 4); stan::math::fill(p_cfcov_54, DUMMY_VAR__); - Eigen::Matrix p_cfcov_54_in__; - p_cfcov_54_in__ = Eigen::Matrix(((((4 * - (4 - 1)) - / 2) + 4) - + - ((5 - 4) * - 4))); - stan::math::fill(p_cfcov_54_in__, DUMMY_VAR__); - current_statement__ = 19; - p_cfcov_54_in__ = in__.vector( - ((((4 * (4 - 1)) / 2) + 4) + ((5 - 4) * 4))); - current_statement__ = 19; - if (jacobian__) { - current_statement__ = 19; - assign(p_cfcov_54, nil_index_list(), - stan::math::cholesky_factor_constrain(p_cfcov_54_in__, 5, 4, lp__), - "assigning variable p_cfcov_54"); - } else { - current_statement__ = 19; - assign(p_cfcov_54, nil_index_list(), - stan::math::cholesky_factor_constrain(p_cfcov_54_in__, 5, 4), - "assigning variable p_cfcov_54"); - } + assign(p_cfcov_54, nil_index_list(), + in__.read_cholesky_factor, jacobian__>( + lp__, 5, 4), "assigning variable p_cfcov_54"); Eigen::Matrix p_cfcov_33; p_cfcov_33 = Eigen::Matrix(3, 3); stan::math::fill(p_cfcov_33, DUMMY_VAR__); - Eigen::Matrix p_cfcov_33_in__; - p_cfcov_33_in__ = Eigen::Matrix(((((3 * - (3 - 1)) - / 2) + 3) - + - ((3 - 3) * - 3))); - stan::math::fill(p_cfcov_33_in__, DUMMY_VAR__); - - current_statement__ = 20; - p_cfcov_33_in__ = in__.vector( - ((((3 * (3 - 1)) / 2) + 3) + ((3 - 3) * 3))); current_statement__ = 20; - if (jacobian__) { - current_statement__ = 20; - assign(p_cfcov_33, nil_index_list(), - stan::math::cholesky_factor_constrain(p_cfcov_33_in__, 3, 3, lp__), - "assigning variable p_cfcov_33"); - } else { - current_statement__ = 20; - assign(p_cfcov_33, nil_index_list(), - stan::math::cholesky_factor_constrain(p_cfcov_33_in__, 3, 3), - "assigning variable p_cfcov_33"); - } + assign(p_cfcov_33, nil_index_list(), + in__.read_cholesky_factor, jacobian__>( + lp__, 3, 3), "assigning variable p_cfcov_33"); std::vector> p_cfcov_33_ar; p_cfcov_33_ar = std::vector>(K, Eigen::Matrix(3, 3)); stan::math::fill(p_cfcov_33_ar, DUMMY_VAR__); - std::vector> p_cfcov_33_ar_in__; - p_cfcov_33_ar_in__ = std::vector>(K, Eigen::Matrix( - ((((3 * (3 - 1)) / 2) + 3) + ((3 - 3) * 3)))); - stan::math::fill(p_cfcov_33_ar_in__, DUMMY_VAR__); - - current_statement__ = 21; - for (int sym1__ = 1; sym1__ <= K; ++sym1__) { - current_statement__ = 21; - assign(p_cfcov_33_ar_in__, - cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(((((3 * (3 - 1)) / 2) + 3) + ((3 - 3) * 3))), - "assigning variable p_cfcov_33_ar_in__");} current_statement__ = 21; - for (int sym1__ = 1; sym1__ <= K; ++sym1__) { - current_statement__ = 21; - if (jacobian__) { - current_statement__ = 21; - assign(p_cfcov_33_ar, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::cholesky_factor_constrain( - p_cfcov_33_ar_in__[(sym1__ - 1)], 3, 3, lp__), - "assigning variable p_cfcov_33_ar"); - } else { - current_statement__ = 21; - assign(p_cfcov_33_ar, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::cholesky_factor_constrain( - p_cfcov_33_ar_in__[(sym1__ - 1)], 3, 3), - "assigning variable p_cfcov_33_ar"); - }} + assign(p_cfcov_33_ar, nil_index_list(), + in__.read_cholesky_factor>, jacobian__>( + lp__, K, 3, 3), "assigning variable p_cfcov_33_ar"); Eigen::Matrix x_p; x_p = Eigen::Matrix(2); stan::math::fill(x_p, DUMMY_VAR__); current_statement__ = 22; - x_p = in__.vector(2); + assign(x_p, nil_index_list(), + in__.read, jacobian__>(lp__, + 2), "assigning variable x_p"); Eigen::Matrix y_p; y_p = Eigen::Matrix(2); stan::math::fill(y_p, DUMMY_VAR__); current_statement__ = 23; - y_p = in__.vector(2); + assign(y_p, nil_index_list(), + in__.read, jacobian__>(lp__, + 2), "assigning variable y_p"); std::vector tp_real_1d_ar; tp_real_1d_ar = std::vector(N, DUMMY_VAR__); @@ -7236,363 +6887,172 @@ class mother_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.scalar(); + p_real = in__.read(lp__); double p_upper; p_upper = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - p_upper = in__.scalar(); - current_statement__ = 2; - p_upper = stan::math::lb_constrain(p_upper, p_real); + p_upper = in__.read_lb(p_real, lp__); double p_lower; p_lower = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - p_lower = in__.scalar(); - current_statement__ = 3; - p_lower = stan::math::ub_constrain(p_lower, p_upper); + p_lower = in__.read_ub(p_upper, lp__); std::vector offset_multiplier; offset_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 4; - assign(offset_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), in__.scalar(), - "assigning variable offset_multiplier");} - current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 4; - assign(offset_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain( - offset_multiplier[(sym1__ - 1)], 1, 2), - "assigning variable offset_multiplier");} + assign(offset_multiplier, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + 1, 2, lp__, 5), "assigning variable offset_multiplier"); std::vector no_offset_multiplier; no_offset_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 5; - assign(no_offset_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), in__.scalar(), - "assigning variable no_offset_multiplier");} - current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 5; - assign(no_offset_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain( - no_offset_multiplier[(sym1__ - 1)], 0, 2), - "assigning variable no_offset_multiplier");} + assign(no_offset_multiplier, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + 0, 2, lp__, 5), "assigning variable no_offset_multiplier"); std::vector offset_no_multiplier; offset_no_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 6; - assign(offset_no_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), in__.scalar(), - "assigning variable offset_no_multiplier");} - current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= 5; ++sym1__) { - current_statement__ = 6; - assign(offset_no_multiplier, - cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain( - offset_no_multiplier[(sym1__ - 1)], 3, 1), - "assigning variable offset_no_multiplier");} + assign(offset_no_multiplier, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + 3, 1, lp__, 5), "assigning variable offset_no_multiplier"); std::vector p_real_1d_ar; p_real_1d_ar = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 7; - assign(p_real_1d_ar, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_real_1d_ar");} - current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 7; - assign(p_real_1d_ar, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(p_real_1d_ar[(sym1__ - 1)], 0), - "assigning variable p_real_1d_ar");} + assign(p_real_1d_ar, nil_index_list(), + in__.read_lb, jacobian__>(0, lp__, N), + "assigning variable p_real_1d_ar"); std::vector>> p_real_3d_ar; p_real_3d_ar = std::vector>>(N, std::vector>(M, std::vector(K, std::numeric_limits::quiet_NaN()))); current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 8; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 8; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 8; - assign(p_real_3d_ar, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.scalar(), "assigning variable p_real_3d_ar");}}} - current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 8; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 8; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 8; - assign(p_real_3d_ar, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::lb_constrain( - p_real_3d_ar[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], 0), - "assigning variable p_real_3d_ar");}}} + assign(p_real_3d_ar, nil_index_list(), + in__.read_lb>>, jacobian__>( + 0, lp__, N, M, K), "assigning variable p_real_3d_ar"); Eigen::Matrix p_vec; p_vec = Eigen::Matrix(N); stan::math::fill(p_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 9; - p_vec = in__.vector(N); - current_statement__ = 9; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 9; - assign(p_vec, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(p_vec[(sym1__ - 1)], 0), - "assigning variable p_vec");} + assign(p_vec, nil_index_list(), + in__.read_lb, jacobian__>(0, + lp__, N), "assigning variable p_vec"); std::vector> p_1d_vec; p_1d_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 10; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 10; - assign(p_1d_vec, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(N), "assigning variable p_1d_vec");} + assign(p_1d_vec, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable p_1d_vec"); std::vector>>> p_3d_vec; p_3d_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 11; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 11; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 11; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 11; - assign(p_3d_vec, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.vector(N), "assigning variable p_3d_vec");}}} + assign(p_3d_vec, nil_index_list(), + in__.read>>>, jacobian__>( + lp__, N, M, K, N), "assigning variable p_3d_vec"); Eigen::Matrix p_row_vec; p_row_vec = Eigen::Matrix(N); stan::math::fill(p_row_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 12; - p_row_vec = in__.row_vector(N); + assign(p_row_vec, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable p_row_vec"); std::vector> p_1d_row_vec; p_1d_row_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_row_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 13; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 13; - assign(p_1d_row_vec, cons_list(index_uni(sym1__), nil_index_list()), - in__.row_vector(N), "assigning variable p_1d_row_vec");} + assign(p_1d_row_vec, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable p_1d_row_vec"); std::vector>>> p_3d_row_vec; p_3d_row_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_row_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 14; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 14; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 14; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 14; - assign(p_3d_row_vec, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.row_vector(N), "assigning variable p_3d_row_vec");}}} + assign(p_3d_row_vec, nil_index_list(), + in__.read>>>, jacobian__>( + lp__, N, M, K, N), "assigning variable p_3d_row_vec"); std::vector>> p_ar_mat; p_ar_mat = std::vector>>(4, std::vector>(5, Eigen::Matrix(2, 3))); stan::math::fill(p_ar_mat, std::numeric_limits::quiet_NaN()); current_statement__ = 15; - for (int sym1__ = 1; sym1__ <= 4; ++sym1__) { - current_statement__ = 15; - for (int sym2__ = 1; sym2__ <= 5; ++sym2__) { - current_statement__ = 15; - assign(p_ar_mat, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.matrix(2, 3), "assigning variable p_ar_mat");}} - current_statement__ = 15; - for (int sym1__ = 1; sym1__ <= 4; ++sym1__) { - current_statement__ = 15; - for (int sym2__ = 1; sym2__ <= 5; ++sym2__) { - current_statement__ = 15; - for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { - current_statement__ = 15; - for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 15; - assign(p_ar_mat, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), - cons_list(index_uni(sym4__), nil_index_list())))), - stan::math::lub_constrain( - rvalue(p_ar_mat, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), - cons_list(index_uni(sym4__), nil_index_list())))), - "p_ar_mat"), 0, 1), "assigning variable p_ar_mat");}}}} + assign(p_ar_mat, nil_index_list(), + in__.read_lub>>, jacobian__>( + 0, 1, lp__, 4, 5, 2, 3), "assigning variable p_ar_mat"); Eigen::Matrix p_simplex; p_simplex = Eigen::Matrix(N); stan::math::fill(p_simplex, std::numeric_limits::quiet_NaN()); - Eigen::Matrix p_simplex_in__; - p_simplex_in__ = Eigen::Matrix((N - 1)); - stan::math::fill(p_simplex_in__, DUMMY_VAR__); - - current_statement__ = 16; - p_simplex_in__ = in__.vector((N - 1)); current_statement__ = 16; assign(p_simplex, nil_index_list(), - stan::math::simplex_constrain(p_simplex_in__), - "assigning variable p_simplex"); + in__.read_simplex, jacobian__>( + lp__, N), "assigning variable p_simplex"); std::vector> p_1d_simplex; p_1d_simplex = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_simplex, std::numeric_limits::quiet_NaN()); - std::vector> p_1d_simplex_in__; - p_1d_simplex_in__ = std::vector>(N, Eigen::Matrix( - (N - 1))); - stan::math::fill(p_1d_simplex_in__, DUMMY_VAR__); - - current_statement__ = 17; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 17; - assign(p_1d_simplex_in__, - cons_list(index_uni(sym1__), nil_index_list()), - in__.vector((N - 1)), "assigning variable p_1d_simplex_in__");} current_statement__ = 17; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 17; - assign(p_1d_simplex, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::simplex_constrain(p_1d_simplex_in__[(sym1__ - 1)]), - "assigning variable p_1d_simplex");} + assign(p_1d_simplex, nil_index_list(), + in__.read_simplex>, jacobian__>( + lp__, N, N), "assigning variable p_1d_simplex"); std::vector>>> p_3d_simplex; p_3d_simplex = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_simplex, std::numeric_limits::quiet_NaN()); - std::vector>>> p_3d_simplex_in__; - p_3d_simplex_in__ = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix( - (N - 1))))); - stan::math::fill(p_3d_simplex_in__, DUMMY_VAR__); - - current_statement__ = 18; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 18; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 18; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 18; - assign(p_3d_simplex_in__, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.vector((N - 1)), "assigning variable p_3d_simplex_in__");} - }} current_statement__ = 18; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 18; - for (int sym2__ = 1; sym2__ <= M; ++sym2__) { - current_statement__ = 18; - for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 18; - assign(p_3d_simplex, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::simplex_constrain( - p_3d_simplex_in__[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]), - "assigning variable p_3d_simplex");}}} + assign(p_3d_simplex, nil_index_list(), + in__.read_simplex>>>, jacobian__>( + lp__, N, M, K, N), "assigning variable p_3d_simplex"); Eigen::Matrix p_cfcov_54; p_cfcov_54 = Eigen::Matrix(5, 4); stan::math::fill(p_cfcov_54, std::numeric_limits::quiet_NaN()); - Eigen::Matrix p_cfcov_54_in__; - p_cfcov_54_in__ = Eigen::Matrix(((((4 * - (4 - 1)) - / 2) + 4) - + - ((5 - 4) * - 4))); - stan::math::fill(p_cfcov_54_in__, DUMMY_VAR__); - - current_statement__ = 19; - p_cfcov_54_in__ = in__.vector( - ((((4 * (4 - 1)) / 2) + 4) + ((5 - 4) * 4))); current_statement__ = 19; assign(p_cfcov_54, nil_index_list(), - stan::math::cholesky_factor_constrain(p_cfcov_54_in__, 5, 4), - "assigning variable p_cfcov_54"); + in__.read_cholesky_factor, jacobian__>( + lp__, 5, 4), "assigning variable p_cfcov_54"); Eigen::Matrix p_cfcov_33; p_cfcov_33 = Eigen::Matrix(3, 3); stan::math::fill(p_cfcov_33, std::numeric_limits::quiet_NaN()); - Eigen::Matrix p_cfcov_33_in__; - p_cfcov_33_in__ = Eigen::Matrix(((((3 * - (3 - 1)) - / 2) + 3) - + - ((3 - 3) * - 3))); - stan::math::fill(p_cfcov_33_in__, DUMMY_VAR__); - - current_statement__ = 20; - p_cfcov_33_in__ = in__.vector( - ((((3 * (3 - 1)) / 2) + 3) + ((3 - 3) * 3))); current_statement__ = 20; assign(p_cfcov_33, nil_index_list(), - stan::math::cholesky_factor_constrain(p_cfcov_33_in__, 3, 3), - "assigning variable p_cfcov_33"); + in__.read_cholesky_factor, jacobian__>( + lp__, 3, 3), "assigning variable p_cfcov_33"); std::vector> p_cfcov_33_ar; p_cfcov_33_ar = std::vector>(K, Eigen::Matrix(3, 3)); stan::math::fill(p_cfcov_33_ar, std::numeric_limits::quiet_NaN()); - std::vector> p_cfcov_33_ar_in__; - p_cfcov_33_ar_in__ = std::vector>(K, Eigen::Matrix( - ((((3 * (3 - 1)) / 2) + 3) + ((3 - 3) * 3)))); - stan::math::fill(p_cfcov_33_ar_in__, DUMMY_VAR__); - - current_statement__ = 21; - for (int sym1__ = 1; sym1__ <= K; ++sym1__) { - current_statement__ = 21; - assign(p_cfcov_33_ar_in__, - cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(((((3 * (3 - 1)) / 2) + 3) + ((3 - 3) * 3))), - "assigning variable p_cfcov_33_ar_in__");} current_statement__ = 21; - for (int sym1__ = 1; sym1__ <= K; ++sym1__) { - current_statement__ = 21; - assign(p_cfcov_33_ar, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::cholesky_factor_constrain( - p_cfcov_33_ar_in__[(sym1__ - 1)], 3, 3), - "assigning variable p_cfcov_33_ar");} + assign(p_cfcov_33_ar, nil_index_list(), + in__.read_cholesky_factor>, jacobian__>( + lp__, K, 3, 3), "assigning variable p_cfcov_33_ar"); Eigen::Matrix x_p; x_p = Eigen::Matrix(2); stan::math::fill(x_p, std::numeric_limits::quiet_NaN()); current_statement__ = 22; - x_p = in__.vector(2); + assign(x_p, nil_index_list(), + in__.read, jacobian__>(lp__, + 2), "assigning variable x_p"); Eigen::Matrix y_p; y_p = Eigen::Matrix(2); stan::math::fill(y_p, std::numeric_limits::quiet_NaN()); current_statement__ = 23; - y_p = in__.vector(2); + assign(y_p, nil_index_list(), + in__.read, jacobian__>(lp__, + 2), "assigning variable y_p"); std::vector tp_real_1d_ar; tp_real_1d_ar = std::vector(N, std::numeric_limits::quiet_NaN()); @@ -11353,52 +10813,52 @@ class motherHOF_model final : public model_base_crtp { y0_p = std::vector(2, DUMMY_VAR__); current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - current_statement__ = 1; - assign(y0_p, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y0_p");} + assign(y0_p, nil_index_list(), + in__.read, jacobian__>(lp__, 2), + "assigning variable y0_p"); std::vector theta_p; theta_p = std::vector(1, DUMMY_VAR__); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= 1; ++sym1__) { - current_statement__ = 2; - assign(theta_p, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable theta_p");} + assign(theta_p, nil_index_list(), + in__.read, jacobian__>(lp__, 1), + "assigning variable theta_p"); std::vector x_p; x_p = std::vector(1, DUMMY_VAR__); current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= 1; ++sym1__) { - current_statement__ = 3; - assign(x_p, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable x_p");} + assign(x_p, nil_index_list(), + in__.read, jacobian__>(lp__, 1), + "assigning variable x_p"); Eigen::Matrix x_p_v; x_p_v = Eigen::Matrix(2); stan::math::fill(x_p_v, DUMMY_VAR__); current_statement__ = 4; - x_p_v = in__.vector(2); + assign(x_p_v, nil_index_list(), + in__.read, jacobian__>(lp__, + 2), "assigning variable x_p_v"); Eigen::Matrix shared_params_p; shared_params_p = Eigen::Matrix(3); stan::math::fill(shared_params_p, DUMMY_VAR__); current_statement__ = 5; - shared_params_p = in__.vector(3); + assign(shared_params_p, nil_index_list(), + in__.read, jacobian__>(lp__, + 3), "assigning variable shared_params_p"); std::vector> job_params_p; job_params_p = std::vector>(3, Eigen::Matrix(3)); stan::math::fill(job_params_p, DUMMY_VAR__); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - current_statement__ = 6; - assign(job_params_p, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(3), "assigning variable job_params_p");} + assign(job_params_p, nil_index_list(), + in__.read>, jacobian__>( + lp__, 3, 3), "assigning variable job_params_p"); local_scalar_t__ x_r; x_r = DUMMY_VAR__; current_statement__ = 7; - x_r = in__.scalar(); + x_r = in__.read(lp__); local_scalar_t__ abc1_p; abc1_p = DUMMY_VAR__; @@ -11697,52 +11157,52 @@ class motherHOF_model final : public model_base_crtp { y0_p = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - current_statement__ = 1; - assign(y0_p, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y0_p");} + assign(y0_p, nil_index_list(), + in__.read, jacobian__>(lp__, 2), + "assigning variable y0_p"); std::vector theta_p; theta_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= 1; ++sym1__) { - current_statement__ = 2; - assign(theta_p, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable theta_p");} + assign(theta_p, nil_index_list(), + in__.read, jacobian__>(lp__, 1), + "assigning variable theta_p"); std::vector x_p; x_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= 1; ++sym1__) { - current_statement__ = 3; - assign(x_p, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable x_p");} + assign(x_p, nil_index_list(), + in__.read, jacobian__>(lp__, 1), + "assigning variable x_p"); Eigen::Matrix x_p_v; x_p_v = Eigen::Matrix(2); stan::math::fill(x_p_v, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - x_p_v = in__.vector(2); + assign(x_p_v, nil_index_list(), + in__.read, jacobian__>(lp__, + 2), "assigning variable x_p_v"); Eigen::Matrix shared_params_p; shared_params_p = Eigen::Matrix(3); stan::math::fill(shared_params_p, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - shared_params_p = in__.vector(3); + assign(shared_params_p, nil_index_list(), + in__.read, jacobian__>(lp__, + 3), "assigning variable shared_params_p"); std::vector> job_params_p; job_params_p = std::vector>(3, Eigen::Matrix(3)); stan::math::fill(job_params_p, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - current_statement__ = 6; - assign(job_params_p, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(3), "assigning variable job_params_p");} + assign(job_params_p, nil_index_list(), + in__.read>, jacobian__>( + lp__, 3, 3), "assigning variable job_params_p"); double x_r; x_r = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - x_r = in__.scalar(); + x_r = in__.read(lp__); double abc1_p; abc1_p = std::numeric_limits::quiet_NaN(); @@ -13634,21 +13094,22 @@ class new_integrate_interface_model final : public model_base_crtp(lp__); std::vector ra; ra = std::vector(N, DUMMY_VAR__); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 2; - assign(ra, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable ra");} + assign(ra, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable ra"); Eigen::Matrix v; v = Eigen::Matrix(N); stan::math::fill(v, DUMMY_VAR__); current_statement__ = 3; - v = in__.vector(N); + assign(v, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable v"); std::vector> z; z = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(z, DUMMY_VAR__); @@ -15280,21 +14741,22 @@ class new_integrate_interface_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - r = in__.scalar(); + r = in__.read(lp__); std::vector ra; ra = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 2; - assign(ra, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable ra");} + assign(ra, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable ra"); Eigen::Matrix v; v = Eigen::Matrix(N); stan::math::fill(v, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - v = in__.vector(N); + assign(v, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable v"); std::vector> z; z = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(z, std::numeric_limits::quiet_NaN()); @@ -17438,98 +16900,36 @@ class old_integrate_interface_model final : public model_base_crtp(0, lp__); local_scalar_t__ beta; beta = DUMMY_VAR__; current_statement__ = 2; - beta = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - beta = stan::math::lb_constrain(beta, 0, lp__); - } else { - current_statement__ = 2; - beta = stan::math::lb_constrain(beta, 0); - } + beta = in__.read_lb(0, lp__); local_scalar_t__ gamma; gamma = DUMMY_VAR__; current_statement__ = 3; - gamma = in__.scalar(); - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - gamma = stan::math::lb_constrain(gamma, 0, lp__); - } else { - current_statement__ = 3; - gamma = stan::math::lb_constrain(gamma, 0); - } + gamma = in__.read_lb(0, lp__); local_scalar_t__ delta; delta = DUMMY_VAR__; current_statement__ = 4; - delta = in__.scalar(); - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - delta = stan::math::lb_constrain(delta, 0, lp__); - } else { - current_statement__ = 4; - delta = stan::math::lb_constrain(delta, 0); - } + delta = in__.read_lb(0, lp__); std::vector z_init; z_init = std::vector(2, DUMMY_VAR__); current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - current_statement__ = 5; - assign(z_init, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable z_init");} - current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - current_statement__ = 5; - if (jacobian__) { - current_statement__ = 5; - assign(z_init, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(z_init[(sym1__ - 1)], 0, lp__), - "assigning variable z_init"); - } else { - current_statement__ = 5; - assign(z_init, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(z_init[(sym1__ - 1)], 0), - "assigning variable z_init"); - }} + assign(z_init, nil_index_list(), + in__.read_lb, jacobian__>(0, lp__, 2), + "assigning variable z_init"); std::vector sigma; sigma = std::vector(2, DUMMY_VAR__); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - current_statement__ = 6; - assign(sigma, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable sigma");} - current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - current_statement__ = 6; - if (jacobian__) { - current_statement__ = 6; - assign(sigma, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(sigma[(sym1__ - 1)], 0, lp__), - "assigning variable sigma"); - } else { - current_statement__ = 6; - assign(sigma, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(sigma[(sym1__ - 1)], 0), - "assigning variable sigma"); - }} + assign(sigma, nil_index_list(), + in__.read_lb, jacobian__>(0, lp__, 2), + "assigning variable sigma"); std::vector> z; z = std::vector>(N, std::vector(2, DUMMY_VAR__)); @@ -17602,58 +17002,36 @@ class old_integrate_interface_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - alpha = in__.scalar(); - current_statement__ = 1; - alpha = stan::math::lb_constrain(alpha, 0); + alpha = in__.read_lb(0, lp__); double beta; beta = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - beta = in__.scalar(); - current_statement__ = 2; - beta = stan::math::lb_constrain(beta, 0); + beta = in__.read_lb(0, lp__); double gamma; gamma = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - gamma = in__.scalar(); - current_statement__ = 3; - gamma = stan::math::lb_constrain(gamma, 0); + gamma = in__.read_lb(0, lp__); double delta; delta = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - delta = in__.scalar(); - current_statement__ = 4; - delta = stan::math::lb_constrain(delta, 0); + delta = in__.read_lb(0, lp__); std::vector z_init; z_init = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - current_statement__ = 5; - assign(z_init, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable z_init");} - current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - current_statement__ = 5; - assign(z_init, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(z_init[(sym1__ - 1)], 0), - "assigning variable z_init");} + assign(z_init, nil_index_list(), + in__.read_lb, jacobian__>(0, lp__, 2), + "assigning variable z_init"); std::vector sigma; sigma = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - current_statement__ = 6; - assign(sigma, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable sigma");} - current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - current_statement__ = 6; - assign(sigma, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(sigma[(sym1__ - 1)], 0), - "assigning variable sigma");} + assign(sigma, nil_index_list(), + in__.read_lb, jacobian__>(0, lp__, 2), + "assigning variable sigma"); std::vector> z; z = std::vector>(N, std::vector(2, std::numeric_limits::quiet_NaN())); @@ -18548,60 +17926,64 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, DUMMY_VAR__); current_statement__ = 1; - alpha_v = in__.vector(k); + assign(alpha_v, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - beta = in__.vector(k); + assign(beta, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, DUMMY_VAR__); current_statement__ = 3; - cuts = in__.vector(k); + assign(cuts, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable cuts"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; current_statement__ = 4; - sigma = in__.scalar(); - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - sigma = stan::math::lb_constrain(sigma, 0, lp__); - } else { - current_statement__ = 4; - sigma = stan::math::lb_constrain(sigma, 0); - } + sigma = in__.read_lb(0, lp__); local_scalar_t__ alpha; alpha = DUMMY_VAR__; current_statement__ = 5; - alpha = in__.scalar(); + alpha = in__.read(lp__); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 6; - phi = in__.scalar(); + phi = in__.read(lp__); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, DUMMY_VAR__); current_statement__ = 7; - X_p = in__.matrix(n, k); + assign(X_p, nil_index_list(), + in__.read, jacobian__>(lp__, + n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, DUMMY_VAR__); current_statement__ = 8; - beta_m = in__.matrix(n, k); + assign(beta_m, nil_index_list(), + in__.read, jacobian__>(lp__, + n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, DUMMY_VAR__); current_statement__ = 9; - X_rv_p = in__.row_vector(n); + assign(X_rv_p, nil_index_list(), + in__.read, jacobian__>(lp__, + n), "assigning variable X_rv_p"); { current_statement__ = 10; lp_accum__.add( @@ -19172,54 +18554,64 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - alpha_v = in__.vector(k); + assign(alpha_v, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - beta = in__.vector(k); + assign(beta, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - cuts = in__.vector(k); + assign(cuts, nil_index_list(), + in__.read, jacobian__>(lp__, + k), "assigning variable cuts"); double sigma; sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma = in__.scalar(); - current_statement__ = 4; - sigma = stan::math::lb_constrain(sigma, 0); + sigma = in__.read_lb(0, lp__); double alpha; alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - alpha = in__.scalar(); + alpha = in__.read(lp__); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - phi = in__.scalar(); + phi = in__.read(lp__); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - X_p = in__.matrix(n, k); + assign(X_p, nil_index_list(), + in__.read, jacobian__>(lp__, + n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - beta_m = in__.matrix(n, k); + assign(beta_m, nil_index_list(), + in__.read, jacobian__>(lp__, + n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, std::numeric_limits::quiet_NaN()); current_statement__ = 9; - X_rv_p = in__.row_vector(n); + assign(X_rv_p, nil_index_list(), + in__.read, jacobian__>(lp__, + n), "assigning variable X_rv_p"); for (int sym1__ = 1; sym1__ <= k; ++sym1__) { vars__.emplace_back(alpha_v[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= k; ++sym1__) { @@ -19795,59 +19187,22 @@ class param_constraint_model final : public model_base_crtp>(nt, Eigen::Matrix(2, 2)); stan::math::fill(L_Omega, DUMMY_VAR__); - std::vector> L_Omega_in__; - L_Omega_in__ = std::vector>(nt, Eigen::Matrix( - ((2 * (2 - 1)) / 2))); - stan::math::fill(L_Omega_in__, DUMMY_VAR__); - - current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= nt; ++sym1__) { - current_statement__ = 1; - assign(L_Omega_in__, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(((2 * (2 - 1)) / 2)), "assigning variable L_Omega_in__"); - } current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= nt; ++sym1__) { - current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - assign(L_Omega, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::cholesky_corr_constrain(L_Omega_in__[(sym1__ - 1)], - 2, lp__), "assigning variable L_Omega"); - } else { - current_statement__ = 1; - assign(L_Omega, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::cholesky_corr_constrain(L_Omega_in__[(sym1__ - 1)], 2), - "assigning variable L_Omega"); - }} + assign(L_Omega, nil_index_list(), + in__.read_cholesky_corr>, jacobian__>( + lp__, nt, 2, 2), "assigning variable L_Omega"); Eigen::Matrix z1; z1 = Eigen::Matrix(NS); stan::math::fill(z1, DUMMY_VAR__); current_statement__ = 2; - z1 = in__.vector(NS); - current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= NS; ++sym1__) { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(z1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(z1[(sym1__ - 1)], - rvalue(L_Omega, - cons_list(index_uni(1), - cons_list(index_uni(1), - cons_list(index_uni(2), nil_index_list()))), "L_Omega"), - lp__), "assigning variable z1"); - } else { - current_statement__ = 2; - assign(z1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(z1[(sym1__ - 1)], - rvalue(L_Omega, - cons_list(index_uni(1), - cons_list(index_uni(1), - cons_list(index_uni(2), nil_index_list()))), "L_Omega")), - "assigning variable z1"); - }} + assign(z1, nil_index_list(), + in__.read_lb, jacobian__>( + rvalue(L_Omega, + cons_list(index_uni(1), + cons_list(index_uni(1), + cons_list(index_uni(2), nil_index_list()))), "L_Omega"), + lp__, NS), "assigning variable z1"); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); // Next line prevents compiler griping about no return @@ -19879,39 +19234,22 @@ class param_constraint_model final : public model_base_crtp>(nt, Eigen::Matrix(2, 2)); stan::math::fill(L_Omega, std::numeric_limits::quiet_NaN()); - std::vector> L_Omega_in__; - L_Omega_in__ = std::vector>(nt, Eigen::Matrix( - ((2 * (2 - 1)) / 2))); - stan::math::fill(L_Omega_in__, DUMMY_VAR__); - - current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= nt; ++sym1__) { - current_statement__ = 1; - assign(L_Omega_in__, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(((2 * (2 - 1)) / 2)), "assigning variable L_Omega_in__"); - } current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= nt; ++sym1__) { - current_statement__ = 1; - assign(L_Omega, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::cholesky_corr_constrain(L_Omega_in__[(sym1__ - 1)], 2), - "assigning variable L_Omega");} + assign(L_Omega, nil_index_list(), + in__.read_cholesky_corr>, jacobian__>( + lp__, nt, 2, 2), "assigning variable L_Omega"); Eigen::Matrix z1; z1 = Eigen::Matrix(NS); stan::math::fill(z1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - z1 = in__.vector(NS); - current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= NS; ++sym1__) { - current_statement__ = 2; - assign(z1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(z1[(sym1__ - 1)], - rvalue(L_Omega, + assign(z1, nil_index_list(), + in__.read_lb, jacobian__>( + rvalue(L_Omega, + cons_list(index_uni(1), cons_list(index_uni(1), - cons_list(index_uni(1), - cons_list(index_uni(2), nil_index_list()))), "L_Omega")), - "assigning variable z1");} + cons_list(index_uni(2), nil_index_list()))), "L_Omega"), + lp__, NS), "assigning variable z1"); for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { for (int sym2__ = 1; sym2__ <= 2; ++sym2__) { for (int sym3__ = 1; sym3__ <= nt; ++sym3__) { @@ -20477,26 +19815,23 @@ class reduce_sum_m1_model final : public model_base_crtp { y1 = std::vector(N, DUMMY_VAR__); current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 1; - assign(y1, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y1");} + assign(y1, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable y1"); std::vector y2; y2 = std::vector(N, DUMMY_VAR__); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 2; - assign(y2, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y2");} + assign(y2, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable y2"); std::vector y3; y3 = std::vector(N, DUMMY_VAR__); current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 3; - assign(y3, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y3");} + assign(y3, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable y3"); { current_statement__ = 4; lp_accum__.add(reduce_sum(y1, 1, pstream__)); @@ -20540,26 +19875,23 @@ class reduce_sum_m1_model final : public model_base_crtp { y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 1; - assign(y1, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y1");} + assign(y1, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable y1"); std::vector y2; y2 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 2; - assign(y2, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y2");} + assign(y2, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable y2"); std::vector y3; y3 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 3; - assign(y3, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y3");} + assign(y3, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable y3"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { vars__.emplace_back(y1[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= N; ++sym1__) { @@ -22043,173 +21375,125 @@ class reduce_sum_m2_model final : public model_base_crtp { stan::math::fill(a8, DUMMY_VAR__); current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 1; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 1; - assign(a8, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.matrix(N, N), "assigning variable a8");}} + assign(a8, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N, N), "assigning variable a8"); std::vector>> a7; a7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a7, DUMMY_VAR__); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 2; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 2; - assign(a7, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.row_vector(N), "assigning variable a7");}} + assign(a7, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable a7"); std::vector>> a6; a6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a6, DUMMY_VAR__); current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 3; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 3; - assign(a6, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(N), "assigning variable a6");}} + assign(a6, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable a6"); std::vector> a5; a5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 4; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 4; - assign(a5, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), in__.scalar(), - "assigning variable a5");}} + assign(a5, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable a5"); std::vector> a4; a4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(a4, DUMMY_VAR__); current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 5; - assign(a4, cons_list(index_uni(sym1__), nil_index_list()), - in__.matrix(N, N), "assigning variable a4");} + assign(a4, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N, N), "assigning variable a4"); std::vector> a3; a3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a3, DUMMY_VAR__); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 6; - assign(a3, cons_list(index_uni(sym1__), nil_index_list()), - in__.row_vector(N), "assigning variable a3");} + assign(a3, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable a3"); std::vector> a2; a2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a2, DUMMY_VAR__); current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 7; - assign(a2, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(N), "assigning variable a2");} + assign(a2, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable a2"); std::vector a1; a1 = std::vector(N, DUMMY_VAR__); current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 8; - assign(a1, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable a1");} + assign(a1, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable a1"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, DUMMY_VAR__); current_statement__ = 9; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 9; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 9; - assign(y8, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.matrix(N, N), "assigning variable y8");}} + assign(y8, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N, N), "assigning variable y8"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, DUMMY_VAR__); current_statement__ = 10; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 10; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 10; - assign(y7, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.row_vector(N), "assigning variable y7");}} + assign(y7, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable y7"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, DUMMY_VAR__); current_statement__ = 11; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 11; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 11; - assign(y6, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(N), "assigning variable y6");}} + assign(y6, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable y6"); std::vector> y5; y5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 12; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 12; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 12; - assign(y5, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), in__.scalar(), - "assigning variable y5");}} + assign(y5, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y5"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, DUMMY_VAR__); current_statement__ = 13; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 13; - assign(y4, cons_list(index_uni(sym1__), nil_index_list()), - in__.matrix(N, N), "assigning variable y4");} + assign(y4, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N, N), "assigning variable y4"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, DUMMY_VAR__); current_statement__ = 14; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 14; - assign(y3, cons_list(index_uni(sym1__), nil_index_list()), - in__.row_vector(N), "assigning variable y3");} + assign(y3, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y3"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, DUMMY_VAR__); current_statement__ = 15; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 15; - assign(y2, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(N), "assigning variable y2");} + assign(y2, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y2"); std::vector y1; y1 = std::vector(N, DUMMY_VAR__); current_statement__ = 16; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 16; - assign(y1, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y1");} + assign(y1, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable y1"); { current_statement__ = 17; lp_accum__.add(reduce_sum(x, 1, pstream__, a8)); @@ -22276,173 +21560,125 @@ class reduce_sum_m2_model final : public model_base_crtp { stan::math::fill(a8, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 1; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 1; - assign(a8, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.matrix(N, N), "assigning variable a8");}} + assign(a8, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N, N), "assigning variable a8"); std::vector>> a7; a7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a7, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 2; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 2; - assign(a7, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.row_vector(N), "assigning variable a7");}} + assign(a7, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable a7"); std::vector>> a6; a6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a6, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 3; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 3; - assign(a6, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(N), "assigning variable a6");}} + assign(a6, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable a6"); std::vector> a5; a5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 4; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 4; - assign(a5, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), in__.scalar(), - "assigning variable a5");}} + assign(a5, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable a5"); std::vector> a4; a4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(a4, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 5; - assign(a4, cons_list(index_uni(sym1__), nil_index_list()), - in__.matrix(N, N), "assigning variable a4");} + assign(a4, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N, N), "assigning variable a4"); std::vector> a3; a3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a3, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 6; - assign(a3, cons_list(index_uni(sym1__), nil_index_list()), - in__.row_vector(N), "assigning variable a3");} + assign(a3, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable a3"); std::vector> a2; a2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a2, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 7; - assign(a2, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(N), "assigning variable a2");} + assign(a2, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable a2"); std::vector a1; a1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 8; - assign(a1, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable a1");} + assign(a1, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable a1"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, std::numeric_limits::quiet_NaN()); current_statement__ = 9; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 9; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 9; - assign(y8, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.matrix(N, N), "assigning variable y8");}} + assign(y8, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N, N), "assigning variable y8"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, std::numeric_limits::quiet_NaN()); current_statement__ = 10; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 10; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 10; - assign(y7, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.row_vector(N), "assigning variable y7");}} + assign(y7, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable y7"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, std::numeric_limits::quiet_NaN()); current_statement__ = 11; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 11; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 11; - assign(y6, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(N), "assigning variable y6");}} + assign(y6, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable y6"); std::vector> y5; y5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 12; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 12; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 12; - assign(y5, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), in__.scalar(), - "assigning variable y5");}} + assign(y5, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y5"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, std::numeric_limits::quiet_NaN()); current_statement__ = 13; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 13; - assign(y4, cons_list(index_uni(sym1__), nil_index_list()), - in__.matrix(N, N), "assigning variable y4");} + assign(y4, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N, N), "assigning variable y4"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, std::numeric_limits::quiet_NaN()); current_statement__ = 14; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 14; - assign(y3, cons_list(index_uni(sym1__), nil_index_list()), - in__.row_vector(N), "assigning variable y3");} + assign(y3, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y3"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, std::numeric_limits::quiet_NaN()); current_statement__ = 15; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 15; - assign(y2, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(N), "assigning variable y2");} + assign(y2, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y2"); std::vector y1; y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 16; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 16; - assign(y1, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y1");} + assign(y1, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable y1"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { for (int sym2__ = 1; sym2__ <= N; ++sym2__) { for (int sym3__ = 1; sym3__ <= N; ++sym3__) { @@ -26206,126 +25442,100 @@ class reduce_sum_m3_model final : public model_base_crtp { y1 = std::vector(N, DUMMY_VAR__); current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 1; - assign(y1, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y1");} + assign(y1, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable y1"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, DUMMY_VAR__); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 2; - assign(y2, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(N), "assigning variable y2");} + assign(y2, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y2"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, DUMMY_VAR__); current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 3; - assign(y3, cons_list(index_uni(sym1__), nil_index_list()), - in__.row_vector(N), "assigning variable y3");} + assign(y3, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y3"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, DUMMY_VAR__); current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 4; - assign(y4, cons_list(index_uni(sym1__), nil_index_list()), - in__.matrix(N, N), "assigning variable y4");} + assign(y4, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N, N), "assigning variable y4"); std::vector> y5; y5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 5; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 5; - assign(y5, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), in__.scalar(), - "assigning variable y5");}} + assign(y5, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y5"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, DUMMY_VAR__); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 6; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 6; - assign(y6, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(N), "assigning variable y6");}} + assign(y6, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable y6"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, DUMMY_VAR__); current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 7; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 7; - assign(y7, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.row_vector(N), "assigning variable y7");}} + assign(y7, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable y7"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, DUMMY_VAR__); current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 8; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 8; - assign(y8, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.matrix(N, N), "assigning variable y8");}} + assign(y8, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N, N), "assigning variable y8"); local_scalar_t__ y9; y9 = DUMMY_VAR__; current_statement__ = 9; - y9 = in__.scalar(); + y9 = in__.read(lp__); Eigen::Matrix y10; y10 = Eigen::Matrix(N); stan::math::fill(y10, DUMMY_VAR__); current_statement__ = 10; - y10 = in__.vector(N); + assign(y10, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable y10"); Eigen::Matrix y11; y11 = Eigen::Matrix(N); stan::math::fill(y11, DUMMY_VAR__); current_statement__ = 11; - y11 = in__.row_vector(N); + assign(y11, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable y11"); Eigen::Matrix y12; y12 = Eigen::Matrix(N, N); stan::math::fill(y12, DUMMY_VAR__); current_statement__ = 12; - y12 = in__.matrix(N, N); + assign(y12, nil_index_list(), + in__.read, jacobian__>(lp__, + N, N), "assigning variable y12"); std::vector>> y17; y17 = std::vector>>(N, std::vector>(N, std::vector(N, DUMMY_VAR__))); current_statement__ = 13; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 13; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 13; - for (int sym3__ = 1; sym3__ <= N; ++sym3__) { - current_statement__ = 13; - assign(y17, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.scalar(), "assigning variable y17");}}} + assign(y17, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable y17"); { local_scalar_t__ t1; t1 = DUMMY_VAR__; @@ -26496,126 +25706,100 @@ class reduce_sum_m3_model final : public model_base_crtp { y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 1; - assign(y1, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable y1");} + assign(y1, nil_index_list(), + in__.read, jacobian__>(lp__, N), + "assigning variable y1"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 2; - assign(y2, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(N), "assigning variable y2");} + assign(y2, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y2"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 3; - assign(y3, cons_list(index_uni(sym1__), nil_index_list()), - in__.row_vector(N), "assigning variable y3");} + assign(y3, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y3"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 4; - assign(y4, cons_list(index_uni(sym1__), nil_index_list()), - in__.matrix(N, N), "assigning variable y4");} + assign(y4, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N, N), "assigning variable y4"); std::vector> y5; y5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 5; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 5; - assign(y5, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), in__.scalar(), - "assigning variable y5");}} + assign(y5, nil_index_list(), + in__.read>, jacobian__>( + lp__, N, N), "assigning variable y5"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 6; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 6; - assign(y6, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(N), "assigning variable y6");}} + assign(y6, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable y6"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 7; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 7; - assign(y7, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.row_vector(N), "assigning variable y7");}} + assign(y7, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable y7"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 8; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 8; - assign(y8, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.matrix(N, N), "assigning variable y8");}} + assign(y8, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N, N), "assigning variable y8"); double y9; y9 = std::numeric_limits::quiet_NaN(); current_statement__ = 9; - y9 = in__.scalar(); + y9 = in__.read(lp__); Eigen::Matrix y10; y10 = Eigen::Matrix(N); stan::math::fill(y10, std::numeric_limits::quiet_NaN()); current_statement__ = 10; - y10 = in__.vector(N); + assign(y10, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable y10"); Eigen::Matrix y11; y11 = Eigen::Matrix(N); stan::math::fill(y11, std::numeric_limits::quiet_NaN()); current_statement__ = 11; - y11 = in__.row_vector(N); + assign(y11, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable y11"); Eigen::Matrix y12; y12 = Eigen::Matrix(N, N); stan::math::fill(y12, std::numeric_limits::quiet_NaN()); current_statement__ = 12; - y12 = in__.matrix(N, N); + assign(y12, nil_index_list(), + in__.read, jacobian__>(lp__, + N, N), "assigning variable y12"); std::vector>> y17; y17 = std::vector>>(N, std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN()))); current_statement__ = 13; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 13; - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - current_statement__ = 13; - for (int sym3__ = 1; sym3__ <= N; ++sym3__) { - current_statement__ = 13; - assign(y17, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.scalar(), "assigning variable y17");}}} + assign(y17, nil_index_list(), + in__.read>>, jacobian__>( + lp__, N, N, N), "assigning variable y17"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { vars__.emplace_back(y1[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= N; ++sym1__) { @@ -28275,15 +27459,7 @@ class tilde_block_model final : public model_base_crtp { x = DUMMY_VAR__; current_statement__ = 1; - x = in__.scalar(); - current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - x = stan::math::lb_constrain(x, 0, lp__); - } else { - current_statement__ = 1; - x = stan::math::lb_constrain(x, 0); - } + x = in__.read_lb(0, lp__); { current_statement__ = 4; if (t) { @@ -28341,9 +27517,7 @@ class tilde_block_model final : public model_base_crtp { x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - x = in__.scalar(); - current_statement__ = 1; - x = stan::math::lb_constrain(x, 0); + x = in__.read_lb(0, lp__); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -29048,606 +28222,198 @@ class transform_model final : public model_base_crtp { p_1 = std::vector(k, DUMMY_VAR__); current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 1; - assign(p_1, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_1");} + assign(p_1, nil_index_list(), + in__.read_lb, jacobian__>( + ds[(1 - 1)][(1 - 1)], lp__, k), "assigning variable p_1"); current_statement__ = 1; check_matching_dims("constraint", "p_1", p_1, "lower", ds[(1 - 1)][(1 - 1)]); - current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - assign(p_1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(p_1[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], lp__), - "assigning variable p_1"); - } else { - current_statement__ = 1; - assign(p_1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(p_1[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)]), "assigning variable p_1"); - }} std::vector p_2; p_2 = std::vector(k, DUMMY_VAR__); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 2; - assign(p_2, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_2");} + assign(p_2, nil_index_list(), + in__.read_ub, jacobian__>( + ds[(1 - 1)][(1 - 1)], lp__, k), "assigning variable p_2"); current_statement__ = 2; check_matching_dims("constraint", "p_2", p_2, "upper", ds[(1 - 1)][(1 - 1)]); - current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(p_2, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::ub_constrain(p_2[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], lp__), - "assigning variable p_2"); - } else { - current_statement__ = 2; - assign(p_2, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::ub_constrain(p_2[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)]), "assigning variable p_2"); - }} std::vector p_3; p_3 = std::vector(k, DUMMY_VAR__); current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 3; - assign(p_3, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_3");} + assign(p_3, nil_index_list(), + in__.read_lub, jacobian__>( + ds[(1 - 1)][(1 - 1)], ds[(1 - 1)][(2 - 1)], lp__, k), + "assigning variable p_3"); current_statement__ = 3; check_matching_dims("constraint", "p_3", p_3, "lower", ds[(1 - 1)][(1 - 1)]); current_statement__ = 3; check_matching_dims("constraint", "p_3", p_3, "upper", ds[(1 - 1)][(2 - 1)]); - current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - assign(p_3, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(p_3[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], - ds[(1 - 1)][(2 - 1)][(sym1__ - 1)], lp__), - "assigning variable p_3"); - } else { - current_statement__ = 3; - assign(p_3, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(p_3[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], - ds[(1 - 1)][(2 - 1)][(sym1__ - 1)]), "assigning variable p_3"); - }} std::vector p_4; p_4 = std::vector(k, DUMMY_VAR__); current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 4; - assign(p_4, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_4");} + assign(p_4, nil_index_list(), + in__.read_lub, jacobian__>(0, + ds[(1 - 1)][(2 - 1)], lp__, k), "assigning variable p_4"); current_statement__ = 4; check_matching_dims("constraint", "p_4", p_4, "upper", ds[(1 - 1)][(2 - 1)]); - current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - assign(p_4, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(p_4[(sym1__ - 1)], 0, - ds[(1 - 1)][(2 - 1)][(sym1__ - 1)], lp__), - "assigning variable p_4"); - } else { - current_statement__ = 4; - assign(p_4, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(p_4[(sym1__ - 1)], 0, - ds[(1 - 1)][(2 - 1)][(sym1__ - 1)]), "assigning variable p_4"); - }} std::vector p_5; p_5 = std::vector(k, DUMMY_VAR__); current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 5; - assign(p_5, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_5");} + assign(p_5, nil_index_list(), + in__.read_lub, jacobian__>( + ds[(1 - 1)][(1 - 1)], 1, lp__, k), "assigning variable p_5"); current_statement__ = 5; check_matching_dims("constraint", "p_5", p_5, "lower", ds[(1 - 1)][(1 - 1)]); - current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 5; - if (jacobian__) { - current_statement__ = 5; - assign(p_5, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(p_5[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], 1, lp__), - "assigning variable p_5"); - } else { - current_statement__ = 5; - assign(p_5, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(p_5[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], 1), - "assigning variable p_5"); - }} std::vector p_6; p_6 = std::vector(k, DUMMY_VAR__); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 6; - assign(p_6, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_6");} + assign(p_6, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + ds[(1 - 1)][(1 - 1)], 1, lp__, k), "assigning variable p_6"); current_statement__ = 6; check_matching_dims("constraint", "p_6", p_6, "offset", ds[(1 - 1)][(1 - 1)]); - current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 6; - if (jacobian__) { - current_statement__ = 6; - assign(p_6, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain(p_6[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], 1, lp__), - "assigning variable p_6"); - } else { - current_statement__ = 6; - assign(p_6, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain(p_6[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], 1), - "assigning variable p_6"); - }} std::vector p_7; p_7 = std::vector(k, DUMMY_VAR__); current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 7; - assign(p_7, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_7");} + assign(p_7, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + 0, ds[(1 - 1)][(1 - 1)], lp__, k), "assigning variable p_7"); current_statement__ = 7; check_matching_dims("constraint", "p_7", p_7, "multiplier", ds[(1 - 1)][(1 - 1)]); - current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 7; - if (jacobian__) { - current_statement__ = 7; - assign(p_7, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain(p_7[(sym1__ - 1)], 0, - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], lp__), - "assigning variable p_7"); - } else { - current_statement__ = 7; - assign(p_7, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain(p_7[(sym1__ - 1)], 0, - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)]), "assigning variable p_7"); - }} std::vector p_8; p_8 = std::vector(k, DUMMY_VAR__); current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 8; - assign(p_8, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_8");} + assign(p_8, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + ds[(1 - 1)][(1 - 1)], ds[(1 - 1)][(2 - 1)], lp__, k), + "assigning variable p_8"); current_statement__ = 8; check_matching_dims("constraint", "p_8", p_8, "offset", ds[(1 - 1)][(1 - 1)]); current_statement__ = 8; check_matching_dims("constraint", "p_8", p_8, "multiplier", ds[(1 - 1)][(2 - 1)]); - current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 8; - if (jacobian__) { - current_statement__ = 8; - assign(p_8, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain(p_8[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], - ds[(1 - 1)][(2 - 1)][(sym1__ - 1)], lp__), - "assigning variable p_8"); - } else { - current_statement__ = 8; - assign(p_8, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain(p_8[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], - ds[(1 - 1)][(2 - 1)][(sym1__ - 1)]), "assigning variable p_8"); - }} std::vector> p_9; p_9 = std::vector>(m, std::vector(k, DUMMY_VAR__)); current_statement__ = 9; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 9; - for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 9; - assign(p_9, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), in__.scalar(), - "assigning variable p_9");}} + assign(p_9, nil_index_list(), + in__.read_lub>, jacobian__>( + ds[(1 - 1)], 1, lp__, m, k), "assigning variable p_9"); current_statement__ = 9; check_matching_dims("constraint", "p_9", p_9, "lower", ds[(1 - 1)]); - current_statement__ = 9; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 9; - for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 9; - if (jacobian__) { - current_statement__ = 9; - assign(p_9, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lub_constrain(p_9[(sym1__ - 1)][(sym2__ - 1)], - ds[(1 - 1)][(sym1__ - 1)][(sym2__ - 1)], 1, lp__), - "assigning variable p_9"); - } else { - current_statement__ = 9; - assign(p_9, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lub_constrain(p_9[(sym1__ - 1)][(sym2__ - 1)], - ds[(1 - 1)][(sym1__ - 1)][(sym2__ - 1)], 1), - "assigning variable p_9"); - }}} std::vector>> p_10; p_10 = std::vector>>(n, std::vector>(m, std::vector(k, DUMMY_VAR__))); current_statement__ = 10; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 10; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 10; - for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 10; - assign(p_10, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.scalar(), "assigning variable p_10");}}} + assign(p_10, nil_index_list(), + in__.read_lub>>, jacobian__>( + 0, ds, lp__, n, m, k), "assigning variable p_10"); current_statement__ = 10; check_matching_dims("constraint", "p_10", p_10, "upper", ds); - current_statement__ = 10; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 10; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 10; - for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 10; - if (jacobian__) { - current_statement__ = 10; - assign(p_10, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::lub_constrain( - p_10[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], 0, - ds[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], lp__), - "assigning variable p_10"); - } else { - current_statement__ = 10; - assign(p_10, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::lub_constrain( - p_10[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], 0, - ds[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]), - "assigning variable p_10"); - }}}} Eigen::Matrix pv_1; pv_1 = Eigen::Matrix(k); stan::math::fill(pv_1, DUMMY_VAR__); current_statement__ = 11; - pv_1 = in__.vector(k); + assign(pv_1, nil_index_list(), + in__.read_lub, jacobian__>( + dv[(1 - 1)][(1 - 1)], dv[(1 - 1)][(2 - 1)], lp__, k), + "assigning variable pv_1"); current_statement__ = 11; check_matching_dims("constraint", "pv_1", pv_1, "lower", dv[(1 - 1)][(1 - 1)]); current_statement__ = 11; check_matching_dims("constraint", "pv_1", pv_1, "upper", dv[(1 - 1)][(2 - 1)]); - current_statement__ = 11; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 11; - if (jacobian__) { - current_statement__ = 11; - assign(pv_1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(pv_1[(sym1__ - 1)], - dv[(1 - 1)][(1 - 1)][(sym1__ - 1)], - dv[(1 - 1)][(2 - 1)][(sym1__ - 1)], lp__), - "assigning variable pv_1"); - } else { - current_statement__ = 11; - assign(pv_1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(pv_1[(sym1__ - 1)], - dv[(1 - 1)][(1 - 1)][(sym1__ - 1)], - dv[(1 - 1)][(2 - 1)][(sym1__ - 1)]), "assigning variable pv_1"); - }} std::vector> pv_2; pv_2 = std::vector>(m, Eigen::Matrix(k)); stan::math::fill(pv_2, DUMMY_VAR__); current_statement__ = 12; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 12; - assign(pv_2, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(k), "assigning variable pv_2");} + assign(pv_2, nil_index_list(), + in__.read_lb>, jacobian__>( + dv[(1 - 1)], lp__, m, k), "assigning variable pv_2"); current_statement__ = 12; check_matching_dims("constraint", "pv_2", pv_2, "lower", dv[(1 - 1)]); - current_statement__ = 12; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 12; - for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 12; - if (jacobian__) { - current_statement__ = 12; - assign(pv_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lb_constrain(pv_2[(sym1__ - 1)][(sym2__ - 1)], - dv[(1 - 1)][(sym1__ - 1)][(sym2__ - 1)], lp__), - "assigning variable pv_2"); - } else { - current_statement__ = 12; - assign(pv_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lb_constrain(pv_2[(sym1__ - 1)][(sym2__ - 1)], - dv[(1 - 1)][(sym1__ - 1)][(sym2__ - 1)]), - "assigning variable pv_2"); - }}} std::vector>> pv_3; pv_3 = std::vector>>(n, std::vector>(m, Eigen::Matrix(k))); stan::math::fill(pv_3, DUMMY_VAR__); current_statement__ = 13; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 13; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 13; - assign(pv_3, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(k), "assigning variable pv_3");}} + assign(pv_3, nil_index_list(), + in__.read_ub>>, jacobian__>( + dv, lp__, n, m, k), "assigning variable pv_3"); current_statement__ = 13; check_matching_dims("constraint", "pv_3", pv_3, "upper", dv); - current_statement__ = 13; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 13; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 13; - for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 13; - if (jacobian__) { - current_statement__ = 13; - assign(pv_3, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::ub_constrain( - pv_3[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], - dv[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], lp__), - "assigning variable pv_3"); - } else { - current_statement__ = 13; - assign(pv_3, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::ub_constrain( - pv_3[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], - dv[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]), - "assigning variable pv_3"); - }}}} Eigen::Matrix pr_1; pr_1 = Eigen::Matrix(k); stan::math::fill(pr_1, DUMMY_VAR__); current_statement__ = 14; - pr_1 = in__.row_vector(k); + assign(pr_1, nil_index_list(), + in__.read_lub, jacobian__>( + dr[(1 - 1)][(1 - 1)], dr[(1 - 1)][(2 - 1)], lp__, k), + "assigning variable pr_1"); current_statement__ = 14; check_matching_dims("constraint", "pr_1", pr_1, "lower", dr[(1 - 1)][(1 - 1)]); current_statement__ = 14; check_matching_dims("constraint", "pr_1", pr_1, "upper", dr[(1 - 1)][(2 - 1)]); - current_statement__ = 14; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 14; - if (jacobian__) { - current_statement__ = 14; - assign(pr_1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(pr_1[(sym1__ - 1)], - dr[(1 - 1)][(1 - 1)][(sym1__ - 1)], - dr[(1 - 1)][(2 - 1)][(sym1__ - 1)], lp__), - "assigning variable pr_1"); - } else { - current_statement__ = 14; - assign(pr_1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(pr_1[(sym1__ - 1)], - dr[(1 - 1)][(1 - 1)][(sym1__ - 1)], - dr[(1 - 1)][(2 - 1)][(sym1__ - 1)]), "assigning variable pr_1"); - }} std::vector> pr_2; pr_2 = std::vector>(m, Eigen::Matrix(k)); stan::math::fill(pr_2, DUMMY_VAR__); current_statement__ = 15; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 15; - assign(pr_2, cons_list(index_uni(sym1__), nil_index_list()), - in__.row_vector(k), "assigning variable pr_2");} + assign(pr_2, nil_index_list(), + in__.read_lb>, jacobian__>( + dr[(1 - 1)], lp__, m, k), "assigning variable pr_2"); current_statement__ = 15; check_matching_dims("constraint", "pr_2", pr_2, "lower", dr[(1 - 1)]); - current_statement__ = 15; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 15; - for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 15; - if (jacobian__) { - current_statement__ = 15; - assign(pr_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lb_constrain(pr_2[(sym1__ - 1)][(sym2__ - 1)], - dr[(1 - 1)][(sym1__ - 1)][(sym2__ - 1)], lp__), - "assigning variable pr_2"); - } else { - current_statement__ = 15; - assign(pr_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lb_constrain(pr_2[(sym1__ - 1)][(sym2__ - 1)], - dr[(1 - 1)][(sym1__ - 1)][(sym2__ - 1)]), - "assigning variable pr_2"); - }}} std::vector>> pr_3; pr_3 = std::vector>>(n, std::vector>(m, Eigen::Matrix(k))); stan::math::fill(pr_3, DUMMY_VAR__); current_statement__ = 16; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 16; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 16; - assign(pr_3, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.row_vector(k), "assigning variable pr_3");}} + assign(pr_3, nil_index_list(), + in__.read_ub>>, jacobian__>( + dr, lp__, n, m, k), "assigning variable pr_3"); current_statement__ = 16; check_matching_dims("constraint", "pr_3", pr_3, "upper", dr); - current_statement__ = 16; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 16; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 16; - for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 16; - if (jacobian__) { - current_statement__ = 16; - assign(pr_3, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::ub_constrain( - pr_3[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], - dr[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], lp__), - "assigning variable pr_3"); - } else { - current_statement__ = 16; - assign(pr_3, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::ub_constrain( - pr_3[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], - dr[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]), - "assigning variable pr_3"); - }}}} Eigen::Matrix pm_1; pm_1 = Eigen::Matrix(m, k); stan::math::fill(pm_1, DUMMY_VAR__); current_statement__ = 17; - pm_1 = in__.matrix(m, k); + assign(pm_1, nil_index_list(), + in__.read_lb, jacobian__>( + dm[(1 - 1)], lp__, m, k), "assigning variable pm_1"); current_statement__ = 17; check_matching_dims("constraint", "pm_1", pm_1, "lower", dm[(1 - 1)]); - current_statement__ = 17; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 17; - for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 17; - if (jacobian__) { - current_statement__ = 17; - assign(pm_1, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lb_constrain( - rvalue(pm_1, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), "pm_1"), - rvalue(dm[(1 - 1)], - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), "dm[1]"), - lp__), "assigning variable pm_1"); - } else { - current_statement__ = 17; - assign(pm_1, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lb_constrain( - rvalue(pm_1, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), "pm_1"), - rvalue(dm[(1 - 1)], - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), "dm[1]")), - "assigning variable pm_1"); - }}} std::vector> pm_2; pm_2 = std::vector>(n, Eigen::Matrix(m, k)); stan::math::fill(pm_2, DUMMY_VAR__); current_statement__ = 18; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 18; - assign(pm_2, cons_list(index_uni(sym1__), nil_index_list()), - in__.matrix(m, k), "assigning variable pm_2");} + assign(pm_2, nil_index_list(), + in__.read_ub>, jacobian__>( + dm, lp__, n, m, k), "assigning variable pm_2"); current_statement__ = 18; check_matching_dims("constraint", "pm_2", pm_2, "upper", dm); - current_statement__ = 18; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 18; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 18; - for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 18; - if (jacobian__) { - current_statement__ = 18; - assign(pm_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::ub_constrain( - rvalue(pm_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - "pm_2"), - rvalue(dm, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - "dm"), lp__), "assigning variable pm_2"); - } else { - current_statement__ = 18; - assign(pm_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::ub_constrain( - rvalue(pm_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - "pm_2"), - rvalue(dm, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - "dm")), "assigning variable pm_2"); - }}}} std::vector tp_1; tp_1 = std::vector(k, DUMMY_VAR__); @@ -30032,404 +28798,198 @@ class transform_model final : public model_base_crtp { p_1 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 1; - assign(p_1, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_1");} + assign(p_1, nil_index_list(), + in__.read_lb, jacobian__>( + ds[(1 - 1)][(1 - 1)], lp__, k), "assigning variable p_1"); current_statement__ = 1; check_matching_dims("constraint", "p_1", p_1, "lower", ds[(1 - 1)][(1 - 1)]); - current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 1; - assign(p_1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(p_1[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)]), "assigning variable p_1");} std::vector p_2; p_2 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 2; - assign(p_2, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_2");} + assign(p_2, nil_index_list(), + in__.read_ub, jacobian__>( + ds[(1 - 1)][(1 - 1)], lp__, k), "assigning variable p_2"); current_statement__ = 2; check_matching_dims("constraint", "p_2", p_2, "upper", ds[(1 - 1)][(1 - 1)]); - current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 2; - assign(p_2, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::ub_constrain(p_2[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)]), "assigning variable p_2");} std::vector p_3; p_3 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 3; - assign(p_3, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_3");} + assign(p_3, nil_index_list(), + in__.read_lub, jacobian__>( + ds[(1 - 1)][(1 - 1)], ds[(1 - 1)][(2 - 1)], lp__, k), + "assigning variable p_3"); current_statement__ = 3; check_matching_dims("constraint", "p_3", p_3, "lower", ds[(1 - 1)][(1 - 1)]); current_statement__ = 3; check_matching_dims("constraint", "p_3", p_3, "upper", ds[(1 - 1)][(2 - 1)]); - current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 3; - assign(p_3, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(p_3[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], - ds[(1 - 1)][(2 - 1)][(sym1__ - 1)]), "assigning variable p_3");} std::vector p_4; p_4 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 4; - assign(p_4, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_4");} + assign(p_4, nil_index_list(), + in__.read_lub, jacobian__>(0, + ds[(1 - 1)][(2 - 1)], lp__, k), "assigning variable p_4"); current_statement__ = 4; check_matching_dims("constraint", "p_4", p_4, "upper", ds[(1 - 1)][(2 - 1)]); - current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 4; - assign(p_4, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(p_4[(sym1__ - 1)], 0, - ds[(1 - 1)][(2 - 1)][(sym1__ - 1)]), "assigning variable p_4");} std::vector p_5; p_5 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 5; - assign(p_5, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_5");} + assign(p_5, nil_index_list(), + in__.read_lub, jacobian__>( + ds[(1 - 1)][(1 - 1)], 1, lp__, k), "assigning variable p_5"); current_statement__ = 5; check_matching_dims("constraint", "p_5", p_5, "lower", ds[(1 - 1)][(1 - 1)]); - current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 5; - assign(p_5, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(p_5[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], 1), "assigning variable p_5"); - } std::vector p_6; p_6 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 6; - assign(p_6, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_6");} + assign(p_6, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + ds[(1 - 1)][(1 - 1)], 1, lp__, k), "assigning variable p_6"); current_statement__ = 6; check_matching_dims("constraint", "p_6", p_6, "offset", ds[(1 - 1)][(1 - 1)]); - current_statement__ = 6; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 6; - assign(p_6, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain(p_6[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], 1), "assigning variable p_6"); - } std::vector p_7; p_7 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 7; - assign(p_7, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_7");} + assign(p_7, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + 0, ds[(1 - 1)][(1 - 1)], lp__, k), "assigning variable p_7"); current_statement__ = 7; check_matching_dims("constraint", "p_7", p_7, "multiplier", ds[(1 - 1)][(1 - 1)]); - current_statement__ = 7; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 7; - assign(p_7, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain(p_7[(sym1__ - 1)], 0, - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)]), "assigning variable p_7");} std::vector p_8; p_8 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 8; - assign(p_8, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_8");} + assign(p_8, nil_index_list(), + in__.read_offset_multiplier, jacobian__>( + ds[(1 - 1)][(1 - 1)], ds[(1 - 1)][(2 - 1)], lp__, k), + "assigning variable p_8"); current_statement__ = 8; check_matching_dims("constraint", "p_8", p_8, "offset", ds[(1 - 1)][(1 - 1)]); current_statement__ = 8; check_matching_dims("constraint", "p_8", p_8, "multiplier", ds[(1 - 1)][(2 - 1)]); - current_statement__ = 8; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 8; - assign(p_8, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::offset_multiplier_constrain(p_8[(sym1__ - 1)], - ds[(1 - 1)][(1 - 1)][(sym1__ - 1)], - ds[(1 - 1)][(2 - 1)][(sym1__ - 1)]), "assigning variable p_8");} std::vector> p_9; p_9 = std::vector>(m, std::vector(k, std::numeric_limits::quiet_NaN())); current_statement__ = 9; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 9; - for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 9; - assign(p_9, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), in__.scalar(), - "assigning variable p_9");}} + assign(p_9, nil_index_list(), + in__.read_lub>, jacobian__>( + ds[(1 - 1)], 1, lp__, m, k), "assigning variable p_9"); current_statement__ = 9; check_matching_dims("constraint", "p_9", p_9, "lower", ds[(1 - 1)]); - current_statement__ = 9; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 9; - for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 9; - assign(p_9, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lub_constrain(p_9[(sym1__ - 1)][(sym2__ - 1)], - ds[(1 - 1)][(sym1__ - 1)][(sym2__ - 1)], 1), - "assigning variable p_9");}} std::vector>> p_10; p_10 = std::vector>>(n, std::vector>(m, std::vector(k, std::numeric_limits::quiet_NaN()))); current_statement__ = 10; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 10; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 10; - for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 10; - assign(p_10, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - in__.scalar(), "assigning variable p_10");}}} + assign(p_10, nil_index_list(), + in__.read_lub>>, jacobian__>( + 0, ds, lp__, n, m, k), "assigning variable p_10"); current_statement__ = 10; check_matching_dims("constraint", "p_10", p_10, "upper", ds); - current_statement__ = 10; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 10; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 10; - for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 10; - assign(p_10, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::lub_constrain( - p_10[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], 0, - ds[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]), - "assigning variable p_10");}}} Eigen::Matrix pv_1; pv_1 = Eigen::Matrix(k); stan::math::fill(pv_1, std::numeric_limits::quiet_NaN()); current_statement__ = 11; - pv_1 = in__.vector(k); + assign(pv_1, nil_index_list(), + in__.read_lub, jacobian__>( + dv[(1 - 1)][(1 - 1)], dv[(1 - 1)][(2 - 1)], lp__, k), + "assigning variable pv_1"); current_statement__ = 11; check_matching_dims("constraint", "pv_1", pv_1, "lower", dv[(1 - 1)][(1 - 1)]); current_statement__ = 11; check_matching_dims("constraint", "pv_1", pv_1, "upper", dv[(1 - 1)][(2 - 1)]); - current_statement__ = 11; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 11; - assign(pv_1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(pv_1[(sym1__ - 1)], - dv[(1 - 1)][(1 - 1)][(sym1__ - 1)], - dv[(1 - 1)][(2 - 1)][(sym1__ - 1)]), "assigning variable pv_1");} std::vector> pv_2; pv_2 = std::vector>(m, Eigen::Matrix(k)); stan::math::fill(pv_2, std::numeric_limits::quiet_NaN()); current_statement__ = 12; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 12; - assign(pv_2, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(k), "assigning variable pv_2");} + assign(pv_2, nil_index_list(), + in__.read_lb>, jacobian__>( + dv[(1 - 1)], lp__, m, k), "assigning variable pv_2"); current_statement__ = 12; check_matching_dims("constraint", "pv_2", pv_2, "lower", dv[(1 - 1)]); - current_statement__ = 12; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 12; - for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 12; - assign(pv_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lb_constrain(pv_2[(sym1__ - 1)][(sym2__ - 1)], - dv[(1 - 1)][(sym1__ - 1)][(sym2__ - 1)]), - "assigning variable pv_2");}} std::vector>> pv_3; pv_3 = std::vector>>(n, std::vector>(m, Eigen::Matrix(k))); stan::math::fill(pv_3, std::numeric_limits::quiet_NaN()); current_statement__ = 13; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 13; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 13; - assign(pv_3, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(k), "assigning variable pv_3");}} + assign(pv_3, nil_index_list(), + in__.read_ub>>, jacobian__>( + dv, lp__, n, m, k), "assigning variable pv_3"); current_statement__ = 13; check_matching_dims("constraint", "pv_3", pv_3, "upper", dv); - current_statement__ = 13; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 13; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 13; - for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 13; - assign(pv_3, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::ub_constrain( - pv_3[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], - dv[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]), - "assigning variable pv_3");}}} Eigen::Matrix pr_1; pr_1 = Eigen::Matrix(k); stan::math::fill(pr_1, std::numeric_limits::quiet_NaN()); current_statement__ = 14; - pr_1 = in__.row_vector(k); + assign(pr_1, nil_index_list(), + in__.read_lub, jacobian__>( + dr[(1 - 1)][(1 - 1)], dr[(1 - 1)][(2 - 1)], lp__, k), + "assigning variable pr_1"); current_statement__ = 14; check_matching_dims("constraint", "pr_1", pr_1, "lower", dr[(1 - 1)][(1 - 1)]); current_statement__ = 14; check_matching_dims("constraint", "pr_1", pr_1, "upper", dr[(1 - 1)][(2 - 1)]); - current_statement__ = 14; - for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 14; - assign(pr_1, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(pr_1[(sym1__ - 1)], - dr[(1 - 1)][(1 - 1)][(sym1__ - 1)], - dr[(1 - 1)][(2 - 1)][(sym1__ - 1)]), "assigning variable pr_1");} std::vector> pr_2; pr_2 = std::vector>(m, Eigen::Matrix(k)); stan::math::fill(pr_2, std::numeric_limits::quiet_NaN()); current_statement__ = 15; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 15; - assign(pr_2, cons_list(index_uni(sym1__), nil_index_list()), - in__.row_vector(k), "assigning variable pr_2");} + assign(pr_2, nil_index_list(), + in__.read_lb>, jacobian__>( + dr[(1 - 1)], lp__, m, k), "assigning variable pr_2"); current_statement__ = 15; check_matching_dims("constraint", "pr_2", pr_2, "lower", dr[(1 - 1)]); - current_statement__ = 15; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 15; - for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 15; - assign(pr_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lb_constrain(pr_2[(sym1__ - 1)][(sym2__ - 1)], - dr[(1 - 1)][(sym1__ - 1)][(sym2__ - 1)]), - "assigning variable pr_2");}} std::vector>> pr_3; pr_3 = std::vector>>(n, std::vector>(m, Eigen::Matrix(k))); stan::math::fill(pr_3, std::numeric_limits::quiet_NaN()); current_statement__ = 16; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 16; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 16; - assign(pr_3, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.row_vector(k), "assigning variable pr_3");}} + assign(pr_3, nil_index_list(), + in__.read_ub>>, jacobian__>( + dr, lp__, n, m, k), "assigning variable pr_3"); current_statement__ = 16; check_matching_dims("constraint", "pr_3", pr_3, "upper", dr); - current_statement__ = 16; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 16; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 16; - for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 16; - assign(pr_3, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::ub_constrain( - pr_3[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)], - dr[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]), - "assigning variable pr_3");}}} Eigen::Matrix pm_1; pm_1 = Eigen::Matrix(m, k); stan::math::fill(pm_1, std::numeric_limits::quiet_NaN()); current_statement__ = 17; - pm_1 = in__.matrix(m, k); + assign(pm_1, nil_index_list(), + in__.read_lb, jacobian__>( + dm[(1 - 1)], lp__, m, k), "assigning variable pm_1"); current_statement__ = 17; check_matching_dims("constraint", "pm_1", pm_1, "lower", dm[(1 - 1)]); - current_statement__ = 17; - for (int sym1__ = 1; sym1__ <= m; ++sym1__) { - current_statement__ = 17; - for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 17; - assign(pm_1, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::lb_constrain( - rvalue(pm_1, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), "pm_1"), - rvalue(dm[(1 - 1)], - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), "dm[1]")), - "assigning variable pm_1");}} std::vector> pm_2; pm_2 = std::vector>(n, Eigen::Matrix(m, k)); stan::math::fill(pm_2, std::numeric_limits::quiet_NaN()); current_statement__ = 18; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 18; - assign(pm_2, cons_list(index_uni(sym1__), nil_index_list()), - in__.matrix(m, k), "assigning variable pm_2");} + assign(pm_2, nil_index_list(), + in__.read_ub>, jacobian__>( + dm, lp__, n, m, k), "assigning variable pm_2"); current_statement__ = 18; check_matching_dims("constraint", "pm_2", pm_2, "upper", dm); - current_statement__ = 18; - for (int sym1__ = 1; sym1__ <= n; ++sym1__) { - current_statement__ = 18; - for (int sym2__ = 1; sym2__ <= m; ++sym2__) { - current_statement__ = 18; - for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 18; - assign(pm_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - stan::math::ub_constrain( - rvalue(pm_2, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), - "pm_2"), - rvalue(dm, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), - cons_list(index_uni(sym3__), nil_index_list()))), "dm")), - "assigning variable pm_2");}}} std::vector tp_1; tp_1 = std::vector(k, std::numeric_limits::quiet_NaN()); @@ -32416,20 +30976,12 @@ class truncate_model final : public model_base_crtp { m = DUMMY_VAR__; current_statement__ = 1; - m = in__.scalar(); + m = in__.read(lp__); local_scalar_t__ y; y = DUMMY_VAR__; current_statement__ = 2; - y = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - y = stan::math::lb_constrain(y, 0, lp__); - } else { - current_statement__ = 2; - y = stan::math::lb_constrain(y, 0); - } + y = in__.read_lb(0, lp__); { current_statement__ = 3; lp_accum__.add(normal_lpdf(x, m, 1)); @@ -32543,14 +31095,12 @@ class truncate_model final : public model_base_crtp { m = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - m = in__.scalar(); + m = in__.read(lp__); double y; y = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - y = in__.scalar(); - current_statement__ = 2; - y = stan::math::lb_constrain(y, 0); + y = in__.read_lb(0, lp__); vars__.emplace_back(m); vars__.emplace_back(y); if (logical_negation((primitive_value(emit_transformed_parameters__) || @@ -32875,7 +31425,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp(lp__); { current_statement__ = 2; lp_accum__.add(normal_lpdf(x, 0, 1)); @@ -32911,7 +31461,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - x = in__.scalar(); + x = in__.read(lp__); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -33222,15 +31772,7 @@ class user_constrain_model final : public model_base_crtp x = DUMMY_VAR__; current_statement__ = 1; - x = in__.scalar(); - current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - x = stan::math::lb_constrain(x, 0, lp__); - } else { - current_statement__ = 1; - x = stan::math::lb_constrain(x, 0); - } + x = in__.read_lb(0, lp__); { current_statement__ = 2; lp_accum__.add(std_normal_lpdf(x)); @@ -33266,9 +31808,7 @@ class user_constrain_model final : public model_base_crtp x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - x = in__.scalar(); - current_statement__ = 1; - x = stan::math::lb_constrain(x, 0); + x = in__.read_lb(0, lp__); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { diff --git a/test/integration/good/code-gen/mir.expected b/test/integration/good/code-gen/mir.expected index d43b70019d..b687c9ff45 100644 --- a/test/integration/good/code-gen/mir.expected +++ b/test/integration/good/code-gen/mir.expected @@ -7742,34 +7742,10 @@ (Decl (decl_adtype AutoDiffable) (decl_id p_upper) (decl_type (Sized SReal)))) (meta )) - ((pattern - (Assignment (p_upper UReal ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_upper)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var p_real)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_lower) (decl_type (Sized SReal)))) (meta )) - ((pattern - (Assignment (p_lower UReal ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_lower)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str ub)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var p_upper)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id offset_multiplier) (decl_type @@ -7778,47 +7754,6 @@ ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id no_offset_multiplier) (decl_type @@ -7827,47 +7762,6 @@ ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (no_offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var no_offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id offset_no_multiplier) (decl_type @@ -7876,47 +7770,6 @@ ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (offset_no_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var offset_no_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_real_1d_ar) (decl_type @@ -7925,45 +7778,6 @@ ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_real_1d_ar (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_real_1d_ar)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_real_3d_ar) (decl_type @@ -7978,105 +7792,6 @@ ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_real_3d_ar (UArray (UArray (UArray UReal))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_real_3d_ar)) - (meta - ((type_ - (UArray (UArray (UArray UReal)))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_vec) (decl_type @@ -8085,45 +7800,6 @@ ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_vec UVector - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_vec)) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_1d_vec) (decl_type @@ -8204,137 +7880,6 @@ ((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym4__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_ar_mat (UArray (UArray UMatrix)) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym4__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal - FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_ar_mat)) - (meta - ((type_ - (UArray (UArray UMatrix))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym4__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str lub)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_simplex) (decl_type @@ -8343,16 +7888,6 @@ ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (Assignment (p_simplex UVector ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_simplex)) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_1d_simplex) (decl_type @@ -8364,43 +7899,6 @@ ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_1d_simplex (UArray UVector) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_1d_simplex)) - (meta - ((type_ (UArray UVector)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_3d_simplex) (decl_type @@ -8418,102 +7916,6 @@ ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_3d_simplex - (UArray (UArray (UArray UVector))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_3d_simplex)) - (meta - ((type_ - (UArray (UArray (UArray UVector)))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_54) (decl_type @@ -8524,20 +7926,6 @@ ((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (Assignment (p_cfcov_54 UMatrix ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_cfcov_54)) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_33) (decl_type @@ -8548,20 +7936,6 @@ ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (Assignment (p_cfcov_33 UMatrix ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_cfcov_33)) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_33_ar) (decl_type @@ -8575,47 +7949,6 @@ ((pattern (Var K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_cfcov_33_ar (UArray UMatrix) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_cfcov_33_ar)) - (meta - ((type_ (UArray UMatrix)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta - ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id x_p) (decl_type @@ -10523,34 +9856,10 @@ (Decl (decl_adtype DataOnly) (decl_id p_upper) (decl_type (Sized SReal)))) (meta )) - ((pattern - (Assignment (p_upper UReal ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_upper)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var p_real)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_lower) (decl_type (Sized SReal)))) (meta )) - ((pattern - (Assignment (p_lower UReal ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_lower)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str ub)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var p_upper)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id offset_multiplier) (decl_type @@ -10559,46 +9868,6 @@ ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id no_offset_multiplier) (decl_type @@ -10607,46 +9876,6 @@ ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (no_offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var no_offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id offset_no_multiplier) (decl_type @@ -10655,46 +9884,6 @@ ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (offset_no_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var offset_no_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_real_1d_ar) (decl_type @@ -10703,44 +9892,6 @@ ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_real_1d_ar (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_real_1d_ar)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_real_3d_ar) (decl_type @@ -10755,104 +9906,6 @@ ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_real_3d_ar (UArray (UArray (UArray UReal))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_real_3d_ar)) - (meta - ((type_ - (UArray (UArray (UArray UReal)))) - (loc ) (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_vec) (decl_type @@ -10861,43 +9914,6 @@ ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_vec UVector - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_vec)) - (meta - ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_1d_vec) (decl_type @@ -10918,214 +9934,73 @@ (SArray (SVector ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_row_vec) - (decl_type - (Sized - (SRowVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_1d_row_vec) - (decl_type - (Sized - (SArray - (SRowVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_3d_row_vec) - (decl_type - (Sized - (SArray - (SArray - (SArray - (SRowVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_ar_mat) - (decl_type - (Sized - (SArray - (SArray - (SMatrix - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym4__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_ar_mat (UArray (UArray UMatrix)) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym4__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal - FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_ar_mat)) - (meta - ((type_ - (UArray (UArray UMatrix))) - (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym4__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Str lub)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_simplex) + (Decl (decl_adtype DataOnly) (decl_id p_row_vec) (decl_type (Sized - (SVector + (SRowVector ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Assignment (p_simplex UVector ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_simplex)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))))) + (Decl (decl_adtype DataOnly) (decl_id p_1d_row_vec) + (decl_type + (Sized + (SArray + (SRowVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_3d_row_vec) + (decl_type + (Sized + (SArray + (SArray + (SArray + (SRowVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_ar_mat) + (decl_type + (Sized + (SArray + (SArray + (SMatrix + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Lit Int 4)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_simplex) + (decl_type + (Sized + (SVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_1d_simplex) @@ -11138,42 +10013,6 @@ ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_1d_simplex (UArray UVector) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_1d_simplex)) - (meta - ((type_ (UArray UVector)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_3d_simplex) (decl_type @@ -11191,101 +10030,6 @@ ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_3d_simplex - (UArray (UArray (UArray UVector))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_3d_simplex)) - (meta - ((type_ - (UArray (UArray (UArray UVector)))) - (loc ) (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UVector) (loc ) - (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_cfcov_54) (decl_type @@ -11296,20 +10040,6 @@ ((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (Assignment (p_cfcov_54 UMatrix ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_cfcov_54)) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_cfcov_33) (decl_type @@ -11320,20 +10050,6 @@ ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (Assignment (p_cfcov_33 UMatrix ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_cfcov_33)) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_cfcov_33_ar) (decl_type @@ -11347,46 +10063,6 @@ ((pattern (Var K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_cfcov_33_ar (UArray UMatrix) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_cfcov_33_ar)) - (meta - ((type_ (UArray UMatrix)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id x_p) (decl_type diff --git a/test/integration/good/code-gen/opencl/cpp.expected b/test/integration/good/code-gen/opencl/cpp.expected index 7c73311140..f1785691eb 100644 --- a/test/integration/good/code-gen/opencl/cpp.expected +++ b/test/integration/good/code-gen/opencl/cpp.expected @@ -975,38 +975,43 @@ class distributions_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.scalar(); + p_real = in__.read(lp__); std::vector p_real_array; p_real_array = std::vector(d_int, DUMMY_VAR__); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= d_int; ++sym1__) { - current_statement__ = 2; - assign(p_real_array, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_real_array");} + assign(p_real_array, nil_index_list(), + in__.read, jacobian__>(lp__, d_int), + "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); stan::math::fill(p_matrix, DUMMY_VAR__); current_statement__ = 3; - p_matrix = in__.matrix(d_int, d_int); + assign(p_matrix, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int, d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, DUMMY_VAR__); current_statement__ = 4; - p_vector = in__.vector(d_int); + assign(p_vector, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, DUMMY_VAR__); current_statement__ = 5; - p_row_vector = in__.row_vector(d_int); + assign(p_row_vector, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int), "assigning variable p_row_vector"); local_scalar_t__ y_p; y_p = DUMMY_VAR__; current_statement__ = 6; - y_p = in__.scalar(); + y_p = in__.read(lp__); local_scalar_t__ transformed_param_real; transformed_param_real = DUMMY_VAR__; @@ -3514,38 +3519,43 @@ class distributions_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.scalar(); + p_real = in__.read(lp__); std::vector p_real_array; p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= d_int; ++sym1__) { - current_statement__ = 2; - assign(p_real_array, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_real_array");} + assign(p_real_array, nil_index_list(), + in__.read, jacobian__>(lp__, d_int), + "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); stan::math::fill(p_matrix, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - p_matrix = in__.matrix(d_int, d_int); + assign(p_matrix, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int, d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - p_vector = in__.vector(d_int); + assign(p_vector, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - p_row_vector = in__.row_vector(d_int); + assign(p_row_vector, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int), "assigning variable p_row_vector"); double y_p; y_p = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - y_p = in__.scalar(); + y_p = in__.read(lp__); double transformed_param_real; transformed_param_real = std::numeric_limits::quiet_NaN(); @@ -6604,38 +6614,43 @@ class restricted_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.scalar(); + p_real = in__.read(lp__); std::vector p_real_array; p_real_array = std::vector(d_int, DUMMY_VAR__); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= d_int; ++sym1__) { - current_statement__ = 2; - assign(p_real_array, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_real_array");} + assign(p_real_array, nil_index_list(), + in__.read, jacobian__>(lp__, d_int), + "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); stan::math::fill(p_matrix, DUMMY_VAR__); current_statement__ = 3; - p_matrix = in__.matrix(d_int, d_int); + assign(p_matrix, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int, d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, DUMMY_VAR__); current_statement__ = 4; - p_vector = in__.vector(d_int); + assign(p_vector, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, DUMMY_VAR__); current_statement__ = 5; - p_row_vector = in__.row_vector(d_int); + assign(p_row_vector, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int), "assigning variable p_row_vector"); local_scalar_t__ y_p; y_p = DUMMY_VAR__; current_statement__ = 6; - y_p = in__.scalar(); + y_p = in__.read(lp__); local_scalar_t__ transformed_param_real; transformed_param_real = DUMMY_VAR__; @@ -6712,38 +6727,43 @@ class restricted_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.scalar(); + p_real = in__.read(lp__); std::vector p_real_array; p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= d_int; ++sym1__) { - current_statement__ = 2; - assign(p_real_array, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable p_real_array");} + assign(p_real_array, nil_index_list(), + in__.read, jacobian__>(lp__, d_int), + "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); stan::math::fill(p_matrix, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - p_matrix = in__.matrix(d_int, d_int); + assign(p_matrix, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int, d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - p_vector = in__.vector(d_int); + assign(p_vector, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - p_row_vector = in__.row_vector(d_int); + assign(p_row_vector, nil_index_list(), + in__.read, jacobian__>(lp__, + d_int), "assigning variable p_row_vector"); double y_p; y_p = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - y_p = in__.scalar(); + y_p = in__.read(lp__); double transformed_param_real; transformed_param_real = std::numeric_limits::quiet_NaN(); diff --git a/test/integration/good/code-gen/profiling/cpp.expected b/test/integration/good/code-gen/profiling/cpp.expected index 9d781b2833..8306541f72 100644 --- a/test/integration/good/code-gen/profiling/cpp.expected +++ b/test/integration/good/code-gen/profiling/cpp.expected @@ -176,41 +176,17 @@ class simple_function_model final : public model_base_crtp(0, lp__); local_scalar_t__ alpha; alpha = DUMMY_VAR__; current_statement__ = 2; - alpha = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - alpha = stan::math::lb_constrain(alpha, 0, lp__); - } else { - current_statement__ = 2; - alpha = stan::math::lb_constrain(alpha, 0); - } + alpha = in__.read_lb(0, lp__); local_scalar_t__ sigma; sigma = DUMMY_VAR__; current_statement__ = 3; - sigma = in__.scalar(); - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - sigma = stan::math::lb_constrain(sigma, 0, lp__); - } else { - current_statement__ = 3; - sigma = stan::math::lb_constrain(sigma, 0); - } + sigma = in__.read_lb(0, lp__); { current_statement__ = 4; validate_non_negative_index("cov", "N", N); @@ -302,23 +278,17 @@ class simple_function_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - rho = in__.scalar(); - current_statement__ = 1; - rho = stan::math::lb_constrain(rho, 0); + rho = in__.read_lb(0, lp__); double alpha; alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - alpha = in__.scalar(); - current_statement__ = 2; - alpha = stan::math::lb_constrain(alpha, 0); + alpha = in__.read_lb(0, lp__); double sigma; sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - sigma = in__.scalar(); - current_statement__ = 3; - sigma = stan::math::lb_constrain(sigma, 0); + sigma = in__.read_lb(0, lp__); vars__.emplace_back(rho); vars__.emplace_back(alpha); vars__.emplace_back(sigma); diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 42db9057a2..60787b424a 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -277,54 +277,22 @@ class ad_level_failing_model final : public model_base_crtp(0, lp__); local_scalar_t__ gamma; gamma = DUMMY_VAR__; current_statement__ = 2; - gamma = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - gamma = stan::math::lb_constrain(gamma, 0, lp__); - } else { - current_statement__ = 2; - gamma = stan::math::lb_constrain(gamma, 0); - } + gamma = in__.read_lb(0, lp__); local_scalar_t__ xi; xi = DUMMY_VAR__; current_statement__ = 3; - xi = in__.scalar(); - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - xi = stan::math::lb_constrain(xi, 0, lp__); - } else { - current_statement__ = 3; - xi = stan::math::lb_constrain(xi, 0); - } + xi = in__.read_lb(0, lp__); local_scalar_t__ delta; delta = DUMMY_VAR__; current_statement__ = 4; - delta = in__.scalar(); - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - delta = stan::math::lb_constrain(delta, 0, lp__); - } else { - current_statement__ = 4; - delta = stan::math::lb_constrain(delta, 0); - } + delta = in__.read_lb(0, lp__); std::vector> y; y = std::vector>(N_t, std::vector(4, DUMMY_VAR__)); @@ -470,30 +438,22 @@ class ad_level_failing_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - beta = in__.scalar(); - current_statement__ = 1; - beta = stan::math::lb_constrain(beta, 0); + beta = in__.read_lb(0, lp__); double gamma; gamma = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - gamma = in__.scalar(); - current_statement__ = 2; - gamma = stan::math::lb_constrain(gamma, 0); + gamma = in__.read_lb(0, lp__); double xi; xi = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - xi = in__.scalar(); - current_statement__ = 3; - xi = stan::math::lb_constrain(xi, 0); + xi = in__.read_lb(0, lp__); double delta; delta = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - delta = in__.scalar(); - current_statement__ = 4; - delta = stan::math::lb_constrain(delta, 0); + delta = in__.read_lb(0, lp__); std::vector> y; y = std::vector>(N_t, std::vector(4, std::numeric_limits::quiet_NaN())); @@ -1247,13 +1207,6 @@ return prob_uncaptured(nind, n_occasions, p, phi, pstream__); class copy_fail_model final : public model_base_crtp { private: - int lcm_sym193__; - int lcm_sym192__; - int lcm_sym191__; - int lcm_sym190__; - int lcm_sym189__; - int lcm_sym188__; - int lcm_sym187__; int lcm_sym186__; int lcm_sym185__; int lcm_sym184__; @@ -1278,6 +1231,13 @@ class copy_fail_model final : public model_base_crtp { int lcm_sym165__; int lcm_sym164__; int lcm_sym163__; + int lcm_sym162__; + int lcm_sym161__; + int lcm_sym160__; + int lcm_sym159__; + int lcm_sym158__; + int lcm_sym157__; + int lcm_sym156__; int nind; int n_occasions; std::vector> y; @@ -1380,11 +1340,11 @@ class copy_fail_model final : public model_base_crtp { "assigning variable y_flat__"); current_statement__ = 35; pos__ = 1; - lcm_sym163__ = logical_gte(n_occasions, 1); - if (lcm_sym163__) { + lcm_sym156__ = logical_gte(n_occasions, 1); + if (lcm_sym156__) { { - lcm_sym164__ = logical_gte(nind, 1); - if (lcm_sym164__) { + lcm_sym157__ = logical_gte(nind, 1); + if (lcm_sym157__) { current_statement__ = 35; assign(y, cons_list(index_uni(1), @@ -1403,7 +1363,7 @@ class copy_fail_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= n_occasions; ++sym1__) { current_statement__ = 35; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 35; assign(y, cons_list(index_uni(1), @@ -1422,13 +1382,13 @@ class copy_fail_model final : public model_base_crtp { } } } } else { - lcm_sym164__ = logical_gte(nind, 1); + lcm_sym157__ = logical_gte(nind, 1); } } current_statement__ = 35; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 35; - if (lcm_sym163__) { + if (lcm_sym156__) { current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", @@ -1441,7 +1401,7 @@ class copy_fail_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 35; - if (lcm_sym163__) { + if (lcm_sym156__) { current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", @@ -1454,9 +1414,9 @@ class copy_fail_model final : public model_base_crtp { } } } current_statement__ = 35; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 35; - if (lcm_sym163__) { + if (lcm_sym156__) { current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", @@ -1469,7 +1429,7 @@ class copy_fail_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 35; - if (lcm_sym163__) { + if (lcm_sym156__) { current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", @@ -1493,12 +1453,12 @@ class copy_fail_model final : public model_base_crtp { check_greater_or_equal(function__, "max_age", max_age, 1); current_statement__ = 37; validate_non_negative_index("x", "nind", nind); - lcm_sym166__ = (n_occasions - 1); - validate_non_negative_index("x", "n_occasions - 1", lcm_sym166__); + lcm_sym159__ = (n_occasions - 1); + validate_non_negative_index("x", "n_occasions - 1", lcm_sym159__); current_statement__ = 38; context__.validate_dims("data initialization","x","int", - context__.to_vec(nind, lcm_sym166__)); - x = std::vector>(nind, std::vector(lcm_sym166__, std::numeric_limits::min())); + context__.to_vec(nind, lcm_sym159__)); + x = std::vector>(nind, std::vector(lcm_sym159__, std::numeric_limits::min())); { std::vector x_flat__; @@ -1507,10 +1467,10 @@ class copy_fail_model final : public model_base_crtp { "assigning variable x_flat__"); current_statement__ = 38; pos__ = 1; - lcm_sym165__ = logical_gte(lcm_sym166__, 1); - if (lcm_sym165__) { + lcm_sym158__ = logical_gte(lcm_sym159__, 1); + if (lcm_sym158__) { current_statement__ = 38; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 38; assign(x, cons_list(index_uni(1), @@ -1527,9 +1487,9 @@ class copy_fail_model final : public model_base_crtp { current_statement__ = 38; pos__ = (pos__ + 1);} } - for (int sym1__ = 2; sym1__ <= lcm_sym166__; ++sym1__) { + for (int sym1__ = 2; sym1__ <= lcm_sym159__; ++sym1__) { current_statement__ = 38; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 38; assign(x, cons_list(index_uni(1), @@ -1549,14 +1509,14 @@ class copy_fail_model final : public model_base_crtp { } } current_statement__ = 38; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 38; - if (lcm_sym165__) { + if (lcm_sym158__) { current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", x[(1 - 1)][(1 - 1)], 0); - for (int sym2__ = 2; sym2__ <= lcm_sym166__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", @@ -1564,12 +1524,12 @@ class copy_fail_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 38; - if (lcm_sym165__) { + if (lcm_sym158__) { current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", x[(sym1__ - 1)][(1 - 1)], 0); - for (int sym2__ = 2; sym2__ <= lcm_sym166__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", @@ -1577,14 +1537,14 @@ class copy_fail_model final : public model_base_crtp { } } } current_statement__ = 38; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 38; - if (lcm_sym165__) { + if (lcm_sym158__) { current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", x[(1 - 1)][(1 - 1)], max_age); - for (int sym2__ = 2; sym2__ <= lcm_sym166__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", @@ -1592,12 +1552,12 @@ class copy_fail_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 38; - if (lcm_sym165__) { + if (lcm_sym158__) { current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", x[(sym1__ - 1)][(1 - 1)], max_age); - for (int sym2__ = 2; sym2__ <= lcm_sym166__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", @@ -1608,7 +1568,7 @@ class copy_fail_model final : public model_base_crtp { n_occ_minus_1 = std::numeric_limits::min(); current_statement__ = 39; - n_occ_minus_1 = lcm_sym166__; + n_occ_minus_1 = lcm_sym159__; current_statement__ = 40; validate_non_negative_index("first", "nind", nind); current_statement__ = 41; @@ -1620,15 +1580,15 @@ class copy_fail_model final : public model_base_crtp { last = std::vector(nind, std::numeric_limits::min()); current_statement__ = 48; - if (lcm_sym164__) { + if (lcm_sym157__) { int inline_sym17__; int inline_sym19__; inline_sym19__ = std::numeric_limits::min(); inline_sym19__ = 0; for (int inline_sym20__ = 1; inline_sym20__ <= 1; ++inline_sym20__) { - lcm_sym173__ = size(y[(1 - 1)]); - for (int inline_sym18__ = 1; inline_sym18__ <= lcm_sym173__; + lcm_sym166__ = size(y[(1 - 1)]); + for (int inline_sym18__ = 1; inline_sym18__ <= lcm_sym166__; ++inline_sym18__) { current_statement__ = 45; if (y[(1 - 1)][(inline_sym18__ - 1)]) { @@ -1651,8 +1611,8 @@ class copy_fail_model final : public model_base_crtp { inline_sym19__ = 0; for (int inline_sym20__ = 1; inline_sym20__ <= 1; ++inline_sym20__) { - lcm_sym172__ = size(y[(i - 1)]); - for (int inline_sym18__ = 1; inline_sym18__ <= lcm_sym172__; + lcm_sym165__ = size(y[(i - 1)]); + for (int inline_sym18__ = 1; inline_sym18__ <= lcm_sym165__; ++inline_sym18__) { current_statement__ = 45; if (y[(i - 1)][(inline_sym18__ - 1)]) { @@ -1670,26 +1630,26 @@ class copy_fail_model final : public model_base_crtp { inline_sym17__, "assigning variable first");} } current_statement__ = 55; - if (lcm_sym164__) { + if (lcm_sym157__) { int inline_sym21__; int inline_sym24__; inline_sym24__ = std::numeric_limits::min(); inline_sym24__ = 0; for (int inline_sym25__ = 1; inline_sym25__ <= 1; ++inline_sym25__) { - lcm_sym173__ = size(y[(1 - 1)]); - lcm_sym170__ = (lcm_sym173__ - 1); - for (int inline_sym23__ = 0; inline_sym23__ <= lcm_sym170__; + lcm_sym166__ = size(y[(1 - 1)]); + lcm_sym163__ = (lcm_sym166__ - 1); + for (int inline_sym23__ = 0; inline_sym23__ <= lcm_sym163__; ++inline_sym23__) { int inline_sym22__; inline_sym22__ = std::numeric_limits::min(); - lcm_sym169__ = (lcm_sym173__ - inline_sym23__); - inline_sym22__ = lcm_sym169__; + lcm_sym162__ = (lcm_sym166__ - inline_sym23__); + inline_sym22__ = lcm_sym162__; current_statement__ = 51; - if (y[(1 - 1)][(lcm_sym169__ - 1)]) { + if (y[(1 - 1)][(lcm_sym162__ - 1)]) { inline_sym24__ = 1; - inline_sym21__ = lcm_sym169__; + inline_sym21__ = lcm_sym162__; break; } } if (inline_sym24__) { @@ -1707,19 +1667,19 @@ class copy_fail_model final : public model_base_crtp { inline_sym24__ = 0; for (int inline_sym25__ = 1; inline_sym25__ <= 1; ++inline_sym25__) { - lcm_sym172__ = size(y[(i - 1)]); - lcm_sym168__ = (lcm_sym172__ - 1); - for (int inline_sym23__ = 0; inline_sym23__ <= lcm_sym168__; + lcm_sym165__ = size(y[(i - 1)]); + lcm_sym161__ = (lcm_sym165__ - 1); + for (int inline_sym23__ = 0; inline_sym23__ <= lcm_sym161__; ++inline_sym23__) { int inline_sym22__; inline_sym22__ = std::numeric_limits::min(); - lcm_sym167__ = (lcm_sym172__ - inline_sym23__); - inline_sym22__ = lcm_sym167__; + lcm_sym160__ = (lcm_sym165__ - inline_sym23__); + inline_sym22__ = lcm_sym160__; current_statement__ = 51; - if (y[(i - 1)][(lcm_sym167__ - 1)]) { + if (y[(i - 1)][(lcm_sym160__ - 1)]) { inline_sym24__ = 1; - inline_sym21__ = lcm_sym167__; + inline_sym21__ = lcm_sym160__; break; } } if (inline_sym24__) { @@ -1732,7 +1692,7 @@ class copy_fail_model final : public model_base_crtp { inline_sym21__, "assigning variable last");} } current_statement__ = 41; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 41; current_statement__ = 41; check_greater_or_equal(function__, "first[sym1__]", first[(1 - 1)], 0); @@ -1743,7 +1703,7 @@ class copy_fail_model final : public model_base_crtp { first[(sym1__ - 1)], 0);} } current_statement__ = 41; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 41; current_statement__ = 41; check_less_or_equal(function__, "first[sym1__]", first[(1 - 1)], @@ -1755,7 +1715,7 @@ class copy_fail_model final : public model_base_crtp { first[(sym1__ - 1)], n_occasions);} } current_statement__ = 43; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 43; current_statement__ = 43; check_greater_or_equal(function__, "last[sym1__]", last[(1 - 1)], 0); @@ -1766,7 +1726,7 @@ class copy_fail_model final : public model_base_crtp { last[(sym1__ - 1)], 0);} } current_statement__ = 43; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 43; current_statement__ = 43; check_less_or_equal(function__, "last[sym1__]", last[(1 - 1)], @@ -1782,11 +1742,11 @@ class copy_fail_model final : public model_base_crtp { current_statement__ = 57; validate_non_negative_index("phi", "nind", nind); current_statement__ = 58; - validate_non_negative_index("phi", "n_occ_minus_1", lcm_sym166__); + validate_non_negative_index("phi", "n_occ_minus_1", lcm_sym159__); current_statement__ = 59; validate_non_negative_index("p", "nind", nind); current_statement__ = 60; - validate_non_negative_index("p", "n_occ_minus_1", lcm_sym166__); + validate_non_negative_index("p", "n_occ_minus_1", lcm_sym159__); current_statement__ = 61; validate_non_negative_index("chi", "nind", nind); current_statement__ = 62; @@ -1822,28 +1782,23 @@ class copy_fail_model final : public model_base_crtp { (void) function__; // suppress unused var warning try { - double lcm_sym162__; - double lcm_sym161__; - double lcm_sym160__; - double lcm_sym159__; - double lcm_sym158__; - double lcm_sym157__; - double lcm_sym156__; double lcm_sym155__; - int lcm_sym154__; - int lcm_sym153__; + double lcm_sym154__; + double lcm_sym153__; double lcm_sym152__; double lcm_sym151__; double lcm_sym150__; double lcm_sym149__; - int lcm_sym148__; + double lcm_sym148__; int lcm_sym147__; - double lcm_sym146__; + int lcm_sym146__; double lcm_sym145__; double lcm_sym144__; double lcm_sym143__; double lcm_sym142__; - double lcm_sym140__; + int lcm_sym141__; + int lcm_sym140__; + double lcm_sym139__; double lcm_sym138__; double lcm_sym137__; double lcm_sym136__; @@ -1856,9 +1811,9 @@ class copy_fail_model final : public model_base_crtp { double lcm_sym129__; double lcm_sym128__; double lcm_sym127__; - int lcm_sym126__; - int lcm_sym125__; - int lcm_sym124__; + double lcm_sym126__; + double lcm_sym125__; + double lcm_sym124__; int lcm_sym123__; int lcm_sym122__; int lcm_sym121__; @@ -1878,53 +1833,21 @@ class copy_fail_model final : public model_base_crtp { int lcm_sym107__; int lcm_sym106__; int lcm_sym105__; + int lcm_sym104__; + int lcm_sym103__; local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 1; - mean_p = in__.scalar(); - current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - mean_p = stan::math::lub_constrain(mean_p, 0, 1, lp__); - } else { - current_statement__ = 1; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); - } + mean_p = in__.read_lub(0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - beta = in__.vector(max_age); - current_statement__ = 2; - if (logical_gte(max_age, 1)) { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(beta, cons_list(index_uni(1), nil_index_list()), - stan::math::lub_constrain(beta[(1 - 1)], 0, 1, lp__), - "assigning variable beta"); - } else { - current_statement__ = 2; - assign(beta, cons_list(index_uni(1), nil_index_list()), - stan::math::lub_constrain(beta[(1 - 1)], 0, 1), - "assigning variable beta"); - } - for (int sym1__ = 2; sym1__ <= max_age; ++sym1__) { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(beta, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(beta[(sym1__ - 1)], 0, 1, lp__), - "assigning variable beta"); - } else { - current_statement__ = 2; - assign(beta, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(beta[(sym1__ - 1)], 0, 1), - "assigning variable beta"); - }} - } + assign(beta, nil_index_list(), + in__.read_lub, jacobian__>(0, + 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -1937,11 +1860,11 @@ class copy_fail_model final : public model_base_crtp { chi = Eigen::Matrix(nind, n_occasions); stan::math::fill(chi, DUMMY_VAR__); - lcm_sym107__ = logical_gte(nind, 1); - if (lcm_sym107__) { - lcm_sym148__ = first[(1 - 1)]; - lcm_sym120__ = (lcm_sym148__ - 1); - if (logical_gte(lcm_sym120__, 1)) { + lcm_sym104__ = logical_gte(nind, 1); + if (lcm_sym104__) { + lcm_sym141__ = first[(1 - 1)]; + lcm_sym117__ = (lcm_sym141__ - 1); + if (logical_gte(lcm_sym117__, 1)) { current_statement__ = 6; assign(phi, cons_list(index_uni(1), @@ -1952,7 +1875,7 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), 0, "assigning variable p"); - for (int t = 2; t <= lcm_sym120__; ++t) { + for (int t = 2; t <= lcm_sym117__; ++t) { current_statement__ = 6; assign(phi, cons_list(index_uni(1), @@ -1964,20 +1887,20 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(t), nil_index_list())), 0, "assigning variable p");} } - lcm_sym118__ = (n_occasions - 1); - if (logical_gte(lcm_sym118__, lcm_sym148__)) { + lcm_sym115__ = (n_occasions - 1); + if (logical_gte(lcm_sym115__, lcm_sym141__)) { current_statement__ = 9; assign(phi, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym148__), nil_index_list())), - beta[(x[(1 - 1)][(lcm_sym148__ - 1)] - 1)], + cons_list(index_uni(lcm_sym141__), nil_index_list())), + beta[(x[(1 - 1)][(lcm_sym141__ - 1)] - 1)], "assigning variable phi"); - lcm_sym126__ = (lcm_sym148__ + 1); + lcm_sym123__ = (lcm_sym141__ + 1); assign(p, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym148__), nil_index_list())), mean_p, + cons_list(index_uni(lcm_sym141__), nil_index_list())), mean_p, "assigning variable p"); - for (int t = lcm_sym126__; t <= lcm_sym118__; ++t) { + for (int t = lcm_sym123__; t <= lcm_sym115__; ++t) { current_statement__ = 9; assign(phi, cons_list(index_uni(1), @@ -1990,9 +1913,9 @@ class copy_fail_model final : public model_base_crtp { "assigning variable p");} } for (int i = 2; i <= nind; ++i) { - lcm_sym147__ = first[(i - 1)]; - lcm_sym119__ = (lcm_sym147__ - 1); - if (logical_gte(lcm_sym119__, 1)) { + lcm_sym140__ = first[(i - 1)]; + lcm_sym116__ = (lcm_sym140__ - 1); + if (logical_gte(lcm_sym116__, 1)) { current_statement__ = 6; assign(phi, cons_list(index_uni(i), @@ -2003,7 +1926,7 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(i), cons_list(index_uni(1), nil_index_list())), 0, "assigning variable p"); - for (int t = 2; t <= lcm_sym119__; ++t) { + for (int t = 2; t <= lcm_sym116__; ++t) { current_statement__ = 6; assign(phi, cons_list(index_uni(i), @@ -2016,19 +1939,19 @@ class copy_fail_model final : public model_base_crtp { "assigning variable p");} } current_statement__ = 12; - if (logical_gte(lcm_sym118__, lcm_sym147__)) { + if (logical_gte(lcm_sym115__, lcm_sym140__)) { current_statement__ = 9; assign(phi, cons_list(index_uni(i), - cons_list(index_uni(lcm_sym147__), nil_index_list())), - beta[(x[(i - 1)][(lcm_sym147__ - 1)] - 1)], + cons_list(index_uni(lcm_sym140__), nil_index_list())), + beta[(x[(i - 1)][(lcm_sym140__ - 1)] - 1)], "assigning variable phi"); - lcm_sym125__ = (lcm_sym147__ + 1); + lcm_sym122__ = (lcm_sym140__ + 1); assign(p, cons_list(index_uni(i), - cons_list(index_uni(lcm_sym147__), nil_index_list())), + cons_list(index_uni(lcm_sym140__), nil_index_list())), mean_p, "assigning variable p"); - for (int t = lcm_sym125__; t <= lcm_sym118__; ++t) { + for (int t = lcm_sym122__; t <= lcm_sym115__; ++t) { current_statement__ = 9; assign(phi, cons_list(index_uni(i), @@ -2061,70 +1984,70 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(inline_sym14__), cons_list(index_uni(n_occasions), nil_index_list())), 1.0, "assigning variable inline_sym10__"); - lcm_sym118__ = (n_occasions - 1); - if (logical_gte(lcm_sym118__, 1)) { + lcm_sym115__ = (n_occasions - 1); + if (logical_gte(lcm_sym115__, 1)) { int inline_sym11__; inline_sym11__ = std::numeric_limits::min(); int inline_sym12__; inline_sym12__ = std::numeric_limits::min(); - lcm_sym122__ = (lcm_sym118__ + 1); + lcm_sym119__ = (lcm_sym115__ + 1); current_statement__ = 20; assign(inline_sym10__, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym118__), nil_index_list())), + cons_list(index_uni(lcm_sym115__), nil_index_list())), stan::math::fma( (rvalue(phi, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym118__), nil_index_list())), + cons_list(index_uni(lcm_sym115__), nil_index_list())), "phi") * (1 - rvalue(p, cons_list(index_uni(inline_sym14__), - cons_list(index_uni((lcm_sym122__ - 1)), + cons_list(index_uni((lcm_sym119__ - 1)), nil_index_list())), "p"))), rvalue(inline_sym10__, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym122__), nil_index_list())), + cons_list(index_uni(lcm_sym119__), nil_index_list())), "inline_sym10__"), (1 - rvalue(phi, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym118__), nil_index_list())), + cons_list(index_uni(lcm_sym115__), nil_index_list())), "phi"))), "assigning variable inline_sym10__"); - for (int inline_sym13__ = 2; inline_sym13__ <= lcm_sym118__; + for (int inline_sym13__ = 2; inline_sym13__ <= lcm_sym115__; ++inline_sym13__) { int inline_sym11__; inline_sym11__ = std::numeric_limits::min(); - lcm_sym117__ = (n_occasions - inline_sym13__); + lcm_sym114__ = (n_occasions - inline_sym13__); int inline_sym12__; inline_sym12__ = std::numeric_limits::min(); - lcm_sym121__ = (lcm_sym117__ + 1); + lcm_sym118__ = (lcm_sym114__ + 1); current_statement__ = 20; assign(inline_sym10__, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym117__), nil_index_list())), + cons_list(index_uni(lcm_sym114__), nil_index_list())), stan::math::fma( (rvalue(phi, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym117__), nil_index_list())), + cons_list(index_uni(lcm_sym114__), nil_index_list())), "phi") * (1 - rvalue(p, cons_list(index_uni(inline_sym14__), - cons_list(index_uni((lcm_sym121__ - 1)), + cons_list(index_uni((lcm_sym118__ - 1)), nil_index_list())), "p"))), rvalue(inline_sym10__, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym121__), nil_index_list())), + cons_list(index_uni(lcm_sym118__), nil_index_list())), "inline_sym10__"), (1 - rvalue(phi, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym117__), nil_index_list())), + cons_list(index_uni(lcm_sym114__), nil_index_list())), "phi"))), "assigning variable inline_sym10__");} } if (inline_sym15__) { @@ -2139,10 +2062,10 @@ class copy_fail_model final : public model_base_crtp { break;} assign(chi, nil_index_list(), inline_sym9__, "assigning variable chi"); current_statement__ = 3; - if (lcm_sym107__) { - lcm_sym118__ = (n_occasions - 1); - lcm_sym108__ = logical_gte(lcm_sym118__, 1); - if (lcm_sym108__) { + if (lcm_sym104__) { + lcm_sym115__ = (n_occasions - 1); + lcm_sym105__ = logical_gte(lcm_sym115__, 1); + if (lcm_sym105__) { current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -2150,7 +2073,7 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "phi"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -2161,7 +2084,7 @@ class copy_fail_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; - if (lcm_sym108__) { + if (lcm_sym105__) { current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -2169,7 +2092,7 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "phi"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -2180,10 +2103,10 @@ class copy_fail_model final : public model_base_crtp { } } } current_statement__ = 3; - if (lcm_sym107__) { - lcm_sym118__ = (n_occasions - 1); - lcm_sym108__ = logical_gte(lcm_sym118__, 1); - if (lcm_sym108__) { + if (lcm_sym104__) { + lcm_sym115__ = (n_occasions - 1); + lcm_sym105__ = logical_gte(lcm_sym115__, 1); + if (lcm_sym105__) { current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -2191,7 +2114,7 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "phi"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -2202,7 +2125,7 @@ class copy_fail_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; - if (lcm_sym108__) { + if (lcm_sym105__) { current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -2210,7 +2133,7 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "phi"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -2221,10 +2144,10 @@ class copy_fail_model final : public model_base_crtp { } } } current_statement__ = 4; - if (lcm_sym107__) { - lcm_sym118__ = (n_occasions - 1); - lcm_sym108__ = logical_gte(lcm_sym118__, 1); - if (lcm_sym108__) { + if (lcm_sym104__) { + lcm_sym115__ = (n_occasions - 1); + lcm_sym105__ = logical_gte(lcm_sym115__, 1); + if (lcm_sym105__) { current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", @@ -2232,7 +2155,7 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "p"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", @@ -2243,7 +2166,7 @@ class copy_fail_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; - if (lcm_sym108__) { + if (lcm_sym105__) { current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", @@ -2251,7 +2174,7 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "p"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", @@ -2262,10 +2185,10 @@ class copy_fail_model final : public model_base_crtp { } } } current_statement__ = 4; - if (lcm_sym107__) { - lcm_sym118__ = (n_occasions - 1); - lcm_sym108__ = logical_gte(lcm_sym118__, 1); - if (lcm_sym108__) { + if (lcm_sym104__) { + lcm_sym115__ = (n_occasions - 1); + lcm_sym105__ = logical_gte(lcm_sym115__, 1); + if (lcm_sym105__) { current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", @@ -2273,7 +2196,7 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "p"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", @@ -2284,7 +2207,7 @@ class copy_fail_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; - if (lcm_sym108__) { + if (lcm_sym105__) { current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", @@ -2292,7 +2215,7 @@ class copy_fail_model final : public model_base_crtp { cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "p"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", @@ -2303,9 +2226,9 @@ class copy_fail_model final : public model_base_crtp { } } } current_statement__ = 5; - if (lcm_sym107__) { - lcm_sym106__ = logical_gte(n_occasions, 1); - if (lcm_sym106__) { + if (lcm_sym104__) { + lcm_sym103__ = logical_gte(n_occasions, 1); + if (lcm_sym103__) { current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", @@ -2326,7 +2249,7 @@ class copy_fail_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; - if (lcm_sym106__) { + if (lcm_sym103__) { current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", @@ -2347,9 +2270,9 @@ class copy_fail_model final : public model_base_crtp { } } } current_statement__ = 5; - if (lcm_sym107__) { - lcm_sym106__ = logical_gte(n_occasions, 1); - if (lcm_sym106__) { + if (lcm_sym104__) { + lcm_sym103__ = logical_gte(n_occasions, 1); + if (lcm_sym103__) { current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", @@ -2369,7 +2292,7 @@ class copy_fail_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; - if (lcm_sym106__) { + if (lcm_sym103__) { current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", @@ -2390,27 +2313,27 @@ class copy_fail_model final : public model_base_crtp { } { current_statement__ = 30; - if (lcm_sym107__) { - lcm_sym148__ = first[(1 - 1)]; - if (logical_gt(lcm_sym148__, 0)) { - lcm_sym154__ = last[(1 - 1)]; - lcm_sym126__ = (lcm_sym148__ + 1); - if (logical_gte(lcm_sym154__, lcm_sym126__)) { + if (lcm_sym104__) { + lcm_sym141__ = first[(1 - 1)]; + if (logical_gt(lcm_sym141__, 0)) { + lcm_sym147__ = last[(1 - 1)]; + lcm_sym123__ = (lcm_sym141__ + 1); + if (logical_gte(lcm_sym147__, lcm_sym123__)) { current_statement__ = 24; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, cons_list(index_uni(1), - cons_list(index_uni((lcm_sym126__ - 1)), + cons_list(index_uni((lcm_sym123__ - 1)), nil_index_list())), "phi"))); - lcm_sym124__ = (lcm_sym126__ + 1); + lcm_sym121__ = (lcm_sym123__ + 1); lp_accum__.add( - bernoulli_lpmf(y[(1 - 1)][(lcm_sym126__ - 1)], + bernoulli_lpmf(y[(1 - 1)][(lcm_sym123__ - 1)], rvalue(p, cons_list(index_uni(1), - cons_list(index_uni((lcm_sym126__ - 1)), + cons_list(index_uni((lcm_sym123__ - 1)), nil_index_list())), "p"))); - for (int t = lcm_sym124__; t <= lcm_sym154__; ++t) { + for (int t = lcm_sym121__; t <= lcm_sym147__; ++t) { current_statement__ = 24; lp_accum__.add( bernoulli_lpmf(1, @@ -2431,30 +2354,30 @@ class copy_fail_model final : public model_base_crtp { bernoulli_lpmf(1, rvalue(inline_sym9__, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym154__), nil_index_list())), + cons_list(index_uni(lcm_sym147__), nil_index_list())), "inline_sym9__"))); } for (int i = 2; i <= nind; ++i) { - lcm_sym147__ = first[(i - 1)]; - if (logical_gt(lcm_sym147__, 0)) { - lcm_sym153__ = last[(i - 1)]; - lcm_sym125__ = (lcm_sym147__ + 1); - if (logical_gte(lcm_sym153__, lcm_sym125__)) { + lcm_sym140__ = first[(i - 1)]; + if (logical_gt(lcm_sym140__, 0)) { + lcm_sym146__ = last[(i - 1)]; + lcm_sym122__ = (lcm_sym140__ + 1); + if (logical_gte(lcm_sym146__, lcm_sym122__)) { current_statement__ = 24; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, cons_list(index_uni(i), - cons_list(index_uni((lcm_sym125__ - 1)), + cons_list(index_uni((lcm_sym122__ - 1)), nil_index_list())), "phi"))); - lcm_sym123__ = (lcm_sym125__ + 1); + lcm_sym120__ = (lcm_sym122__ + 1); lp_accum__.add( - bernoulli_lpmf(y[(i - 1)][(lcm_sym125__ - 1)], + bernoulli_lpmf(y[(i - 1)][(lcm_sym122__ - 1)], rvalue(p, cons_list(index_uni(i), - cons_list(index_uni((lcm_sym125__ - 1)), + cons_list(index_uni((lcm_sym122__ - 1)), nil_index_list())), "p"))); - for (int t = lcm_sym123__; t <= lcm_sym153__; ++t) { + for (int t = lcm_sym120__; t <= lcm_sym146__; ++t) { current_statement__ = 24; lp_accum__.add( bernoulli_lpmf(1, @@ -2475,7 +2398,7 @@ class copy_fail_model final : public model_base_crtp { bernoulli_lpmf(1, rvalue(inline_sym9__, cons_list(index_uni(i), - cons_list(index_uni(lcm_sym153__), nil_index_list())), + cons_list(index_uni(lcm_sym146__), nil_index_list())), "inline_sym9__"))); } } } @@ -2507,8 +2430,6 @@ class copy_fail_model final : public model_base_crtp { (void) function__; // suppress unused var warning try { - double lcm_sym104__; - double lcm_sym103__; double lcm_sym102__; double lcm_sym101__; double lcm_sym100__; @@ -2528,14 +2449,16 @@ class copy_fail_model final : public model_base_crtp { double lcm_sym86__; double lcm_sym85__; double lcm_sym84__; - int lcm_sym83__; - int lcm_sym82__; - double lcm_sym81__; - double lcm_sym80__; + double lcm_sym83__; + double lcm_sym82__; + int lcm_sym81__; + int lcm_sym80__; double lcm_sym79__; double lcm_sym78__; double lcm_sym77__; double lcm_sym76__; + double lcm_sym75__; + double lcm_sym74__; double lcm_sym73__; double lcm_sym72__; int lcm_sym71__; @@ -2560,27 +2483,15 @@ class copy_fail_model final : public model_base_crtp { mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_p = in__.scalar(); - current_statement__ = 1; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); + mean_p = in__.read_lub(0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - beta = in__.vector(max_age); - lcm_sym54__ = logical_gte(max_age, 1); - if (lcm_sym54__) { - current_statement__ = 2; - assign(beta, cons_list(index_uni(1), nil_index_list()), - stan::math::lub_constrain(beta[(1 - 1)], 0, 1), - "assigning variable beta"); - for (int sym1__ = 2; sym1__ <= max_age; ++sym1__) { - current_statement__ = 2; - assign(beta, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(beta[(sym1__ - 1)], 0, 1), - "assigning variable beta");} - } + assign(beta, nil_index_list(), + in__.read_lub, jacobian__>(0, + 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -2594,7 +2505,7 @@ class copy_fail_model final : public model_base_crtp { stan::math::fill(chi, DUMMY_VAR__); vars__.emplace_back(mean_p); - if (lcm_sym54__) { + if (logical_gte(max_age, 1)) { vars__.emplace_back(beta[(1 - 1)]); for (int sym1__ = 2; sym1__ <= max_age; ++sym1__) { vars__.emplace_back(beta[(sym1__ - 1)]);} @@ -2605,8 +2516,8 @@ class copy_fail_model final : public model_base_crtp { } lcm_sym56__ = logical_gte(nind, 1); if (lcm_sym56__) { - lcm_sym83__ = first[(1 - 1)]; - lcm_sym65__ = (lcm_sym83__ - 1); + lcm_sym81__ = first[(1 - 1)]; + lcm_sym65__ = (lcm_sym81__ - 1); if (logical_gte(lcm_sym65__, 1)) { current_statement__ = 6; assign(phi, @@ -2631,17 +2542,17 @@ class copy_fail_model final : public model_base_crtp { "assigning variable p");} } lcm_sym63__ = (n_occasions - 1); - if (logical_gte(lcm_sym63__, lcm_sym83__)) { + if (logical_gte(lcm_sym63__, lcm_sym81__)) { current_statement__ = 9; assign(phi, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym83__), nil_index_list())), - beta[(x[(1 - 1)][(lcm_sym83__ - 1)] - 1)], + cons_list(index_uni(lcm_sym81__), nil_index_list())), + beta[(x[(1 - 1)][(lcm_sym81__ - 1)] - 1)], "assigning variable phi"); - lcm_sym71__ = (lcm_sym83__ + 1); + lcm_sym71__ = (lcm_sym81__ + 1); assign(p, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym83__), nil_index_list())), mean_p, + cons_list(index_uni(lcm_sym81__), nil_index_list())), mean_p, "assigning variable p"); for (int t = lcm_sym71__; t <= lcm_sym63__; ++t) { current_statement__ = 9; @@ -2656,8 +2567,8 @@ class copy_fail_model final : public model_base_crtp { "assigning variable p");} } for (int i = 2; i <= nind; ++i) { - lcm_sym82__ = first[(i - 1)]; - lcm_sym64__ = (lcm_sym82__ - 1); + lcm_sym80__ = first[(i - 1)]; + lcm_sym64__ = (lcm_sym80__ - 1); if (logical_gte(lcm_sym64__, 1)) { current_statement__ = 6; assign(phi, @@ -2682,17 +2593,17 @@ class copy_fail_model final : public model_base_crtp { "assigning variable p");} } current_statement__ = 12; - if (logical_gte(lcm_sym63__, lcm_sym82__)) { + if (logical_gte(lcm_sym63__, lcm_sym80__)) { current_statement__ = 9; assign(phi, cons_list(index_uni(i), - cons_list(index_uni(lcm_sym82__), nil_index_list())), - beta[(x[(i - 1)][(lcm_sym82__ - 1)] - 1)], + cons_list(index_uni(lcm_sym80__), nil_index_list())), + beta[(x[(i - 1)][(lcm_sym80__ - 1)] - 1)], "assigning variable phi"); - lcm_sym70__ = (lcm_sym82__ + 1); + lcm_sym70__ = (lcm_sym80__ + 1); assign(p, cons_list(index_uni(i), - cons_list(index_uni(lcm_sym82__), nil_index_list())), mean_p, + cons_list(index_uni(lcm_sym80__), nil_index_list())), mean_p, "assigning variable p"); for (int t = lcm_sym70__; t <= lcm_sym63__; ++t) { current_statement__ = 9; @@ -3271,30 +3182,30 @@ class copy_fail_model final : public model_base_crtp { final { param_names__.emplace_back(std::string() + "mean_p"); - for (int sym194__ = 1; sym194__ <= max_age; ++sym194__) { + for (int sym187__ = 1; sym187__ <= max_age; ++sym187__) { { - param_names__.emplace_back(std::string() + "beta" + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "beta" + '.' + std::to_string(sym187__)); }} if (emit_transformed_parameters__) { - for (int sym194__ = 1; sym194__ <= n_occ_minus_1; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occ_minus_1; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} - for (int sym194__ = 1; sym194__ <= n_occ_minus_1; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occ_minus_1; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} - for (int sym194__ = 1; sym194__ <= n_occasions; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occasions; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} } @@ -3312,30 +3223,30 @@ class copy_fail_model final : public model_base_crtp { final { param_names__.emplace_back(std::string() + "mean_p"); - for (int sym194__ = 1; sym194__ <= max_age; ++sym194__) { + for (int sym187__ = 1; sym187__ <= max_age; ++sym187__) { { - param_names__.emplace_back(std::string() + "beta" + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "beta" + '.' + std::to_string(sym187__)); }} if (emit_transformed_parameters__) { - for (int sym194__ = 1; sym194__ <= n_occ_minus_1; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occ_minus_1; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} - for (int sym194__ = 1; sym194__ <= n_occ_minus_1; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occ_minus_1; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} - for (int sym194__ = 1; sym194__ <= n_occasions; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occasions; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} } @@ -4006,135 +3917,97 @@ class dce_fail_model final : public model_base_crtp { sigma = DUMMY_VAR__; current_statement__ = 1; - sigma = in__.scalar(); - current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - sigma = stan::math::lb_constrain(sigma, 0, lp__); - } else { - current_statement__ = 1; - sigma = stan::math::lb_constrain(sigma, 0); - } + sigma = in__.read_lb(0, lp__); local_scalar_t__ sigma_age; sigma_age = DUMMY_VAR__; current_statement__ = 2; - sigma_age = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - sigma_age = stan::math::lb_constrain(sigma_age, 0, lp__); - } else { - current_statement__ = 2; - sigma_age = stan::math::lb_constrain(sigma_age, 0); - } + sigma_age = in__.read_lb(0, lp__); local_scalar_t__ sigma_edu; sigma_edu = DUMMY_VAR__; current_statement__ = 3; - sigma_edu = in__.scalar(); - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - sigma_edu = stan::math::lb_constrain(sigma_edu, 0, lp__); - } else { - current_statement__ = 3; - sigma_edu = stan::math::lb_constrain(sigma_edu, 0); - } + sigma_edu = in__.read_lb(0, lp__); local_scalar_t__ sigma_state; sigma_state = DUMMY_VAR__; current_statement__ = 4; - sigma_state = in__.scalar(); - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - sigma_state = stan::math::lb_constrain(sigma_state, 0, lp__); - } else { - current_statement__ = 4; - sigma_state = stan::math::lb_constrain(sigma_state, 0); - } + sigma_state = in__.read_lb(0, lp__); local_scalar_t__ sigma_region; sigma_region = DUMMY_VAR__; current_statement__ = 5; - sigma_region = in__.scalar(); - current_statement__ = 5; - if (jacobian__) { - current_statement__ = 5; - sigma_region = stan::math::lb_constrain(sigma_region, 0, lp__); - } else { - current_statement__ = 5; - sigma_region = stan::math::lb_constrain(sigma_region, 0); - } + sigma_region = in__.read_lb(0, lp__); local_scalar_t__ sigma_age_edu; sigma_age_edu = DUMMY_VAR__; current_statement__ = 6; - sigma_age_edu = in__.scalar(); - current_statement__ = 6; - if (jacobian__) { - current_statement__ = 6; - sigma_age_edu = stan::math::lb_constrain(sigma_age_edu, 0, lp__); - } else { - current_statement__ = 6; - sigma_age_edu = stan::math::lb_constrain(sigma_age_edu, 0); - } + sigma_age_edu = in__.read_lb(0, lp__); local_scalar_t__ b_0; b_0 = DUMMY_VAR__; current_statement__ = 7; - b_0 = in__.scalar(); + b_0 = in__.read(lp__); local_scalar_t__ b_female; b_female = DUMMY_VAR__; current_statement__ = 8; - b_female = in__.scalar(); + b_female = in__.read(lp__); local_scalar_t__ b_black; b_black = DUMMY_VAR__; current_statement__ = 9; - b_black = in__.scalar(); + b_black = in__.read(lp__); local_scalar_t__ b_female_black; b_female_black = DUMMY_VAR__; current_statement__ = 10; - b_female_black = in__.scalar(); + b_female_black = in__.read(lp__); local_scalar_t__ b_v_prev; b_v_prev = DUMMY_VAR__; current_statement__ = 11; - b_v_prev = in__.scalar(); + b_v_prev = in__.read(lp__); Eigen::Matrix b_age; b_age = Eigen::Matrix(n_age); stan::math::fill(b_age, DUMMY_VAR__); current_statement__ = 12; - b_age = in__.vector(n_age); + assign(b_age, nil_index_list(), + in__.read, jacobian__>(lp__, + n_age), "assigning variable b_age"); Eigen::Matrix b_edu; b_edu = Eigen::Matrix(n_edu); stan::math::fill(b_edu, DUMMY_VAR__); current_statement__ = 13; - b_edu = in__.vector(n_edu); + assign(b_edu, nil_index_list(), + in__.read, jacobian__>(lp__, + n_edu), "assigning variable b_edu"); Eigen::Matrix b_region; b_region = Eigen::Matrix(n_region); stan::math::fill(b_region, DUMMY_VAR__); current_statement__ = 14; - b_region = in__.vector(n_region); + assign(b_region, nil_index_list(), + in__.read, jacobian__>(lp__, + n_region), "assigning variable b_region"); Eigen::Matrix b_age_edu; b_age_edu = Eigen::Matrix(n_age, n_edu); stan::math::fill(b_age_edu, DUMMY_VAR__); current_statement__ = 15; - b_age_edu = in__.matrix(n_age, n_edu); + assign(b_age_edu, nil_index_list(), + in__.read, jacobian__>(lp__, + n_age, n_edu), "assigning variable b_age_edu"); Eigen::Matrix b_hat; b_hat = Eigen::Matrix(n_state); stan::math::fill(b_hat, DUMMY_VAR__); current_statement__ = 16; - b_hat = in__.vector(n_state); + assign(b_hat, nil_index_list(), + in__.read, jacobian__>(lp__, + n_state), "assigning variable b_hat"); { current_statement__ = 17; validate_non_negative_index("p", "N", N); @@ -4309,99 +4182,97 @@ class dce_fail_model final : public model_base_crtp { sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - sigma = in__.scalar(); - current_statement__ = 1; - sigma = stan::math::lb_constrain(sigma, 0); + sigma = in__.read_lb(0, lp__); double sigma_age; sigma_age = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - sigma_age = in__.scalar(); - current_statement__ = 2; - sigma_age = stan::math::lb_constrain(sigma_age, 0); + sigma_age = in__.read_lb(0, lp__); double sigma_edu; sigma_edu = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - sigma_edu = in__.scalar(); - current_statement__ = 3; - sigma_edu = stan::math::lb_constrain(sigma_edu, 0); + sigma_edu = in__.read_lb(0, lp__); double sigma_state; sigma_state = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma_state = in__.scalar(); - current_statement__ = 4; - sigma_state = stan::math::lb_constrain(sigma_state, 0); + sigma_state = in__.read_lb(0, lp__); double sigma_region; sigma_region = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - sigma_region = in__.scalar(); - current_statement__ = 5; - sigma_region = stan::math::lb_constrain(sigma_region, 0); + sigma_region = in__.read_lb(0, lp__); double sigma_age_edu; sigma_age_edu = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - sigma_age_edu = in__.scalar(); - current_statement__ = 6; - sigma_age_edu = stan::math::lb_constrain(sigma_age_edu, 0); + sigma_age_edu = in__.read_lb(0, lp__); double b_0; b_0 = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - b_0 = in__.scalar(); + b_0 = in__.read(lp__); double b_female; b_female = std::numeric_limits::quiet_NaN(); current_statement__ = 8; - b_female = in__.scalar(); + b_female = in__.read(lp__); double b_black; b_black = std::numeric_limits::quiet_NaN(); current_statement__ = 9; - b_black = in__.scalar(); + b_black = in__.read(lp__); double b_female_black; b_female_black = std::numeric_limits::quiet_NaN(); current_statement__ = 10; - b_female_black = in__.scalar(); + b_female_black = in__.read(lp__); double b_v_prev; b_v_prev = std::numeric_limits::quiet_NaN(); current_statement__ = 11; - b_v_prev = in__.scalar(); + b_v_prev = in__.read(lp__); Eigen::Matrix b_age; b_age = Eigen::Matrix(n_age); stan::math::fill(b_age, std::numeric_limits::quiet_NaN()); current_statement__ = 12; - b_age = in__.vector(n_age); + assign(b_age, nil_index_list(), + in__.read, jacobian__>(lp__, + n_age), "assigning variable b_age"); Eigen::Matrix b_edu; b_edu = Eigen::Matrix(n_edu); stan::math::fill(b_edu, std::numeric_limits::quiet_NaN()); current_statement__ = 13; - b_edu = in__.vector(n_edu); + assign(b_edu, nil_index_list(), + in__.read, jacobian__>(lp__, + n_edu), "assigning variable b_edu"); Eigen::Matrix b_region; b_region = Eigen::Matrix(n_region); stan::math::fill(b_region, std::numeric_limits::quiet_NaN()); current_statement__ = 14; - b_region = in__.vector(n_region); + assign(b_region, nil_index_list(), + in__.read, jacobian__>(lp__, + n_region), "assigning variable b_region"); Eigen::Matrix b_age_edu; b_age_edu = Eigen::Matrix(n_age, n_edu); stan::math::fill(b_age_edu, std::numeric_limits::quiet_NaN()); current_statement__ = 15; - b_age_edu = in__.matrix(n_age, n_edu); + assign(b_age_edu, nil_index_list(), + in__.read, jacobian__>(lp__, + n_age, n_edu), "assigning variable b_age_edu"); Eigen::Matrix b_hat; b_hat = Eigen::Matrix(n_state); stan::math::fill(b_hat, std::numeric_limits::quiet_NaN()); current_statement__ = 16; - b_hat = in__.vector(n_state); + assign(b_hat, nil_index_list(), + in__.read, jacobian__>(lp__, + n_state), "assigning variable b_hat"); vars__.emplace_back(sigma); vars__.emplace_back(sigma_age); vars__.emplace_back(sigma_edu); @@ -5792,10 +5663,10 @@ static const std::vector locations_array__ = class expr_prop_fail_model final : public model_base_crtp { private: - double lcm_sym31__; - double lcm_sym30__; - int lcm_sym29__; - int lcm_sym28__; + double lcm_sym25__; + double lcm_sym24__; + int lcm_sym23__; + int lcm_sym22__; int N; Eigen::Matrix y; @@ -5901,84 +5772,32 @@ class expr_prop_fail_model final : public model_base_crtp (void) function__; // suppress unused var warning try { - local_scalar_t__ lcm_sym27__; - double lcm_sym25__; - double lcm_sym23__; - double lcm_sym22__; double lcm_sym21__; double lcm_sym20__; double lcm_sym19__; - int lcm_sym18__; + double lcm_sym18__; + double lcm_sym17__; + int lcm_sym16__; Eigen::Matrix mu; mu = Eigen::Matrix(2); stan::math::fill(mu, DUMMY_VAR__); current_statement__ = 1; - mu = in__.vector(2); - current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - assign(mu, nil_index_list(), stan::math::ordered_constrain(mu, lp__), - "assigning variable mu"); - } else { - current_statement__ = 1; - assign(mu, nil_index_list(), stan::math::ordered_constrain(mu), - "assigning variable mu"); - } + assign(mu, nil_index_list(), + in__.read_ordered, jacobian__>( + lp__, 2), "assigning variable mu"); std::vector sigma; sigma = std::vector(2, DUMMY_VAR__); - { - current_statement__ = 2; - assign(sigma, cons_list(index_uni(1), nil_index_list()), - in__.scalar(), "assigning variable sigma"); - { - current_statement__ = 2; - assign(sigma, cons_list(index_uni(2), nil_index_list()), - in__.scalar(), "assigning variable sigma"); - } - } - { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(sigma, cons_list(index_uni(1), nil_index_list()), - stan::math::lb_constrain(sigma[(1 - 1)], 0, lp__), - "assigning variable sigma"); - } else { - current_statement__ = 2; - assign(sigma, cons_list(index_uni(1), nil_index_list()), - stan::math::lb_constrain(sigma[(1 - 1)], 0), - "assigning variable sigma"); - } - { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(sigma, cons_list(index_uni(2), nil_index_list()), - stan::math::lb_constrain(sigma[(2 - 1)], 0, lp__), - "assigning variable sigma"); - } else { - current_statement__ = 2; - assign(sigma, cons_list(index_uni(2), nil_index_list()), - stan::math::lb_constrain(sigma[(2 - 1)], 0), - "assigning variable sigma"); - } - } - } + current_statement__ = 2; + assign(sigma, nil_index_list(), + in__.read_lb, jacobian__>(0, lp__, 2), + "assigning variable sigma"); local_scalar_t__ theta; theta = DUMMY_VAR__; current_statement__ = 3; - theta = in__.scalar(); - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - theta = stan::math::lub_constrain(theta, 0, 1, lp__); - } else { - current_statement__ = 3; - theta = stan::math::lub_constrain(theta, 0, 1); - } + theta = in__.read_lub(0, 1, lp__); { current_statement__ = 4; lp_accum__.add(normal_lpdf(sigma, 0, 2)); @@ -5988,16 +5807,16 @@ class expr_prop_fail_model final : public model_base_crtp lp_accum__.add(beta_lpdf(theta, 5, 5)); current_statement__ = 8; if (logical_gte(N, 1)) { - lcm_sym27__ = sigma[(1 - 1)]; + current_statement__ = 7; lp_accum__.add( log_mix(theta, - normal_lpdf(y[(1 - 1)], mu[(1 - 1)], lcm_sym27__), + normal_lpdf(y[(1 - 1)], mu[(1 - 1)], sigma[(1 - 1)]), normal_lpdf(y[(1 - 1)], mu[(2 - 1)], sigma[(2 - 1)]))); for (int n = 2; n <= N; ++n) { current_statement__ = 7; lp_accum__.add( log_mix(theta, - normal_lpdf(y[(n - 1)], mu[(1 - 1)], lcm_sym27__), + normal_lpdf(y[(n - 1)], mu[(1 - 1)], sigma[(1 - 1)]), normal_lpdf(y[(n - 1)], mu[(2 - 1)], sigma[(2 - 1)]))); } } @@ -6029,10 +5848,10 @@ class expr_prop_fail_model final : public model_base_crtp (void) function__; // suppress unused var warning try { - double lcm_sym17__; - double lcm_sym16__; double lcm_sym15__; double lcm_sym14__; + double lcm_sym13__; + double lcm_sym12__; int lcm_sym11__; int lcm_sym10__; Eigen::Matrix mu; @@ -6040,42 +5859,21 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::fill(mu, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - mu = in__.vector(2); - current_statement__ = 1; - assign(mu, nil_index_list(), stan::math::ordered_constrain(mu), - "assigning variable mu"); + assign(mu, nil_index_list(), + in__.read_ordered, jacobian__>( + lp__, 2), "assigning variable mu"); std::vector sigma; sigma = std::vector(2, std::numeric_limits::quiet_NaN()); - { - current_statement__ = 2; - assign(sigma, cons_list(index_uni(1), nil_index_list()), - in__.scalar(), "assigning variable sigma"); - { - current_statement__ = 2; - assign(sigma, cons_list(index_uni(2), nil_index_list()), - in__.scalar(), "assigning variable sigma"); - } - } - { - current_statement__ = 2; - assign(sigma, cons_list(index_uni(1), nil_index_list()), - stan::math::lb_constrain(sigma[(1 - 1)], 0), - "assigning variable sigma"); - { - current_statement__ = 2; - assign(sigma, cons_list(index_uni(2), nil_index_list()), - stan::math::lb_constrain(sigma[(2 - 1)], 0), - "assigning variable sigma"); - } - } + current_statement__ = 2; + assign(sigma, nil_index_list(), + in__.read_lb, jacobian__>(0, lp__, 2), + "assigning variable sigma"); double theta; theta = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - theta = in__.scalar(); - current_statement__ = 3; - theta = stan::math::lub_constrain(theta, 0, 1); + theta = in__.read_lub(0, 1, lp__); { vars__.emplace_back(mu[(1 - 1)]); { @@ -6233,13 +6031,13 @@ class expr_prop_fail_model final : public model_base_crtp bool emit_generated_quantities__ = true) const final { - for (int sym32__ = 1; sym32__ <= 2; ++sym32__) { + for (int sym26__ = 1; sym26__ <= 2; ++sym26__) { { - param_names__.emplace_back(std::string() + "mu" + '.' + std::to_string(sym32__)); + param_names__.emplace_back(std::string() + "mu" + '.' + std::to_string(sym26__)); }} - for (int sym32__ = 1; sym32__ <= 2; ++sym32__) { + for (int sym26__ = 1; sym26__ <= 2; ++sym26__) { { - param_names__.emplace_back(std::string() + "sigma" + '.' + std::to_string(sym32__)); + param_names__.emplace_back(std::string() + "sigma" + '.' + std::to_string(sym26__)); }} param_names__.emplace_back(std::string() + "theta"); if (emit_transformed_parameters__) { @@ -6258,13 +6056,13 @@ class expr_prop_fail_model final : public model_base_crtp bool emit_generated_quantities__ = true) const final { - for (int sym32__ = 1; sym32__ <= 2; ++sym32__) { + for (int sym26__ = 1; sym26__ <= 2; ++sym26__) { { - param_names__.emplace_back(std::string() + "mu" + '.' + std::to_string(sym32__)); + param_names__.emplace_back(std::string() + "mu" + '.' + std::to_string(sym26__)); }} - for (int sym32__ = 1; sym32__ <= 2; ++sym32__) { + for (int sym26__ = 1; sym26__ <= 2; ++sym26__) { { - param_names__.emplace_back(std::string() + "sigma" + '.' + std::to_string(sym32__)); + param_names__.emplace_back(std::string() + "sigma" + '.' + std::to_string(sym26__)); }} param_names__.emplace_back(std::string() + "theta"); if (emit_transformed_parameters__) { @@ -6415,9 +6213,9 @@ static const std::vector locations_array__ = class expr_prop_fail2_model final : public model_base_crtp { private: - double lcm_sym14__; double lcm_sym13__; - int lcm_sym12__; + double lcm_sym12__; + int lcm_sym11__; int J; std::vector y; std::vector sigma; @@ -6526,40 +6324,25 @@ class expr_prop_fail2_model final : public model_base_crtp(lp__); std::vector theta; theta = std::vector(J, DUMMY_VAR__); current_statement__ = 2; - if (logical_gte(J, 1)) { - current_statement__ = 2; - assign(theta, cons_list(index_uni(1), nil_index_list()), - in__.scalar(), "assigning variable theta"); - for (int sym1__ = 2; sym1__ <= J; ++sym1__) { - current_statement__ = 2; - assign(theta, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable theta");} - } + assign(theta, nil_index_list(), + in__.read, jacobian__>(lp__, J), + "assigning variable theta"); local_scalar_t__ tau; tau = DUMMY_VAR__; current_statement__ = 3; - tau = in__.scalar(); - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - tau = stan::math::lb_constrain(tau, 0, lp__); - } else { - current_statement__ = 3; - tau = stan::math::lb_constrain(tau, 0); - } + tau = in__.read_lb(0, lp__); { current_statement__ = 4; lp_accum__.add(normal_lpdf(theta, mu, tau)); @@ -6602,29 +6385,21 @@ class expr_prop_fail2_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mu = in__.scalar(); + mu = in__.read(lp__); std::vector theta; theta = std::vector(J, std::numeric_limits::quiet_NaN()); - lcm_sym4__ = logical_gte(J, 1); - if (lcm_sym4__) { - current_statement__ = 2; - assign(theta, cons_list(index_uni(1), nil_index_list()), - in__.scalar(), "assigning variable theta"); - for (int sym1__ = 2; sym1__ <= J; ++sym1__) { - current_statement__ = 2; - assign(theta, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable theta");} - } + current_statement__ = 2; + assign(theta, nil_index_list(), + in__.read, jacobian__>(lp__, J), + "assigning variable theta"); double tau; tau = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - tau = in__.scalar(); - current_statement__ = 3; - tau = stan::math::lb_constrain(tau, 0); + tau = in__.read_lb(0, lp__); vars__.emplace_back(mu); - if (lcm_sym4__) { + if (logical_gte(J, 1)) { vars__.emplace_back(theta[(1 - 1)]); for (int sym1__ = 2; sym1__ <= J; ++sym1__) { vars__.emplace_back(theta[(sym1__ - 1)]);} @@ -6720,9 +6495,9 @@ class expr_prop_fail2_model final : public model_base_crtp, jacobian__>(lp__, + n_age), "assigning variable a"); Eigen::Matrix b; b = Eigen::Matrix(n_edu); stan::math::fill(b, DUMMY_VAR__); current_statement__ = 2; - b = in__.vector(n_edu); + assign(b, nil_index_list(), + in__.read, jacobian__>(lp__, + n_edu), "assigning variable b"); Eigen::Matrix c; c = Eigen::Matrix(n_age_edu); stan::math::fill(c, DUMMY_VAR__); current_statement__ = 3; - c = in__.vector(n_age_edu); + assign(c, nil_index_list(), + in__.read, jacobian__>(lp__, + n_age_edu), "assigning variable c"); Eigen::Matrix d; d = Eigen::Matrix(n_state); stan::math::fill(d, DUMMY_VAR__); current_statement__ = 4; - d = in__.vector(n_state); + assign(d, nil_index_list(), + in__.read, jacobian__>(lp__, + n_state), "assigning variable d"); Eigen::Matrix e; e = Eigen::Matrix(n_region_full); stan::math::fill(e, DUMMY_VAR__); current_statement__ = 5; - e = in__.vector(n_region_full); + assign(e, nil_index_list(), + in__.read, jacobian__>(lp__, + n_region_full), "assigning variable e"); Eigen::Matrix beta; beta = Eigen::Matrix(5); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 6; - beta = in__.vector(5); + assign(beta, nil_index_list(), + in__.read, jacobian__>(lp__, + 5), "assigning variable beta"); local_scalar_t__ sigma_a; sigma_a = DUMMY_VAR__; current_statement__ = 7; - sigma_a = in__.scalar(); - current_statement__ = 7; - if (jacobian__) { - current_statement__ = 7; - sigma_a = stan::math::lub_constrain(sigma_a, 0, 100, lp__); - } else { - current_statement__ = 7; - sigma_a = stan::math::lub_constrain(sigma_a, 0, 100); - } + sigma_a = in__.read_lub(0, 100, lp__); local_scalar_t__ sigma_b; sigma_b = DUMMY_VAR__; current_statement__ = 8; - sigma_b = in__.scalar(); - current_statement__ = 8; - if (jacobian__) { - current_statement__ = 8; - sigma_b = stan::math::lub_constrain(sigma_b, 0, 100, lp__); - } else { - current_statement__ = 8; - sigma_b = stan::math::lub_constrain(sigma_b, 0, 100); - } + sigma_b = in__.read_lub(0, 100, lp__); local_scalar_t__ sigma_c; sigma_c = DUMMY_VAR__; current_statement__ = 9; - sigma_c = in__.scalar(); - current_statement__ = 9; - if (jacobian__) { - current_statement__ = 9; - sigma_c = stan::math::lub_constrain(sigma_c, 0, 100, lp__); - } else { - current_statement__ = 9; - sigma_c = stan::math::lub_constrain(sigma_c, 0, 100); - } + sigma_c = in__.read_lub(0, 100, lp__); local_scalar_t__ sigma_d; sigma_d = DUMMY_VAR__; current_statement__ = 10; - sigma_d = in__.scalar(); - current_statement__ = 10; - if (jacobian__) { - current_statement__ = 10; - sigma_d = stan::math::lub_constrain(sigma_d, 0, 100, lp__); - } else { - current_statement__ = 10; - sigma_d = stan::math::lub_constrain(sigma_d, 0, 100); - } + sigma_d = in__.read_lub(0, 100, lp__); local_scalar_t__ sigma_e; sigma_e = DUMMY_VAR__; current_statement__ = 11; - sigma_e = in__.scalar(); - current_statement__ = 11; - if (jacobian__) { - current_statement__ = 11; - sigma_e = stan::math::lub_constrain(sigma_e, 0, 100, lp__); - } else { - current_statement__ = 11; - sigma_e = stan::math::lub_constrain(sigma_e, 0, 100); - } + sigma_e = in__.read_lub(0, 100, lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -7684,72 +7431,74 @@ class expr_prop_fail3_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 1; - a = in__.vector(n_age); + assign(a, nil_index_list(), + in__.read, jacobian__>(lp__, + n_age), "assigning variable a"); Eigen::Matrix b; b = Eigen::Matrix(n_edu); stan::math::fill(b, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - b = in__.vector(n_edu); + assign(b, nil_index_list(), + in__.read, jacobian__>(lp__, + n_edu), "assigning variable b"); Eigen::Matrix c; c = Eigen::Matrix(n_age_edu); stan::math::fill(c, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - c = in__.vector(n_age_edu); + assign(c, nil_index_list(), + in__.read, jacobian__>(lp__, + n_age_edu), "assigning variable c"); Eigen::Matrix d; d = Eigen::Matrix(n_state); stan::math::fill(d, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - d = in__.vector(n_state); + assign(d, nil_index_list(), + in__.read, jacobian__>(lp__, + n_state), "assigning variable d"); Eigen::Matrix e; e = Eigen::Matrix(n_region_full); stan::math::fill(e, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - e = in__.vector(n_region_full); + assign(e, nil_index_list(), + in__.read, jacobian__>(lp__, + n_region_full), "assigning variable e"); Eigen::Matrix beta; beta = Eigen::Matrix(5); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - beta = in__.vector(5); + assign(beta, nil_index_list(), + in__.read, jacobian__>(lp__, + 5), "assigning variable beta"); double sigma_a; sigma_a = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - sigma_a = in__.scalar(); - current_statement__ = 7; - sigma_a = stan::math::lub_constrain(sigma_a, 0, 100); + sigma_a = in__.read_lub(0, 100, lp__); double sigma_b; sigma_b = std::numeric_limits::quiet_NaN(); current_statement__ = 8; - sigma_b = in__.scalar(); - current_statement__ = 8; - sigma_b = stan::math::lub_constrain(sigma_b, 0, 100); + sigma_b = in__.read_lub(0, 100, lp__); double sigma_c; sigma_c = std::numeric_limits::quiet_NaN(); current_statement__ = 9; - sigma_c = in__.scalar(); - current_statement__ = 9; - sigma_c = stan::math::lub_constrain(sigma_c, 0, 100); + sigma_c = in__.read_lub(0, 100, lp__); double sigma_d; sigma_d = std::numeric_limits::quiet_NaN(); current_statement__ = 10; - sigma_d = in__.scalar(); - current_statement__ = 10; - sigma_d = stan::math::lub_constrain(sigma_d, 0, 100); + sigma_d = in__.read_lub(0, 100, lp__); double sigma_e; sigma_e = std::numeric_limits::quiet_NaN(); current_statement__ = 11; - sigma_e = in__.scalar(); - current_statement__ = 11; - sigma_e = stan::math::lub_constrain(sigma_e, 0, 100); + sigma_e = in__.read_lub(0, 100, lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -8733,21 +8482,15 @@ class expr_prop_fail4_model final : public model_base_crtp(0, lp__); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix((N - 1)); stan::math::fill(phi_std_raw, DUMMY_VAR__); lcm_sym39__ = (N - 1); - phi_std_raw = in__.vector(lcm_sym39__); + assign(phi_std_raw, nil_index_list(), + in__.read, jacobian__>(lp__, + lcm_sym39__), "assigning variable phi_std_raw"); local_scalar_t__ sigma_phi; sigma_phi = DUMMY_VAR__; @@ -8838,15 +8581,15 @@ class expr_prop_fail4_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - tau_phi = in__.scalar(); - current_statement__ = 1; - tau_phi = stan::math::lb_constrain(tau_phi, 0); + tau_phi = in__.read_lb(0, lp__); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix((N - 1)); stan::math::fill(phi_std_raw, std::numeric_limits::quiet_NaN()); lcm_sym20__ = (N - 1); - phi_std_raw = in__.vector(lcm_sym20__); + assign(phi_std_raw, nil_index_list(), + in__.read, jacobian__>(lp__, + lcm_sym20__), "assigning variable phi_std_raw"); double sigma_phi; sigma_phi = std::numeric_limits::quiet_NaN(); @@ -10203,47 +9946,25 @@ class expr_prop_fail5_model final : public model_base_crtp(0, 1, lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1, lp__); - } else { - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); - } + mean_p = in__.read_lub(0, 1, lp__); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(nind); stan::math::fill(epsilon, DUMMY_VAR__); current_statement__ = 3; - epsilon = in__.vector(nind); + assign(epsilon, nil_index_list(), + in__.read, jacobian__>(lp__, + nind), "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; current_statement__ = 4; - sigma = in__.scalar(); - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - sigma = stan::math::lub_constrain(sigma, 0, 5, lp__); - } else { - current_statement__ = 4; - sigma = stan::math::lub_constrain(sigma, 0, 5); - } + sigma = in__.read_lub(0, 5, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -10883,29 +10604,25 @@ class expr_prop_fail5_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.scalar(); - current_statement__ = 1; - mean_phi = stan::math::lub_constrain(mean_phi, 0, 1); + mean_phi = in__.read_lub(0, 1, lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.scalar(); - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); + mean_p = in__.read_lub(0, 1, lp__); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(nind); stan::math::fill(epsilon, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - epsilon = in__.vector(nind); + assign(epsilon, nil_index_list(), + in__.read, jacobian__>(lp__, + nind), "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma = in__.scalar(); - current_statement__ = 4; - sigma = stan::math::lub_constrain(sigma, 0, 5); + sigma = in__.read_lub(0, 5, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -12860,12 +12577,6 @@ return js_super_lp(y, first, last, p, phi, psi, nu, chi, lp__, class expr_prop_fail6_model final : public model_base_crtp { private: - int lcm_sym338__; - int lcm_sym337__; - int lcm_sym336__; - int lcm_sym335__; - int lcm_sym334__; - int lcm_sym333__; int lcm_sym332__; int lcm_sym331__; int lcm_sym330__; @@ -12884,6 +12595,12 @@ class expr_prop_fail6_model final : public model_base_crtp> y; @@ -12977,11 +12694,11 @@ class expr_prop_fail6_model final : public model_base_crtp(M, std::numeric_limits::min()); current_statement__ = 116; - if (lcm_sym315__) { + if (lcm_sym309__) { int inline_sym34__; int inline_sym36__; inline_sym36__ = std::numeric_limits::min(); inline_sym36__ = 0; for (int inline_sym37__ = 1; inline_sym37__ <= 1; ++inline_sym37__) { - lcm_sym324__ = size(y[(1 - 1)]); - for (int inline_sym35__ = 1; inline_sym35__ <= lcm_sym324__; + lcm_sym318__ = size(y[(1 - 1)]); + for (int inline_sym35__ = 1; inline_sym35__ <= lcm_sym318__; ++inline_sym35__) { current_statement__ = 60; if (y[(1 - 1)][(inline_sym35__ - 1)]) { @@ -13120,8 +12837,8 @@ class expr_prop_fail6_model final : public model_base_crtp::min(); inline_sym41__ = 0; for (int inline_sym42__ = 1; inline_sym42__ <= 1; ++inline_sym42__) { - lcm_sym324__ = size(y[(1 - 1)]); - lcm_sym321__ = (lcm_sym324__ - 1); - for (int inline_sym40__ = 0; inline_sym40__ <= lcm_sym321__; + lcm_sym318__ = size(y[(1 - 1)]); + lcm_sym315__ = (lcm_sym318__ - 1); + for (int inline_sym40__ = 0; inline_sym40__ <= lcm_sym315__; ++inline_sym40__) { int inline_sym39__; inline_sym39__ = std::numeric_limits::min(); - lcm_sym320__ = (lcm_sym324__ - inline_sym40__); - inline_sym39__ = lcm_sym320__; + lcm_sym314__ = (lcm_sym318__ - inline_sym40__); + inline_sym39__ = lcm_sym314__; current_statement__ = 119; - if (y[(1 - 1)][(lcm_sym320__ - 1)]) { + if (y[(1 - 1)][(lcm_sym314__ - 1)]) { inline_sym41__ = 1; - inline_sym38__ = lcm_sym320__; + inline_sym38__ = lcm_sym314__; break; } } if (inline_sym41__) { @@ -13176,19 +12893,19 @@ class expr_prop_fail6_model final : public model_base_crtp::min(); - lcm_sym318__ = (lcm_sym323__ - inline_sym40__); - inline_sym39__ = lcm_sym318__; + lcm_sym312__ = (lcm_sym317__ - inline_sym40__); + inline_sym39__ = lcm_sym312__; current_statement__ = 119; - if (y[(i - 1)][(lcm_sym318__ - 1)]) { + if (y[(i - 1)][(lcm_sym312__ - 1)]) { inline_sym41__ = 1; - inline_sym38__ = lcm_sym318__; + inline_sym38__ = lcm_sym312__; break; } } if (inline_sym41__) { @@ -13201,7 +12918,7 @@ class expr_prop_fail6_model final : public model_base_crtp::min(); - lcm_sym317__ = (n_occasions - 1); - phi_2dim__ = lcm_sym317__; + lcm_sym311__ = (n_occasions - 1); + phi_2dim__ = lcm_sym311__; current_statement__ = 127; - validate_non_negative_index("phi", "n_occasions - 1", lcm_sym317__); + validate_non_negative_index("phi", "n_occasions - 1", lcm_sym311__); current_statement__ = 128; validate_non_negative_index("p", "M", M); current_statement__ = 129; @@ -13314,40 +13031,36 @@ class expr_prop_fail6_model final : public model_base_crtp lcm_sym288__; - double lcm_sym287__; - double lcm_sym286__; - Eigen::Matrix lcm_sym285__; + int lcm_sym288__; + int lcm_sym287__; + Eigen::Matrix lcm_sym286__; + double lcm_sym285__; double lcm_sym284__; - double lcm_sym283__; + Eigen::Matrix lcm_sym283__; double lcm_sym282__; - int lcm_sym281__; + double lcm_sym281__; double lcm_sym280__; - double lcm_sym279__; + int lcm_sym279__; double lcm_sym278__; double lcm_sym277__; double lcm_sym276__; @@ -13360,12 +13073,12 @@ class expr_prop_fail6_model final : public model_base_crtp lcm_sym241__; - Eigen::Matrix lcm_sym240__; + int lcm_sym241__; + int lcm_sym240__; Eigen::Matrix lcm_sym239__; - int lcm_sym238__; - int lcm_sym237__; + Eigen::Matrix lcm_sym238__; + Eigen::Matrix lcm_sym237__; int lcm_sym236__; int lcm_sym235__; int lcm_sym234__; @@ -13402,101 +13115,47 @@ class expr_prop_fail6_model final : public model_base_crtp lcm_sym222__; + int lcm_sym224__; + int lcm_sym223__; + double lcm_sym222__; + double lcm_sym221__; + Eigen::Matrix lcm_sym220__; local_scalar_t__ mean_phi; mean_phi = DUMMY_VAR__; current_statement__ = 1; - mean_phi = in__.scalar(); - current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - mean_phi = stan::math::lub_constrain(mean_phi, 0, 1, lp__); - } else { - current_statement__ = 1; - mean_phi = stan::math::lub_constrain(mean_phi, 0, 1); - } + mean_phi = in__.read_lub(0, 1, lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1, lp__); - } else { - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); - } + mean_p = in__.read_lub(0, 1, lp__); local_scalar_t__ psi; psi = DUMMY_VAR__; current_statement__ = 3; - psi = in__.scalar(); - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - psi = stan::math::lub_constrain(psi, 0, 1, lp__); - } else { - current_statement__ = 3; - psi = stan::math::lub_constrain(psi, 0, 1); - } + psi = in__.read_lub(0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(n_occasions); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 4; - beta = in__.vector(n_occasions); - lcm_sym228__ = logical_gte(n_occasions, 1); - if (lcm_sym228__) { - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - assign(beta, cons_list(index_uni(1), nil_index_list()), - stan::math::lb_constrain(beta[(1 - 1)], 0, lp__), - "assigning variable beta"); - } else { - current_statement__ = 4; - assign(beta, cons_list(index_uni(1), nil_index_list()), - stan::math::lb_constrain(beta[(1 - 1)], 0), - "assigning variable beta"); - } - for (int sym1__ = 2; sym1__ <= n_occasions; ++sym1__) { - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - assign(beta, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(beta[(sym1__ - 1)], 0, lp__), - "assigning variable beta"); - } else { - current_statement__ = 4; - assign(beta, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(beta[(sym1__ - 1)], 0), - "assigning variable beta"); - }} - } + assign(beta, nil_index_list(), + in__.read_lb, jacobian__>(0, + lp__, n_occasions), "assigning variable beta"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(M); stan::math::fill(epsilon, DUMMY_VAR__); current_statement__ = 5; - epsilon = in__.vector(M); + assign(epsilon, nil_index_list(), + in__.read, jacobian__>(lp__, + M), "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; current_statement__ = 6; - sigma = in__.scalar(); - current_statement__ = 6; - if (jacobian__) { - current_statement__ = 6; - sigma = stan::math::lub_constrain(sigma, 0, 5, lp__); - } else { - current_statement__ = 6; - sigma = stan::math::lub_constrain(sigma, 0, 5); - } + sigma = in__.read_lub(0, 5, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(M, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -13517,52 +13176,52 @@ class expr_prop_fail6_model final : public model_base_crtp(M, n_occasions); stan::math::fill(chi, DUMMY_VAR__); - lcm_sym238__ = (n_occasions - 1); - assign(lcm_sym288__, nil_index_list(), - rep_matrix(mean_phi, M, lcm_sym238__), - "assigning variable lcm_sym288__"); - assign(phi, nil_index_list(), lcm_sym288__, "assigning variable phi"); - current_statement__ = 13; - if (lcm_sym228__) { - assign(lcm_sym285__, nil_index_list(), + lcm_sym236__ = (n_occasions - 1); + assign(lcm_sym286__, nil_index_list(), + rep_matrix(mean_phi, M, lcm_sym236__), + "assigning variable lcm_sym286__"); + assign(phi, nil_index_list(), lcm_sym286__, "assigning variable phi"); + lcm_sym226__ = logical_gte(n_occasions, 1); + if (lcm_sym226__) { + assign(lcm_sym283__, nil_index_list(), inv_logit(add(logit(mean_p), epsilon)), - "assigning variable lcm_sym285__"); + "assigning variable lcm_sym283__"); assign(p, cons_list(index_omni(), cons_list(index_uni(1), nil_index_list())), - lcm_sym285__, "assigning variable p"); + lcm_sym283__, "assigning variable p"); for (int t = 2; t <= n_occasions; ++t) { current_statement__ = 12; assign(p, cons_list(index_omni(), - cons_list(index_uni(t), nil_index_list())), lcm_sym285__, + cons_list(index_uni(t), nil_index_list())), lcm_sym283__, "assigning variable p");} } - assign(lcm_sym222__, nil_index_list(), divide(beta, sum(beta)), - "assigning variable lcm_sym222__"); - assign(b, nil_index_list(), lcm_sym222__, "assigning variable b"); + assign(lcm_sym220__, nil_index_list(), divide(beta, sum(beta)), + "assigning variable lcm_sym220__"); + assign(b, nil_index_list(), lcm_sym220__, "assigning variable b"); { local_scalar_t__ cum_b; cum_b = DUMMY_VAR__; - lcm_sym308__ = lcm_sym222__[(1 - 1)]; + lcm_sym302__ = lcm_sym220__[(1 - 1)]; current_statement__ = 15; - assign(nu, cons_list(index_uni(1), nil_index_list()), lcm_sym308__, + assign(nu, cons_list(index_uni(1), nil_index_list()), lcm_sym302__, "assigning variable nu"); current_statement__ = 19; - if (logical_gte(lcm_sym238__, 2)) { + if (logical_gte(lcm_sym236__, 2)) { current_statement__ = 16; assign(nu, cons_list(index_uni(2), nil_index_list()), - (lcm_sym222__[(2 - 1)] / (1.0 - lcm_sym308__)), + (lcm_sym220__[(2 - 1)] / (1.0 - lcm_sym302__)), "assigning variable nu"); current_statement__ = 17; - cum_b = (lcm_sym308__ + lcm_sym222__[(2 - 1)]); - for (int t = 3; t <= lcm_sym238__; ++t) { + cum_b = (lcm_sym302__ + lcm_sym220__[(2 - 1)]); + for (int t = 3; t <= lcm_sym236__; ++t) { current_statement__ = 16; assign(nu, cons_list(index_uni(t), nil_index_list()), - (lcm_sym222__[(t - 1)] / (1.0 - cum_b)), + (lcm_sym220__[(t - 1)] / (1.0 - cum_b)), "assigning variable nu"); current_statement__ = 17; - cum_b = (cum_b + lcm_sym222__[(t - 1)]);} + cum_b = (cum_b + lcm_sym220__[(t - 1)]);} } current_statement__ = 20; assign(nu, cons_list(index_uni(n_occasions), nil_index_list()), 1.0, @@ -13577,91 +13236,91 @@ class expr_prop_fail6_model final : public model_base_crtp::min(); - lcm_sym289__ = rows(p); + lcm_sym287__ = rows(p); int inline_sym17__; inline_sym17__ = std::numeric_limits::min(); - lcm_sym281__ = cols(p); + lcm_sym279__ = cols(p); current_statement__ = 24; - validate_non_negative_index("chi", "n_ind", lcm_sym289__); + validate_non_negative_index("chi", "n_ind", lcm_sym287__); current_statement__ = 25; - validate_non_negative_index("chi", "n_occasions", lcm_sym281__); + validate_non_negative_index("chi", "n_occasions", lcm_sym279__); Eigen::Matrix inline_sym18__; - inline_sym18__ = Eigen::Matrix(lcm_sym289__, lcm_sym281__); + inline_sym18__ = Eigen::Matrix(lcm_sym287__, lcm_sym279__); stan::math::fill(inline_sym18__, DUMMY_VAR__); - for (int inline_sym22__ = 1; inline_sym22__ <= lcm_sym289__; + for (int inline_sym22__ = 1; inline_sym22__ <= lcm_sym287__; ++inline_sym22__) { current_statement__ = 27; assign(inline_sym18__, cons_list(index_uni(inline_sym22__), - cons_list(index_uni(lcm_sym281__), nil_index_list())), 1.0, + cons_list(index_uni(lcm_sym279__), nil_index_list())), 1.0, "assigning variable inline_sym18__"); - lcm_sym243__ = (lcm_sym281__ - 1); - if (logical_gte(lcm_sym243__, 1)) { + lcm_sym241__ = (lcm_sym279__ - 1); + if (logical_gte(lcm_sym241__, 1)) { int inline_sym19__; inline_sym19__ = std::numeric_limits::min(); int inline_sym20__; inline_sym20__ = std::numeric_limits::min(); - lcm_sym248__ = (lcm_sym243__ + 1); + lcm_sym246__ = (lcm_sym241__ + 1); current_statement__ = 30; assign(inline_sym18__, cons_list(index_uni(inline_sym22__), - cons_list(index_uni(lcm_sym243__), nil_index_list())), + cons_list(index_uni(lcm_sym241__), nil_index_list())), stan::math::fma( - (rvalue(lcm_sym288__, + (rvalue(lcm_sym286__, cons_list(index_uni(inline_sym22__), - cons_list(index_uni(lcm_sym243__), nil_index_list())), - "lcm_sym288__") * + cons_list(index_uni(lcm_sym241__), nil_index_list())), + "lcm_sym286__") * (1 - rvalue(p, cons_list(index_uni(inline_sym22__), - cons_list(index_uni(lcm_sym248__), nil_index_list())), + cons_list(index_uni(lcm_sym246__), nil_index_list())), "p"))), rvalue(inline_sym18__, cons_list(index_uni(inline_sym22__), - cons_list(index_uni(lcm_sym248__), nil_index_list())), + cons_list(index_uni(lcm_sym246__), nil_index_list())), "inline_sym18__"), (1 - - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(inline_sym22__), - cons_list(index_uni(lcm_sym243__), nil_index_list())), - "lcm_sym288__"))), "assigning variable inline_sym18__"); - for (int inline_sym21__ = 2; inline_sym21__ <= lcm_sym243__; + cons_list(index_uni(lcm_sym241__), nil_index_list())), + "lcm_sym286__"))), "assigning variable inline_sym18__"); + for (int inline_sym21__ = 2; inline_sym21__ <= lcm_sym241__; ++inline_sym21__) { int inline_sym19__; inline_sym19__ = std::numeric_limits::min(); - lcm_sym242__ = (lcm_sym281__ - inline_sym21__); + lcm_sym240__ = (lcm_sym279__ - inline_sym21__); int inline_sym20__; inline_sym20__ = std::numeric_limits::min(); - lcm_sym247__ = (lcm_sym242__ + 1); + lcm_sym245__ = (lcm_sym240__ + 1); current_statement__ = 30; assign(inline_sym18__, cons_list(index_uni(inline_sym22__), - cons_list(index_uni(lcm_sym242__), nil_index_list())), + cons_list(index_uni(lcm_sym240__), nil_index_list())), stan::math::fma( - (rvalue(lcm_sym288__, + (rvalue(lcm_sym286__, cons_list(index_uni(inline_sym22__), - cons_list(index_uni(lcm_sym242__), nil_index_list())), - "lcm_sym288__") * + cons_list(index_uni(lcm_sym240__), nil_index_list())), + "lcm_sym286__") * (1 - rvalue(p, cons_list(index_uni(inline_sym22__), - cons_list(index_uni(lcm_sym247__), + cons_list(index_uni(lcm_sym245__), nil_index_list())), "p"))), rvalue(inline_sym18__, cons_list(index_uni(inline_sym22__), - cons_list(index_uni(lcm_sym247__), nil_index_list())), + cons_list(index_uni(lcm_sym245__), nil_index_list())), "inline_sym18__"), (1 - - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(inline_sym22__), - cons_list(index_uni(lcm_sym242__), nil_index_list())), - "lcm_sym288__"))), "assigning variable inline_sym18__"); + cons_list(index_uni(lcm_sym240__), nil_index_list())), + "lcm_sym286__"))), "assigning variable inline_sym18__"); } } if (inline_sym23__) { @@ -13675,95 +13334,95 @@ class expr_prop_fail6_model final : public model_base_crtp::min(); - lcm_sym309__ = dims(y)[(1 - 1)]; + lcm_sym303__ = dims(y)[(1 - 1)]; int inline_sym26__; inline_sym26__ = std::numeric_limits::min(); - lcm_sym310__ = dims(y)[(2 - 1)]; + lcm_sym304__ = dims(y)[(2 - 1)]; current_statement__ = 80; - validate_non_negative_index("qnu", "n_occasions", lcm_sym310__); + validate_non_negative_index("qnu", "n_occasions", lcm_sym304__); Eigen::Matrix inline_sym27__; - inline_sym27__ = Eigen::Matrix(lcm_sym310__); + inline_sym27__ = Eigen::Matrix(lcm_sym304__); stan::math::fill(inline_sym27__, std::numeric_limits::quiet_NaN()); - assign(lcm_sym239__, nil_index_list(), subtract(1.0, nu), - "assigning variable lcm_sym239__"); - lcm_sym236__ = logical_gte(lcm_sym309__, 1); - if (lcm_sym236__) { + assign(lcm_sym237__, nil_index_list(), subtract(1.0, nu), + "assigning variable lcm_sym237__"); + lcm_sym234__ = logical_gte(lcm_sym303__, 1); + if (lcm_sym234__) { current_statement__ = 82; - validate_non_negative_index("qp", "n_occasions", lcm_sym310__); + validate_non_negative_index("qp", "n_occasions", lcm_sym304__); Eigen::Matrix inline_sym28__; - inline_sym28__ = Eigen::Matrix(lcm_sym310__); + inline_sym28__ = Eigen::Matrix(lcm_sym304__); stan::math::fill(inline_sym28__, std::numeric_limits::quiet_NaN()); - assign(lcm_sym241__, nil_index_list(), + assign(lcm_sym239__, nil_index_list(), subtract(1.0, transpose( rvalue(p, cons_list(index_uni(1), nil_index_list()), "p"))), - "assigning variable lcm_sym241__"); - lcm_sym295__ = first[(1 - 1)]; - if (lcm_sym295__) { + "assigning variable lcm_sym239__"); + lcm_sym289__ = first[(1 - 1)]; + if (lcm_sym289__) { current_statement__ = 89; lp_accum__.add(bernoulli_lpmf(1, psi)); current_statement__ = 97; - if (logical_eq(lcm_sym295__, 1)) { - lcm_sym303__ = nu[(1 - 1)]; + if (logical_eq(lcm_sym289__, 1)) { + lcm_sym297__ = nu[(1 - 1)]; lp_accum__.add( bernoulli_lpmf(1, - (lcm_sym303__ * + (lcm_sym297__ * rvalue(p, cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "p")))); } else { current_statement__ = 90; - validate_non_negative_index("lp", "first[i]", lcm_sym295__); + validate_non_negative_index("lp", "first[i]", lcm_sym289__); Eigen::Matrix inline_sym29__; - inline_sym29__ = Eigen::Matrix(lcm_sym295__); + inline_sym29__ = Eigen::Matrix(lcm_sym289__); stan::math::fill(inline_sym29__, DUMMY_VAR__); - lcm_sym303__ = nu[(1 - 1)]; - lcm_sym245__ = (lcm_sym295__ - 1); + lcm_sym297__ = nu[(1 - 1)]; + lcm_sym243__ = (lcm_sym289__ - 1); assign(inline_sym29__, cons_list(index_uni(1), nil_index_list()), - (((bernoulli_lpmf(1, lcm_sym303__) + + (((bernoulli_lpmf(1, lcm_sym297__) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym241__, - cons_list(index_min_max(1, lcm_sym245__), - nil_index_list()), "lcm_sym241__")))) + + rvalue(lcm_sym239__, + cons_list(index_min_max(1, lcm_sym243__), + nil_index_list()), "lcm_sym239__")))) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(1), - cons_list(index_min_max(1, lcm_sym245__), - nil_index_list())), "lcm_sym288__")))) + + cons_list(index_min_max(1, lcm_sym243__), + nil_index_list())), "lcm_sym286__")))) + bernoulli_lpmf(1, rvalue(p, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym295__), + cons_list(index_uni(lcm_sym289__), nil_index_list())), "p"))), "assigning variable inline_sym29__"); - if (logical_gte(lcm_sym245__, 2)) { + if (logical_gte(lcm_sym243__, 2)) { current_statement__ = 92; assign(inline_sym29__, cons_list(index_uni(2), nil_index_list()), ((((bernoulli_lpmf(1, prod( - rvalue(lcm_sym239__, + rvalue(lcm_sym237__, cons_list(index_min_max(1, 1), - nil_index_list()), "lcm_sym239__"))) + + nil_index_list()), "lcm_sym237__"))) + bernoulli_lpmf(1, nu[(2 - 1)])) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym241__, - cons_list(index_min_max(2, lcm_sym245__), - nil_index_list()), "lcm_sym241__")))) + + rvalue(lcm_sym239__, + cons_list(index_min_max(2, lcm_sym243__), + nil_index_list()), "lcm_sym239__")))) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(1), - cons_list(index_min_max(2, lcm_sym245__), - nil_index_list())), "lcm_sym288__")))) + + cons_list(index_min_max(2, lcm_sym243__), + nil_index_list())), "lcm_sym286__")))) + bernoulli_lpmf(1, rvalue(p, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym295__), + cons_list(index_uni(lcm_sym289__), nil_index_list())), "p"))), "assigning variable inline_sym29__"); for (int inline_sym30__ = 3; - inline_sym30__ <= lcm_sym245__; ++inline_sym30__) { + inline_sym30__ <= lcm_sym243__; ++inline_sym30__) { current_statement__ = 92; assign(inline_sym29__, cons_list(index_uni(inline_sym30__), nil_index_list()), ((((bernoulli_lpmf(1, prod( - rvalue(lcm_sym239__, + rvalue(lcm_sym237__, cons_list( index_min_max(1, (inline_sym30__ - 1)), - nil_index_list()), "lcm_sym239__"))) + + nil_index_list()), "lcm_sym237__"))) + bernoulli_lpmf(1, nu[(inline_sym30__ - 1)])) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym241__, + rvalue(lcm_sym239__, cons_list( - index_min_max(inline_sym30__, lcm_sym245__), - nil_index_list()), "lcm_sym241__")))) + + index_min_max(inline_sym30__, lcm_sym243__), + nil_index_list()), "lcm_sym239__")))) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(1), cons_list( - index_min_max(inline_sym30__, lcm_sym245__), - nil_index_list())), "lcm_sym288__")))) + + index_min_max(inline_sym30__, lcm_sym243__), + nil_index_list())), "lcm_sym286__")))) + bernoulli_lpmf(1, rvalue(p, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym295__), + cons_list(index_uni(lcm_sym289__), nil_index_list())), "p"))), "assigning variable inline_sym29__");} } current_statement__ = 93; assign(inline_sym29__, - cons_list(index_uni(lcm_sym295__), nil_index_list()), + cons_list(index_uni(lcm_sym289__), nil_index_list()), ((bernoulli_lpmf(1, prod( - rvalue(lcm_sym239__, - cons_list(index_min_max(1, lcm_sym245__), - nil_index_list()), "lcm_sym239__"))) + - bernoulli_lpmf(1, nu[(lcm_sym295__ - 1)])) + + rvalue(lcm_sym237__, + cons_list(index_min_max(1, lcm_sym243__), + nil_index_list()), "lcm_sym237__"))) + + bernoulli_lpmf(1, nu[(lcm_sym289__ - 1)])) + bernoulli_lpmf(1, rvalue(p, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym295__), + cons_list(index_uni(lcm_sym289__), nil_index_list())), "p"))), "assigning variable inline_sym29__"); current_statement__ = 94; lp_accum__.add(log_sum_exp(inline_sym29__)); } - lcm_sym301__ = last[(1 - 1)]; - if (logical_gte(lcm_sym301__, (lcm_sym295__ + 1))) { + lcm_sym295__ = last[(1 - 1)]; + if (logical_gte(lcm_sym295__, (lcm_sym289__ + 1))) { current_statement__ = 98; lp_accum__.add( bernoulli_lpmf(1, - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(1), - cons_list(index_uni(((lcm_sym295__ + 1) - 1)), - nil_index_list())), "lcm_sym288__"))); - lcm_sym264__ = ((lcm_sym295__ + 1) + 1); + cons_list(index_uni(((lcm_sym289__ + 1) - 1)), + nil_index_list())), "lcm_sym286__"))); + lcm_sym262__ = ((lcm_sym289__ + 1) + 1); lp_accum__.add( bernoulli_lpmf( - y[(1 - 1)][((lcm_sym295__ + 1) - 1)], + y[(1 - 1)][((lcm_sym289__ + 1) - 1)], rvalue(p, cons_list(index_uni(1), - cons_list(index_uni((lcm_sym295__ + 1)), + cons_list(index_uni((lcm_sym289__ + 1)), nil_index_list())), "p"))); - for (int inline_sym30__ = lcm_sym264__; - inline_sym30__ <= lcm_sym301__; ++inline_sym30__) { + for (int inline_sym30__ = lcm_sym262__; + inline_sym30__ <= lcm_sym295__; ++inline_sym30__) { current_statement__ = 98; lp_accum__.add( bernoulli_lpmf(1, - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(1), cons_list(index_uni((inline_sym30__ - 1)), - nil_index_list())), "lcm_sym288__"))); + nil_index_list())), "lcm_sym286__"))); current_statement__ = 99; lp_accum__.add( bernoulli_lpmf( @@ -14149,21 +13808,21 @@ class expr_prop_fail6_model final : public model_base_crtp(1, rvalue(inline_sym15__, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym301__), nil_index_list())), + cons_list(index_uni(lcm_sym295__), nil_index_list())), "inline_sym15__"))); } else { - lcm_sym266__ = (lcm_sym310__ + 1); + lcm_sym264__ = (lcm_sym304__ + 1); validate_non_negative_index("lp", "n_occasions + 1", - lcm_sym266__); + lcm_sym264__); Eigen::Matrix inline_sym29__; - inline_sym29__ = Eigen::Matrix(lcm_sym266__); + inline_sym29__ = Eigen::Matrix(lcm_sym264__); stan::math::fill(inline_sym29__, DUMMY_VAR__); - lcm_sym303__ = nu[(1 - 1)]; + lcm_sym297__ = nu[(1 - 1)]; assign(inline_sym29__, cons_list(index_uni(1), nil_index_list()), (((bernoulli_lpmf(1, psi) + - bernoulli_lpmf(1, lcm_sym303__)) + + bernoulli_lpmf(1, lcm_sym297__)) + bernoulli_lpmf(0, rvalue(p, cons_list(index_uni(1), @@ -14174,16 +13833,16 @@ class expr_prop_fail6_model final : public model_base_crtp(1, psi) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym239__, + rvalue(lcm_sym237__, cons_list(index_min_max(1, 1), nil_index_list()), - "lcm_sym239__")))) + + "lcm_sym237__")))) + bernoulli_lpmf(1, nu[(2 - 1)])) + bernoulli_lpmf(0, rvalue(p, @@ -14196,7 +13855,7 @@ class expr_prop_fail6_model final : public model_base_crtp(1, psi) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym239__, + rvalue(lcm_sym237__, cons_list( index_min_max(1, (inline_sym30__ - 1)), - nil_index_list()), "lcm_sym239__")))) + + nil_index_list()), "lcm_sym237__")))) + bernoulli_lpmf(1, nu[(inline_sym30__ - 1)])) + bernoulli_lpmf(0, rvalue(p, @@ -14223,172 +13882,172 @@ class expr_prop_fail6_model final : public model_base_crtp(0, psi), "assigning variable inline_sym29__"); current_statement__ = 87; lp_accum__.add(log_sum_exp(inline_sym29__)); } - for (int inline_sym31__ = 2; inline_sym31__ <= lcm_sym309__; + for (int inline_sym31__ = 2; inline_sym31__ <= lcm_sym303__; ++inline_sym31__) { current_statement__ = 82; - validate_non_negative_index("qp", "n_occasions", lcm_sym310__); + validate_non_negative_index("qp", "n_occasions", lcm_sym304__); Eigen::Matrix inline_sym28__; - inline_sym28__ = Eigen::Matrix(lcm_sym310__); + inline_sym28__ = Eigen::Matrix(lcm_sym304__); stan::math::fill(inline_sym28__, std::numeric_limits::quiet_NaN()); - assign(lcm_sym240__, nil_index_list(), + assign(lcm_sym238__, nil_index_list(), subtract(1.0, transpose( rvalue(p, cons_list(index_uni(inline_sym31__), nil_index_list()), - "p"))), "assigning variable lcm_sym240__"); - lcm_sym294__ = first[(inline_sym31__ - 1)]; - if (lcm_sym294__) { + "p"))), "assigning variable lcm_sym238__"); + lcm_sym288__ = first[(inline_sym31__ - 1)]; + if (lcm_sym288__) { current_statement__ = 89; lp_accum__.add(bernoulli_lpmf(1, psi)); current_statement__ = 97; - if (logical_eq(lcm_sym294__, 1)) { + if (logical_eq(lcm_sym288__, 1)) { current_statement__ = 104; lp_accum__.add( bernoulli_lpmf(1, - (lcm_sym303__ * + (lcm_sym297__ * rvalue(p, cons_list(index_uni(inline_sym31__), cons_list(index_uni(1), nil_index_list())), "p")))); } else { current_statement__ = 90; - validate_non_negative_index("lp", "first[i]", lcm_sym294__); + validate_non_negative_index("lp", "first[i]", lcm_sym288__); Eigen::Matrix inline_sym29__; - inline_sym29__ = Eigen::Matrix(lcm_sym294__); + inline_sym29__ = Eigen::Matrix(lcm_sym288__); stan::math::fill(inline_sym29__, DUMMY_VAR__); - lcm_sym244__ = (lcm_sym294__ - 1); + lcm_sym242__ = (lcm_sym288__ - 1); assign(inline_sym29__, cons_list(index_uni(1), nil_index_list()), - (((bernoulli_lpmf(1, lcm_sym303__) + + (((bernoulli_lpmf(1, lcm_sym297__) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym240__, - cons_list(index_min_max(1, lcm_sym244__), - nil_index_list()), "lcm_sym240__")))) + + rvalue(lcm_sym238__, + cons_list(index_min_max(1, lcm_sym242__), + nil_index_list()), "lcm_sym238__")))) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(inline_sym31__), - cons_list(index_min_max(1, lcm_sym244__), - nil_index_list())), "lcm_sym288__")))) + + cons_list(index_min_max(1, lcm_sym242__), + nil_index_list())), "lcm_sym286__")))) + bernoulli_lpmf(1, rvalue(p, cons_list(index_uni(inline_sym31__), - cons_list(index_uni(lcm_sym294__), + cons_list(index_uni(lcm_sym288__), nil_index_list())), "p"))), "assigning variable inline_sym29__"); - if (logical_gte(lcm_sym244__, 2)) { + if (logical_gte(lcm_sym242__, 2)) { current_statement__ = 92; assign(inline_sym29__, cons_list(index_uni(2), nil_index_list()), ((((bernoulli_lpmf(1, prod( - rvalue(lcm_sym239__, + rvalue(lcm_sym237__, cons_list(index_min_max(1, 1), - nil_index_list()), "lcm_sym239__"))) + + nil_index_list()), "lcm_sym237__"))) + bernoulli_lpmf(1, nu[(2 - 1)])) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym240__, - cons_list(index_min_max(2, lcm_sym244__), - nil_index_list()), "lcm_sym240__")))) + + rvalue(lcm_sym238__, + cons_list(index_min_max(2, lcm_sym242__), + nil_index_list()), "lcm_sym238__")))) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(inline_sym31__), - cons_list(index_min_max(2, lcm_sym244__), - nil_index_list())), "lcm_sym288__")))) + + cons_list(index_min_max(2, lcm_sym242__), + nil_index_list())), "lcm_sym286__")))) + bernoulli_lpmf(1, rvalue(p, cons_list(index_uni(inline_sym31__), - cons_list(index_uni(lcm_sym294__), + cons_list(index_uni(lcm_sym288__), nil_index_list())), "p"))), "assigning variable inline_sym29__"); for (int inline_sym30__ = 3; - inline_sym30__ <= lcm_sym244__; ++inline_sym30__) { + inline_sym30__ <= lcm_sym242__; ++inline_sym30__) { current_statement__ = 92; assign(inline_sym29__, cons_list(index_uni(inline_sym30__), nil_index_list()), ((((bernoulli_lpmf(1, prod( - rvalue(lcm_sym239__, + rvalue(lcm_sym237__, cons_list( index_min_max(1, (inline_sym30__ - 1)), - nil_index_list()), "lcm_sym239__"))) + + nil_index_list()), "lcm_sym237__"))) + bernoulli_lpmf(1, nu[(inline_sym30__ - 1)])) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym240__, + rvalue(lcm_sym238__, cons_list( - index_min_max(inline_sym30__, lcm_sym244__), - nil_index_list()), "lcm_sym240__")))) + + index_min_max(inline_sym30__, lcm_sym242__), + nil_index_list()), "lcm_sym238__")))) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(inline_sym31__), cons_list( - index_min_max(inline_sym30__, lcm_sym244__), - nil_index_list())), "lcm_sym288__")))) + + index_min_max(inline_sym30__, lcm_sym242__), + nil_index_list())), "lcm_sym286__")))) + bernoulli_lpmf(1, rvalue(p, cons_list(index_uni(inline_sym31__), - cons_list(index_uni(lcm_sym294__), + cons_list(index_uni(lcm_sym288__), nil_index_list())), "p"))), "assigning variable inline_sym29__");} } current_statement__ = 93; assign(inline_sym29__, - cons_list(index_uni(lcm_sym294__), nil_index_list()), + cons_list(index_uni(lcm_sym288__), nil_index_list()), ((bernoulli_lpmf(1, prod( - rvalue(lcm_sym239__, - cons_list(index_min_max(1, lcm_sym244__), - nil_index_list()), "lcm_sym239__"))) + - bernoulli_lpmf(1, nu[(lcm_sym294__ - 1)])) + + rvalue(lcm_sym237__, + cons_list(index_min_max(1, lcm_sym242__), + nil_index_list()), "lcm_sym237__"))) + + bernoulli_lpmf(1, nu[(lcm_sym288__ - 1)])) + bernoulli_lpmf(1, rvalue(p, cons_list(index_uni(inline_sym31__), - cons_list(index_uni(lcm_sym294__), + cons_list(index_uni(lcm_sym288__), nil_index_list())), "p"))), "assigning variable inline_sym29__"); current_statement__ = 94; lp_accum__.add(log_sum_exp(inline_sym29__)); } - lcm_sym300__ = last[(inline_sym31__ - 1)]; - if (logical_gte(lcm_sym300__, (lcm_sym294__ + 1))) { + lcm_sym294__ = last[(inline_sym31__ - 1)]; + if (logical_gte(lcm_sym294__, (lcm_sym288__ + 1))) { current_statement__ = 98; lp_accum__.add( bernoulli_lpmf(1, - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(inline_sym31__), - cons_list(index_uni(((lcm_sym294__ + 1) - 1)), - nil_index_list())), "lcm_sym288__"))); - lcm_sym263__ = ((lcm_sym294__ + 1) + 1); + cons_list(index_uni(((lcm_sym288__ + 1) - 1)), + nil_index_list())), "lcm_sym286__"))); + lcm_sym261__ = ((lcm_sym288__ + 1) + 1); lp_accum__.add( bernoulli_lpmf( - y[(inline_sym31__ - 1)][((lcm_sym294__ + 1) - 1)], + y[(inline_sym31__ - 1)][((lcm_sym288__ + 1) - 1)], rvalue(p, cons_list(index_uni(inline_sym31__), - cons_list(index_uni((lcm_sym294__ + 1)), + cons_list(index_uni((lcm_sym288__ + 1)), nil_index_list())), "p"))); - for (int inline_sym30__ = lcm_sym263__; - inline_sym30__ <= lcm_sym300__; ++inline_sym30__) { + for (int inline_sym30__ = lcm_sym261__; + inline_sym30__ <= lcm_sym294__; ++inline_sym30__) { current_statement__ = 98; lp_accum__.add( bernoulli_lpmf(1, - rvalue(lcm_sym288__, + rvalue(lcm_sym286__, cons_list(index_uni(inline_sym31__), cons_list(index_uni((inline_sym30__ - 1)), - nil_index_list())), "lcm_sym288__"))); + nil_index_list())), "lcm_sym286__"))); current_statement__ = 99; lp_accum__.add( bernoulli_lpmf( @@ -14403,21 +14062,21 @@ class expr_prop_fail6_model final : public model_base_crtp(1, rvalue(inline_sym15__, cons_list(index_uni(inline_sym31__), - cons_list(index_uni(lcm_sym300__), nil_index_list())), + cons_list(index_uni(lcm_sym294__), nil_index_list())), "inline_sym15__"))); } else { - lcm_sym266__ = (lcm_sym310__ + 1); + lcm_sym264__ = (lcm_sym304__ + 1); validate_non_negative_index("lp", "n_occasions + 1", - lcm_sym266__); + lcm_sym264__); Eigen::Matrix inline_sym29__; - inline_sym29__ = Eigen::Matrix(lcm_sym266__); + inline_sym29__ = Eigen::Matrix(lcm_sym264__); stan::math::fill(inline_sym29__, DUMMY_VAR__); current_statement__ = 103; assign(inline_sym29__, cons_list(index_uni(1), nil_index_list()), (((bernoulli_lpmf(1, psi) + - bernoulli_lpmf(1, lcm_sym303__)) + + bernoulli_lpmf(1, lcm_sym297__)) + bernoulli_lpmf(0, rvalue(p, cons_list(index_uni(inline_sym31__), @@ -14429,16 +14088,16 @@ class expr_prop_fail6_model final : public model_base_crtp(1, psi) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym239__, + rvalue(lcm_sym237__, cons_list(index_min_max(1, 1), - nil_index_list()), "lcm_sym239__")))) + + nil_index_list()), "lcm_sym237__")))) + bernoulli_lpmf(1, nu[(2 - 1)])) + bernoulli_lpmf(0, rvalue(p, @@ -14452,17 +14111,17 @@ class expr_prop_fail6_model final : public model_base_crtp(1, psi) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym239__, + rvalue(lcm_sym237__, cons_list( index_min_max(1, (inline_sym30__ - 1)), - nil_index_list()), "lcm_sym239__")))) + + nil_index_list()), "lcm_sym237__")))) + bernoulli_lpmf(1, nu[(inline_sym30__ - 1)])) + bernoulli_lpmf(0, @@ -14479,7 +14138,7 @@ class expr_prop_fail6_model final : public model_base_crtp(0, psi), "assigning variable inline_sym29__"); current_statement__ = 87; @@ -14515,27 +14174,25 @@ class expr_prop_fail6_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.scalar(); - current_statement__ = 1; - mean_phi = stan::math::lub_constrain(mean_phi, 0, 1); + mean_phi = in__.read_lub(0, 1, lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.scalar(); - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); + mean_p = in__.read_lub(0, 1, lp__); double psi; psi = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - psi = in__.scalar(); - current_statement__ = 3; - psi = stan::math::lub_constrain(psi, 0, 1); + psi = in__.read_lub(0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(n_occasions); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - beta = in__.vector(n_occasions); - lcm_sym133__ = logical_gte(n_occasions, 1); - if (lcm_sym133__) { - current_statement__ = 4; - assign(beta, cons_list(index_uni(1), nil_index_list()), - stan::math::lb_constrain(beta[(1 - 1)], 0), - "assigning variable beta"); - for (int sym1__ = 2; sym1__ <= n_occasions; ++sym1__) { - current_statement__ = 4; - assign(beta, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lb_constrain(beta[(sym1__ - 1)], 0), - "assigning variable beta");} - } + assign(beta, nil_index_list(), + in__.read_lb, jacobian__>(0, + lp__, n_occasions), "assigning variable beta"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(M); stan::math::fill(epsilon, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - epsilon = in__.vector(M); + assign(epsilon, nil_index_list(), + in__.read, jacobian__>(lp__, + M), "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - sigma = in__.scalar(); - current_statement__ = 6; - sigma = stan::math::lub_constrain(sigma, 0, 5); + sigma = in__.read_lub(0, 5, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(M, (n_occasions - 1)); stan::math::fill(phi, std::numeric_limits::quiet_NaN()); @@ -14680,6 +14323,7 @@ class expr_prop_fail6_model final : public model_base_crtp locations_array__ = " (in 'expr-prop-fail7.stan', line 42, column 11 to column 12)", " (in 'expr-prop-fail7.stan', line 42, column 4 to column 30)", " (in 'expr-prop-fail7.stan', line 44, column 6 to column 51)", - " (in 'expr-prop-fail7.stan', line 43, column 4 to line 44, column 51)", " (in 'expr-prop-fail7.stan', line 45, column 4 to column 45)", + " (in 'expr-prop-fail7.stan', line 43, column 4 to line 44, column 51)", " (in 'expr-prop-fail7.stan', line 41, column 17 to line 46, column 3)", " (in 'expr-prop-fail7.stan', line 25, column 2 to column 24)", " (in 'expr-prop-fail7.stan', line 28, column 6 to column 39)", " (in 'expr-prop-fail7.stan', line 27, column 4 to line 28, column 39)", - " (in 'expr-prop-fail7.stan', line 26, column 2 to line 28, column 39)", " (in 'expr-prop-fail7.stan', line 32, column 11 to column 12)", " (in 'expr-prop-fail7.stan', line 32, column 4 to column 30)", " (in 'expr-prop-fail7.stan', line 34, column 6 to column 51)", @@ -16125,26 +15768,26 @@ static const std::vector locations_array__ = class expr_prop_fail7_model final : public model_base_crtp { private: - int lcm_sym96__; - int lcm_sym95__; - int lcm_sym94__; - int lcm_sym93__; - int lcm_sym92__; - int lcm_sym91__; - double lcm_sym90__; - double lcm_sym89__; - double lcm_sym88__; - double lcm_sym87__; - double lcm_sym86__; - double lcm_sym85__; - double lcm_sym84__; - double lcm_sym83__; - double lcm_sym82__; - double lcm_sym81__; + int lcm_sym82__; + int lcm_sym81__; int lcm_sym80__; int lcm_sym79__; int lcm_sym78__; int lcm_sym77__; + double lcm_sym76__; + double lcm_sym75__; + double lcm_sym74__; + double lcm_sym73__; + double lcm_sym72__; + double lcm_sym71__; + double lcm_sym70__; + double lcm_sym69__; + double lcm_sym68__; + double lcm_sym67__; + int lcm_sym66__; + int lcm_sym65__; + int lcm_sym64__; + int lcm_sym63__; int K; int I; int J; @@ -16198,156 +15841,156 @@ class expr_prop_fail7_model final : public model_base_crtp::min(); pos__ = 1; - current_statement__ = 21; + current_statement__ = 20; context__.validate_dims("data initialization","K","int", context__.to_vec()); K = std::numeric_limits::min(); - current_statement__ = 21; + current_statement__ = 20; K = context__.vals_i("K")[(1 - 1)]; - current_statement__ = 21; - current_statement__ = 21; + current_statement__ = 20; + current_statement__ = 20; check_greater_or_equal(function__, "K", K, 2); - current_statement__ = 22; + current_statement__ = 21; context__.validate_dims("data initialization","I","int", context__.to_vec()); I = std::numeric_limits::min(); - current_statement__ = 22; + current_statement__ = 21; I = context__.vals_i("I")[(1 - 1)]; - current_statement__ = 22; - current_statement__ = 22; + current_statement__ = 21; + current_statement__ = 21; check_greater_or_equal(function__, "I", I, 1); - current_statement__ = 23; + current_statement__ = 22; context__.validate_dims("data initialization","J","int", context__.to_vec()); J = std::numeric_limits::min(); - current_statement__ = 23; + current_statement__ = 22; J = context__.vals_i("J")[(1 - 1)]; - current_statement__ = 23; - current_statement__ = 23; + current_statement__ = 22; + current_statement__ = 22; check_greater_or_equal(function__, "J", J, 1); - current_statement__ = 24; + current_statement__ = 23; validate_non_negative_index("y", "I", I); - current_statement__ = 25; + current_statement__ = 24; validate_non_negative_index("y", "J", J); - current_statement__ = 26; + current_statement__ = 25; context__.validate_dims("data initialization","y","int", context__.to_vec(I, J)); y = std::vector>(I, std::vector(J, std::numeric_limits::min())); { std::vector y_flat__; - current_statement__ = 26; + current_statement__ = 25; assign(y_flat__, nil_index_list(), context__.vals_i("y"), "assigning variable y_flat__"); - current_statement__ = 26; + current_statement__ = 25; pos__ = 1; - lcm_sym78__ = logical_gte(J, 1); - if (lcm_sym78__) { + lcm_sym64__ = logical_gte(J, 1); + if (lcm_sym64__) { { - lcm_sym77__ = logical_gte(I, 1); - if (lcm_sym77__) { - current_statement__ = 26; + lcm_sym63__ = logical_gte(I, 1); + if (lcm_sym63__) { + current_statement__ = 25; assign(y, cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), y_flat__[(1 - 1)], "assigning variable y"); - current_statement__ = 26; + current_statement__ = 25; pos__ = 2; for (int sym2__ = 2; sym2__ <= I; ++sym2__) { - current_statement__ = 26; + current_statement__ = 25; assign(y, cons_list(index_uni(sym2__), cons_list(index_uni(1), nil_index_list())), y_flat__[(pos__ - 1)], "assigning variable y"); - current_statement__ = 26; + current_statement__ = 25; pos__ = (pos__ + 1);} } for (int sym1__ = 2; sym1__ <= J; ++sym1__) { - current_statement__ = 26; - if (lcm_sym77__) { - current_statement__ = 26; + current_statement__ = 25; + if (lcm_sym63__) { + current_statement__ = 25; assign(y, cons_list(index_uni(1), cons_list(index_uni(sym1__), nil_index_list())), y_flat__[(pos__ - 1)], "assigning variable y"); - current_statement__ = 26; + current_statement__ = 25; pos__ = (pos__ + 1); for (int sym2__ = 2; sym2__ <= I; ++sym2__) { - current_statement__ = 26; + current_statement__ = 25; assign(y, cons_list(index_uni(sym2__), cons_list(index_uni(sym1__), nil_index_list())), y_flat__[(pos__ - 1)], "assigning variable y"); - current_statement__ = 26; + current_statement__ = 25; pos__ = (pos__ + 1);} } } } } else { - lcm_sym77__ = logical_gte(I, 1); + lcm_sym63__ = logical_gte(I, 1); } } - current_statement__ = 26; - if (lcm_sym77__) { - current_statement__ = 26; - if (lcm_sym78__) { - current_statement__ = 26; - current_statement__ = 26; + current_statement__ = 25; + if (lcm_sym63__) { + current_statement__ = 25; + if (lcm_sym64__) { + current_statement__ = 25; + current_statement__ = 25; check_greater_or_equal(function__, "y[sym1__, sym2__]", y[(1 - 1)][(1 - 1)], 1); for (int sym2__ = 2; sym2__ <= J; ++sym2__) { - current_statement__ = 26; - current_statement__ = 26; + current_statement__ = 25; + current_statement__ = 25; check_greater_or_equal(function__, "y[sym1__, sym2__]", y[(1 - 1)][(sym2__ - 1)], 1);} } for (int sym1__ = 2; sym1__ <= I; ++sym1__) { - current_statement__ = 26; - if (lcm_sym78__) { - current_statement__ = 26; - current_statement__ = 26; + current_statement__ = 25; + if (lcm_sym64__) { + current_statement__ = 25; + current_statement__ = 25; check_greater_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(1 - 1)], 1); for (int sym2__ = 2; sym2__ <= J; ++sym2__) { - current_statement__ = 26; - current_statement__ = 26; + current_statement__ = 25; + current_statement__ = 25; check_greater_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], 1);} } } } - current_statement__ = 26; - if (lcm_sym77__) { - current_statement__ = 26; - if (lcm_sym78__) { - current_statement__ = 26; - current_statement__ = 26; + current_statement__ = 25; + if (lcm_sym63__) { + current_statement__ = 25; + if (lcm_sym64__) { + current_statement__ = 25; + current_statement__ = 25; check_less_or_equal(function__, "y[sym1__, sym2__]", y[(1 - 1)][(1 - 1)], K); for (int sym2__ = 2; sym2__ <= J; ++sym2__) { - current_statement__ = 26; - current_statement__ = 26; + current_statement__ = 25; + current_statement__ = 25; check_less_or_equal(function__, "y[sym1__, sym2__]", y[(1 - 1)][(sym2__ - 1)], K);} } for (int sym1__ = 2; sym1__ <= I; ++sym1__) { - current_statement__ = 26; - if (lcm_sym78__) { - current_statement__ = 26; - current_statement__ = 26; + current_statement__ = 25; + if (lcm_sym64__) { + current_statement__ = 25; + current_statement__ = 25; check_less_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(1 - 1)], K); for (int sym2__ = 2; sym2__ <= J; ++sym2__) { - current_statement__ = 26; - current_statement__ = 26; + current_statement__ = 25; + current_statement__ = 25; check_less_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], K);} } } } - current_statement__ = 27; + current_statement__ = 26; validate_non_negative_index("alpha", "K", K); - current_statement__ = 28; + current_statement__ = 27; context__.validate_dims("data initialization","alpha","double", context__.to_vec(K)); alpha = Eigen::Matrix(K); @@ -16355,42 +15998,42 @@ class expr_prop_fail7_model final : public model_base_crtp alpha_flat__; - current_statement__ = 28; + current_statement__ = 27; assign(alpha_flat__, nil_index_list(), context__.vals_r("alpha"), "assigning variable alpha_flat__"); - current_statement__ = 28; + current_statement__ = 27; pos__ = 1; - lcm_sym79__ = logical_gte(K, 1); - if (lcm_sym79__) { - current_statement__ = 28; + lcm_sym65__ = logical_gte(K, 1); + if (lcm_sym65__) { + current_statement__ = 27; assign(alpha, cons_list(index_uni(1), nil_index_list()), alpha_flat__[(1 - 1)], "assigning variable alpha"); - current_statement__ = 28; + current_statement__ = 27; pos__ = 2; for (int sym1__ = 2; sym1__ <= K; ++sym1__) { - current_statement__ = 28; + current_statement__ = 27; assign(alpha, cons_list(index_uni(sym1__), nil_index_list()), alpha_flat__[(pos__ - 1)], "assigning variable alpha"); - current_statement__ = 28; + current_statement__ = 27; pos__ = (pos__ + 1);} } } - current_statement__ = 28; - if (lcm_sym79__) { - current_statement__ = 28; - current_statement__ = 28; + current_statement__ = 27; + if (lcm_sym65__) { + current_statement__ = 27; + current_statement__ = 27; check_greater_or_equal(function__, "alpha[sym1__]", alpha[(1 - 1)], 0); for (int sym1__ = 2; sym1__ <= K; ++sym1__) { - current_statement__ = 28; - current_statement__ = 28; + current_statement__ = 27; + current_statement__ = 27; check_greater_or_equal(function__, "alpha[sym1__]", alpha[(sym1__ - 1)], 0);} } + current_statement__ = 28; + validate_non_negative_index("beta", "K", K); current_statement__ = 29; validate_non_negative_index("beta", "K", K); current_statement__ = 30; - validate_non_negative_index("beta", "K", K); - current_statement__ = 31; context__.validate_dims("data initialization","beta","double", context__.to_vec(K, K)); beta = std::vector>(K, Eigen::Matrix(K)); @@ -16398,91 +16041,91 @@ class expr_prop_fail7_model final : public model_base_crtp beta_flat__; - current_statement__ = 31; + current_statement__ = 30; assign(beta_flat__, nil_index_list(), context__.vals_r("beta"), "assigning variable beta_flat__"); - current_statement__ = 31; + current_statement__ = 30; pos__ = 1; - current_statement__ = 31; - if (lcm_sym79__) { - current_statement__ = 31; - if (lcm_sym79__) { - current_statement__ = 31; + current_statement__ = 30; + if (lcm_sym65__) { + current_statement__ = 30; + if (lcm_sym65__) { + current_statement__ = 30; assign(beta, cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), beta_flat__[(1 - 1)], "assigning variable beta"); - current_statement__ = 31; + current_statement__ = 30; pos__ = 2; for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 31; + current_statement__ = 30; assign(beta, cons_list(index_uni(sym2__), cons_list(index_uni(1), nil_index_list())), beta_flat__[(pos__ - 1)], "assigning variable beta"); - current_statement__ = 31; + current_statement__ = 30; pos__ = (pos__ + 1);} } for (int sym1__ = 2; sym1__ <= K; ++sym1__) { - current_statement__ = 31; - if (lcm_sym79__) { - current_statement__ = 31; + current_statement__ = 30; + if (lcm_sym65__) { + current_statement__ = 30; assign(beta, cons_list(index_uni(1), cons_list(index_uni(sym1__), nil_index_list())), beta_flat__[(pos__ - 1)], "assigning variable beta"); - current_statement__ = 31; + current_statement__ = 30; pos__ = (pos__ + 1); for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 31; + current_statement__ = 30; assign(beta, cons_list(index_uni(sym2__), cons_list(index_uni(sym1__), nil_index_list())), beta_flat__[(pos__ - 1)], "assigning variable beta"); - current_statement__ = 31; + current_statement__ = 30; pos__ = (pos__ + 1);} } } } } - current_statement__ = 31; - if (lcm_sym79__) { - current_statement__ = 31; - if (lcm_sym79__) { - current_statement__ = 31; - current_statement__ = 31; + current_statement__ = 30; + if (lcm_sym65__) { + current_statement__ = 30; + if (lcm_sym65__) { + current_statement__ = 30; + current_statement__ = 30; check_greater_or_equal(function__, "beta[sym1__, sym2__]", beta[(1 - 1)][(1 - 1)], 0); for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 31; - current_statement__ = 31; + current_statement__ = 30; + current_statement__ = 30; check_greater_or_equal(function__, "beta[sym1__, sym2__]", beta[(1 - 1)][(sym2__ - 1)], 0);} } for (int sym1__ = 2; sym1__ <= K; ++sym1__) { - current_statement__ = 31; - if (lcm_sym79__) { - current_statement__ = 31; - current_statement__ = 31; + current_statement__ = 30; + if (lcm_sym65__) { + current_statement__ = 30; + current_statement__ = 30; check_greater_or_equal(function__, "beta[sym1__, sym2__]", beta[(sym1__ - 1)][(1 - 1)], 0); for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 31; - current_statement__ = 31; + current_statement__ = 30; + current_statement__ = 30; check_greater_or_equal(function__, "beta[sym1__, sym2__]", beta[(sym1__ - 1)][(sym2__ - 1)], 0);} } } } - current_statement__ = 32; + current_statement__ = 31; validate_positive_index("pi", "K", K); - current_statement__ = 33; + current_statement__ = 32; validate_non_negative_index("theta", "J", J); - current_statement__ = 34; + current_statement__ = 33; validate_non_negative_index("theta", "K", K); - current_statement__ = 35; + current_statement__ = 34; validate_positive_index("theta", "K", K); - current_statement__ = 36; + current_statement__ = 35; validate_non_negative_index("log_Pr_z", "I", I); - current_statement__ = 37; + current_statement__ = 36; validate_non_negative_index("log_Pr_z", "K", K); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); @@ -16515,175 +16158,43 @@ class expr_prop_fail7_model final : public model_base_crtp lcm_sym75__; - Eigen::Matrix lcm_sym73__; - Eigen::Matrix lcm_sym71__; - Eigen::Matrix lcm_sym69__; - double lcm_sym67__; - Eigen::Matrix lcm_sym66__; - double lcm_sym65__; - double lcm_sym64__; - double lcm_sym63__; double lcm_sym62__; - double lcm_sym61__; - Eigen::Matrix lcm_sym60__; - Eigen::Matrix lcm_sym59__; - Eigen::Matrix lcm_sym58__; - Eigen::Matrix lcm_sym57__; - int lcm_sym76__; - int lcm_sym56__; - int lcm_sym55__; - int lcm_sym54__; + Eigen::Matrix lcm_sym61__; + double lcm_sym60__; + double lcm_sym59__; + double lcm_sym58__; + double lcm_sym57__; + double lcm_sym56__; + Eigen::Matrix lcm_sym55__; + Eigen::Matrix lcm_sym54__; + Eigen::Matrix lcm_sym53__; + Eigen::Matrix lcm_sym52__; + int lcm_sym51__; + int lcm_sym50__; + int lcm_sym49__; Eigen::Matrix pi; pi = Eigen::Matrix(K); stan::math::fill(pi, DUMMY_VAR__); - Eigen::Matrix pi_in__; - pi_in__ = Eigen::Matrix((K - 1)); - stan::math::fill(pi_in__, DUMMY_VAR__); - - lcm_sym76__ = (K - 1); - pi_in__ = in__.vector(lcm_sym76__); current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - assign(pi, nil_index_list(), - stan::math::simplex_constrain(pi_in__, lp__), - "assigning variable pi"); - } else { - current_statement__ = 1; - assign(pi, nil_index_list(), stan::math::simplex_constrain(pi_in__), - "assigning variable pi"); - } + assign(pi, nil_index_list(), + in__.read_simplex, jacobian__>( + lp__, K), "assigning variable pi"); std::vector>> theta; theta = std::vector>>(J, std::vector>(K, Eigen::Matrix(K))); stan::math::fill(theta, DUMMY_VAR__); - std::vector>> theta_in__; - theta_in__ = std::vector>>(J, std::vector>(K, Eigen::Matrix(lcm_sym76__))); - stan::math::fill(theta_in__, DUMMY_VAR__); - - lcm_sym55__ = logical_gte(J, 1); - if (lcm_sym55__) { - lcm_sym56__ = logical_gte(K, 1); - if (lcm_sym56__) { - current_statement__ = 2; - assign(theta_in__, - cons_list(index_uni(1), - cons_list(index_uni(1), nil_index_list())), - in__.vector(lcm_sym76__), "assigning variable theta_in__"); - for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 2; - assign(theta_in__, - cons_list(index_uni(1), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(lcm_sym76__), "assigning variable theta_in__");} - } - for (int sym1__ = 2; sym1__ <= J; ++sym1__) { - current_statement__ = 2; - if (lcm_sym56__) { - current_statement__ = 2; - assign(theta_in__, - cons_list(index_uni(sym1__), - cons_list(index_uni(1), nil_index_list())), - in__.vector(lcm_sym76__), "assigning variable theta_in__"); - for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 2; - assign(theta_in__, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(lcm_sym76__), "assigning variable theta_in__");} - } } - } current_statement__ = 2; - if (lcm_sym55__) { - lcm_sym56__ = logical_gte(K, 1); - if (lcm_sym56__) { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(1), - cons_list(index_uni(1), nil_index_list())), - stan::math::simplex_constrain(theta_in__[(1 - 1)][(1 - 1)], - lp__), "assigning variable theta"); - } else { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(1), - cons_list(index_uni(1), nil_index_list())), - stan::math::simplex_constrain(theta_in__[(1 - 1)][(1 - 1)]), - "assigning variable theta"); - } - for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(1), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::simplex_constrain( - theta_in__[(1 - 1)][(sym2__ - 1)], lp__), - "assigning variable theta"); - } else { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(1), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::simplex_constrain( - theta_in__[(1 - 1)][(sym2__ - 1)]), - "assigning variable theta"); - }} - } - for (int sym1__ = 2; sym1__ <= J; ++sym1__) { - current_statement__ = 2; - if (lcm_sym56__) { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(sym1__), - cons_list(index_uni(1), nil_index_list())), - stan::math::simplex_constrain( - theta_in__[(sym1__ - 1)][(1 - 1)], lp__), - "assigning variable theta"); - } else { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(sym1__), - cons_list(index_uni(1), nil_index_list())), - stan::math::simplex_constrain( - theta_in__[(sym1__ - 1)][(1 - 1)]), - "assigning variable theta"); - } - for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::simplex_constrain( - theta_in__[(sym1__ - 1)][(sym2__ - 1)], lp__), - "assigning variable theta"); - } else { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::simplex_constrain( - theta_in__[(sym1__ - 1)][(sym2__ - 1)]), - "assigning variable theta"); - }} - } } - } + assign(theta, nil_index_list(), + in__.read_simplex>>, jacobian__>( + lp__, J, K, K), "assigning variable theta"); { current_statement__ = 10; lp_accum__.add(dirichlet_lpdf(pi, alpha)); - current_statement__ = 13; - if (lcm_sym55__) { - lcm_sym56__ = logical_gte(K, 1); - if (lcm_sym56__) { + lcm_sym50__ = logical_gte(J, 1); + if (lcm_sym50__) { + lcm_sym51__ = logical_gte(K, 1); + if (lcm_sym51__) { current_statement__ = 11; lp_accum__.add( dirichlet_lpdf(theta[(1 - 1)][(1 - 1)], @@ -16696,7 +16207,7 @@ class expr_prop_fail7_model final : public model_base_crtp(theta[(j - 1)][(1 - 1)], @@ -16708,23 +16219,23 @@ class expr_prop_fail7_model final : public model_base_crtp log_q; log_q = Eigen::Matrix(K); stan::math::fill(log_q, DUMMY_VAR__); - assign(lcm_sym66__, nil_index_list(), stan::math::log(pi), - "assigning variable lcm_sym66__"); - assign(log_q, nil_index_list(), lcm_sym66__, + assign(lcm_sym61__, nil_index_list(), stan::math::log(pi), + "assigning variable lcm_sym61__"); + assign(log_q, nil_index_list(), lcm_sym61__, "assigning variable log_q"); - current_statement__ = 17; - if (lcm_sym55__) { - current_statement__ = 16; + current_statement__ = 16; + if (lcm_sym50__) { + current_statement__ = 15; assign(log_q, nil_index_list(), - add(lcm_sym66__, + add(lcm_sym61__, to_vector( stan::math::log( rvalue(theta, @@ -16734,7 +16245,7 @@ class expr_prop_fail7_model final : public model_base_crtp log_q; log_q = Eigen::Matrix(K); stan::math::fill(log_q, DUMMY_VAR__); - current_statement__ = 15; - assign(log_q, nil_index_list(), lcm_sym66__, + current_statement__ = 14; + assign(log_q, nil_index_list(), lcm_sym61__, "assigning variable log_q"); - current_statement__ = 17; - if (lcm_sym55__) { - current_statement__ = 16; + current_statement__ = 16; + if (lcm_sym50__) { + current_statement__ = 15; assign(log_q, nil_index_list(), - add(lcm_sym66__, + add(lcm_sym61__, to_vector( stan::math::log( rvalue(theta, @@ -16772,7 +16283,7 @@ class expr_prop_fail7_model final : public model_base_crtp lcm_sym38__; - Eigen::Matrix lcm_sym37__; - Eigen::Matrix lcm_sym36__; - Eigen::Matrix lcm_sym35__; - double lcm_sym53__; - double lcm_sym52__; - double lcm_sym51__; - double lcm_sym50__; - double lcm_sym49__; double lcm_sym48__; double lcm_sym47__; double lcm_sym46__; @@ -16833,6 +16335,11 @@ class expr_prop_fail7_model final : public model_base_crtp lcm_sym34__; Eigen::Matrix lcm_sym33__; Eigen::Matrix lcm_sym32__; @@ -16841,7 +16348,6 @@ class expr_prop_fail7_model final : public model_base_crtp lcm_sym27__; - int lcm_sym39__; int lcm_sym26__; int lcm_sym25__; int lcm_sym24__; @@ -16849,97 +16355,19 @@ class expr_prop_fail7_model final : public model_base_crtp(K); stan::math::fill(pi, std::numeric_limits::quiet_NaN()); - Eigen::Matrix pi_in__; - pi_in__ = Eigen::Matrix((K - 1)); - stan::math::fill(pi_in__, std::numeric_limits::quiet_NaN()); - - lcm_sym39__ = (K - 1); - pi_in__ = in__.vector(lcm_sym39__); current_statement__ = 1; - assign(pi, nil_index_list(), stan::math::simplex_constrain(pi_in__), - "assigning variable pi"); + assign(pi, nil_index_list(), + in__.read_simplex, jacobian__>( + lp__, K), "assigning variable pi"); std::vector>> theta; theta = std::vector>>(J, std::vector>(K, Eigen::Matrix(K))); stan::math::fill(theta, std::numeric_limits::quiet_NaN()); - std::vector>> theta_in__; - theta_in__ = std::vector>>(J, std::vector>(K, Eigen::Matrix(lcm_sym39__))); - stan::math::fill(theta_in__, std::numeric_limits::quiet_NaN()); - - lcm_sym25__ = logical_gte(J, 1); - if (lcm_sym25__) { - { - lcm_sym26__ = logical_gte(K, 1); - if (lcm_sym26__) { - current_statement__ = 2; - assign(theta_in__, - cons_list(index_uni(1), - cons_list(index_uni(1), nil_index_list())), - in__.vector(lcm_sym39__), "assigning variable theta_in__"); - for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 2; - assign(theta_in__, - cons_list(index_uni(1), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(lcm_sym39__), "assigning variable theta_in__");} - } - for (int sym1__ = 2; sym1__ <= J; ++sym1__) { - current_statement__ = 2; - if (lcm_sym26__) { - current_statement__ = 2; - assign(theta_in__, - cons_list(index_uni(sym1__), - cons_list(index_uni(1), nil_index_list())), - in__.vector(lcm_sym39__), "assigning variable theta_in__"); - for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 2; - assign(theta_in__, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - in__.vector(lcm_sym39__), "assigning variable theta_in__"); - } - } } - } - } else { - lcm_sym26__ = logical_gte(K, 1); - } current_statement__ = 2; - if (lcm_sym25__) { - current_statement__ = 2; - if (lcm_sym26__) { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(1), - cons_list(index_uni(1), nil_index_list())), - stan::math::simplex_constrain(theta_in__[(1 - 1)][(1 - 1)]), - "assigning variable theta"); - for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(1), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::simplex_constrain(theta_in__[(1 - 1)][(sym2__ - 1)]), - "assigning variable theta");} - } - for (int sym1__ = 2; sym1__ <= J; ++sym1__) { - current_statement__ = 2; - if (lcm_sym26__) { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(sym1__), - cons_list(index_uni(1), nil_index_list())), - stan::math::simplex_constrain(theta_in__[(sym1__ - 1)][(1 - 1)]), - "assigning variable theta"); - for (int sym2__ = 2; sym2__ <= K; ++sym2__) { - current_statement__ = 2; - assign(theta, - cons_list(index_uni(sym1__), - cons_list(index_uni(sym2__), nil_index_list())), - stan::math::simplex_constrain( - theta_in__[(sym1__ - 1)][(sym2__ - 1)]), - "assigning variable theta");} - } } - } + assign(theta, nil_index_list(), + in__.read_simplex>>, jacobian__>( + lp__, J, K, K), "assigning variable theta"); + lcm_sym26__ = logical_gte(K, 1); if (lcm_sym26__) { vars__.emplace_back(pi[(1 - 1)]); for (int sym1__ = 2; sym1__ <= K; ++sym1__) { @@ -16947,6 +16375,7 @@ class expr_prop_fail7_model final : public model_base_crtp(lp__); local_scalar_t__ beta1; beta1 = DUMMY_VAR__; current_statement__ = 2; - beta1 = in__.scalar(); + beta1 = in__.read(lp__); local_scalar_t__ tau_theta; tau_theta = DUMMY_VAR__; current_statement__ = 3; - tau_theta = in__.scalar(); - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - tau_theta = stan::math::lb_constrain(tau_theta, 0, lp__); - } else { - current_statement__ = 3; - tau_theta = stan::math::lb_constrain(tau_theta, 0); - } + tau_theta = in__.read_lb(0, lp__); local_scalar_t__ tau_phi; tau_phi = DUMMY_VAR__; current_statement__ = 4; - tau_phi = in__.scalar(); - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - tau_phi = stan::math::lb_constrain(tau_phi, 0, lp__); - } else { - current_statement__ = 4; - tau_phi = stan::math::lb_constrain(tau_phi, 0); - } + tau_phi = in__.read_lb(0, lp__); Eigen::Matrix theta_std; theta_std = Eigen::Matrix(N); stan::math::fill(theta_std, DUMMY_VAR__); current_statement__ = 5; - theta_std = in__.vector(N); + assign(theta_std, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable theta_std"); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix(N); stan::math::fill(phi_std_raw, DUMMY_VAR__); current_statement__ = 6; - phi_std_raw = in__.vector(N); + assign(phi_std_raw, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable phi_std_raw"); local_scalar_t__ sigma_phi; sigma_phi = DUMMY_VAR__; @@ -17957,38 +17375,38 @@ class expr_prop_fail8_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - beta0 = in__.scalar(); + beta0 = in__.read(lp__); double beta1; beta1 = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - beta1 = in__.scalar(); + beta1 = in__.read(lp__); double tau_theta; tau_theta = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - tau_theta = in__.scalar(); - current_statement__ = 3; - tau_theta = stan::math::lb_constrain(tau_theta, 0); + tau_theta = in__.read_lb(0, lp__); double tau_phi; tau_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - tau_phi = in__.scalar(); - current_statement__ = 4; - tau_phi = stan::math::lb_constrain(tau_phi, 0); + tau_phi = in__.read_lb(0, lp__); Eigen::Matrix theta_std; theta_std = Eigen::Matrix(N); stan::math::fill(theta_std, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - theta_std = in__.vector(N); + assign(theta_std, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable theta_std"); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix(N); stan::math::fill(phi_std_raw, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - phi_std_raw = in__.vector(N); + assign(phi_std_raw, nil_index_list(), + in__.read, jacobian__>(lp__, + N), "assigning variable phi_std_raw"); double sigma_phi; sigma_phi = std::numeric_limits::quiet_NaN(); @@ -18767,13 +18185,6 @@ return prob_uncaptured(nind, n_occasions, p, phi, pstream__); class fails_test_model final : public model_base_crtp { private: - int lcm_sym193__; - int lcm_sym192__; - int lcm_sym191__; - int lcm_sym190__; - int lcm_sym189__; - int lcm_sym188__; - int lcm_sym187__; int lcm_sym186__; int lcm_sym185__; int lcm_sym184__; @@ -18798,6 +18209,13 @@ class fails_test_model final : public model_base_crtp { int lcm_sym165__; int lcm_sym164__; int lcm_sym163__; + int lcm_sym162__; + int lcm_sym161__; + int lcm_sym160__; + int lcm_sym159__; + int lcm_sym158__; + int lcm_sym157__; + int lcm_sym156__; int nind; int n_occasions; std::vector> y; @@ -18900,11 +18318,11 @@ class fails_test_model final : public model_base_crtp { "assigning variable y_flat__"); current_statement__ = 35; pos__ = 1; - lcm_sym163__ = logical_gte(n_occasions, 1); - if (lcm_sym163__) { + lcm_sym156__ = logical_gte(n_occasions, 1); + if (lcm_sym156__) { { - lcm_sym164__ = logical_gte(nind, 1); - if (lcm_sym164__) { + lcm_sym157__ = logical_gte(nind, 1); + if (lcm_sym157__) { current_statement__ = 35; assign(y, cons_list(index_uni(1), @@ -18923,7 +18341,7 @@ class fails_test_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= n_occasions; ++sym1__) { current_statement__ = 35; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 35; assign(y, cons_list(index_uni(1), @@ -18942,13 +18360,13 @@ class fails_test_model final : public model_base_crtp { } } } } else { - lcm_sym164__ = logical_gte(nind, 1); + lcm_sym157__ = logical_gte(nind, 1); } } current_statement__ = 35; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 35; - if (lcm_sym163__) { + if (lcm_sym156__) { current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", @@ -18961,7 +18379,7 @@ class fails_test_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 35; - if (lcm_sym163__) { + if (lcm_sym156__) { current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", @@ -18974,9 +18392,9 @@ class fails_test_model final : public model_base_crtp { } } } current_statement__ = 35; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 35; - if (lcm_sym163__) { + if (lcm_sym156__) { current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", @@ -18989,7 +18407,7 @@ class fails_test_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 35; - if (lcm_sym163__) { + if (lcm_sym156__) { current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", @@ -19013,12 +18431,12 @@ class fails_test_model final : public model_base_crtp { check_greater_or_equal(function__, "max_age", max_age, 1); current_statement__ = 37; validate_non_negative_index("x", "nind", nind); - lcm_sym166__ = (n_occasions - 1); - validate_non_negative_index("x", "n_occasions - 1", lcm_sym166__); + lcm_sym159__ = (n_occasions - 1); + validate_non_negative_index("x", "n_occasions - 1", lcm_sym159__); current_statement__ = 38; context__.validate_dims("data initialization","x","int", - context__.to_vec(nind, lcm_sym166__)); - x = std::vector>(nind, std::vector(lcm_sym166__, std::numeric_limits::min())); + context__.to_vec(nind, lcm_sym159__)); + x = std::vector>(nind, std::vector(lcm_sym159__, std::numeric_limits::min())); { std::vector x_flat__; @@ -19027,10 +18445,10 @@ class fails_test_model final : public model_base_crtp { "assigning variable x_flat__"); current_statement__ = 38; pos__ = 1; - lcm_sym165__ = logical_gte(lcm_sym166__, 1); - if (lcm_sym165__) { + lcm_sym158__ = logical_gte(lcm_sym159__, 1); + if (lcm_sym158__) { current_statement__ = 38; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 38; assign(x, cons_list(index_uni(1), @@ -19047,9 +18465,9 @@ class fails_test_model final : public model_base_crtp { current_statement__ = 38; pos__ = (pos__ + 1);} } - for (int sym1__ = 2; sym1__ <= lcm_sym166__; ++sym1__) { + for (int sym1__ = 2; sym1__ <= lcm_sym159__; ++sym1__) { current_statement__ = 38; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 38; assign(x, cons_list(index_uni(1), @@ -19069,14 +18487,14 @@ class fails_test_model final : public model_base_crtp { } } current_statement__ = 38; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 38; - if (lcm_sym165__) { + if (lcm_sym158__) { current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", x[(1 - 1)][(1 - 1)], 0); - for (int sym2__ = 2; sym2__ <= lcm_sym166__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", @@ -19084,12 +18502,12 @@ class fails_test_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 38; - if (lcm_sym165__) { + if (lcm_sym158__) { current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", x[(sym1__ - 1)][(1 - 1)], 0); - for (int sym2__ = 2; sym2__ <= lcm_sym166__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", @@ -19097,14 +18515,14 @@ class fails_test_model final : public model_base_crtp { } } } current_statement__ = 38; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 38; - if (lcm_sym165__) { + if (lcm_sym158__) { current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", x[(1 - 1)][(1 - 1)], max_age); - for (int sym2__ = 2; sym2__ <= lcm_sym166__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", @@ -19112,12 +18530,12 @@ class fails_test_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 38; - if (lcm_sym165__) { + if (lcm_sym158__) { current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", x[(sym1__ - 1)][(1 - 1)], max_age); - for (int sym2__ = 2; sym2__ <= lcm_sym166__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", @@ -19128,7 +18546,7 @@ class fails_test_model final : public model_base_crtp { n_occ_minus_1 = std::numeric_limits::min(); current_statement__ = 39; - n_occ_minus_1 = lcm_sym166__; + n_occ_minus_1 = lcm_sym159__; current_statement__ = 40; validate_non_negative_index("first", "nind", nind); current_statement__ = 41; @@ -19140,15 +18558,15 @@ class fails_test_model final : public model_base_crtp { last = std::vector(nind, std::numeric_limits::min()); current_statement__ = 48; - if (lcm_sym164__) { + if (lcm_sym157__) { int inline_sym17__; int inline_sym19__; inline_sym19__ = std::numeric_limits::min(); inline_sym19__ = 0; for (int inline_sym20__ = 1; inline_sym20__ <= 1; ++inline_sym20__) { - lcm_sym173__ = size(y[(1 - 1)]); - for (int inline_sym18__ = 1; inline_sym18__ <= lcm_sym173__; + lcm_sym166__ = size(y[(1 - 1)]); + for (int inline_sym18__ = 1; inline_sym18__ <= lcm_sym166__; ++inline_sym18__) { current_statement__ = 45; if (y[(1 - 1)][(inline_sym18__ - 1)]) { @@ -19171,8 +18589,8 @@ class fails_test_model final : public model_base_crtp { inline_sym19__ = 0; for (int inline_sym20__ = 1; inline_sym20__ <= 1; ++inline_sym20__) { - lcm_sym172__ = size(y[(i - 1)]); - for (int inline_sym18__ = 1; inline_sym18__ <= lcm_sym172__; + lcm_sym165__ = size(y[(i - 1)]); + for (int inline_sym18__ = 1; inline_sym18__ <= lcm_sym165__; ++inline_sym18__) { current_statement__ = 45; if (y[(i - 1)][(inline_sym18__ - 1)]) { @@ -19190,26 +18608,26 @@ class fails_test_model final : public model_base_crtp { inline_sym17__, "assigning variable first");} } current_statement__ = 55; - if (lcm_sym164__) { + if (lcm_sym157__) { int inline_sym21__; int inline_sym24__; inline_sym24__ = std::numeric_limits::min(); inline_sym24__ = 0; for (int inline_sym25__ = 1; inline_sym25__ <= 1; ++inline_sym25__) { - lcm_sym173__ = size(y[(1 - 1)]); - lcm_sym170__ = (lcm_sym173__ - 1); - for (int inline_sym23__ = 0; inline_sym23__ <= lcm_sym170__; + lcm_sym166__ = size(y[(1 - 1)]); + lcm_sym163__ = (lcm_sym166__ - 1); + for (int inline_sym23__ = 0; inline_sym23__ <= lcm_sym163__; ++inline_sym23__) { int inline_sym22__; inline_sym22__ = std::numeric_limits::min(); - lcm_sym169__ = (lcm_sym173__ - inline_sym23__); - inline_sym22__ = lcm_sym169__; + lcm_sym162__ = (lcm_sym166__ - inline_sym23__); + inline_sym22__ = lcm_sym162__; current_statement__ = 51; - if (y[(1 - 1)][(lcm_sym169__ - 1)]) { + if (y[(1 - 1)][(lcm_sym162__ - 1)]) { inline_sym24__ = 1; - inline_sym21__ = lcm_sym169__; + inline_sym21__ = lcm_sym162__; break; } } if (inline_sym24__) { @@ -19227,19 +18645,19 @@ class fails_test_model final : public model_base_crtp { inline_sym24__ = 0; for (int inline_sym25__ = 1; inline_sym25__ <= 1; ++inline_sym25__) { - lcm_sym172__ = size(y[(i - 1)]); - lcm_sym168__ = (lcm_sym172__ - 1); - for (int inline_sym23__ = 0; inline_sym23__ <= lcm_sym168__; + lcm_sym165__ = size(y[(i - 1)]); + lcm_sym161__ = (lcm_sym165__ - 1); + for (int inline_sym23__ = 0; inline_sym23__ <= lcm_sym161__; ++inline_sym23__) { int inline_sym22__; inline_sym22__ = std::numeric_limits::min(); - lcm_sym167__ = (lcm_sym172__ - inline_sym23__); - inline_sym22__ = lcm_sym167__; + lcm_sym160__ = (lcm_sym165__ - inline_sym23__); + inline_sym22__ = lcm_sym160__; current_statement__ = 51; - if (y[(i - 1)][(lcm_sym167__ - 1)]) { + if (y[(i - 1)][(lcm_sym160__ - 1)]) { inline_sym24__ = 1; - inline_sym21__ = lcm_sym167__; + inline_sym21__ = lcm_sym160__; break; } } if (inline_sym24__) { @@ -19252,7 +18670,7 @@ class fails_test_model final : public model_base_crtp { inline_sym21__, "assigning variable last");} } current_statement__ = 41; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 41; current_statement__ = 41; check_greater_or_equal(function__, "first[sym1__]", first[(1 - 1)], 0); @@ -19263,7 +18681,7 @@ class fails_test_model final : public model_base_crtp { first[(sym1__ - 1)], 0);} } current_statement__ = 41; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 41; current_statement__ = 41; check_less_or_equal(function__, "first[sym1__]", first[(1 - 1)], @@ -19275,7 +18693,7 @@ class fails_test_model final : public model_base_crtp { first[(sym1__ - 1)], n_occasions);} } current_statement__ = 43; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 43; current_statement__ = 43; check_greater_or_equal(function__, "last[sym1__]", last[(1 - 1)], 0); @@ -19286,7 +18704,7 @@ class fails_test_model final : public model_base_crtp { last[(sym1__ - 1)], 0);} } current_statement__ = 43; - if (lcm_sym164__) { + if (lcm_sym157__) { current_statement__ = 43; current_statement__ = 43; check_less_or_equal(function__, "last[sym1__]", last[(1 - 1)], @@ -19302,11 +18720,11 @@ class fails_test_model final : public model_base_crtp { current_statement__ = 57; validate_non_negative_index("phi", "nind", nind); current_statement__ = 58; - validate_non_negative_index("phi", "n_occ_minus_1", lcm_sym166__); + validate_non_negative_index("phi", "n_occ_minus_1", lcm_sym159__); current_statement__ = 59; validate_non_negative_index("p", "nind", nind); current_statement__ = 60; - validate_non_negative_index("p", "n_occ_minus_1", lcm_sym166__); + validate_non_negative_index("p", "n_occ_minus_1", lcm_sym159__); current_statement__ = 61; validate_non_negative_index("chi", "nind", nind); current_statement__ = 62; @@ -19342,28 +18760,23 @@ class fails_test_model final : public model_base_crtp { (void) function__; // suppress unused var warning try { - double lcm_sym162__; - double lcm_sym161__; - double lcm_sym160__; - double lcm_sym159__; - double lcm_sym158__; - double lcm_sym157__; - double lcm_sym156__; double lcm_sym155__; - int lcm_sym154__; - int lcm_sym153__; + double lcm_sym154__; + double lcm_sym153__; double lcm_sym152__; double lcm_sym151__; double lcm_sym150__; double lcm_sym149__; - int lcm_sym148__; + double lcm_sym148__; int lcm_sym147__; - double lcm_sym146__; + int lcm_sym146__; double lcm_sym145__; double lcm_sym144__; double lcm_sym143__; double lcm_sym142__; - double lcm_sym140__; + int lcm_sym141__; + int lcm_sym140__; + double lcm_sym139__; double lcm_sym138__; double lcm_sym137__; double lcm_sym136__; @@ -19376,9 +18789,9 @@ class fails_test_model final : public model_base_crtp { double lcm_sym129__; double lcm_sym128__; double lcm_sym127__; - int lcm_sym126__; - int lcm_sym125__; - int lcm_sym124__; + double lcm_sym126__; + double lcm_sym125__; + double lcm_sym124__; int lcm_sym123__; int lcm_sym122__; int lcm_sym121__; @@ -19398,53 +18811,21 @@ class fails_test_model final : public model_base_crtp { int lcm_sym107__; int lcm_sym106__; int lcm_sym105__; + int lcm_sym104__; + int lcm_sym103__; local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 1; - mean_p = in__.scalar(); - current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - mean_p = stan::math::lub_constrain(mean_p, 0, 1, lp__); - } else { - current_statement__ = 1; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); - } + mean_p = in__.read_lub(0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - beta = in__.vector(max_age); - current_statement__ = 2; - if (logical_gte(max_age, 1)) { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(beta, cons_list(index_uni(1), nil_index_list()), - stan::math::lub_constrain(beta[(1 - 1)], 0, 1, lp__), - "assigning variable beta"); - } else { - current_statement__ = 2; - assign(beta, cons_list(index_uni(1), nil_index_list()), - stan::math::lub_constrain(beta[(1 - 1)], 0, 1), - "assigning variable beta"); - } - for (int sym1__ = 2; sym1__ <= max_age; ++sym1__) { - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - assign(beta, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(beta[(sym1__ - 1)], 0, 1, lp__), - "assigning variable beta"); - } else { - current_statement__ = 2; - assign(beta, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(beta[(sym1__ - 1)], 0, 1), - "assigning variable beta"); - }} - } + assign(beta, nil_index_list(), + in__.read_lub, jacobian__>(0, + 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -19457,11 +18838,11 @@ class fails_test_model final : public model_base_crtp { chi = Eigen::Matrix(nind, n_occasions); stan::math::fill(chi, DUMMY_VAR__); - lcm_sym107__ = logical_gte(nind, 1); - if (lcm_sym107__) { - lcm_sym148__ = first[(1 - 1)]; - lcm_sym120__ = (lcm_sym148__ - 1); - if (logical_gte(lcm_sym120__, 1)) { + lcm_sym104__ = logical_gte(nind, 1); + if (lcm_sym104__) { + lcm_sym141__ = first[(1 - 1)]; + lcm_sym117__ = (lcm_sym141__ - 1); + if (logical_gte(lcm_sym117__, 1)) { current_statement__ = 6; assign(phi, cons_list(index_uni(1), @@ -19472,7 +18853,7 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), 0, "assigning variable p"); - for (int t = 2; t <= lcm_sym120__; ++t) { + for (int t = 2; t <= lcm_sym117__; ++t) { current_statement__ = 6; assign(phi, cons_list(index_uni(1), @@ -19484,20 +18865,20 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(t), nil_index_list())), 0, "assigning variable p");} } - lcm_sym118__ = (n_occasions - 1); - if (logical_gte(lcm_sym118__, lcm_sym148__)) { + lcm_sym115__ = (n_occasions - 1); + if (logical_gte(lcm_sym115__, lcm_sym141__)) { current_statement__ = 9; assign(phi, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym148__), nil_index_list())), - beta[(x[(1 - 1)][(lcm_sym148__ - 1)] - 1)], + cons_list(index_uni(lcm_sym141__), nil_index_list())), + beta[(x[(1 - 1)][(lcm_sym141__ - 1)] - 1)], "assigning variable phi"); - lcm_sym126__ = (lcm_sym148__ + 1); + lcm_sym123__ = (lcm_sym141__ + 1); assign(p, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym148__), nil_index_list())), mean_p, + cons_list(index_uni(lcm_sym141__), nil_index_list())), mean_p, "assigning variable p"); - for (int t = lcm_sym126__; t <= lcm_sym118__; ++t) { + for (int t = lcm_sym123__; t <= lcm_sym115__; ++t) { current_statement__ = 9; assign(phi, cons_list(index_uni(1), @@ -19510,9 +18891,9 @@ class fails_test_model final : public model_base_crtp { "assigning variable p");} } for (int i = 2; i <= nind; ++i) { - lcm_sym147__ = first[(i - 1)]; - lcm_sym119__ = (lcm_sym147__ - 1); - if (logical_gte(lcm_sym119__, 1)) { + lcm_sym140__ = first[(i - 1)]; + lcm_sym116__ = (lcm_sym140__ - 1); + if (logical_gte(lcm_sym116__, 1)) { current_statement__ = 6; assign(phi, cons_list(index_uni(i), @@ -19523,7 +18904,7 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(i), cons_list(index_uni(1), nil_index_list())), 0, "assigning variable p"); - for (int t = 2; t <= lcm_sym119__; ++t) { + for (int t = 2; t <= lcm_sym116__; ++t) { current_statement__ = 6; assign(phi, cons_list(index_uni(i), @@ -19536,19 +18917,19 @@ class fails_test_model final : public model_base_crtp { "assigning variable p");} } current_statement__ = 12; - if (logical_gte(lcm_sym118__, lcm_sym147__)) { + if (logical_gte(lcm_sym115__, lcm_sym140__)) { current_statement__ = 9; assign(phi, cons_list(index_uni(i), - cons_list(index_uni(lcm_sym147__), nil_index_list())), - beta[(x[(i - 1)][(lcm_sym147__ - 1)] - 1)], + cons_list(index_uni(lcm_sym140__), nil_index_list())), + beta[(x[(i - 1)][(lcm_sym140__ - 1)] - 1)], "assigning variable phi"); - lcm_sym125__ = (lcm_sym147__ + 1); + lcm_sym122__ = (lcm_sym140__ + 1); assign(p, cons_list(index_uni(i), - cons_list(index_uni(lcm_sym147__), nil_index_list())), + cons_list(index_uni(lcm_sym140__), nil_index_list())), mean_p, "assigning variable p"); - for (int t = lcm_sym125__; t <= lcm_sym118__; ++t) { + for (int t = lcm_sym122__; t <= lcm_sym115__; ++t) { current_statement__ = 9; assign(phi, cons_list(index_uni(i), @@ -19581,70 +18962,70 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(inline_sym14__), cons_list(index_uni(n_occasions), nil_index_list())), 1.0, "assigning variable inline_sym10__"); - lcm_sym118__ = (n_occasions - 1); - if (logical_gte(lcm_sym118__, 1)) { + lcm_sym115__ = (n_occasions - 1); + if (logical_gte(lcm_sym115__, 1)) { int inline_sym11__; inline_sym11__ = std::numeric_limits::min(); int inline_sym12__; inline_sym12__ = std::numeric_limits::min(); - lcm_sym122__ = (lcm_sym118__ + 1); + lcm_sym119__ = (lcm_sym115__ + 1); current_statement__ = 20; assign(inline_sym10__, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym118__), nil_index_list())), + cons_list(index_uni(lcm_sym115__), nil_index_list())), stan::math::fma( (rvalue(phi, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym118__), nil_index_list())), + cons_list(index_uni(lcm_sym115__), nil_index_list())), "phi") * (1 - rvalue(p, cons_list(index_uni(inline_sym14__), - cons_list(index_uni((lcm_sym122__ - 1)), + cons_list(index_uni((lcm_sym119__ - 1)), nil_index_list())), "p"))), rvalue(inline_sym10__, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym122__), nil_index_list())), + cons_list(index_uni(lcm_sym119__), nil_index_list())), "inline_sym10__"), (1 - rvalue(phi, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym118__), nil_index_list())), + cons_list(index_uni(lcm_sym115__), nil_index_list())), "phi"))), "assigning variable inline_sym10__"); - for (int inline_sym13__ = 2; inline_sym13__ <= lcm_sym118__; + for (int inline_sym13__ = 2; inline_sym13__ <= lcm_sym115__; ++inline_sym13__) { int inline_sym11__; inline_sym11__ = std::numeric_limits::min(); - lcm_sym117__ = (n_occasions - inline_sym13__); + lcm_sym114__ = (n_occasions - inline_sym13__); int inline_sym12__; inline_sym12__ = std::numeric_limits::min(); - lcm_sym121__ = (lcm_sym117__ + 1); + lcm_sym118__ = (lcm_sym114__ + 1); current_statement__ = 20; assign(inline_sym10__, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym117__), nil_index_list())), + cons_list(index_uni(lcm_sym114__), nil_index_list())), stan::math::fma( (rvalue(phi, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym117__), nil_index_list())), + cons_list(index_uni(lcm_sym114__), nil_index_list())), "phi") * (1 - rvalue(p, cons_list(index_uni(inline_sym14__), - cons_list(index_uni((lcm_sym121__ - 1)), + cons_list(index_uni((lcm_sym118__ - 1)), nil_index_list())), "p"))), rvalue(inline_sym10__, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym121__), nil_index_list())), + cons_list(index_uni(lcm_sym118__), nil_index_list())), "inline_sym10__"), (1 - rvalue(phi, cons_list(index_uni(inline_sym14__), - cons_list(index_uni(lcm_sym117__), nil_index_list())), + cons_list(index_uni(lcm_sym114__), nil_index_list())), "phi"))), "assigning variable inline_sym10__");} } if (inline_sym15__) { @@ -19659,10 +19040,10 @@ class fails_test_model final : public model_base_crtp { break;} assign(chi, nil_index_list(), inline_sym9__, "assigning variable chi"); current_statement__ = 3; - if (lcm_sym107__) { - lcm_sym118__ = (n_occasions - 1); - lcm_sym108__ = logical_gte(lcm_sym118__, 1); - if (lcm_sym108__) { + if (lcm_sym104__) { + lcm_sym115__ = (n_occasions - 1); + lcm_sym105__ = logical_gte(lcm_sym115__, 1); + if (lcm_sym105__) { current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -19670,7 +19051,7 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "phi"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -19681,7 +19062,7 @@ class fails_test_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; - if (lcm_sym108__) { + if (lcm_sym105__) { current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -19689,7 +19070,7 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "phi"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -19700,10 +19081,10 @@ class fails_test_model final : public model_base_crtp { } } } current_statement__ = 3; - if (lcm_sym107__) { - lcm_sym118__ = (n_occasions - 1); - lcm_sym108__ = logical_gte(lcm_sym118__, 1); - if (lcm_sym108__) { + if (lcm_sym104__) { + lcm_sym115__ = (n_occasions - 1); + lcm_sym105__ = logical_gte(lcm_sym115__, 1); + if (lcm_sym105__) { current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -19711,7 +19092,7 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "phi"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -19722,7 +19103,7 @@ class fails_test_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; - if (lcm_sym108__) { + if (lcm_sym105__) { current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -19730,7 +19111,7 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "phi"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -19741,10 +19122,10 @@ class fails_test_model final : public model_base_crtp { } } } current_statement__ = 4; - if (lcm_sym107__) { - lcm_sym118__ = (n_occasions - 1); - lcm_sym108__ = logical_gte(lcm_sym118__, 1); - if (lcm_sym108__) { + if (lcm_sym104__) { + lcm_sym115__ = (n_occasions - 1); + lcm_sym105__ = logical_gte(lcm_sym115__, 1); + if (lcm_sym105__) { current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", @@ -19752,7 +19133,7 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "p"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", @@ -19763,7 +19144,7 @@ class fails_test_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; - if (lcm_sym108__) { + if (lcm_sym105__) { current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", @@ -19771,7 +19152,7 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "p"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", @@ -19782,10 +19163,10 @@ class fails_test_model final : public model_base_crtp { } } } current_statement__ = 4; - if (lcm_sym107__) { - lcm_sym118__ = (n_occasions - 1); - lcm_sym108__ = logical_gte(lcm_sym118__, 1); - if (lcm_sym108__) { + if (lcm_sym104__) { + lcm_sym115__ = (n_occasions - 1); + lcm_sym105__ = logical_gte(lcm_sym115__, 1); + if (lcm_sym105__) { current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", @@ -19793,7 +19174,7 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "p"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", @@ -19804,7 +19185,7 @@ class fails_test_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; - if (lcm_sym108__) { + if (lcm_sym105__) { current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", @@ -19812,7 +19193,7 @@ class fails_test_model final : public model_base_crtp { cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "p"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym118__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", @@ -19823,9 +19204,9 @@ class fails_test_model final : public model_base_crtp { } } } current_statement__ = 5; - if (lcm_sym107__) { - lcm_sym106__ = logical_gte(n_occasions, 1); - if (lcm_sym106__) { + if (lcm_sym104__) { + lcm_sym103__ = logical_gte(n_occasions, 1); + if (lcm_sym103__) { current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", @@ -19846,7 +19227,7 @@ class fails_test_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; - if (lcm_sym106__) { + if (lcm_sym103__) { current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", @@ -19867,9 +19248,9 @@ class fails_test_model final : public model_base_crtp { } } } current_statement__ = 5; - if (lcm_sym107__) { - lcm_sym106__ = logical_gte(n_occasions, 1); - if (lcm_sym106__) { + if (lcm_sym104__) { + lcm_sym103__ = logical_gte(n_occasions, 1); + if (lcm_sym103__) { current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", @@ -19889,7 +19270,7 @@ class fails_test_model final : public model_base_crtp { } for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; - if (lcm_sym106__) { + if (lcm_sym103__) { current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", @@ -19910,27 +19291,27 @@ class fails_test_model final : public model_base_crtp { } { current_statement__ = 30; - if (lcm_sym107__) { - lcm_sym148__ = first[(1 - 1)]; - if (logical_gt(lcm_sym148__, 0)) { - lcm_sym154__ = last[(1 - 1)]; - lcm_sym126__ = (lcm_sym148__ + 1); - if (logical_gte(lcm_sym154__, lcm_sym126__)) { + if (lcm_sym104__) { + lcm_sym141__ = first[(1 - 1)]; + if (logical_gt(lcm_sym141__, 0)) { + lcm_sym147__ = last[(1 - 1)]; + lcm_sym123__ = (lcm_sym141__ + 1); + if (logical_gte(lcm_sym147__, lcm_sym123__)) { current_statement__ = 24; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, cons_list(index_uni(1), - cons_list(index_uni((lcm_sym126__ - 1)), + cons_list(index_uni((lcm_sym123__ - 1)), nil_index_list())), "phi"))); - lcm_sym124__ = (lcm_sym126__ + 1); + lcm_sym121__ = (lcm_sym123__ + 1); lp_accum__.add( - bernoulli_lpmf(y[(1 - 1)][(lcm_sym126__ - 1)], + bernoulli_lpmf(y[(1 - 1)][(lcm_sym123__ - 1)], rvalue(p, cons_list(index_uni(1), - cons_list(index_uni((lcm_sym126__ - 1)), + cons_list(index_uni((lcm_sym123__ - 1)), nil_index_list())), "p"))); - for (int t = lcm_sym124__; t <= lcm_sym154__; ++t) { + for (int t = lcm_sym121__; t <= lcm_sym147__; ++t) { current_statement__ = 24; lp_accum__.add( bernoulli_lpmf(1, @@ -19951,30 +19332,30 @@ class fails_test_model final : public model_base_crtp { bernoulli_lpmf(1, rvalue(inline_sym9__, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym154__), nil_index_list())), + cons_list(index_uni(lcm_sym147__), nil_index_list())), "inline_sym9__"))); } for (int i = 2; i <= nind; ++i) { - lcm_sym147__ = first[(i - 1)]; - if (logical_gt(lcm_sym147__, 0)) { - lcm_sym153__ = last[(i - 1)]; - lcm_sym125__ = (lcm_sym147__ + 1); - if (logical_gte(lcm_sym153__, lcm_sym125__)) { + lcm_sym140__ = first[(i - 1)]; + if (logical_gt(lcm_sym140__, 0)) { + lcm_sym146__ = last[(i - 1)]; + lcm_sym122__ = (lcm_sym140__ + 1); + if (logical_gte(lcm_sym146__, lcm_sym122__)) { current_statement__ = 24; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, cons_list(index_uni(i), - cons_list(index_uni((lcm_sym125__ - 1)), + cons_list(index_uni((lcm_sym122__ - 1)), nil_index_list())), "phi"))); - lcm_sym123__ = (lcm_sym125__ + 1); + lcm_sym120__ = (lcm_sym122__ + 1); lp_accum__.add( - bernoulli_lpmf(y[(i - 1)][(lcm_sym125__ - 1)], + bernoulli_lpmf(y[(i - 1)][(lcm_sym122__ - 1)], rvalue(p, cons_list(index_uni(i), - cons_list(index_uni((lcm_sym125__ - 1)), + cons_list(index_uni((lcm_sym122__ - 1)), nil_index_list())), "p"))); - for (int t = lcm_sym123__; t <= lcm_sym153__; ++t) { + for (int t = lcm_sym120__; t <= lcm_sym146__; ++t) { current_statement__ = 24; lp_accum__.add( bernoulli_lpmf(1, @@ -19995,7 +19376,7 @@ class fails_test_model final : public model_base_crtp { bernoulli_lpmf(1, rvalue(inline_sym9__, cons_list(index_uni(i), - cons_list(index_uni(lcm_sym153__), nil_index_list())), + cons_list(index_uni(lcm_sym146__), nil_index_list())), "inline_sym9__"))); } } } @@ -20027,8 +19408,6 @@ class fails_test_model final : public model_base_crtp { (void) function__; // suppress unused var warning try { - double lcm_sym104__; - double lcm_sym103__; double lcm_sym102__; double lcm_sym101__; double lcm_sym100__; @@ -20048,14 +19427,16 @@ class fails_test_model final : public model_base_crtp { double lcm_sym86__; double lcm_sym85__; double lcm_sym84__; - int lcm_sym83__; - int lcm_sym82__; - double lcm_sym81__; - double lcm_sym80__; + double lcm_sym83__; + double lcm_sym82__; + int lcm_sym81__; + int lcm_sym80__; double lcm_sym79__; double lcm_sym78__; double lcm_sym77__; double lcm_sym76__; + double lcm_sym75__; + double lcm_sym74__; double lcm_sym73__; double lcm_sym72__; int lcm_sym71__; @@ -20080,27 +19461,15 @@ class fails_test_model final : public model_base_crtp { mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_p = in__.scalar(); - current_statement__ = 1; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); + mean_p = in__.read_lub(0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - beta = in__.vector(max_age); - lcm_sym54__ = logical_gte(max_age, 1); - if (lcm_sym54__) { - current_statement__ = 2; - assign(beta, cons_list(index_uni(1), nil_index_list()), - stan::math::lub_constrain(beta[(1 - 1)], 0, 1), - "assigning variable beta"); - for (int sym1__ = 2; sym1__ <= max_age; ++sym1__) { - current_statement__ = 2; - assign(beta, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(beta[(sym1__ - 1)], 0, 1), - "assigning variable beta");} - } + assign(beta, nil_index_list(), + in__.read_lub, jacobian__>(0, + 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -20114,7 +19483,7 @@ class fails_test_model final : public model_base_crtp { stan::math::fill(chi, DUMMY_VAR__); vars__.emplace_back(mean_p); - if (lcm_sym54__) { + if (logical_gte(max_age, 1)) { vars__.emplace_back(beta[(1 - 1)]); for (int sym1__ = 2; sym1__ <= max_age; ++sym1__) { vars__.emplace_back(beta[(sym1__ - 1)]);} @@ -20125,8 +19494,8 @@ class fails_test_model final : public model_base_crtp { } lcm_sym56__ = logical_gte(nind, 1); if (lcm_sym56__) { - lcm_sym83__ = first[(1 - 1)]; - lcm_sym65__ = (lcm_sym83__ - 1); + lcm_sym81__ = first[(1 - 1)]; + lcm_sym65__ = (lcm_sym81__ - 1); if (logical_gte(lcm_sym65__, 1)) { current_statement__ = 6; assign(phi, @@ -20151,17 +19520,17 @@ class fails_test_model final : public model_base_crtp { "assigning variable p");} } lcm_sym63__ = (n_occasions - 1); - if (logical_gte(lcm_sym63__, lcm_sym83__)) { + if (logical_gte(lcm_sym63__, lcm_sym81__)) { current_statement__ = 9; assign(phi, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym83__), nil_index_list())), - beta[(x[(1 - 1)][(lcm_sym83__ - 1)] - 1)], + cons_list(index_uni(lcm_sym81__), nil_index_list())), + beta[(x[(1 - 1)][(lcm_sym81__ - 1)] - 1)], "assigning variable phi"); - lcm_sym71__ = (lcm_sym83__ + 1); + lcm_sym71__ = (lcm_sym81__ + 1); assign(p, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym83__), nil_index_list())), mean_p, + cons_list(index_uni(lcm_sym81__), nil_index_list())), mean_p, "assigning variable p"); for (int t = lcm_sym71__; t <= lcm_sym63__; ++t) { current_statement__ = 9; @@ -20176,8 +19545,8 @@ class fails_test_model final : public model_base_crtp { "assigning variable p");} } for (int i = 2; i <= nind; ++i) { - lcm_sym82__ = first[(i - 1)]; - lcm_sym64__ = (lcm_sym82__ - 1); + lcm_sym80__ = first[(i - 1)]; + lcm_sym64__ = (lcm_sym80__ - 1); if (logical_gte(lcm_sym64__, 1)) { current_statement__ = 6; assign(phi, @@ -20202,17 +19571,17 @@ class fails_test_model final : public model_base_crtp { "assigning variable p");} } current_statement__ = 12; - if (logical_gte(lcm_sym63__, lcm_sym82__)) { + if (logical_gte(lcm_sym63__, lcm_sym80__)) { current_statement__ = 9; assign(phi, cons_list(index_uni(i), - cons_list(index_uni(lcm_sym82__), nil_index_list())), - beta[(x[(i - 1)][(lcm_sym82__ - 1)] - 1)], + cons_list(index_uni(lcm_sym80__), nil_index_list())), + beta[(x[(i - 1)][(lcm_sym80__ - 1)] - 1)], "assigning variable phi"); - lcm_sym70__ = (lcm_sym82__ + 1); + lcm_sym70__ = (lcm_sym80__ + 1); assign(p, cons_list(index_uni(i), - cons_list(index_uni(lcm_sym82__), nil_index_list())), mean_p, + cons_list(index_uni(lcm_sym80__), nil_index_list())), mean_p, "assigning variable p"); for (int t = lcm_sym70__; t <= lcm_sym63__; ++t) { current_statement__ = 9; @@ -20791,30 +20160,30 @@ class fails_test_model final : public model_base_crtp { final { param_names__.emplace_back(std::string() + "mean_p"); - for (int sym194__ = 1; sym194__ <= max_age; ++sym194__) { + for (int sym187__ = 1; sym187__ <= max_age; ++sym187__) { { - param_names__.emplace_back(std::string() + "beta" + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "beta" + '.' + std::to_string(sym187__)); }} if (emit_transformed_parameters__) { - for (int sym194__ = 1; sym194__ <= n_occ_minus_1; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occ_minus_1; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} - for (int sym194__ = 1; sym194__ <= n_occ_minus_1; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occ_minus_1; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} - for (int sym194__ = 1; sym194__ <= n_occasions; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occasions; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} } @@ -20832,30 +20201,30 @@ class fails_test_model final : public model_base_crtp { final { param_names__.emplace_back(std::string() + "mean_p"); - for (int sym194__ = 1; sym194__ <= max_age; ++sym194__) { + for (int sym187__ = 1; sym187__ <= max_age; ++sym187__) { { - param_names__.emplace_back(std::string() + "beta" + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "beta" + '.' + std::to_string(sym187__)); }} if (emit_transformed_parameters__) { - for (int sym194__ = 1; sym194__ <= n_occ_minus_1; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occ_minus_1; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} - for (int sym194__ = 1; sym194__ <= n_occ_minus_1; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occ_minus_1; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} - for (int sym194__ = 1; sym194__ <= n_occasions; ++sym194__) { + for (int sym187__ = 1; sym187__ <= n_occasions; ++sym187__) { { - for (int sym195__ = 1; sym195__ <= nind; ++sym195__) { + for (int sym188__ = 1; sym188__ <= nind; ++sym188__) { { - param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym195__) + '.' + std::to_string(sym194__)); + param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym188__) + '.' + std::to_string(sym187__)); }} }} } @@ -21069,6 +20438,7 @@ static const std::vector locations_array__ = " (in 'inlining-fail2.stan', line 85, column 13 to column 24)", " (in 'inlining-fail2.stan', line 85, column 6 to column 43)", " (in 'inlining-fail2.stan', line 119, column 8 to column 33)", + " (in 'inlining-fail2.stan', line 122, column 8 to line 124, column 47)", " (in 'inlining-fail2.stan', line 127, column 10 to line 130, column 49)", " (in 'inlining-fail2.stan', line 132, column 8 to column 63)", " (in 'inlining-fail2.stan', line 133, column 8 to column 34)", @@ -21079,6 +20449,7 @@ static const std::vector locations_array__ = " (in 'inlining-fail2.stan', line 106, column 10 to line 108, column 61)", " (in 'inlining-fail2.stan', line 109, column 10 to column 36)", " (in 'inlining-fail2.stan', line 91, column 15 to line 110, column 9)", + " (in 'inlining-fail2.stan', line 90, column 10 to column 44)", " (in 'inlining-fail2.stan', line 89, column 27 to line 91, column 9)", " (in 'inlining-fail2.stan', line 89, column 8 to line 110, column 9)", " (in 'inlining-fail2.stan', line 113, column 10 to column 39)", @@ -21086,8 +20457,6 @@ static const std::vector locations_array__ = " (in 'inlining-fail2.stan', line 112, column 42 to line 115, column 9)", " (in 'inlining-fail2.stan', line 117, column 8 to column 39)", " (in 'inlining-fail2.stan', line 87, column 20 to line 118, column 7)", - " (in 'inlining-fail2.stan', line 122, column 8 to line 124, column 47)", - " (in 'inlining-fail2.stan', line 90, column 10 to column 44)", " (in 'inlining-fail2.stan', line 84, column 23 to line 135, column 5)", " (in 'inlining-fail2.stan', line 161, column 2 to column 17)", " (in 'inlining-fail2.stan', line 162, column 2 to column 27)", @@ -21547,9 +20916,9 @@ jolly_seber_lp(const std::vector>& y, "assigning variable lcm_sym82__"); lcm_sym117__ = first[(1 - 1)]; if (lcm_sym117__) { - current_statement__ = 94; + current_statement__ = 96; if (logical_eq(lcm_sym117__, 1)) { - current_statement__ = 101; + current_statement__ = 94; lp_accum__.add( bernoulli_lpmf(1, (gamma[(1 - 1)] * @@ -21557,7 +20926,7 @@ jolly_seber_lp(const std::vector>& y, cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "p")))); } else { - current_statement__ = 87; + current_statement__ = 88; validate_non_negative_index("lp", "first[i]", lcm_sym117__); Eigen::Matrix lp; lp = Eigen::Matrix(lcm_sym117__); @@ -21584,7 +20953,7 @@ jolly_seber_lp(const std::vector>& y, "p"))), "assigning variable lp"); current_statement__ = 140; if (logical_gte(lcm_sym84__, 2)) { - current_statement__ = 89; + current_statement__ = 90; assign(lp, cons_list(index_uni(2), nil_index_list()), ((((bernoulli_lpmf(1, prod( @@ -21609,7 +20978,7 @@ jolly_seber_lp(const std::vector>& y, cons_list(index_uni(lcm_sym117__), nil_index_list())), "p"))), "assigning variable lp"); for (int t = 3; t <= lcm_sym84__; ++t) { - current_statement__ = 89; + current_statement__ = 90; assign(lp, cons_list(index_uni(t), nil_index_list()), ((((bernoulli_lpmf(1, prod( @@ -21635,7 +21004,7 @@ jolly_seber_lp(const std::vector>& y, nil_index_list())), "p"))), "assigning variable lp");} } - current_statement__ = 90; + current_statement__ = 91; assign(lp, cons_list(index_uni(lcm_sym117__), nil_index_list()), ((bernoulli_lpmf(1, prod( @@ -21648,12 +21017,12 @@ jolly_seber_lp(const std::vector>& y, cons_list(index_uni(1), cons_list(index_uni(lcm_sym117__), nil_index_list())), "p"))), "assigning variable lp"); - current_statement__ = 91; + current_statement__ = 92; lp_accum__.add(log_sum_exp(lp)); } lcm_sym119__ = last[(1 - 1)]; if (logical_gte(lcm_sym119__, (lcm_sym117__ + 1))) { - current_statement__ = 95; + current_statement__ = 97; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, @@ -21668,21 +21037,21 @@ jolly_seber_lp(const std::vector>& y, cons_list(index_uni((lcm_sym117__ + 1)), nil_index_list())), "p"))); for (int t = lcm_sym100__; t <= lcm_sym119__; ++t) { - current_statement__ = 95; + current_statement__ = 97; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, cons_list(index_uni(1), cons_list(index_uni((t - 1)), nil_index_list())), "phi"))); - current_statement__ = 96; + current_statement__ = 98; lp_accum__.add( bernoulli_lpmf(y[(1 - 1)][(t - 1)], rvalue(p, cons_list(index_uni(1), cons_list(index_uni(t), nil_index_list())), "p")));} } - current_statement__ = 98; + current_statement__ = 100; lp_accum__.add( bernoulli_lpmf(1, rvalue(chi, @@ -21696,7 +21065,7 @@ jolly_seber_lp(const std::vector>& y, lp = Eigen::Matrix(lcm_sym101__); stan::math::fill(lp, DUMMY_VAR__); - current_statement__ = 100; + current_statement__ = 83; assign(lp, cons_list(index_uni(1), nil_index_list()), ((bernoulli_lpmf(1, gamma[(1 - 1)]) + bernoulli_lpmf(0, @@ -21710,7 +21079,7 @@ jolly_seber_lp(const std::vector>& y, "assigning variable lp"); current_statement__ = 139; if (logical_gte(lcm_sym121__, 2)) { - current_statement__ = 83; + current_statement__ = 84; assign(lp, cons_list(index_uni(2), nil_index_list()), (((bernoulli_lpmf(1, prod( @@ -21728,7 +21097,7 @@ jolly_seber_lp(const std::vector>& y, cons_list(index_uni(2), nil_index_list())), "chi"))), "assigning variable lp"); for (int t = 3; t <= lcm_sym121__; ++t) { - current_statement__ = 83; + current_statement__ = 84; assign(lp, cons_list(index_uni(t), nil_index_list()), (((bernoulli_lpmf(1, prod( @@ -21746,11 +21115,11 @@ jolly_seber_lp(const std::vector>& y, cons_list(index_uni(t), nil_index_list())), "chi"))), "assigning variable lp");} } - current_statement__ = 84; + current_statement__ = 85; assign(lp, cons_list(index_uni(lcm_sym101__), nil_index_list()), bernoulli_lpmf(1, prod(lcm_sym80__)), "assigning variable lp"); - current_statement__ = 85; + current_statement__ = 86; lp_accum__.add(log_sum_exp(lp)); } for (int i = 2; i <= lcm_sym120__; ++i) { @@ -21767,9 +21136,9 @@ jolly_seber_lp(const std::vector>& y, "assigning variable lcm_sym81__"); lcm_sym116__ = first[(i - 1)]; if (lcm_sym116__) { - current_statement__ = 94; + current_statement__ = 96; if (logical_eq(lcm_sym116__, 1)) { - current_statement__ = 101; + current_statement__ = 94; lp_accum__.add( bernoulli_lpmf(1, (gamma[(1 - 1)] * @@ -21777,7 +21146,7 @@ jolly_seber_lp(const std::vector>& y, cons_list(index_uni(i), cons_list(index_uni(1), nil_index_list())), "p")))); } else { - current_statement__ = 87; + current_statement__ = 88; validate_non_negative_index("lp", "first[i]", lcm_sym116__); Eigen::Matrix lp; lp = Eigen::Matrix(lcm_sym116__); @@ -21804,7 +21173,7 @@ jolly_seber_lp(const std::vector>& y, "p"))), "assigning variable lp"); current_statement__ = 140; if (logical_gte(lcm_sym83__, 2)) { - current_statement__ = 89; + current_statement__ = 90; assign(lp, cons_list(index_uni(2), nil_index_list()), ((((bernoulli_lpmf(1, prod( @@ -21830,7 +21199,7 @@ jolly_seber_lp(const std::vector>& y, nil_index_list())), "p"))), "assigning variable lp"); for (int t = 3; t <= lcm_sym83__; ++t) { - current_statement__ = 89; + current_statement__ = 90; assign(lp, cons_list(index_uni(t), nil_index_list()), ((((bernoulli_lpmf(1, prod( @@ -21856,7 +21225,7 @@ jolly_seber_lp(const std::vector>& y, nil_index_list())), "p"))), "assigning variable lp");} } - current_statement__ = 90; + current_statement__ = 91; assign(lp, cons_list(index_uni(lcm_sym116__), nil_index_list()), ((bernoulli_lpmf(1, @@ -21870,12 +21239,12 @@ jolly_seber_lp(const std::vector>& y, cons_list(index_uni(i), cons_list(index_uni(lcm_sym116__), nil_index_list())), "p"))), "assigning variable lp"); - current_statement__ = 91; + current_statement__ = 92; lp_accum__.add(log_sum_exp(lp)); } lcm_sym118__ = last[(i - 1)]; if (logical_gte(lcm_sym118__, (lcm_sym116__ + 1))) { - current_statement__ = 95; + current_statement__ = 97; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, @@ -21891,21 +21260,21 @@ jolly_seber_lp(const std::vector>& y, cons_list(index_uni((lcm_sym116__ + 1)), nil_index_list())), "p"))); for (int t = lcm_sym99__; t <= lcm_sym118__; ++t) { - current_statement__ = 95; + current_statement__ = 97; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, cons_list(index_uni(i), cons_list(index_uni((t - 1)), nil_index_list())), "phi"))); - current_statement__ = 96; + current_statement__ = 98; lp_accum__.add( bernoulli_lpmf(y[(i - 1)][(t - 1)], rvalue(p, cons_list(index_uni(i), cons_list(index_uni(t), nil_index_list())), "p")));} } - current_statement__ = 98; + current_statement__ = 100; lp_accum__.add( bernoulli_lpmf(1, rvalue(chi, @@ -21919,7 +21288,7 @@ jolly_seber_lp(const std::vector>& y, lp = Eigen::Matrix(lcm_sym101__); stan::math::fill(lp, DUMMY_VAR__); - current_statement__ = 100; + current_statement__ = 83; assign(lp, cons_list(index_uni(1), nil_index_list()), ((bernoulli_lpmf(1, gamma[(1 - 1)]) + bernoulli_lpmf(0, @@ -21933,7 +21302,7 @@ jolly_seber_lp(const std::vector>& y, "assigning variable lp"); current_statement__ = 139; if (logical_gte(lcm_sym121__, 2)) { - current_statement__ = 83; + current_statement__ = 84; assign(lp, cons_list(index_uni(2), nil_index_list()), (((bernoulli_lpmf(1, prod( @@ -21951,7 +21320,7 @@ jolly_seber_lp(const std::vector>& y, cons_list(index_uni(2), nil_index_list())), "chi"))), "assigning variable lp"); for (int t = 3; t <= lcm_sym121__; ++t) { - current_statement__ = 83; + current_statement__ = 84; assign(lp, cons_list(index_uni(t), nil_index_list()), (((bernoulli_lpmf(1, prod( @@ -21970,11 +21339,11 @@ jolly_seber_lp(const std::vector>& y, cons_list(index_uni(t), nil_index_list())), "chi"))), "assigning variable lp");} } - current_statement__ = 84; + current_statement__ = 85; assign(lp, cons_list(index_uni(lcm_sym101__), nil_index_list()), bernoulli_lpmf(1, prod(lcm_sym80__)), "assigning variable lp"); - current_statement__ = 85; + current_statement__ = 86; lp_accum__.add(log_sum_exp(lp)); }} } @@ -22073,12 +21442,6 @@ return seq_cprob(gamma, pstream__); class inlining_fail2_model final : public model_base_crtp { private: - int lcm_sym345__; - int lcm_sym344__; - int lcm_sym343__; - int lcm_sym342__; - int lcm_sym341__; - int lcm_sym340__; int lcm_sym339__; int lcm_sym338__; int lcm_sym337__; @@ -22097,6 +21460,12 @@ class inlining_fail2_model final : public model_base_crtp int lcm_sym324__; int lcm_sym323__; int lcm_sym322__; + int lcm_sym321__; + int lcm_sym320__; + int lcm_sym319__; + int lcm_sym318__; + int lcm_sym317__; + int lcm_sym316__; int M; int n_occasions; std::vector> y; @@ -22191,11 +21560,11 @@ class inlining_fail2_model final : public model_base_crtp "assigning variable y_flat__"); current_statement__ = 107; pos__ = 1; - lcm_sym323__ = logical_gte(n_occasions, 1); - if (lcm_sym323__) { + lcm_sym317__ = logical_gte(n_occasions, 1); + if (lcm_sym317__) { { - lcm_sym322__ = logical_gte(M, 1); - if (lcm_sym322__) { + lcm_sym316__ = logical_gte(M, 1); + if (lcm_sym316__) { current_statement__ = 107; assign(y, cons_list(index_uni(1), @@ -22214,7 +21583,7 @@ class inlining_fail2_model final : public model_base_crtp } for (int sym1__ = 2; sym1__ <= n_occasions; ++sym1__) { current_statement__ = 107; - if (lcm_sym322__) { + if (lcm_sym316__) { current_statement__ = 107; assign(y, cons_list(index_uni(1), @@ -22233,13 +21602,13 @@ class inlining_fail2_model final : public model_base_crtp } } } } else { - lcm_sym322__ = logical_gte(M, 1); + lcm_sym316__ = logical_gte(M, 1); } } current_statement__ = 107; - if (lcm_sym322__) { + if (lcm_sym316__) { current_statement__ = 107; - if (lcm_sym323__) { + if (lcm_sym317__) { current_statement__ = 107; current_statement__ = 107; check_greater_or_equal(function__, "y[sym1__, sym2__]", @@ -22252,7 +21621,7 @@ class inlining_fail2_model final : public model_base_crtp } for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 107; - if (lcm_sym323__) { + if (lcm_sym317__) { current_statement__ = 107; current_statement__ = 107; check_greater_or_equal(function__, "y[sym1__, sym2__]", @@ -22265,9 +21634,9 @@ class inlining_fail2_model final : public model_base_crtp } } } current_statement__ = 107; - if (lcm_sym322__) { + if (lcm_sym316__) { current_statement__ = 107; - if (lcm_sym323__) { + if (lcm_sym317__) { current_statement__ = 107; current_statement__ = 107; check_less_or_equal(function__, "y[sym1__, sym2__]", @@ -22280,7 +21649,7 @@ class inlining_fail2_model final : public model_base_crtp } for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 107; - if (lcm_sym323__) { + if (lcm_sym317__) { current_statement__ = 107; current_statement__ = 107; check_less_or_equal(function__, "y[sym1__, sym2__]", @@ -22303,15 +21672,15 @@ class inlining_fail2_model final : public model_base_crtp last = std::vector(M, std::numeric_limits::min()); current_statement__ = 113; - if (lcm_sym322__) { + if (lcm_sym316__) { int inline_sym41__; int inline_sym43__; inline_sym43__ = std::numeric_limits::min(); inline_sym43__ = 0; for (int inline_sym44__ = 1; inline_sym44__ <= 1; ++inline_sym44__) { - lcm_sym331__ = size(y[(1 - 1)]); - for (int inline_sym42__ = 1; inline_sym42__ <= lcm_sym331__; + lcm_sym325__ = size(y[(1 - 1)]); + for (int inline_sym42__ = 1; inline_sym42__ <= lcm_sym325__; ++inline_sym42__) { current_statement__ = 59; if (y[(1 - 1)][(inline_sym42__ - 1)]) { @@ -22334,8 +21703,8 @@ class inlining_fail2_model final : public model_base_crtp inline_sym43__ = 0; for (int inline_sym44__ = 1; inline_sym44__ <= 1; ++inline_sym44__) { - lcm_sym330__ = size(y[(i - 1)]); - for (int inline_sym42__ = 1; inline_sym42__ <= lcm_sym330__; + lcm_sym324__ = size(y[(i - 1)]); + for (int inline_sym42__ = 1; inline_sym42__ <= lcm_sym324__; ++inline_sym42__) { current_statement__ = 59; if (y[(i - 1)][(inline_sym42__ - 1)]) { @@ -22353,26 +21722,26 @@ class inlining_fail2_model final : public model_base_crtp inline_sym41__, "assigning variable first");} } current_statement__ = 120; - if (lcm_sym322__) { + if (lcm_sym316__) { int inline_sym45__; int inline_sym48__; inline_sym48__ = std::numeric_limits::min(); inline_sym48__ = 0; for (int inline_sym49__ = 1; inline_sym49__ <= 1; ++inline_sym49__) { - lcm_sym331__ = size(y[(1 - 1)]); - lcm_sym328__ = (lcm_sym331__ - 1); - for (int inline_sym47__ = 0; inline_sym47__ <= lcm_sym328__; + lcm_sym325__ = size(y[(1 - 1)]); + lcm_sym322__ = (lcm_sym325__ - 1); + for (int inline_sym47__ = 0; inline_sym47__ <= lcm_sym322__; ++inline_sym47__) { int inline_sym46__; inline_sym46__ = std::numeric_limits::min(); - lcm_sym327__ = (lcm_sym331__ - inline_sym47__); - inline_sym46__ = lcm_sym327__; + lcm_sym321__ = (lcm_sym325__ - inline_sym47__); + inline_sym46__ = lcm_sym321__; current_statement__ = 116; - if (y[(1 - 1)][(lcm_sym327__ - 1)]) { + if (y[(1 - 1)][(lcm_sym321__ - 1)]) { inline_sym48__ = 1; - inline_sym45__ = lcm_sym327__; + inline_sym45__ = lcm_sym321__; break; } } if (inline_sym48__) { @@ -22390,19 +21759,19 @@ class inlining_fail2_model final : public model_base_crtp inline_sym48__ = 0; for (int inline_sym49__ = 1; inline_sym49__ <= 1; ++inline_sym49__) { - lcm_sym330__ = size(y[(i - 1)]); - lcm_sym326__ = (lcm_sym330__ - 1); - for (int inline_sym47__ = 0; inline_sym47__ <= lcm_sym326__; + lcm_sym324__ = size(y[(i - 1)]); + lcm_sym320__ = (lcm_sym324__ - 1); + for (int inline_sym47__ = 0; inline_sym47__ <= lcm_sym320__; ++inline_sym47__) { int inline_sym46__; inline_sym46__ = std::numeric_limits::min(); - lcm_sym325__ = (lcm_sym330__ - inline_sym47__); - inline_sym46__ = lcm_sym325__; + lcm_sym319__ = (lcm_sym324__ - inline_sym47__); + inline_sym46__ = lcm_sym319__; current_statement__ = 116; - if (y[(i - 1)][(lcm_sym325__ - 1)]) { + if (y[(i - 1)][(lcm_sym319__ - 1)]) { inline_sym48__ = 1; - inline_sym45__ = lcm_sym325__; + inline_sym45__ = lcm_sym319__; break; } } if (inline_sym48__) { @@ -22415,7 +21784,7 @@ class inlining_fail2_model final : public model_base_crtp inline_sym45__, "assigning variable last");} } current_statement__ = 109; - if (lcm_sym322__) { + if (lcm_sym316__) { current_statement__ = 109; current_statement__ = 109; check_greater_or_equal(function__, "first[sym1__]", first[(1 - 1)], 0); @@ -22426,7 +21795,7 @@ class inlining_fail2_model final : public model_base_crtp first[(sym1__ - 1)], 0);} } current_statement__ = 109; - if (lcm_sym322__) { + if (lcm_sym316__) { current_statement__ = 109; current_statement__ = 109; check_less_or_equal(function__, "first[sym1__]", first[(1 - 1)], @@ -22438,7 +21807,7 @@ class inlining_fail2_model final : public model_base_crtp first[(sym1__ - 1)], n_occasions);} } current_statement__ = 111; - if (lcm_sym322__) { + if (lcm_sym316__) { current_statement__ = 111; current_statement__ = 111; check_greater_or_equal(function__, "last[sym1__]", last[(1 - 1)], 0); @@ -22449,7 +21818,7 @@ class inlining_fail2_model final : public model_base_crtp last[(sym1__ - 1)], 0);} } current_statement__ = 111; - if (lcm_sym322__) { + if (lcm_sym316__) { current_statement__ = 111; current_statement__ = 111; check_less_or_equal(function__, "last[sym1__]", last[(1 - 1)], @@ -22465,19 +21834,19 @@ class inlining_fail2_model final : public model_base_crtp current_statement__ = 122; epsilon_1dim__ = std::numeric_limits::min(); - lcm_sym324__ = (n_occasions - 1); - epsilon_1dim__ = lcm_sym324__; + lcm_sym318__ = (n_occasions - 1); + epsilon_1dim__ = lcm_sym318__; current_statement__ = 122; - validate_non_negative_index("epsilon", "n_occasions - 1", lcm_sym324__); + validate_non_negative_index("epsilon", "n_occasions - 1", lcm_sym318__); current_statement__ = 123; validate_non_negative_index("phi", "M", M); current_statement__ = 124; phi_2dim__ = std::numeric_limits::min(); current_statement__ = 124; - phi_2dim__ = lcm_sym324__; + phi_2dim__ = lcm_sym318__; current_statement__ = 124; - validate_non_negative_index("phi", "n_occasions - 1", lcm_sym324__); + validate_non_negative_index("phi", "n_occasions - 1", lcm_sym318__); current_statement__ = 125; validate_non_negative_index("p", "M", M); current_statement__ = 126; @@ -22530,12 +21899,6 @@ class inlining_fail2_model final : public model_base_crtp (void) function__; // suppress unused var warning try { - double lcm_sym321__; - double lcm_sym320__; - double lcm_sym319__; - double lcm_sym318__; - int lcm_sym317__; - int lcm_sym316__; double lcm_sym315__; double lcm_sym314__; double lcm_sym313__; @@ -22546,21 +21909,23 @@ class inlining_fail2_model final : public model_base_crtp double lcm_sym308__; double lcm_sym307__; double lcm_sym306__; - local_scalar_t__ lcm_sym302__; - double lcm_sym300__; int lcm_sym305__; int lcm_sym304__; + double lcm_sym303__; + double lcm_sym302__; + double lcm_sym301__; + double lcm_sym300__; + int lcm_sym299__; int lcm_sym298__; - Eigen::Matrix lcm_sym297__; - double lcm_sym296__; - double lcm_sym295__; - local_scalar_t__ lcm_sym294__; - local_scalar_t__ lcm_sym293__; - double lcm_sym292__; - double lcm_sym291__; - int lcm_sym290__; + int lcm_sym296__; + Eigen::Matrix lcm_sym295__; + double lcm_sym294__; + double lcm_sym293__; + local_scalar_t__ lcm_sym292__; + local_scalar_t__ lcm_sym291__; + double lcm_sym290__; double lcm_sym289__; - double lcm_sym288__; + int lcm_sym288__; double lcm_sym287__; double lcm_sym286__; double lcm_sym285__; @@ -22572,11 +21937,11 @@ class inlining_fail2_model final : public model_base_crtp double lcm_sym279__; double lcm_sym278__; double lcm_sym277__; - int lcm_sym276__; - int lcm_sym275__; + double lcm_sym276__; + double lcm_sym275__; int lcm_sym274__; - double lcm_sym273__; - double lcm_sym272__; + int lcm_sym273__; + int lcm_sym272__; double lcm_sym271__; double lcm_sym270__; double lcm_sym269__; @@ -22589,18 +21954,18 @@ class inlining_fail2_model final : public model_base_crtp double lcm_sym262__; double lcm_sym261__; double lcm_sym260__; - int lcm_sym259__; - int lcm_sym258__; + double lcm_sym259__; + double lcm_sym258__; int lcm_sym257__; int lcm_sym256__; int lcm_sym255__; int lcm_sym254__; - Eigen::Matrix lcm_sym253__; - Eigen::Matrix lcm_sym252__; + int lcm_sym253__; + int lcm_sym252__; Eigen::Matrix lcm_sym251__; - int lcm_sym303__; - int lcm_sym249__; - int lcm_sym248__; + Eigen::Matrix lcm_sym250__; + Eigen::Matrix lcm_sym249__; + int lcm_sym297__; int lcm_sym247__; int lcm_sym246__; int lcm_sym245__; @@ -22611,87 +21976,41 @@ class inlining_fail2_model final : public model_base_crtp int lcm_sym240__; int lcm_sym239__; int lcm_sym238__; + int lcm_sym237__; + int lcm_sym236__; local_scalar_t__ mean_phi; mean_phi = DUMMY_VAR__; current_statement__ = 1; - mean_phi = in__.scalar(); - current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - mean_phi = stan::math::lub_constrain(mean_phi, 0, 1, lp__); - } else { - current_statement__ = 1; - mean_phi = stan::math::lub_constrain(mean_phi, 0, 1); - } + mean_phi = in__.read_lub(0, 1, lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1, lp__); - } else { - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); - } + mean_p = in__.read_lub(0, 1, lp__); Eigen::Matrix gamma; gamma = Eigen::Matrix(n_occasions); stan::math::fill(gamma, DUMMY_VAR__); current_statement__ = 3; - gamma = in__.vector(n_occasions); - lcm_sym241__ = logical_gte(n_occasions, 1); - if (lcm_sym241__) { - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - assign(gamma, cons_list(index_uni(1), nil_index_list()), - stan::math::lub_constrain(gamma[(1 - 1)], 0, 1, lp__), - "assigning variable gamma"); - } else { - current_statement__ = 3; - assign(gamma, cons_list(index_uni(1), nil_index_list()), - stan::math::lub_constrain(gamma[(1 - 1)], 0, 1), - "assigning variable gamma"); - } - for (int sym1__ = 2; sym1__ <= n_occasions; ++sym1__) { - current_statement__ = 3; - if (jacobian__) { - current_statement__ = 3; - assign(gamma, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(gamma[(sym1__ - 1)], 0, 1, lp__), - "assigning variable gamma"); - } else { - current_statement__ = 3; - assign(gamma, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(gamma[(sym1__ - 1)], 0, 1), - "assigning variable gamma"); - }} - } + assign(gamma, nil_index_list(), + in__.read_lub, jacobian__>(0, + 1, lp__, n_occasions), "assigning variable gamma"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix((n_occasions - 1)); stan::math::fill(epsilon, DUMMY_VAR__); - lcm_sym303__ = (n_occasions - 1); - epsilon = in__.vector(lcm_sym303__); + lcm_sym297__ = (n_occasions - 1); + assign(epsilon, nil_index_list(), + in__.read, jacobian__>(lp__, + lcm_sym297__), "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; current_statement__ = 5; - sigma = in__.scalar(); - current_statement__ = 5; - if (jacobian__) { - current_statement__ = 5; - sigma = stan::math::lub_constrain(sigma, 0, 5, lp__); - } else { - current_statement__ = 5; - sigma = stan::math::lub_constrain(sigma, 0, 5); - } + sigma = in__.read_lub(0, 5, lp__); Eigen::Matrix phi; - phi = Eigen::Matrix(M, lcm_sym303__); + phi = Eigen::Matrix(M, lcm_sym297__); stan::math::fill(phi, DUMMY_VAR__); Eigen::Matrix p; @@ -22702,45 +22021,45 @@ class inlining_fail2_model final : public model_base_crtp chi = Eigen::Matrix(M, n_occasions); stan::math::fill(chi, DUMMY_VAR__); - lcm_sym242__ = logical_gte(lcm_sym303__, 1); - if (lcm_sym242__) { + lcm_sym240__ = logical_gte(lcm_sym297__, 1); + if (lcm_sym240__) { { - lcm_sym240__ = logical_gte(M, 1); - if (lcm_sym240__) { - lcm_sym294__ = inv_logit((logit(mean_phi) + epsilon[(1 - 1)])); + lcm_sym238__ = logical_gte(M, 1); + if (lcm_sym238__) { + lcm_sym292__ = inv_logit((logit(mean_phi) + epsilon[(1 - 1)])); assign(phi, cons_list(index_uni(1), - cons_list(index_uni(1), nil_index_list())), lcm_sym294__, + cons_list(index_uni(1), nil_index_list())), lcm_sym292__, "assigning variable phi"); for (int i = 2; i <= M; ++i) { current_statement__ = 9; assign(phi, cons_list(index_uni(i), - cons_list(index_uni(1), nil_index_list())), lcm_sym294__, + cons_list(index_uni(1), nil_index_list())), lcm_sym292__, "assigning variable phi");} } - for (int t = 2; t <= lcm_sym303__; ++t) { + for (int t = 2; t <= lcm_sym297__; ++t) { current_statement__ = 10; - if (lcm_sym240__) { - lcm_sym293__ = inv_logit((logit(mean_phi) + epsilon[(t - 1)])); + if (lcm_sym238__) { + lcm_sym291__ = inv_logit((logit(mean_phi) + epsilon[(t - 1)])); assign(phi, cons_list(index_uni(1), - cons_list(index_uni(t), nil_index_list())), lcm_sym293__, + cons_list(index_uni(t), nil_index_list())), lcm_sym291__, "assigning variable phi"); for (int i = 2; i <= M; ++i) { current_statement__ = 9; assign(phi, cons_list(index_uni(i), - cons_list(index_uni(t), nil_index_list())), lcm_sym293__, + cons_list(index_uni(t), nil_index_list())), lcm_sym291__, "assigning variable phi");} } } } } else { - lcm_sym240__ = logical_gte(M, 1); + lcm_sym238__ = logical_gte(M, 1); } - assign(lcm_sym297__, nil_index_list(), - rep_matrix(mean_p, M, n_occasions), "assigning variable lcm_sym297__"); - assign(p, nil_index_list(), lcm_sym297__, "assigning variable p"); + assign(lcm_sym295__, nil_index_list(), + rep_matrix(mean_p, M, n_occasions), "assigning variable lcm_sym295__"); + assign(p, nil_index_list(), lcm_sym295__, "assigning variable p"); Eigen::Matrix inline_sym22__; int inline_sym30__; inline_sym30__ = std::numeric_limits::min(); @@ -22750,90 +22069,90 @@ class inlining_fail2_model final : public model_base_crtp int inline_sym23__; inline_sym23__ = std::numeric_limits::min(); - lcm_sym298__ = rows(lcm_sym297__); + lcm_sym296__ = rows(lcm_sym295__); int inline_sym24__; inline_sym24__ = std::numeric_limits::min(); - lcm_sym290__ = cols(lcm_sym297__); + lcm_sym288__ = cols(lcm_sym295__); current_statement__ = 14; - validate_non_negative_index("chi", "n_ind", lcm_sym298__); + validate_non_negative_index("chi", "n_ind", lcm_sym296__); current_statement__ = 15; - validate_non_negative_index("chi", "n_occasions", lcm_sym290__); + validate_non_negative_index("chi", "n_occasions", lcm_sym288__); Eigen::Matrix inline_sym25__; - inline_sym25__ = Eigen::Matrix(lcm_sym298__, lcm_sym290__); + inline_sym25__ = Eigen::Matrix(lcm_sym296__, lcm_sym288__); stan::math::fill(inline_sym25__, DUMMY_VAR__); - for (int inline_sym29__ = 1; inline_sym29__ <= lcm_sym298__; + for (int inline_sym29__ = 1; inline_sym29__ <= lcm_sym296__; ++inline_sym29__) { current_statement__ = 17; assign(inline_sym25__, cons_list(index_uni(inline_sym29__), - cons_list(index_uni(lcm_sym290__), nil_index_list())), 1.0, + cons_list(index_uni(lcm_sym288__), nil_index_list())), 1.0, "assigning variable inline_sym25__"); - lcm_sym255__ = (lcm_sym290__ - 1); - if (logical_gte(lcm_sym255__, 1)) { + lcm_sym253__ = (lcm_sym288__ - 1); + if (logical_gte(lcm_sym253__, 1)) { int inline_sym26__; inline_sym26__ = std::numeric_limits::min(); int inline_sym27__; inline_sym27__ = std::numeric_limits::min(); - lcm_sym259__ = (lcm_sym255__ + 1); + lcm_sym257__ = (lcm_sym253__ + 1); current_statement__ = 20; assign(inline_sym25__, cons_list(index_uni(inline_sym29__), - cons_list(index_uni(lcm_sym255__), nil_index_list())), + cons_list(index_uni(lcm_sym253__), nil_index_list())), stan::math::fma( (rvalue(phi, cons_list(index_uni(inline_sym29__), - cons_list(index_uni(lcm_sym255__), nil_index_list())), + cons_list(index_uni(lcm_sym253__), nil_index_list())), "phi") * (1 - - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym29__), - cons_list(index_uni(lcm_sym259__), nil_index_list())), - "lcm_sym297__"))), + cons_list(index_uni(lcm_sym257__), nil_index_list())), + "lcm_sym295__"))), rvalue(inline_sym25__, cons_list(index_uni(inline_sym29__), - cons_list(index_uni(lcm_sym259__), nil_index_list())), + cons_list(index_uni(lcm_sym257__), nil_index_list())), "inline_sym25__"), (1 - rvalue(phi, cons_list(index_uni(inline_sym29__), - cons_list(index_uni(lcm_sym255__), nil_index_list())), + cons_list(index_uni(lcm_sym253__), nil_index_list())), "phi"))), "assigning variable inline_sym25__"); - for (int inline_sym28__ = 2; inline_sym28__ <= lcm_sym255__; + for (int inline_sym28__ = 2; inline_sym28__ <= lcm_sym253__; ++inline_sym28__) { int inline_sym26__; inline_sym26__ = std::numeric_limits::min(); - lcm_sym254__ = (lcm_sym290__ - inline_sym28__); + lcm_sym252__ = (lcm_sym288__ - inline_sym28__); int inline_sym27__; inline_sym27__ = std::numeric_limits::min(); - lcm_sym258__ = (lcm_sym254__ + 1); + lcm_sym256__ = (lcm_sym252__ + 1); current_statement__ = 20; assign(inline_sym25__, cons_list(index_uni(inline_sym29__), - cons_list(index_uni(lcm_sym254__), nil_index_list())), + cons_list(index_uni(lcm_sym252__), nil_index_list())), stan::math::fma( (rvalue(phi, cons_list(index_uni(inline_sym29__), - cons_list(index_uni(lcm_sym254__), nil_index_list())), + cons_list(index_uni(lcm_sym252__), nil_index_list())), "phi") * (1 - - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym29__), - cons_list(index_uni(lcm_sym258__), - nil_index_list())), "lcm_sym297__"))), + cons_list(index_uni(lcm_sym256__), + nil_index_list())), "lcm_sym295__"))), rvalue(inline_sym25__, cons_list(index_uni(inline_sym29__), - cons_list(index_uni(lcm_sym258__), nil_index_list())), + cons_list(index_uni(lcm_sym256__), nil_index_list())), "inline_sym25__"), (1 - rvalue(phi, cons_list(index_uni(inline_sym29__), - cons_list(index_uni(lcm_sym254__), nil_index_list())), + cons_list(index_uni(lcm_sym252__), nil_index_list())), "phi"))), "assigning variable inline_sym25__");} } if (inline_sym30__) { @@ -22848,9 +22167,9 @@ class inlining_fail2_model final : public model_base_crtp break;} assign(chi, nil_index_list(), inline_sym22__, "assigning variable chi"); current_statement__ = 6; - if (lcm_sym240__) { + if (lcm_sym238__) { current_statement__ = 6; - if (lcm_sym242__) { + if (lcm_sym240__) { current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -22858,7 +22177,7 @@ class inlining_fail2_model final : public model_base_crtp cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "phi"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym303__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym297__; ++sym2__) { current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -22869,7 +22188,7 @@ class inlining_fail2_model final : public model_base_crtp } for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 6; - if (lcm_sym242__) { + if (lcm_sym240__) { current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -22877,7 +22196,7 @@ class inlining_fail2_model final : public model_base_crtp cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "phi"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym303__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym297__; ++sym2__) { current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -22888,9 +22207,9 @@ class inlining_fail2_model final : public model_base_crtp } } } current_statement__ = 6; - if (lcm_sym240__) { + if (lcm_sym238__) { current_statement__ = 6; - if (lcm_sym242__) { + if (lcm_sym240__) { current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -22898,7 +22217,7 @@ class inlining_fail2_model final : public model_base_crtp cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "phi"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym303__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym297__; ++sym2__) { current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -22909,7 +22228,7 @@ class inlining_fail2_model final : public model_base_crtp } for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 6; - if (lcm_sym242__) { + if (lcm_sym240__) { current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -22917,7 +22236,7 @@ class inlining_fail2_model final : public model_base_crtp cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "phi"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym303__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym297__; ++sym2__) { current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -22928,94 +22247,94 @@ class inlining_fail2_model final : public model_base_crtp } } } current_statement__ = 7; - if (lcm_sym240__) { - current_statement__ = 7; - if (lcm_sym241__) { + if (lcm_sym238__) { + lcm_sym239__ = logical_gte(n_occasions, 1); + if (lcm_sym239__) { current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), cons_list(index_uni(1), - nil_index_list())), "lcm_sym297__"), 0); + nil_index_list())), "lcm_sym295__"), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), cons_list(index_uni(sym2__), - nil_index_list())), "lcm_sym297__"), + nil_index_list())), "lcm_sym295__"), 0);} } for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 7; - if (lcm_sym241__) { + if (lcm_sym239__) { current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(sym1__), cons_list(index_uni(1), - nil_index_list())), "lcm_sym297__"), + nil_index_list())), "lcm_sym295__"), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(sym1__), cons_list(index_uni(sym2__), nil_index_list())), - "lcm_sym297__"), 0);} + "lcm_sym295__"), 0);} } } } current_statement__ = 7; - if (lcm_sym240__) { - current_statement__ = 7; - if (lcm_sym241__) { + if (lcm_sym238__) { + lcm_sym239__ = logical_gte(n_occasions, 1); + if (lcm_sym239__) { current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), - "lcm_sym297__"), 1); + "lcm_sym295__"), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), cons_list(index_uni(sym2__), - nil_index_list())), "lcm_sym297__"), 1); + nil_index_list())), "lcm_sym295__"), 1); } } for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 7; - if (lcm_sym241__) { + if (lcm_sym239__) { current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), - "lcm_sym297__"), 1); + "lcm_sym295__"), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(sym1__), cons_list(index_uni(sym2__), - nil_index_list())), "lcm_sym297__"), + nil_index_list())), "lcm_sym295__"), 1);} } } } current_statement__ = 8; - if (lcm_sym240__) { - current_statement__ = 8; - if (lcm_sym241__) { + if (lcm_sym238__) { + lcm_sym239__ = logical_gte(n_occasions, 1); + if (lcm_sym239__) { current_statement__ = 8; current_statement__ = 8; check_greater_or_equal(function__, "chi[sym1__, sym2__]", @@ -23036,7 +22355,7 @@ class inlining_fail2_model final : public model_base_crtp } for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 8; - if (lcm_sym241__) { + if (lcm_sym239__) { current_statement__ = 8; current_statement__ = 8; check_greater_or_equal(function__, "chi[sym1__, sym2__]", @@ -23057,9 +22376,9 @@ class inlining_fail2_model final : public model_base_crtp } } } current_statement__ = 8; - if (lcm_sym240__) { - current_statement__ = 8; - if (lcm_sym241__) { + if (lcm_sym238__) { + lcm_sym239__ = logical_gte(n_occasions, 1); + if (lcm_sym239__) { current_statement__ = 8; current_statement__ = 8; check_less_or_equal(function__, "chi[sym1__, sym2__]", @@ -23079,7 +22398,7 @@ class inlining_fail2_model final : public model_base_crtp } for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 8; - if (lcm_sym241__) { + if (lcm_sym239__) { current_statement__ = 8; current_statement__ = 8; check_less_or_equal(function__, "chi[sym1__, sym2__]", @@ -23108,256 +22427,255 @@ class inlining_fail2_model final : public model_base_crtp int inline_sym32__; inline_sym32__ = std::numeric_limits::min(); - lcm_sym316__ = dims(y)[(1 - 1)]; + lcm_sym310__ = dims(y)[(1 - 1)]; int inline_sym33__; inline_sym33__ = std::numeric_limits::min(); - lcm_sym317__ = dims(y)[(2 - 1)]; + lcm_sym311__ = dims(y)[(2 - 1)]; current_statement__ = 78; - validate_non_negative_index("qgamma", "n_occasions", lcm_sym317__); + validate_non_negative_index("qgamma", "n_occasions", lcm_sym311__); Eigen::Matrix inline_sym34__; - inline_sym34__ = Eigen::Matrix(lcm_sym317__); + inline_sym34__ = Eigen::Matrix(lcm_sym311__); stan::math::fill(inline_sym34__, std::numeric_limits::quiet_NaN()); - assign(lcm_sym251__, nil_index_list(), subtract(1.0, gamma), - "assigning variable lcm_sym251__"); - lcm_sym248__ = logical_gte(lcm_sym316__, 1); - if (lcm_sym248__) { + assign(lcm_sym249__, nil_index_list(), subtract(1.0, gamma), + "assigning variable lcm_sym249__"); + lcm_sym246__ = logical_gte(lcm_sym310__, 1); + if (lcm_sym246__) { current_statement__ = 80; - validate_non_negative_index("qp", "n_occasions", lcm_sym317__); + validate_non_negative_index("qp", "n_occasions", lcm_sym311__); Eigen::Matrix inline_sym35__; - inline_sym35__ = Eigen::Matrix(lcm_sym317__); + inline_sym35__ = Eigen::Matrix(lcm_sym311__); stan::math::fill(inline_sym35__, std::numeric_limits::quiet_NaN()); - assign(lcm_sym253__, nil_index_list(), + assign(lcm_sym251__, nil_index_list(), subtract(1.0, transpose( - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), nil_index_list()), - "lcm_sym297__"))), "assigning variable lcm_sym253__"); - lcm_sym305__ = first[(1 - 1)]; - if (lcm_sym305__) { - current_statement__ = 94; - if (logical_eq(lcm_sym305__, 1)) { - lcm_sym302__ = gamma[(1 - 1)]; + "lcm_sym295__"))), "assigning variable lcm_sym251__"); + lcm_sym299__ = first[(1 - 1)]; + if (lcm_sym299__) { + current_statement__ = 96; + if (logical_eq(lcm_sym299__, 1)) { + current_statement__ = 94; lp_accum__.add( bernoulli_lpmf(1, - (lcm_sym302__ * - rvalue(lcm_sym297__, + (gamma[(1 - 1)] * + rvalue(lcm_sym295__, cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), - "lcm_sym297__")))); + "lcm_sym295__")))); } else { - current_statement__ = 87; - validate_non_negative_index("lp", "first[i]", lcm_sym305__); + current_statement__ = 88; + validate_non_negative_index("lp", "first[i]", lcm_sym299__); Eigen::Matrix inline_sym36__; - inline_sym36__ = Eigen::Matrix(lcm_sym305__); + inline_sym36__ = Eigen::Matrix(lcm_sym299__); stan::math::fill(inline_sym36__, DUMMY_VAR__); - lcm_sym302__ = gamma[(1 - 1)]; - lcm_sym257__ = (lcm_sym305__ - 1); + lcm_sym255__ = (lcm_sym299__ - 1); assign(inline_sym36__, cons_list(index_uni(1), nil_index_list()), - (((bernoulli_lpmf(1, lcm_sym302__) + + (((bernoulli_lpmf(1, gamma[(1 - 1)]) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym253__, - cons_list(index_min_max(1, lcm_sym257__), - nil_index_list()), "lcm_sym253__")))) + + rvalue(lcm_sym251__, + cons_list(index_min_max(1, lcm_sym255__), + nil_index_list()), "lcm_sym251__")))) + bernoulli_lpmf(1, prod( rvalue(phi, cons_list(index_uni(1), - cons_list(index_min_max(1, lcm_sym257__), + cons_list(index_min_max(1, lcm_sym255__), nil_index_list())), "phi")))) + bernoulli_lpmf(1, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym305__), - nil_index_list())), "lcm_sym297__"))), + cons_list(index_uni(lcm_sym299__), + nil_index_list())), "lcm_sym295__"))), "assigning variable inline_sym36__"); - if (logical_gte(lcm_sym257__, 2)) { - current_statement__ = 89; + if (logical_gte(lcm_sym255__, 2)) { + current_statement__ = 90; assign(inline_sym36__, cons_list(index_uni(2), nil_index_list()), ((((bernoulli_lpmf(1, prod( - rvalue(lcm_sym251__, + rvalue(lcm_sym249__, cons_list(index_min_max(1, 1), - nil_index_list()), "lcm_sym251__"))) + + nil_index_list()), "lcm_sym249__"))) + bernoulli_lpmf(1, gamma[(2 - 1)])) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym253__, - cons_list(index_min_max(2, lcm_sym257__), - nil_index_list()), "lcm_sym253__")))) + + rvalue(lcm_sym251__, + cons_list(index_min_max(2, lcm_sym255__), + nil_index_list()), "lcm_sym251__")))) + bernoulli_lpmf(1, prod( rvalue(phi, cons_list(index_uni(1), - cons_list(index_min_max(2, lcm_sym257__), + cons_list(index_min_max(2, lcm_sym255__), nil_index_list())), "phi")))) + bernoulli_lpmf(1, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym305__), - nil_index_list())), "lcm_sym297__"))), + cons_list(index_uni(lcm_sym299__), + nil_index_list())), "lcm_sym295__"))), "assigning variable inline_sym36__"); for (int inline_sym37__ = 3; - inline_sym37__ <= lcm_sym257__; ++inline_sym37__) { - current_statement__ = 89; + inline_sym37__ <= lcm_sym255__; ++inline_sym37__) { + current_statement__ = 90; assign(inline_sym36__, cons_list(index_uni(inline_sym37__), nil_index_list()), ((((bernoulli_lpmf(1, prod( - rvalue(lcm_sym251__, + rvalue(lcm_sym249__, cons_list( index_min_max(1, (inline_sym37__ - 1)), - nil_index_list()), "lcm_sym251__"))) + + nil_index_list()), "lcm_sym249__"))) + bernoulli_lpmf(1, gamma[(inline_sym37__ - 1)])) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym253__, + rvalue(lcm_sym251__, cons_list( - index_min_max(inline_sym37__, lcm_sym257__), - nil_index_list()), "lcm_sym253__")))) + + index_min_max(inline_sym37__, lcm_sym255__), + nil_index_list()), "lcm_sym251__")))) + bernoulli_lpmf(1, prod( rvalue(phi, cons_list(index_uni(1), cons_list( - index_min_max(inline_sym37__, lcm_sym257__), + index_min_max(inline_sym37__, lcm_sym255__), nil_index_list())), "phi")))) + bernoulli_lpmf(1, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym305__), - nil_index_list())), "lcm_sym297__"))), + cons_list(index_uni(lcm_sym299__), + nil_index_list())), "lcm_sym295__"))), "assigning variable inline_sym36__");} } - current_statement__ = 90; + current_statement__ = 91; assign(inline_sym36__, - cons_list(index_uni(lcm_sym305__), nil_index_list()), + cons_list(index_uni(lcm_sym299__), nil_index_list()), ((bernoulli_lpmf(1, prod( - rvalue(lcm_sym251__, - cons_list(index_min_max(1, lcm_sym257__), - nil_index_list()), "lcm_sym251__"))) + - bernoulli_lpmf(1, gamma[(lcm_sym305__ - 1)])) + + rvalue(lcm_sym249__, + cons_list(index_min_max(1, lcm_sym255__), + nil_index_list()), "lcm_sym249__"))) + + bernoulli_lpmf(1, gamma[(lcm_sym299__ - 1)])) + bernoulli_lpmf(1, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym305__), - nil_index_list())), "lcm_sym297__"))), + cons_list(index_uni(lcm_sym299__), + nil_index_list())), "lcm_sym295__"))), "assigning variable inline_sym36__"); - current_statement__ = 91; + current_statement__ = 92; lp_accum__.add(log_sum_exp(inline_sym36__)); } - lcm_sym311__ = last[(1 - 1)]; - if (logical_gte(lcm_sym311__, (lcm_sym305__ + 1))) { - current_statement__ = 95; + lcm_sym305__ = last[(1 - 1)]; + if (logical_gte(lcm_sym305__, (lcm_sym299__ + 1))) { + current_statement__ = 97; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, cons_list(index_uni(1), - cons_list(index_uni(((lcm_sym305__ + 1) - 1)), + cons_list(index_uni(((lcm_sym299__ + 1) - 1)), nil_index_list())), "phi"))); - lcm_sym275__ = ((lcm_sym305__ + 1) + 1); + lcm_sym273__ = ((lcm_sym299__ + 1) + 1); lp_accum__.add( bernoulli_lpmf( - y[(1 - 1)][((lcm_sym305__ + 1) - 1)], - rvalue(lcm_sym297__, + y[(1 - 1)][((lcm_sym299__ + 1) - 1)], + rvalue(lcm_sym295__, cons_list(index_uni(1), - cons_list(index_uni((lcm_sym305__ + 1)), - nil_index_list())), "lcm_sym297__"))); - for (int inline_sym37__ = lcm_sym275__; - inline_sym37__ <= lcm_sym311__; ++inline_sym37__) { - current_statement__ = 95; + cons_list(index_uni((lcm_sym299__ + 1)), + nil_index_list())), "lcm_sym295__"))); + for (int inline_sym37__ = lcm_sym273__; + inline_sym37__ <= lcm_sym305__; ++inline_sym37__) { + current_statement__ = 97; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, cons_list(index_uni(1), cons_list(index_uni((inline_sym37__ - 1)), nil_index_list())), "phi"))); - current_statement__ = 96; + current_statement__ = 98; lp_accum__.add( bernoulli_lpmf( y[(1 - 1)][(inline_sym37__ - 1)], - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), cons_list(index_uni(inline_sym37__), - nil_index_list())), "lcm_sym297__")));} + nil_index_list())), "lcm_sym295__")));} } - current_statement__ = 98; + current_statement__ = 100; lp_accum__.add( bernoulli_lpmf(1, rvalue(inline_sym22__, cons_list(index_uni(1), - cons_list(index_uni(lcm_sym311__), nil_index_list())), + cons_list(index_uni(lcm_sym305__), nil_index_list())), "inline_sym22__"))); } else { - lcm_sym276__ = (lcm_sym317__ + 1); + lcm_sym274__ = (lcm_sym311__ + 1); validate_non_negative_index("lp", "n_occasions + 1", - lcm_sym276__); + lcm_sym274__); Eigen::Matrix inline_sym36__; - inline_sym36__ = Eigen::Matrix(lcm_sym276__); + inline_sym36__ = Eigen::Matrix(lcm_sym274__); stan::math::fill(inline_sym36__, DUMMY_VAR__); - lcm_sym302__ = gamma[(1 - 1)]; + current_statement__ = 83; assign(inline_sym36__, cons_list(index_uni(1), nil_index_list()), - ((bernoulli_lpmf(1, lcm_sym302__) + + ((bernoulli_lpmf(1, gamma[(1 - 1)]) + bernoulli_lpmf(0, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), - "lcm_sym297__"))) + + "lcm_sym295__"))) + bernoulli_lpmf(1, rvalue(inline_sym22__, cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "inline_sym22__"))), "assigning variable inline_sym36__"); - if (logical_gte(lcm_sym317__, 2)) { - current_statement__ = 83; + if (logical_gte(lcm_sym311__, 2)) { + current_statement__ = 84; assign(inline_sym36__, cons_list(index_uni(2), nil_index_list()), (((bernoulli_lpmf(1, prod( - rvalue(lcm_sym251__, + rvalue(lcm_sym249__, cons_list(index_min_max(1, 1), nil_index_list()), - "lcm_sym251__"))) + + "lcm_sym249__"))) + bernoulli_lpmf(1, gamma[(2 - 1)])) + bernoulli_lpmf(0, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), cons_list(index_uni(2), nil_index_list())), - "lcm_sym297__"))) + + "lcm_sym295__"))) + bernoulli_lpmf(1, rvalue(inline_sym22__, cons_list(index_uni(1), cons_list(index_uni(2), nil_index_list())), "inline_sym22__"))), "assigning variable inline_sym36__"); - for (int inline_sym37__ = 3; inline_sym37__ <= lcm_sym317__; + for (int inline_sym37__ = 3; inline_sym37__ <= lcm_sym311__; ++inline_sym37__) { - current_statement__ = 83; + current_statement__ = 84; assign(inline_sym36__, cons_list(index_uni(inline_sym37__), nil_index_list()), (((bernoulli_lpmf(1, prod( - rvalue(lcm_sym251__, + rvalue(lcm_sym249__, cons_list( index_min_max(1, (inline_sym37__ - 1)), - nil_index_list()), "lcm_sym251__"))) + + nil_index_list()), "lcm_sym249__"))) + bernoulli_lpmf(1, gamma[(inline_sym37__ - 1)])) + bernoulli_lpmf(0, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(1), cons_list(index_uni(inline_sym37__), - nil_index_list())), "lcm_sym297__"))) + + nil_index_list())), "lcm_sym295__"))) + bernoulli_lpmf(1, rvalue(inline_sym22__, cons_list(index_uni(1), @@ -23365,227 +22683,227 @@ class inlining_fail2_model final : public model_base_crtp nil_index_list())), "inline_sym22__"))), "assigning variable inline_sym36__");} } - current_statement__ = 84; + current_statement__ = 85; assign(inline_sym36__, - cons_list(index_uni(lcm_sym276__), nil_index_list()), - bernoulli_lpmf(1, prod(lcm_sym251__)), + cons_list(index_uni(lcm_sym274__), nil_index_list()), + bernoulli_lpmf(1, prod(lcm_sym249__)), "assigning variable inline_sym36__"); - current_statement__ = 85; + current_statement__ = 86; lp_accum__.add(log_sum_exp(inline_sym36__)); } - for (int inline_sym38__ = 2; inline_sym38__ <= lcm_sym316__; + for (int inline_sym38__ = 2; inline_sym38__ <= lcm_sym310__; ++inline_sym38__) { current_statement__ = 80; - validate_non_negative_index("qp", "n_occasions", lcm_sym317__); + validate_non_negative_index("qp", "n_occasions", lcm_sym311__); Eigen::Matrix inline_sym35__; - inline_sym35__ = Eigen::Matrix(lcm_sym317__); + inline_sym35__ = Eigen::Matrix(lcm_sym311__); stan::math::fill(inline_sym35__, std::numeric_limits::quiet_NaN()); - assign(lcm_sym252__, nil_index_list(), + assign(lcm_sym250__, nil_index_list(), subtract(1.0, transpose( - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym38__), nil_index_list()), - "lcm_sym297__"))), "assigning variable lcm_sym252__"); - lcm_sym304__ = first[(inline_sym38__ - 1)]; - if (lcm_sym304__) { - current_statement__ = 94; - if (logical_eq(lcm_sym304__, 1)) { - current_statement__ = 101; + "lcm_sym295__"))), "assigning variable lcm_sym250__"); + lcm_sym298__ = first[(inline_sym38__ - 1)]; + if (lcm_sym298__) { + current_statement__ = 96; + if (logical_eq(lcm_sym298__, 1)) { + current_statement__ = 94; lp_accum__.add( bernoulli_lpmf(1, - (lcm_sym302__ * - rvalue(lcm_sym297__, + (gamma[(1 - 1)] * + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym38__), cons_list(index_uni(1), nil_index_list())), - "lcm_sym297__")))); + "lcm_sym295__")))); } else { - current_statement__ = 87; - validate_non_negative_index("lp", "first[i]", lcm_sym304__); + current_statement__ = 88; + validate_non_negative_index("lp", "first[i]", lcm_sym298__); Eigen::Matrix inline_sym36__; - inline_sym36__ = Eigen::Matrix(lcm_sym304__); + inline_sym36__ = Eigen::Matrix(lcm_sym298__); stan::math::fill(inline_sym36__, DUMMY_VAR__); - lcm_sym256__ = (lcm_sym304__ - 1); + lcm_sym254__ = (lcm_sym298__ - 1); assign(inline_sym36__, cons_list(index_uni(1), nil_index_list()), - (((bernoulli_lpmf(1, lcm_sym302__) + + (((bernoulli_lpmf(1, gamma[(1 - 1)]) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym252__, - cons_list(index_min_max(1, lcm_sym256__), - nil_index_list()), "lcm_sym252__")))) + + rvalue(lcm_sym250__, + cons_list(index_min_max(1, lcm_sym254__), + nil_index_list()), "lcm_sym250__")))) + bernoulli_lpmf(1, prod( rvalue(phi, cons_list(index_uni(inline_sym38__), - cons_list(index_min_max(1, lcm_sym256__), + cons_list(index_min_max(1, lcm_sym254__), nil_index_list())), "phi")))) + bernoulli_lpmf(1, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym38__), - cons_list(index_uni(lcm_sym304__), - nil_index_list())), "lcm_sym297__"))), + cons_list(index_uni(lcm_sym298__), + nil_index_list())), "lcm_sym295__"))), "assigning variable inline_sym36__"); - if (logical_gte(lcm_sym256__, 2)) { - current_statement__ = 89; + if (logical_gte(lcm_sym254__, 2)) { + current_statement__ = 90; assign(inline_sym36__, cons_list(index_uni(2), nil_index_list()), ((((bernoulli_lpmf(1, prod( - rvalue(lcm_sym251__, + rvalue(lcm_sym249__, cons_list(index_min_max(1, 1), - nil_index_list()), "lcm_sym251__"))) + + nil_index_list()), "lcm_sym249__"))) + bernoulli_lpmf(1, gamma[(2 - 1)])) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym252__, - cons_list(index_min_max(2, lcm_sym256__), - nil_index_list()), "lcm_sym252__")))) + + rvalue(lcm_sym250__, + cons_list(index_min_max(2, lcm_sym254__), + nil_index_list()), "lcm_sym250__")))) + bernoulli_lpmf(1, prod( rvalue(phi, cons_list(index_uni(inline_sym38__), - cons_list(index_min_max(2, lcm_sym256__), + cons_list(index_min_max(2, lcm_sym254__), nil_index_list())), "phi")))) + bernoulli_lpmf(1, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym38__), - cons_list(index_uni(lcm_sym304__), - nil_index_list())), "lcm_sym297__"))), + cons_list(index_uni(lcm_sym298__), + nil_index_list())), "lcm_sym295__"))), "assigning variable inline_sym36__"); for (int inline_sym37__ = 3; - inline_sym37__ <= lcm_sym256__; ++inline_sym37__) { - current_statement__ = 89; + inline_sym37__ <= lcm_sym254__; ++inline_sym37__) { + current_statement__ = 90; assign(inline_sym36__, cons_list(index_uni(inline_sym37__), nil_index_list()), ((((bernoulli_lpmf(1, prod( - rvalue(lcm_sym251__, + rvalue(lcm_sym249__, cons_list( index_min_max(1, (inline_sym37__ - 1)), - nil_index_list()), "lcm_sym251__"))) + + nil_index_list()), "lcm_sym249__"))) + bernoulli_lpmf(1, gamma[(inline_sym37__ - 1)])) + bernoulli_lpmf(1, prod( - rvalue(lcm_sym252__, + rvalue(lcm_sym250__, cons_list( - index_min_max(inline_sym37__, lcm_sym256__), - nil_index_list()), "lcm_sym252__")))) + + index_min_max(inline_sym37__, lcm_sym254__), + nil_index_list()), "lcm_sym250__")))) + bernoulli_lpmf(1, prod( rvalue(phi, cons_list(index_uni(inline_sym38__), cons_list( - index_min_max(inline_sym37__, lcm_sym256__), + index_min_max(inline_sym37__, lcm_sym254__), nil_index_list())), "phi")))) + bernoulli_lpmf(1, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym38__), - cons_list(index_uni(lcm_sym304__), - nil_index_list())), "lcm_sym297__"))), + cons_list(index_uni(lcm_sym298__), + nil_index_list())), "lcm_sym295__"))), "assigning variable inline_sym36__");} } - current_statement__ = 90; + current_statement__ = 91; assign(inline_sym36__, - cons_list(index_uni(lcm_sym304__), nil_index_list()), + cons_list(index_uni(lcm_sym298__), nil_index_list()), ((bernoulli_lpmf(1, prod( - rvalue(lcm_sym251__, - cons_list(index_min_max(1, lcm_sym256__), - nil_index_list()), "lcm_sym251__"))) + - bernoulli_lpmf(1, gamma[(lcm_sym304__ - 1)])) + + rvalue(lcm_sym249__, + cons_list(index_min_max(1, lcm_sym254__), + nil_index_list()), "lcm_sym249__"))) + + bernoulli_lpmf(1, gamma[(lcm_sym298__ - 1)])) + bernoulli_lpmf(1, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym38__), - cons_list(index_uni(lcm_sym304__), - nil_index_list())), "lcm_sym297__"))), + cons_list(index_uni(lcm_sym298__), + nil_index_list())), "lcm_sym295__"))), "assigning variable inline_sym36__"); - current_statement__ = 91; + current_statement__ = 92; lp_accum__.add(log_sum_exp(inline_sym36__)); } - lcm_sym310__ = last[(inline_sym38__ - 1)]; - if (logical_gte(lcm_sym310__, (lcm_sym304__ + 1))) { - current_statement__ = 95; + lcm_sym304__ = last[(inline_sym38__ - 1)]; + if (logical_gte(lcm_sym304__, (lcm_sym298__ + 1))) { + current_statement__ = 97; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, cons_list(index_uni(inline_sym38__), - cons_list(index_uni(((lcm_sym304__ + 1) - 1)), + cons_list(index_uni(((lcm_sym298__ + 1) - 1)), nil_index_list())), "phi"))); - lcm_sym274__ = ((lcm_sym304__ + 1) + 1); + lcm_sym272__ = ((lcm_sym298__ + 1) + 1); lp_accum__.add( bernoulli_lpmf( - y[(inline_sym38__ - 1)][((lcm_sym304__ + 1) - 1)], - rvalue(lcm_sym297__, + y[(inline_sym38__ - 1)][((lcm_sym298__ + 1) - 1)], + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym38__), - cons_list(index_uni((lcm_sym304__ + 1)), - nil_index_list())), "lcm_sym297__"))); - for (int inline_sym37__ = lcm_sym274__; - inline_sym37__ <= lcm_sym310__; ++inline_sym37__) { - current_statement__ = 95; + cons_list(index_uni((lcm_sym298__ + 1)), + nil_index_list())), "lcm_sym295__"))); + for (int inline_sym37__ = lcm_sym272__; + inline_sym37__ <= lcm_sym304__; ++inline_sym37__) { + current_statement__ = 97; lp_accum__.add( bernoulli_lpmf(1, rvalue(phi, cons_list(index_uni(inline_sym38__), cons_list(index_uni((inline_sym37__ - 1)), nil_index_list())), "phi"))); - current_statement__ = 96; + current_statement__ = 98; lp_accum__.add( bernoulli_lpmf( y[(inline_sym38__ - 1)][(inline_sym37__ - 1)], - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym38__), cons_list(index_uni(inline_sym37__), - nil_index_list())), "lcm_sym297__")));} + nil_index_list())), "lcm_sym295__")));} } - current_statement__ = 98; + current_statement__ = 100; lp_accum__.add( bernoulli_lpmf(1, rvalue(inline_sym22__, cons_list(index_uni(inline_sym38__), - cons_list(index_uni(lcm_sym310__), nil_index_list())), + cons_list(index_uni(lcm_sym304__), nil_index_list())), "inline_sym22__"))); } else { - lcm_sym276__ = (lcm_sym317__ + 1); + lcm_sym274__ = (lcm_sym311__ + 1); validate_non_negative_index("lp", "n_occasions + 1", - lcm_sym276__); + lcm_sym274__); Eigen::Matrix inline_sym36__; - inline_sym36__ = Eigen::Matrix(lcm_sym276__); + inline_sym36__ = Eigen::Matrix(lcm_sym274__); stan::math::fill(inline_sym36__, DUMMY_VAR__); - current_statement__ = 100; + current_statement__ = 83; assign(inline_sym36__, cons_list(index_uni(1), nil_index_list()), - ((bernoulli_lpmf(1, lcm_sym302__) + + ((bernoulli_lpmf(1, gamma[(1 - 1)]) + bernoulli_lpmf(0, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym38__), cons_list(index_uni(1), nil_index_list())), - "lcm_sym297__"))) + + "lcm_sym295__"))) + bernoulli_lpmf(1, rvalue(inline_sym22__, cons_list(index_uni(inline_sym38__), cons_list(index_uni(1), nil_index_list())), "inline_sym22__"))), "assigning variable inline_sym36__"); - if (logical_gte(lcm_sym317__, 2)) { - current_statement__ = 83; + if (logical_gte(lcm_sym311__, 2)) { + current_statement__ = 84; assign(inline_sym36__, cons_list(index_uni(2), nil_index_list()), (((bernoulli_lpmf(1, prod( - rvalue(lcm_sym251__, + rvalue(lcm_sym249__, cons_list(index_min_max(1, 1), nil_index_list()), - "lcm_sym251__"))) + + "lcm_sym249__"))) + bernoulli_lpmf(1, gamma[(2 - 1)])) + bernoulli_lpmf(0, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym38__), cons_list(index_uni(2), nil_index_list())), - "lcm_sym297__"))) + + "lcm_sym295__"))) + bernoulli_lpmf(1, rvalue(inline_sym22__, cons_list(index_uni(inline_sym38__), @@ -23593,23 +22911,23 @@ class inlining_fail2_model final : public model_base_crtp "inline_sym22__"))), "assigning variable inline_sym36__"); for (int inline_sym37__ = 3; - inline_sym37__ <= lcm_sym317__; ++inline_sym37__) { - current_statement__ = 83; + inline_sym37__ <= lcm_sym311__; ++inline_sym37__) { + current_statement__ = 84; assign(inline_sym36__, cons_list(index_uni(inline_sym37__), nil_index_list()), (((bernoulli_lpmf(1, prod( - rvalue(lcm_sym251__, + rvalue(lcm_sym249__, cons_list( index_min_max(1, (inline_sym37__ - 1)), - nil_index_list()), "lcm_sym251__"))) + + nil_index_list()), "lcm_sym249__"))) + bernoulli_lpmf(1, gamma[(inline_sym37__ - 1)])) + bernoulli_lpmf(0, - rvalue(lcm_sym297__, + rvalue(lcm_sym295__, cons_list(index_uni(inline_sym38__), cons_list(index_uni(inline_sym37__), - nil_index_list())), "lcm_sym297__"))) + + nil_index_list())), "lcm_sym295__"))) + bernoulli_lpmf(1, rvalue(inline_sym22__, cons_list(index_uni(inline_sym38__), @@ -23617,12 +22935,12 @@ class inlining_fail2_model final : public model_base_crtp nil_index_list())), "inline_sym22__"))), "assigning variable inline_sym36__");} } - current_statement__ = 84; + current_statement__ = 85; assign(inline_sym36__, - cons_list(index_uni(lcm_sym276__), nil_index_list()), - bernoulli_lpmf(1, prod(lcm_sym251__)), + cons_list(index_uni(lcm_sym274__), nil_index_list()), + bernoulli_lpmf(1, prod(lcm_sym249__)), "assigning variable inline_sym36__"); - current_statement__ = 85; + current_statement__ = 86; lp_accum__.add(log_sum_exp(inline_sym36__)); }} } @@ -23655,10 +22973,8 @@ class inlining_fail2_model final : public model_base_crtp (void) function__; // suppress unused var warning try { - int lcm_sym237__; - int lcm_sym236__; - double lcm_sym235__; - double lcm_sym234__; + int lcm_sym235__; + int lcm_sym234__; double lcm_sym233__; double lcm_sym232__; double lcm_sym231__; @@ -23666,12 +22982,12 @@ class inlining_fail2_model final : public model_base_crtp double lcm_sym229__; double lcm_sym228__; double lcm_sym227__; - int lcm_sym226__; - int lcm_sym225__; + double lcm_sym226__; + double lcm_sym225__; int lcm_sym224__; int lcm_sym223__; - double lcm_sym222__; - double lcm_sym221__; + int lcm_sym222__; + int lcm_sym221__; double lcm_sym220__; double lcm_sym219__; double lcm_sym218__; @@ -23688,10 +23004,12 @@ class inlining_fail2_model final : public model_base_crtp double lcm_sym207__; double lcm_sym206__; double lcm_sym205__; - int lcm_sym204__; - int lcm_sym203__; + double lcm_sym204__; + double lcm_sym203__; int lcm_sym202__; int lcm_sym201__; + int lcm_sym200__; + int lcm_sym199__; int lcm_sym197__; int lcm_sym196__; int lcm_sym195__; @@ -23733,7 +23051,7 @@ class inlining_fail2_model final : public model_base_crtp int lcm_sym154__; int lcm_sym153__; int lcm_sym152__; - int lcm_sym200__; + int lcm_sym198__; int lcm_sym150__; int lcm_sym149__; int lcm_sym148__; @@ -23746,49 +23064,35 @@ class inlining_fail2_model final : public model_base_crtp mean_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.scalar(); - current_statement__ = 1; - mean_phi = stan::math::lub_constrain(mean_phi, 0, 1); + mean_phi = in__.read_lub(0, 1, lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.scalar(); - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); + mean_p = in__.read_lub(0, 1, lp__); Eigen::Matrix gamma; gamma = Eigen::Matrix(n_occasions); stan::math::fill(gamma, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - gamma = in__.vector(n_occasions); - lcm_sym145__ = logical_gte(n_occasions, 1); - if (lcm_sym145__) { - current_statement__ = 3; - assign(gamma, cons_list(index_uni(1), nil_index_list()), - stan::math::lub_constrain(gamma[(1 - 1)], 0, 1), - "assigning variable gamma"); - for (int sym1__ = 2; sym1__ <= n_occasions; ++sym1__) { - current_statement__ = 3; - assign(gamma, cons_list(index_uni(sym1__), nil_index_list()), - stan::math::lub_constrain(gamma[(sym1__ - 1)], 0, 1), - "assigning variable gamma");} - } + assign(gamma, nil_index_list(), + in__.read_lub, jacobian__>(0, + 1, lp__, n_occasions), "assigning variable gamma"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix((n_occasions - 1)); stan::math::fill(epsilon, std::numeric_limits::quiet_NaN()); - lcm_sym200__ = (n_occasions - 1); - epsilon = in__.vector(lcm_sym200__); + lcm_sym198__ = (n_occasions - 1); + assign(epsilon, nil_index_list(), + in__.read, jacobian__>(lp__, + lcm_sym198__), "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - sigma = in__.scalar(); - current_statement__ = 5; - sigma = stan::math::lub_constrain(sigma, 0, 5); + sigma = in__.read_lub(0, 5, lp__); Eigen::Matrix phi; - phi = Eigen::Matrix(M, lcm_sym200__); + phi = Eigen::Matrix(M, lcm_sym198__); stan::math::fill(phi, DUMMY_VAR__); Eigen::Matrix p; @@ -23801,15 +23105,16 @@ class inlining_fail2_model final : public model_base_crtp vars__.emplace_back(mean_phi); vars__.emplace_back(mean_p); + lcm_sym145__ = logical_gte(n_occasions, 1); if (lcm_sym145__) { vars__.emplace_back(gamma[(1 - 1)]); for (int sym1__ = 2; sym1__ <= n_occasions; ++sym1__) { vars__.emplace_back(gamma[(sym1__ - 1)]);} } - lcm_sym147__ = logical_gte(lcm_sym200__, 1); + lcm_sym147__ = logical_gte(lcm_sym198__, 1); if (lcm_sym147__) { vars__.emplace_back(epsilon[(1 - 1)]); - for (int sym1__ = 2; sym1__ <= lcm_sym200__; ++sym1__) { + for (int sym1__ = 2; sym1__ <= lcm_sym198__; ++sym1__) { vars__.emplace_back(epsilon[(sym1__ - 1)]);} } vars__.emplace_back(sigma); @@ -23834,7 +23139,7 @@ class inlining_fail2_model final : public model_base_crtp cons_list(index_uni(1), nil_index_list())), lcm_sym182__, "assigning variable phi");} } - for (int t = 2; t <= lcm_sym200__; ++t) { + for (int t = 2; t <= lcm_sym198__; ++t) { current_statement__ = 10; if (lcm_sym144__) { lcm_sym181__ = inv_logit((logit(mean_phi) + epsilon[(t - 1)])); @@ -23973,7 +23278,7 @@ class inlining_fail2_model final : public model_base_crtp cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "phi"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym200__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym198__; ++sym2__) { current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -23992,7 +23297,7 @@ class inlining_fail2_model final : public model_base_crtp cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "phi"), 0); - for (int sym2__ = 2; sym2__ <= lcm_sym200__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym198__; ++sym2__) { current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", @@ -24013,7 +23318,7 @@ class inlining_fail2_model final : public model_base_crtp cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "phi"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym200__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym198__; ++sym2__) { current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -24032,7 +23337,7 @@ class inlining_fail2_model final : public model_base_crtp cons_list(index_uni(sym1__), cons_list(index_uni(1), nil_index_list())), "phi"), 1); - for (int sym2__ = 2; sym2__ <= lcm_sym200__; ++sym2__) { + for (int sym2__ = 2; sym2__ <= lcm_sym198__; ++sym2__) { current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", @@ -24226,7 +23531,7 @@ class inlining_fail2_model final : public model_base_crtp cons_list(index_uni(sym2__), cons_list(index_uni(1), nil_index_list())), "phi"));} } - for (int sym1__ = 2; sym1__ <= lcm_sym200__; ++sym1__) { + for (int sym1__ = 2; sym1__ <= lcm_sym198__; ++sym1__) { if (lcm_sym144__) { vars__.emplace_back( rvalue(phi, @@ -24331,20 +23636,20 @@ class inlining_fail2_model final : public model_base_crtp double mu2; mu2 = std::numeric_limits::quiet_NaN(); - lcm_sym208__ = gamma[(1 - 1)]; + lcm_sym206__ = gamma[(1 - 1)]; assign(z, cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), - bernoulli_rng(lcm_sym208__, base_rng__), "assigning variable z"); + bernoulli_rng(lcm_sym206__, base_rng__), "assigning variable z"); lcm_sym146__ = logical_gte(n_occasions, 2); if (lcm_sym146__) { - lcm_sym226__ = z[(1 - 1)][(1 - 1)]; - lcm_sym167__ = (1 * (1 - lcm_sym226__)); + lcm_sym224__ = z[(1 - 1)][(1 - 1)]; + lcm_sym167__ = (1 * (1 - lcm_sym224__)); q = lcm_sym167__; - lcm_sym222__ = rvalue(phi, + lcm_sym220__ = rvalue(phi, cons_list(index_uni(1), cons_list(index_uni(1), nil_index_list())), "phi"); - lcm_sym179__ = stan::math::fma(lcm_sym222__, lcm_sym226__, + lcm_sym179__ = stan::math::fma(lcm_sym220__, lcm_sym224__, (gamma[(2 - 1)] * lcm_sym167__)); current_statement__ = 33; assign(z, @@ -24378,7 +23683,7 @@ class inlining_fail2_model final : public model_base_crtp assign(z, cons_list(index_uni(i), cons_list(index_uni(1), nil_index_list())), - bernoulli_rng(lcm_sym208__, base_rng__), "assigning variable z"); + bernoulli_rng(lcm_sym206__, base_rng__), "assigning variable z"); current_statement__ = 37; if (lcm_sym146__) { lcm_sym166__ = (1 * (1 - z[(i - 1)][(1 - 1)])); @@ -24867,35 +24172,35 @@ class inlining_fail2_model final : public model_base_crtp param_names__.emplace_back(std::string() + "mean_phi"); param_names__.emplace_back(std::string() + "mean_p"); - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - param_names__.emplace_back(std::string() + "gamma" + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "gamma" + '.' + std::to_string(sym340__)); }} - for (int sym346__ = 1; sym346__ <= epsilon_1dim__; ++sym346__) { + for (int sym340__ = 1; sym340__ <= epsilon_1dim__; ++sym340__) { { - param_names__.emplace_back(std::string() + "epsilon" + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "epsilon" + '.' + std::to_string(sym340__)); }} param_names__.emplace_back(std::string() + "sigma"); if (emit_transformed_parameters__) { - for (int sym346__ = 1; sym346__ <= phi_2dim__; ++sym346__) { + for (int sym340__ = 1; sym340__ <= phi_2dim__; ++sym340__) { { - for (int sym347__ = 1; sym347__ <= M; ++sym347__) { + for (int sym341__ = 1; sym341__ <= M; ++sym341__) { { - param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym347__) + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym341__) + '.' + std::to_string(sym340__)); }} }} - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - for (int sym347__ = 1; sym347__ <= M; ++sym347__) { + for (int sym341__ = 1; sym341__ <= M; ++sym341__) { { - param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym347__) + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym341__) + '.' + std::to_string(sym340__)); }} }} - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - for (int sym347__ = 1; sym347__ <= M; ++sym347__) { + for (int sym341__ = 1; sym341__ <= M; ++sym341__) { { - param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym347__) + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym341__) + '.' + std::to_string(sym340__)); }} }} } @@ -24903,24 +24208,24 @@ class inlining_fail2_model final : public model_base_crtp if (emit_generated_quantities__) { param_names__.emplace_back(std::string() + "sigma2"); param_names__.emplace_back(std::string() + "psi"); - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - param_names__.emplace_back(std::string() + "b" + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "b" + '.' + std::to_string(sym340__)); }} param_names__.emplace_back(std::string() + "Nsuper"); - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - param_names__.emplace_back(std::string() + "N" + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "N" + '.' + std::to_string(sym340__)); }} - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - param_names__.emplace_back(std::string() + "B" + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "B" + '.' + std::to_string(sym340__)); }} - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - for (int sym347__ = 1; sym347__ <= M; ++sym347__) { + for (int sym341__ = 1; sym341__ <= M; ++sym341__) { { - param_names__.emplace_back(std::string() + "z" + '.' + std::to_string(sym347__) + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "z" + '.' + std::to_string(sym341__) + '.' + std::to_string(sym340__)); }} }} } @@ -24935,35 +24240,35 @@ class inlining_fail2_model final : public model_base_crtp param_names__.emplace_back(std::string() + "mean_phi"); param_names__.emplace_back(std::string() + "mean_p"); - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - param_names__.emplace_back(std::string() + "gamma" + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "gamma" + '.' + std::to_string(sym340__)); }} - for (int sym346__ = 1; sym346__ <= epsilon_1dim__; ++sym346__) { + for (int sym340__ = 1; sym340__ <= epsilon_1dim__; ++sym340__) { { - param_names__.emplace_back(std::string() + "epsilon" + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "epsilon" + '.' + std::to_string(sym340__)); }} param_names__.emplace_back(std::string() + "sigma"); if (emit_transformed_parameters__) { - for (int sym346__ = 1; sym346__ <= phi_2dim__; ++sym346__) { + for (int sym340__ = 1; sym340__ <= phi_2dim__; ++sym340__) { { - for (int sym347__ = 1; sym347__ <= M; ++sym347__) { + for (int sym341__ = 1; sym341__ <= M; ++sym341__) { { - param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym347__) + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "phi" + '.' + std::to_string(sym341__) + '.' + std::to_string(sym340__)); }} }} - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - for (int sym347__ = 1; sym347__ <= M; ++sym347__) { + for (int sym341__ = 1; sym341__ <= M; ++sym341__) { { - param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym347__) + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "p" + '.' + std::to_string(sym341__) + '.' + std::to_string(sym340__)); }} }} - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - for (int sym347__ = 1; sym347__ <= M; ++sym347__) { + for (int sym341__ = 1; sym341__ <= M; ++sym341__) { { - param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym347__) + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "chi" + '.' + std::to_string(sym341__) + '.' + std::to_string(sym340__)); }} }} } @@ -24971,24 +24276,24 @@ class inlining_fail2_model final : public model_base_crtp if (emit_generated_quantities__) { param_names__.emplace_back(std::string() + "sigma2"); param_names__.emplace_back(std::string() + "psi"); - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - param_names__.emplace_back(std::string() + "b" + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "b" + '.' + std::to_string(sym340__)); }} param_names__.emplace_back(std::string() + "Nsuper"); - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - param_names__.emplace_back(std::string() + "N" + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "N" + '.' + std::to_string(sym340__)); }} - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - param_names__.emplace_back(std::string() + "B" + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "B" + '.' + std::to_string(sym340__)); }} - for (int sym346__ = 1; sym346__ <= n_occasions; ++sym346__) { + for (int sym340__ = 1; sym340__ <= n_occasions; ++sym340__) { { - for (int sym347__ = 1; sym347__ <= M; ++sym347__) { + for (int sym341__ = 1; sym341__ <= M; ++sym341__) { { - param_names__.emplace_back(std::string() + "z" + '.' + std::to_string(sym347__) + '.' + std::to_string(sym346__)); + param_names__.emplace_back(std::string() + "z" + '.' + std::to_string(sym341__) + '.' + std::to_string(sym340__)); }} }} } @@ -25525,7 +24830,7 @@ class lcm_experiment2_model final : public model_base_crtp(lp__); { local_scalar_t__ y; y = DUMMY_VAR__; @@ -25575,7 +24880,7 @@ class lcm_experiment2_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - x = in__.scalar(); + x = in__.read(lp__); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -25877,21 +25182,14 @@ class lcm_fails_model final : public model_base_crtp { (void) function__; // suppress unused var warning try { - double lcm_sym10__; - int lcm_sym9__; + double lcm_sym9__; std::vector theta; theta = std::vector(J, DUMMY_VAR__); current_statement__ = 1; - if (logical_gte(J, 1)) { - current_statement__ = 1; - assign(theta, cons_list(index_uni(1), nil_index_list()), - in__.scalar(), "assigning variable theta"); - for (int sym1__ = 2; sym1__ <= J; ++sym1__) { - current_statement__ = 1; - assign(theta, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable theta");} - } + assign(theta, nil_index_list(), + in__.read, jacobian__>(lp__, J), + "assigning variable theta"); { current_statement__ = 2; lp_accum__.add(normal_lpdf(y, theta, 1)); @@ -25931,17 +25229,11 @@ class lcm_fails_model final : public model_base_crtp { std::vector theta; theta = std::vector(J, std::numeric_limits::quiet_NaN()); - lcm_sym4__ = logical_gte(J, 1); - if (lcm_sym4__) { - current_statement__ = 1; - assign(theta, cons_list(index_uni(1), nil_index_list()), - in__.scalar(), "assigning variable theta"); - for (int sym1__ = 2; sym1__ <= J; ++sym1__) { - current_statement__ = 1; - assign(theta, cons_list(index_uni(sym1__), nil_index_list()), - in__.scalar(), "assigning variable theta");} - } - if (lcm_sym4__) { + current_statement__ = 1; + assign(theta, nil_index_list(), + in__.read, jacobian__>(lp__, J), + "assigning variable theta"); + if (logical_gte(J, 1)) { vars__.emplace_back(theta[(1 - 1)]); for (int sym1__ = 2; sym1__ <= J; ++sym1__) { vars__.emplace_back(theta[(sym1__ - 1)]);} @@ -26012,9 +25304,9 @@ class lcm_fails_model final : public model_base_crtp { bool emit_generated_quantities__ = true) const final { - for (int sym11__ = 1; sym11__ <= J; ++sym11__) { + for (int sym10__ = 1; sym10__ <= J; ++sym10__) { { - param_names__.emplace_back(std::string() + "theta" + '.' + std::to_string(sym11__)); + param_names__.emplace_back(std::string() + "theta" + '.' + std::to_string(sym10__)); }} if (emit_transformed_parameters__) { @@ -26032,9 +25324,9 @@ class lcm_fails_model final : public model_base_crtp { bool emit_generated_quantities__ = true) const final { - for (int sym11__ = 1; sym11__ <= J; ++sym11__) { + for (int sym10__ = 1; sym10__ <= J; ++sym10__) { { - param_names__.emplace_back(std::string() + "theta" + '.' + std::to_string(sym11__)); + param_names__.emplace_back(std::string() + "theta" + '.' + std::to_string(sym10__)); }} if (emit_transformed_parameters__) { @@ -27024,28 +26316,12 @@ class lcm_fails2_model final : public model_base_crtp { mean_phi = DUMMY_VAR__; current_statement__ = 1; - mean_phi = in__.scalar(); - current_statement__ = 1; - if (jacobian__) { - current_statement__ = 1; - mean_phi = stan::math::lub_constrain(mean_phi, 0, 1, lp__); - } else { - current_statement__ = 1; - mean_phi = stan::math::lub_constrain(mean_phi, 0, 1); - } + mean_phi = in__.read_lub(0, 1, lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.scalar(); - current_statement__ = 2; - if (jacobian__) { - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1, lp__); - } else { - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); - } + mean_p = in__.read_lub(0, 1, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -27672,16 +26948,12 @@ class lcm_fails2_model final : public model_base_crtp { mean_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.scalar(); - current_statement__ = 1; - mean_phi = stan::math::lub_constrain(mean_phi, 0, 1); + mean_phi = in__.read_lub(0, 1, lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.scalar(); - current_statement__ = 2; - mean_p = stan::math::lub_constrain(mean_p, 0, 1); + mean_p = in__.read_lub(0, 1, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, std::numeric_limits::quiet_NaN()); @@ -28690,7 +27962,7 @@ class lupdf_inlining_model final : public model_base_crtp mu = DUMMY_VAR__; current_statement__ = 1; - mu = in__.scalar(); + mu = in__.read(lp__); local_scalar_t__ tp; tp = DUMMY_VAR__; @@ -28768,7 +28040,7 @@ class lupdf_inlining_model final : public model_base_crtp mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mu = in__.scalar(); + mu = in__.read(lp__); double tp; tp = std::numeric_limits::quiet_NaN(); @@ -29445,22 +28717,22 @@ class off_dce_model final : public model_base_crtp { alpha_occ = DUMMY_VAR__; current_statement__ = 1; - alpha_occ = in__.scalar(); + alpha_occ = in__.read(lp__); local_scalar_t__ beta_occ; beta_occ = DUMMY_VAR__; current_statement__ = 2; - beta_occ = in__.scalar(); + beta_occ = in__.read(lp__); local_scalar_t__ alpha_p; alpha_p = DUMMY_VAR__; current_statement__ = 3; - alpha_p = in__.scalar(); + alpha_p = in__.read(lp__); local_scalar_t__ beta_p; beta_p = DUMMY_VAR__; current_statement__ = 4; - beta_p = in__.scalar(); + beta_p = in__.read(lp__); Eigen::Matrix logit_psi; logit_psi = Eigen::Matrix(R); stan::math::fill(logit_psi, DUMMY_VAR__); @@ -29586,22 +28858,22 @@ class off_dce_model final : public model_base_crtp { alpha_occ = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - alpha_occ = in__.scalar(); + alpha_occ = in__.read(lp__); double beta_occ; beta_occ = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - beta_occ = in__.scalar(); + beta_occ = in__.read(lp__); double alpha_p; alpha_p = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - alpha_p = in__.scalar(); + alpha_p = in__.read(lp__); double beta_p; beta_p = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - beta_p = in__.scalar(); + beta_p = in__.read(lp__); Eigen::Matrix logit_psi; logit_psi = Eigen::Matrix(R); stan::math::fill(logit_psi, std::numeric_limits::quiet_NaN()); @@ -30363,68 +29635,48 @@ class off_small_model final : public model_base_crtp { beta = DUMMY_VAR__; current_statement__ = 1; - beta = in__.scalar(); + beta = in__.read(lp__); Eigen::Matrix eta1; eta1 = Eigen::Matrix(J); stan::math::fill(eta1, DUMMY_VAR__); current_statement__ = 2; - eta1 = in__.vector(J); + assign(eta1, nil_index_list(), + in__.read, jacobian__>(lp__, + J), "assigning variable eta1"); Eigen::Matrix eta2; eta2 = Eigen::Matrix(J); stan::math::fill(eta2, DUMMY_VAR__); current_statement__ = 3; - eta2 = in__.vector(J); + assign(eta2, nil_index_list(), + in__.read, jacobian__>(lp__, + J), "assigning variable eta2"); local_scalar_t__ mu_a1; mu_a1 = DUMMY_VAR__; current_statement__ = 4; - mu_a1 = in__.scalar(); + mu_a1 = in__.read(lp__); local_scalar_t__ mu_a2; mu_a2 = DUMMY_VAR__; current_statement__ = 5; - mu_a2 = in__.scalar(); + mu_a2 = in__.read(lp__); local_scalar_t__ sigma_a1; sigma_a1 = DUMMY_VAR__; current_statement__ = 6; - sigma_a1 = in__.scalar(); - current_statement__ = 6; - if (jacobian__) { - current_statement__ = 6; - sigma_a1 = stan::math::lub_constrain(sigma_a1, 0, 100, lp__); - } else { - current_statement__ = 6; - sigma_a1 = stan::math::lub_constrain(sigma_a1, 0, 100); - } + sigma_a1 = in__.read_lub(0, 100, lp__); local_scalar_t__ sigma_a2; sigma_a2 = DUMMY_VAR__; current_statement__ = 7; - sigma_a2 = in__.scalar(); - current_statement__ = 7; - if (jacobian__) { - current_statement__ = 7; - sigma_a2 = stan::math::lub_constrain(sigma_a2, 0, 100, lp__); - } else { - current_statement__ = 7; - sigma_a2 = stan::math::lub_constrain(sigma_a2, 0, 100); - } + sigma_a2 = in__.read_lub(0, 100, lp__); local_scalar_t__ sigma_y; sigma_y = DUMMY_VAR__; current_statement__ = 8; - sigma_y = in__.scalar(); - current_statement__ = 8; - if (jacobian__) { - current_statement__ = 8; - sigma_y = stan::math::lub_constrain(sigma_y, 0, 100, lp__); - } else { - current_statement__ = 8; - sigma_y = stan::math::lub_constrain(sigma_y, 0, 100); - } + sigma_y = in__.read_lub(0, 100, lp__); Eigen::Matrix a1; a1 = Eigen::Matrix(J); stan::math::fill(a1, DUMMY_VAR__); @@ -30525,50 +29777,48 @@ class off_small_model final : public model_base_crtp { beta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - beta = in__.scalar(); + beta = in__.read(lp__); Eigen::Matrix eta1; eta1 = Eigen::Matrix(J); stan::math::fill(eta1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - eta1 = in__.vector(J); + assign(eta1, nil_index_list(), + in__.read, jacobian__>(lp__, + J), "assigning variable eta1"); Eigen::Matrix eta2; eta2 = Eigen::Matrix(J); stan::math::fill(eta2, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - eta2 = in__.vector(J); + assign(eta2, nil_index_list(), + in__.read, jacobian__>(lp__, + J), "assigning variable eta2"); double mu_a1; mu_a1 = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - mu_a1 = in__.scalar(); + mu_a1 = in__.read(lp__); double mu_a2; mu_a2 = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - mu_a2 = in__.scalar(); + mu_a2 = in__.read(lp__); double sigma_a1; sigma_a1 = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - sigma_a1 = in__.scalar(); - current_statement__ = 6; - sigma_a1 = stan::math::lub_constrain(sigma_a1, 0, 100); + sigma_a1 = in__.read_lub(0, 100, lp__); double sigma_a2; sigma_a2 = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - sigma_a2 = in__.scalar(); - current_statement__ = 7; - sigma_a2 = stan::math::lub_constrain(sigma_a2, 0, 100); + sigma_a2 = in__.read_lub(0, 100, lp__); double sigma_y; sigma_y = std::numeric_limits::quiet_NaN(); current_statement__ = 8; - sigma_y = in__.scalar(); - current_statement__ = 8; - sigma_y = stan::math::lub_constrain(sigma_y, 0, 100); + sigma_y = in__.read_lub(0, 100, lp__); Eigen::Matrix a1; a1 = Eigen::Matrix(J); stan::math::fill(a1, std::numeric_limits::quiet_NaN()); @@ -31324,46 +30574,36 @@ class optimizations_model final : public model_base_crtp { theta = DUMMY_VAR__; current_statement__ = 1; - theta = in__.scalar(); + theta = in__.read(lp__); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 2; - phi = in__.scalar(); + phi = in__.read(lp__); Eigen::Matrix x_matrix; x_matrix = Eigen::Matrix(3, 2); stan::math::fill(x_matrix, DUMMY_VAR__); current_statement__ = 3; - x_matrix = in__.matrix(3, 2); + assign(x_matrix, nil_index_list(), + in__.read, jacobian__>(lp__, + 3, 2), "assigning variable x_matrix"); Eigen::Matrix x_vector; x_vector = Eigen::Matrix(2); stan::math::fill(x_vector, DUMMY_VAR__); current_statement__ = 4; - x_vector = in__.vector(2); + assign(x_vector, nil_index_list(), + in__.read, jacobian__>(lp__, + 2), "assigning variable x_vector"); Eigen::Matrix x_cov; x_cov = Eigen::Matrix(2, 2); stan::math::fill(x_cov, DUMMY_VAR__); - Eigen::Matrix x_cov_in__; - x_cov_in__ = Eigen::Matrix(3); - stan::math::fill(x_cov_in__, DUMMY_VAR__); - - current_statement__ = 5; - x_cov_in__ = in__.vector(3); current_statement__ = 5; - if (jacobian__) { - current_statement__ = 5; - assign(x_cov, nil_index_list(), - stan::math::cov_matrix_constrain(x_cov_in__, 2, lp__), - "assigning variable x_cov"); - } else { - current_statement__ = 5; - assign(x_cov, nil_index_list(), - stan::math::cov_matrix_constrain(x_cov_in__, 2), - "assigning variable x_cov"); - } + assign(x_cov, nil_index_list(), + in__.read_cov_matrix, jacobian__>( + lp__, 2, 2), "assigning variable x_cov"); { double x; x = std::numeric_limits::quiet_NaN(); @@ -31901,38 +31141,36 @@ class optimizations_model final : public model_base_crtp { theta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - theta = in__.scalar(); + theta = in__.read(lp__); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - phi = in__.scalar(); + phi = in__.read(lp__); Eigen::Matrix x_matrix; x_matrix = Eigen::Matrix(3, 2); stan::math::fill(x_matrix, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - x_matrix = in__.matrix(3, 2); + assign(x_matrix, nil_index_list(), + in__.read, jacobian__>(lp__, + 3, 2), "assigning variable x_matrix"); Eigen::Matrix x_vector; x_vector = Eigen::Matrix(2); stan::math::fill(x_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - x_vector = in__.vector(2); + assign(x_vector, nil_index_list(), + in__.read, jacobian__>(lp__, + 2), "assigning variable x_vector"); Eigen::Matrix x_cov; x_cov = Eigen::Matrix(2, 2); stan::math::fill(x_cov, std::numeric_limits::quiet_NaN()); - Eigen::Matrix x_cov_in__; - x_cov_in__ = Eigen::Matrix(3); - stan::math::fill(x_cov_in__, std::numeric_limits::quiet_NaN()); - - current_statement__ = 5; - x_cov_in__ = in__.vector(3); current_statement__ = 5; assign(x_cov, nil_index_list(), - stan::math::cov_matrix_constrain(x_cov_in__, 2), - "assigning variable x_cov"); + in__.read_cov_matrix, jacobian__>( + lp__, 2, 2), "assigning variable x_cov"); vars__.emplace_back(theta); vars__.emplace_back(phi); { @@ -32800,44 +32038,32 @@ class partial_eval_model final : public model_base_crtp { stan::math::fill(a, DUMMY_VAR__); current_statement__ = 1; - a = in__.vector(n_pair); + assign(a, nil_index_list(), + in__.read, jacobian__>(lp__, + n_pair), "assigning variable a"); Eigen::Matrix beta; beta = Eigen::Matrix(2); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - beta = in__.vector(2); + assign(beta, nil_index_list(), + in__.read, jacobian__>(lp__, + 2), "assigning variable beta"); local_scalar_t__ mu_a; mu_a = DUMMY_VAR__; current_statement__ = 3; - mu_a = in__.scalar(); + mu_a = in__.read(lp__); local_scalar_t__ sigma_a; sigma_a = DUMMY_VAR__; current_statement__ = 4; - sigma_a = in__.scalar(); - current_statement__ = 4; - if (jacobian__) { - current_statement__ = 4; - sigma_a = stan::math::lub_constrain(sigma_a, 0, 100, lp__); - } else { - current_statement__ = 4; - sigma_a = stan::math::lub_constrain(sigma_a, 0, 100); - } + sigma_a = in__.read_lub(0, 100, lp__); local_scalar_t__ sigma_y; sigma_y = DUMMY_VAR__; current_statement__ = 5; - sigma_y = in__.scalar(); - current_statement__ = 5; - if (jacobian__) { - current_statement__ = 5; - sigma_y = stan::math::lub_constrain(sigma_y, 0, 100, lp__); - } else { - current_statement__ = 5; - sigma_y = stan::math::lub_constrain(sigma_y, 0, 100); - } + sigma_y = in__.read_lub(0, 100, lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -32910,32 +32136,32 @@ class partial_eval_model final : public model_base_crtp { stan::math::fill(a, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - a = in__.vector(n_pair); + assign(a, nil_index_list(), + in__.read, jacobian__>(lp__, + n_pair), "assigning variable a"); Eigen::Matrix beta; beta = Eigen::Matrix(2); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - beta = in__.vector(2); + assign(beta, nil_index_list(), + in__.read, jacobian__>(lp__, + 2), "assigning variable beta"); double mu_a; mu_a = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - mu_a = in__.scalar(); + mu_a = in__.read(lp__); double sigma_a; sigma_a = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma_a = in__.scalar(); - current_statement__ = 4; - sigma_a = stan::math::lub_constrain(sigma_a, 0, 100); + sigma_a = in__.read_lub(0, 100, lp__); double sigma_y; sigma_y = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - sigma_y = in__.scalar(); - current_statement__ = 5; - sigma_y = stan::math::lub_constrain(sigma_y, 0, 100); + sigma_y = in__.read_lub(0, 100, lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -33592,49 +32818,35 @@ class stalled1_failure_model final : public model_base_crtp(lp__); local_scalar_t__ alpha1; alpha1 = DUMMY_VAR__; current_statement__ = 2; - alpha1 = in__.scalar(); + alpha1 = in__.read(lp__); local_scalar_t__ alpha2; alpha2 = DUMMY_VAR__; current_statement__ = 3; - alpha2 = in__.scalar(); + alpha2 = in__.read(lp__); local_scalar_t__ alpha12; alpha12 = DUMMY_VAR__; current_statement__ = 4; - alpha12 = in__.scalar(); + alpha12 = in__.read(lp__); local_scalar_t__ tau; tau = DUMMY_VAR__; current_statement__ = 5; - tau = in__.scalar(); - current_statement__ = 5; - if (jacobian__) { - current_statement__ = 5; - tau = stan::math::lb_constrain(tau, 0, lp__); - } else { - current_statement__ = 5; - tau = stan::math::lb_constrain(tau, 0); - } + tau = in__.read_lb(0, lp__); std::vector> b; b = std::vector>(I, Eigen::Matrix(8)); stan::math::fill(b, DUMMY_VAR__); - lcm_sym18__ = logical_gte(I, 1); - if (lcm_sym18__) { - current_statement__ = 6; - assign(b, cons_list(index_uni(1), nil_index_list()), in__.vector(8), - "assigning variable b"); - for (int sym1__ = 2; sym1__ <= I; ++sym1__) { - current_statement__ = 6; - assign(b, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(8), "assigning variable b");} - } + current_statement__ = 6; + assign(b, nil_index_list(), + in__.read>, jacobian__>( + lp__, I, 8), "assigning variable b"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -33652,7 +32864,7 @@ class stalled1_failure_model final : public model_base_crtp(tau, 1.0E-3, 1.0E-3)); current_statement__ = 16; - if (lcm_sym18__) { + if (logical_gte(I, 1)) { current_statement__ = 13; lp_accum__.add(normal_lpdf(b[(1 - 1)], 0.0, lcm_sym17__)); current_statement__ = 14; @@ -33716,43 +32928,35 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - alpha0 = in__.scalar(); + alpha0 = in__.read(lp__); double alpha1; alpha1 = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - alpha1 = in__.scalar(); + alpha1 = in__.read(lp__); double alpha2; alpha2 = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - alpha2 = in__.scalar(); + alpha2 = in__.read(lp__); double alpha12; alpha12 = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - alpha12 = in__.scalar(); + alpha12 = in__.read(lp__); double tau; tau = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - tau = in__.scalar(); - current_statement__ = 5; - tau = stan::math::lb_constrain(tau, 0); + tau = in__.read_lb(0, lp__); std::vector> b; b = std::vector>(I, Eigen::Matrix(8)); stan::math::fill(b, std::numeric_limits::quiet_NaN()); - lcm_sym10__ = logical_gte(I, 1); - if (lcm_sym10__) { - current_statement__ = 6; - assign(b, cons_list(index_uni(1), nil_index_list()), in__.vector(8), - "assigning variable b"); - for (int sym1__ = 2; sym1__ <= I; ++sym1__) { - current_statement__ = 6; - assign(b, cons_list(index_uni(sym1__), nil_index_list()), - in__.vector(8), "assigning variable b");} - } + current_statement__ = 6; + assign(b, nil_index_list(), + in__.read>, jacobian__>( + lp__, I, 8), "assigning variable b"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -33762,6 +32966,7 @@ class stalled1_failure_model final : public model_base_crtp Date: Fri, 12 Mar 2021 15:43:01 -0500 Subject: [PATCH 04/31] Change in__ from reader to deserializer; remove jacobian from read() calls --- src/stan_math_backend/Expression_gen.ml | 14 +- src/stan_math_backend/Stan_math_code_gen.ml | 2 +- src/stan_math_backend/Transform_Mir.ml | 9 +- .../cli-args/filename_good.expected | 2 +- test/integration/good/code-gen/cl.expected | 58 +-- test/integration/good/code-gen/cpp.expected | 430 +++++++++--------- .../good/code-gen/expressions/cpp.expected | 2 +- .../good/code-gen/opencl/cpp.expected | 76 ++-- .../good/code-gen/profiling/cpp.expected | 2 +- .../good/compiler-optimizations/cpp.expected | 344 +++++++------- test/unit/Ast_to_Mir_tests.ml | 95 ---- test/unit/Pedantic_analysis.ml | 3 +- 12 files changed, 470 insertions(+), 567 deletions(-) diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index 7cb0773371..42b776f29b 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -422,16 +422,16 @@ and pp_compiler_internal_fn ad ut f ppf es = :: {Expr.Fixed.pattern= Lit (Int, n_constraint_args_str); _} :: args -> let n_constraint_args = int_of_string n_constraint_args_str in let constraint_args, dims = List.split_n args n_constraint_args in - let constraint_extension = - if String.is_empty constraint_string then "" - else "_" ^ constraint_string - in let lp_expr = Expr.Fixed.{pattern= Var "lp__"; meta= emeta} in let arg_exprs = constraint_args @ [lp_expr] @ dims in - pf ppf "@[in__.read%s<%a, jacobian__>(@,%a)@]" - constraint_extension pp_unsizedtype_local + let maybe_constraint, maybe_jacobian = + if String.is_empty constraint_string then ("", "") + else ("_" ^ constraint_string, ", jacobian__") + in + pf ppf "@[in__.read%s<%a%s>(@,%a)@]" maybe_constraint + pp_unsizedtype_local (UnsizedType.AutoDiffable, ut) - (list ~sep:comma pp_expr) arg_exprs + maybe_jacobian (list ~sep:comma pp_expr) arg_exprs | _ -> raise_s [%message "emit ReadParam with " (es : Expr.Typed.t list)] ) | _ -> gen_fun_app ppf f es diff --git a/src/stan_math_backend/Stan_math_code_gen.ml b/src/stan_math_backend/Stan_math_code_gen.ml index 0d88b93791..1fa89c4c12 100644 --- a/src/stan_math_backend/Stan_math_code_gen.ml +++ b/src/stan_math_backend/Stan_math_code_gen.ml @@ -510,7 +510,7 @@ let pp_write_array ppf {Program.prog_name; generate_quantities; _} = let intro ppf () = pf ppf "%a@ %a@ %a" (list ~sep:cut string) [ "using local_scalar_t__ = double;"; "vars__.resize(0);" - ; "stan::io::reader in__(params_r__, params_i__);" + ; "stan::io::deserializer in__(params_r__, params_i__);" ; "double lp__ = 0.0;" ; "(void) lp__; // dummy to suppress unused var warning" ; "int current_statement__ = 0; " diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index d0ad69bea0..bac030d7e1 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -196,13 +196,12 @@ let constrain_constraint_to_string t (c : constrainaction) = let default_multiplier = 1 let default_offset = 0 + let transform_args = function - | Program.Offset offset -> - [offset; Expr.Helpers.int default_multiplier] - | Multiplier multiplier -> - [Expr.Helpers.int default_offset; multiplier] + | Program.Offset offset -> [offset; Expr.Helpers.int default_multiplier] + | Multiplier multiplier -> [Expr.Helpers.int default_offset; multiplier] | transform -> - Program.fold_transformation (fun args arg -> args @ [arg]) [] transform + Program.fold_transformation (fun args arg -> args @ [arg]) [] transform let param_read smeta (decl_id, Program.({out_constrained_st= cst; out_block; out_trans; _})) = diff --git a/test/integration/cli-args/filename_good.expected b/test/integration/cli-args/filename_good.expected index 36114e70bf..05e572a750 100644 --- a/test/integration/cli-args/filename_good.expected +++ b/test/integration/cli-args/filename_good.expected @@ -121,7 +121,7 @@ class filename_good_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index f07c4553b3..edee729a2c 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -580,24 +580,24 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 1; assign(alpha_v, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable alpha_v"); + in__.read>(lp__, k), + "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; assign(beta, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable beta"); + in__.read>(lp__, k), + "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, DUMMY_VAR__); current_statement__ = 3; assign(cuts, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable cuts"); + in__.read>(lp__, k), + "assigning variable cuts"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -607,36 +607,36 @@ class optimize_glm_model final : public model_base_crtp { alpha = DUMMY_VAR__; current_statement__ = 5; - alpha = in__.read(lp__); + alpha = in__.read(lp__); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 6; - phi = in__.read(lp__); + phi = in__.read(lp__); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, DUMMY_VAR__); current_statement__ = 7; assign(X_p, nil_index_list(), - in__.read, jacobian__>(lp__, - n, k), "assigning variable X_p"); + in__.read>(lp__, n, k), + "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, DUMMY_VAR__); current_statement__ = 8; assign(beta_m, nil_index_list(), - in__.read, jacobian__>(lp__, - n, k), "assigning variable beta_m"); + in__.read>(lp__, n, k), + "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, DUMMY_VAR__); current_statement__ = 9; assign(X_rv_p, nil_index_list(), - in__.read, jacobian__>(lp__, - n), "assigning variable X_rv_p"); + in__.read>(lp__, n), + "assigning variable X_rv_p"); { current_statement__ = 10; lp_accum__.add( @@ -1292,7 +1292,7 @@ class optimize_glm_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -1309,24 +1309,24 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 1; assign(alpha_v, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable alpha_v"); + in__.read>(lp__, k), + "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(beta, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable beta"); + in__.read>(lp__, k), + "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(cuts, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable cuts"); + in__.read>(lp__, k), + "assigning variable cuts"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -1336,36 +1336,36 @@ class optimize_glm_model final : public model_base_crtp { alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - alpha = in__.read(lp__); + alpha = in__.read(lp__); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - phi = in__.read(lp__); + phi = in__.read(lp__); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, std::numeric_limits::quiet_NaN()); current_statement__ = 7; assign(X_p, nil_index_list(), - in__.read, jacobian__>(lp__, - n, k), "assigning variable X_p"); + in__.read>(lp__, n, k), + "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, std::numeric_limits::quiet_NaN()); current_statement__ = 8; assign(beta_m, nil_index_list(), - in__.read, jacobian__>(lp__, - n, k), "assigning variable beta_m"); + in__.read>(lp__, n, k), + "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, std::numeric_limits::quiet_NaN()); current_statement__ = 9; assign(X_rv_p, nil_index_list(), - in__.read, jacobian__>(lp__, - n), "assigning variable X_rv_p"); + in__.read>(lp__, n), + "assigning variable X_rv_p"); for (int sym1__ = 1; sym1__ <= k; ++sym1__) { vars__.emplace_back(alpha_v[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= k; ++sym1__) { diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 67057eb91a..a52c47ae7d 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -152,7 +152,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> mu = DUMMY_VAR__; current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(lp__); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -164,8 +164,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> current_statement__ = 3; assign(theta_tilde, nil_index_list(), - in__.read, jacobian__>(lp__, - J), "assigning variable theta_tilde"); + in__.read>(lp__, J), + "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, DUMMY_VAR__); @@ -203,7 +203,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -218,7 +218,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(lp__); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -230,8 +230,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> current_statement__ = 3; assign(theta_tilde, nil_index_list(), - in__.read, jacobian__>(lp__, - J), "assigning variable theta_tilde"); + in__.read>(lp__, J), + "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, std::numeric_limits::quiet_NaN()); @@ -595,7 +595,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb bar = DUMMY_VAR__; current_statement__ = 1; - bar = in__.read(lp__); + bar = in__.read(lp__); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); // Next line prevents compiler griping about no return @@ -616,7 +616,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -631,7 +631,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb bar = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - bar = in__.read(lp__); + bar = in__.read(lp__); vars__.emplace_back(bar); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -974,7 +974,7 @@ class eight_schools_ncp_model final : public model_base_crtp(lp__); + mu = in__.read(lp__); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -986,8 +986,8 @@ class eight_schools_ncp_model final : public model_base_crtp, jacobian__>(lp__, - J), "assigning variable theta_tilde"); + in__.read>(lp__, J), + "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, DUMMY_VAR__); @@ -1025,7 +1025,7 @@ class eight_schools_ncp_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -1040,7 +1040,7 @@ class eight_schools_ncp_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(lp__); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -1052,8 +1052,8 @@ class eight_schools_ncp_model final : public model_base_crtp, jacobian__>(lp__, - J), "assigning variable theta_tilde"); + in__.read>(lp__, J), + "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, std::numeric_limits::quiet_NaN()); @@ -1418,7 +1418,7 @@ class mixed_type_arrays_model final : public model_base_crtp, jacobian__>(lp__, 3), + in__.read>(lp__, 3), "assigning variable xx"); std::vector> y; y = std::vector>(3, std::vector(3, DUMMY_VAR__)); @@ -1469,7 +1469,7 @@ class mixed_type_arrays_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -1485,7 +1485,7 @@ class mixed_type_arrays_model final : public model_base_crtp, jacobian__>(lp__, 3), + in__.read>(lp__, 3), "assigning variable xx"); std::vector> y; y = std::vector>(3, std::vector(3, std::numeric_limits::quiet_NaN())); @@ -6893,7 +6893,7 @@ class mother_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(lp__); local_scalar_t__ p_upper; p_upper = DUMMY_VAR__; @@ -6953,15 +6953,15 @@ class mother_model final : public model_base_crtp { current_statement__ = 10; assign(p_1d_vec, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable p_1d_vec"); + in__.read>>(lp__, + N, N), "assigning variable p_1d_vec"); std::vector>>> p_3d_vec; p_3d_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_vec, DUMMY_VAR__); current_statement__ = 11; assign(p_3d_vec, nil_index_list(), - in__.read>>>, jacobian__>( + in__.read>>>>( lp__, N, M, K, N), "assigning variable p_3d_vec"); Eigen::Matrix p_row_vec; p_row_vec = Eigen::Matrix(N); @@ -6969,23 +6969,23 @@ class mother_model final : public model_base_crtp { current_statement__ = 12; assign(p_row_vec, nil_index_list(), - in__.read, jacobian__>(lp__, - N), "assigning variable p_row_vec"); + in__.read>(lp__, N), + "assigning variable p_row_vec"); std::vector> p_1d_row_vec; p_1d_row_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_row_vec, DUMMY_VAR__); current_statement__ = 13; assign(p_1d_row_vec, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable p_1d_row_vec"); + in__.read>>(lp__, + N, N), "assigning variable p_1d_row_vec"); std::vector>>> p_3d_row_vec; p_3d_row_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_row_vec, DUMMY_VAR__); current_statement__ = 14; assign(p_3d_row_vec, nil_index_list(), - in__.read>>>, jacobian__>( + in__.read>>>>( lp__, N, M, K, N), "assigning variable p_3d_row_vec"); std::vector>> p_ar_mat; p_ar_mat = std::vector>>(4, std::vector>(5, Eigen::Matrix(2, 3))); @@ -7049,16 +7049,16 @@ class mother_model final : public model_base_crtp { current_statement__ = 22; assign(x_p, nil_index_list(), - in__.read, jacobian__>(lp__, - 2), "assigning variable x_p"); + in__.read>(lp__, 2), + "assigning variable x_p"); Eigen::Matrix y_p; y_p = Eigen::Matrix(2); stan::math::fill(y_p, DUMMY_VAR__); current_statement__ = 23; assign(y_p, nil_index_list(), - in__.read, jacobian__>(lp__, - 2), "assigning variable y_p"); + in__.read>(lp__, 2), + "assigning variable y_p"); std::vector tp_real_1d_ar; tp_real_1d_ar = std::vector(N, DUMMY_VAR__); @@ -7479,7 +7479,7 @@ class mother_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -7494,7 +7494,7 @@ class mother_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(lp__); double p_upper; p_upper = std::numeric_limits::quiet_NaN(); @@ -7554,15 +7554,15 @@ class mother_model final : public model_base_crtp { current_statement__ = 10; assign(p_1d_vec, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable p_1d_vec"); + in__.read>>(lp__, + N, N), "assigning variable p_1d_vec"); std::vector>>> p_3d_vec; p_3d_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 11; assign(p_3d_vec, nil_index_list(), - in__.read>>>, jacobian__>( + in__.read>>>>( lp__, N, M, K, N), "assigning variable p_3d_vec"); Eigen::Matrix p_row_vec; p_row_vec = Eigen::Matrix(N); @@ -7570,23 +7570,23 @@ class mother_model final : public model_base_crtp { current_statement__ = 12; assign(p_row_vec, nil_index_list(), - in__.read, jacobian__>(lp__, - N), "assigning variable p_row_vec"); + in__.read>(lp__, N), + "assigning variable p_row_vec"); std::vector> p_1d_row_vec; p_1d_row_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_row_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 13; assign(p_1d_row_vec, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable p_1d_row_vec"); + in__.read>>(lp__, + N, N), "assigning variable p_1d_row_vec"); std::vector>>> p_3d_row_vec; p_3d_row_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_row_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 14; assign(p_3d_row_vec, nil_index_list(), - in__.read>>>, jacobian__>( + in__.read>>>>( lp__, N, M, K, N), "assigning variable p_3d_row_vec"); std::vector>> p_ar_mat; p_ar_mat = std::vector>>(4, std::vector>(5, Eigen::Matrix(2, 3))); @@ -7650,16 +7650,16 @@ class mother_model final : public model_base_crtp { current_statement__ = 22; assign(x_p, nil_index_list(), - in__.read, jacobian__>(lp__, - 2), "assigning variable x_p"); + in__.read>(lp__, 2), + "assigning variable x_p"); Eigen::Matrix y_p; y_p = Eigen::Matrix(2); stan::math::fill(y_p, std::numeric_limits::quiet_NaN()); current_statement__ = 23; assign(y_p, nil_index_list(), - in__.read, jacobian__>(lp__, - 2), "assigning variable y_p"); + in__.read>(lp__, 2), + "assigning variable y_p"); std::vector tp_real_1d_ar; tp_real_1d_ar = std::vector(N, std::numeric_limits::quiet_NaN()); @@ -11461,21 +11461,21 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 1; assign(y0_p, nil_index_list(), - in__.read, jacobian__>(lp__, 2), + in__.read>(lp__, 2), "assigning variable y0_p"); std::vector theta_p; theta_p = std::vector(1, DUMMY_VAR__); current_statement__ = 2; assign(theta_p, nil_index_list(), - in__.read, jacobian__>(lp__, 1), + in__.read>(lp__, 1), "assigning variable theta_p"); std::vector x_p; x_p = std::vector(1, DUMMY_VAR__); current_statement__ = 3; assign(x_p, nil_index_list(), - in__.read, jacobian__>(lp__, 1), + in__.read>(lp__, 1), "assigning variable x_p"); Eigen::Matrix x_p_v; x_p_v = Eigen::Matrix(2); @@ -11483,29 +11483,29 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 4; assign(x_p_v, nil_index_list(), - in__.read, jacobian__>(lp__, - 2), "assigning variable x_p_v"); + in__.read>(lp__, 2), + "assigning variable x_p_v"); Eigen::Matrix shared_params_p; shared_params_p = Eigen::Matrix(3); stan::math::fill(shared_params_p, DUMMY_VAR__); current_statement__ = 5; assign(shared_params_p, nil_index_list(), - in__.read, jacobian__>(lp__, - 3), "assigning variable shared_params_p"); + in__.read>(lp__, 3), + "assigning variable shared_params_p"); std::vector> job_params_p; job_params_p = std::vector>(3, Eigen::Matrix(3)); stan::math::fill(job_params_p, DUMMY_VAR__); current_statement__ = 6; assign(job_params_p, nil_index_list(), - in__.read>, jacobian__>( - lp__, 3, 3), "assigning variable job_params_p"); + in__.read>>(lp__, + 3, 3), "assigning variable job_params_p"); local_scalar_t__ x_r; x_r = DUMMY_VAR__; current_statement__ = 7; - x_r = in__.read(lp__); + x_r = in__.read(lp__); local_scalar_t__ abc1_p; abc1_p = DUMMY_VAR__; @@ -11793,7 +11793,7 @@ class motherHOF_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -11809,21 +11809,21 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 1; assign(y0_p, nil_index_list(), - in__.read, jacobian__>(lp__, 2), + in__.read>(lp__, 2), "assigning variable y0_p"); std::vector theta_p; theta_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(theta_p, nil_index_list(), - in__.read, jacobian__>(lp__, 1), + in__.read>(lp__, 1), "assigning variable theta_p"); std::vector x_p; x_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(x_p, nil_index_list(), - in__.read, jacobian__>(lp__, 1), + in__.read>(lp__, 1), "assigning variable x_p"); Eigen::Matrix x_p_v; x_p_v = Eigen::Matrix(2); @@ -11831,29 +11831,29 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 4; assign(x_p_v, nil_index_list(), - in__.read, jacobian__>(lp__, - 2), "assigning variable x_p_v"); + in__.read>(lp__, 2), + "assigning variable x_p_v"); Eigen::Matrix shared_params_p; shared_params_p = Eigen::Matrix(3); stan::math::fill(shared_params_p, std::numeric_limits::quiet_NaN()); current_statement__ = 5; assign(shared_params_p, nil_index_list(), - in__.read, jacobian__>(lp__, - 3), "assigning variable shared_params_p"); + in__.read>(lp__, 3), + "assigning variable shared_params_p"); std::vector> job_params_p; job_params_p = std::vector>(3, Eigen::Matrix(3)); stan::math::fill(job_params_p, std::numeric_limits::quiet_NaN()); current_statement__ = 6; assign(job_params_p, nil_index_list(), - in__.read>, jacobian__>( - lp__, 3, 3), "assigning variable job_params_p"); + in__.read>>(lp__, + 3, 3), "assigning variable job_params_p"); double x_r; x_r = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - x_r = in__.read(lp__); + x_r = in__.read(lp__); double abc1_p; abc1_p = std::numeric_limits::quiet_NaN(); @@ -13752,13 +13752,13 @@ class new_integrate_interface_model final : public model_base_crtp(lp__); + r = in__.read(lp__); std::vector ra; ra = std::vector(N, DUMMY_VAR__); current_statement__ = 2; assign(ra, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable ra"); Eigen::Matrix v; v = Eigen::Matrix(N); @@ -13766,8 +13766,8 @@ class new_integrate_interface_model final : public model_base_crtp, jacobian__>(lp__, - N), "assigning variable v"); + in__.read>(lp__, N), + "assigning variable v"); std::vector> z; z = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(z, DUMMY_VAR__); @@ -15388,7 +15388,7 @@ class new_integrate_interface_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -15403,13 +15403,13 @@ class new_integrate_interface_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - r = in__.read(lp__); + r = in__.read(lp__); std::vector ra; ra = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(ra, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable ra"); Eigen::Matrix v; v = Eigen::Matrix(N); @@ -15417,8 +15417,8 @@ class new_integrate_interface_model final : public model_base_crtp, jacobian__>(lp__, - N), "assigning variable v"); + in__.read>(lp__, N), + "assigning variable v"); std::vector> z; z = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(z, std::numeric_limits::quiet_NaN()); @@ -17667,7 +17667,7 @@ class old_integrate_interface_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -18613,24 +18613,24 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 1; assign(alpha_v, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable alpha_v"); + in__.read>(lp__, k), + "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; assign(beta, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable beta"); + in__.read>(lp__, k), + "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, DUMMY_VAR__); current_statement__ = 3; assign(cuts, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable cuts"); + in__.read>(lp__, k), + "assigning variable cuts"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -18640,36 +18640,36 @@ class optimize_glm_model final : public model_base_crtp { alpha = DUMMY_VAR__; current_statement__ = 5; - alpha = in__.read(lp__); + alpha = in__.read(lp__); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 6; - phi = in__.read(lp__); + phi = in__.read(lp__); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, DUMMY_VAR__); current_statement__ = 7; assign(X_p, nil_index_list(), - in__.read, jacobian__>(lp__, - n, k), "assigning variable X_p"); + in__.read>(lp__, n, k), + "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, DUMMY_VAR__); current_statement__ = 8; assign(beta_m, nil_index_list(), - in__.read, jacobian__>(lp__, - n, k), "assigning variable beta_m"); + in__.read>(lp__, n, k), + "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, DUMMY_VAR__); current_statement__ = 9; assign(X_rv_p, nil_index_list(), - in__.read, jacobian__>(lp__, - n), "assigning variable X_rv_p"); + in__.read>(lp__, n), + "assigning variable X_rv_p"); { current_statement__ = 10; lp_accum__.add( @@ -19230,7 +19230,7 @@ class optimize_glm_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -19247,24 +19247,24 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 1; assign(alpha_v, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable alpha_v"); + in__.read>(lp__, k), + "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(beta, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable beta"); + in__.read>(lp__, k), + "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(cuts, nil_index_list(), - in__.read, jacobian__>(lp__, - k), "assigning variable cuts"); + in__.read>(lp__, k), + "assigning variable cuts"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -19274,36 +19274,36 @@ class optimize_glm_model final : public model_base_crtp { alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - alpha = in__.read(lp__); + alpha = in__.read(lp__); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - phi = in__.read(lp__); + phi = in__.read(lp__); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, std::numeric_limits::quiet_NaN()); current_statement__ = 7; assign(X_p, nil_index_list(), - in__.read, jacobian__>(lp__, - n, k), "assigning variable X_p"); + in__.read>(lp__, n, k), + "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, std::numeric_limits::quiet_NaN()); current_statement__ = 8; assign(beta_m, nil_index_list(), - in__.read, jacobian__>(lp__, - n, k), "assigning variable beta_m"); + in__.read>(lp__, n, k), + "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, std::numeric_limits::quiet_NaN()); current_statement__ = 9; assign(X_rv_p, nil_index_list(), - in__.read, jacobian__>(lp__, - n), "assigning variable X_rv_p"); + in__.read>(lp__, n), + "assigning variable X_rv_p"); for (int sym1__ = 1; sym1__ <= k; ++sym1__) { vars__.emplace_back(alpha_v[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= k; ++sym1__) { @@ -19921,7 +19921,7 @@ class param_constraint_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -20527,21 +20527,21 @@ class reduce_sum_m1_model final : public model_base_crtp { current_statement__ = 1; assign(y1, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable y1"); std::vector y2; y2 = std::vector(N, DUMMY_VAR__); current_statement__ = 2; assign(y2, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable y2"); std::vector y3; y3 = std::vector(N, DUMMY_VAR__); current_statement__ = 3; assign(y3, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable y3"); { current_statement__ = 4; @@ -20575,7 +20575,7 @@ class reduce_sum_m1_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -20591,21 +20591,21 @@ class reduce_sum_m1_model final : public model_base_crtp { current_statement__ = 1; assign(y1, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable y1"); std::vector y2; y2 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(y2, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable y2"); std::vector y3; y3 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(y3, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable y3"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { vars__.emplace_back(y1[(sym1__ - 1)]);} @@ -22190,7 +22190,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 1; assign(a8, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N, N), "assigning variable a8"); std::vector>> a7; a7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -22198,7 +22198,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 2; assign(a7, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable a7"); std::vector>> a6; a6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -22206,45 +22206,45 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 3; assign(a6, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable a6"); std::vector> a5; a5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 4; assign(a5, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable a5"); + in__.read>>(lp__, N, N), + "assigning variable a5"); std::vector> a4; a4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(a4, DUMMY_VAR__); current_statement__ = 5; assign(a4, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N, N), "assigning variable a4"); + in__.read>>(lp__, + N, N, N), "assigning variable a4"); std::vector> a3; a3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a3, DUMMY_VAR__); current_statement__ = 6; assign(a3, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable a3"); + in__.read>>(lp__, + N, N), "assigning variable a3"); std::vector> a2; a2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a2, DUMMY_VAR__); current_statement__ = 7; assign(a2, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable a2"); + in__.read>>(lp__, + N, N), "assigning variable a2"); std::vector a1; a1 = std::vector(N, DUMMY_VAR__); current_statement__ = 8; assign(a1, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable a1"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); @@ -22252,7 +22252,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 9; assign(y8, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N, N), "assigning variable y8"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -22260,7 +22260,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 10; assign(y7, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable y7"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -22268,45 +22268,45 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 11; assign(y6, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable y6"); std::vector> y5; y5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 12; assign(y5, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y5"); + in__.read>>(lp__, N, N), + "assigning variable y5"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, DUMMY_VAR__); current_statement__ = 13; assign(y4, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N, N), "assigning variable y4"); + in__.read>>(lp__, + N, N, N), "assigning variable y4"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, DUMMY_VAR__); current_statement__ = 14; assign(y3, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y3"); + in__.read>>(lp__, + N, N), "assigning variable y3"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, DUMMY_VAR__); current_statement__ = 15; assign(y2, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y2"); + in__.read>>(lp__, + N, N), "assigning variable y2"); std::vector y1; y1 = std::vector(N, DUMMY_VAR__); current_statement__ = 16; assign(y1, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable y1"); { current_statement__ = 17; @@ -22362,7 +22362,7 @@ class reduce_sum_m2_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -22379,7 +22379,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 1; assign(a8, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N, N), "assigning variable a8"); std::vector>> a7; a7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -22387,7 +22387,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 2; assign(a7, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable a7"); std::vector>> a6; a6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -22395,45 +22395,45 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 3; assign(a6, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable a6"); std::vector> a5; a5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 4; assign(a5, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable a5"); + in__.read>>(lp__, N, N), + "assigning variable a5"); std::vector> a4; a4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(a4, std::numeric_limits::quiet_NaN()); current_statement__ = 5; assign(a4, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N, N), "assigning variable a4"); + in__.read>>(lp__, + N, N, N), "assigning variable a4"); std::vector> a3; a3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a3, std::numeric_limits::quiet_NaN()); current_statement__ = 6; assign(a3, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable a3"); + in__.read>>(lp__, + N, N), "assigning variable a3"); std::vector> a2; a2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a2, std::numeric_limits::quiet_NaN()); current_statement__ = 7; assign(a2, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable a2"); + in__.read>>(lp__, + N, N), "assigning variable a2"); std::vector a1; a1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 8; assign(a1, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable a1"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); @@ -22441,7 +22441,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 9; assign(y8, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N, N), "assigning variable y8"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -22449,7 +22449,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 10; assign(y7, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable y7"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -22457,45 +22457,45 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 11; assign(y6, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable y6"); std::vector> y5; y5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 12; assign(y5, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y5"); + in__.read>>(lp__, N, N), + "assigning variable y5"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, std::numeric_limits::quiet_NaN()); current_statement__ = 13; assign(y4, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N, N), "assigning variable y4"); + in__.read>>(lp__, + N, N, N), "assigning variable y4"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, std::numeric_limits::quiet_NaN()); current_statement__ = 14; assign(y3, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y3"); + in__.read>>(lp__, + N, N), "assigning variable y3"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, std::numeric_limits::quiet_NaN()); current_statement__ = 15; assign(y2, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y2"); + in__.read>>(lp__, + N, N), "assigning variable y2"); std::vector y1; y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 16; assign(y1, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable y1"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { for (int sym2__ = 1; sym2__ <= N; ++sym2__) { @@ -26294,7 +26294,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 1; assign(y1, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable y1"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); @@ -26302,38 +26302,38 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 2; assign(y2, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y2"); + in__.read>>(lp__, + N, N), "assigning variable y2"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, DUMMY_VAR__); current_statement__ = 3; assign(y3, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y3"); + in__.read>>(lp__, + N, N), "assigning variable y3"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, DUMMY_VAR__); current_statement__ = 4; assign(y4, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N, N), "assigning variable y4"); + in__.read>>(lp__, + N, N, N), "assigning variable y4"); std::vector> y5; y5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 5; assign(y5, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y5"); + in__.read>>(lp__, N, N), + "assigning variable y5"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, DUMMY_VAR__); current_statement__ = 6; assign(y6, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable y6"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -26341,7 +26341,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 7; assign(y7, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable y7"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); @@ -26349,43 +26349,43 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 8; assign(y8, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N, N), "assigning variable y8"); local_scalar_t__ y9; y9 = DUMMY_VAR__; current_statement__ = 9; - y9 = in__.read(lp__); + y9 = in__.read(lp__); Eigen::Matrix y10; y10 = Eigen::Matrix(N); stan::math::fill(y10, DUMMY_VAR__); current_statement__ = 10; assign(y10, nil_index_list(), - in__.read, jacobian__>(lp__, - N), "assigning variable y10"); + in__.read>(lp__, N), + "assigning variable y10"); Eigen::Matrix y11; y11 = Eigen::Matrix(N); stan::math::fill(y11, DUMMY_VAR__); current_statement__ = 11; assign(y11, nil_index_list(), - in__.read, jacobian__>(lp__, - N), "assigning variable y11"); + in__.read>(lp__, N), + "assigning variable y11"); Eigen::Matrix y12; y12 = Eigen::Matrix(N, N); stan::math::fill(y12, DUMMY_VAR__); current_statement__ = 12; assign(y12, nil_index_list(), - in__.read, jacobian__>(lp__, - N, N), "assigning variable y12"); + in__.read>(lp__, N, N), + "assigning variable y12"); std::vector>> y17; y17 = std::vector>>(N, std::vector>(N, std::vector(N, DUMMY_VAR__))); current_statement__ = 13; assign(y17, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable y17"); { local_scalar_t__ t1; @@ -26546,7 +26546,7 @@ class reduce_sum_m3_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -26562,7 +26562,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 1; assign(y1, nil_index_list(), - in__.read, jacobian__>(lp__, N), + in__.read>(lp__, N), "assigning variable y1"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); @@ -26570,38 +26570,38 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 2; assign(y2, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y2"); + in__.read>>(lp__, + N, N), "assigning variable y2"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(y3, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y3"); + in__.read>>(lp__, + N, N), "assigning variable y3"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(y4, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N, N), "assigning variable y4"); + in__.read>>(lp__, + N, N, N), "assigning variable y4"); std::vector> y5; y5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 5; assign(y5, nil_index_list(), - in__.read>, jacobian__>( - lp__, N, N), "assigning variable y5"); + in__.read>>(lp__, N, N), + "assigning variable y5"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, std::numeric_limits::quiet_NaN()); current_statement__ = 6; assign(y6, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable y6"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -26609,7 +26609,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 7; assign(y7, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable y7"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); @@ -26617,43 +26617,43 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 8; assign(y8, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N, N), "assigning variable y8"); double y9; y9 = std::numeric_limits::quiet_NaN(); current_statement__ = 9; - y9 = in__.read(lp__); + y9 = in__.read(lp__); Eigen::Matrix y10; y10 = Eigen::Matrix(N); stan::math::fill(y10, std::numeric_limits::quiet_NaN()); current_statement__ = 10; assign(y10, nil_index_list(), - in__.read, jacobian__>(lp__, - N), "assigning variable y10"); + in__.read>(lp__, N), + "assigning variable y10"); Eigen::Matrix y11; y11 = Eigen::Matrix(N); stan::math::fill(y11, std::numeric_limits::quiet_NaN()); current_statement__ = 11; assign(y11, nil_index_list(), - in__.read, jacobian__>(lp__, - N), "assigning variable y11"); + in__.read>(lp__, N), + "assigning variable y11"); Eigen::Matrix y12; y12 = Eigen::Matrix(N, N); stan::math::fill(y12, std::numeric_limits::quiet_NaN()); current_statement__ = 12; assign(y12, nil_index_list(), - in__.read, jacobian__>(lp__, - N, N), "assigning variable y12"); + in__.read>(lp__, N, N), + "assigning variable y12"); std::vector>> y17; y17 = std::vector>>(N, std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN()))); current_statement__ = 13; assign(y17, nil_index_list(), - in__.read>>, jacobian__>( + in__.read>>>( lp__, N, N, N), "assigning variable y17"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { vars__.emplace_back(y1[(sym1__ - 1)]);} @@ -28036,7 +28036,7 @@ class single_argument_lpmf_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -28383,7 +28383,7 @@ class tilde_block_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -29841,7 +29841,7 @@ class transform_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -32279,7 +32279,7 @@ class truncate_model final : public model_base_crtp { m = DUMMY_VAR__; current_statement__ = 1; - m = in__.read(lp__); + m = in__.read(lp__); local_scalar_t__ y; y = DUMMY_VAR__; @@ -32387,7 +32387,7 @@ class truncate_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -32402,7 +32402,7 @@ class truncate_model final : public model_base_crtp { m = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - m = in__.read(lp__); + m = in__.read(lp__); double y; y = std::numeric_limits::quiet_NaN(); @@ -32739,7 +32739,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp(lp__); + x = in__.read(lp__); { current_statement__ = 2; lp_accum__.add(normal_lpdf(x, 0, 1)); @@ -32764,7 +32764,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -32779,7 +32779,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - x = in__.read(lp__); + x = in__.read(lp__); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -33122,7 +33122,7 @@ class user_constrain_model final : public model_base_crtp std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index 4157271cca..777f7dd698 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -274,7 +274,7 @@ class simple_function_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; diff --git a/test/integration/good/code-gen/opencl/cpp.expected b/test/integration/good/code-gen/opencl/cpp.expected index 5ca557b4e6..84cc91bb7b 100644 --- a/test/integration/good/code-gen/opencl/cpp.expected +++ b/test/integration/good/code-gen/opencl/cpp.expected @@ -978,13 +978,13 @@ class distributions_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(lp__); std::vector p_real_array; p_real_array = std::vector(d_int, DUMMY_VAR__); current_statement__ = 2; assign(p_real_array, nil_index_list(), - in__.read, jacobian__>(lp__, d_int), + in__.read>(lp__, d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -992,29 +992,29 @@ class distributions_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int, d_int), "assigning variable p_matrix"); + in__.read>(lp__, d_int, + d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, DUMMY_VAR__); current_statement__ = 4; assign(p_vector, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int), "assigning variable p_vector"); + in__.read>(lp__, d_int), + "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, DUMMY_VAR__); current_statement__ = 5; assign(p_row_vector, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int), "assigning variable p_row_vector"); + in__.read>(lp__, d_int), + "assigning variable p_row_vector"); local_scalar_t__ y_p; y_p = DUMMY_VAR__; current_statement__ = 6; - y_p = in__.read(lp__); + y_p = in__.read(lp__); local_scalar_t__ transformed_param_real; transformed_param_real = DUMMY_VAR__; @@ -3511,7 +3511,7 @@ class distributions_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -3526,13 +3526,13 @@ class distributions_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(lp__); std::vector p_real_array; p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(p_real_array, nil_index_list(), - in__.read, jacobian__>(lp__, d_int), + in__.read>(lp__, d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -3540,29 +3540,29 @@ class distributions_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int, d_int), "assigning variable p_matrix"); + in__.read>(lp__, d_int, + d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(p_vector, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int), "assigning variable p_vector"); + in__.read>(lp__, d_int), + "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 5; assign(p_row_vector, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int), "assigning variable p_row_vector"); + in__.read>(lp__, d_int), + "assigning variable p_row_vector"); double y_p; y_p = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - y_p = in__.read(lp__); + y_p = in__.read(lp__); double transformed_param_real; transformed_param_real = std::numeric_limits::quiet_NaN(); @@ -6627,13 +6627,13 @@ class restricted_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(lp__); std::vector p_real_array; p_real_array = std::vector(d_int, DUMMY_VAR__); current_statement__ = 2; assign(p_real_array, nil_index_list(), - in__.read, jacobian__>(lp__, d_int), + in__.read>(lp__, d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -6641,29 +6641,29 @@ class restricted_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int, d_int), "assigning variable p_matrix"); + in__.read>(lp__, d_int, + d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, DUMMY_VAR__); current_statement__ = 4; assign(p_vector, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int), "assigning variable p_vector"); + in__.read>(lp__, d_int), + "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, DUMMY_VAR__); current_statement__ = 5; assign(p_row_vector, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int), "assigning variable p_row_vector"); + in__.read>(lp__, d_int), + "assigning variable p_row_vector"); local_scalar_t__ y_p; y_p = DUMMY_VAR__; current_statement__ = 6; - y_p = in__.read(lp__); + y_p = in__.read(lp__); local_scalar_t__ transformed_param_real; transformed_param_real = DUMMY_VAR__; @@ -6729,7 +6729,7 @@ class restricted_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -6744,13 +6744,13 @@ class restricted_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(lp__); std::vector p_real_array; p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(p_real_array, nil_index_list(), - in__.read, jacobian__>(lp__, d_int), + in__.read>(lp__, d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -6758,29 +6758,29 @@ class restricted_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int, d_int), "assigning variable p_matrix"); + in__.read>(lp__, d_int, + d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(p_vector, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int), "assigning variable p_vector"); + in__.read>(lp__, d_int), + "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 5; assign(p_row_vector, nil_index_list(), - in__.read, jacobian__>(lp__, - d_int), "assigning variable p_row_vector"); + in__.read>(lp__, d_int), + "assigning variable p_row_vector"); double y_p; y_p = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - y_p = in__.read(lp__); + y_p = in__.read(lp__); double transformed_param_real; transformed_param_real = std::numeric_limits::quiet_NaN(); diff --git a/test/integration/good/code-gen/profiling/cpp.expected b/test/integration/good/code-gen/profiling/cpp.expected index 8666454d9a..cf6f0a3e04 100644 --- a/test/integration/good/code-gen/profiling/cpp.expected +++ b/test/integration/good/code-gen/profiling/cpp.expected @@ -270,7 +270,7 @@ class simple_function_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 048737db8f..64f91da3b4 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -487,7 +487,7 @@ class ad_level_failing_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -2673,7 +2673,7 @@ class copy_fail_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -4275,67 +4275,67 @@ class dce_fail_model final : public model_base_crtp { b_0 = DUMMY_VAR__; current_statement__ = 7; - b_0 = in__.read(lp__); + b_0 = in__.read(lp__); local_scalar_t__ b_female; b_female = DUMMY_VAR__; current_statement__ = 8; - b_female = in__.read(lp__); + b_female = in__.read(lp__); local_scalar_t__ b_black; b_black = DUMMY_VAR__; current_statement__ = 9; - b_black = in__.read(lp__); + b_black = in__.read(lp__); local_scalar_t__ b_female_black; b_female_black = DUMMY_VAR__; current_statement__ = 10; - b_female_black = in__.read(lp__); + b_female_black = in__.read(lp__); local_scalar_t__ b_v_prev; b_v_prev = DUMMY_VAR__; current_statement__ = 11; - b_v_prev = in__.read(lp__); + b_v_prev = in__.read(lp__); Eigen::Matrix b_age; b_age = Eigen::Matrix(n_age); stan::math::fill(b_age, DUMMY_VAR__); current_statement__ = 12; assign(b_age, nil_index_list(), - in__.read, jacobian__>(lp__, - n_age), "assigning variable b_age"); + in__.read>(lp__, n_age), + "assigning variable b_age"); Eigen::Matrix b_edu; b_edu = Eigen::Matrix(n_edu); stan::math::fill(b_edu, DUMMY_VAR__); current_statement__ = 13; assign(b_edu, nil_index_list(), - in__.read, jacobian__>(lp__, - n_edu), "assigning variable b_edu"); + in__.read>(lp__, n_edu), + "assigning variable b_edu"); Eigen::Matrix b_region; b_region = Eigen::Matrix(n_region); stan::math::fill(b_region, DUMMY_VAR__); current_statement__ = 14; assign(b_region, nil_index_list(), - in__.read, jacobian__>(lp__, - n_region), "assigning variable b_region"); + in__.read>(lp__, n_region), + "assigning variable b_region"); Eigen::Matrix b_age_edu; b_age_edu = Eigen::Matrix(n_age, n_edu); stan::math::fill(b_age_edu, DUMMY_VAR__); current_statement__ = 15; assign(b_age_edu, nil_index_list(), - in__.read, jacobian__>(lp__, - n_age, n_edu), "assigning variable b_age_edu"); + in__.read>(lp__, n_age, + n_edu), "assigning variable b_age_edu"); Eigen::Matrix b_hat; b_hat = Eigen::Matrix(n_state); stan::math::fill(b_hat, DUMMY_VAR__); current_statement__ = 16; assign(b_hat, nil_index_list(), - in__.read, jacobian__>(lp__, - n_state), "assigning variable b_hat"); + in__.read>(lp__, n_state), + "assigning variable b_hat"); { current_statement__ = 17; validate_non_negative_index("p", "N", N); @@ -4558,7 +4558,7 @@ class dce_fail_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -4621,67 +4621,67 @@ class dce_fail_model final : public model_base_crtp { b_0 = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - b_0 = in__.read(lp__); + b_0 = in__.read(lp__); double b_female; b_female = std::numeric_limits::quiet_NaN(); current_statement__ = 8; - b_female = in__.read(lp__); + b_female = in__.read(lp__); double b_black; b_black = std::numeric_limits::quiet_NaN(); current_statement__ = 9; - b_black = in__.read(lp__); + b_black = in__.read(lp__); double b_female_black; b_female_black = std::numeric_limits::quiet_NaN(); current_statement__ = 10; - b_female_black = in__.read(lp__); + b_female_black = in__.read(lp__); double b_v_prev; b_v_prev = std::numeric_limits::quiet_NaN(); current_statement__ = 11; - b_v_prev = in__.read(lp__); + b_v_prev = in__.read(lp__); Eigen::Matrix b_age; b_age = Eigen::Matrix(n_age); stan::math::fill(b_age, std::numeric_limits::quiet_NaN()); current_statement__ = 12; assign(b_age, nil_index_list(), - in__.read, jacobian__>(lp__, - n_age), "assigning variable b_age"); + in__.read>(lp__, n_age), + "assigning variable b_age"); Eigen::Matrix b_edu; b_edu = Eigen::Matrix(n_edu); stan::math::fill(b_edu, std::numeric_limits::quiet_NaN()); current_statement__ = 13; assign(b_edu, nil_index_list(), - in__.read, jacobian__>(lp__, - n_edu), "assigning variable b_edu"); + in__.read>(lp__, n_edu), + "assigning variable b_edu"); Eigen::Matrix b_region; b_region = Eigen::Matrix(n_region); stan::math::fill(b_region, std::numeric_limits::quiet_NaN()); current_statement__ = 14; assign(b_region, nil_index_list(), - in__.read, jacobian__>(lp__, - n_region), "assigning variable b_region"); + in__.read>(lp__, n_region), + "assigning variable b_region"); Eigen::Matrix b_age_edu; b_age_edu = Eigen::Matrix(n_age, n_edu); stan::math::fill(b_age_edu, std::numeric_limits::quiet_NaN()); current_statement__ = 15; assign(b_age_edu, nil_index_list(), - in__.read, jacobian__>(lp__, - n_age, n_edu), "assigning variable b_age_edu"); + in__.read>(lp__, n_age, + n_edu), "assigning variable b_age_edu"); Eigen::Matrix b_hat; b_hat = Eigen::Matrix(n_state); stan::math::fill(b_hat, std::numeric_limits::quiet_NaN()); current_statement__ = 16; assign(b_hat, nil_index_list(), - in__.read, jacobian__>(lp__, - n_state), "assigning variable b_hat"); + in__.read>(lp__, n_state), + "assigning variable b_hat"); vars__.emplace_back(sigma); vars__.emplace_back(sigma_age); vars__.emplace_back(sigma_edu); @@ -5534,7 +5534,7 @@ class expr_prop_experiment_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -5878,7 +5878,7 @@ class expr_prop_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -6309,7 +6309,7 @@ class expr_prop_fail_model final : public model_base_crtp std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -6826,13 +6826,13 @@ class expr_prop_fail2_model final : public model_base_crtp(lp__); + mu = in__.read(lp__); std::vector theta; theta = std::vector(J, DUMMY_VAR__); current_statement__ = 2; assign(theta, nil_index_list(), - in__.read, jacobian__>(lp__, J), + in__.read>(lp__, J), "assigning variable theta"); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -6865,7 +6865,7 @@ class expr_prop_fail2_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -6885,13 +6885,13 @@ class expr_prop_fail2_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(lp__); std::vector theta; theta = std::vector(J, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(theta, nil_index_list(), - in__.read, jacobian__>(lp__, J), + in__.read>(lp__, J), "assigning variable theta"); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -7816,39 +7816,39 @@ class expr_prop_fail3_model final : public model_base_crtp, jacobian__>(lp__, - n_age), "assigning variable a"); + in__.read>(lp__, n_age), + "assigning variable a"); Eigen::Matrix b; b = Eigen::Matrix(n_edu); stan::math::fill(b, DUMMY_VAR__); current_statement__ = 2; assign(b, nil_index_list(), - in__.read, jacobian__>(lp__, - n_edu), "assigning variable b"); + in__.read>(lp__, n_edu), + "assigning variable b"); Eigen::Matrix c; c = Eigen::Matrix(n_age_edu); stan::math::fill(c, DUMMY_VAR__); current_statement__ = 3; assign(c, nil_index_list(), - in__.read, jacobian__>(lp__, - n_age_edu), "assigning variable c"); + in__.read>(lp__, n_age_edu), + "assigning variable c"); Eigen::Matrix d; d = Eigen::Matrix(n_state); stan::math::fill(d, DUMMY_VAR__); current_statement__ = 4; assign(d, nil_index_list(), - in__.read, jacobian__>(lp__, - n_state), "assigning variable d"); + in__.read>(lp__, n_state), + "assigning variable d"); Eigen::Matrix e; e = Eigen::Matrix(n_region_full); stan::math::fill(e, DUMMY_VAR__); current_statement__ = 5; assign(e, nil_index_list(), - in__.read, jacobian__>(lp__, + in__.read>(lp__, n_region_full), "assigning variable e"); Eigen::Matrix beta; beta = Eigen::Matrix(5); @@ -7856,8 +7856,8 @@ class expr_prop_fail3_model final : public model_base_crtp, jacobian__>(lp__, - 5), "assigning variable beta"); + in__.read>(lp__, 5), + "assigning variable beta"); local_scalar_t__ sigma_a; sigma_a = DUMMY_VAR__; @@ -8035,7 +8035,7 @@ class expr_prop_fail3_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -8076,39 +8076,39 @@ class expr_prop_fail3_model final : public model_base_crtp, jacobian__>(lp__, - n_age), "assigning variable a"); + in__.read>(lp__, n_age), + "assigning variable a"); Eigen::Matrix b; b = Eigen::Matrix(n_edu); stan::math::fill(b, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(b, nil_index_list(), - in__.read, jacobian__>(lp__, - n_edu), "assigning variable b"); + in__.read>(lp__, n_edu), + "assigning variable b"); Eigen::Matrix c; c = Eigen::Matrix(n_age_edu); stan::math::fill(c, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(c, nil_index_list(), - in__.read, jacobian__>(lp__, - n_age_edu), "assigning variable c"); + in__.read>(lp__, n_age_edu), + "assigning variable c"); Eigen::Matrix d; d = Eigen::Matrix(n_state); stan::math::fill(d, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(d, nil_index_list(), - in__.read, jacobian__>(lp__, - n_state), "assigning variable d"); + in__.read>(lp__, n_state), + "assigning variable d"); Eigen::Matrix e; e = Eigen::Matrix(n_region_full); stan::math::fill(e, std::numeric_limits::quiet_NaN()); current_statement__ = 5; assign(e, nil_index_list(), - in__.read, jacobian__>(lp__, + in__.read>(lp__, n_region_full), "assigning variable e"); Eigen::Matrix beta; beta = Eigen::Matrix(5); @@ -8116,8 +8116,8 @@ class expr_prop_fail3_model final : public model_base_crtp, jacobian__>(lp__, - 5), "assigning variable beta"); + in__.read>(lp__, 5), + "assigning variable beta"); double sigma_a; sigma_a = std::numeric_limits::quiet_NaN(); @@ -9268,8 +9268,8 @@ class expr_prop_fail4_model final : public model_base_crtp, jacobian__>(lp__, - lcm_sym39__), "assigning variable phi_std_raw"); + in__.read>(lp__, lcm_sym39__), + "assigning variable phi_std_raw"); local_scalar_t__ sigma_phi; sigma_phi = DUMMY_VAR__; @@ -9325,7 +9325,7 @@ class expr_prop_fail4_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -9371,8 +9371,8 @@ class expr_prop_fail4_model final : public model_base_crtp, jacobian__>(lp__, - lcm_sym20__), "assigning variable phi_std_raw"); + in__.read>(lp__, lcm_sym20__), + "assigning variable phi_std_raw"); double sigma_phi; sigma_phi = std::numeric_limits::quiet_NaN(); @@ -10819,8 +10819,8 @@ class expr_prop_fail5_model final : public model_base_crtp, jacobian__>(lp__, - nind), "assigning variable epsilon"); + in__.read>(lp__, nind), + "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -11439,7 +11439,7 @@ class expr_prop_fail5_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -11514,8 +11514,8 @@ class expr_prop_fail5_model final : public model_base_crtp, jacobian__>(lp__, - nind), "assigning variable epsilon"); + in__.read>(lp__, nind), + "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -14165,8 +14165,8 @@ class expr_prop_fail6_model final : public model_base_crtp, jacobian__>(lp__, - M), "assigning variable epsilon"); + in__.read>(lp__, M), + "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -15233,7 +15233,7 @@ class expr_prop_fail6_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -15363,8 +15363,8 @@ class expr_prop_fail6_model final : public model_base_crtp, jacobian__>(lp__, - M), "assigning variable epsilon"); + in__.read>(lp__, M), + "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -17583,7 +17583,7 @@ class expr_prop_fail7_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -18665,12 +18665,12 @@ class expr_prop_fail8_model final : public model_base_crtp(lp__); + beta0 = in__.read(lp__); local_scalar_t__ beta1; beta1 = DUMMY_VAR__; current_statement__ = 2; - beta1 = in__.read(lp__); + beta1 = in__.read(lp__); local_scalar_t__ tau_theta; tau_theta = DUMMY_VAR__; @@ -18687,16 +18687,16 @@ class expr_prop_fail8_model final : public model_base_crtp, jacobian__>(lp__, - N), "assigning variable theta_std"); + in__.read>(lp__, N), + "assigning variable theta_std"); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix(N); stan::math::fill(phi_std_raw, DUMMY_VAR__); current_statement__ = 6; assign(phi_std_raw, nil_index_list(), - in__.read, jacobian__>(lp__, - N), "assigning variable phi_std_raw"); + in__.read>(lp__, N), + "assigning variable phi_std_raw"); local_scalar_t__ sigma_phi; sigma_phi = DUMMY_VAR__; @@ -18743,7 +18743,7 @@ class expr_prop_fail8_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -18769,12 +18769,12 @@ class expr_prop_fail8_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - beta0 = in__.read(lp__); + beta0 = in__.read(lp__); double beta1; beta1 = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - beta1 = in__.read(lp__); + beta1 = in__.read(lp__); double tau_theta; tau_theta = std::numeric_limits::quiet_NaN(); @@ -18791,16 +18791,16 @@ class expr_prop_fail8_model final : public model_base_crtp, jacobian__>(lp__, - N), "assigning variable theta_std"); + in__.read>(lp__, N), + "assigning variable theta_std"); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix(N); stan::math::fill(phi_std_raw, std::numeric_limits::quiet_NaN()); current_statement__ = 6; assign(phi_std_raw, nil_index_list(), - in__.read, jacobian__>(lp__, - N), "assigning variable phi_std_raw"); + in__.read>(lp__, N), + "assigning variable phi_std_raw"); double sigma_phi; sigma_phi = std::numeric_limits::quiet_NaN(); @@ -20926,7 +20926,7 @@ class fails_test_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -23679,8 +23679,8 @@ class inlining_fail2_model final : public model_base_crtp lcm_sym297__ = (n_occasions - 1); assign(epsilon, nil_index_list(), - in__.read, jacobian__>(lp__, - lcm_sym297__), "assigning variable epsilon"); + in__.read>(lp__, lcm_sym297__), + "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -24694,7 +24694,7 @@ class inlining_fail2_model final : public model_base_crtp std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -24816,8 +24816,8 @@ class inlining_fail2_model final : public model_base_crtp lcm_sym198__ = (n_occasions - 1); assign(epsilon, nil_index_list(), - in__.read, jacobian__>(lp__, - lcm_sym198__), "assigning variable epsilon"); + in__.read>(lp__, lcm_sym198__), + "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -26372,7 +26372,7 @@ class lcm_experiment_model final : public model_base_crtp std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -26669,7 +26669,7 @@ class lcm_experiment2_model final : public model_base_crtp(lp__); + x = in__.read(lp__); { local_scalar_t__ y; y = DUMMY_VAR__; @@ -26706,7 +26706,7 @@ class lcm_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -26723,7 +26723,7 @@ class lcm_experiment2_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - x = in__.read(lp__); + x = in__.read(lp__); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -27037,7 +27037,7 @@ class lcm_fails_model final : public model_base_crtp { current_statement__ = 1; assign(theta, nil_index_list(), - in__.read, jacobian__>(lp__, J), + in__.read>(lp__, J), "assigning variable theta"); { current_statement__ = 2; @@ -27063,7 +27063,7 @@ class lcm_fails_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -27084,7 +27084,7 @@ class lcm_fails_model final : public model_base_crtp { current_statement__ = 1; assign(theta, nil_index_list(), - in__.read, jacobian__>(lp__, J), + in__.read>(lp__, J), "assigning variable theta"); if (logical_gte(J, 1)) { vars__.emplace_back( @@ -28827,7 +28827,7 @@ class lcm_fails2_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -29909,7 +29909,7 @@ class lupdf_inlining_model final : public model_base_crtp mu = DUMMY_VAR__; current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(lp__); local_scalar_t__ tp; tp = DUMMY_VAR__; @@ -29971,7 +29971,7 @@ class lupdf_inlining_model final : public model_base_crtp std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -29991,7 +29991,7 @@ class lupdf_inlining_model final : public model_base_crtp mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(lp__); double tp; tp = std::numeric_limits::quiet_NaN(); @@ -30703,22 +30703,22 @@ class off_dce_model final : public model_base_crtp { alpha_occ = DUMMY_VAR__; current_statement__ = 1; - alpha_occ = in__.read(lp__); + alpha_occ = in__.read(lp__); local_scalar_t__ beta_occ; beta_occ = DUMMY_VAR__; current_statement__ = 2; - beta_occ = in__.read(lp__); + beta_occ = in__.read(lp__); local_scalar_t__ alpha_p; alpha_p = DUMMY_VAR__; current_statement__ = 3; - alpha_p = in__.read(lp__); + alpha_p = in__.read(lp__); local_scalar_t__ beta_p; beta_p = DUMMY_VAR__; current_statement__ = 4; - beta_p = in__.read(lp__); + beta_p = in__.read(lp__); Eigen::Matrix logit_psi; logit_psi = Eigen::Matrix(R); stan::math::fill(logit_psi, DUMMY_VAR__); @@ -30824,7 +30824,7 @@ class off_dce_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -30867,22 +30867,22 @@ class off_dce_model final : public model_base_crtp { alpha_occ = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - alpha_occ = in__.read(lp__); + alpha_occ = in__.read(lp__); double beta_occ; beta_occ = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - beta_occ = in__.read(lp__); + beta_occ = in__.read(lp__); double alpha_p; alpha_p = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - alpha_p = in__.read(lp__); + alpha_p = in__.read(lp__); double beta_p; beta_p = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - beta_p = in__.read(lp__); + beta_p = in__.read(lp__); Eigen::Matrix logit_psi; logit_psi = Eigen::Matrix(R); stan::math::fill(logit_psi, std::numeric_limits::quiet_NaN()); @@ -31675,33 +31675,33 @@ class off_small_model final : public model_base_crtp { beta = DUMMY_VAR__; current_statement__ = 1; - beta = in__.read(lp__); + beta = in__.read(lp__); Eigen::Matrix eta1; eta1 = Eigen::Matrix(J); stan::math::fill(eta1, DUMMY_VAR__); current_statement__ = 2; assign(eta1, nil_index_list(), - in__.read, jacobian__>(lp__, - J), "assigning variable eta1"); + in__.read>(lp__, J), + "assigning variable eta1"); Eigen::Matrix eta2; eta2 = Eigen::Matrix(J); stan::math::fill(eta2, DUMMY_VAR__); current_statement__ = 3; assign(eta2, nil_index_list(), - in__.read, jacobian__>(lp__, - J), "assigning variable eta2"); + in__.read>(lp__, J), + "assigning variable eta2"); local_scalar_t__ mu_a1; mu_a1 = DUMMY_VAR__; current_statement__ = 4; - mu_a1 = in__.read(lp__); + mu_a1 = in__.read(lp__); local_scalar_t__ mu_a2; mu_a2 = DUMMY_VAR__; current_statement__ = 5; - mu_a2 = in__.read(lp__); + mu_a2 = in__.read(lp__); local_scalar_t__ sigma_a1; sigma_a1 = DUMMY_VAR__; @@ -31817,7 +31817,7 @@ class off_small_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -31850,33 +31850,33 @@ class off_small_model final : public model_base_crtp { beta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - beta = in__.read(lp__); + beta = in__.read(lp__); Eigen::Matrix eta1; eta1 = Eigen::Matrix(J); stan::math::fill(eta1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(eta1, nil_index_list(), - in__.read, jacobian__>(lp__, - J), "assigning variable eta1"); + in__.read>(lp__, J), + "assigning variable eta1"); Eigen::Matrix eta2; eta2 = Eigen::Matrix(J); stan::math::fill(eta2, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(eta2, nil_index_list(), - in__.read, jacobian__>(lp__, - J), "assigning variable eta2"); + in__.read>(lp__, J), + "assigning variable eta2"); double mu_a1; mu_a1 = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - mu_a1 = in__.read(lp__); + mu_a1 = in__.read(lp__); double mu_a2; mu_a2 = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - mu_a2 = in__.read(lp__); + mu_a2 = in__.read(lp__); double sigma_a1; sigma_a1 = std::numeric_limits::quiet_NaN(); @@ -32696,28 +32696,28 @@ class optimizations_model final : public model_base_crtp { theta = DUMMY_VAR__; current_statement__ = 1; - theta = in__.read(lp__); + theta = in__.read(lp__); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 2; - phi = in__.read(lp__); + phi = in__.read(lp__); Eigen::Matrix x_matrix; x_matrix = Eigen::Matrix(3, 2); stan::math::fill(x_matrix, DUMMY_VAR__); current_statement__ = 3; assign(x_matrix, nil_index_list(), - in__.read, jacobian__>(lp__, - 3, 2), "assigning variable x_matrix"); + in__.read>(lp__, 3, 2), + "assigning variable x_matrix"); Eigen::Matrix x_vector; x_vector = Eigen::Matrix(2); stan::math::fill(x_vector, DUMMY_VAR__); current_statement__ = 4; assign(x_vector, nil_index_list(), - in__.read, jacobian__>(lp__, - 2), "assigning variable x_vector"); + in__.read>(lp__, 2), + "assigning variable x_vector"); Eigen::Matrix x_cov; x_cov = Eigen::Matrix(2, 2); stan::math::fill(x_cov, DUMMY_VAR__); @@ -33240,7 +33240,7 @@ class optimizations_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -33267,28 +33267,28 @@ class optimizations_model final : public model_base_crtp { theta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - theta = in__.read(lp__); + theta = in__.read(lp__); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - phi = in__.read(lp__); + phi = in__.read(lp__); Eigen::Matrix x_matrix; x_matrix = Eigen::Matrix(3, 2); stan::math::fill(x_matrix, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(x_matrix, nil_index_list(), - in__.read, jacobian__>(lp__, - 3, 2), "assigning variable x_matrix"); + in__.read>(lp__, 3, 2), + "assigning variable x_matrix"); Eigen::Matrix x_vector; x_vector = Eigen::Matrix(2); stan::math::fill(x_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(x_vector, nil_index_list(), - in__.read, jacobian__>(lp__, - 2), "assigning variable x_vector"); + in__.read>(lp__, 2), + "assigning variable x_vector"); Eigen::Matrix x_cov; x_cov = Eigen::Matrix(2, 2); stan::math::fill(x_cov, std::numeric_limits::quiet_NaN()); @@ -34205,21 +34205,21 @@ class partial_eval_model final : public model_base_crtp { current_statement__ = 1; assign(a, nil_index_list(), - in__.read, jacobian__>(lp__, - n_pair), "assigning variable a"); + in__.read>(lp__, n_pair), + "assigning variable a"); Eigen::Matrix beta; beta = Eigen::Matrix(2); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; assign(beta, nil_index_list(), - in__.read, jacobian__>(lp__, - 2), "assigning variable beta"); + in__.read>(lp__, 2), + "assigning variable beta"); local_scalar_t__ mu_a; mu_a = DUMMY_VAR__; current_statement__ = 3; - mu_a = in__.read(lp__); + mu_a = in__.read(lp__); local_scalar_t__ sigma_a; sigma_a = DUMMY_VAR__; @@ -34301,7 +34301,7 @@ class partial_eval_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -34330,21 +34330,21 @@ class partial_eval_model final : public model_base_crtp { current_statement__ = 1; assign(a, nil_index_list(), - in__.read, jacobian__>(lp__, - n_pair), "assigning variable a"); + in__.read>(lp__, n_pair), + "assigning variable a"); Eigen::Matrix beta; beta = Eigen::Matrix(2); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(beta, nil_index_list(), - in__.read, jacobian__>(lp__, - 2), "assigning variable beta"); + in__.read>(lp__, 2), + "assigning variable beta"); double mu_a; mu_a = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - mu_a = in__.read(lp__); + mu_a = in__.read(lp__); double sigma_a; sigma_a = std::numeric_limits::quiet_NaN(); @@ -35057,22 +35057,22 @@ class stalled1_failure_model final : public model_base_crtp(lp__); + alpha0 = in__.read(lp__); local_scalar_t__ alpha1; alpha1 = DUMMY_VAR__; current_statement__ = 2; - alpha1 = in__.read(lp__); + alpha1 = in__.read(lp__); local_scalar_t__ alpha2; alpha2 = DUMMY_VAR__; current_statement__ = 3; - alpha2 = in__.read(lp__); + alpha2 = in__.read(lp__); local_scalar_t__ alpha12; alpha12 = DUMMY_VAR__; current_statement__ = 4; - alpha12 = in__.read(lp__); + alpha12 = in__.read(lp__); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -35084,8 +35084,8 @@ class stalled1_failure_model final : public model_base_crtp>, jacobian__>( - lp__, I, 8), "assigning variable b"); + in__.read>>(lp__, + I, 8), "assigning variable b"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -35171,7 +35171,7 @@ class stalled1_failure_model final : public model_base_crtp in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; @@ -35194,22 +35194,22 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - alpha0 = in__.read(lp__); + alpha0 = in__.read(lp__); double alpha1; alpha1 = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - alpha1 = in__.read(lp__); + alpha1 = in__.read(lp__); double alpha2; alpha2 = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - alpha2 = in__.read(lp__); + alpha2 = in__.read(lp__); double alpha12; alpha12 = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - alpha12 = in__.read(lp__); + alpha12 = in__.read(lp__); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -35221,8 +35221,8 @@ class stalled1_failure_model final : public model_base_crtp>, jacobian__>( - lp__, I, 8), "assigning variable b"); + in__.read>>(lp__, + I, 8), "assigning variable b"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -36017,7 +36017,7 @@ class unroll_limit_model final : public model_base_crtp { std::ostream* pstream__ = nullptr) const { using local_scalar_t__ = double; vars__.resize(0); - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning int current_statement__ = 0; diff --git a/test/unit/Ast_to_Mir_tests.ml b/test/unit/Ast_to_Mir_tests.ml index d21656058b..f9594a6b2a 100644 --- a/test/unit/Ast_to_Mir_tests.ml +++ b/test/unit/Ast_to_Mir_tests.ml @@ -105,101 +105,6 @@ let%expect_test "read param" = (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 10)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 20)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (mat (UArray UMatrix) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var mat)) - (meta - ((type_ (UArray UMatrix)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) (meta ))) |}] let%expect_test "gen quant" = diff --git a/test/unit/Pedantic_analysis.ml b/test/unit/Pedantic_analysis.ml index 0c875838d0..c73f74248d 100644 --- a/test/unit/Pedantic_analysis.ml +++ b/test/unit/Pedantic_analysis.ml @@ -617,8 +617,7 @@ model { let%expect_test "Function body parameter-dependent control flow" = print_warn_pedantic (build_program fundef_cf_example) ; - [%expect - {| + [%expect {| Warning: The parameter sigma has no priors. |}] From 03e789e633ae71da0a97a76b6922e0b56a671248 Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Fri, 12 Mar 2021 16:30:02 -0500 Subject: [PATCH 05/31] Don't include lp__ in unconstrainted reads --- src/stan_math_backend/Expression_gen.ml | 22 +- test/integration/good/code-gen/cl.expected | 32 +- test/integration/good/code-gen/cpp.expected | 334 +++++++++--------- .../good/code-gen/opencl/cpp.expected | 56 +-- .../good/compiler-optimizations/cpp.expected | 212 +++++------ 5 files changed, 320 insertions(+), 336 deletions(-) diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index 42b776f29b..8614001545 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -422,16 +422,18 @@ and pp_compiler_internal_fn ad ut f ppf es = :: {Expr.Fixed.pattern= Lit (Int, n_constraint_args_str); _} :: args -> let n_constraint_args = int_of_string n_constraint_args_str in let constraint_args, dims = List.split_n args n_constraint_args in - let lp_expr = Expr.Fixed.{pattern= Var "lp__"; meta= emeta} in - let arg_exprs = constraint_args @ [lp_expr] @ dims in - let maybe_constraint, maybe_jacobian = - if String.is_empty constraint_string then ("", "") - else ("_" ^ constraint_string, ", jacobian__") - in - pf ppf "@[in__.read%s<%a%s>(@,%a)@]" maybe_constraint - pp_unsizedtype_local - (UnsizedType.AutoDiffable, ut) - maybe_jacobian (list ~sep:comma pp_expr) arg_exprs + if String.is_empty constraint_string then + let arg_exprs = constraint_args @ dims in + pf ppf "@[in__.read<%a>(@,%a)@]" pp_unsizedtype_local + (UnsizedType.AutoDiffable, ut) + (list ~sep:comma pp_expr) arg_exprs + else + let lp_expr = Expr.Fixed.{pattern= Var "lp__"; meta= emeta} in + let arg_exprs = constraint_args @ lp_expr @ dims in + pf ppf "@[in__.read_%s<%a, jacobian__>(@,%a)@]" + constraint_string pp_unsizedtype_local + (UnsizedType.AutoDiffable, ut) + (list ~sep:comma pp_expr) arg_exprs | _ -> raise_s [%message "emit ReadParam with " (es : Expr.Typed.t list)] ) | _ -> gen_fun_app ppf f es diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index edee729a2c..b5d8b3c596 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -580,7 +580,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 1; assign(alpha_v, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); @@ -588,7 +588,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 2; assign(beta, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); @@ -596,7 +596,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 3; assign(cuts, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable cuts"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -607,19 +607,19 @@ class optimize_glm_model final : public model_base_crtp { alpha = DUMMY_VAR__; current_statement__ = 5; - alpha = in__.read(lp__); + alpha = in__.read(); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 6; - phi = in__.read(lp__); + phi = in__.read(); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, DUMMY_VAR__); current_statement__ = 7; assign(X_p, nil_index_list(), - in__.read>(lp__, n, k), + in__.read>(n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); @@ -627,7 +627,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 8; assign(beta_m, nil_index_list(), - in__.read>(lp__, n, k), + in__.read>(n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); @@ -635,7 +635,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 9; assign(X_rv_p, nil_index_list(), - in__.read>(lp__, n), + in__.read>(n), "assigning variable X_rv_p"); { current_statement__ = 10; @@ -1309,7 +1309,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 1; assign(alpha_v, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); @@ -1317,7 +1317,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 2; assign(beta, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); @@ -1325,7 +1325,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 3; assign(cuts, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable cuts"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -1336,19 +1336,19 @@ class optimize_glm_model final : public model_base_crtp { alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - alpha = in__.read(lp__); + alpha = in__.read(); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - phi = in__.read(lp__); + phi = in__.read(); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, std::numeric_limits::quiet_NaN()); current_statement__ = 7; assign(X_p, nil_index_list(), - in__.read>(lp__, n, k), + in__.read>(n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); @@ -1356,7 +1356,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 8; assign(beta_m, nil_index_list(), - in__.read>(lp__, n, k), + in__.read>(n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); @@ -1364,7 +1364,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 9; assign(X_rv_p, nil_index_list(), - in__.read>(lp__, n), + in__.read>(n), "assigning variable X_rv_p"); for (int sym1__ = 1; sym1__ <= k; ++sym1__) { vars__.emplace_back(alpha_v[(sym1__ - 1)]);} diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index a52c47ae7d..36cacf7900 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -152,7 +152,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> mu = DUMMY_VAR__; current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -164,7 +164,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> current_statement__ = 3; assign(theta_tilde, nil_index_list(), - in__.read>(lp__, J), + in__.read>(J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); @@ -218,7 +218,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -230,7 +230,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> current_statement__ = 3; assign(theta_tilde, nil_index_list(), - in__.read>(lp__, J), + in__.read>(J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); @@ -595,7 +595,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb bar = DUMMY_VAR__; current_statement__ = 1; - bar = in__.read(lp__); + bar = in__.read(); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); // Next line prevents compiler griping about no return @@ -631,7 +631,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb bar = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - bar = in__.read(lp__); + bar = in__.read(); vars__.emplace_back(bar); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -974,7 +974,7 @@ class eight_schools_ncp_model final : public model_base_crtp(lp__); + mu = in__.read(); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -986,7 +986,7 @@ class eight_schools_ncp_model final : public model_base_crtp>(lp__, J), + in__.read>(J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); @@ -1040,7 +1040,7 @@ class eight_schools_ncp_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -1052,7 +1052,7 @@ class eight_schools_ncp_model final : public model_base_crtp>(lp__, J), + in__.read>(J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); @@ -1418,8 +1418,7 @@ class mixed_type_arrays_model final : public model_base_crtp>(lp__, 3), - "assigning variable xx"); + in__.read>(3), "assigning variable xx"); std::vector> y; y = std::vector>(3, std::vector(3, DUMMY_VAR__)); @@ -1485,8 +1484,7 @@ class mixed_type_arrays_model final : public model_base_crtp>(lp__, 3), - "assigning variable xx"); + in__.read>(3), "assigning variable xx"); std::vector> y; y = std::vector>(3, std::vector(3, std::numeric_limits::quiet_NaN())); @@ -6893,7 +6891,7 @@ class mother_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(); local_scalar_t__ p_upper; p_upper = DUMMY_VAR__; @@ -6953,8 +6951,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 10; assign(p_1d_vec, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable p_1d_vec"); + in__.read>>(N, N), + "assigning variable p_1d_vec"); std::vector>>> p_3d_vec; p_3d_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_vec, DUMMY_VAR__); @@ -6962,14 +6960,14 @@ class mother_model final : public model_base_crtp { current_statement__ = 11; assign(p_3d_vec, nil_index_list(), in__.read>>>>( - lp__, N, M, K, N), "assigning variable p_3d_vec"); + N, M, K, N), "assigning variable p_3d_vec"); Eigen::Matrix p_row_vec; p_row_vec = Eigen::Matrix(N); stan::math::fill(p_row_vec, DUMMY_VAR__); current_statement__ = 12; assign(p_row_vec, nil_index_list(), - in__.read>(lp__, N), + in__.read>(N), "assigning variable p_row_vec"); std::vector> p_1d_row_vec; p_1d_row_vec = std::vector>(N, Eigen::Matrix(N)); @@ -6977,8 +6975,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 13; assign(p_1d_row_vec, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable p_1d_row_vec"); + in__.read>>(N, N), + "assigning variable p_1d_row_vec"); std::vector>>> p_3d_row_vec; p_3d_row_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_row_vec, DUMMY_VAR__); @@ -6986,7 +6984,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 14; assign(p_3d_row_vec, nil_index_list(), in__.read>>>>( - lp__, N, M, K, N), "assigning variable p_3d_row_vec"); + N, M, K, N), "assigning variable p_3d_row_vec"); std::vector>> p_ar_mat; p_ar_mat = std::vector>>(4, std::vector>(5, Eigen::Matrix(2, 3))); stan::math::fill(p_ar_mat, DUMMY_VAR__); @@ -7049,7 +7047,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 22; assign(x_p, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable x_p"); Eigen::Matrix y_p; y_p = Eigen::Matrix(2); @@ -7057,7 +7055,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 23; assign(y_p, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable y_p"); std::vector tp_real_1d_ar; tp_real_1d_ar = std::vector(N, DUMMY_VAR__); @@ -7494,7 +7492,7 @@ class mother_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(); double p_upper; p_upper = std::numeric_limits::quiet_NaN(); @@ -7554,8 +7552,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 10; assign(p_1d_vec, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable p_1d_vec"); + in__.read>>(N, N), + "assigning variable p_1d_vec"); std::vector>>> p_3d_vec; p_3d_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_vec, std::numeric_limits::quiet_NaN()); @@ -7563,14 +7561,14 @@ class mother_model final : public model_base_crtp { current_statement__ = 11; assign(p_3d_vec, nil_index_list(), in__.read>>>>( - lp__, N, M, K, N), "assigning variable p_3d_vec"); + N, M, K, N), "assigning variable p_3d_vec"); Eigen::Matrix p_row_vec; p_row_vec = Eigen::Matrix(N); stan::math::fill(p_row_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 12; assign(p_row_vec, nil_index_list(), - in__.read>(lp__, N), + in__.read>(N), "assigning variable p_row_vec"); std::vector> p_1d_row_vec; p_1d_row_vec = std::vector>(N, Eigen::Matrix(N)); @@ -7578,8 +7576,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 13; assign(p_1d_row_vec, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable p_1d_row_vec"); + in__.read>>(N, N), + "assigning variable p_1d_row_vec"); std::vector>>> p_3d_row_vec; p_3d_row_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_row_vec, std::numeric_limits::quiet_NaN()); @@ -7587,7 +7585,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 14; assign(p_3d_row_vec, nil_index_list(), in__.read>>>>( - lp__, N, M, K, N), "assigning variable p_3d_row_vec"); + N, M, K, N), "assigning variable p_3d_row_vec"); std::vector>> p_ar_mat; p_ar_mat = std::vector>>(4, std::vector>(5, Eigen::Matrix(2, 3))); stan::math::fill(p_ar_mat, std::numeric_limits::quiet_NaN()); @@ -7650,7 +7648,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 22; assign(x_p, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable x_p"); Eigen::Matrix y_p; y_p = Eigen::Matrix(2); @@ -7658,7 +7656,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 23; assign(y_p, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable y_p"); std::vector tp_real_1d_ar; tp_real_1d_ar = std::vector(N, std::numeric_limits::quiet_NaN()); @@ -11461,29 +11459,28 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 1; assign(y0_p, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable y0_p"); std::vector theta_p; theta_p = std::vector(1, DUMMY_VAR__); current_statement__ = 2; assign(theta_p, nil_index_list(), - in__.read>(lp__, 1), + in__.read>(1), "assigning variable theta_p"); std::vector x_p; x_p = std::vector(1, DUMMY_VAR__); current_statement__ = 3; assign(x_p, nil_index_list(), - in__.read>(lp__, 1), - "assigning variable x_p"); + in__.read>(1), "assigning variable x_p"); Eigen::Matrix x_p_v; x_p_v = Eigen::Matrix(2); stan::math::fill(x_p_v, DUMMY_VAR__); current_statement__ = 4; assign(x_p_v, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable x_p_v"); Eigen::Matrix shared_params_p; shared_params_p = Eigen::Matrix(3); @@ -11491,7 +11488,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 5; assign(shared_params_p, nil_index_list(), - in__.read>(lp__, 3), + in__.read>(3), "assigning variable shared_params_p"); std::vector> job_params_p; job_params_p = std::vector>(3, Eigen::Matrix(3)); @@ -11499,13 +11496,13 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 6; assign(job_params_p, nil_index_list(), - in__.read>>(lp__, - 3, 3), "assigning variable job_params_p"); + in__.read>>(3, 3), + "assigning variable job_params_p"); local_scalar_t__ x_r; x_r = DUMMY_VAR__; current_statement__ = 7; - x_r = in__.read(lp__); + x_r = in__.read(); local_scalar_t__ abc1_p; abc1_p = DUMMY_VAR__; @@ -11809,29 +11806,28 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 1; assign(y0_p, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable y0_p"); std::vector theta_p; theta_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(theta_p, nil_index_list(), - in__.read>(lp__, 1), + in__.read>(1), "assigning variable theta_p"); std::vector x_p; x_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(x_p, nil_index_list(), - in__.read>(lp__, 1), - "assigning variable x_p"); + in__.read>(1), "assigning variable x_p"); Eigen::Matrix x_p_v; x_p_v = Eigen::Matrix(2); stan::math::fill(x_p_v, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(x_p_v, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable x_p_v"); Eigen::Matrix shared_params_p; shared_params_p = Eigen::Matrix(3); @@ -11839,7 +11835,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 5; assign(shared_params_p, nil_index_list(), - in__.read>(lp__, 3), + in__.read>(3), "assigning variable shared_params_p"); std::vector> job_params_p; job_params_p = std::vector>(3, Eigen::Matrix(3)); @@ -11847,13 +11843,13 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 6; assign(job_params_p, nil_index_list(), - in__.read>>(lp__, - 3, 3), "assigning variable job_params_p"); + in__.read>>(3, 3), + "assigning variable job_params_p"); double x_r; x_r = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - x_r = in__.read(lp__); + x_r = in__.read(); double abc1_p; abc1_p = std::numeric_limits::quiet_NaN(); @@ -13752,21 +13748,20 @@ class new_integrate_interface_model final : public model_base_crtp(lp__); + r = in__.read(); std::vector ra; ra = std::vector(N, DUMMY_VAR__); current_statement__ = 2; assign(ra, nil_index_list(), - in__.read>(lp__, N), - "assigning variable ra"); + in__.read>(N), "assigning variable ra"); Eigen::Matrix v; v = Eigen::Matrix(N); stan::math::fill(v, DUMMY_VAR__); current_statement__ = 3; assign(v, nil_index_list(), - in__.read>(lp__, N), + in__.read>(N), "assigning variable v"); std::vector> z; z = std::vector>(N, Eigen::Matrix(N)); @@ -15403,21 +15398,20 @@ class new_integrate_interface_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - r = in__.read(lp__); + r = in__.read(); std::vector ra; ra = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(ra, nil_index_list(), - in__.read>(lp__, N), - "assigning variable ra"); + in__.read>(N), "assigning variable ra"); Eigen::Matrix v; v = Eigen::Matrix(N); stan::math::fill(v, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(v, nil_index_list(), - in__.read>(lp__, N), + in__.read>(N), "assigning variable v"); std::vector> z; z = std::vector>(N, Eigen::Matrix(N)); @@ -18613,7 +18607,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 1; assign(alpha_v, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); @@ -18621,7 +18615,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 2; assign(beta, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); @@ -18629,7 +18623,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 3; assign(cuts, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable cuts"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -18640,19 +18634,19 @@ class optimize_glm_model final : public model_base_crtp { alpha = DUMMY_VAR__; current_statement__ = 5; - alpha = in__.read(lp__); + alpha = in__.read(); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 6; - phi = in__.read(lp__); + phi = in__.read(); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, DUMMY_VAR__); current_statement__ = 7; assign(X_p, nil_index_list(), - in__.read>(lp__, n, k), + in__.read>(n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); @@ -18660,7 +18654,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 8; assign(beta_m, nil_index_list(), - in__.read>(lp__, n, k), + in__.read>(n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); @@ -18668,7 +18662,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 9; assign(X_rv_p, nil_index_list(), - in__.read>(lp__, n), + in__.read>(n), "assigning variable X_rv_p"); { current_statement__ = 10; @@ -19247,7 +19241,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 1; assign(alpha_v, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); @@ -19255,7 +19249,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 2; assign(beta, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); @@ -19263,7 +19257,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 3; assign(cuts, nil_index_list(), - in__.read>(lp__, k), + in__.read>(k), "assigning variable cuts"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -19274,19 +19268,19 @@ class optimize_glm_model final : public model_base_crtp { alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - alpha = in__.read(lp__); + alpha = in__.read(); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - phi = in__.read(lp__); + phi = in__.read(); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, std::numeric_limits::quiet_NaN()); current_statement__ = 7; assign(X_p, nil_index_list(), - in__.read>(lp__, n, k), + in__.read>(n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); @@ -19294,7 +19288,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 8; assign(beta_m, nil_index_list(), - in__.read>(lp__, n, k), + in__.read>(n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); @@ -19302,7 +19296,7 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 9; assign(X_rv_p, nil_index_list(), - in__.read>(lp__, n), + in__.read>(n), "assigning variable X_rv_p"); for (int sym1__ = 1; sym1__ <= k; ++sym1__) { vars__.emplace_back(alpha_v[(sym1__ - 1)]);} @@ -20527,22 +20521,19 @@ class reduce_sum_m1_model final : public model_base_crtp { current_statement__ = 1; assign(y1, nil_index_list(), - in__.read>(lp__, N), - "assigning variable y1"); + in__.read>(N), "assigning variable y1"); std::vector y2; y2 = std::vector(N, DUMMY_VAR__); current_statement__ = 2; assign(y2, nil_index_list(), - in__.read>(lp__, N), - "assigning variable y2"); + in__.read>(N), "assigning variable y2"); std::vector y3; y3 = std::vector(N, DUMMY_VAR__); current_statement__ = 3; assign(y3, nil_index_list(), - in__.read>(lp__, N), - "assigning variable y3"); + in__.read>(N), "assigning variable y3"); { current_statement__ = 4; lp_accum__.add(reduce_sum(y1, 1, pstream__)); @@ -20591,22 +20582,19 @@ class reduce_sum_m1_model final : public model_base_crtp { current_statement__ = 1; assign(y1, nil_index_list(), - in__.read>(lp__, N), - "assigning variable y1"); + in__.read>(N), "assigning variable y1"); std::vector y2; y2 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(y2, nil_index_list(), - in__.read>(lp__, N), - "assigning variable y2"); + in__.read>(N), "assigning variable y2"); std::vector y3; y3 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(y3, nil_index_list(), - in__.read>(lp__, N), - "assigning variable y3"); + in__.read>(N), "assigning variable y3"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { vars__.emplace_back(y1[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= N; ++sym1__) { @@ -22191,7 +22179,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 1; assign(a8, nil_index_list(), in__.read>>>( - lp__, N, N, N, N), "assigning variable a8"); + N, N, N, N), "assigning variable a8"); std::vector>> a7; a7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a7, DUMMY_VAR__); @@ -22199,7 +22187,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 2; assign(a7, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable a7"); + N, N, N), "assigning variable a7"); std::vector>> a6; a6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a6, DUMMY_VAR__); @@ -22207,13 +22195,13 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 3; assign(a6, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable a6"); + N, N, N), "assigning variable a6"); std::vector> a5; a5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 4; assign(a5, nil_index_list(), - in__.read>>(lp__, N, N), + in__.read>>(N, N), "assigning variable a5"); std::vector> a4; a4 = std::vector>(N, Eigen::Matrix(N, N)); @@ -22221,31 +22209,30 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 5; assign(a4, nil_index_list(), - in__.read>>(lp__, - N, N, N), "assigning variable a4"); + in__.read>>(N, N, + N), "assigning variable a4"); std::vector> a3; a3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a3, DUMMY_VAR__); current_statement__ = 6; assign(a3, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable a3"); + in__.read>>(N, N), + "assigning variable a3"); std::vector> a2; a2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a2, DUMMY_VAR__); current_statement__ = 7; assign(a2, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable a2"); + in__.read>>(N, N), + "assigning variable a2"); std::vector a1; a1 = std::vector(N, DUMMY_VAR__); current_statement__ = 8; assign(a1, nil_index_list(), - in__.read>(lp__, N), - "assigning variable a1"); + in__.read>(N), "assigning variable a1"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, DUMMY_VAR__); @@ -22253,7 +22240,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 9; assign(y8, nil_index_list(), in__.read>>>( - lp__, N, N, N, N), "assigning variable y8"); + N, N, N, N), "assigning variable y8"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, DUMMY_VAR__); @@ -22261,7 +22248,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 10; assign(y7, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable y7"); + N, N, N), "assigning variable y7"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, DUMMY_VAR__); @@ -22269,13 +22256,13 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 11; assign(y6, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable y6"); + N, N, N), "assigning variable y6"); std::vector> y5; y5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 12; assign(y5, nil_index_list(), - in__.read>>(lp__, N, N), + in__.read>>(N, N), "assigning variable y5"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); @@ -22283,31 +22270,30 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 13; assign(y4, nil_index_list(), - in__.read>>(lp__, - N, N, N), "assigning variable y4"); + in__.read>>(N, N, + N), "assigning variable y4"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, DUMMY_VAR__); current_statement__ = 14; assign(y3, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable y3"); + in__.read>>(N, N), + "assigning variable y3"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, DUMMY_VAR__); current_statement__ = 15; assign(y2, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable y2"); + in__.read>>(N, N), + "assigning variable y2"); std::vector y1; y1 = std::vector(N, DUMMY_VAR__); current_statement__ = 16; assign(y1, nil_index_list(), - in__.read>(lp__, N), - "assigning variable y1"); + in__.read>(N), "assigning variable y1"); { current_statement__ = 17; lp_accum__.add(reduce_sum(x, 1, pstream__, a8)); @@ -22380,7 +22366,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 1; assign(a8, nil_index_list(), in__.read>>>( - lp__, N, N, N, N), "assigning variable a8"); + N, N, N, N), "assigning variable a8"); std::vector>> a7; a7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a7, std::numeric_limits::quiet_NaN()); @@ -22388,7 +22374,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 2; assign(a7, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable a7"); + N, N, N), "assigning variable a7"); std::vector>> a6; a6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a6, std::numeric_limits::quiet_NaN()); @@ -22396,13 +22382,13 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 3; assign(a6, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable a6"); + N, N, N), "assigning variable a6"); std::vector> a5; a5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 4; assign(a5, nil_index_list(), - in__.read>>(lp__, N, N), + in__.read>>(N, N), "assigning variable a5"); std::vector> a4; a4 = std::vector>(N, Eigen::Matrix(N, N)); @@ -22410,31 +22396,30 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 5; assign(a4, nil_index_list(), - in__.read>>(lp__, - N, N, N), "assigning variable a4"); + in__.read>>(N, N, + N), "assigning variable a4"); std::vector> a3; a3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a3, std::numeric_limits::quiet_NaN()); current_statement__ = 6; assign(a3, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable a3"); + in__.read>>(N, N), + "assigning variable a3"); std::vector> a2; a2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a2, std::numeric_limits::quiet_NaN()); current_statement__ = 7; assign(a2, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable a2"); + in__.read>>(N, N), + "assigning variable a2"); std::vector a1; a1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 8; assign(a1, nil_index_list(), - in__.read>(lp__, N), - "assigning variable a1"); + in__.read>(N), "assigning variable a1"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, std::numeric_limits::quiet_NaN()); @@ -22442,7 +22427,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 9; assign(y8, nil_index_list(), in__.read>>>( - lp__, N, N, N, N), "assigning variable y8"); + N, N, N, N), "assigning variable y8"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, std::numeric_limits::quiet_NaN()); @@ -22450,7 +22435,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 10; assign(y7, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable y7"); + N, N, N), "assigning variable y7"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, std::numeric_limits::quiet_NaN()); @@ -22458,13 +22443,13 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 11; assign(y6, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable y6"); + N, N, N), "assigning variable y6"); std::vector> y5; y5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 12; assign(y5, nil_index_list(), - in__.read>>(lp__, N, N), + in__.read>>(N, N), "assigning variable y5"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); @@ -22472,31 +22457,30 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 13; assign(y4, nil_index_list(), - in__.read>>(lp__, - N, N, N), "assigning variable y4"); + in__.read>>(N, N, + N), "assigning variable y4"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, std::numeric_limits::quiet_NaN()); current_statement__ = 14; assign(y3, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable y3"); + in__.read>>(N, N), + "assigning variable y3"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, std::numeric_limits::quiet_NaN()); current_statement__ = 15; assign(y2, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable y2"); + in__.read>>(N, N), + "assigning variable y2"); std::vector y1; y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 16; assign(y1, nil_index_list(), - in__.read>(lp__, N), - "assigning variable y1"); + in__.read>(N), "assigning variable y1"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { for (int sym2__ = 1; sym2__ <= N; ++sym2__) { for (int sym3__ = 1; sym3__ <= N; ++sym3__) { @@ -26294,38 +26278,37 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 1; assign(y1, nil_index_list(), - in__.read>(lp__, N), - "assigning variable y1"); + in__.read>(N), "assigning variable y1"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, DUMMY_VAR__); current_statement__ = 2; assign(y2, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable y2"); + in__.read>>(N, N), + "assigning variable y2"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, DUMMY_VAR__); current_statement__ = 3; assign(y3, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable y3"); + in__.read>>(N, N), + "assigning variable y3"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, DUMMY_VAR__); current_statement__ = 4; assign(y4, nil_index_list(), - in__.read>>(lp__, - N, N, N), "assigning variable y4"); + in__.read>>(N, N, + N), "assigning variable y4"); std::vector> y5; y5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 5; assign(y5, nil_index_list(), - in__.read>>(lp__, N, N), + in__.read>>(N, N), "assigning variable y5"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -26334,7 +26317,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 6; assign(y6, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable y6"); + N, N, N), "assigning variable y6"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, DUMMY_VAR__); @@ -26342,7 +26325,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 7; assign(y7, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable y7"); + N, N, N), "assigning variable y7"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, DUMMY_VAR__); @@ -26350,19 +26333,19 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 8; assign(y8, nil_index_list(), in__.read>>>( - lp__, N, N, N, N), "assigning variable y8"); + N, N, N, N), "assigning variable y8"); local_scalar_t__ y9; y9 = DUMMY_VAR__; current_statement__ = 9; - y9 = in__.read(lp__); + y9 = in__.read(); Eigen::Matrix y10; y10 = Eigen::Matrix(N); stan::math::fill(y10, DUMMY_VAR__); current_statement__ = 10; assign(y10, nil_index_list(), - in__.read>(lp__, N), + in__.read>(N), "assigning variable y10"); Eigen::Matrix y11; y11 = Eigen::Matrix(N); @@ -26370,7 +26353,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 11; assign(y11, nil_index_list(), - in__.read>(lp__, N), + in__.read>(N), "assigning variable y11"); Eigen::Matrix y12; y12 = Eigen::Matrix(N, N); @@ -26378,15 +26361,15 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 12; assign(y12, nil_index_list(), - in__.read>(lp__, N, N), + in__.read>(N, N), "assigning variable y12"); std::vector>> y17; y17 = std::vector>>(N, std::vector>(N, std::vector(N, DUMMY_VAR__))); current_statement__ = 13; assign(y17, nil_index_list(), - in__.read>>>( - lp__, N, N, N), "assigning variable y17"); + in__.read>>>(N, + N, N), "assigning variable y17"); { local_scalar_t__ t1; t1 = DUMMY_VAR__; @@ -26562,38 +26545,37 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 1; assign(y1, nil_index_list(), - in__.read>(lp__, N), - "assigning variable y1"); + in__.read>(N), "assigning variable y1"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(y2, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable y2"); + in__.read>>(N, N), + "assigning variable y2"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(y3, nil_index_list(), - in__.read>>(lp__, - N, N), "assigning variable y3"); + in__.read>>(N, N), + "assigning variable y3"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(y4, nil_index_list(), - in__.read>>(lp__, - N, N, N), "assigning variable y4"); + in__.read>>(N, N, + N), "assigning variable y4"); std::vector> y5; y5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 5; assign(y5, nil_index_list(), - in__.read>>(lp__, N, N), + in__.read>>(N, N), "assigning variable y5"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -26602,7 +26584,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 6; assign(y6, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable y6"); + N, N, N), "assigning variable y6"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, std::numeric_limits::quiet_NaN()); @@ -26610,7 +26592,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 7; assign(y7, nil_index_list(), in__.read>>>( - lp__, N, N, N), "assigning variable y7"); + N, N, N), "assigning variable y7"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, std::numeric_limits::quiet_NaN()); @@ -26618,19 +26600,19 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 8; assign(y8, nil_index_list(), in__.read>>>( - lp__, N, N, N, N), "assigning variable y8"); + N, N, N, N), "assigning variable y8"); double y9; y9 = std::numeric_limits::quiet_NaN(); current_statement__ = 9; - y9 = in__.read(lp__); + y9 = in__.read(); Eigen::Matrix y10; y10 = Eigen::Matrix(N); stan::math::fill(y10, std::numeric_limits::quiet_NaN()); current_statement__ = 10; assign(y10, nil_index_list(), - in__.read>(lp__, N), + in__.read>(N), "assigning variable y10"); Eigen::Matrix y11; y11 = Eigen::Matrix(N); @@ -26638,7 +26620,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 11; assign(y11, nil_index_list(), - in__.read>(lp__, N), + in__.read>(N), "assigning variable y11"); Eigen::Matrix y12; y12 = Eigen::Matrix(N, N); @@ -26646,15 +26628,15 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 12; assign(y12, nil_index_list(), - in__.read>(lp__, N, N), + in__.read>(N, N), "assigning variable y12"); std::vector>> y17; y17 = std::vector>>(N, std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN()))); current_statement__ = 13; assign(y17, nil_index_list(), - in__.read>>>( - lp__, N, N, N), "assigning variable y17"); + in__.read>>>(N, + N, N), "assigning variable y17"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { vars__.emplace_back(y1[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= N; ++sym1__) { @@ -32279,7 +32261,7 @@ class truncate_model final : public model_base_crtp { m = DUMMY_VAR__; current_statement__ = 1; - m = in__.read(lp__); + m = in__.read(); local_scalar_t__ y; y = DUMMY_VAR__; @@ -32402,7 +32384,7 @@ class truncate_model final : public model_base_crtp { m = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - m = in__.read(lp__); + m = in__.read(); double y; y = std::numeric_limits::quiet_NaN(); @@ -32739,7 +32721,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp(lp__); + x = in__.read(); { current_statement__ = 2; lp_accum__.add(normal_lpdf(x, 0, 1)); @@ -32779,7 +32761,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - x = in__.read(lp__); + x = in__.read(); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { diff --git a/test/integration/good/code-gen/opencl/cpp.expected b/test/integration/good/code-gen/opencl/cpp.expected index 84cc91bb7b..8a9f1bedf0 100644 --- a/test/integration/good/code-gen/opencl/cpp.expected +++ b/test/integration/good/code-gen/opencl/cpp.expected @@ -978,13 +978,13 @@ class distributions_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(); std::vector p_real_array; p_real_array = std::vector(d_int, DUMMY_VAR__); current_statement__ = 2; assign(p_real_array, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -992,15 +992,15 @@ class distributions_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, nil_index_list(), - in__.read>(lp__, d_int, - d_int), "assigning variable p_matrix"); + in__.read>(d_int, d_int), + "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, DUMMY_VAR__); current_statement__ = 4; assign(p_vector, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); @@ -1008,13 +1008,13 @@ class distributions_model final : public model_base_crtp { current_statement__ = 5; assign(p_row_vector, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_row_vector"); local_scalar_t__ y_p; y_p = DUMMY_VAR__; current_statement__ = 6; - y_p = in__.read(lp__); + y_p = in__.read(); local_scalar_t__ transformed_param_real; transformed_param_real = DUMMY_VAR__; @@ -3526,13 +3526,13 @@ class distributions_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(); std::vector p_real_array; p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(p_real_array, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -3540,15 +3540,15 @@ class distributions_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, nil_index_list(), - in__.read>(lp__, d_int, - d_int), "assigning variable p_matrix"); + in__.read>(d_int, d_int), + "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(p_vector, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); @@ -3556,13 +3556,13 @@ class distributions_model final : public model_base_crtp { current_statement__ = 5; assign(p_row_vector, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_row_vector"); double y_p; y_p = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - y_p = in__.read(lp__); + y_p = in__.read(); double transformed_param_real; transformed_param_real = std::numeric_limits::quiet_NaN(); @@ -6627,13 +6627,13 @@ class restricted_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(); std::vector p_real_array; p_real_array = std::vector(d_int, DUMMY_VAR__); current_statement__ = 2; assign(p_real_array, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -6641,15 +6641,15 @@ class restricted_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, nil_index_list(), - in__.read>(lp__, d_int, - d_int), "assigning variable p_matrix"); + in__.read>(d_int, d_int), + "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, DUMMY_VAR__); current_statement__ = 4; assign(p_vector, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); @@ -6657,13 +6657,13 @@ class restricted_model final : public model_base_crtp { current_statement__ = 5; assign(p_row_vector, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_row_vector"); local_scalar_t__ y_p; y_p = DUMMY_VAR__; current_statement__ = 6; - y_p = in__.read(lp__); + y_p = in__.read(); local_scalar_t__ transformed_param_real; transformed_param_real = DUMMY_VAR__; @@ -6744,13 +6744,13 @@ class restricted_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.read(lp__); + p_real = in__.read(); std::vector p_real_array; p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(p_real_array, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -6758,15 +6758,15 @@ class restricted_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, nil_index_list(), - in__.read>(lp__, d_int, - d_int), "assigning variable p_matrix"); + in__.read>(d_int, d_int), + "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(p_vector, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); @@ -6774,13 +6774,13 @@ class restricted_model final : public model_base_crtp { current_statement__ = 5; assign(p_row_vector, nil_index_list(), - in__.read>(lp__, d_int), + in__.read>(d_int), "assigning variable p_row_vector"); double y_p; y_p = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - y_p = in__.read(lp__); + y_p = in__.read(); double transformed_param_real; transformed_param_real = std::numeric_limits::quiet_NaN(); diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 64f91da3b4..7a8acb6dbd 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -4275,34 +4275,34 @@ class dce_fail_model final : public model_base_crtp { b_0 = DUMMY_VAR__; current_statement__ = 7; - b_0 = in__.read(lp__); + b_0 = in__.read(); local_scalar_t__ b_female; b_female = DUMMY_VAR__; current_statement__ = 8; - b_female = in__.read(lp__); + b_female = in__.read(); local_scalar_t__ b_black; b_black = DUMMY_VAR__; current_statement__ = 9; - b_black = in__.read(lp__); + b_black = in__.read(); local_scalar_t__ b_female_black; b_female_black = DUMMY_VAR__; current_statement__ = 10; - b_female_black = in__.read(lp__); + b_female_black = in__.read(); local_scalar_t__ b_v_prev; b_v_prev = DUMMY_VAR__; current_statement__ = 11; - b_v_prev = in__.read(lp__); + b_v_prev = in__.read(); Eigen::Matrix b_age; b_age = Eigen::Matrix(n_age); stan::math::fill(b_age, DUMMY_VAR__); current_statement__ = 12; assign(b_age, nil_index_list(), - in__.read>(lp__, n_age), + in__.read>(n_age), "assigning variable b_age"); Eigen::Matrix b_edu; b_edu = Eigen::Matrix(n_edu); @@ -4310,7 +4310,7 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 13; assign(b_edu, nil_index_list(), - in__.read>(lp__, n_edu), + in__.read>(n_edu), "assigning variable b_edu"); Eigen::Matrix b_region; b_region = Eigen::Matrix(n_region); @@ -4318,7 +4318,7 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 14; assign(b_region, nil_index_list(), - in__.read>(lp__, n_region), + in__.read>(n_region), "assigning variable b_region"); Eigen::Matrix b_age_edu; b_age_edu = Eigen::Matrix(n_age, n_edu); @@ -4326,15 +4326,15 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 15; assign(b_age_edu, nil_index_list(), - in__.read>(lp__, n_age, - n_edu), "assigning variable b_age_edu"); + in__.read>(n_age, n_edu), + "assigning variable b_age_edu"); Eigen::Matrix b_hat; b_hat = Eigen::Matrix(n_state); stan::math::fill(b_hat, DUMMY_VAR__); current_statement__ = 16; assign(b_hat, nil_index_list(), - in__.read>(lp__, n_state), + in__.read>(n_state), "assigning variable b_hat"); { current_statement__ = 17; @@ -4621,34 +4621,34 @@ class dce_fail_model final : public model_base_crtp { b_0 = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - b_0 = in__.read(lp__); + b_0 = in__.read(); double b_female; b_female = std::numeric_limits::quiet_NaN(); current_statement__ = 8; - b_female = in__.read(lp__); + b_female = in__.read(); double b_black; b_black = std::numeric_limits::quiet_NaN(); current_statement__ = 9; - b_black = in__.read(lp__); + b_black = in__.read(); double b_female_black; b_female_black = std::numeric_limits::quiet_NaN(); current_statement__ = 10; - b_female_black = in__.read(lp__); + b_female_black = in__.read(); double b_v_prev; b_v_prev = std::numeric_limits::quiet_NaN(); current_statement__ = 11; - b_v_prev = in__.read(lp__); + b_v_prev = in__.read(); Eigen::Matrix b_age; b_age = Eigen::Matrix(n_age); stan::math::fill(b_age, std::numeric_limits::quiet_NaN()); current_statement__ = 12; assign(b_age, nil_index_list(), - in__.read>(lp__, n_age), + in__.read>(n_age), "assigning variable b_age"); Eigen::Matrix b_edu; b_edu = Eigen::Matrix(n_edu); @@ -4656,7 +4656,7 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 13; assign(b_edu, nil_index_list(), - in__.read>(lp__, n_edu), + in__.read>(n_edu), "assigning variable b_edu"); Eigen::Matrix b_region; b_region = Eigen::Matrix(n_region); @@ -4664,7 +4664,7 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 14; assign(b_region, nil_index_list(), - in__.read>(lp__, n_region), + in__.read>(n_region), "assigning variable b_region"); Eigen::Matrix b_age_edu; b_age_edu = Eigen::Matrix(n_age, n_edu); @@ -4672,15 +4672,15 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 15; assign(b_age_edu, nil_index_list(), - in__.read>(lp__, n_age, - n_edu), "assigning variable b_age_edu"); + in__.read>(n_age, n_edu), + "assigning variable b_age_edu"); Eigen::Matrix b_hat; b_hat = Eigen::Matrix(n_state); stan::math::fill(b_hat, std::numeric_limits::quiet_NaN()); current_statement__ = 16; assign(b_hat, nil_index_list(), - in__.read>(lp__, n_state), + in__.read>(n_state), "assigning variable b_hat"); vars__.emplace_back(sigma); vars__.emplace_back(sigma_age); @@ -6826,13 +6826,13 @@ class expr_prop_fail2_model final : public model_base_crtp(lp__); + mu = in__.read(); std::vector theta; theta = std::vector(J, DUMMY_VAR__); current_statement__ = 2; assign(theta, nil_index_list(), - in__.read>(lp__, J), + in__.read>(J), "assigning variable theta"); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -6885,13 +6885,13 @@ class expr_prop_fail2_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(); std::vector theta; theta = std::vector(J, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(theta, nil_index_list(), - in__.read>(lp__, J), + in__.read>(J), "assigning variable theta"); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -7816,7 +7816,7 @@ class expr_prop_fail3_model final : public model_base_crtp>(lp__, n_age), + in__.read>(n_age), "assigning variable a"); Eigen::Matrix b; b = Eigen::Matrix(n_edu); @@ -7824,7 +7824,7 @@ class expr_prop_fail3_model final : public model_base_crtp>(lp__, n_edu), + in__.read>(n_edu), "assigning variable b"); Eigen::Matrix c; c = Eigen::Matrix(n_age_edu); @@ -7832,7 +7832,7 @@ class expr_prop_fail3_model final : public model_base_crtp>(lp__, n_age_edu), + in__.read>(n_age_edu), "assigning variable c"); Eigen::Matrix d; d = Eigen::Matrix(n_state); @@ -7840,7 +7840,7 @@ class expr_prop_fail3_model final : public model_base_crtp>(lp__, n_state), + in__.read>(n_state), "assigning variable d"); Eigen::Matrix e; e = Eigen::Matrix(n_region_full); @@ -7848,15 +7848,15 @@ class expr_prop_fail3_model final : public model_base_crtp>(lp__, - n_region_full), "assigning variable e"); + in__.read>(n_region_full), + "assigning variable e"); Eigen::Matrix beta; beta = Eigen::Matrix(5); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 6; assign(beta, nil_index_list(), - in__.read>(lp__, 5), + in__.read>(5), "assigning variable beta"); local_scalar_t__ sigma_a; sigma_a = DUMMY_VAR__; @@ -8076,7 +8076,7 @@ class expr_prop_fail3_model final : public model_base_crtp>(lp__, n_age), + in__.read>(n_age), "assigning variable a"); Eigen::Matrix b; b = Eigen::Matrix(n_edu); @@ -8084,7 +8084,7 @@ class expr_prop_fail3_model final : public model_base_crtp>(lp__, n_edu), + in__.read>(n_edu), "assigning variable b"); Eigen::Matrix c; c = Eigen::Matrix(n_age_edu); @@ -8092,7 +8092,7 @@ class expr_prop_fail3_model final : public model_base_crtp>(lp__, n_age_edu), + in__.read>(n_age_edu), "assigning variable c"); Eigen::Matrix d; d = Eigen::Matrix(n_state); @@ -8100,7 +8100,7 @@ class expr_prop_fail3_model final : public model_base_crtp>(lp__, n_state), + in__.read>(n_state), "assigning variable d"); Eigen::Matrix e; e = Eigen::Matrix(n_region_full); @@ -8108,15 +8108,15 @@ class expr_prop_fail3_model final : public model_base_crtp>(lp__, - n_region_full), "assigning variable e"); + in__.read>(n_region_full), + "assigning variable e"); Eigen::Matrix beta; beta = Eigen::Matrix(5); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 6; assign(beta, nil_index_list(), - in__.read>(lp__, 5), + in__.read>(5), "assigning variable beta"); double sigma_a; sigma_a = std::numeric_limits::quiet_NaN(); @@ -9268,7 +9268,7 @@ class expr_prop_fail4_model final : public model_base_crtp>(lp__, lcm_sym39__), + in__.read>(lcm_sym39__), "assigning variable phi_std_raw"); local_scalar_t__ sigma_phi; sigma_phi = DUMMY_VAR__; @@ -9371,7 +9371,7 @@ class expr_prop_fail4_model final : public model_base_crtp>(lp__, lcm_sym20__), + in__.read>(lcm_sym20__), "assigning variable phi_std_raw"); double sigma_phi; sigma_phi = std::numeric_limits::quiet_NaN(); @@ -10819,7 +10819,7 @@ class expr_prop_fail5_model final : public model_base_crtp>(lp__, nind), + in__.read>(nind), "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -11514,7 +11514,7 @@ class expr_prop_fail5_model final : public model_base_crtp>(lp__, nind), + in__.read>(nind), "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -14165,7 +14165,7 @@ class expr_prop_fail6_model final : public model_base_crtp>(lp__, M), + in__.read>(M), "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -15363,7 +15363,7 @@ class expr_prop_fail6_model final : public model_base_crtp>(lp__, M), + in__.read>(M), "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -18665,12 +18665,12 @@ class expr_prop_fail8_model final : public model_base_crtp(lp__); + beta0 = in__.read(); local_scalar_t__ beta1; beta1 = DUMMY_VAR__; current_statement__ = 2; - beta1 = in__.read(lp__); + beta1 = in__.read(); local_scalar_t__ tau_theta; tau_theta = DUMMY_VAR__; @@ -18687,7 +18687,7 @@ class expr_prop_fail8_model final : public model_base_crtp>(lp__, N), + in__.read>(N), "assigning variable theta_std"); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix(N); @@ -18695,7 +18695,7 @@ class expr_prop_fail8_model final : public model_base_crtp>(lp__, N), + in__.read>(N), "assigning variable phi_std_raw"); local_scalar_t__ sigma_phi; sigma_phi = DUMMY_VAR__; @@ -18769,12 +18769,12 @@ class expr_prop_fail8_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - beta0 = in__.read(lp__); + beta0 = in__.read(); double beta1; beta1 = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - beta1 = in__.read(lp__); + beta1 = in__.read(); double tau_theta; tau_theta = std::numeric_limits::quiet_NaN(); @@ -18791,7 +18791,7 @@ class expr_prop_fail8_model final : public model_base_crtp>(lp__, N), + in__.read>(N), "assigning variable theta_std"); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix(N); @@ -18799,7 +18799,7 @@ class expr_prop_fail8_model final : public model_base_crtp>(lp__, N), + in__.read>(N), "assigning variable phi_std_raw"); double sigma_phi; sigma_phi = std::numeric_limits::quiet_NaN(); @@ -23679,7 +23679,7 @@ class inlining_fail2_model final : public model_base_crtp lcm_sym297__ = (n_occasions - 1); assign(epsilon, nil_index_list(), - in__.read>(lp__, lcm_sym297__), + in__.read>(lcm_sym297__), "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -24816,7 +24816,7 @@ class inlining_fail2_model final : public model_base_crtp lcm_sym198__ = (n_occasions - 1); assign(epsilon, nil_index_list(), - in__.read>(lp__, lcm_sym198__), + in__.read>(lcm_sym198__), "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -26669,7 +26669,7 @@ class lcm_experiment2_model final : public model_base_crtp(lp__); + x = in__.read(); { local_scalar_t__ y; y = DUMMY_VAR__; @@ -26723,7 +26723,7 @@ class lcm_experiment2_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - x = in__.read(lp__); + x = in__.read(); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -27037,7 +27037,7 @@ class lcm_fails_model final : public model_base_crtp { current_statement__ = 1; assign(theta, nil_index_list(), - in__.read>(lp__, J), + in__.read>(J), "assigning variable theta"); { current_statement__ = 2; @@ -27084,7 +27084,7 @@ class lcm_fails_model final : public model_base_crtp { current_statement__ = 1; assign(theta, nil_index_list(), - in__.read>(lp__, J), + in__.read>(J), "assigning variable theta"); if (logical_gte(J, 1)) { vars__.emplace_back( @@ -29909,7 +29909,7 @@ class lupdf_inlining_model final : public model_base_crtp mu = DUMMY_VAR__; current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(); local_scalar_t__ tp; tp = DUMMY_VAR__; @@ -29991,7 +29991,7 @@ class lupdf_inlining_model final : public model_base_crtp mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mu = in__.read(lp__); + mu = in__.read(); double tp; tp = std::numeric_limits::quiet_NaN(); @@ -30703,22 +30703,22 @@ class off_dce_model final : public model_base_crtp { alpha_occ = DUMMY_VAR__; current_statement__ = 1; - alpha_occ = in__.read(lp__); + alpha_occ = in__.read(); local_scalar_t__ beta_occ; beta_occ = DUMMY_VAR__; current_statement__ = 2; - beta_occ = in__.read(lp__); + beta_occ = in__.read(); local_scalar_t__ alpha_p; alpha_p = DUMMY_VAR__; current_statement__ = 3; - alpha_p = in__.read(lp__); + alpha_p = in__.read(); local_scalar_t__ beta_p; beta_p = DUMMY_VAR__; current_statement__ = 4; - beta_p = in__.read(lp__); + beta_p = in__.read(); Eigen::Matrix logit_psi; logit_psi = Eigen::Matrix(R); stan::math::fill(logit_psi, DUMMY_VAR__); @@ -30867,22 +30867,22 @@ class off_dce_model final : public model_base_crtp { alpha_occ = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - alpha_occ = in__.read(lp__); + alpha_occ = in__.read(); double beta_occ; beta_occ = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - beta_occ = in__.read(lp__); + beta_occ = in__.read(); double alpha_p; alpha_p = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - alpha_p = in__.read(lp__); + alpha_p = in__.read(); double beta_p; beta_p = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - beta_p = in__.read(lp__); + beta_p = in__.read(); Eigen::Matrix logit_psi; logit_psi = Eigen::Matrix(R); stan::math::fill(logit_psi, std::numeric_limits::quiet_NaN()); @@ -31675,14 +31675,14 @@ class off_small_model final : public model_base_crtp { beta = DUMMY_VAR__; current_statement__ = 1; - beta = in__.read(lp__); + beta = in__.read(); Eigen::Matrix eta1; eta1 = Eigen::Matrix(J); stan::math::fill(eta1, DUMMY_VAR__); current_statement__ = 2; assign(eta1, nil_index_list(), - in__.read>(lp__, J), + in__.read>(J), "assigning variable eta1"); Eigen::Matrix eta2; eta2 = Eigen::Matrix(J); @@ -31690,18 +31690,18 @@ class off_small_model final : public model_base_crtp { current_statement__ = 3; assign(eta2, nil_index_list(), - in__.read>(lp__, J), + in__.read>(J), "assigning variable eta2"); local_scalar_t__ mu_a1; mu_a1 = DUMMY_VAR__; current_statement__ = 4; - mu_a1 = in__.read(lp__); + mu_a1 = in__.read(); local_scalar_t__ mu_a2; mu_a2 = DUMMY_VAR__; current_statement__ = 5; - mu_a2 = in__.read(lp__); + mu_a2 = in__.read(); local_scalar_t__ sigma_a1; sigma_a1 = DUMMY_VAR__; @@ -31850,14 +31850,14 @@ class off_small_model final : public model_base_crtp { beta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - beta = in__.read(lp__); + beta = in__.read(); Eigen::Matrix eta1; eta1 = Eigen::Matrix(J); stan::math::fill(eta1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(eta1, nil_index_list(), - in__.read>(lp__, J), + in__.read>(J), "assigning variable eta1"); Eigen::Matrix eta2; eta2 = Eigen::Matrix(J); @@ -31865,18 +31865,18 @@ class off_small_model final : public model_base_crtp { current_statement__ = 3; assign(eta2, nil_index_list(), - in__.read>(lp__, J), + in__.read>(J), "assigning variable eta2"); double mu_a1; mu_a1 = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - mu_a1 = in__.read(lp__); + mu_a1 = in__.read(); double mu_a2; mu_a2 = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - mu_a2 = in__.read(lp__); + mu_a2 = in__.read(); double sigma_a1; sigma_a1 = std::numeric_limits::quiet_NaN(); @@ -32696,19 +32696,19 @@ class optimizations_model final : public model_base_crtp { theta = DUMMY_VAR__; current_statement__ = 1; - theta = in__.read(lp__); + theta = in__.read(); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 2; - phi = in__.read(lp__); + phi = in__.read(); Eigen::Matrix x_matrix; x_matrix = Eigen::Matrix(3, 2); stan::math::fill(x_matrix, DUMMY_VAR__); current_statement__ = 3; assign(x_matrix, nil_index_list(), - in__.read>(lp__, 3, 2), + in__.read>(3, 2), "assigning variable x_matrix"); Eigen::Matrix x_vector; x_vector = Eigen::Matrix(2); @@ -32716,7 +32716,7 @@ class optimizations_model final : public model_base_crtp { current_statement__ = 4; assign(x_vector, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable x_vector"); Eigen::Matrix x_cov; x_cov = Eigen::Matrix(2, 2); @@ -33267,19 +33267,19 @@ class optimizations_model final : public model_base_crtp { theta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - theta = in__.read(lp__); + theta = in__.read(); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - phi = in__.read(lp__); + phi = in__.read(); Eigen::Matrix x_matrix; x_matrix = Eigen::Matrix(3, 2); stan::math::fill(x_matrix, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(x_matrix, nil_index_list(), - in__.read>(lp__, 3, 2), + in__.read>(3, 2), "assigning variable x_matrix"); Eigen::Matrix x_vector; x_vector = Eigen::Matrix(2); @@ -33287,7 +33287,7 @@ class optimizations_model final : public model_base_crtp { current_statement__ = 4; assign(x_vector, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable x_vector"); Eigen::Matrix x_cov; x_cov = Eigen::Matrix(2, 2); @@ -34205,7 +34205,7 @@ class partial_eval_model final : public model_base_crtp { current_statement__ = 1; assign(a, nil_index_list(), - in__.read>(lp__, n_pair), + in__.read>(n_pair), "assigning variable a"); Eigen::Matrix beta; beta = Eigen::Matrix(2); @@ -34213,13 +34213,13 @@ class partial_eval_model final : public model_base_crtp { current_statement__ = 2; assign(beta, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable beta"); local_scalar_t__ mu_a; mu_a = DUMMY_VAR__; current_statement__ = 3; - mu_a = in__.read(lp__); + mu_a = in__.read(); local_scalar_t__ sigma_a; sigma_a = DUMMY_VAR__; @@ -34330,7 +34330,7 @@ class partial_eval_model final : public model_base_crtp { current_statement__ = 1; assign(a, nil_index_list(), - in__.read>(lp__, n_pair), + in__.read>(n_pair), "assigning variable a"); Eigen::Matrix beta; beta = Eigen::Matrix(2); @@ -34338,13 +34338,13 @@ class partial_eval_model final : public model_base_crtp { current_statement__ = 2; assign(beta, nil_index_list(), - in__.read>(lp__, 2), + in__.read>(2), "assigning variable beta"); double mu_a; mu_a = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - mu_a = in__.read(lp__); + mu_a = in__.read(); double sigma_a; sigma_a = std::numeric_limits::quiet_NaN(); @@ -35057,22 +35057,22 @@ class stalled1_failure_model final : public model_base_crtp(lp__); + alpha0 = in__.read(); local_scalar_t__ alpha1; alpha1 = DUMMY_VAR__; current_statement__ = 2; - alpha1 = in__.read(lp__); + alpha1 = in__.read(); local_scalar_t__ alpha2; alpha2 = DUMMY_VAR__; current_statement__ = 3; - alpha2 = in__.read(lp__); + alpha2 = in__.read(); local_scalar_t__ alpha12; alpha12 = DUMMY_VAR__; current_statement__ = 4; - alpha12 = in__.read(lp__); + alpha12 = in__.read(); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -35084,8 +35084,8 @@ class stalled1_failure_model final : public model_base_crtp>>(lp__, - I, 8), "assigning variable b"); + in__.read>>(I, 8), + "assigning variable b"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -35194,22 +35194,22 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - alpha0 = in__.read(lp__); + alpha0 = in__.read(); double alpha1; alpha1 = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - alpha1 = in__.read(lp__); + alpha1 = in__.read(); double alpha2; alpha2 = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - alpha2 = in__.read(lp__); + alpha2 = in__.read(); double alpha12; alpha12 = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - alpha12 = in__.read(lp__); + alpha12 = in__.read(); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -35221,8 +35221,8 @@ class stalled1_failure_model final : public model_base_crtp>>(lp__, - I, 8), "assigning variable b"); + in__.read>>(I, 8), + "assigning variable b"); double sigma; sigma = std::numeric_limits::quiet_NaN(); From c28d4ab6e89df57558d6944433f46bc280ca488a Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Wed, 17 Mar 2021 16:07:57 -0400 Subject: [PATCH 06/31] update to deserializer interface --- src/stan_math_backend/Expression_gen.ml | 2 +- test/integration/good/code-gen/cl.expected | 4 +- test/integration/good/code-gen/cpp.expected | 208 ++++++------- .../good/code-gen/profiling/cpp.expected | 12 +- .../good/compiler-optimizations/cpp.expected | 276 +++++++++++------- 5 files changed, 283 insertions(+), 219 deletions(-) diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index 5889a1e35b..15f675c70e 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -429,7 +429,7 @@ and pp_compiler_internal_fn ad ut f ppf es = else let lp_expr = Expr.Fixed.{pattern= Var "lp__"; meta= emeta} in let arg_exprs = constraint_args @ [lp_expr] @ dims in - pf ppf "@[in__.read_%s<%a, jacobian__>(@,%a)@]" + pf ppf "@[in__.read_constrain_%s<%a, jacobian__>(@,%a)@]" constraint_string pp_unsizedtype_local (UnsizedType.AutoDiffable, ut) (list ~sep:comma pp_expr) arg_exprs diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index 3353e29840..daa68d87a8 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -595,7 +595,7 @@ class optimize_glm_model final : public model_base_crtp { sigma = DUMMY_VAR__; current_statement__ = 4; - sigma = in__.read_lb(0, lp__); + sigma = in__.read_constrain_lb(0, lp__); local_scalar_t__ alpha; alpha = DUMMY_VAR__; @@ -1317,7 +1317,7 @@ class optimize_glm_model final : public model_base_crtp { sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma = in__.read_lb(0, lp__); + sigma = in__.read_constrain_lb(0, lp__); double alpha; alpha = std::numeric_limits::quiet_NaN(); diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index a92e77e487..6443bec8e1 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -155,7 +155,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> tau = DUMMY_VAR__; current_statement__ = 2; - tau = in__.read_lb(0, lp__); + tau = in__.read_constrain_lb(0, lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, DUMMY_VAR__); @@ -221,7 +221,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> tau = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - tau = in__.read_lb(0, lp__); + tau = in__.read_constrain_lb(0, lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, std::numeric_limits::quiet_NaN()); @@ -974,7 +974,7 @@ class eight_schools_ncp_model final : public model_base_crtp(0, lp__); + tau = in__.read_constrain_lb(0, lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, DUMMY_VAR__); @@ -1040,7 +1040,7 @@ class eight_schools_ncp_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 2; - tau = in__.read_lb(0, lp__); + tau = in__.read_constrain_lb(0, lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, std::numeric_limits::quiet_NaN()); @@ -6728,46 +6728,48 @@ class mother_model final : public model_base_crtp { p_upper = DUMMY_VAR__; current_statement__ = 2; - p_upper = in__.read_lb(p_real, lp__); + p_upper = in__.read_constrain_lb(p_real, + lp__); local_scalar_t__ p_lower; p_lower = DUMMY_VAR__; current_statement__ = 3; - p_lower = in__.read_ub(p_upper, lp__); + p_lower = in__.read_constrain_ub(p_upper, + lp__); std::vector offset_multiplier; offset_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 4; assign(offset_multiplier, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( 1, 2, lp__, 5), "assigning variable offset_multiplier"); std::vector no_offset_multiplier; no_offset_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 5; assign(no_offset_multiplier, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( 0, 2, lp__, 5), "assigning variable no_offset_multiplier"); std::vector offset_no_multiplier; offset_no_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 6; assign(offset_no_multiplier, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( 3, 1, lp__, 5), "assigning variable offset_no_multiplier"); std::vector p_real_1d_ar; p_real_1d_ar = std::vector(N, DUMMY_VAR__); current_statement__ = 7; assign(p_real_1d_ar, - in__.read_lb, jacobian__>(0, lp__, N), - "assigning variable p_real_1d_ar"); + in__.read_constrain_lb, jacobian__>(0, + lp__, N), "assigning variable p_real_1d_ar"); std::vector>> p_real_3d_ar; p_real_3d_ar = std::vector>>(N, std::vector>(M, std::vector(K, DUMMY_VAR__))); current_statement__ = 8; assign(p_real_3d_ar, - in__.read_lb>>, jacobian__>( + in__.read_constrain_lb>>, jacobian__>( 0, lp__, N, M, K), "assigning variable p_real_3d_ar"); Eigen::Matrix p_vec; p_vec = Eigen::Matrix(N); @@ -6775,8 +6777,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 9; assign(p_vec, - in__.read_lb, jacobian__>(0, - lp__, N), "assigning variable p_vec"); + in__.read_constrain_lb, jacobian__>( + 0, lp__, N), "assigning variable p_vec"); std::vector> p_1d_vec; p_1d_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_vec, DUMMY_VAR__); @@ -6822,7 +6824,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 15; assign(p_ar_mat, - in__.read_lub>>, jacobian__>( + in__.read_constrain_lub>>, jacobian__>( 0, 1, lp__, 4, 5, 2, 3), "assigning variable p_ar_mat"); Eigen::Matrix p_simplex; p_simplex = Eigen::Matrix(N); @@ -6830,7 +6832,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 16; assign(p_simplex, - in__.read_simplex, jacobian__>( + in__.read_constrain_simplex, jacobian__>( lp__, N), "assigning variable p_simplex"); std::vector> p_1d_simplex; p_1d_simplex = std::vector>(N, Eigen::Matrix(N)); @@ -6838,7 +6840,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 17; assign(p_1d_simplex, - in__.read_simplex>, jacobian__>( + in__.read_constrain_simplex>, jacobian__>( lp__, N, N), "assigning variable p_1d_simplex"); std::vector>>> p_3d_simplex; p_3d_simplex = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); @@ -6846,7 +6848,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 18; assign(p_3d_simplex, - in__.read_simplex>>>, jacobian__>( + in__.read_constrain_simplex>>>, jacobian__>( lp__, N, M, K, N), "assigning variable p_3d_simplex"); Eigen::Matrix p_cfcov_54; p_cfcov_54 = Eigen::Matrix(5, 4); @@ -6854,7 +6856,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 19; assign(p_cfcov_54, - in__.read_cholesky_factor, jacobian__>( + in__.read_constrain_cholesky_factor, jacobian__>( lp__, 5, 4), "assigning variable p_cfcov_54"); Eigen::Matrix p_cfcov_33; p_cfcov_33 = Eigen::Matrix(3, 3); @@ -6862,7 +6864,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 20; assign(p_cfcov_33, - in__.read_cholesky_factor, jacobian__>( + in__.read_constrain_cholesky_factor, jacobian__>( lp__, 3, 3), "assigning variable p_cfcov_33"); std::vector> p_cfcov_33_ar; p_cfcov_33_ar = std::vector>(K, Eigen::Matrix(3, 3)); @@ -6870,7 +6872,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 21; assign(p_cfcov_33_ar, - in__.read_cholesky_factor>, jacobian__>( + in__.read_constrain_cholesky_factor>, jacobian__>( lp__, K, 3, 3), "assigning variable p_cfcov_33_ar"); Eigen::Matrix x_p; x_p = Eigen::Matrix(2); @@ -7270,46 +7272,48 @@ class mother_model final : public model_base_crtp { p_upper = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - p_upper = in__.read_lb(p_real, lp__); + p_upper = in__.read_constrain_lb(p_real, + lp__); double p_lower; p_lower = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - p_lower = in__.read_ub(p_upper, lp__); + p_lower = in__.read_constrain_ub(p_upper, + lp__); std::vector offset_multiplier; offset_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(offset_multiplier, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( 1, 2, lp__, 5), "assigning variable offset_multiplier"); std::vector no_offset_multiplier; no_offset_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 5; assign(no_offset_multiplier, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( 0, 2, lp__, 5), "assigning variable no_offset_multiplier"); std::vector offset_no_multiplier; offset_no_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 6; assign(offset_no_multiplier, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( 3, 1, lp__, 5), "assigning variable offset_no_multiplier"); std::vector p_real_1d_ar; p_real_1d_ar = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 7; assign(p_real_1d_ar, - in__.read_lb, jacobian__>(0, lp__, N), - "assigning variable p_real_1d_ar"); + in__.read_constrain_lb, jacobian__>(0, + lp__, N), "assigning variable p_real_1d_ar"); std::vector>> p_real_3d_ar; p_real_3d_ar = std::vector>>(N, std::vector>(M, std::vector(K, std::numeric_limits::quiet_NaN()))); current_statement__ = 8; assign(p_real_3d_ar, - in__.read_lb>>, jacobian__>( + in__.read_constrain_lb>>, jacobian__>( 0, lp__, N, M, K), "assigning variable p_real_3d_ar"); Eigen::Matrix p_vec; p_vec = Eigen::Matrix(N); @@ -7317,8 +7321,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 9; assign(p_vec, - in__.read_lb, jacobian__>(0, - lp__, N), "assigning variable p_vec"); + in__.read_constrain_lb, jacobian__>( + 0, lp__, N), "assigning variable p_vec"); std::vector> p_1d_vec; p_1d_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_vec, std::numeric_limits::quiet_NaN()); @@ -7364,7 +7368,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 15; assign(p_ar_mat, - in__.read_lub>>, jacobian__>( + in__.read_constrain_lub>>, jacobian__>( 0, 1, lp__, 4, 5, 2, 3), "assigning variable p_ar_mat"); Eigen::Matrix p_simplex; p_simplex = Eigen::Matrix(N); @@ -7372,7 +7376,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 16; assign(p_simplex, - in__.read_simplex, jacobian__>( + in__.read_constrain_simplex, jacobian__>( lp__, N), "assigning variable p_simplex"); std::vector> p_1d_simplex; p_1d_simplex = std::vector>(N, Eigen::Matrix(N)); @@ -7380,7 +7384,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 17; assign(p_1d_simplex, - in__.read_simplex>, jacobian__>( + in__.read_constrain_simplex>, jacobian__>( lp__, N, N), "assigning variable p_1d_simplex"); std::vector>>> p_3d_simplex; p_3d_simplex = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); @@ -7388,7 +7392,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 18; assign(p_3d_simplex, - in__.read_simplex>>>, jacobian__>( + in__.read_constrain_simplex>>>, jacobian__>( lp__, N, M, K, N), "assigning variable p_3d_simplex"); Eigen::Matrix p_cfcov_54; p_cfcov_54 = Eigen::Matrix(5, 4); @@ -7396,7 +7400,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 19; assign(p_cfcov_54, - in__.read_cholesky_factor, jacobian__>( + in__.read_constrain_cholesky_factor, jacobian__>( lp__, 5, 4), "assigning variable p_cfcov_54"); Eigen::Matrix p_cfcov_33; p_cfcov_33 = Eigen::Matrix(3, 3); @@ -7404,7 +7408,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 20; assign(p_cfcov_33, - in__.read_cholesky_factor, jacobian__>( + in__.read_constrain_cholesky_factor, jacobian__>( lp__, 3, 3), "assigning variable p_cfcov_33"); std::vector> p_cfcov_33_ar; p_cfcov_33_ar = std::vector>(K, Eigen::Matrix(3, 3)); @@ -7412,7 +7416,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 21; assign(p_cfcov_33_ar, - in__.read_cholesky_factor>, jacobian__>( + in__.read_constrain_cholesky_factor>, jacobian__>( lp__, K, 3, 3), "assigning variable p_cfcov_33_ar"); Eigen::Matrix x_p; x_p = Eigen::Matrix(2); @@ -16709,36 +16713,36 @@ class old_integrate_interface_model final : public model_base_crtp(0, lp__); + alpha = in__.read_constrain_lb(0, lp__); local_scalar_t__ beta; beta = DUMMY_VAR__; current_statement__ = 2; - beta = in__.read_lb(0, lp__); + beta = in__.read_constrain_lb(0, lp__); local_scalar_t__ gamma; gamma = DUMMY_VAR__; current_statement__ = 3; - gamma = in__.read_lb(0, lp__); + gamma = in__.read_constrain_lb(0, lp__); local_scalar_t__ delta; delta = DUMMY_VAR__; current_statement__ = 4; - delta = in__.read_lb(0, lp__); + delta = in__.read_constrain_lb(0, lp__); std::vector z_init; z_init = std::vector(2, DUMMY_VAR__); current_statement__ = 5; assign(z_init, - in__.read_lb, jacobian__>(0, lp__, 2), - "assigning variable z_init"); + in__.read_constrain_lb, jacobian__>(0, + lp__, 2), "assigning variable z_init"); std::vector sigma; sigma = std::vector(2, DUMMY_VAR__); current_statement__ = 6; assign(sigma, - in__.read_lb, jacobian__>(0, lp__, 2), - "assigning variable sigma"); + in__.read_constrain_lb, jacobian__>(0, + lp__, 2), "assigning variable sigma"); std::vector> z; z = std::vector>(N, std::vector(2, DUMMY_VAR__)); @@ -16811,36 +16815,36 @@ class old_integrate_interface_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - alpha = in__.read_lb(0, lp__); + alpha = in__.read_constrain_lb(0, lp__); double beta; beta = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - beta = in__.read_lb(0, lp__); + beta = in__.read_constrain_lb(0, lp__); double gamma; gamma = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - gamma = in__.read_lb(0, lp__); + gamma = in__.read_constrain_lb(0, lp__); double delta; delta = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - delta = in__.read_lb(0, lp__); + delta = in__.read_constrain_lb(0, lp__); std::vector z_init; z_init = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 5; assign(z_init, - in__.read_lb, jacobian__>(0, lp__, 2), - "assigning variable z_init"); + in__.read_constrain_lb, jacobian__>(0, + lp__, 2), "assigning variable z_init"); std::vector sigma; sigma = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 6; assign(sigma, - in__.read_lb, jacobian__>(0, lp__, 2), - "assigning variable sigma"); + in__.read_constrain_lb, jacobian__>(0, + lp__, 2), "assigning variable sigma"); std::vector> z; z = std::vector>(N, std::vector(2, std::numeric_limits::quiet_NaN())); @@ -17753,7 +17757,7 @@ class optimize_glm_model final : public model_base_crtp { sigma = DUMMY_VAR__; current_statement__ = 4; - sigma = in__.read_lb(0, lp__); + sigma = in__.read_constrain_lb(0, lp__); local_scalar_t__ alpha; alpha = DUMMY_VAR__; @@ -18380,7 +18384,7 @@ class optimize_glm_model final : public model_base_crtp { sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma = in__.read_lb(0, lp__); + sigma = in__.read_constrain_lb(0, lp__); double alpha; alpha = std::numeric_limits::quiet_NaN(); @@ -18985,7 +18989,7 @@ class param_constraint_model final : public model_base_crtp>, jacobian__>( + in__.read_constrain_cholesky_corr>, jacobian__>( lp__, nt, 2, 2), "assigning variable L_Omega"); Eigen::Matrix z1; z1 = Eigen::Matrix(NS); @@ -18993,7 +18997,7 @@ class param_constraint_model final : public model_base_crtp, jacobian__>( + in__.read_constrain_lb, jacobian__>( rvalue(L_Omega, "L_Omega", index_uni(1), index_uni(1), index_uni(2)), lp__, NS), "assigning variable z1"); @@ -19034,7 +19038,7 @@ class param_constraint_model final : public model_base_crtp>, jacobian__>( + in__.read_constrain_cholesky_corr>, jacobian__>( lp__, nt, 2, 2), "assigning variable L_Omega"); Eigen::Matrix z1; z1 = Eigen::Matrix(NS); @@ -19042,7 +19046,7 @@ class param_constraint_model final : public model_base_crtp, jacobian__>( + in__.read_constrain_lb, jacobian__>( rvalue(L_Omega, "L_Omega", index_uni(1), index_uni(1), index_uni(2)), lp__, NS), "assigning variable z1"); @@ -27247,7 +27251,7 @@ class tilde_block_model final : public model_base_crtp { x = DUMMY_VAR__; current_statement__ = 1; - x = in__.read_lb(0, lp__); + x = in__.read_constrain_lb(0, lp__); { current_statement__ = 4; if (t) { @@ -27309,7 +27313,7 @@ class tilde_block_model final : public model_base_crtp { x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - x = in__.read_lb(0, lp__); + x = in__.read_constrain_lb(0, lp__); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -28017,7 +28021,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 1; assign(p_1, - in__.read_lb, jacobian__>( + in__.read_constrain_lb, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_1"); current_statement__ = 1; @@ -28028,7 +28032,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 2; assign(p_2, - in__.read_ub, jacobian__>( + in__.read_constrain_ub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_2"); current_statement__ = 2; @@ -28039,7 +28043,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 3; assign(p_3, - in__.read_lub, jacobian__>( + in__.read_constrain_lub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_3"); @@ -28054,7 +28058,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 4; assign(p_4, - in__.read_lub, jacobian__>(0, + in__.read_constrain_lub, jacobian__>(0, rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_4"); current_statement__ = 4; @@ -28065,7 +28069,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 5; assign(p_5, - in__.read_lub, jacobian__>( + in__.read_constrain_lub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), "assigning variable p_5"); current_statement__ = 5; @@ -28076,7 +28080,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 6; assign(p_6, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), "assigning variable p_6"); current_statement__ = 6; @@ -28087,7 +28091,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 7; assign(p_7, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( 0, rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_7"); current_statement__ = 7; @@ -28098,7 +28102,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 8; assign(p_8, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_8"); @@ -28113,7 +28117,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 9; assign(p_9, - in__.read_lub>, jacobian__>( + in__.read_constrain_lub>, jacobian__>( rvalue(ds, "ds", index_uni(1)), 1, lp__, m, k), "assigning variable p_9"); current_statement__ = 9; @@ -28124,7 +28128,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 10; assign(p_10, - in__.read_lub>>, jacobian__>( + in__.read_constrain_lub>>, jacobian__>( 0, ds, lp__, n, m, k), "assigning variable p_10"); current_statement__ = 10; check_matching_dims("constraint", "p_10", p_10, "upper", ds); @@ -28134,7 +28138,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 11; assign(pv_1, - in__.read_lub, jacobian__>( + in__.read_constrain_lub, jacobian__>( rvalue(dv, "dv", index_uni(1), index_uni(1)), rvalue(dv, "dv", index_uni(1), index_uni(2)), lp__, k), "assigning variable pv_1"); @@ -28150,7 +28154,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 12; assign(pv_2, - in__.read_lb>, jacobian__>( + in__.read_constrain_lb>, jacobian__>( rvalue(dv, "dv", index_uni(1)), lp__, m, k), "assigning variable pv_2"); current_statement__ = 12; @@ -28162,7 +28166,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 13; assign(pv_3, - in__.read_ub>>, jacobian__>( + in__.read_constrain_ub>>, jacobian__>( dv, lp__, n, m, k), "assigning variable pv_3"); current_statement__ = 13; check_matching_dims("constraint", "pv_3", pv_3, "upper", dv); @@ -28172,7 +28176,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 14; assign(pr_1, - in__.read_lub, jacobian__>( + in__.read_constrain_lub, jacobian__>( rvalue(dr, "dr", index_uni(1), index_uni(1)), rvalue(dr, "dr", index_uni(1), index_uni(2)), lp__, k), "assigning variable pr_1"); @@ -28188,7 +28192,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 15; assign(pr_2, - in__.read_lb>, jacobian__>( + in__.read_constrain_lb>, jacobian__>( rvalue(dr, "dr", index_uni(1)), lp__, m, k), "assigning variable pr_2"); current_statement__ = 15; @@ -28200,7 +28204,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 16; assign(pr_3, - in__.read_ub>>, jacobian__>( + in__.read_constrain_ub>>, jacobian__>( dr, lp__, n, m, k), "assigning variable pr_3"); current_statement__ = 16; check_matching_dims("constraint", "pr_3", pr_3, "upper", dr); @@ -28210,7 +28214,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 17; assign(pm_1, - in__.read_lb, jacobian__>( + in__.read_constrain_lb, jacobian__>( rvalue(dm, "dm", index_uni(1)), lp__, m, k), "assigning variable pm_1"); current_statement__ = 17; @@ -28222,7 +28226,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 18; assign(pm_2, - in__.read_ub>, jacobian__>( + in__.read_constrain_ub>, jacobian__>( dm, lp__, n, m, k), "assigning variable pm_2"); current_statement__ = 18; check_matching_dims("constraint", "pm_2", pm_2, "upper", dm); @@ -28625,7 +28629,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 1; assign(p_1, - in__.read_lb, jacobian__>( + in__.read_constrain_lb, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_1"); current_statement__ = 1; @@ -28636,7 +28640,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 2; assign(p_2, - in__.read_ub, jacobian__>( + in__.read_constrain_ub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_2"); current_statement__ = 2; @@ -28647,7 +28651,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 3; assign(p_3, - in__.read_lub, jacobian__>( + in__.read_constrain_lub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_3"); @@ -28662,7 +28666,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 4; assign(p_4, - in__.read_lub, jacobian__>(0, + in__.read_constrain_lub, jacobian__>(0, rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_4"); current_statement__ = 4; @@ -28673,7 +28677,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 5; assign(p_5, - in__.read_lub, jacobian__>( + in__.read_constrain_lub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), "assigning variable p_5"); current_statement__ = 5; @@ -28684,7 +28688,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 6; assign(p_6, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), "assigning variable p_6"); current_statement__ = 6; @@ -28695,7 +28699,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 7; assign(p_7, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( 0, rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_7"); current_statement__ = 7; @@ -28706,7 +28710,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 8; assign(p_8, - in__.read_offset_multiplier, jacobian__>( + in__.read_constrain_offset_multiplier, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_8"); @@ -28721,7 +28725,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 9; assign(p_9, - in__.read_lub>, jacobian__>( + in__.read_constrain_lub>, jacobian__>( rvalue(ds, "ds", index_uni(1)), 1, lp__, m, k), "assigning variable p_9"); current_statement__ = 9; @@ -28732,7 +28736,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 10; assign(p_10, - in__.read_lub>>, jacobian__>( + in__.read_constrain_lub>>, jacobian__>( 0, ds, lp__, n, m, k), "assigning variable p_10"); current_statement__ = 10; check_matching_dims("constraint", "p_10", p_10, "upper", ds); @@ -28742,7 +28746,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 11; assign(pv_1, - in__.read_lub, jacobian__>( + in__.read_constrain_lub, jacobian__>( rvalue(dv, "dv", index_uni(1), index_uni(1)), rvalue(dv, "dv", index_uni(1), index_uni(2)), lp__, k), "assigning variable pv_1"); @@ -28758,7 +28762,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 12; assign(pv_2, - in__.read_lb>, jacobian__>( + in__.read_constrain_lb>, jacobian__>( rvalue(dv, "dv", index_uni(1)), lp__, m, k), "assigning variable pv_2"); current_statement__ = 12; @@ -28770,7 +28774,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 13; assign(pv_3, - in__.read_ub>>, jacobian__>( + in__.read_constrain_ub>>, jacobian__>( dv, lp__, n, m, k), "assigning variable pv_3"); current_statement__ = 13; check_matching_dims("constraint", "pv_3", pv_3, "upper", dv); @@ -28780,7 +28784,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 14; assign(pr_1, - in__.read_lub, jacobian__>( + in__.read_constrain_lub, jacobian__>( rvalue(dr, "dr", index_uni(1), index_uni(1)), rvalue(dr, "dr", index_uni(1), index_uni(2)), lp__, k), "assigning variable pr_1"); @@ -28796,7 +28800,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 15; assign(pr_2, - in__.read_lb>, jacobian__>( + in__.read_constrain_lb>, jacobian__>( rvalue(dr, "dr", index_uni(1)), lp__, m, k), "assigning variable pr_2"); current_statement__ = 15; @@ -28808,7 +28812,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 16; assign(pr_3, - in__.read_ub>>, jacobian__>( + in__.read_constrain_ub>>, jacobian__>( dr, lp__, n, m, k), "assigning variable pr_3"); current_statement__ = 16; check_matching_dims("constraint", "pr_3", pr_3, "upper", dr); @@ -28818,7 +28822,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 17; assign(pm_1, - in__.read_lb, jacobian__>( + in__.read_constrain_lb, jacobian__>( rvalue(dm, "dm", index_uni(1)), lp__, m, k), "assigning variable pm_1"); current_statement__ = 17; @@ -28830,7 +28834,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 18; assign(pm_2, - in__.read_ub>, jacobian__>( + in__.read_constrain_ub>, jacobian__>( dm, lp__, n, m, k), "assigning variable pm_2"); current_statement__ = 18; check_matching_dims("constraint", "pm_2", pm_2, "upper", dm); @@ -30795,7 +30799,7 @@ class truncate_model final : public model_base_crtp { y = DUMMY_VAR__; current_statement__ = 2; - y = in__.read_lb(0, lp__); + y = in__.read_constrain_lb(0, lp__); { current_statement__ = 3; lp_accum__.add(normal_lpdf(x, m, 1)); @@ -30918,7 +30922,7 @@ class truncate_model final : public model_base_crtp { y = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - y = in__.read_lb(0, lp__); + y = in__.read_constrain_lb(0, lp__); vars__.emplace_back(m); vars__.emplace_back(y); if (logical_negation((primitive_value(emit_transformed_parameters__) || @@ -31608,7 +31612,7 @@ class user_constrain_model final : public model_base_crtp x = DUMMY_VAR__; current_statement__ = 1; - x = in__.read_lb(0, lp__); + x = in__.read_constrain_lb(0, lp__); { current_statement__ = 2; lp_accum__.add(std_normal_lpdf(x)); @@ -31648,7 +31652,7 @@ class user_constrain_model final : public model_base_crtp x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - x = in__.read_lb(0, lp__); + x = in__.read_constrain_lb(0, lp__); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { diff --git a/test/integration/good/code-gen/profiling/cpp.expected b/test/integration/good/code-gen/profiling/cpp.expected index a34a3981c6..e78416b6b8 100644 --- a/test/integration/good/code-gen/profiling/cpp.expected +++ b/test/integration/good/code-gen/profiling/cpp.expected @@ -177,17 +177,17 @@ class simple_function_model final : public model_base_crtp(0, lp__); + rho = in__.read_constrain_lb(0, lp__); local_scalar_t__ alpha; alpha = DUMMY_VAR__; current_statement__ = 2; - alpha = in__.read_lb(0, lp__); + alpha = in__.read_constrain_lb(0, lp__); local_scalar_t__ sigma; sigma = DUMMY_VAR__; current_statement__ = 3; - sigma = in__.read_lb(0, lp__); + sigma = in__.read_constrain_lb(0, lp__); { current_statement__ = 4; validate_non_negative_index("cov", "N", N); @@ -282,17 +282,17 @@ class simple_function_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - rho = in__.read_lb(0, lp__); + rho = in__.read_constrain_lb(0, lp__); double alpha; alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - alpha = in__.read_lb(0, lp__); + alpha = in__.read_constrain_lb(0, lp__); double sigma; sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - sigma = in__.read_lb(0, lp__); + sigma = in__.read_constrain_lb(0, lp__); vars__.emplace_back(rho); vars__.emplace_back(alpha); vars__.emplace_back(sigma); diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 075be54498..80a574b482 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -289,22 +289,22 @@ class ad_level_failing_model final : public model_base_crtp(0, lp__); + beta = in__.read_constrain_lb(0, lp__); local_scalar_t__ gamma; gamma = DUMMY_VAR__; current_statement__ = 2; - gamma = in__.read_lb(0, lp__); + gamma = in__.read_constrain_lb(0, lp__); local_scalar_t__ xi; xi = DUMMY_VAR__; current_statement__ = 3; - xi = in__.read_lb(0, lp__); + xi = in__.read_constrain_lb(0, lp__); local_scalar_t__ delta; delta = DUMMY_VAR__; current_statement__ = 4; - delta = in__.read_lb(0, lp__); + delta = in__.read_constrain_lb(0, lp__); std::vector> y; y = std::vector>(N_t, std::vector(4, DUMMY_VAR__)); @@ -470,22 +470,22 @@ class ad_level_failing_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - beta = in__.read_lb(0, lp__); + beta = in__.read_constrain_lb(0, lp__); double gamma; gamma = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - gamma = in__.read_lb(0, lp__); + gamma = in__.read_constrain_lb(0, lp__); double xi; xi = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - xi = in__.read_lb(0, lp__); + xi = in__.read_constrain_lb(0, lp__); double delta; delta = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - delta = in__.read_lb(0, lp__); + delta = in__.read_constrain_lb(0, lp__); std::vector> y; y = std::vector>(N_t, std::vector(4, std::numeric_limits::quiet_NaN())); @@ -1846,15 +1846,16 @@ class copy_fail_model final : public model_base_crtp { mean_p = DUMMY_VAR__; current_statement__ = 1; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; assign(beta, - in__.read_lub, jacobian__>(0, - 1, lp__, max_age), "assigning variable beta"); + in__.read_constrain_lub, jacobian__>( + 0, 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -2382,15 +2383,16 @@ class copy_fail_model final : public model_base_crtp { mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(beta, - in__.read_lub, jacobian__>(0, - 1, lp__, max_age), "assigning variable beta"); + in__.read_constrain_lub, jacobian__>( + 0, 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -3707,32 +3709,37 @@ class dce_fail_model final : public model_base_crtp { sigma = DUMMY_VAR__; current_statement__ = 1; - sigma = in__.read_lb(0, lp__); + sigma = in__.read_constrain_lb(0, lp__); local_scalar_t__ sigma_age; sigma_age = DUMMY_VAR__; current_statement__ = 2; - sigma_age = in__.read_lb(0, lp__); + sigma_age = in__.read_constrain_lb(0, + lp__); local_scalar_t__ sigma_edu; sigma_edu = DUMMY_VAR__; current_statement__ = 3; - sigma_edu = in__.read_lb(0, lp__); + sigma_edu = in__.read_constrain_lb(0, + lp__); local_scalar_t__ sigma_state; sigma_state = DUMMY_VAR__; current_statement__ = 4; - sigma_state = in__.read_lb(0, lp__); + sigma_state = in__.read_constrain_lb(0, + lp__); local_scalar_t__ sigma_region; sigma_region = DUMMY_VAR__; current_statement__ = 5; - sigma_region = in__.read_lb(0, lp__); + sigma_region = in__.read_constrain_lb(0, + lp__); local_scalar_t__ sigma_age_edu; sigma_age_edu = DUMMY_VAR__; current_statement__ = 6; - sigma_age_edu = in__.read_lb(0, lp__); + sigma_age_edu = in__.read_constrain_lb(0, + lp__); local_scalar_t__ b_0; b_0 = DUMMY_VAR__; @@ -3983,32 +3990,37 @@ class dce_fail_model final : public model_base_crtp { sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - sigma = in__.read_lb(0, lp__); + sigma = in__.read_constrain_lb(0, lp__); double sigma_age; sigma_age = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - sigma_age = in__.read_lb(0, lp__); + sigma_age = in__.read_constrain_lb(0, + lp__); double sigma_edu; sigma_edu = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - sigma_edu = in__.read_lb(0, lp__); + sigma_edu = in__.read_constrain_lb(0, + lp__); double sigma_state; sigma_state = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma_state = in__.read_lb(0, lp__); + sigma_state = in__.read_constrain_lb(0, + lp__); double sigma_region; sigma_region = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - sigma_region = in__.read_lb(0, lp__); + sigma_region = in__.read_constrain_lb(0, + lp__); double sigma_age_edu; sigma_age_edu = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - sigma_age_edu = in__.read_lb(0, lp__); + sigma_age_edu = in__.read_constrain_lb(0, + lp__); double b_0; b_0 = std::numeric_limits::quiet_NaN(); @@ -5587,20 +5599,21 @@ class expr_prop_fail_model final : public model_base_crtp current_statement__ = 1; assign(mu, - in__.read_ordered, jacobian__>( + in__.read_constrain_ordered, jacobian__>( lp__, 2), "assigning variable mu"); std::vector sigma; sigma = std::vector(2, DUMMY_VAR__); current_statement__ = 2; assign(sigma, - in__.read_lb, jacobian__>(0, lp__, 2), - "assigning variable sigma"); + in__.read_constrain_lb, jacobian__>(0, + lp__, 2), "assigning variable sigma"); local_scalar_t__ theta; theta = DUMMY_VAR__; current_statement__ = 3; - theta = in__.read_lub(0, 1, lp__); + theta = in__.read_constrain_lub(0, 1, + lp__); { current_statement__ = 4; lp_accum__.add(normal_lpdf(sigma, 0, 2)); @@ -5674,20 +5687,21 @@ class expr_prop_fail_model final : public model_base_crtp current_statement__ = 1; assign(mu, - in__.read_ordered, jacobian__>( + in__.read_constrain_ordered, jacobian__>( lp__, 2), "assigning variable mu"); std::vector sigma; sigma = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(sigma, - in__.read_lb, jacobian__>(0, lp__, 2), - "assigning variable sigma"); + in__.read_constrain_lb, jacobian__>(0, + lp__, 2), "assigning variable sigma"); double theta; theta = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - theta = in__.read_lub(0, 1, lp__); + theta = in__.read_constrain_lub(0, 1, + lp__); { vars__.emplace_back(rvalue(mu, "mu", index_uni(1))); { @@ -6161,7 +6175,7 @@ class expr_prop_fail2_model final : public model_base_crtp(0, lp__); + tau = in__.read_constrain_lb(0, lp__); { current_statement__ = 4; lp_accum__.add(normal_lpdf(theta, mu, tau)); @@ -6219,7 +6233,7 @@ class expr_prop_fail2_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 3; - tau = in__.read_lb(0, lp__); + tau = in__.read_constrain_lb(0, lp__); vars__.emplace_back(mu); if (logical_gte(J, 1)) { vars__.emplace_back(rvalue(theta, "theta", index_uni(1))); @@ -7138,27 +7152,32 @@ class expr_prop_fail3_model final : public model_base_crtp(0, 100, lp__); + sigma_a = in__.read_constrain_lub(0, 100, + lp__); local_scalar_t__ sigma_b; sigma_b = DUMMY_VAR__; current_statement__ = 8; - sigma_b = in__.read_lub(0, 100, lp__); + sigma_b = in__.read_constrain_lub(0, 100, + lp__); local_scalar_t__ sigma_c; sigma_c = DUMMY_VAR__; current_statement__ = 9; - sigma_c = in__.read_lub(0, 100, lp__); + sigma_c = in__.read_constrain_lub(0, 100, + lp__); local_scalar_t__ sigma_d; sigma_d = DUMMY_VAR__; current_statement__ = 10; - sigma_d = in__.read_lub(0, 100, lp__); + sigma_d = in__.read_constrain_lub(0, 100, + lp__); local_scalar_t__ sigma_e; sigma_e = DUMMY_VAR__; current_statement__ = 11; - sigma_e = in__.read_lub(0, 100, lp__); + sigma_e = in__.read_constrain_lub(0, 100, + lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -7332,27 +7351,32 @@ class expr_prop_fail3_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 7; - sigma_a = in__.read_lub(0, 100, lp__); + sigma_a = in__.read_constrain_lub(0, 100, + lp__); double sigma_b; sigma_b = std::numeric_limits::quiet_NaN(); current_statement__ = 8; - sigma_b = in__.read_lub(0, 100, lp__); + sigma_b = in__.read_constrain_lub(0, 100, + lp__); double sigma_c; sigma_c = std::numeric_limits::quiet_NaN(); current_statement__ = 9; - sigma_c = in__.read_lub(0, 100, lp__); + sigma_c = in__.read_constrain_lub(0, 100, + lp__); double sigma_d; sigma_d = std::numeric_limits::quiet_NaN(); current_statement__ = 10; - sigma_d = in__.read_lub(0, 100, lp__); + sigma_d = in__.read_constrain_lub(0, 100, + lp__); double sigma_e; sigma_e = std::numeric_limits::quiet_NaN(); current_statement__ = 11; - sigma_e = in__.read_lub(0, 100, lp__); + sigma_e = in__.read_constrain_lub(0, 100, + lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -8363,7 +8387,7 @@ class expr_prop_fail4_model final : public model_base_crtp(0, lp__); + tau_phi = in__.read_constrain_lb(0, lp__); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix((N - 1)); stan::math::fill(phi_std_raw, DUMMY_VAR__); @@ -8461,7 +8485,7 @@ class expr_prop_fail4_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - tau_phi = in__.read_lb(0, lp__); + tau_phi = in__.read_constrain_lb(0, lp__); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix((N - 1)); stan::math::fill(phi_std_raw, std::numeric_limits::quiet_NaN()); @@ -9784,12 +9808,14 @@ class expr_prop_fail5_model final : public model_base_crtp(0, 1, lp__); + mean_phi = in__.read_constrain_lub(0, 1, + lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(nind); stan::math::fill(epsilon, DUMMY_VAR__); @@ -9802,7 +9828,8 @@ class expr_prop_fail5_model final : public model_base_crtp(0, 5, lp__); + sigma = in__.read_constrain_lub(0, 5, + lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -10331,12 +10358,14 @@ class expr_prop_fail5_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.read_lub(0, 1, lp__); + mean_phi = in__.read_constrain_lub(0, 1, + lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(nind); stan::math::fill(epsilon, std::numeric_limits::quiet_NaN()); @@ -10349,7 +10378,8 @@ class expr_prop_fail5_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 4; - sigma = in__.read_lub(0, 5, lp__); + sigma = in__.read_constrain_lub(0, 5, + lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -12583,25 +12613,27 @@ class expr_prop_fail6_model final : public model_base_crtp(0, 1, lp__); + mean_phi = in__.read_constrain_lub(0, 1, + lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); local_scalar_t__ psi; psi = DUMMY_VAR__; current_statement__ = 3; - psi = in__.read_lub(0, 1, lp__); + psi = in__.read_constrain_lub(0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(n_occasions); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 4; assign(beta, - in__.read_lb, jacobian__>(0, - lp__, n_occasions), "assigning variable beta"); + in__.read_constrain_lb, jacobian__>( + 0, lp__, n_occasions), "assigning variable beta"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(M); stan::math::fill(epsilon, DUMMY_VAR__); @@ -12613,7 +12645,8 @@ class expr_prop_fail6_model final : public model_base_crtp(0, 5, lp__); + sigma = in__.read_constrain_lub(0, 5, + lp__); Eigen::Matrix phi; phi = Eigen::Matrix(M, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -13558,25 +13591,27 @@ class expr_prop_fail6_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.read_lub(0, 1, lp__); + mean_phi = in__.read_constrain_lub(0, 1, + lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); double psi; psi = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - psi = in__.read_lub(0, 1, lp__); + psi = in__.read_constrain_lub(0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(n_occasions); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(beta, - in__.read_lb, jacobian__>(0, - lp__, n_occasions), "assigning variable beta"); + in__.read_constrain_lb, jacobian__>( + 0, lp__, n_occasions), "assigning variable beta"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(M); stan::math::fill(epsilon, std::numeric_limits::quiet_NaN()); @@ -13588,7 +13623,8 @@ class expr_prop_fail6_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 6; - sigma = in__.read_lub(0, 5, lp__); + sigma = in__.read_constrain_lub(0, 5, + lp__); Eigen::Matrix phi; phi = Eigen::Matrix(M, (n_occasions - 1)); stan::math::fill(phi, std::numeric_limits::quiet_NaN()); @@ -15353,7 +15389,7 @@ class expr_prop_fail7_model final : public model_base_crtp, jacobian__>( + in__.read_constrain_simplex, jacobian__>( lp__, K), "assigning variable pi"); std::vector>> theta; theta = std::vector>>(J, std::vector>(K, Eigen::Matrix(K))); @@ -15361,7 +15397,7 @@ class expr_prop_fail7_model final : public model_base_crtp>>, jacobian__>( + in__.read_constrain_simplex>>, jacobian__>( lp__, J, K, K), "assigning variable theta"); { current_statement__ = 10; @@ -15533,7 +15569,7 @@ class expr_prop_fail7_model final : public model_base_crtp, jacobian__>( + in__.read_constrain_simplex, jacobian__>( lp__, K), "assigning variable pi"); std::vector>> theta; theta = std::vector>>(J, std::vector>(K, Eigen::Matrix(K))); @@ -15541,7 +15577,7 @@ class expr_prop_fail7_model final : public model_base_crtp>>, jacobian__>( + in__.read_constrain_simplex>>, jacobian__>( lp__, J, K, K), "assigning variable theta"); lcm_sym26__ = logical_gte(K, 1); if (lcm_sym26__) { @@ -16470,12 +16506,13 @@ class expr_prop_fail8_model final : public model_base_crtp(0, lp__); + tau_theta = in__.read_constrain_lb(0, + lp__); local_scalar_t__ tau_phi; tau_phi = DUMMY_VAR__; current_statement__ = 4; - tau_phi = in__.read_lb(0, lp__); + tau_phi = in__.read_constrain_lb(0, lp__); Eigen::Matrix theta_std; theta_std = Eigen::Matrix(N); stan::math::fill(theta_std, DUMMY_VAR__); @@ -16568,12 +16605,13 @@ class expr_prop_fail8_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 3; - tau_theta = in__.read_lb(0, lp__); + tau_theta = in__.read_constrain_lb(0, + lp__); double tau_phi; tau_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - tau_phi = in__.read_lb(0, lp__); + tau_phi = in__.read_constrain_lb(0, lp__); Eigen::Matrix theta_std; theta_std = Eigen::Matrix(N); stan::math::fill(theta_std, std::numeric_limits::quiet_NaN()); @@ -17951,15 +17989,16 @@ class fails_test_model final : public model_base_crtp { mean_p = DUMMY_VAR__; current_statement__ = 1; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; assign(beta, - in__.read_lub, jacobian__>(0, - 1, lp__, max_age), "assigning variable beta"); + in__.read_constrain_lub, jacobian__>( + 0, 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -18487,15 +18526,16 @@ class fails_test_model final : public model_base_crtp { mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(beta, - in__.read_lub, jacobian__>(0, - 1, lp__, max_age), "assigning variable beta"); + in__.read_constrain_lub, jacobian__>( + 0, 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -20750,20 +20790,22 @@ class inlining_fail2_model final : public model_base_crtp mean_phi = DUMMY_VAR__; current_statement__ = 1; - mean_phi = in__.read_lub(0, 1, lp__); + mean_phi = in__.read_constrain_lub(0, 1, + lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); Eigen::Matrix gamma; gamma = Eigen::Matrix(n_occasions); stan::math::fill(gamma, DUMMY_VAR__); current_statement__ = 3; assign(gamma, - in__.read_lub, jacobian__>(0, - 1, lp__, n_occasions), "assigning variable gamma"); + in__.read_constrain_lub, jacobian__>( + 0, 1, lp__, n_occasions), "assigning variable gamma"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix((n_occasions - 1)); stan::math::fill(epsilon, DUMMY_VAR__); @@ -20776,7 +20818,8 @@ class inlining_fail2_model final : public model_base_crtp sigma = DUMMY_VAR__; current_statement__ = 5; - sigma = in__.read_lub(0, 5, lp__); + sigma = in__.read_constrain_lub(0, 5, + lp__); Eigen::Matrix phi; phi = Eigen::Matrix(M, lcm_sym297__); stan::math::fill(phi, DUMMY_VAR__); @@ -21676,20 +21719,22 @@ class inlining_fail2_model final : public model_base_crtp mean_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.read_lub(0, 1, lp__); + mean_phi = in__.read_constrain_lub(0, 1, + lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); Eigen::Matrix gamma; gamma = Eigen::Matrix(n_occasions); stan::math::fill(gamma, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(gamma, - in__.read_lub, jacobian__>(0, - 1, lp__, n_occasions), "assigning variable gamma"); + in__.read_constrain_lub, jacobian__>( + 0, 1, lp__, n_occasions), "assigning variable gamma"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix((n_occasions - 1)); stan::math::fill(epsilon, std::numeric_limits::quiet_NaN()); @@ -21702,7 +21747,8 @@ class inlining_fail2_model final : public model_base_crtp sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - sigma = in__.read_lub(0, 5, lp__); + sigma = in__.read_constrain_lub(0, 5, + lp__); Eigen::Matrix phi; phi = Eigen::Matrix(M, lcm_sym198__); stan::math::fill(phi, DUMMY_VAR__); @@ -24783,12 +24829,14 @@ class lcm_fails2_model final : public model_base_crtp { mean_phi = DUMMY_VAR__; current_statement__ = 1; - mean_phi = in__.read_lub(0, 1, lp__); + mean_phi = in__.read_constrain_lub(0, 1, + lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -25300,12 +25348,14 @@ class lcm_fails2_model final : public model_base_crtp { mean_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.read_lub(0, 1, lp__); + mean_phi = in__.read_constrain_lub(0, 1, + lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.read_lub(0, 1, lp__); + mean_p = in__.read_constrain_lub(0, 1, + lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, std::numeric_limits::quiet_NaN()); @@ -27894,17 +27944,20 @@ class off_small_model final : public model_base_crtp { sigma_a1 = DUMMY_VAR__; current_statement__ = 6; - sigma_a1 = in__.read_lub(0, 100, lp__); + sigma_a1 = in__.read_constrain_lub(0, + 100, lp__); local_scalar_t__ sigma_a2; sigma_a2 = DUMMY_VAR__; current_statement__ = 7; - sigma_a2 = in__.read_lub(0, 100, lp__); + sigma_a2 = in__.read_constrain_lub(0, + 100, lp__); local_scalar_t__ sigma_y; sigma_y = DUMMY_VAR__; current_statement__ = 8; - sigma_y = in__.read_lub(0, 100, lp__); + sigma_y = in__.read_constrain_lub(0, 100, + lp__); Eigen::Matrix a1; a1 = Eigen::Matrix(J); stan::math::fill(a1, DUMMY_VAR__); @@ -28045,17 +28098,20 @@ class off_small_model final : public model_base_crtp { sigma_a1 = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - sigma_a1 = in__.read_lub(0, 100, lp__); + sigma_a1 = in__.read_constrain_lub(0, + 100, lp__); double sigma_a2; sigma_a2 = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - sigma_a2 = in__.read_lub(0, 100, lp__); + sigma_a2 = in__.read_constrain_lub(0, + 100, lp__); double sigma_y; sigma_y = std::numeric_limits::quiet_NaN(); current_statement__ = 8; - sigma_y = in__.read_lub(0, 100, lp__); + sigma_y = in__.read_constrain_lub(0, 100, + lp__); Eigen::Matrix a1; a1 = Eigen::Matrix(J); stan::math::fill(a1, std::numeric_limits::quiet_NaN()); @@ -28856,7 +28912,7 @@ class optimizations_model final : public model_base_crtp { current_statement__ = 5; assign(x_cov, - in__.read_cov_matrix, jacobian__>( + in__.read_constrain_cov_matrix, jacobian__>( lp__, 2, 2), "assigning variable x_cov"); { double x; @@ -29426,7 +29482,7 @@ class optimizations_model final : public model_base_crtp { current_statement__ = 5; assign(x_cov, - in__.read_cov_matrix, jacobian__>( + in__.read_constrain_cov_matrix, jacobian__>( lp__, 2, 2), "assigning variable x_cov"); vars__.emplace_back(theta); vars__.emplace_back(phi); @@ -30274,12 +30330,14 @@ class partial_eval_model final : public model_base_crtp { sigma_a = DUMMY_VAR__; current_statement__ = 4; - sigma_a = in__.read_lub(0, 100, lp__); + sigma_a = in__.read_constrain_lub(0, 100, + lp__); local_scalar_t__ sigma_y; sigma_y = DUMMY_VAR__; current_statement__ = 5; - sigma_y = in__.read_lub(0, 100, lp__); + sigma_y = in__.read_constrain_lub(0, 100, + lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -30380,12 +30438,14 @@ class partial_eval_model final : public model_base_crtp { sigma_a = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma_a = in__.read_lub(0, 100, lp__); + sigma_a = in__.read_constrain_lub(0, 100, + lp__); double sigma_y; sigma_y = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - sigma_y = in__.read_lub(0, 100, lp__); + sigma_y = in__.read_constrain_lub(0, 100, + lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -31072,7 +31132,7 @@ class stalled1_failure_model final : public model_base_crtp(0, lp__); + tau = in__.read_constrain_lb(0, lp__); std::vector> b; b = std::vector>(I, Eigen::Matrix(8)); stan::math::fill(b, DUMMY_VAR__); @@ -31193,7 +31253,7 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 5; - tau = in__.read_lb(0, lp__); + tau = in__.read_constrain_lb(0, lp__); std::vector> b; b = std::vector>(I, Eigen::Matrix(8)); stan::math::fill(b, std::numeric_limits::quiet_NaN()); From 7a601ac404136486d7bfab0a55a99496921bb314 Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Thu, 18 Mar 2021 11:56:52 -0400 Subject: [PATCH 07/31] change reader to deserializer in printed C++ code --- src/stan_math_backend/Stan_math_code_gen.ml | 2 +- .../cli-args/filename_good.expected | 2 +- test/integration/good/code-gen/cl.expected | 2 +- test/integration/good/code-gen/cpp.expected | 38 +++++++------- .../good/code-gen/expressions/cpp.expected | 2 +- .../good/code-gen/opencl/cpp.expected | 4 +- .../good/code-gen/profiling/cpp.expected | 2 +- .../good/compiler-optimizations/cpp.expected | 52 +++++++++---------- 8 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/stan_math_backend/Stan_math_code_gen.ml b/src/stan_math_backend/Stan_math_code_gen.ml index 880c4d160a..86d9b543e6 100644 --- a/src/stan_math_backend/Stan_math_code_gen.ml +++ b/src/stan_math_backend/Stan_math_code_gen.ml @@ -674,7 +674,7 @@ let pp_log_prob ppf Program.({prog_name; log_prob; _}) = [ "using T__ = stan::scalar_type_t;" ; "using local_scalar_t__ = T__;"; "T__ lp__(0.0);" ; "stan::math::accumulator lp_accum__;" - ; "stan::io::reader in__(params_r__, params_i__);" + ; "stan::io::deserializer in__(params_r__, params_i__);" ; "int current_statement__ = 0;" ; "local_scalar_t__ \ DUMMY_VAR__(std::numeric_limits::quiet_NaN());" ] diff --git a/test/integration/cli-args/filename_good.expected b/test/integration/cli-args/filename_good.expected index 7069005dee..c8aa31a37c 100644 --- a/test/integration/cli-args/filename_good.expected +++ b/test/integration/cli-args/filename_good.expected @@ -92,7 +92,7 @@ class filename_good_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index daa68d87a8..0d3dc8c12e 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -562,7 +562,7 @@ class optimize_glm_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 6443bec8e1..2d8c3cf32c 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -138,7 +138,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -580,7 +580,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -957,7 +957,7 @@ class eight_schools_ncp_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -1399,7 +1399,7 @@ class mixed_type_arrays_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -6711,7 +6711,7 @@ class mother_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -11013,7 +11013,7 @@ class motherHOF_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -13282,7 +13282,7 @@ class new_integrate_interface_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -16701,7 +16701,7 @@ class old_integrate_interface_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -17724,7 +17724,7 @@ class optimize_glm_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -18975,7 +18975,7 @@ class param_constraint_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -19604,7 +19604,7 @@ class reduce_sum_m1_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -21203,7 +21203,7 @@ class reduce_sum_m2_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -25236,7 +25236,7 @@ class reduce_sum_m3_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -26922,7 +26922,7 @@ class single_argument_lpmf_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -27239,7 +27239,7 @@ class tilde_block_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -28008,7 +28008,7 @@ class transform_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -30782,7 +30782,7 @@ class truncate_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -31242,7 +31242,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -31600,7 +31600,7 @@ class user_constrain_model final : public model_base_crtp using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index 9751bac886..fc56b6d390 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -242,7 +242,7 @@ class simple_function_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning diff --git a/test/integration/good/code-gen/opencl/cpp.expected b/test/integration/good/code-gen/opencl/cpp.expected index a780bda731..436fae10ce 100644 --- a/test/integration/good/code-gen/opencl/cpp.expected +++ b/test/integration/good/code-gen/opencl/cpp.expected @@ -963,7 +963,7 @@ class distributions_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -6599,7 +6599,7 @@ class restricted_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning diff --git a/test/integration/good/code-gen/profiling/cpp.expected b/test/integration/good/code-gen/profiling/cpp.expected index e78416b6b8..b777b22511 100644 --- a/test/integration/good/code-gen/profiling/cpp.expected +++ b/test/integration/good/code-gen/profiling/cpp.expected @@ -165,7 +165,7 @@ class simple_function_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 80a574b482..1777b810a3 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -261,7 +261,7 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -1781,7 +1781,7 @@ class copy_fail_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -3675,7 +3675,7 @@ class dce_fail_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -4869,7 +4869,7 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -5213,7 +5213,7 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -5579,7 +5579,7 @@ class expr_prop_fail_model final : public model_base_crtp using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -6150,7 +6150,7 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -7087,7 +7087,7 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -8369,7 +8369,7 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -9743,7 +9743,7 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -12512,7 +12512,7 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -15361,7 +15361,7 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -16481,7 +16481,7 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -17924,7 +17924,7 @@ class fails_test_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -20699,7 +20699,7 @@ class inlining_fail2_model final : public model_base_crtp using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -23052,7 +23052,7 @@ class lcm_experiment_model final : public model_base_crtp using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -23363,7 +23363,7 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -23731,7 +23731,7 @@ class lcm_fails_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -24768,7 +24768,7 @@ class lcm_fails2_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -26232,7 +26232,7 @@ class lupdf_inlining_model final : public model_base_crtp using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -26987,7 +26987,7 @@ class off_dce_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -27892,7 +27892,7 @@ class off_small_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -28859,7 +28859,7 @@ class optimizations_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -30292,7 +30292,7 @@ class partial_eval_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -31089,7 +31089,7 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning @@ -31913,7 +31913,7 @@ class unroll_limit_model final : public model_base_crtp { using local_scalar_t__ = T__; T__ lp__(0.0); stan::math::accumulator lp_accum__; - stan::io::reader in__(params_r__, params_i__); + stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning From 0e0fecb3fa632d850f520f88b1770400915646bc Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Thu, 18 Mar 2021 13:02:23 -0400 Subject: [PATCH 08/31] use template keyword when calling read_constrain functions, add a constexpr bool jacobian__ to write_array_impl, change name of read_cholesky_corr to read_cholesky_factor_corr --- src/stan_math_backend/Expression_gen.ml | 3 +- src/stan_math_backend/Stan_math_code_gen.ml | 3 +- src/stan_math_backend/Transform_Mir.ml | 2 +- .../cli-args/filename_good.expected | 1 + test/integration/good/code-gen/cl.expected | 7 +- test/integration/good/code-gen/cpp.expected | 251 +++++++----- .../good/code-gen/expressions/cpp.expected | 1 + .../good/code-gen/opencl/cpp.expected | 2 + .../good/code-gen/profiling/cpp.expected | 19 +- .../good/compiler-optimizations/cpp.expected | 366 ++++++++++-------- 10 files changed, 378 insertions(+), 277 deletions(-) diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index 15f675c70e..f48e871f0a 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -429,7 +429,8 @@ and pp_compiler_internal_fn ad ut f ppf es = else let lp_expr = Expr.Fixed.{pattern= Var "lp__"; meta= emeta} in let arg_exprs = constraint_args @ [lp_expr] @ dims in - pf ppf "@[in__.read_constrain_%s<%a, jacobian__>(@,%a)@]" + pf ppf + "@[in__.template read_constrain_%s<%a, jacobian__>(@,%a)@]" constraint_string pp_unsizedtype_local (UnsizedType.AutoDiffable, ut) (list ~sep:comma pp_expr) arg_exprs diff --git a/src/stan_math_backend/Stan_math_code_gen.ml b/src/stan_math_backend/Stan_math_code_gen.ml index 86d9b543e6..b4b32ad69b 100644 --- a/src/stan_math_backend/Stan_math_code_gen.ml +++ b/src/stan_math_backend/Stan_math_code_gen.ml @@ -516,7 +516,8 @@ let pp_write_array ppf {Program.prog_name; generate_quantities; _} = ; "int current_statement__ = 0; " ; "stan::math::accumulator lp_accum__;" ; "local_scalar_t__ \ - DUMMY_VAR__(std::numeric_limits::quiet_NaN());" ] + DUMMY_VAR__(std::numeric_limits::quiet_NaN());" + ; "constexpr bool jacobian__ = false;" ] pp_unused "DUMMY_VAR__" pp_function__ (prog_name, "write_array") in pp_method_b ppf "void" "write_array_impl" params intro generate_quantities diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index bac030d7e1..da58f7e592 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -191,7 +191,7 @@ let check_constraint_to_string t (c : constrainaction) = let constrain_constraint_to_string t (c : constrainaction) = match t with - | Program.CholeskyCorr -> "cholesky_corr" + | Program.CholeskyCorr -> "cholesky_factor_corr" | _ -> check_constraint_to_string t c let default_multiplier = 1 diff --git a/test/integration/cli-args/filename_good.expected b/test/integration/cli-args/filename_good.expected index c8aa31a37c..b711d1f02c 100644 --- a/test/integration/cli-args/filename_good.expected +++ b/test/integration/cli-args/filename_good.expected @@ -127,6 +127,7 @@ class filename_good_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "filename_good_model_namespace::write_array"; (void) function__; // suppress unused var warning diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index 0d3dc8c12e..8808622690 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -595,7 +595,8 @@ class optimize_glm_model final : public model_base_crtp { sigma = DUMMY_VAR__; current_statement__ = 4; - sigma = in__.read_constrain_lb(0, lp__); + sigma = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ alpha; alpha = DUMMY_VAR__; @@ -1287,6 +1288,7 @@ class optimize_glm_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "optimize_glm_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -1317,7 +1319,8 @@ class optimize_glm_model final : public model_base_crtp { sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma = in__.read_constrain_lb(0, lp__); + sigma = in__.template read_constrain_lb( + 0, lp__); double alpha; alpha = std::numeric_limits::quiet_NaN(); diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 2d8c3cf32c..e1c76717a0 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -155,7 +155,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> tau = DUMMY_VAR__; current_statement__ = 2; - tau = in__.read_constrain_lb(0, lp__); + tau = in__.template read_constrain_lb(0, + lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, DUMMY_VAR__); @@ -207,6 +208,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "_8_schools_ncp_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -221,7 +223,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> tau = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - tau = in__.read_constrain_lb(0, lp__); + tau = in__.template read_constrain_lb(0, + lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, std::numeric_limits::quiet_NaN()); @@ -619,6 +622,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "_8start_with_number_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -974,7 +978,8 @@ class eight_schools_ncp_model final : public model_base_crtp(0, lp__); + tau = in__.template read_constrain_lb(0, + lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, DUMMY_VAR__); @@ -1026,6 +1031,7 @@ class eight_schools_ncp_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "eight_schools_ncp_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -1040,7 +1046,8 @@ class eight_schools_ncp_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 2; - tau = in__.read_constrain_lb(0, lp__); + tau = in__.template read_constrain_lb(0, + lp__); Eigen::Matrix theta_tilde; theta_tilde = Eigen::Matrix(J); stan::math::fill(theta_tilde, std::numeric_limits::quiet_NaN()); @@ -1468,6 +1475,7 @@ class mixed_type_arrays_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "mixed_type_arrays_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -6728,48 +6736,48 @@ class mother_model final : public model_base_crtp { p_upper = DUMMY_VAR__; current_statement__ = 2; - p_upper = in__.read_constrain_lb(p_real, - lp__); + p_upper = in__.template read_constrain_lb( + p_real, lp__); local_scalar_t__ p_lower; p_lower = DUMMY_VAR__; current_statement__ = 3; - p_lower = in__.read_constrain_ub(p_upper, - lp__); + p_lower = in__.template read_constrain_ub( + p_upper, lp__); std::vector offset_multiplier; offset_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 4; assign(offset_multiplier, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( 1, 2, lp__, 5), "assigning variable offset_multiplier"); std::vector no_offset_multiplier; no_offset_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 5; assign(no_offset_multiplier, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( 0, 2, lp__, 5), "assigning variable no_offset_multiplier"); std::vector offset_no_multiplier; offset_no_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 6; assign(offset_no_multiplier, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( 3, 1, lp__, 5), "assigning variable offset_no_multiplier"); std::vector p_real_1d_ar; p_real_1d_ar = std::vector(N, DUMMY_VAR__); current_statement__ = 7; assign(p_real_1d_ar, - in__.read_constrain_lb, jacobian__>(0, - lp__, N), "assigning variable p_real_1d_ar"); + in__.template read_constrain_lb, jacobian__>( + 0, lp__, N), "assigning variable p_real_1d_ar"); std::vector>> p_real_3d_ar; p_real_3d_ar = std::vector>>(N, std::vector>(M, std::vector(K, DUMMY_VAR__))); current_statement__ = 8; assign(p_real_3d_ar, - in__.read_constrain_lb>>, jacobian__>( + in__.template read_constrain_lb>>, jacobian__>( 0, lp__, N, M, K), "assigning variable p_real_3d_ar"); Eigen::Matrix p_vec; p_vec = Eigen::Matrix(N); @@ -6777,7 +6785,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 9; assign(p_vec, - in__.read_constrain_lb, jacobian__>( + in__.template read_constrain_lb, jacobian__>( 0, lp__, N), "assigning variable p_vec"); std::vector> p_1d_vec; p_1d_vec = std::vector>(N, Eigen::Matrix(N)); @@ -6824,7 +6832,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 15; assign(p_ar_mat, - in__.read_constrain_lub>>, jacobian__>( + in__.template read_constrain_lub>>, jacobian__>( 0, 1, lp__, 4, 5, 2, 3), "assigning variable p_ar_mat"); Eigen::Matrix p_simplex; p_simplex = Eigen::Matrix(N); @@ -6832,7 +6840,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 16; assign(p_simplex, - in__.read_constrain_simplex, jacobian__>( + in__.template read_constrain_simplex, jacobian__>( lp__, N), "assigning variable p_simplex"); std::vector> p_1d_simplex; p_1d_simplex = std::vector>(N, Eigen::Matrix(N)); @@ -6840,7 +6848,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 17; assign(p_1d_simplex, - in__.read_constrain_simplex>, jacobian__>( + in__.template read_constrain_simplex>, jacobian__>( lp__, N, N), "assigning variable p_1d_simplex"); std::vector>>> p_3d_simplex; p_3d_simplex = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); @@ -6848,7 +6856,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 18; assign(p_3d_simplex, - in__.read_constrain_simplex>>>, jacobian__>( + in__.template read_constrain_simplex>>>, jacobian__>( lp__, N, M, K, N), "assigning variable p_3d_simplex"); Eigen::Matrix p_cfcov_54; p_cfcov_54 = Eigen::Matrix(5, 4); @@ -6856,7 +6864,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 19; assign(p_cfcov_54, - in__.read_constrain_cholesky_factor, jacobian__>( + in__.template read_constrain_cholesky_factor, jacobian__>( lp__, 5, 4), "assigning variable p_cfcov_54"); Eigen::Matrix p_cfcov_33; p_cfcov_33 = Eigen::Matrix(3, 3); @@ -6864,7 +6872,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 20; assign(p_cfcov_33, - in__.read_constrain_cholesky_factor, jacobian__>( + in__.template read_constrain_cholesky_factor, jacobian__>( lp__, 3, 3), "assigning variable p_cfcov_33"); std::vector> p_cfcov_33_ar; p_cfcov_33_ar = std::vector>(K, Eigen::Matrix(3, 3)); @@ -6872,7 +6880,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 21; assign(p_cfcov_33_ar, - in__.read_constrain_cholesky_factor>, jacobian__>( + in__.template read_constrain_cholesky_factor>, jacobian__>( lp__, K, 3, 3), "assigning variable p_cfcov_33_ar"); Eigen::Matrix x_p; x_p = Eigen::Matrix(2); @@ -7258,6 +7266,7 @@ class mother_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "mother_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -7272,48 +7281,48 @@ class mother_model final : public model_base_crtp { p_upper = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - p_upper = in__.read_constrain_lb(p_real, - lp__); + p_upper = in__.template read_constrain_lb( + p_real, lp__); double p_lower; p_lower = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - p_lower = in__.read_constrain_ub(p_upper, - lp__); + p_lower = in__.template read_constrain_ub( + p_upper, lp__); std::vector offset_multiplier; offset_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(offset_multiplier, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( 1, 2, lp__, 5), "assigning variable offset_multiplier"); std::vector no_offset_multiplier; no_offset_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 5; assign(no_offset_multiplier, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( 0, 2, lp__, 5), "assigning variable no_offset_multiplier"); std::vector offset_no_multiplier; offset_no_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 6; assign(offset_no_multiplier, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( 3, 1, lp__, 5), "assigning variable offset_no_multiplier"); std::vector p_real_1d_ar; p_real_1d_ar = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 7; assign(p_real_1d_ar, - in__.read_constrain_lb, jacobian__>(0, - lp__, N), "assigning variable p_real_1d_ar"); + in__.template read_constrain_lb, jacobian__>( + 0, lp__, N), "assigning variable p_real_1d_ar"); std::vector>> p_real_3d_ar; p_real_3d_ar = std::vector>>(N, std::vector>(M, std::vector(K, std::numeric_limits::quiet_NaN()))); current_statement__ = 8; assign(p_real_3d_ar, - in__.read_constrain_lb>>, jacobian__>( + in__.template read_constrain_lb>>, jacobian__>( 0, lp__, N, M, K), "assigning variable p_real_3d_ar"); Eigen::Matrix p_vec; p_vec = Eigen::Matrix(N); @@ -7321,7 +7330,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 9; assign(p_vec, - in__.read_constrain_lb, jacobian__>( + in__.template read_constrain_lb, jacobian__>( 0, lp__, N), "assigning variable p_vec"); std::vector> p_1d_vec; p_1d_vec = std::vector>(N, Eigen::Matrix(N)); @@ -7368,7 +7377,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 15; assign(p_ar_mat, - in__.read_constrain_lub>>, jacobian__>( + in__.template read_constrain_lub>>, jacobian__>( 0, 1, lp__, 4, 5, 2, 3), "assigning variable p_ar_mat"); Eigen::Matrix p_simplex; p_simplex = Eigen::Matrix(N); @@ -7376,7 +7385,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 16; assign(p_simplex, - in__.read_constrain_simplex, jacobian__>( + in__.template read_constrain_simplex, jacobian__>( lp__, N), "assigning variable p_simplex"); std::vector> p_1d_simplex; p_1d_simplex = std::vector>(N, Eigen::Matrix(N)); @@ -7384,7 +7393,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 17; assign(p_1d_simplex, - in__.read_constrain_simplex>, jacobian__>( + in__.template read_constrain_simplex>, jacobian__>( lp__, N, N), "assigning variable p_1d_simplex"); std::vector>>> p_3d_simplex; p_3d_simplex = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); @@ -7392,7 +7401,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 18; assign(p_3d_simplex, - in__.read_constrain_simplex>>>, jacobian__>( + in__.template read_constrain_simplex>>>, jacobian__>( lp__, N, M, K, N), "assigning variable p_3d_simplex"); Eigen::Matrix p_cfcov_54; p_cfcov_54 = Eigen::Matrix(5, 4); @@ -7400,7 +7409,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 19; assign(p_cfcov_54, - in__.read_constrain_cholesky_factor, jacobian__>( + in__.template read_constrain_cholesky_factor, jacobian__>( lp__, 5, 4), "assigning variable p_cfcov_54"); Eigen::Matrix p_cfcov_33; p_cfcov_33 = Eigen::Matrix(3, 3); @@ -7408,7 +7417,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 20; assign(p_cfcov_33, - in__.read_constrain_cholesky_factor, jacobian__>( + in__.template read_constrain_cholesky_factor, jacobian__>( lp__, 3, 3), "assigning variable p_cfcov_33"); std::vector> p_cfcov_33_ar; p_cfcov_33_ar = std::vector>(K, Eigen::Matrix(3, 3)); @@ -7416,7 +7425,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 21; assign(p_cfcov_33_ar, - in__.read_constrain_cholesky_factor>, jacobian__>( + in__.template read_constrain_cholesky_factor>, jacobian__>( lp__, K, 3, 3), "assigning variable p_cfcov_33_ar"); Eigen::Matrix x_p; x_p = Eigen::Matrix(2); @@ -11360,6 +11369,7 @@ class motherHOF_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "motherHOF_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -14745,6 +14755,7 @@ class new_integrate_interface_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "new_integrate_interface_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -16713,36 +16724,40 @@ class old_integrate_interface_model final : public model_base_crtp(0, lp__); + alpha = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ beta; beta = DUMMY_VAR__; current_statement__ = 2; - beta = in__.read_constrain_lb(0, lp__); + beta = in__.template read_constrain_lb(0, + lp__); local_scalar_t__ gamma; gamma = DUMMY_VAR__; current_statement__ = 3; - gamma = in__.read_constrain_lb(0, lp__); + gamma = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ delta; delta = DUMMY_VAR__; current_statement__ = 4; - delta = in__.read_constrain_lb(0, lp__); + delta = in__.template read_constrain_lb( + 0, lp__); std::vector z_init; z_init = std::vector(2, DUMMY_VAR__); current_statement__ = 5; assign(z_init, - in__.read_constrain_lb, jacobian__>(0, - lp__, 2), "assigning variable z_init"); + in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2), "assigning variable z_init"); std::vector sigma; sigma = std::vector(2, DUMMY_VAR__); current_statement__ = 6; assign(sigma, - in__.read_constrain_lb, jacobian__>(0, - lp__, 2), "assigning variable sigma"); + in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2), "assigning variable sigma"); std::vector> z; z = std::vector>(N, std::vector(2, DUMMY_VAR__)); @@ -16806,6 +16821,7 @@ class old_integrate_interface_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "old_integrate_interface_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -16815,36 +16831,40 @@ class old_integrate_interface_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - alpha = in__.read_constrain_lb(0, lp__); + alpha = in__.template read_constrain_lb( + 0, lp__); double beta; beta = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - beta = in__.read_constrain_lb(0, lp__); + beta = in__.template read_constrain_lb(0, + lp__); double gamma; gamma = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - gamma = in__.read_constrain_lb(0, lp__); + gamma = in__.template read_constrain_lb( + 0, lp__); double delta; delta = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - delta = in__.read_constrain_lb(0, lp__); + delta = in__.template read_constrain_lb( + 0, lp__); std::vector z_init; z_init = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 5; assign(z_init, - in__.read_constrain_lb, jacobian__>(0, - lp__, 2), "assigning variable z_init"); + in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2), "assigning variable z_init"); std::vector sigma; sigma = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 6; assign(sigma, - in__.read_constrain_lb, jacobian__>(0, - lp__, 2), "assigning variable sigma"); + in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2), "assigning variable sigma"); std::vector> z; z = std::vector>(N, std::vector(2, std::numeric_limits::quiet_NaN())); @@ -17757,7 +17777,8 @@ class optimize_glm_model final : public model_base_crtp { sigma = DUMMY_VAR__; current_statement__ = 4; - sigma = in__.read_constrain_lb(0, lp__); + sigma = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ alpha; alpha = DUMMY_VAR__; @@ -18354,6 +18375,7 @@ class optimize_glm_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "optimize_glm_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -18384,7 +18406,8 @@ class optimize_glm_model final : public model_base_crtp { sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma = in__.read_constrain_lb(0, lp__); + sigma = in__.template read_constrain_lb( + 0, lp__); double alpha; alpha = std::numeric_limits::quiet_NaN(); @@ -18989,7 +19012,7 @@ class param_constraint_model final : public model_base_crtp>, jacobian__>( + in__.template read_constrain_cholesky_factor_corr>, jacobian__>( lp__, nt, 2, 2), "assigning variable L_Omega"); Eigen::Matrix z1; z1 = Eigen::Matrix(NS); @@ -18997,7 +19020,7 @@ class param_constraint_model final : public model_base_crtp, jacobian__>( + in__.template read_constrain_lb, jacobian__>( rvalue(L_Omega, "L_Omega", index_uni(1), index_uni(1), index_uni(2)), lp__, NS), "assigning variable z1"); @@ -19027,6 +19050,7 @@ class param_constraint_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "param_constraint_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -19038,7 +19062,7 @@ class param_constraint_model final : public model_base_crtp>, jacobian__>( + in__.template read_constrain_cholesky_factor_corr>, jacobian__>( lp__, nt, 2, 2), "assigning variable L_Omega"); Eigen::Matrix z1; z1 = Eigen::Matrix(NS); @@ -19046,7 +19070,7 @@ class param_constraint_model final : public model_base_crtp, jacobian__>( + in__.template read_constrain_lb, jacobian__>( rvalue(L_Omega, "L_Omega", index_uni(1), index_uni(1), index_uni(2)), lp__, NS), "assigning variable z1"); @@ -19668,6 +19692,7 @@ class reduce_sum_m1_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "reduce_sum_m1_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -21391,6 +21416,7 @@ class reduce_sum_m2_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "reduce_sum_m2_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -25502,6 +25528,7 @@ class reduce_sum_m3_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "reduce_sum_m3_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -26957,6 +26984,7 @@ class single_argument_lpmf_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "single_argument_lpmf_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -27251,7 +27279,8 @@ class tilde_block_model final : public model_base_crtp { x = DUMMY_VAR__; current_statement__ = 1; - x = in__.read_constrain_lb(0, lp__); + x = in__.template read_constrain_lb(0, + lp__); { current_statement__ = 4; if (t) { @@ -27304,6 +27333,7 @@ class tilde_block_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "tilde_block_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -27313,7 +27343,8 @@ class tilde_block_model final : public model_base_crtp { x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - x = in__.read_constrain_lb(0, lp__); + x = in__.template read_constrain_lb(0, + lp__); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -28021,7 +28052,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 1; assign(p_1, - in__.read_constrain_lb, jacobian__>( + in__.template read_constrain_lb, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_1"); current_statement__ = 1; @@ -28032,7 +28063,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 2; assign(p_2, - in__.read_constrain_ub, jacobian__>( + in__.template read_constrain_ub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_2"); current_statement__ = 2; @@ -28043,7 +28074,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 3; assign(p_3, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_3"); @@ -28058,8 +28089,8 @@ class transform_model final : public model_base_crtp { current_statement__ = 4; assign(p_4, - in__.read_constrain_lub, jacobian__>(0, - rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), + in__.template read_constrain_lub, jacobian__>( + 0, rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_4"); current_statement__ = 4; check_matching_dims("constraint", "p_4", p_4, "upper", @@ -28069,7 +28100,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 5; assign(p_5, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), "assigning variable p_5"); current_statement__ = 5; @@ -28080,7 +28111,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 6; assign(p_6, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), "assigning variable p_6"); current_statement__ = 6; @@ -28091,7 +28122,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 7; assign(p_7, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( 0, rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_7"); current_statement__ = 7; @@ -28102,7 +28133,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 8; assign(p_8, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_8"); @@ -28117,7 +28148,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 9; assign(p_9, - in__.read_constrain_lub>, jacobian__>( + in__.template read_constrain_lub>, jacobian__>( rvalue(ds, "ds", index_uni(1)), 1, lp__, m, k), "assigning variable p_9"); current_statement__ = 9; @@ -28128,7 +28159,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 10; assign(p_10, - in__.read_constrain_lub>>, jacobian__>( + in__.template read_constrain_lub>>, jacobian__>( 0, ds, lp__, n, m, k), "assigning variable p_10"); current_statement__ = 10; check_matching_dims("constraint", "p_10", p_10, "upper", ds); @@ -28138,7 +28169,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 11; assign(pv_1, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( rvalue(dv, "dv", index_uni(1), index_uni(1)), rvalue(dv, "dv", index_uni(1), index_uni(2)), lp__, k), "assigning variable pv_1"); @@ -28154,7 +28185,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 12; assign(pv_2, - in__.read_constrain_lb>, jacobian__>( + in__.template read_constrain_lb>, jacobian__>( rvalue(dv, "dv", index_uni(1)), lp__, m, k), "assigning variable pv_2"); current_statement__ = 12; @@ -28166,7 +28197,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 13; assign(pv_3, - in__.read_constrain_ub>>, jacobian__>( + in__.template read_constrain_ub>>, jacobian__>( dv, lp__, n, m, k), "assigning variable pv_3"); current_statement__ = 13; check_matching_dims("constraint", "pv_3", pv_3, "upper", dv); @@ -28176,7 +28207,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 14; assign(pr_1, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( rvalue(dr, "dr", index_uni(1), index_uni(1)), rvalue(dr, "dr", index_uni(1), index_uni(2)), lp__, k), "assigning variable pr_1"); @@ -28192,7 +28223,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 15; assign(pr_2, - in__.read_constrain_lb>, jacobian__>( + in__.template read_constrain_lb>, jacobian__>( rvalue(dr, "dr", index_uni(1)), lp__, m, k), "assigning variable pr_2"); current_statement__ = 15; @@ -28204,7 +28235,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 16; assign(pr_3, - in__.read_constrain_ub>>, jacobian__>( + in__.template read_constrain_ub>>, jacobian__>( dr, lp__, n, m, k), "assigning variable pr_3"); current_statement__ = 16; check_matching_dims("constraint", "pr_3", pr_3, "upper", dr); @@ -28214,7 +28245,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 17; assign(pm_1, - in__.read_constrain_lb, jacobian__>( + in__.template read_constrain_lb, jacobian__>( rvalue(dm, "dm", index_uni(1)), lp__, m, k), "assigning variable pm_1"); current_statement__ = 17; @@ -28226,7 +28257,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 18; assign(pm_2, - in__.read_constrain_ub>, jacobian__>( + in__.template read_constrain_ub>, jacobian__>( dm, lp__, n, m, k), "assigning variable pm_2"); current_statement__ = 18; check_matching_dims("constraint", "pm_2", pm_2, "upper", dm); @@ -28619,6 +28650,7 @@ class transform_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "transform_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -28629,7 +28661,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 1; assign(p_1, - in__.read_constrain_lb, jacobian__>( + in__.template read_constrain_lb, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_1"); current_statement__ = 1; @@ -28640,7 +28672,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 2; assign(p_2, - in__.read_constrain_ub, jacobian__>( + in__.template read_constrain_ub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_2"); current_statement__ = 2; @@ -28651,7 +28683,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 3; assign(p_3, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_3"); @@ -28666,8 +28698,8 @@ class transform_model final : public model_base_crtp { current_statement__ = 4; assign(p_4, - in__.read_constrain_lub, jacobian__>(0, - rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), + in__.template read_constrain_lub, jacobian__>( + 0, rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_4"); current_statement__ = 4; check_matching_dims("constraint", "p_4", p_4, "upper", @@ -28677,7 +28709,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 5; assign(p_5, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), "assigning variable p_5"); current_statement__ = 5; @@ -28688,7 +28720,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 6; assign(p_6, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), "assigning variable p_6"); current_statement__ = 6; @@ -28699,7 +28731,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 7; assign(p_7, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( 0, rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), "assigning variable p_7"); current_statement__ = 7; @@ -28710,7 +28742,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 8; assign(p_8, - in__.read_constrain_offset_multiplier, jacobian__>( + in__.template read_constrain_offset_multiplier, jacobian__>( rvalue(ds, "ds", index_uni(1), index_uni(1)), rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), "assigning variable p_8"); @@ -28725,7 +28757,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 9; assign(p_9, - in__.read_constrain_lub>, jacobian__>( + in__.template read_constrain_lub>, jacobian__>( rvalue(ds, "ds", index_uni(1)), 1, lp__, m, k), "assigning variable p_9"); current_statement__ = 9; @@ -28736,7 +28768,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 10; assign(p_10, - in__.read_constrain_lub>>, jacobian__>( + in__.template read_constrain_lub>>, jacobian__>( 0, ds, lp__, n, m, k), "assigning variable p_10"); current_statement__ = 10; check_matching_dims("constraint", "p_10", p_10, "upper", ds); @@ -28746,7 +28778,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 11; assign(pv_1, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( rvalue(dv, "dv", index_uni(1), index_uni(1)), rvalue(dv, "dv", index_uni(1), index_uni(2)), lp__, k), "assigning variable pv_1"); @@ -28762,7 +28794,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 12; assign(pv_2, - in__.read_constrain_lb>, jacobian__>( + in__.template read_constrain_lb>, jacobian__>( rvalue(dv, "dv", index_uni(1)), lp__, m, k), "assigning variable pv_2"); current_statement__ = 12; @@ -28774,7 +28806,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 13; assign(pv_3, - in__.read_constrain_ub>>, jacobian__>( + in__.template read_constrain_ub>>, jacobian__>( dv, lp__, n, m, k), "assigning variable pv_3"); current_statement__ = 13; check_matching_dims("constraint", "pv_3", pv_3, "upper", dv); @@ -28784,7 +28816,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 14; assign(pr_1, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( rvalue(dr, "dr", index_uni(1), index_uni(1)), rvalue(dr, "dr", index_uni(1), index_uni(2)), lp__, k), "assigning variable pr_1"); @@ -28800,7 +28832,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 15; assign(pr_2, - in__.read_constrain_lb>, jacobian__>( + in__.template read_constrain_lb>, jacobian__>( rvalue(dr, "dr", index_uni(1)), lp__, m, k), "assigning variable pr_2"); current_statement__ = 15; @@ -28812,7 +28844,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 16; assign(pr_3, - in__.read_constrain_ub>>, jacobian__>( + in__.template read_constrain_ub>>, jacobian__>( dr, lp__, n, m, k), "assigning variable pr_3"); current_statement__ = 16; check_matching_dims("constraint", "pr_3", pr_3, "upper", dr); @@ -28822,7 +28854,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 17; assign(pm_1, - in__.read_constrain_lb, jacobian__>( + in__.template read_constrain_lb, jacobian__>( rvalue(dm, "dm", index_uni(1)), lp__, m, k), "assigning variable pm_1"); current_statement__ = 17; @@ -28834,7 +28866,7 @@ class transform_model final : public model_base_crtp { current_statement__ = 18; assign(pm_2, - in__.read_constrain_ub>, jacobian__>( + in__.template read_constrain_ub>, jacobian__>( dm, lp__, n, m, k), "assigning variable pm_2"); current_statement__ = 18; check_matching_dims("constraint", "pm_2", pm_2, "upper", dm); @@ -30799,7 +30831,8 @@ class truncate_model final : public model_base_crtp { y = DUMMY_VAR__; current_statement__ = 2; - y = in__.read_constrain_lb(0, lp__); + y = in__.template read_constrain_lb(0, + lp__); { current_statement__ = 3; lp_accum__.add(normal_lpdf(x, m, 1)); @@ -30908,6 +30941,7 @@ class truncate_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "truncate_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -30922,7 +30956,8 @@ class truncate_model final : public model_base_crtp { y = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - y = in__.read_constrain_lb(0, lp__); + y = in__.template read_constrain_lb(0, + lp__); vars__.emplace_back(m); vars__.emplace_back(y); if (logical_negation((primitive_value(emit_transformed_parameters__) || @@ -31285,6 +31320,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "udf_tilde_stmt_conflict_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -31612,7 +31648,8 @@ class user_constrain_model final : public model_base_crtp x = DUMMY_VAR__; current_statement__ = 1; - x = in__.read_constrain_lb(0, lp__); + x = in__.template read_constrain_lb(0, + lp__); { current_statement__ = 2; lp_accum__.add(std_normal_lpdf(x)); @@ -31643,6 +31680,7 @@ class user_constrain_model final : public model_base_crtp int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "user_constrain_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -31652,7 +31690,8 @@ class user_constrain_model final : public model_base_crtp x = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - x = in__.read_constrain_lb(0, lp__); + x = in__.template read_constrain_lb(0, + lp__); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index fc56b6d390..589045772b 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -277,6 +277,7 @@ class simple_function_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "simple_function_model_namespace::write_array"; (void) function__; // suppress unused var warning diff --git a/test/integration/good/code-gen/opencl/cpp.expected b/test/integration/good/code-gen/opencl/cpp.expected index 436fae10ce..6b330445bc 100644 --- a/test/integration/good/code-gen/opencl/cpp.expected +++ b/test/integration/good/code-gen/opencl/cpp.expected @@ -3513,6 +3513,7 @@ class distributions_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "distributions_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -6718,6 +6719,7 @@ class restricted_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "restricted_model_namespace::write_array"; (void) function__; // suppress unused var warning diff --git a/test/integration/good/code-gen/profiling/cpp.expected b/test/integration/good/code-gen/profiling/cpp.expected index b777b22511..2ad26fc9b6 100644 --- a/test/integration/good/code-gen/profiling/cpp.expected +++ b/test/integration/good/code-gen/profiling/cpp.expected @@ -177,17 +177,20 @@ class simple_function_model final : public model_base_crtp(0, lp__); + rho = in__.template read_constrain_lb(0, + lp__); local_scalar_t__ alpha; alpha = DUMMY_VAR__; current_statement__ = 2; - alpha = in__.read_constrain_lb(0, lp__); + alpha = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ sigma; sigma = DUMMY_VAR__; current_statement__ = 3; - sigma = in__.read_constrain_lb(0, lp__); + sigma = in__.template read_constrain_lb( + 0, lp__); { current_statement__ = 4; validate_non_negative_index("cov", "N", N); @@ -273,6 +276,7 @@ class simple_function_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "simple_function_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -282,17 +286,20 @@ class simple_function_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - rho = in__.read_constrain_lb(0, lp__); + rho = in__.template read_constrain_lb(0, + lp__); double alpha; alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - alpha = in__.read_constrain_lb(0, lp__); + alpha = in__.template read_constrain_lb( + 0, lp__); double sigma; sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - sigma = in__.read_constrain_lb(0, lp__); + sigma = in__.template read_constrain_lb( + 0, lp__); vars__.emplace_back(rho); vars__.emplace_back(alpha); vars__.emplace_back(sigma); diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 1777b810a3..9601ab65f4 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -289,22 +289,26 @@ class ad_level_failing_model final : public model_base_crtp(0, lp__); + beta = in__.template read_constrain_lb(0, + lp__); local_scalar_t__ gamma; gamma = DUMMY_VAR__; current_statement__ = 2; - gamma = in__.read_constrain_lb(0, lp__); + gamma = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ xi; xi = DUMMY_VAR__; current_statement__ = 3; - xi = in__.read_constrain_lb(0, lp__); + xi = in__.template read_constrain_lb(0, + lp__); local_scalar_t__ delta; delta = DUMMY_VAR__; current_statement__ = 4; - delta = in__.read_constrain_lb(0, lp__); + delta = in__.template read_constrain_lb( + 0, lp__); std::vector> y; y = std::vector>(N_t, std::vector(4, DUMMY_VAR__)); @@ -449,6 +453,7 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "ad_level_failing_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -470,22 +475,26 @@ class ad_level_failing_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - beta = in__.read_constrain_lb(0, lp__); + beta = in__.template read_constrain_lb(0, + lp__); double gamma; gamma = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - gamma = in__.read_constrain_lb(0, lp__); + gamma = in__.template read_constrain_lb( + 0, lp__); double xi; xi = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - xi = in__.read_constrain_lb(0, lp__); + xi = in__.template read_constrain_lb(0, + lp__); double delta; delta = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - delta = in__.read_constrain_lb(0, lp__); + delta = in__.template read_constrain_lb( + 0, lp__); std::vector> y; y = std::vector>(N_t, std::vector(4, std::numeric_limits::quiet_NaN())); @@ -1846,15 +1855,15 @@ class copy_fail_model final : public model_base_crtp { mean_p = DUMMY_VAR__; current_statement__ = 1; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; assign(beta, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( 0, 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); @@ -2325,6 +2334,7 @@ class copy_fail_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "copy_fail_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -2383,15 +2393,15 @@ class copy_fail_model final : public model_base_crtp { mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(beta, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( 0, 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); @@ -3709,37 +3719,38 @@ class dce_fail_model final : public model_base_crtp { sigma = DUMMY_VAR__; current_statement__ = 1; - sigma = in__.read_constrain_lb(0, lp__); + sigma = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ sigma_age; sigma_age = DUMMY_VAR__; current_statement__ = 2; - sigma_age = in__.read_constrain_lb(0, - lp__); + sigma_age = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ sigma_edu; sigma_edu = DUMMY_VAR__; current_statement__ = 3; - sigma_edu = in__.read_constrain_lb(0, - lp__); + sigma_edu = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ sigma_state; sigma_state = DUMMY_VAR__; current_statement__ = 4; - sigma_state = in__.read_constrain_lb(0, - lp__); + sigma_state = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ sigma_region; sigma_region = DUMMY_VAR__; current_statement__ = 5; - sigma_region = in__.read_constrain_lb(0, - lp__); + sigma_region = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ sigma_age_edu; sigma_age_edu = DUMMY_VAR__; current_statement__ = 6; - sigma_age_edu = in__.read_constrain_lb(0, - lp__); + sigma_age_edu = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ b_0; b_0 = DUMMY_VAR__; @@ -3963,6 +3974,7 @@ class dce_fail_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "dce_fail_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -3990,37 +4002,38 @@ class dce_fail_model final : public model_base_crtp { sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - sigma = in__.read_constrain_lb(0, lp__); + sigma = in__.template read_constrain_lb( + 0, lp__); double sigma_age; sigma_age = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - sigma_age = in__.read_constrain_lb(0, - lp__); + sigma_age = in__.template read_constrain_lb( + 0, lp__); double sigma_edu; sigma_edu = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - sigma_edu = in__.read_constrain_lb(0, - lp__); + sigma_edu = in__.template read_constrain_lb( + 0, lp__); double sigma_state; sigma_state = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma_state = in__.read_constrain_lb(0, - lp__); + sigma_state = in__.template read_constrain_lb( + 0, lp__); double sigma_region; sigma_region = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - sigma_region = in__.read_constrain_lb(0, - lp__); + sigma_region = in__.template read_constrain_lb( + 0, lp__); double sigma_age_edu; sigma_age_edu = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - sigma_age_edu = in__.read_constrain_lb(0, - lp__); + sigma_age_edu = in__.template read_constrain_lb( + 0, lp__); double b_0; b_0 = std::numeric_limits::quiet_NaN(); @@ -4904,6 +4917,7 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "expr_prop_experiment_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -5248,6 +5262,7 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "expr_prop_experiment2_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -5599,21 +5614,21 @@ class expr_prop_fail_model final : public model_base_crtp current_statement__ = 1; assign(mu, - in__.read_constrain_ordered, jacobian__>( + in__.template read_constrain_ordered, jacobian__>( lp__, 2), "assigning variable mu"); std::vector sigma; sigma = std::vector(2, DUMMY_VAR__); current_statement__ = 2; assign(sigma, - in__.read_constrain_lb, jacobian__>(0, - lp__, 2), "assigning variable sigma"); + in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2), "assigning variable sigma"); local_scalar_t__ theta; theta = DUMMY_VAR__; current_statement__ = 3; - theta = in__.read_constrain_lub(0, 1, - lp__); + theta = in__.template read_constrain_lub( + 0, 1, lp__); { current_statement__ = 4; lp_accum__.add(normal_lpdf(sigma, 0, 2)); @@ -5670,6 +5685,7 @@ class expr_prop_fail_model final : public model_base_crtp int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "expr_prop_fail_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -5687,21 +5703,21 @@ class expr_prop_fail_model final : public model_base_crtp current_statement__ = 1; assign(mu, - in__.read_constrain_ordered, jacobian__>( + in__.template read_constrain_ordered, jacobian__>( lp__, 2), "assigning variable mu"); std::vector sigma; sigma = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(sigma, - in__.read_constrain_lb, jacobian__>(0, - lp__, 2), "assigning variable sigma"); + in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2), "assigning variable sigma"); double theta; theta = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - theta = in__.read_constrain_lub(0, 1, - lp__); + theta = in__.template read_constrain_lub( + 0, 1, lp__); { vars__.emplace_back(rvalue(mu, "mu", index_uni(1))); { @@ -6175,7 +6191,8 @@ class expr_prop_fail2_model final : public model_base_crtp(0, lp__); + tau = in__.template read_constrain_lb(0, + lp__); { current_statement__ = 4; lp_accum__.add(normal_lpdf(theta, mu, tau)); @@ -6208,6 +6225,7 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "expr_prop_fail2_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -6233,7 +6251,8 @@ class expr_prop_fail2_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 3; - tau = in__.read_constrain_lb(0, lp__); + tau = in__.template read_constrain_lb(0, + lp__); vars__.emplace_back(mu); if (logical_gte(J, 1)) { vars__.emplace_back(rvalue(theta, "theta", index_uni(1))); @@ -7152,32 +7171,32 @@ class expr_prop_fail3_model final : public model_base_crtp(0, 100, - lp__); + sigma_a = in__.template read_constrain_lub( + 0, 100, lp__); local_scalar_t__ sigma_b; sigma_b = DUMMY_VAR__; current_statement__ = 8; - sigma_b = in__.read_constrain_lub(0, 100, - lp__); + sigma_b = in__.template read_constrain_lub( + 0, 100, lp__); local_scalar_t__ sigma_c; sigma_c = DUMMY_VAR__; current_statement__ = 9; - sigma_c = in__.read_constrain_lub(0, 100, - lp__); + sigma_c = in__.template read_constrain_lub( + 0, 100, lp__); local_scalar_t__ sigma_d; sigma_d = DUMMY_VAR__; current_statement__ = 10; - sigma_d = in__.read_constrain_lub(0, 100, - lp__); + sigma_d = in__.template read_constrain_lub( + 0, 100, lp__); local_scalar_t__ sigma_e; sigma_e = DUMMY_VAR__; current_statement__ = 11; - sigma_e = in__.read_constrain_lub(0, 100, - lp__); + sigma_e = in__.template read_constrain_lub( + 0, 100, lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -7275,6 +7294,7 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "expr_prop_fail3_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -7351,32 +7371,32 @@ class expr_prop_fail3_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 7; - sigma_a = in__.read_constrain_lub(0, 100, - lp__); + sigma_a = in__.template read_constrain_lub( + 0, 100, lp__); double sigma_b; sigma_b = std::numeric_limits::quiet_NaN(); current_statement__ = 8; - sigma_b = in__.read_constrain_lub(0, 100, - lp__); + sigma_b = in__.template read_constrain_lub( + 0, 100, lp__); double sigma_c; sigma_c = std::numeric_limits::quiet_NaN(); current_statement__ = 9; - sigma_c = in__.read_constrain_lub(0, 100, - lp__); + sigma_c = in__.template read_constrain_lub( + 0, 100, lp__); double sigma_d; sigma_d = std::numeric_limits::quiet_NaN(); current_statement__ = 10; - sigma_d = in__.read_constrain_lub(0, 100, - lp__); + sigma_d = in__.template read_constrain_lub( + 0, 100, lp__); double sigma_e; sigma_e = std::numeric_limits::quiet_NaN(); current_statement__ = 11; - sigma_e = in__.read_constrain_lub(0, 100, - lp__); + sigma_e = in__.template read_constrain_lub( + 0, 100, lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -8387,7 +8407,8 @@ class expr_prop_fail4_model final : public model_base_crtp(0, lp__); + tau_phi = in__.template read_constrain_lb( + 0, lp__); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix((N - 1)); stan::math::fill(phi_std_raw, DUMMY_VAR__); @@ -8452,6 +8473,7 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "expr_prop_fail4_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -8485,7 +8507,8 @@ class expr_prop_fail4_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - tau_phi = in__.read_constrain_lb(0, lp__); + tau_phi = in__.template read_constrain_lb( + 0, lp__); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix((N - 1)); stan::math::fill(phi_std_raw, std::numeric_limits::quiet_NaN()); @@ -9808,14 +9831,14 @@ class expr_prop_fail5_model final : public model_base_crtp(0, 1, - lp__); + mean_phi = in__.template read_constrain_lub( + 0, 1, lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(nind); stan::math::fill(epsilon, DUMMY_VAR__); @@ -9828,8 +9851,8 @@ class expr_prop_fail5_model final : public model_base_crtp(0, 5, - lp__); + sigma = in__.template read_constrain_lub( + 0, 5, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -10301,6 +10324,7 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "expr_prop_fail5_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -10358,14 +10382,14 @@ class expr_prop_fail5_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.read_constrain_lub(0, 1, - lp__); + mean_phi = in__.template read_constrain_lub( + 0, 1, lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(nind); stan::math::fill(epsilon, std::numeric_limits::quiet_NaN()); @@ -10378,8 +10402,8 @@ class expr_prop_fail5_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 4; - sigma = in__.read_constrain_lub(0, 5, - lp__); + sigma = in__.template read_constrain_lub( + 0, 5, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -12613,26 +12637,27 @@ class expr_prop_fail6_model final : public model_base_crtp(0, 1, - lp__); + mean_phi = in__.template read_constrain_lub( + 0, 1, lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); local_scalar_t__ psi; psi = DUMMY_VAR__; current_statement__ = 3; - psi = in__.read_constrain_lub(0, 1, lp__); + psi = in__.template read_constrain_lub(0, + 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(n_occasions); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 4; assign(beta, - in__.read_constrain_lb, jacobian__>( + in__.template read_constrain_lb, jacobian__>( 0, lp__, n_occasions), "assigning variable beta"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(M); @@ -12645,8 +12670,8 @@ class expr_prop_fail6_model final : public model_base_crtp(0, 5, - lp__); + sigma = in__.template read_constrain_lub( + 0, 5, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(M, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -13492,6 +13517,7 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "expr_prop_fail6_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -13591,26 +13617,27 @@ class expr_prop_fail6_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.read_constrain_lub(0, 1, - lp__); + mean_phi = in__.template read_constrain_lub( + 0, 1, lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); double psi; psi = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - psi = in__.read_constrain_lub(0, 1, lp__); + psi = in__.template read_constrain_lub(0, + 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(n_occasions); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(beta, - in__.read_constrain_lb, jacobian__>( + in__.template read_constrain_lb, jacobian__>( 0, lp__, n_occasions), "assigning variable beta"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(M); @@ -13623,8 +13650,8 @@ class expr_prop_fail6_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 6; - sigma = in__.read_constrain_lub(0, 5, - lp__); + sigma = in__.template read_constrain_lub( + 0, 5, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(M, (n_occasions - 1)); stan::math::fill(phi, std::numeric_limits::quiet_NaN()); @@ -15389,7 +15416,7 @@ class expr_prop_fail7_model final : public model_base_crtp, jacobian__>( + in__.template read_constrain_simplex, jacobian__>( lp__, K), "assigning variable pi"); std::vector>> theta; theta = std::vector>>(J, std::vector>(K, Eigen::Matrix(K))); @@ -15397,7 +15424,7 @@ class expr_prop_fail7_model final : public model_base_crtp>>, jacobian__>( + in__.template read_constrain_simplex>>, jacobian__>( lp__, J, K, K), "assigning variable theta"); { current_statement__ = 10; @@ -15533,6 +15560,7 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "expr_prop_fail7_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -15569,7 +15597,7 @@ class expr_prop_fail7_model final : public model_base_crtp, jacobian__>( + in__.template read_constrain_simplex, jacobian__>( lp__, K), "assigning variable pi"); std::vector>> theta; theta = std::vector>>(J, std::vector>(K, Eigen::Matrix(K))); @@ -15577,7 +15605,7 @@ class expr_prop_fail7_model final : public model_base_crtp>>, jacobian__>( + in__.template read_constrain_simplex>>, jacobian__>( lp__, J, K, K), "assigning variable theta"); lcm_sym26__ = logical_gte(K, 1); if (lcm_sym26__) { @@ -16506,13 +16534,14 @@ class expr_prop_fail8_model final : public model_base_crtp(0, - lp__); + tau_theta = in__.template read_constrain_lb( + 0, lp__); local_scalar_t__ tau_phi; tau_phi = DUMMY_VAR__; current_statement__ = 4; - tau_phi = in__.read_constrain_lb(0, lp__); + tau_phi = in__.template read_constrain_lb( + 0, lp__); Eigen::Matrix theta_std; theta_std = Eigen::Matrix(N); stan::math::fill(theta_std, DUMMY_VAR__); @@ -16575,6 +16604,7 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "expr_prop_fail8_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -16605,13 +16635,14 @@ class expr_prop_fail8_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 3; - tau_theta = in__.read_constrain_lb(0, - lp__); + tau_theta = in__.template read_constrain_lb( + 0, lp__); double tau_phi; tau_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - tau_phi = in__.read_constrain_lb(0, lp__); + tau_phi = in__.template read_constrain_lb( + 0, lp__); Eigen::Matrix theta_std; theta_std = Eigen::Matrix(N); stan::math::fill(theta_std, std::numeric_limits::quiet_NaN()); @@ -17989,15 +18020,15 @@ class fails_test_model final : public model_base_crtp { mean_p = DUMMY_VAR__; current_statement__ = 1; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; assign(beta, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( 0, 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); @@ -18468,6 +18499,7 @@ class fails_test_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "fails_test_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -18526,15 +18558,15 @@ class fails_test_model final : public model_base_crtp { mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); Eigen::Matrix beta; beta = Eigen::Matrix(max_age); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; assign(beta, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( 0, 1, lp__, max_age), "assigning variable beta"); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); @@ -20790,21 +20822,21 @@ class inlining_fail2_model final : public model_base_crtp mean_phi = DUMMY_VAR__; current_statement__ = 1; - mean_phi = in__.read_constrain_lub(0, 1, - lp__); + mean_phi = in__.template read_constrain_lub( + 0, 1, lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); Eigen::Matrix gamma; gamma = Eigen::Matrix(n_occasions); stan::math::fill(gamma, DUMMY_VAR__); current_statement__ = 3; assign(gamma, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( 0, 1, lp__, n_occasions), "assigning variable gamma"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix((n_occasions - 1)); @@ -20818,8 +20850,8 @@ class inlining_fail2_model final : public model_base_crtp sigma = DUMMY_VAR__; current_statement__ = 5; - sigma = in__.read_constrain_lub(0, 5, - lp__); + sigma = in__.template read_constrain_lub( + 0, 5, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(M, lcm_sym297__); stan::math::fill(phi, DUMMY_VAR__); @@ -21623,6 +21655,7 @@ class inlining_fail2_model final : public model_base_crtp int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "inlining_fail2_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -21719,21 +21752,21 @@ class inlining_fail2_model final : public model_base_crtp mean_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.read_constrain_lub(0, 1, - lp__); + mean_phi = in__.template read_constrain_lub( + 0, 1, lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); Eigen::Matrix gamma; gamma = Eigen::Matrix(n_occasions); stan::math::fill(gamma, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(gamma, - in__.read_constrain_lub, jacobian__>( + in__.template read_constrain_lub, jacobian__>( 0, 1, lp__, n_occasions), "assigning variable gamma"); Eigen::Matrix epsilon; epsilon = Eigen::Matrix((n_occasions - 1)); @@ -21747,8 +21780,8 @@ class inlining_fail2_model final : public model_base_crtp sigma = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - sigma = in__.read_constrain_lub(0, 5, - lp__); + sigma = in__.template read_constrain_lub( + 0, 5, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(M, lcm_sym198__); stan::math::fill(phi, DUMMY_VAR__); @@ -23087,6 +23120,7 @@ class lcm_experiment_model final : public model_base_crtp int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "lcm_experiment_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -23421,6 +23455,7 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "lcm_experiment2_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -23776,6 +23811,7 @@ class lcm_fails_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "lcm_fails_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -24829,14 +24865,14 @@ class lcm_fails2_model final : public model_base_crtp { mean_phi = DUMMY_VAR__; current_statement__ = 1; - mean_phi = in__.read_constrain_lub(0, 1, - lp__); + mean_phi = in__.template read_constrain_lub( + 0, 1, lp__); local_scalar_t__ mean_p; mean_p = DUMMY_VAR__; current_statement__ = 2; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -25297,6 +25333,7 @@ class lcm_fails2_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "lcm_fails2_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -25348,14 +25385,14 @@ class lcm_fails2_model final : public model_base_crtp { mean_phi = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mean_phi = in__.read_constrain_lub(0, 1, - lp__); + mean_phi = in__.template read_constrain_lub( + 0, 1, lp__); double mean_p; mean_p = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - mean_p = in__.read_constrain_lub(0, 1, - lp__); + mean_p = in__.template read_constrain_lub( + 0, 1, lp__); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, std::numeric_limits::quiet_NaN()); @@ -26315,6 +26352,7 @@ class lupdf_inlining_model final : public model_base_crtp int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "lupdf_inlining_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -27114,6 +27152,7 @@ class off_dce_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "off_dce_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -27944,20 +27983,20 @@ class off_small_model final : public model_base_crtp { sigma_a1 = DUMMY_VAR__; current_statement__ = 6; - sigma_a1 = in__.read_constrain_lub(0, - 100, lp__); + sigma_a1 = in__.template read_constrain_lub( + 0, 100, lp__); local_scalar_t__ sigma_a2; sigma_a2 = DUMMY_VAR__; current_statement__ = 7; - sigma_a2 = in__.read_constrain_lub(0, - 100, lp__); + sigma_a2 = in__.template read_constrain_lub( + 0, 100, lp__); local_scalar_t__ sigma_y; sigma_y = DUMMY_VAR__; current_statement__ = 8; - sigma_y = in__.read_constrain_lub(0, 100, - lp__); + sigma_y = in__.template read_constrain_lub( + 0, 100, lp__); Eigen::Matrix a1; a1 = Eigen::Matrix(J); stan::math::fill(a1, DUMMY_VAR__); @@ -28042,6 +28081,7 @@ class off_small_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "off_small_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -28098,20 +28138,20 @@ class off_small_model final : public model_base_crtp { sigma_a1 = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - sigma_a1 = in__.read_constrain_lub(0, - 100, lp__); + sigma_a1 = in__.template read_constrain_lub( + 0, 100, lp__); double sigma_a2; sigma_a2 = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - sigma_a2 = in__.read_constrain_lub(0, - 100, lp__); + sigma_a2 = in__.template read_constrain_lub( + 0, 100, lp__); double sigma_y; sigma_y = std::numeric_limits::quiet_NaN(); current_statement__ = 8; - sigma_y = in__.read_constrain_lub(0, 100, - lp__); + sigma_y = in__.template read_constrain_lub( + 0, 100, lp__); Eigen::Matrix a1; a1 = Eigen::Matrix(J); stan::math::fill(a1, std::numeric_limits::quiet_NaN()); @@ -28912,7 +28952,7 @@ class optimizations_model final : public model_base_crtp { current_statement__ = 5; assign(x_cov, - in__.read_constrain_cov_matrix, jacobian__>( + in__.template read_constrain_cov_matrix, jacobian__>( lp__, 2, 2), "assigning variable x_cov"); { double x; @@ -29434,6 +29474,7 @@ class optimizations_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "optimizations_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -29482,7 +29523,7 @@ class optimizations_model final : public model_base_crtp { current_statement__ = 5; assign(x_cov, - in__.read_constrain_cov_matrix, jacobian__>( + in__.template read_constrain_cov_matrix, jacobian__>( lp__, 2, 2), "assigning variable x_cov"); vars__.emplace_back(theta); vars__.emplace_back(phi); @@ -30330,14 +30371,14 @@ class partial_eval_model final : public model_base_crtp { sigma_a = DUMMY_VAR__; current_statement__ = 4; - sigma_a = in__.read_constrain_lub(0, 100, - lp__); + sigma_a = in__.template read_constrain_lub( + 0, 100, lp__); local_scalar_t__ sigma_y; sigma_y = DUMMY_VAR__; current_statement__ = 5; - sigma_y = in__.read_constrain_lub(0, 100, - lp__); + sigma_y = in__.template read_constrain_lub( + 0, 100, lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -30398,6 +30439,7 @@ class partial_eval_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "partial_eval_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -30438,14 +30480,14 @@ class partial_eval_model final : public model_base_crtp { sigma_a = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - sigma_a = in__.read_constrain_lub(0, 100, - lp__); + sigma_a = in__.template read_constrain_lub( + 0, 100, lp__); double sigma_y; sigma_y = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - sigma_y = in__.read_constrain_lub(0, 100, - lp__); + sigma_y = in__.template read_constrain_lub( + 0, 100, lp__); Eigen::Matrix y_hat; y_hat = Eigen::Matrix(N); stan::math::fill(y_hat, DUMMY_VAR__); @@ -31132,7 +31174,8 @@ class stalled1_failure_model final : public model_base_crtp(0, lp__); + tau = in__.template read_constrain_lb(0, + lp__); std::vector> b; b = std::vector>(I, Eigen::Matrix(8)); stan::math::fill(b, DUMMY_VAR__); @@ -31216,6 +31259,7 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "stalled1_failure_model_namespace::write_array"; (void) function__; // suppress unused var warning @@ -31253,7 +31297,8 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 5; - tau = in__.read_constrain_lb(0, lp__); + tau = in__.template read_constrain_lb(0, + lp__); std::vector> b; b = std::vector>(I, Eigen::Matrix(8)); stan::math::fill(b, std::numeric_limits::quiet_NaN()); @@ -31948,6 +31993,7 @@ class unroll_limit_model final : public model_base_crtp { int current_statement__ = 0; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + constexpr bool jacobian__ = false; (void) DUMMY_VAR__; // suppress unused var warning static constexpr const char* function__ = "unroll_limit_model_namespace::write_array"; (void) function__; // suppress unused var warning From 3eaab9eef69c9867ce963d4b857d5111d4e2605d Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Thu, 18 Mar 2021 13:36:12 -0400 Subject: [PATCH 09/31] add little func for getting the weird constrain dimensions for matrices --- src/stan_math_backend/Transform_Mir.ml | 19 ++++++++++++++++++- test/integration/good/code-gen/cpp.expected | 4 ++-- .../good/compiler-optimizations/cpp.expected | 4 ++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index da58f7e592..7dd8de8345 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -216,6 +216,23 @@ let param_read smeta () } in let transform_args = transform_args out_trans in + (* + For constrains that return square / lower triangular matrices the C++ + only wants one of the matrix dimensions. + *) + let rec constrain_get_dims st = + match st with + | SizedType.SInt | SReal -> [] + | SVector d | SRowVector d -> [d] + | SMatrix (_, dim2) -> [dim2] + | SArray (t, dim) -> dim :: constrain_get_dims t + in + let read_constrain_dims constrain_transform st = + match constrain_transform with + | Program.CholeskyCorr | Correlation | Covariance -> + constrain_get_dims st + | _ -> SizedType.get_dims st + in (* this is an absolute hack I need to unpack the constraint arguments and the dimensions in codegen, but we pack them all together into a fake function FnReadParam as expressions @@ -230,7 +247,7 @@ let param_read smeta ( Expr.Helpers.str (constrain_constraint_to_string out_trans Constrain) :: n_args_expression - :: (transform_args @ SizedType.get_dims cst) )) + :: (transform_args @ read_constrain_dims out_trans cst) )) Typed.Meta.{decl_var.meta with type_= ut}) in [ Stmt.Fixed. diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index e1c76717a0..deb5841832 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -19013,7 +19013,7 @@ class param_constraint_model final : public model_base_crtp>, jacobian__>( - lp__, nt, 2, 2), "assigning variable L_Omega"); + lp__, nt, 2), "assigning variable L_Omega"); Eigen::Matrix z1; z1 = Eigen::Matrix(NS); stan::math::fill(z1, DUMMY_VAR__); @@ -19063,7 +19063,7 @@ class param_constraint_model final : public model_base_crtp>, jacobian__>( - lp__, nt, 2, 2), "assigning variable L_Omega"); + lp__, nt, 2), "assigning variable L_Omega"); Eigen::Matrix z1; z1 = Eigen::Matrix(NS); stan::math::fill(z1, std::numeric_limits::quiet_NaN()); diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 9601ab65f4..d81535edcf 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -28953,7 +28953,7 @@ class optimizations_model final : public model_base_crtp { current_statement__ = 5; assign(x_cov, in__.template read_constrain_cov_matrix, jacobian__>( - lp__, 2, 2), "assigning variable x_cov"); + lp__, 2), "assigning variable x_cov"); { double x; x = std::numeric_limits::quiet_NaN(); @@ -29524,7 +29524,7 @@ class optimizations_model final : public model_base_crtp { current_statement__ = 5; assign(x_cov, in__.template read_constrain_cov_matrix, jacobian__>( - lp__, 2, 2), "assigning variable x_cov"); + lp__, 2), "assigning variable x_cov"); vars__.emplace_back(theta); vars__.emplace_back(phi); { From 1716dffced1771f8fbc80542759065438a794ac0 Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Thu, 18 Mar 2021 19:10:44 -0400 Subject: [PATCH 10/31] Fix bug in pedantic mode brought up by constraint changes --- src/analysis_and_optimization/Pedantic_analysis.ml | 11 ++++++----- test/unit/Pedantic_analysis.ml | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/analysis_and_optimization/Pedantic_analysis.ml b/src/analysis_and_optimization/Pedantic_analysis.ml index 081f6b18fd..f2524b3774 100644 --- a/src/analysis_and_optimization/Pedantic_analysis.ml +++ b/src/analysis_and_optimization/Pedantic_analysis.ml @@ -75,12 +75,13 @@ let list_multi_twiddles (mir : Program.Typed.t) : let var_deps info_map label ?expr:(expr_opt : Expr.Typed.t option = None) (targets : string Set.Poly.t) : string Set.Poly.t = (* Labels of dependencies *) - let dep_labels = + (* let expr_vars_opt = Set.Poly.map ~f:fst (expr_var_set expr) in *) + let (dep_labels, expr_vars) = match expr_opt with - | None -> node_dependencies info_map label + | None -> (node_dependencies info_map label, Set.Poly.empty) | Some expr -> - let vars = Set.Poly.map ~f:fst (expr_var_set expr) in - node_vars_dependencies info_map vars label + let vvars = Set.Poly.map ~f:fst (expr_var_set expr) in + (node_vars_dependencies info_map vvars label, Set.Poly.map ~f:string_of_vexpr vvars) in (* expressions of dependencies *) let dep_exprs = @@ -91,7 +92,7 @@ let var_deps info_map label ?expr:(expr_opt : Expr.Typed.t option = None) (* variable dependencies *) let dep_vars = Set.Poly.map ~f:(fun (VVar v, _) -> v) dep_exprs in (* target dependencies *) - Set.Poly.inter targets dep_vars + Set.Poly.inter targets (Set.Poly.union dep_vars expr_vars) let list_target_dependant_cf (info_map : diff --git a/test/unit/Pedantic_analysis.ml b/test/unit/Pedantic_analysis.ml index c73f74248d..ffe9b394d3 100644 --- a/test/unit/Pedantic_analysis.ml +++ b/test/unit/Pedantic_analysis.ml @@ -618,6 +618,7 @@ model { let%expect_test "Function body parameter-dependent control flow" = print_warn_pedantic (build_program fundef_cf_example) ; [%expect {| + Warning in 'string', line 4, column 4: A control flow statement inside function func depends on argument b. At 'string', line 19, column 21 to column 26, the value of b depends on parameter(s): sigma. Warning: The parameter sigma has no priors. |}] From 5191df75206a1c199512f14ff0a7264c60928085 Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Thu, 18 Mar 2021 19:11:03 -0400 Subject: [PATCH 11/31] formatting --- src/analysis_and_optimization/Pedantic_analysis.ml | 5 +++-- test/unit/Pedantic_analysis.ml | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/analysis_and_optimization/Pedantic_analysis.ml b/src/analysis_and_optimization/Pedantic_analysis.ml index f2524b3774..ef6e8e8b85 100644 --- a/src/analysis_and_optimization/Pedantic_analysis.ml +++ b/src/analysis_and_optimization/Pedantic_analysis.ml @@ -76,12 +76,13 @@ let var_deps info_map label ?expr:(expr_opt : Expr.Typed.t option = None) (targets : string Set.Poly.t) : string Set.Poly.t = (* Labels of dependencies *) (* let expr_vars_opt = Set.Poly.map ~f:fst (expr_var_set expr) in *) - let (dep_labels, expr_vars) = + let dep_labels, expr_vars = match expr_opt with | None -> (node_dependencies info_map label, Set.Poly.empty) | Some expr -> let vvars = Set.Poly.map ~f:fst (expr_var_set expr) in - (node_vars_dependencies info_map vvars label, Set.Poly.map ~f:string_of_vexpr vvars) + ( node_vars_dependencies info_map vvars label + , Set.Poly.map ~f:string_of_vexpr vvars ) in (* expressions of dependencies *) let dep_exprs = diff --git a/test/unit/Pedantic_analysis.ml b/test/unit/Pedantic_analysis.ml index ffe9b394d3..a785035b10 100644 --- a/test/unit/Pedantic_analysis.ml +++ b/test/unit/Pedantic_analysis.ml @@ -617,7 +617,8 @@ model { let%expect_test "Function body parameter-dependent control flow" = print_warn_pedantic (build_program fundef_cf_example) ; - [%expect {| + [%expect + {| Warning in 'string', line 4, column 4: A control flow statement inside function func depends on argument b. At 'string', line 19, column 21 to column 26, the value of b depends on parameter(s): sigma. Warning: The parameter sigma has no priors. |}] From fae09299139ee2e07efae8250d9a433d881e4a9f Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Thu, 18 Mar 2021 21:31:29 -0400 Subject: [PATCH 12/31] add template keyword to read for deserializer --- src/stan_math_backend/Expression_gen.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index f48e871f0a..78fee212f3 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -423,7 +423,7 @@ and pp_compiler_internal_fn ad ut f ppf es = let constraint_args, dims = List.split_n args n_constraint_args in if String.is_empty constraint_string then let arg_exprs = constraint_args @ dims in - pf ppf "@[in__.read<%a>(@,%a)@]" pp_unsizedtype_local + pf ppf "@[in__.template read<%a>(@,%a)@]" pp_unsizedtype_local (UnsizedType.AutoDiffable, ut) (list ~sep:comma pp_expr) arg_exprs else From 4c9fdaf85af396a1a9991b4cfe166f25a988a123 Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Thu, 18 Mar 2021 21:33:29 -0400 Subject: [PATCH 13/31] add template keyword to read for deserializer --- test/integration/good/code-gen/cl.expected | 42 ++- test/integration/good/code-gen/cpp.expected | 348 ++++++++++-------- .../good/code-gen/opencl/cpp.expected | 60 +-- .../good/compiler-optimizations/cpp.expected | 248 +++++++------ 4 files changed, 386 insertions(+), 312 deletions(-) diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index 8808622690..30989a7fdc 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -575,21 +575,24 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, DUMMY_VAR__); current_statement__ = 1; - assign(alpha_v, in__.read>(k), + assign(alpha_v, + in__.template read>(k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - assign(beta, in__.read>(k), + assign(beta, + in__.template read>(k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, DUMMY_VAR__); current_statement__ = 3; - assign(cuts, in__.read>(k), + assign(cuts, + in__.template read>(k), "assigning variable cuts"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -601,18 +604,19 @@ class optimize_glm_model final : public model_base_crtp { alpha = DUMMY_VAR__; current_statement__ = 5; - alpha = in__.read(); + alpha = in__.template read(); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 6; - phi = in__.read(); + phi = in__.template read(); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, DUMMY_VAR__); current_statement__ = 7; - assign(X_p, in__.read>(n, k), + assign(X_p, + in__.template read>(n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); @@ -620,14 +624,15 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 8; assign(beta_m, - in__.read>(n, k), + in__.template read>(n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, DUMMY_VAR__); current_statement__ = 9; - assign(X_rv_p, in__.read>(n), + assign(X_rv_p, + in__.template read>(n), "assigning variable X_rv_p"); { current_statement__ = 10; @@ -1299,21 +1304,24 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(alpha_v, in__.read>(k), + assign(alpha_v, + in__.template read>(k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(beta, in__.read>(k), + assign(beta, + in__.template read>(k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(cuts, in__.read>(k), + assign(cuts, + in__.template read>(k), "assigning variable cuts"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -1325,18 +1333,19 @@ class optimize_glm_model final : public model_base_crtp { alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - alpha = in__.read(); + alpha = in__.template read(); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - phi = in__.read(); + phi = in__.template read(); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - assign(X_p, in__.read>(n, k), + assign(X_p, + in__.template read>(n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); @@ -1344,14 +1353,15 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 8; assign(beta_m, - in__.read>(n, k), + in__.template read>(n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, std::numeric_limits::quiet_NaN()); current_statement__ = 9; - assign(X_rv_p, in__.read>(n), + assign(X_rv_p, + in__.template read>(n), "assigning variable X_rv_p"); for (int sym1__ = 1; sym1__ <= k; ++sym1__) { vars__.emplace_back(alpha_v[(sym1__ - 1)]);} diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index deb5841832..4b4db1ca09 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -150,7 +150,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> mu = DUMMY_VAR__; current_statement__ = 1; - mu = in__.read(); + mu = in__.template read(); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -163,7 +163,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> current_statement__ = 3; assign(theta_tilde, - in__.read>(J), + in__.template read>(J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); @@ -218,7 +218,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mu = in__.read(); + mu = in__.template read(); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -231,7 +231,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> current_statement__ = 3; assign(theta_tilde, - in__.read>(J), + in__.template read>(J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); @@ -595,7 +595,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb bar = DUMMY_VAR__; current_statement__ = 1; - bar = in__.read(); + bar = in__.template read(); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); // Next line prevents compiler griping about no return @@ -632,7 +632,7 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb bar = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - bar = in__.read(); + bar = in__.template read(); vars__.emplace_back(bar); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -973,7 +973,7 @@ class eight_schools_ncp_model final : public model_base_crtp(); + mu = in__.template read(); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -986,7 +986,7 @@ class eight_schools_ncp_model final : public model_base_crtp>(J), + in__.template read>(J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); @@ -1041,7 +1041,7 @@ class eight_schools_ncp_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mu = in__.read(); + mu = in__.template read(); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -1054,7 +1054,7 @@ class eight_schools_ncp_model final : public model_base_crtp>(J), + in__.template read>(J), "assigning variable theta_tilde"); Eigen::Matrix theta; theta = Eigen::Matrix(J); @@ -1418,7 +1418,7 @@ class mixed_type_arrays_model final : public model_base_crtp(3, DUMMY_VAR__); current_statement__ = 1; - assign(xx, in__.read>(3), + assign(xx, in__.template read>(3), "assigning variable xx"); std::vector> y; y = std::vector>(3, std::vector(3, DUMMY_VAR__)); @@ -1485,7 +1485,7 @@ class mixed_type_arrays_model final : public model_base_crtp(3, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(xx, in__.read>(3), + assign(xx, in__.template read>(3), "assigning variable xx"); std::vector> y; y = std::vector>(3, std::vector(3, std::numeric_limits::quiet_NaN())); @@ -6731,7 +6731,7 @@ class mother_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.read(); + p_real = in__.template read(); local_scalar_t__ p_upper; p_upper = DUMMY_VAR__; @@ -6793,22 +6793,23 @@ class mother_model final : public model_base_crtp { current_statement__ = 10; assign(p_1d_vec, - in__.read>>(N, N), - "assigning variable p_1d_vec"); + in__.template read>>( + N, N), "assigning variable p_1d_vec"); std::vector>>> p_3d_vec; p_3d_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_vec, DUMMY_VAR__); current_statement__ = 11; assign(p_3d_vec, - in__.read>>>>( + in__.template read>>>>( N, M, K, N), "assigning variable p_3d_vec"); Eigen::Matrix p_row_vec; p_row_vec = Eigen::Matrix(N); stan::math::fill(p_row_vec, DUMMY_VAR__); current_statement__ = 12; - assign(p_row_vec, in__.read>(N), + assign(p_row_vec, + in__.template read>(N), "assigning variable p_row_vec"); std::vector> p_1d_row_vec; p_1d_row_vec = std::vector>(N, Eigen::Matrix(N)); @@ -6816,15 +6817,15 @@ class mother_model final : public model_base_crtp { current_statement__ = 13; assign(p_1d_row_vec, - in__.read>>(N, N), - "assigning variable p_1d_row_vec"); + in__.template read>>( + N, N), "assigning variable p_1d_row_vec"); std::vector>>> p_3d_row_vec; p_3d_row_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_row_vec, DUMMY_VAR__); current_statement__ = 14; assign(p_3d_row_vec, - in__.read>>>>( + in__.template read>>>>( N, M, K, N), "assigning variable p_3d_row_vec"); std::vector>> p_ar_mat; p_ar_mat = std::vector>>(4, std::vector>(5, Eigen::Matrix(2, 3))); @@ -6887,14 +6888,16 @@ class mother_model final : public model_base_crtp { stan::math::fill(x_p, DUMMY_VAR__); current_statement__ = 22; - assign(x_p, in__.read>(2), + assign(x_p, + in__.template read>(2), "assigning variable x_p"); Eigen::Matrix y_p; y_p = Eigen::Matrix(2); stan::math::fill(y_p, DUMMY_VAR__); current_statement__ = 23; - assign(y_p, in__.read>(2), + assign(y_p, + in__.template read>(2), "assigning variable y_p"); std::vector tp_real_1d_ar; tp_real_1d_ar = std::vector(N, DUMMY_VAR__); @@ -7276,7 +7279,7 @@ class mother_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.read(); + p_real = in__.template read(); double p_upper; p_upper = std::numeric_limits::quiet_NaN(); @@ -7338,22 +7341,23 @@ class mother_model final : public model_base_crtp { current_statement__ = 10; assign(p_1d_vec, - in__.read>>(N, N), - "assigning variable p_1d_vec"); + in__.template read>>( + N, N), "assigning variable p_1d_vec"); std::vector>>> p_3d_vec; p_3d_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 11; assign(p_3d_vec, - in__.read>>>>( + in__.template read>>>>( N, M, K, N), "assigning variable p_3d_vec"); Eigen::Matrix p_row_vec; p_row_vec = Eigen::Matrix(N); stan::math::fill(p_row_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 12; - assign(p_row_vec, in__.read>(N), + assign(p_row_vec, + in__.template read>(N), "assigning variable p_row_vec"); std::vector> p_1d_row_vec; p_1d_row_vec = std::vector>(N, Eigen::Matrix(N)); @@ -7361,15 +7365,15 @@ class mother_model final : public model_base_crtp { current_statement__ = 13; assign(p_1d_row_vec, - in__.read>>(N, N), - "assigning variable p_1d_row_vec"); + in__.template read>>( + N, N), "assigning variable p_1d_row_vec"); std::vector>>> p_3d_row_vec; p_3d_row_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_row_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 14; assign(p_3d_row_vec, - in__.read>>>>( + in__.template read>>>>( N, M, K, N), "assigning variable p_3d_row_vec"); std::vector>> p_ar_mat; p_ar_mat = std::vector>>(4, std::vector>(5, Eigen::Matrix(2, 3))); @@ -7432,14 +7436,16 @@ class mother_model final : public model_base_crtp { stan::math::fill(x_p, std::numeric_limits::quiet_NaN()); current_statement__ = 22; - assign(x_p, in__.read>(2), + assign(x_p, + in__.template read>(2), "assigning variable x_p"); Eigen::Matrix y_p; y_p = Eigen::Matrix(2); stan::math::fill(y_p, std::numeric_limits::quiet_NaN()); current_statement__ = 23; - assign(y_p, in__.read>(2), + assign(y_p, + in__.template read>(2), "assigning variable y_p"); std::vector tp_real_1d_ar; tp_real_1d_ar = std::vector(N, std::numeric_limits::quiet_NaN()); @@ -11034,26 +11040,27 @@ class motherHOF_model final : public model_base_crtp { y0_p = std::vector(2, DUMMY_VAR__); current_statement__ = 1; - assign(y0_p, in__.read>(2), + assign(y0_p, in__.template read>(2), "assigning variable y0_p"); std::vector theta_p; theta_p = std::vector(1, DUMMY_VAR__); current_statement__ = 2; - assign(theta_p, in__.read>(1), + assign(theta_p, in__.template read>(1), "assigning variable theta_p"); std::vector x_p; x_p = std::vector(1, DUMMY_VAR__); current_statement__ = 3; - assign(x_p, in__.read>(1), + assign(x_p, in__.template read>(1), "assigning variable x_p"); Eigen::Matrix x_p_v; x_p_v = Eigen::Matrix(2); stan::math::fill(x_p_v, DUMMY_VAR__); current_statement__ = 4; - assign(x_p_v, in__.read>(2), + assign(x_p_v, + in__.template read>(2), "assigning variable x_p_v"); Eigen::Matrix shared_params_p; shared_params_p = Eigen::Matrix(3); @@ -11061,7 +11068,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 5; assign(shared_params_p, - in__.read>(3), + in__.template read>(3), "assigning variable shared_params_p"); std::vector> job_params_p; job_params_p = std::vector>(3, Eigen::Matrix(3)); @@ -11069,13 +11076,13 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 6; assign(job_params_p, - in__.read>>(3, 3), - "assigning variable job_params_p"); + in__.template read>>( + 3, 3), "assigning variable job_params_p"); local_scalar_t__ x_r; x_r = DUMMY_VAR__; current_statement__ = 7; - x_r = in__.read(); + x_r = in__.template read(); local_scalar_t__ abc1_p; abc1_p = DUMMY_VAR__; @@ -11379,26 +11386,27 @@ class motherHOF_model final : public model_base_crtp { y0_p = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(y0_p, in__.read>(2), + assign(y0_p, in__.template read>(2), "assigning variable y0_p"); std::vector theta_p; theta_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(theta_p, in__.read>(1), + assign(theta_p, in__.template read>(1), "assigning variable theta_p"); std::vector x_p; x_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(x_p, in__.read>(1), + assign(x_p, in__.template read>(1), "assigning variable x_p"); Eigen::Matrix x_p_v; x_p_v = Eigen::Matrix(2); stan::math::fill(x_p_v, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(x_p_v, in__.read>(2), + assign(x_p_v, + in__.template read>(2), "assigning variable x_p_v"); Eigen::Matrix shared_params_p; shared_params_p = Eigen::Matrix(3); @@ -11406,7 +11414,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 5; assign(shared_params_p, - in__.read>(3), + in__.template read>(3), "assigning variable shared_params_p"); std::vector> job_params_p; job_params_p = std::vector>(3, Eigen::Matrix(3)); @@ -11414,13 +11422,13 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 6; assign(job_params_p, - in__.read>>(3, 3), - "assigning variable job_params_p"); + in__.template read>>( + 3, 3), "assigning variable job_params_p"); double x_r; x_r = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - x_r = in__.read(); + x_r = in__.template read(); double abc1_p; abc1_p = std::numeric_limits::quiet_NaN(); @@ -13304,19 +13312,20 @@ class new_integrate_interface_model final : public model_base_crtp(); + r = in__.template read(); std::vector ra; ra = std::vector(N, DUMMY_VAR__); current_statement__ = 2; - assign(ra, in__.read>(N), + assign(ra, in__.template read>(N), "assigning variable ra"); Eigen::Matrix v; v = Eigen::Matrix(N); stan::math::fill(v, DUMMY_VAR__); current_statement__ = 3; - assign(v, in__.read>(N), + assign(v, + in__.template read>(N), "assigning variable v"); std::vector> z; z = std::vector>(N, Eigen::Matrix(N)); @@ -14765,19 +14774,20 @@ class new_integrate_interface_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - r = in__.read(); + r = in__.template read(); std::vector ra; ra = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(ra, in__.read>(N), + assign(ra, in__.template read>(N), "assigning variable ra"); Eigen::Matrix v; v = Eigen::Matrix(N); stan::math::fill(v, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(v, in__.read>(N), + assign(v, + in__.template read>(N), "assigning variable v"); std::vector> z; z = std::vector>(N, Eigen::Matrix(N)); @@ -17757,21 +17767,24 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, DUMMY_VAR__); current_statement__ = 1; - assign(alpha_v, in__.read>(k), + assign(alpha_v, + in__.template read>(k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - assign(beta, in__.read>(k), + assign(beta, + in__.template read>(k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, DUMMY_VAR__); current_statement__ = 3; - assign(cuts, in__.read>(k), + assign(cuts, + in__.template read>(k), "assigning variable cuts"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -17783,18 +17796,19 @@ class optimize_glm_model final : public model_base_crtp { alpha = DUMMY_VAR__; current_statement__ = 5; - alpha = in__.read(); + alpha = in__.template read(); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 6; - phi = in__.read(); + phi = in__.template read(); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, DUMMY_VAR__); current_statement__ = 7; - assign(X_p, in__.read>(n, k), + assign(X_p, + in__.template read>(n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); @@ -17802,14 +17816,15 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 8; assign(beta_m, - in__.read>(n, k), + in__.template read>(n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, DUMMY_VAR__); current_statement__ = 9; - assign(X_rv_p, in__.read>(n), + assign(X_rv_p, + in__.template read>(n), "assigning variable X_rv_p"); { current_statement__ = 10; @@ -18386,21 +18401,24 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(alpha_v, in__.read>(k), + assign(alpha_v, + in__.template read>(k), "assigning variable alpha_v"); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(beta, in__.read>(k), + assign(beta, + in__.template read>(k), "assigning variable beta"); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(cuts, in__.read>(k), + assign(cuts, + in__.template read>(k), "assigning variable cuts"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -18412,18 +18430,19 @@ class optimize_glm_model final : public model_base_crtp { alpha = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - alpha = in__.read(); + alpha = in__.template read(); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - phi = in__.read(); + phi = in__.template read(); Eigen::Matrix X_p; X_p = Eigen::Matrix(n, k); stan::math::fill(X_p, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - assign(X_p, in__.read>(n, k), + assign(X_p, + in__.template read>(n, k), "assigning variable X_p"); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); @@ -18431,14 +18450,15 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 8; assign(beta_m, - in__.read>(n, k), + in__.template read>(n, k), "assigning variable beta_m"); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, std::numeric_limits::quiet_NaN()); current_statement__ = 9; - assign(X_rv_p, in__.read>(n), + assign(X_rv_p, + in__.template read>(n), "assigning variable X_rv_p"); for (int sym1__ = 1; sym1__ <= k; ++sym1__) { vars__.emplace_back(alpha_v[(sym1__ - 1)]);} @@ -19640,19 +19660,19 @@ class reduce_sum_m1_model final : public model_base_crtp { y1 = std::vector(N, DUMMY_VAR__); current_statement__ = 1; - assign(y1, in__.read>(N), + assign(y1, in__.template read>(N), "assigning variable y1"); std::vector y2; y2 = std::vector(N, DUMMY_VAR__); current_statement__ = 2; - assign(y2, in__.read>(N), + assign(y2, in__.template read>(N), "assigning variable y2"); std::vector y3; y3 = std::vector(N, DUMMY_VAR__); current_statement__ = 3; - assign(y3, in__.read>(N), + assign(y3, in__.template read>(N), "assigning variable y3"); { current_statement__ = 4; @@ -19702,19 +19722,19 @@ class reduce_sum_m1_model final : public model_base_crtp { y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(y1, in__.read>(N), + assign(y1, in__.template read>(N), "assigning variable y1"); std::vector y2; y2 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(y2, in__.read>(N), + assign(y2, in__.template read>(N), "assigning variable y2"); std::vector y3; y3 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(y3, in__.read>(N), + assign(y3, in__.template read>(N), "assigning variable y3"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { vars__.emplace_back(y1[(sym1__ - 1)]);} @@ -21242,7 +21262,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 1; assign(a8, - in__.read>>>( + in__.template read>>>( N, N, N, N), "assigning variable a8"); std::vector>> a7; a7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -21250,7 +21270,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 2; assign(a7, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable a7"); std::vector>> a6; a6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -21258,13 +21278,14 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 3; assign(a6, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable a6"); std::vector> a5; a5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 4; - assign(a5, in__.read>>(N, N), + assign(a5, + in__.template read>>(N, N), "assigning variable a5"); std::vector> a4; a4 = std::vector>(N, Eigen::Matrix(N, N)); @@ -21272,29 +21293,29 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 5; assign(a4, - in__.read>>(N, N, - N), "assigning variable a4"); + in__.template read>>( + N, N, N), "assigning variable a4"); std::vector> a3; a3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a3, DUMMY_VAR__); current_statement__ = 6; assign(a3, - in__.read>>(N, N), - "assigning variable a3"); + in__.template read>>( + N, N), "assigning variable a3"); std::vector> a2; a2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a2, DUMMY_VAR__); current_statement__ = 7; assign(a2, - in__.read>>(N, N), - "assigning variable a2"); + in__.template read>>( + N, N), "assigning variable a2"); std::vector a1; a1 = std::vector(N, DUMMY_VAR__); current_statement__ = 8; - assign(a1, in__.read>(N), + assign(a1, in__.template read>(N), "assigning variable a1"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); @@ -21302,7 +21323,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 9; assign(y8, - in__.read>>>( + in__.template read>>>( N, N, N, N), "assigning variable y8"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -21310,7 +21331,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 10; assign(y7, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable y7"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -21318,13 +21339,14 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 11; assign(y6, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable y6"); std::vector> y5; y5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 12; - assign(y5, in__.read>>(N, N), + assign(y5, + in__.template read>>(N, N), "assigning variable y5"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); @@ -21332,29 +21354,29 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 13; assign(y4, - in__.read>>(N, N, - N), "assigning variable y4"); + in__.template read>>( + N, N, N), "assigning variable y4"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, DUMMY_VAR__); current_statement__ = 14; assign(y3, - in__.read>>(N, N), - "assigning variable y3"); + in__.template read>>( + N, N), "assigning variable y3"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, DUMMY_VAR__); current_statement__ = 15; assign(y2, - in__.read>>(N, N), - "assigning variable y2"); + in__.template read>>( + N, N), "assigning variable y2"); std::vector y1; y1 = std::vector(N, DUMMY_VAR__); current_statement__ = 16; - assign(y1, in__.read>(N), + assign(y1, in__.template read>(N), "assigning variable y1"); { current_statement__ = 17; @@ -21428,7 +21450,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 1; assign(a8, - in__.read>>>( + in__.template read>>>( N, N, N, N), "assigning variable a8"); std::vector>> a7; a7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -21436,7 +21458,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 2; assign(a7, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable a7"); std::vector>> a6; a6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -21444,13 +21466,14 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 3; assign(a6, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable a6"); std::vector> a5; a5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 4; - assign(a5, in__.read>>(N, N), + assign(a5, + in__.template read>>(N, N), "assigning variable a5"); std::vector> a4; a4 = std::vector>(N, Eigen::Matrix(N, N)); @@ -21458,29 +21481,29 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 5; assign(a4, - in__.read>>(N, N, - N), "assigning variable a4"); + in__.template read>>( + N, N, N), "assigning variable a4"); std::vector> a3; a3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a3, std::numeric_limits::quiet_NaN()); current_statement__ = 6; assign(a3, - in__.read>>(N, N), - "assigning variable a3"); + in__.template read>>( + N, N), "assigning variable a3"); std::vector> a2; a2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a2, std::numeric_limits::quiet_NaN()); current_statement__ = 7; assign(a2, - in__.read>>(N, N), - "assigning variable a2"); + in__.template read>>( + N, N), "assigning variable a2"); std::vector a1; a1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - assign(a1, in__.read>(N), + assign(a1, in__.template read>(N), "assigning variable a1"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); @@ -21488,7 +21511,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 9; assign(y8, - in__.read>>>( + in__.template read>>>( N, N, N, N), "assigning variable y8"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -21496,7 +21519,7 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 10; assign(y7, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable y7"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -21504,13 +21527,14 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 11; assign(y6, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable y6"); std::vector> y5; y5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 12; - assign(y5, in__.read>>(N, N), + assign(y5, + in__.template read>>(N, N), "assigning variable y5"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); @@ -21518,29 +21542,29 @@ class reduce_sum_m2_model final : public model_base_crtp { current_statement__ = 13; assign(y4, - in__.read>>(N, N, - N), "assigning variable y4"); + in__.template read>>( + N, N, N), "assigning variable y4"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, std::numeric_limits::quiet_NaN()); current_statement__ = 14; assign(y3, - in__.read>>(N, N), - "assigning variable y3"); + in__.template read>>( + N, N), "assigning variable y3"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, std::numeric_limits::quiet_NaN()); current_statement__ = 15; assign(y2, - in__.read>>(N, N), - "assigning variable y2"); + in__.template read>>( + N, N), "assigning variable y2"); std::vector y1; y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 16; - assign(y1, in__.read>(N), + assign(y1, in__.template read>(N), "assigning variable y1"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { for (int sym2__ = 1; sym2__ <= N; ++sym2__) { @@ -25274,7 +25298,7 @@ class reduce_sum_m3_model final : public model_base_crtp { y1 = std::vector(N, DUMMY_VAR__); current_statement__ = 1; - assign(y1, in__.read>(N), + assign(y1, in__.template read>(N), "assigning variable y1"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); @@ -25282,29 +25306,30 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 2; assign(y2, - in__.read>>(N, N), - "assigning variable y2"); + in__.template read>>( + N, N), "assigning variable y2"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, DUMMY_VAR__); current_statement__ = 3; assign(y3, - in__.read>>(N, N), - "assigning variable y3"); + in__.template read>>( + N, N), "assigning variable y3"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, DUMMY_VAR__); current_statement__ = 4; assign(y4, - in__.read>>(N, N, - N), "assigning variable y4"); + in__.template read>>( + N, N, N), "assigning variable y4"); std::vector> y5; y5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 5; - assign(y5, in__.read>>(N, N), + assign(y5, + in__.template read>>(N, N), "assigning variable y5"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -25312,7 +25337,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 6; assign(y6, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable y6"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -25320,7 +25345,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 7; assign(y7, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable y7"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); @@ -25328,41 +25353,44 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 8; assign(y8, - in__.read>>>( + in__.template read>>>( N, N, N, N), "assigning variable y8"); local_scalar_t__ y9; y9 = DUMMY_VAR__; current_statement__ = 9; - y9 = in__.read(); + y9 = in__.template read(); Eigen::Matrix y10; y10 = Eigen::Matrix(N); stan::math::fill(y10, DUMMY_VAR__); current_statement__ = 10; - assign(y10, in__.read>(N), + assign(y10, + in__.template read>(N), "assigning variable y10"); Eigen::Matrix y11; y11 = Eigen::Matrix(N); stan::math::fill(y11, DUMMY_VAR__); current_statement__ = 11; - assign(y11, in__.read>(N), + assign(y11, + in__.template read>(N), "assigning variable y11"); Eigen::Matrix y12; y12 = Eigen::Matrix(N, N); stan::math::fill(y12, DUMMY_VAR__); current_statement__ = 12; - assign(y12, in__.read>(N, N), + assign(y12, + in__.template read>(N, N), "assigning variable y12"); std::vector>> y17; y17 = std::vector>>(N, std::vector>(N, std::vector(N, DUMMY_VAR__))); current_statement__ = 13; assign(y17, - in__.read>>>(N, - N, N), "assigning variable y17"); + in__.template read>>>( + N, N, N), "assigning variable y17"); { local_scalar_t__ t1; t1 = DUMMY_VAR__; @@ -25538,7 +25566,7 @@ class reduce_sum_m3_model final : public model_base_crtp { y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(y1, in__.read>(N), + assign(y1, in__.template read>(N), "assigning variable y1"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); @@ -25546,29 +25574,30 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 2; assign(y2, - in__.read>>(N, N), - "assigning variable y2"); + in__.template read>>( + N, N), "assigning variable y2"); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(y3, - in__.read>>(N, N), - "assigning variable y3"); + in__.template read>>( + N, N), "assigning variable y3"); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(y4, - in__.read>>(N, N, - N), "assigning variable y4"); + in__.template read>>( + N, N, N), "assigning variable y4"); std::vector> y5; y5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 5; - assign(y5, in__.read>>(N, N), + assign(y5, + in__.template read>>(N, N), "assigning variable y5"); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -25576,7 +25605,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 6; assign(y6, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable y6"); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); @@ -25584,7 +25613,7 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 7; assign(y7, - in__.read>>>( + in__.template read>>>( N, N, N), "assigning variable y7"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); @@ -25592,41 +25621,44 @@ class reduce_sum_m3_model final : public model_base_crtp { current_statement__ = 8; assign(y8, - in__.read>>>( + in__.template read>>>( N, N, N, N), "assigning variable y8"); double y9; y9 = std::numeric_limits::quiet_NaN(); current_statement__ = 9; - y9 = in__.read(); + y9 = in__.template read(); Eigen::Matrix y10; y10 = Eigen::Matrix(N); stan::math::fill(y10, std::numeric_limits::quiet_NaN()); current_statement__ = 10; - assign(y10, in__.read>(N), + assign(y10, + in__.template read>(N), "assigning variable y10"); Eigen::Matrix y11; y11 = Eigen::Matrix(N); stan::math::fill(y11, std::numeric_limits::quiet_NaN()); current_statement__ = 11; - assign(y11, in__.read>(N), + assign(y11, + in__.template read>(N), "assigning variable y11"); Eigen::Matrix y12; y12 = Eigen::Matrix(N, N); stan::math::fill(y12, std::numeric_limits::quiet_NaN()); current_statement__ = 12; - assign(y12, in__.read>(N, N), + assign(y12, + in__.template read>(N, N), "assigning variable y12"); std::vector>> y17; y17 = std::vector>>(N, std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN()))); current_statement__ = 13; assign(y17, - in__.read>>>(N, - N, N), "assigning variable y17"); + in__.template read>>>( + N, N, N), "assigning variable y17"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { vars__.emplace_back(y1[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= N; ++sym1__) { @@ -30826,7 +30858,7 @@ class truncate_model final : public model_base_crtp { m = DUMMY_VAR__; current_statement__ = 1; - m = in__.read(); + m = in__.template read(); local_scalar_t__ y; y = DUMMY_VAR__; @@ -30951,7 +30983,7 @@ class truncate_model final : public model_base_crtp { m = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - m = in__.read(); + m = in__.template read(); double y; y = std::numeric_limits::quiet_NaN(); @@ -31289,7 +31321,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp(); + x = in__.template read(); { current_statement__ = 2; lp_accum__.add(normal_lpdf(x, 0, 1)); @@ -31330,7 +31362,7 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - x = in__.read(); + x = in__.template read(); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { diff --git a/test/integration/good/code-gen/opencl/cpp.expected b/test/integration/good/code-gen/opencl/cpp.expected index 6b330445bc..e5816ab2ac 100644 --- a/test/integration/good/code-gen/opencl/cpp.expected +++ b/test/integration/good/code-gen/opencl/cpp.expected @@ -975,12 +975,13 @@ class distributions_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.read(); + p_real = in__.template read(); std::vector p_real_array; p_real_array = std::vector(d_int, DUMMY_VAR__); current_statement__ = 2; - assign(p_real_array, in__.read>(d_int), + assign(p_real_array, + in__.template read>(d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -988,15 +989,15 @@ class distributions_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, - in__.read>(d_int, d_int), - "assigning variable p_matrix"); + in__.template read>(d_int, + d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, DUMMY_VAR__); current_statement__ = 4; assign(p_vector, - in__.read>(d_int), + in__.template read>(d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); @@ -1004,13 +1005,13 @@ class distributions_model final : public model_base_crtp { current_statement__ = 5; assign(p_row_vector, - in__.read>(d_int), + in__.template read>(d_int), "assigning variable p_row_vector"); local_scalar_t__ y_p; y_p = DUMMY_VAR__; current_statement__ = 6; - y_p = in__.read(); + y_p = in__.template read(); local_scalar_t__ transformed_param_real; transformed_param_real = DUMMY_VAR__; @@ -3523,12 +3524,13 @@ class distributions_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.read(); + p_real = in__.template read(); std::vector p_real_array; p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(p_real_array, in__.read>(d_int), + assign(p_real_array, + in__.template read>(d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -3536,15 +3538,15 @@ class distributions_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, - in__.read>(d_int, d_int), - "assigning variable p_matrix"); + in__.template read>(d_int, + d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(p_vector, - in__.read>(d_int), + in__.template read>(d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); @@ -3552,13 +3554,13 @@ class distributions_model final : public model_base_crtp { current_statement__ = 5; assign(p_row_vector, - in__.read>(d_int), + in__.template read>(d_int), "assigning variable p_row_vector"); double y_p; y_p = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - y_p = in__.read(); + y_p = in__.template read(); double transformed_param_real; transformed_param_real = std::numeric_limits::quiet_NaN(); @@ -6612,12 +6614,13 @@ class restricted_model final : public model_base_crtp { p_real = DUMMY_VAR__; current_statement__ = 1; - p_real = in__.read(); + p_real = in__.template read(); std::vector p_real_array; p_real_array = std::vector(d_int, DUMMY_VAR__); current_statement__ = 2; - assign(p_real_array, in__.read>(d_int), + assign(p_real_array, + in__.template read>(d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -6625,15 +6628,15 @@ class restricted_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, - in__.read>(d_int, d_int), - "assigning variable p_matrix"); + in__.template read>(d_int, + d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, DUMMY_VAR__); current_statement__ = 4; assign(p_vector, - in__.read>(d_int), + in__.template read>(d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); @@ -6641,13 +6644,13 @@ class restricted_model final : public model_base_crtp { current_statement__ = 5; assign(p_row_vector, - in__.read>(d_int), + in__.template read>(d_int), "assigning variable p_row_vector"); local_scalar_t__ y_p; y_p = DUMMY_VAR__; current_statement__ = 6; - y_p = in__.read(); + y_p = in__.template read(); local_scalar_t__ transformed_param_real; transformed_param_real = DUMMY_VAR__; @@ -6729,12 +6732,13 @@ class restricted_model final : public model_base_crtp { p_real = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - p_real = in__.read(); + p_real = in__.template read(); std::vector p_real_array; p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(p_real_array, in__.read>(d_int), + assign(p_real_array, + in__.template read>(d_int), "assigning variable p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); @@ -6742,15 +6746,15 @@ class restricted_model final : public model_base_crtp { current_statement__ = 3; assign(p_matrix, - in__.read>(d_int, d_int), - "assigning variable p_matrix"); + in__.template read>(d_int, + d_int), "assigning variable p_matrix"); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; assign(p_vector, - in__.read>(d_int), + in__.template read>(d_int), "assigning variable p_vector"); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); @@ -6758,13 +6762,13 @@ class restricted_model final : public model_base_crtp { current_statement__ = 5; assign(p_row_vector, - in__.read>(d_int), + in__.template read>(d_int), "assigning variable p_row_vector"); double y_p; y_p = std::numeric_limits::quiet_NaN(); current_statement__ = 6; - y_p = in__.read(); + y_p = in__.template read(); double transformed_param_real; transformed_param_real = std::numeric_limits::quiet_NaN(); diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index d81535edcf..2a67fc44ae 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -3755,40 +3755,42 @@ class dce_fail_model final : public model_base_crtp { b_0 = DUMMY_VAR__; current_statement__ = 7; - b_0 = in__.read(); + b_0 = in__.template read(); local_scalar_t__ b_female; b_female = DUMMY_VAR__; current_statement__ = 8; - b_female = in__.read(); + b_female = in__.template read(); local_scalar_t__ b_black; b_black = DUMMY_VAR__; current_statement__ = 9; - b_black = in__.read(); + b_black = in__.template read(); local_scalar_t__ b_female_black; b_female_black = DUMMY_VAR__; current_statement__ = 10; - b_female_black = in__.read(); + b_female_black = in__.template read(); local_scalar_t__ b_v_prev; b_v_prev = DUMMY_VAR__; current_statement__ = 11; - b_v_prev = in__.read(); + b_v_prev = in__.template read(); Eigen::Matrix b_age; b_age = Eigen::Matrix(n_age); stan::math::fill(b_age, DUMMY_VAR__); current_statement__ = 12; - assign(b_age, in__.read>(n_age), + assign(b_age, + in__.template read>(n_age), "assigning variable b_age"); Eigen::Matrix b_edu; b_edu = Eigen::Matrix(n_edu); stan::math::fill(b_edu, DUMMY_VAR__); current_statement__ = 13; - assign(b_edu, in__.read>(n_edu), + assign(b_edu, + in__.template read>(n_edu), "assigning variable b_edu"); Eigen::Matrix b_region; b_region = Eigen::Matrix(n_region); @@ -3796,7 +3798,7 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 14; assign(b_region, - in__.read>(n_region), + in__.template read>(n_region), "assigning variable b_region"); Eigen::Matrix b_age_edu; b_age_edu = Eigen::Matrix(n_age, n_edu); @@ -3804,15 +3806,15 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 15; assign(b_age_edu, - in__.read>(n_age, n_edu), - "assigning variable b_age_edu"); + in__.template read>(n_age, + n_edu), "assigning variable b_age_edu"); Eigen::Matrix b_hat; b_hat = Eigen::Matrix(n_state); stan::math::fill(b_hat, DUMMY_VAR__); current_statement__ = 16; assign(b_hat, - in__.read>(n_state), + in__.template read>(n_state), "assigning variable b_hat"); { current_statement__ = 17; @@ -4038,40 +4040,42 @@ class dce_fail_model final : public model_base_crtp { b_0 = std::numeric_limits::quiet_NaN(); current_statement__ = 7; - b_0 = in__.read(); + b_0 = in__.template read(); double b_female; b_female = std::numeric_limits::quiet_NaN(); current_statement__ = 8; - b_female = in__.read(); + b_female = in__.template read(); double b_black; b_black = std::numeric_limits::quiet_NaN(); current_statement__ = 9; - b_black = in__.read(); + b_black = in__.template read(); double b_female_black; b_female_black = std::numeric_limits::quiet_NaN(); current_statement__ = 10; - b_female_black = in__.read(); + b_female_black = in__.template read(); double b_v_prev; b_v_prev = std::numeric_limits::quiet_NaN(); current_statement__ = 11; - b_v_prev = in__.read(); + b_v_prev = in__.template read(); Eigen::Matrix b_age; b_age = Eigen::Matrix(n_age); stan::math::fill(b_age, std::numeric_limits::quiet_NaN()); current_statement__ = 12; - assign(b_age, in__.read>(n_age), + assign(b_age, + in__.template read>(n_age), "assigning variable b_age"); Eigen::Matrix b_edu; b_edu = Eigen::Matrix(n_edu); stan::math::fill(b_edu, std::numeric_limits::quiet_NaN()); current_statement__ = 13; - assign(b_edu, in__.read>(n_edu), + assign(b_edu, + in__.template read>(n_edu), "assigning variable b_edu"); Eigen::Matrix b_region; b_region = Eigen::Matrix(n_region); @@ -4079,7 +4083,7 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 14; assign(b_region, - in__.read>(n_region), + in__.template read>(n_region), "assigning variable b_region"); Eigen::Matrix b_age_edu; b_age_edu = Eigen::Matrix(n_age, n_edu); @@ -4087,15 +4091,15 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 15; assign(b_age_edu, - in__.read>(n_age, n_edu), - "assigning variable b_age_edu"); + in__.template read>(n_age, + n_edu), "assigning variable b_age_edu"); Eigen::Matrix b_hat; b_hat = Eigen::Matrix(n_state); stan::math::fill(b_hat, std::numeric_limits::quiet_NaN()); current_statement__ = 16; assign(b_hat, - in__.read>(n_state), + in__.template read>(n_state), "assigning variable b_hat"); vars__.emplace_back(sigma); vars__.emplace_back(sigma_age); @@ -6180,12 +6184,12 @@ class expr_prop_fail2_model final : public model_base_crtp(); + mu = in__.template read(); std::vector theta; theta = std::vector(J, DUMMY_VAR__); current_statement__ = 2; - assign(theta, in__.read>(J), + assign(theta, in__.template read>(J), "assigning variable theta"); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -6240,12 +6244,12 @@ class expr_prop_fail2_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - mu = in__.read(); + mu = in__.template read(); std::vector theta; theta = std::vector(J, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(theta, in__.read>(J), + assign(theta, in__.template read>(J), "assigning variable theta"); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -7129,28 +7133,32 @@ class expr_prop_fail3_model final : public model_base_crtp>(n_age), + assign(a, + in__.template read>(n_age), "assigning variable a"); Eigen::Matrix b; b = Eigen::Matrix(n_edu); stan::math::fill(b, DUMMY_VAR__); current_statement__ = 2; - assign(b, in__.read>(n_edu), + assign(b, + in__.template read>(n_edu), "assigning variable b"); Eigen::Matrix c; c = Eigen::Matrix(n_age_edu); stan::math::fill(c, DUMMY_VAR__); current_statement__ = 3; - assign(c, in__.read>(n_age_edu), + assign(c, + in__.template read>(n_age_edu), "assigning variable c"); Eigen::Matrix d; d = Eigen::Matrix(n_state); stan::math::fill(d, DUMMY_VAR__); current_statement__ = 4; - assign(d, in__.read>(n_state), + assign(d, + in__.template read>(n_state), "assigning variable d"); Eigen::Matrix e; e = Eigen::Matrix(n_region_full); @@ -7158,14 +7166,15 @@ class expr_prop_fail3_model final : public model_base_crtp>(n_region_full), - "assigning variable e"); + in__.template read>( + n_region_full), "assigning variable e"); Eigen::Matrix beta; beta = Eigen::Matrix(5); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 6; - assign(beta, in__.read>(5), + assign(beta, + in__.template read>(5), "assigning variable beta"); local_scalar_t__ sigma_a; sigma_a = DUMMY_VAR__; @@ -7329,28 +7338,32 @@ class expr_prop_fail3_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 1; - assign(a, in__.read>(n_age), + assign(a, + in__.template read>(n_age), "assigning variable a"); Eigen::Matrix b; b = Eigen::Matrix(n_edu); stan::math::fill(b, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(b, in__.read>(n_edu), + assign(b, + in__.template read>(n_edu), "assigning variable b"); Eigen::Matrix c; c = Eigen::Matrix(n_age_edu); stan::math::fill(c, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(c, in__.read>(n_age_edu), + assign(c, + in__.template read>(n_age_edu), "assigning variable c"); Eigen::Matrix d; d = Eigen::Matrix(n_state); stan::math::fill(d, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(d, in__.read>(n_state), + assign(d, + in__.template read>(n_state), "assigning variable d"); Eigen::Matrix e; e = Eigen::Matrix(n_region_full); @@ -7358,14 +7371,15 @@ class expr_prop_fail3_model final : public model_base_crtp>(n_region_full), - "assigning variable e"); + in__.template read>( + n_region_full), "assigning variable e"); Eigen::Matrix beta; beta = Eigen::Matrix(5); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(beta, in__.read>(5), + assign(beta, + in__.template read>(5), "assigning variable beta"); double sigma_a; sigma_a = std::numeric_limits::quiet_NaN(); @@ -8415,8 +8429,8 @@ class expr_prop_fail4_model final : public model_base_crtp>(lcm_sym39__), - "assigning variable phi_std_raw"); + in__.template read>( + lcm_sym39__), "assigning variable phi_std_raw"); local_scalar_t__ sigma_phi; sigma_phi = DUMMY_VAR__; @@ -8515,8 +8529,8 @@ class expr_prop_fail4_model final : public model_base_crtp>(lcm_sym20__), - "assigning variable phi_std_raw"); + in__.template read>( + lcm_sym20__), "assigning variable phi_std_raw"); double sigma_phi; sigma_phi = std::numeric_limits::quiet_NaN(); @@ -9845,7 +9859,7 @@ class expr_prop_fail5_model final : public model_base_crtp>(nind), + in__.template read>(nind), "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -10396,7 +10410,7 @@ class expr_prop_fail5_model final : public model_base_crtp>(nind), + in__.template read>(nind), "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -12664,7 +12678,8 @@ class expr_prop_fail6_model final : public model_base_crtp>(M), + assign(epsilon, + in__.template read>(M), "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -13644,7 +13659,8 @@ class expr_prop_fail6_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 5; - assign(epsilon, in__.read>(M), + assign(epsilon, + in__.template read>(M), "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -16524,12 +16540,12 @@ class expr_prop_fail8_model final : public model_base_crtp(); + beta0 = in__.template read(); local_scalar_t__ beta1; beta1 = DUMMY_VAR__; current_statement__ = 2; - beta1 = in__.read(); + beta1 = in__.template read(); local_scalar_t__ tau_theta; tau_theta = DUMMY_VAR__; @@ -16547,7 +16563,8 @@ class expr_prop_fail8_model final : public model_base_crtp>(N), + assign(theta_std, + in__.template read>(N), "assigning variable theta_std"); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix(N); @@ -16555,7 +16572,7 @@ class expr_prop_fail8_model final : public model_base_crtp>(N), + in__.template read>(N), "assigning variable phi_std_raw"); local_scalar_t__ sigma_phi; sigma_phi = DUMMY_VAR__; @@ -16625,12 +16642,12 @@ class expr_prop_fail8_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - beta0 = in__.read(); + beta0 = in__.template read(); double beta1; beta1 = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - beta1 = in__.read(); + beta1 = in__.template read(); double tau_theta; tau_theta = std::numeric_limits::quiet_NaN(); @@ -16648,7 +16665,8 @@ class expr_prop_fail8_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 5; - assign(theta_std, in__.read>(N), + assign(theta_std, + in__.template read>(N), "assigning variable theta_std"); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix(N); @@ -16656,7 +16674,7 @@ class expr_prop_fail8_model final : public model_base_crtp>(N), + in__.template read>(N), "assigning variable phi_std_raw"); double sigma_phi; sigma_phi = std::numeric_limits::quiet_NaN(); @@ -20844,8 +20862,8 @@ class inlining_fail2_model final : public model_base_crtp lcm_sym297__ = (n_occasions - 1); assign(epsilon, - in__.read>(lcm_sym297__), - "assigning variable epsilon"); + in__.template read>( + lcm_sym297__), "assigning variable epsilon"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -21774,8 +21792,8 @@ class inlining_fail2_model final : public model_base_crtp lcm_sym198__ = (n_occasions - 1); assign(epsilon, - in__.read>(lcm_sym198__), - "assigning variable epsilon"); + in__.template read>( + lcm_sym198__), "assigning variable epsilon"); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -23412,7 +23430,7 @@ class lcm_experiment2_model final : public model_base_crtp(); + x = in__.template read(); { local_scalar_t__ y; y = DUMMY_VAR__; @@ -23467,7 +23485,7 @@ class lcm_experiment2_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - x = in__.read(); + x = in__.template read(); vars__.emplace_back(x); if (logical_negation((primitive_value(emit_transformed_parameters__) || primitive_value(emit_generated_quantities__)))) { @@ -23779,7 +23797,7 @@ class lcm_fails_model final : public model_base_crtp { theta = std::vector(J, DUMMY_VAR__); current_statement__ = 1; - assign(theta, in__.read>(J), + assign(theta, in__.template read>(J), "assigning variable theta"); { current_statement__ = 2; @@ -23826,7 +23844,7 @@ class lcm_fails_model final : public model_base_crtp { theta = std::vector(J, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(theta, in__.read>(J), + assign(theta, in__.template read>(J), "assigning variable theta"); if (logical_gte(J, 1)) { vars__.emplace_back(rvalue(theta, "theta", index_uni(1))); @@ -26284,7 +26302,7 @@ class lupdf_inlining_model final : public model_base_crtp mu = DUMMY_VAR__; current_statement__ = 1; - mu = in__.read(); + mu = in__.template read(); local_scalar_t__ tp; tp = DUMMY_VAR__; @@ -26367,7 +26385,7 @@ class lupdf_inlining_model final : public model_base_crtp mu = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - mu = in__.read(); + mu = in__.template read(); double tp; tp = std::numeric_limits::quiet_NaN(); @@ -27048,22 +27066,22 @@ class off_dce_model final : public model_base_crtp { alpha_occ = DUMMY_VAR__; current_statement__ = 1; - alpha_occ = in__.read(); + alpha_occ = in__.template read(); local_scalar_t__ beta_occ; beta_occ = DUMMY_VAR__; current_statement__ = 2; - beta_occ = in__.read(); + beta_occ = in__.template read(); local_scalar_t__ alpha_p; alpha_p = DUMMY_VAR__; current_statement__ = 3; - alpha_p = in__.read(); + alpha_p = in__.template read(); local_scalar_t__ beta_p; beta_p = DUMMY_VAR__; current_statement__ = 4; - beta_p = in__.read(); + beta_p = in__.template read(); Eigen::Matrix logit_psi; logit_psi = Eigen::Matrix(R); stan::math::fill(logit_psi, DUMMY_VAR__); @@ -27190,22 +27208,22 @@ class off_dce_model final : public model_base_crtp { alpha_occ = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - alpha_occ = in__.read(); + alpha_occ = in__.template read(); double beta_occ; beta_occ = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - beta_occ = in__.read(); + beta_occ = in__.template read(); double alpha_p; alpha_p = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - alpha_p = in__.read(); + alpha_p = in__.template read(); double beta_p; beta_p = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - beta_p = in__.read(); + beta_p = in__.template read(); Eigen::Matrix logit_psi; logit_psi = Eigen::Matrix(R); stan::math::fill(logit_psi, std::numeric_limits::quiet_NaN()); @@ -27954,31 +27972,33 @@ class off_small_model final : public model_base_crtp { beta = DUMMY_VAR__; current_statement__ = 1; - beta = in__.read(); + beta = in__.template read(); Eigen::Matrix eta1; eta1 = Eigen::Matrix(J); stan::math::fill(eta1, DUMMY_VAR__); current_statement__ = 2; - assign(eta1, in__.read>(J), + assign(eta1, + in__.template read>(J), "assigning variable eta1"); Eigen::Matrix eta2; eta2 = Eigen::Matrix(J); stan::math::fill(eta2, DUMMY_VAR__); current_statement__ = 3; - assign(eta2, in__.read>(J), + assign(eta2, + in__.template read>(J), "assigning variable eta2"); local_scalar_t__ mu_a1; mu_a1 = DUMMY_VAR__; current_statement__ = 4; - mu_a1 = in__.read(); + mu_a1 = in__.template read(); local_scalar_t__ mu_a2; mu_a2 = DUMMY_VAR__; current_statement__ = 5; - mu_a2 = in__.read(); + mu_a2 = in__.template read(); local_scalar_t__ sigma_a1; sigma_a1 = DUMMY_VAR__; @@ -28109,31 +28129,33 @@ class off_small_model final : public model_base_crtp { beta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - beta = in__.read(); + beta = in__.template read(); Eigen::Matrix eta1; eta1 = Eigen::Matrix(J); stan::math::fill(eta1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(eta1, in__.read>(J), + assign(eta1, + in__.template read>(J), "assigning variable eta1"); Eigen::Matrix eta2; eta2 = Eigen::Matrix(J); stan::math::fill(eta2, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(eta2, in__.read>(J), + assign(eta2, + in__.template read>(J), "assigning variable eta2"); double mu_a1; mu_a1 = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - mu_a1 = in__.read(); + mu_a1 = in__.template read(); double mu_a2; mu_a2 = std::numeric_limits::quiet_NaN(); current_statement__ = 5; - mu_a2 = in__.read(); + mu_a2 = in__.template read(); double sigma_a1; sigma_a1 = std::numeric_limits::quiet_NaN(); @@ -28925,26 +28947,27 @@ class optimizations_model final : public model_base_crtp { theta = DUMMY_VAR__; current_statement__ = 1; - theta = in__.read(); + theta = in__.template read(); local_scalar_t__ phi; phi = DUMMY_VAR__; current_statement__ = 2; - phi = in__.read(); + phi = in__.template read(); Eigen::Matrix x_matrix; x_matrix = Eigen::Matrix(3, 2); stan::math::fill(x_matrix, DUMMY_VAR__); current_statement__ = 3; assign(x_matrix, - in__.read>(3, 2), + in__.template read>(3, 2), "assigning variable x_matrix"); Eigen::Matrix x_vector; x_vector = Eigen::Matrix(2); stan::math::fill(x_vector, DUMMY_VAR__); current_statement__ = 4; - assign(x_vector, in__.read>(2), + assign(x_vector, + in__.template read>(2), "assigning variable x_vector"); Eigen::Matrix x_cov; x_cov = Eigen::Matrix(2, 2); @@ -29496,26 +29519,27 @@ class optimizations_model final : public model_base_crtp { theta = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - theta = in__.read(); + theta = in__.template read(); double phi; phi = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - phi = in__.read(); + phi = in__.template read(); Eigen::Matrix x_matrix; x_matrix = Eigen::Matrix(3, 2); stan::math::fill(x_matrix, std::numeric_limits::quiet_NaN()); current_statement__ = 3; assign(x_matrix, - in__.read>(3, 2), + in__.template read>(3, 2), "assigning variable x_matrix"); Eigen::Matrix x_vector; x_vector = Eigen::Matrix(2); stan::math::fill(x_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(x_vector, in__.read>(2), + assign(x_vector, + in__.template read>(2), "assigning variable x_vector"); Eigen::Matrix x_cov; x_cov = Eigen::Matrix(2, 2); @@ -30353,20 +30377,22 @@ class partial_eval_model final : public model_base_crtp { stan::math::fill(a, DUMMY_VAR__); current_statement__ = 1; - assign(a, in__.read>(n_pair), + assign(a, + in__.template read>(n_pair), "assigning variable a"); Eigen::Matrix beta; beta = Eigen::Matrix(2); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - assign(beta, in__.read>(2), + assign(beta, + in__.template read>(2), "assigning variable beta"); local_scalar_t__ mu_a; mu_a = DUMMY_VAR__; current_statement__ = 3; - mu_a = in__.read(); + mu_a = in__.template read(); local_scalar_t__ sigma_a; sigma_a = DUMMY_VAR__; @@ -30462,20 +30488,22 @@ class partial_eval_model final : public model_base_crtp { stan::math::fill(a, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(a, in__.read>(n_pair), + assign(a, + in__.template read>(n_pair), "assigning variable a"); Eigen::Matrix beta; beta = Eigen::Matrix(2); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(beta, in__.read>(2), + assign(beta, + in__.template read>(2), "assigning variable beta"); double mu_a; mu_a = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - mu_a = in__.read(); + mu_a = in__.template read(); double sigma_a; sigma_a = std::numeric_limits::quiet_NaN(); @@ -31154,22 +31182,22 @@ class stalled1_failure_model final : public model_base_crtp(); + alpha0 = in__.template read(); local_scalar_t__ alpha1; alpha1 = DUMMY_VAR__; current_statement__ = 2; - alpha1 = in__.read(); + alpha1 = in__.template read(); local_scalar_t__ alpha2; alpha2 = DUMMY_VAR__; current_statement__ = 3; - alpha2 = in__.read(); + alpha2 = in__.template read(); local_scalar_t__ alpha12; alpha12 = DUMMY_VAR__; current_statement__ = 4; - alpha12 = in__.read(); + alpha12 = in__.template read(); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -31182,8 +31210,8 @@ class stalled1_failure_model final : public model_base_crtp>>(I, 8), - "assigning variable b"); + in__.template read>>( + I, 8), "assigning variable b"); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -31277,22 +31305,22 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN(); current_statement__ = 1; - alpha0 = in__.read(); + alpha0 = in__.template read(); double alpha1; alpha1 = std::numeric_limits::quiet_NaN(); current_statement__ = 2; - alpha1 = in__.read(); + alpha1 = in__.template read(); double alpha2; alpha2 = std::numeric_limits::quiet_NaN(); current_statement__ = 3; - alpha2 = in__.read(); + alpha2 = in__.template read(); double alpha12; alpha12 = std::numeric_limits::quiet_NaN(); current_statement__ = 4; - alpha12 = in__.read(); + alpha12 = in__.template read(); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -31305,8 +31333,8 @@ class stalled1_failure_model final : public model_base_crtp>>(I, 8), - "assigning variable b"); + in__.template read>>( + I, 8), "assigning variable b"); double sigma; sigma = std::numeric_limits::quiet_NaN(); From 9d815202f583c252692d6a94b350d8a642e5dd5c Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Thu, 18 Mar 2021 23:31:46 -0400 Subject: [PATCH 14/31] fix typo for cholesky_factor_cov --- src/stan_math_backend/Transform_Mir.ml | 2 +- test/integration/good/code-gen/cpp.expected | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index 7dd8de8345..d22c551d49 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -170,7 +170,7 @@ let check_constraint_to_string t (c : constrainaction) = | Simplex -> "simplex" | UnitVector -> "unit_vector" | CholeskyCorr -> "cholesky_factor_corr" - | CholeskyCov -> "cholesky_factor" + | CholeskyCov -> "cholesky_factor_cov" | Correlation -> "corr_matrix" | Covariance -> "cov_matrix" | Lower _ -> ( diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 4b4db1ca09..fabfb194bc 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -6865,7 +6865,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 19; assign(p_cfcov_54, - in__.template read_constrain_cholesky_factor, jacobian__>( + in__.template read_constrain_cholesky_factor_cov, jacobian__>( lp__, 5, 4), "assigning variable p_cfcov_54"); Eigen::Matrix p_cfcov_33; p_cfcov_33 = Eigen::Matrix(3, 3); @@ -6873,7 +6873,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 20; assign(p_cfcov_33, - in__.template read_constrain_cholesky_factor, jacobian__>( + in__.template read_constrain_cholesky_factor_cov, jacobian__>( lp__, 3, 3), "assigning variable p_cfcov_33"); std::vector> p_cfcov_33_ar; p_cfcov_33_ar = std::vector>(K, Eigen::Matrix(3, 3)); @@ -6881,7 +6881,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 21; assign(p_cfcov_33_ar, - in__.template read_constrain_cholesky_factor>, jacobian__>( + in__.template read_constrain_cholesky_factor_cov>, jacobian__>( lp__, K, 3, 3), "assigning variable p_cfcov_33_ar"); Eigen::Matrix x_p; x_p = Eigen::Matrix(2); @@ -7413,7 +7413,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 19; assign(p_cfcov_54, - in__.template read_constrain_cholesky_factor, jacobian__>( + in__.template read_constrain_cholesky_factor_cov, jacobian__>( lp__, 5, 4), "assigning variable p_cfcov_54"); Eigen::Matrix p_cfcov_33; p_cfcov_33 = Eigen::Matrix(3, 3); @@ -7421,7 +7421,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 20; assign(p_cfcov_33, - in__.template read_constrain_cholesky_factor, jacobian__>( + in__.template read_constrain_cholesky_factor_cov, jacobian__>( lp__, 3, 3), "assigning variable p_cfcov_33"); std::vector> p_cfcov_33_ar; p_cfcov_33_ar = std::vector>(K, Eigen::Matrix(3, 3)); @@ -7429,7 +7429,7 @@ class mother_model final : public model_base_crtp { current_statement__ = 21; assign(p_cfcov_33_ar, - in__.template read_constrain_cholesky_factor>, jacobian__>( + in__.template read_constrain_cholesky_factor_cov>, jacobian__>( lp__, K, 3, 3), "assigning variable p_cfcov_33_ar"); Eigen::Matrix x_p; x_p = Eigen::Matrix(2); From d4895b14964c38200b37e4ec858f55c8eb686557 Mon Sep 17 00:00:00 2001 From: Rok Cesnovar Date: Fri, 19 Mar 2021 21:47:30 +0100 Subject: [PATCH 15/31] remove the need for assigns --- src/stan_math_backend/Statement_gen.ml | 4 + test/integration/good/code-gen/cl.expected | 85 +- test/integration/good/code-gen/cpp.expected | 1361 ++++++----------- .../good/code-gen/expressions/cpp.expected | 2 +- .../good/code-gen/opencl/cpp.expected | 124 +- .../good/code-gen/profiling/cpp.expected | 4 +- .../good/compiler-optimizations/cpp.expected | 548 +++---- 7 files changed, 781 insertions(+), 1347 deletions(-) diff --git a/src/stan_math_backend/Statement_gen.ml b/src/stan_math_backend/Statement_gen.ml index 363ede0134..6110706f8f 100644 --- a/src/stan_math_backend/Statement_gen.ml +++ b/src/stan_math_backend/Statement_gen.ml @@ -108,6 +108,10 @@ let rec pp_statement (ppf : Format.formatter) | Block _ | SList _ | Decl _ | Skip | Break | Continue -> () | _ -> Locations.pp_smeta ppf meta ) ; match pattern with + | Assignment + ((vident, _, []), ({pattern = FunApp (CompilerInternal, f, _); _} as rhs)) when + f = (Internal_fun.to_string FnReadData) || f = (Internal_fun.to_string FnReadParam) -> + pf ppf "@[%s = %a;@]" vident pp_expr rhs | Assignment ((vident, _, []), ({meta= Expr.Typed.Meta.({type_= UInt; _}); _} as rhs)) |Assignment ((vident, _, []), ({meta= {type_= UReal; _}; _} as rhs)) -> diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index 30989a7fdc..7f8b62af65 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -328,8 +328,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector X_d_flat__; current_statement__ = 180; - assign(X_d_flat__, context__.vals_r("X_d"), - "assigning variable X_d_flat__"); + X_d_flat__ = context__.vals_r("X_d"); current_statement__ = 180; pos__ = 1; current_statement__ = 180; @@ -355,8 +354,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector X_d_a_flat__; current_statement__ = 183; - assign(X_d_a_flat__, context__.vals_r("X_d_a"), - "assigning variable X_d_a_flat__"); + X_d_a_flat__ = context__.vals_r("X_d_a"); current_statement__ = 183; pos__ = 1; current_statement__ = 183; @@ -384,8 +382,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector y_v_d_flat__; current_statement__ = 185; - assign(y_v_d_flat__, context__.vals_r("y_v_d"), - "assigning variable y_v_d_flat__"); + y_v_d_flat__ = context__.vals_r("y_v_d"); current_statement__ = 185; pos__ = 1; current_statement__ = 185; @@ -407,8 +404,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector X_rv_d_flat__; current_statement__ = 187; - assign(X_rv_d_flat__, context__.vals_r("X_rv_d"), - "assigning variable X_rv_d_flat__"); + X_rv_d_flat__ = context__.vals_r("X_rv_d"); current_statement__ = 187; pos__ = 1; current_statement__ = 187; @@ -427,7 +423,7 @@ class optimize_glm_model final : public model_base_crtp { y_vi_d = std::vector(n, std::numeric_limits::min()); current_statement__ = 189; - assign(y_vi_d, context__.vals_i("y_vi_d"), "assigning variable y_vi_d"); + y_vi_d = context__.vals_i("y_vi_d"); current_statement__ = 190; validate_non_negative_index("y2_vi_d", "n", n); current_statement__ = 191; @@ -436,8 +432,7 @@ class optimize_glm_model final : public model_base_crtp { y2_vi_d = std::vector(n, std::numeric_limits::min()); current_statement__ = 191; - assign(y2_vi_d, context__.vals_i("y2_vi_d"), - "assigning variable y2_vi_d"); + y2_vi_d = context__.vals_i("y2_vi_d"); current_statement__ = 192; context__.validate_dims("data initialization","y_s_d","int", context__.to_vec()); @@ -575,25 +570,19 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, DUMMY_VAR__); current_statement__ = 1; - assign(alpha_v, - in__.template read>(k), - "assigning variable alpha_v"); + alpha_v = in__.template read>(k); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - assign(beta, - in__.template read>(k), - "assigning variable beta"); + beta = in__.template read>(k); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, DUMMY_VAR__); current_statement__ = 3; - assign(cuts, - in__.template read>(k), - "assigning variable cuts"); + cuts = in__.template read>(k); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -615,25 +604,20 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(X_p, DUMMY_VAR__); current_statement__ = 7; - assign(X_p, - in__.template read>(n, k), - "assigning variable X_p"); + X_p = in__.template read>(n, k); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, DUMMY_VAR__); current_statement__ = 8; - assign(beta_m, - in__.template read>(n, k), - "assigning variable beta_m"); + beta_m = in__.template read>(n, + k); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, DUMMY_VAR__); current_statement__ = 9; - assign(X_rv_p, - in__.template read>(n), - "assigning variable X_rv_p"); + X_rv_p = in__.template read>(n); { current_statement__ = 10; lp_accum__.add( @@ -1304,25 +1288,19 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(alpha_v, - in__.template read>(k), - "assigning variable alpha_v"); + alpha_v = in__.template read>(k); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(beta, - in__.template read>(k), - "assigning variable beta"); + beta = in__.template read>(k); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(cuts, - in__.template read>(k), - "assigning variable cuts"); + cuts = in__.template read>(k); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -1344,25 +1322,20 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(X_p, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - assign(X_p, - in__.template read>(n, k), - "assigning variable X_p"); + X_p = in__.template read>(n, k); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - assign(beta_m, - in__.template read>(n, k), - "assigning variable beta_m"); + beta_m = in__.template read>(n, + k); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, std::numeric_limits::quiet_NaN()); current_statement__ = 9; - assign(X_rv_p, - in__.template read>(n), - "assigning variable X_rv_p"); + X_rv_p = in__.template read>(n); for (int sym1__ = 1; sym1__ <= k; ++sym1__) { vars__.emplace_back(alpha_v[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= k; ++sym1__) { @@ -1420,8 +1393,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector alpha_v_flat__; current_statement__ = 1; - assign(alpha_v_flat__, context__.vals_r("alpha_v"), - "assigning variable alpha_v_flat__"); + alpha_v_flat__ = context__.vals_r("alpha_v"); current_statement__ = 1; pos__ = 1; current_statement__ = 1; @@ -1439,8 +1411,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector beta_flat__; current_statement__ = 2; - assign(beta_flat__, context__.vals_r("beta"), - "assigning variable beta_flat__"); + beta_flat__ = context__.vals_r("beta"); current_statement__ = 2; pos__ = 1; current_statement__ = 2; @@ -1458,8 +1429,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector cuts_flat__; current_statement__ = 3; - assign(cuts_flat__, context__.vals_r("cuts"), - "assigning variable cuts_flat__"); + cuts_flat__ = context__.vals_r("cuts"); current_statement__ = 3; pos__ = 1; current_statement__ = 3; @@ -1497,8 +1467,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector X_p_flat__; current_statement__ = 7; - assign(X_p_flat__, context__.vals_r("X_p"), - "assigning variable X_p_flat__"); + X_p_flat__ = context__.vals_r("X_p"); current_statement__ = 7; pos__ = 1; current_statement__ = 7; @@ -1518,8 +1487,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector beta_m_flat__; current_statement__ = 8; - assign(beta_m_flat__, context__.vals_r("beta_m"), - "assigning variable beta_m_flat__"); + beta_m_flat__ = context__.vals_r("beta_m"); current_statement__ = 8; pos__ = 1; current_statement__ = 8; @@ -1540,8 +1508,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector X_rv_p_flat__; current_statement__ = 9; - assign(X_rv_p_flat__, context__.vals_r("X_rv_p"), - "assigning variable X_rv_p_flat__"); + X_rv_p_flat__ = context__.vals_r("X_rv_p"); current_statement__ = 9; pos__ = 1; current_statement__ = 9; diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index fabfb194bc..9a2f09d200 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -90,7 +90,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> y = std::vector(J, std::numeric_limits::quiet_NaN()); current_statement__ = 11; - assign(y, context__.vals_r("y"), "assigning variable y"); + y = context__.vals_r("y"); current_statement__ = 12; validate_non_negative_index("sigma", "J", J); current_statement__ = 13; @@ -99,7 +99,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> sigma = std::vector(J, std::numeric_limits::quiet_NaN()); current_statement__ = 13; - assign(sigma, context__.vals_r("sigma"), "assigning variable sigma"); + sigma = context__.vals_r("sigma"); current_statement__ = 13; for (int sym1__ = 1; sym1__ <= J; ++sym1__) { current_statement__ = 13; @@ -162,9 +162,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> stan::math::fill(theta_tilde, DUMMY_VAR__); current_statement__ = 3; - assign(theta_tilde, - in__.template read>(J), - "assigning variable theta_tilde"); + theta_tilde = in__.template read>( + J); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, DUMMY_VAR__); @@ -230,9 +229,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> stan::math::fill(theta_tilde, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(theta_tilde, - in__.template read>(J), - "assigning variable theta_tilde"); + theta_tilde = in__.template read>( + J); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, std::numeric_limits::quiet_NaN()); @@ -300,8 +298,7 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> { std::vector theta_tilde_flat__; current_statement__ = 3; - assign(theta_tilde_flat__, context__.vals_r("theta_tilde"), - "assigning variable theta_tilde_flat__"); + theta_tilde_flat__ = context__.vals_r("theta_tilde"); current_statement__ = 3; pos__ = 1; current_statement__ = 3; @@ -913,7 +910,7 @@ class eight_schools_ncp_model final : public model_base_crtp(J, std::numeric_limits::quiet_NaN()); current_statement__ = 11; - assign(y, context__.vals_r("y"), "assigning variable y"); + y = context__.vals_r("y"); current_statement__ = 12; validate_non_negative_index("sigma", "J", J); current_statement__ = 13; @@ -922,7 +919,7 @@ class eight_schools_ncp_model final : public model_base_crtp(J, std::numeric_limits::quiet_NaN()); current_statement__ = 13; - assign(sigma, context__.vals_r("sigma"), "assigning variable sigma"); + sigma = context__.vals_r("sigma"); current_statement__ = 13; for (int sym1__ = 1; sym1__ <= J; ++sym1__) { current_statement__ = 13; @@ -985,9 +982,8 @@ class eight_schools_ncp_model final : public model_base_crtp>(J), - "assigning variable theta_tilde"); + theta_tilde = in__.template read>( + J); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, DUMMY_VAR__); @@ -1053,9 +1049,8 @@ class eight_schools_ncp_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 3; - assign(theta_tilde, - in__.template read>(J), - "assigning variable theta_tilde"); + theta_tilde = in__.template read>( + J); Eigen::Matrix theta; theta = Eigen::Matrix(J); stan::math::fill(theta, std::numeric_limits::quiet_NaN()); @@ -1123,8 +1118,7 @@ class eight_schools_ncp_model final : public model_base_crtp theta_tilde_flat__; current_statement__ = 3; - assign(theta_tilde_flat__, context__.vals_r("theta_tilde"), - "assigning variable theta_tilde_flat__"); + theta_tilde_flat__ = context__.vals_r("theta_tilde"); current_statement__ = 3; pos__ = 1; current_statement__ = 3; @@ -1418,8 +1412,7 @@ class mixed_type_arrays_model final : public model_base_crtp(3, DUMMY_VAR__); current_statement__ = 1; - assign(xx, in__.template read>(3), - "assigning variable xx"); + xx = in__.template read>(3); std::vector> y; y = std::vector>(3, std::vector(3, DUMMY_VAR__)); @@ -1485,8 +1478,7 @@ class mixed_type_arrays_model final : public model_base_crtp(3, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(xx, in__.template read>(3), - "assigning variable xx"); + xx = in__.template read>(3); std::vector> y; y = std::vector>(3, std::vector(3, std::numeric_limits::quiet_NaN())); @@ -1563,7 +1555,7 @@ class mixed_type_arrays_model final : public model_base_crtp(3, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(xx, context__.vals_r("xx"), "assigning variable xx"); + xx = context__.vals_r("xx"); for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { vars__.emplace_back(xx[(sym1__ - 1)]);} } catch (const std::exception& e) { @@ -4700,8 +4692,7 @@ class mother_model final : public model_base_crtp { d_int_1d_ar = std::vector(N, std::numeric_limits::min()); current_statement__ = 190; - assign(d_int_1d_ar, context__.vals_i("d_int_1d_ar"), - "assigning variable d_int_1d_ar"); + d_int_1d_ar = context__.vals_i("d_int_1d_ar"); current_statement__ = 190; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { current_statement__ = 190; @@ -4722,8 +4713,7 @@ class mother_model final : public model_base_crtp { { std::vector d_int_3d_ar_flat__; current_statement__ = 194; - assign(d_int_3d_ar_flat__, context__.vals_i("d_int_3d_ar"), - "assigning variable d_int_3d_ar_flat__"); + d_int_3d_ar_flat__ = context__.vals_i("d_int_3d_ar"); current_statement__ = 194; pos__ = 1; current_statement__ = 194; @@ -4773,8 +4763,7 @@ class mother_model final : public model_base_crtp { d_real_1d_ar = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 197; - assign(d_real_1d_ar, context__.vals_r("d_real_1d_ar"), - "assigning variable d_real_1d_ar"); + d_real_1d_ar = context__.vals_r("d_real_1d_ar"); current_statement__ = 198; validate_non_negative_index("d_real_3d_ar", "N", N); current_statement__ = 199; @@ -4789,8 +4778,7 @@ class mother_model final : public model_base_crtp { { std::vector d_real_3d_ar_flat__; current_statement__ = 201; - assign(d_real_3d_ar_flat__, context__.vals_r("d_real_3d_ar"), - "assigning variable d_real_3d_ar_flat__"); + d_real_3d_ar_flat__ = context__.vals_r("d_real_3d_ar"); current_statement__ = 201; pos__ = 1; current_statement__ = 201; @@ -4818,8 +4806,7 @@ class mother_model final : public model_base_crtp { { std::vector d_vec_flat__; current_statement__ = 203; - assign(d_vec_flat__, context__.vals_r("d_vec"), - "assigning variable d_vec_flat__"); + d_vec_flat__ = context__.vals_r("d_vec"); current_statement__ = 203; pos__ = 1; current_statement__ = 203; @@ -4843,8 +4830,7 @@ class mother_model final : public model_base_crtp { { std::vector d_1d_vec_flat__; current_statement__ = 206; - assign(d_1d_vec_flat__, context__.vals_r("d_1d_vec"), - "assigning variable d_1d_vec_flat__"); + d_1d_vec_flat__ = context__.vals_r("d_1d_vec"); current_statement__ = 206; pos__ = 1; current_statement__ = 206; @@ -4875,8 +4861,7 @@ class mother_model final : public model_base_crtp { { std::vector d_3d_vec_flat__; current_statement__ = 211; - assign(d_3d_vec_flat__, context__.vals_r("d_3d_vec"), - "assigning variable d_3d_vec_flat__"); + d_3d_vec_flat__ = context__.vals_r("d_3d_vec"); current_statement__ = 211; pos__ = 1; current_statement__ = 211; @@ -4907,8 +4892,7 @@ class mother_model final : public model_base_crtp { { std::vector d_row_vec_flat__; current_statement__ = 213; - assign(d_row_vec_flat__, context__.vals_r("d_row_vec"), - "assigning variable d_row_vec_flat__"); + d_row_vec_flat__ = context__.vals_r("d_row_vec"); current_statement__ = 213; pos__ = 1; current_statement__ = 213; @@ -4932,8 +4916,7 @@ class mother_model final : public model_base_crtp { { std::vector d_1d_row_vec_flat__; current_statement__ = 216; - assign(d_1d_row_vec_flat__, context__.vals_r("d_1d_row_vec"), - "assigning variable d_1d_row_vec_flat__"); + d_1d_row_vec_flat__ = context__.vals_r("d_1d_row_vec"); current_statement__ = 216; pos__ = 1; current_statement__ = 216; @@ -4964,8 +4947,7 @@ class mother_model final : public model_base_crtp { { std::vector d_3d_row_vec_flat__; current_statement__ = 221; - assign(d_3d_row_vec_flat__, context__.vals_r("d_3d_row_vec"), - "assigning variable d_3d_row_vec_flat__"); + d_3d_row_vec_flat__ = context__.vals_r("d_3d_row_vec"); current_statement__ = 221; pos__ = 1; current_statement__ = 221; @@ -4994,8 +4976,7 @@ class mother_model final : public model_base_crtp { { std::vector d_ar_mat_flat__; current_statement__ = 222; - assign(d_ar_mat_flat__, context__.vals_r("d_ar_mat"), - "assigning variable d_ar_mat_flat__"); + d_ar_mat_flat__ = context__.vals_r("d_ar_mat"); current_statement__ = 222; pos__ = 1; current_statement__ = 222; @@ -5058,8 +5039,7 @@ class mother_model final : public model_base_crtp { { std::vector d_simplex_flat__; current_statement__ = 224; - assign(d_simplex_flat__, context__.vals_r("d_simplex"), - "assigning variable d_simplex_flat__"); + d_simplex_flat__ = context__.vals_r("d_simplex"); current_statement__ = 224; pos__ = 1; current_statement__ = 224; @@ -5086,8 +5066,7 @@ class mother_model final : public model_base_crtp { { std::vector d_1d_simplex_flat__; current_statement__ = 227; - assign(d_1d_simplex_flat__, context__.vals_r("d_1d_simplex"), - "assigning variable d_1d_simplex_flat__"); + d_1d_simplex_flat__ = context__.vals_r("d_1d_simplex"); current_statement__ = 227; pos__ = 1; current_statement__ = 227; @@ -5124,8 +5103,7 @@ class mother_model final : public model_base_crtp { { std::vector d_3d_simplex_flat__; current_statement__ = 232; - assign(d_3d_simplex_flat__, context__.vals_r("d_3d_simplex"), - "assigning variable d_3d_simplex_flat__"); + d_3d_simplex_flat__ = context__.vals_r("d_3d_simplex"); current_statement__ = 232; pos__ = 1; current_statement__ = 232; @@ -5165,8 +5143,7 @@ class mother_model final : public model_base_crtp { { std::vector d_cfcov_54_flat__; current_statement__ = 233; - assign(d_cfcov_54_flat__, context__.vals_r("d_cfcov_54"), - "assigning variable d_cfcov_54_flat__"); + d_cfcov_54_flat__ = context__.vals_r("d_cfcov_54"); current_statement__ = 233; pos__ = 1; current_statement__ = 233; @@ -5192,8 +5169,7 @@ class mother_model final : public model_base_crtp { { std::vector d_cfcov_33_flat__; current_statement__ = 234; - assign(d_cfcov_33_flat__, context__.vals_r("d_cfcov_33"), - "assigning variable d_cfcov_33_flat__"); + d_cfcov_33_flat__ = context__.vals_r("d_cfcov_33"); current_statement__ = 234; pos__ = 1; current_statement__ = 234; @@ -5221,8 +5197,7 @@ class mother_model final : public model_base_crtp { { std::vector d_cfcov_33_ar_flat__; current_statement__ = 236; - assign(d_cfcov_33_ar_flat__, context__.vals_r("d_cfcov_33_ar"), - "assigning variable d_cfcov_33_ar_flat__"); + d_cfcov_33_ar_flat__ = context__.vals_r("d_cfcov_33_ar"); current_statement__ = 236; pos__ = 1; current_statement__ = 236; @@ -5260,8 +5235,7 @@ class mother_model final : public model_base_crtp { d_int_array = std::vector(d_int, std::numeric_limits::min()); current_statement__ = 239; - assign(d_int_array, context__.vals_i("d_int_array"), - "assigning variable d_int_array"); + d_int_array = context__.vals_i("d_int_array"); current_statement__ = 240; validate_non_negative_index("d_int_array_2d", "d_int", d_int); current_statement__ = 241; @@ -5272,8 +5246,7 @@ class mother_model final : public model_base_crtp { { std::vector d_int_array_2d_flat__; current_statement__ = 241; - assign(d_int_array_2d_flat__, context__.vals_i("d_int_array_2d"), - "assigning variable d_int_array_2d_flat__"); + d_int_array_2d_flat__ = context__.vals_i("d_int_array_2d"); current_statement__ = 241; pos__ = 1; current_statement__ = 241; @@ -5297,8 +5270,7 @@ class mother_model final : public model_base_crtp { { std::vector d_int_array_3d_flat__; current_statement__ = 243; - assign(d_int_array_3d_flat__, context__.vals_i("d_int_array_3d"), - "assigning variable d_int_array_3d_flat__"); + d_int_array_3d_flat__ = context__.vals_i("d_int_array_3d"); current_statement__ = 243; pos__ = 1; current_statement__ = 243; @@ -5330,8 +5302,7 @@ class mother_model final : public model_base_crtp { d_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 246; - assign(d_real_array, context__.vals_r("d_real_array"), - "assigning variable d_real_array"); + d_real_array = context__.vals_r("d_real_array"); current_statement__ = 247; validate_non_negative_index("d_real_array_2d", "d_int", d_int); current_statement__ = 248; @@ -5342,8 +5313,7 @@ class mother_model final : public model_base_crtp { { std::vector d_real_array_2d_flat__; current_statement__ = 248; - assign(d_real_array_2d_flat__, context__.vals_r("d_real_array_2d"), - "assigning variable d_real_array_2d_flat__"); + d_real_array_2d_flat__ = context__.vals_r("d_real_array_2d"); current_statement__ = 248; pos__ = 1; current_statement__ = 248; @@ -5367,8 +5337,7 @@ class mother_model final : public model_base_crtp { { std::vector d_real_array_3d_flat__; current_statement__ = 250; - assign(d_real_array_3d_flat__, context__.vals_r("d_real_array_3d"), - "assigning variable d_real_array_3d_flat__"); + d_real_array_3d_flat__ = context__.vals_r("d_real_array_3d"); current_statement__ = 250; pos__ = 1; current_statement__ = 250; @@ -5398,8 +5367,7 @@ class mother_model final : public model_base_crtp { { std::vector d_matrix_flat__; current_statement__ = 253; - assign(d_matrix_flat__, context__.vals_r("d_matrix"), - "assigning variable d_matrix_flat__"); + d_matrix_flat__ = context__.vals_r("d_matrix"); current_statement__ = 253; pos__ = 1; current_statement__ = 253; @@ -5428,8 +5396,7 @@ class mother_model final : public model_base_crtp { { std::vector d_matrix_array_flat__; current_statement__ = 257; - assign(d_matrix_array_flat__, context__.vals_r("d_matrix_array"), - "assigning variable d_matrix_array_flat__"); + d_matrix_array_flat__ = context__.vals_r("d_matrix_array"); current_statement__ = 257; pos__ = 1; current_statement__ = 257; @@ -5461,9 +5428,7 @@ class mother_model final : public model_base_crtp { { std::vector d_matrix_array_2d_flat__; current_statement__ = 261; - assign(d_matrix_array_2d_flat__, - context__.vals_r("d_matrix_array_2d"), - "assigning variable d_matrix_array_2d_flat__"); + d_matrix_array_2d_flat__ = context__.vals_r("d_matrix_array_2d"); current_statement__ = 261; pos__ = 1; current_statement__ = 261; @@ -5499,9 +5464,7 @@ class mother_model final : public model_base_crtp { { std::vector d_matrix_array_3d_flat__; current_statement__ = 265; - assign(d_matrix_array_3d_flat__, - context__.vals_r("d_matrix_array_3d"), - "assigning variable d_matrix_array_3d_flat__"); + d_matrix_array_3d_flat__ = context__.vals_r("d_matrix_array_3d"); current_statement__ = 265; pos__ = 1; current_statement__ = 265; @@ -5536,8 +5499,7 @@ class mother_model final : public model_base_crtp { { std::vector d_vector_flat__; current_statement__ = 267; - assign(d_vector_flat__, context__.vals_r("d_vector"), - "assigning variable d_vector_flat__"); + d_vector_flat__ = context__.vals_r("d_vector"); current_statement__ = 267; pos__ = 1; current_statement__ = 267; @@ -5561,8 +5523,7 @@ class mother_model final : public model_base_crtp { { std::vector d_vector_array_flat__; current_statement__ = 270; - assign(d_vector_array_flat__, context__.vals_r("d_vector_array"), - "assigning variable d_vector_array_flat__"); + d_vector_array_flat__ = context__.vals_r("d_vector_array"); current_statement__ = 270; pos__ = 1; current_statement__ = 270; @@ -5589,9 +5550,7 @@ class mother_model final : public model_base_crtp { { std::vector d_vector_array_2d_flat__; current_statement__ = 273; - assign(d_vector_array_2d_flat__, - context__.vals_r("d_vector_array_2d"), - "assigning variable d_vector_array_2d_flat__"); + d_vector_array_2d_flat__ = context__.vals_r("d_vector_array_2d"); current_statement__ = 273; pos__ = 1; current_statement__ = 273; @@ -5622,9 +5581,7 @@ class mother_model final : public model_base_crtp { { std::vector d_vector_array_3d_flat__; current_statement__ = 276; - assign(d_vector_array_3d_flat__, - context__.vals_r("d_vector_array_3d"), - "assigning variable d_vector_array_3d_flat__"); + d_vector_array_3d_flat__ = context__.vals_r("d_vector_array_3d"); current_statement__ = 276; pos__ = 1; current_statement__ = 276; @@ -5656,8 +5613,7 @@ class mother_model final : public model_base_crtp { { std::vector d_row_vector_flat__; current_statement__ = 278; - assign(d_row_vector_flat__, context__.vals_r("d_row_vector"), - "assigning variable d_row_vector_flat__"); + d_row_vector_flat__ = context__.vals_r("d_row_vector"); current_statement__ = 278; pos__ = 1; current_statement__ = 278; @@ -5681,9 +5637,7 @@ class mother_model final : public model_base_crtp { { std::vector d_row_vector_array_flat__; current_statement__ = 281; - assign(d_row_vector_array_flat__, - context__.vals_r("d_row_vector_array"), - "assigning variable d_row_vector_array_flat__"); + d_row_vector_array_flat__ = context__.vals_r("d_row_vector_array"); current_statement__ = 281; pos__ = 1; current_statement__ = 281; @@ -5711,9 +5665,7 @@ class mother_model final : public model_base_crtp { { std::vector d_row_vector_array_2d_flat__; current_statement__ = 284; - assign(d_row_vector_array_2d_flat__, - context__.vals_r("d_row_vector_array_2d"), - "assigning variable d_row_vector_array_2d_flat__"); + d_row_vector_array_2d_flat__ = context__.vals_r("d_row_vector_array_2d"); current_statement__ = 284; pos__ = 1; current_statement__ = 284; @@ -5744,9 +5696,7 @@ class mother_model final : public model_base_crtp { { std::vector d_row_vector_array_3d_flat__; current_statement__ = 287; - assign(d_row_vector_array_3d_flat__, - context__.vals_r("d_row_vector_array_3d"), - "assigning variable d_row_vector_array_3d_flat__"); + d_row_vector_array_3d_flat__ = context__.vals_r("d_row_vector_array_3d"); current_statement__ = 287; pos__ = 1; current_statement__ = 287; @@ -6748,157 +6698,135 @@ class mother_model final : public model_base_crtp { offset_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 4; - assign(offset_multiplier, - in__.template read_constrain_offset_multiplier, jacobian__>( - 1, 2, lp__, 5), "assigning variable offset_multiplier"); + offset_multiplier = in__.template read_constrain_offset_multiplier, jacobian__>( + 1, 2, lp__, 5); std::vector no_offset_multiplier; no_offset_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 5; - assign(no_offset_multiplier, - in__.template read_constrain_offset_multiplier, jacobian__>( - 0, 2, lp__, 5), "assigning variable no_offset_multiplier"); + no_offset_multiplier = in__.template read_constrain_offset_multiplier, jacobian__>( + 0, 2, lp__, 5); std::vector offset_no_multiplier; offset_no_multiplier = std::vector(5, DUMMY_VAR__); current_statement__ = 6; - assign(offset_no_multiplier, - in__.template read_constrain_offset_multiplier, jacobian__>( - 3, 1, lp__, 5), "assigning variable offset_no_multiplier"); + offset_no_multiplier = in__.template read_constrain_offset_multiplier, jacobian__>( + 3, 1, lp__, 5); std::vector p_real_1d_ar; p_real_1d_ar = std::vector(N, DUMMY_VAR__); current_statement__ = 7; - assign(p_real_1d_ar, - in__.template read_constrain_lb, jacobian__>( - 0, lp__, N), "assigning variable p_real_1d_ar"); + p_real_1d_ar = in__.template read_constrain_lb, jacobian__>( + 0, lp__, N); std::vector>> p_real_3d_ar; p_real_3d_ar = std::vector>>(N, std::vector>(M, std::vector(K, DUMMY_VAR__))); current_statement__ = 8; - assign(p_real_3d_ar, - in__.template read_constrain_lb>>, jacobian__>( - 0, lp__, N, M, K), "assigning variable p_real_3d_ar"); + p_real_3d_ar = in__.template read_constrain_lb>>, jacobian__>( + 0, lp__, N, M, K); Eigen::Matrix p_vec; p_vec = Eigen::Matrix(N); stan::math::fill(p_vec, DUMMY_VAR__); current_statement__ = 9; - assign(p_vec, - in__.template read_constrain_lb, jacobian__>( - 0, lp__, N), "assigning variable p_vec"); + p_vec = in__.template read_constrain_lb, jacobian__>( + 0, lp__, N); std::vector> p_1d_vec; p_1d_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_vec, DUMMY_VAR__); current_statement__ = 10; - assign(p_1d_vec, - in__.template read>>( - N, N), "assigning variable p_1d_vec"); + p_1d_vec = in__.template read>>( + N, N); std::vector>>> p_3d_vec; p_3d_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_vec, DUMMY_VAR__); current_statement__ = 11; - assign(p_3d_vec, - in__.template read>>>>( - N, M, K, N), "assigning variable p_3d_vec"); + p_3d_vec = in__.template read>>>>( + N, M, K, N); Eigen::Matrix p_row_vec; p_row_vec = Eigen::Matrix(N); stan::math::fill(p_row_vec, DUMMY_VAR__); current_statement__ = 12; - assign(p_row_vec, - in__.template read>(N), - "assigning variable p_row_vec"); + p_row_vec = in__.template read>( + N); std::vector> p_1d_row_vec; p_1d_row_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_row_vec, DUMMY_VAR__); current_statement__ = 13; - assign(p_1d_row_vec, - in__.template read>>( - N, N), "assigning variable p_1d_row_vec"); + p_1d_row_vec = in__.template read>>( + N, N); std::vector>>> p_3d_row_vec; p_3d_row_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_row_vec, DUMMY_VAR__); current_statement__ = 14; - assign(p_3d_row_vec, - in__.template read>>>>( - N, M, K, N), "assigning variable p_3d_row_vec"); + p_3d_row_vec = in__.template read>>>>( + N, M, K, N); std::vector>> p_ar_mat; p_ar_mat = std::vector>>(4, std::vector>(5, Eigen::Matrix(2, 3))); stan::math::fill(p_ar_mat, DUMMY_VAR__); current_statement__ = 15; - assign(p_ar_mat, - in__.template read_constrain_lub>>, jacobian__>( - 0, 1, lp__, 4, 5, 2, 3), "assigning variable p_ar_mat"); + p_ar_mat = in__.template read_constrain_lub>>, jacobian__>( + 0, 1, lp__, 4, 5, 2, 3); Eigen::Matrix p_simplex; p_simplex = Eigen::Matrix(N); stan::math::fill(p_simplex, DUMMY_VAR__); current_statement__ = 16; - assign(p_simplex, - in__.template read_constrain_simplex, jacobian__>( - lp__, N), "assigning variable p_simplex"); + p_simplex = in__.template read_constrain_simplex, jacobian__>( + lp__, N); std::vector> p_1d_simplex; p_1d_simplex = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_simplex, DUMMY_VAR__); current_statement__ = 17; - assign(p_1d_simplex, - in__.template read_constrain_simplex>, jacobian__>( - lp__, N, N), "assigning variable p_1d_simplex"); + p_1d_simplex = in__.template read_constrain_simplex>, jacobian__>( + lp__, N, N); std::vector>>> p_3d_simplex; p_3d_simplex = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_simplex, DUMMY_VAR__); current_statement__ = 18; - assign(p_3d_simplex, - in__.template read_constrain_simplex>>>, jacobian__>( - lp__, N, M, K, N), "assigning variable p_3d_simplex"); + p_3d_simplex = in__.template read_constrain_simplex>>>, jacobian__>( + lp__, N, M, K, N); Eigen::Matrix p_cfcov_54; p_cfcov_54 = Eigen::Matrix(5, 4); stan::math::fill(p_cfcov_54, DUMMY_VAR__); current_statement__ = 19; - assign(p_cfcov_54, - in__.template read_constrain_cholesky_factor_cov, jacobian__>( - lp__, 5, 4), "assigning variable p_cfcov_54"); + p_cfcov_54 = in__.template read_constrain_cholesky_factor_cov, jacobian__>( + lp__, 5, 4); Eigen::Matrix p_cfcov_33; p_cfcov_33 = Eigen::Matrix(3, 3); stan::math::fill(p_cfcov_33, DUMMY_VAR__); current_statement__ = 20; - assign(p_cfcov_33, - in__.template read_constrain_cholesky_factor_cov, jacobian__>( - lp__, 3, 3), "assigning variable p_cfcov_33"); + p_cfcov_33 = in__.template read_constrain_cholesky_factor_cov, jacobian__>( + lp__, 3, 3); std::vector> p_cfcov_33_ar; p_cfcov_33_ar = std::vector>(K, Eigen::Matrix(3, 3)); stan::math::fill(p_cfcov_33_ar, DUMMY_VAR__); current_statement__ = 21; - assign(p_cfcov_33_ar, - in__.template read_constrain_cholesky_factor_cov>, jacobian__>( - lp__, K, 3, 3), "assigning variable p_cfcov_33_ar"); + p_cfcov_33_ar = in__.template read_constrain_cholesky_factor_cov>, jacobian__>( + lp__, K, 3, 3); Eigen::Matrix x_p; x_p = Eigen::Matrix(2); stan::math::fill(x_p, DUMMY_VAR__); current_statement__ = 22; - assign(x_p, - in__.template read>(2), - "assigning variable x_p"); + x_p = in__.template read>(2); Eigen::Matrix y_p; y_p = Eigen::Matrix(2); stan::math::fill(y_p, DUMMY_VAR__); current_statement__ = 23; - assign(y_p, - in__.template read>(2), - "assigning variable y_p"); + y_p = in__.template read>(2); std::vector tp_real_1d_ar; tp_real_1d_ar = std::vector(N, DUMMY_VAR__); @@ -7296,157 +7224,135 @@ class mother_model final : public model_base_crtp { offset_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(offset_multiplier, - in__.template read_constrain_offset_multiplier, jacobian__>( - 1, 2, lp__, 5), "assigning variable offset_multiplier"); + offset_multiplier = in__.template read_constrain_offset_multiplier, jacobian__>( + 1, 2, lp__, 5); std::vector no_offset_multiplier; no_offset_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(no_offset_multiplier, - in__.template read_constrain_offset_multiplier, jacobian__>( - 0, 2, lp__, 5), "assigning variable no_offset_multiplier"); + no_offset_multiplier = in__.template read_constrain_offset_multiplier, jacobian__>( + 0, 2, lp__, 5); std::vector offset_no_multiplier; offset_no_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(offset_no_multiplier, - in__.template read_constrain_offset_multiplier, jacobian__>( - 3, 1, lp__, 5), "assigning variable offset_no_multiplier"); + offset_no_multiplier = in__.template read_constrain_offset_multiplier, jacobian__>( + 3, 1, lp__, 5); std::vector p_real_1d_ar; p_real_1d_ar = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - assign(p_real_1d_ar, - in__.template read_constrain_lb, jacobian__>( - 0, lp__, N), "assigning variable p_real_1d_ar"); + p_real_1d_ar = in__.template read_constrain_lb, jacobian__>( + 0, lp__, N); std::vector>> p_real_3d_ar; p_real_3d_ar = std::vector>>(N, std::vector>(M, std::vector(K, std::numeric_limits::quiet_NaN()))); current_statement__ = 8; - assign(p_real_3d_ar, - in__.template read_constrain_lb>>, jacobian__>( - 0, lp__, N, M, K), "assigning variable p_real_3d_ar"); + p_real_3d_ar = in__.template read_constrain_lb>>, jacobian__>( + 0, lp__, N, M, K); Eigen::Matrix p_vec; p_vec = Eigen::Matrix(N); stan::math::fill(p_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 9; - assign(p_vec, - in__.template read_constrain_lb, jacobian__>( - 0, lp__, N), "assigning variable p_vec"); + p_vec = in__.template read_constrain_lb, jacobian__>( + 0, lp__, N); std::vector> p_1d_vec; p_1d_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 10; - assign(p_1d_vec, - in__.template read>>( - N, N), "assigning variable p_1d_vec"); + p_1d_vec = in__.template read>>( + N, N); std::vector>>> p_3d_vec; p_3d_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 11; - assign(p_3d_vec, - in__.template read>>>>( - N, M, K, N), "assigning variable p_3d_vec"); + p_3d_vec = in__.template read>>>>( + N, M, K, N); Eigen::Matrix p_row_vec; p_row_vec = Eigen::Matrix(N); stan::math::fill(p_row_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 12; - assign(p_row_vec, - in__.template read>(N), - "assigning variable p_row_vec"); + p_row_vec = in__.template read>( + N); std::vector> p_1d_row_vec; p_1d_row_vec = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_row_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 13; - assign(p_1d_row_vec, - in__.template read>>( - N, N), "assigning variable p_1d_row_vec"); + p_1d_row_vec = in__.template read>>( + N, N); std::vector>>> p_3d_row_vec; p_3d_row_vec = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_row_vec, std::numeric_limits::quiet_NaN()); current_statement__ = 14; - assign(p_3d_row_vec, - in__.template read>>>>( - N, M, K, N), "assigning variable p_3d_row_vec"); + p_3d_row_vec = in__.template read>>>>( + N, M, K, N); std::vector>> p_ar_mat; p_ar_mat = std::vector>>(4, std::vector>(5, Eigen::Matrix(2, 3))); stan::math::fill(p_ar_mat, std::numeric_limits::quiet_NaN()); current_statement__ = 15; - assign(p_ar_mat, - in__.template read_constrain_lub>>, jacobian__>( - 0, 1, lp__, 4, 5, 2, 3), "assigning variable p_ar_mat"); + p_ar_mat = in__.template read_constrain_lub>>, jacobian__>( + 0, 1, lp__, 4, 5, 2, 3); Eigen::Matrix p_simplex; p_simplex = Eigen::Matrix(N); stan::math::fill(p_simplex, std::numeric_limits::quiet_NaN()); current_statement__ = 16; - assign(p_simplex, - in__.template read_constrain_simplex, jacobian__>( - lp__, N), "assigning variable p_simplex"); + p_simplex = in__.template read_constrain_simplex, jacobian__>( + lp__, N); std::vector> p_1d_simplex; p_1d_simplex = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(p_1d_simplex, std::numeric_limits::quiet_NaN()); current_statement__ = 17; - assign(p_1d_simplex, - in__.template read_constrain_simplex>, jacobian__>( - lp__, N, N), "assigning variable p_1d_simplex"); + p_1d_simplex = in__.template read_constrain_simplex>, jacobian__>( + lp__, N, N); std::vector>>> p_3d_simplex; p_3d_simplex = std::vector>>>(N, std::vector>>(M, std::vector>(K, Eigen::Matrix(N)))); stan::math::fill(p_3d_simplex, std::numeric_limits::quiet_NaN()); current_statement__ = 18; - assign(p_3d_simplex, - in__.template read_constrain_simplex>>>, jacobian__>( - lp__, N, M, K, N), "assigning variable p_3d_simplex"); + p_3d_simplex = in__.template read_constrain_simplex>>>, jacobian__>( + lp__, N, M, K, N); Eigen::Matrix p_cfcov_54; p_cfcov_54 = Eigen::Matrix(5, 4); stan::math::fill(p_cfcov_54, std::numeric_limits::quiet_NaN()); current_statement__ = 19; - assign(p_cfcov_54, - in__.template read_constrain_cholesky_factor_cov, jacobian__>( - lp__, 5, 4), "assigning variable p_cfcov_54"); + p_cfcov_54 = in__.template read_constrain_cholesky_factor_cov, jacobian__>( + lp__, 5, 4); Eigen::Matrix p_cfcov_33; p_cfcov_33 = Eigen::Matrix(3, 3); stan::math::fill(p_cfcov_33, std::numeric_limits::quiet_NaN()); current_statement__ = 20; - assign(p_cfcov_33, - in__.template read_constrain_cholesky_factor_cov, jacobian__>( - lp__, 3, 3), "assigning variable p_cfcov_33"); + p_cfcov_33 = in__.template read_constrain_cholesky_factor_cov, jacobian__>( + lp__, 3, 3); std::vector> p_cfcov_33_ar; p_cfcov_33_ar = std::vector>(K, Eigen::Matrix(3, 3)); stan::math::fill(p_cfcov_33_ar, std::numeric_limits::quiet_NaN()); current_statement__ = 21; - assign(p_cfcov_33_ar, - in__.template read_constrain_cholesky_factor_cov>, jacobian__>( - lp__, K, 3, 3), "assigning variable p_cfcov_33_ar"); + p_cfcov_33_ar = in__.template read_constrain_cholesky_factor_cov>, jacobian__>( + lp__, K, 3, 3); Eigen::Matrix x_p; x_p = Eigen::Matrix(2); stan::math::fill(x_p, std::numeric_limits::quiet_NaN()); current_statement__ = 22; - assign(x_p, - in__.template read>(2), - "assigning variable x_p"); + x_p = in__.template read>(2); Eigen::Matrix y_p; y_p = Eigen::Matrix(2); stan::math::fill(y_p, std::numeric_limits::quiet_NaN()); current_statement__ = 23; - assign(y_p, - in__.template read>(2), - "assigning variable y_p"); + y_p = in__.template read>(2); std::vector tp_real_1d_ar; tp_real_1d_ar = std::vector(N, std::numeric_limits::quiet_NaN()); @@ -8367,8 +8273,7 @@ class mother_model final : public model_base_crtp { offset_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(offset_multiplier, context__.vals_r("offset_multiplier"), - "assigning variable offset_multiplier"); + offset_multiplier = context__.vals_r("offset_multiplier"); std::vector offset_multiplier_free__; offset_multiplier_free__ = std::vector(5, std::numeric_limits::quiet_NaN()); @@ -8383,8 +8288,7 @@ class mother_model final : public model_base_crtp { no_offset_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(no_offset_multiplier, context__.vals_r("no_offset_multiplier"), - "assigning variable no_offset_multiplier"); + no_offset_multiplier = context__.vals_r("no_offset_multiplier"); std::vector no_offset_multiplier_free__; no_offset_multiplier_free__ = std::vector(5, std::numeric_limits::quiet_NaN()); @@ -8400,8 +8304,7 @@ class mother_model final : public model_base_crtp { offset_no_multiplier = std::vector(5, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(offset_no_multiplier, context__.vals_r("offset_no_multiplier"), - "assigning variable offset_no_multiplier"); + offset_no_multiplier = context__.vals_r("offset_no_multiplier"); std::vector offset_no_multiplier_free__; offset_no_multiplier_free__ = std::vector(5, std::numeric_limits::quiet_NaN()); @@ -8417,8 +8320,7 @@ class mother_model final : public model_base_crtp { p_real_1d_ar = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - assign(p_real_1d_ar, context__.vals_r("p_real_1d_ar"), - "assigning variable p_real_1d_ar"); + p_real_1d_ar = context__.vals_r("p_real_1d_ar"); std::vector p_real_1d_ar_free__; p_real_1d_ar_free__ = std::vector(N, std::numeric_limits::quiet_NaN()); @@ -8434,8 +8336,7 @@ class mother_model final : public model_base_crtp { { std::vector p_real_3d_ar_flat__; current_statement__ = 8; - assign(p_real_3d_ar_flat__, context__.vals_r("p_real_3d_ar"), - "assigning variable p_real_3d_ar_flat__"); + p_real_3d_ar_flat__ = context__.vals_r("p_real_3d_ar"); current_statement__ = 8; pos__ = 1; current_statement__ = 8; @@ -8476,8 +8377,7 @@ class mother_model final : public model_base_crtp { { std::vector p_vec_flat__; current_statement__ = 9; - assign(p_vec_flat__, context__.vals_r("p_vec"), - "assigning variable p_vec_flat__"); + p_vec_flat__ = context__.vals_r("p_vec"); current_statement__ = 9; pos__ = 1; current_statement__ = 9; @@ -8504,8 +8404,7 @@ class mother_model final : public model_base_crtp { { std::vector p_1d_vec_flat__; current_statement__ = 10; - assign(p_1d_vec_flat__, context__.vals_r("p_1d_vec"), - "assigning variable p_1d_vec_flat__"); + p_1d_vec_flat__ = context__.vals_r("p_1d_vec"); current_statement__ = 10; pos__ = 1; current_statement__ = 10; @@ -8526,8 +8425,7 @@ class mother_model final : public model_base_crtp { { std::vector p_3d_vec_flat__; current_statement__ = 11; - assign(p_3d_vec_flat__, context__.vals_r("p_3d_vec"), - "assigning variable p_3d_vec_flat__"); + p_3d_vec_flat__ = context__.vals_r("p_3d_vec"); current_statement__ = 11; pos__ = 1; current_statement__ = 11; @@ -8554,8 +8452,7 @@ class mother_model final : public model_base_crtp { { std::vector p_row_vec_flat__; current_statement__ = 12; - assign(p_row_vec_flat__, context__.vals_r("p_row_vec"), - "assigning variable p_row_vec_flat__"); + p_row_vec_flat__ = context__.vals_r("p_row_vec"); current_statement__ = 12; pos__ = 1; current_statement__ = 12; @@ -8573,8 +8470,7 @@ class mother_model final : public model_base_crtp { { std::vector p_1d_row_vec_flat__; current_statement__ = 13; - assign(p_1d_row_vec_flat__, context__.vals_r("p_1d_row_vec"), - "assigning variable p_1d_row_vec_flat__"); + p_1d_row_vec_flat__ = context__.vals_r("p_1d_row_vec"); current_statement__ = 13; pos__ = 1; current_statement__ = 13; @@ -8595,8 +8491,7 @@ class mother_model final : public model_base_crtp { { std::vector p_3d_row_vec_flat__; current_statement__ = 14; - assign(p_3d_row_vec_flat__, context__.vals_r("p_3d_row_vec"), - "assigning variable p_3d_row_vec_flat__"); + p_3d_row_vec_flat__ = context__.vals_r("p_3d_row_vec"); current_statement__ = 14; pos__ = 1; current_statement__ = 14; @@ -8623,8 +8518,7 @@ class mother_model final : public model_base_crtp { { std::vector p_ar_mat_flat__; current_statement__ = 15; - assign(p_ar_mat_flat__, context__.vals_r("p_ar_mat"), - "assigning variable p_ar_mat_flat__"); + p_ar_mat_flat__ = context__.vals_r("p_ar_mat"); current_statement__ = 15; pos__ = 1; current_statement__ = 15; @@ -8674,8 +8568,7 @@ class mother_model final : public model_base_crtp { { std::vector p_simplex_flat__; current_statement__ = 16; - assign(p_simplex_flat__, context__.vals_r("p_simplex"), - "assigning variable p_simplex_flat__"); + p_simplex_flat__ = context__.vals_r("p_simplex"); current_statement__ = 16; pos__ = 1; current_statement__ = 16; @@ -8700,8 +8593,7 @@ class mother_model final : public model_base_crtp { { std::vector p_1d_simplex_flat__; current_statement__ = 17; - assign(p_1d_simplex_flat__, context__.vals_r("p_1d_simplex"), - "assigning variable p_1d_simplex_flat__"); + p_1d_simplex_flat__ = context__.vals_r("p_1d_simplex"); current_statement__ = 17; pos__ = 1; current_statement__ = 17; @@ -8733,8 +8625,7 @@ class mother_model final : public model_base_crtp { { std::vector p_3d_simplex_flat__; current_statement__ = 18; - assign(p_3d_simplex_flat__, context__.vals_r("p_3d_simplex"), - "assigning variable p_3d_simplex_flat__"); + p_3d_simplex_flat__ = context__.vals_r("p_3d_simplex"); current_statement__ = 18; pos__ = 1; current_statement__ = 18; @@ -8780,8 +8671,7 @@ class mother_model final : public model_base_crtp { { std::vector p_cfcov_54_flat__; current_statement__ = 19; - assign(p_cfcov_54_flat__, context__.vals_r("p_cfcov_54"), - "assigning variable p_cfcov_54_flat__"); + p_cfcov_54_flat__ = context__.vals_r("p_cfcov_54"); current_statement__ = 19; pos__ = 1; current_statement__ = 19; @@ -8811,8 +8701,7 @@ class mother_model final : public model_base_crtp { { std::vector p_cfcov_33_flat__; current_statement__ = 20; - assign(p_cfcov_33_flat__, context__.vals_r("p_cfcov_33"), - "assigning variable p_cfcov_33_flat__"); + p_cfcov_33_flat__ = context__.vals_r("p_cfcov_33"); current_statement__ = 20; pos__ = 1; current_statement__ = 20; @@ -8842,8 +8731,7 @@ class mother_model final : public model_base_crtp { { std::vector p_cfcov_33_ar_flat__; current_statement__ = 21; - assign(p_cfcov_33_ar_flat__, context__.vals_r("p_cfcov_33_ar"), - "assigning variable p_cfcov_33_ar_flat__"); + p_cfcov_33_ar_flat__ = context__.vals_r("p_cfcov_33_ar"); current_statement__ = 21; pos__ = 1; current_statement__ = 21; @@ -8878,8 +8766,7 @@ class mother_model final : public model_base_crtp { { std::vector x_p_flat__; current_statement__ = 22; - assign(x_p_flat__, context__.vals_r("x_p"), - "assigning variable x_p_flat__"); + x_p_flat__ = context__.vals_r("x_p"); current_statement__ = 22; pos__ = 1; current_statement__ = 22; @@ -8897,8 +8784,7 @@ class mother_model final : public model_base_crtp { { std::vector y_p_flat__; current_statement__ = 23; - assign(y_p_flat__, context__.vals_r("y_p"), - "assigning variable y_p_flat__"); + y_p_flat__ = context__.vals_r("y_p"); current_statement__ = 23; pos__ = 1; current_statement__ = 23; @@ -10846,7 +10732,7 @@ class motherHOF_model final : public model_base_crtp { y0_d = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 124; - assign(y0_d, context__.vals_r("y0_d"), "assigning variable y0_d"); + y0_d = context__.vals_r("y0_d"); current_statement__ = 125; context__.validate_dims("data initialization","t0","double", context__.to_vec()); @@ -10862,43 +10748,42 @@ class motherHOF_model final : public model_base_crtp { ts = std::vector(T, std::numeric_limits::quiet_NaN()); current_statement__ = 127; - assign(ts, context__.vals_r("ts"), "assigning variable ts"); + ts = context__.vals_r("ts"); current_statement__ = 128; context__.validate_dims("data initialization","theta_d","double", context__.to_vec(1)); theta_d = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 128; - assign(theta_d, context__.vals_r("theta_d"), - "assigning variable theta_d"); + theta_d = context__.vals_r("theta_d"); current_statement__ = 129; context__.validate_dims("data initialization","x","double", context__.to_vec(0)); x = std::vector(0, std::numeric_limits::quiet_NaN()); current_statement__ = 129; - assign(x, context__.vals_r("x"), "assigning variable x"); + x = context__.vals_r("x"); current_statement__ = 130; context__.validate_dims("data initialization","x_int","int", context__.to_vec(0)); x_int = std::vector(0, std::numeric_limits::min()); current_statement__ = 130; - assign(x_int, context__.vals_i("x_int"), "assigning variable x_int"); + x_int = context__.vals_i("x_int"); current_statement__ = 131; context__.validate_dims("data initialization","x_d_r","double", context__.to_vec(0)); x_d_r = std::vector(0, std::numeric_limits::quiet_NaN()); current_statement__ = 131; - assign(x_d_r, context__.vals_r("x_d_r"), "assigning variable x_d_r"); + x_d_r = context__.vals_r("x_d_r"); current_statement__ = 132; context__.validate_dims("data initialization","x_d_i","int", context__.to_vec(0)); x_d_i = std::vector(0, std::numeric_limits::min()); current_statement__ = 132; - assign(x_d_i, context__.vals_i("x_d_i"), "assigning variable x_d_i"); + x_d_i = context__.vals_i("x_d_i"); current_statement__ = 133; context__.validate_dims("data initialization","shared_params_d", "double",context__.to_vec(3)); @@ -10908,8 +10793,7 @@ class motherHOF_model final : public model_base_crtp { { std::vector shared_params_d_flat__; current_statement__ = 133; - assign(shared_params_d_flat__, context__.vals_r("shared_params_d"), - "assigning variable shared_params_d_flat__"); + shared_params_d_flat__ = context__.vals_r("shared_params_d"); current_statement__ = 133; pos__ = 1; current_statement__ = 133; @@ -10929,8 +10813,7 @@ class motherHOF_model final : public model_base_crtp { { std::vector job_params_d_flat__; current_statement__ = 134; - assign(job_params_d_flat__, context__.vals_r("job_params_d"), - "assigning variable job_params_d_flat__"); + job_params_d_flat__ = context__.vals_r("job_params_d"); current_statement__ = 134; pos__ = 1; current_statement__ = 134; @@ -10952,8 +10835,7 @@ class motherHOF_model final : public model_base_crtp { { std::vector data_r_flat__; current_statement__ = 135; - assign(data_r_flat__, context__.vals_r("data_r"), - "assigning variable data_r_flat__"); + data_r_flat__ = context__.vals_r("data_r"); current_statement__ = 135; pos__ = 1; current_statement__ = 135; @@ -10975,8 +10857,7 @@ class motherHOF_model final : public model_base_crtp { { std::vector data_i_flat__; current_statement__ = 136; - assign(data_i_flat__, context__.vals_i("data_i"), - "assigning variable data_i_flat__"); + data_i_flat__ = context__.vals_i("data_i"); current_statement__ = 136; pos__ = 1; current_statement__ = 136; @@ -11040,44 +10921,37 @@ class motherHOF_model final : public model_base_crtp { y0_p = std::vector(2, DUMMY_VAR__); current_statement__ = 1; - assign(y0_p, in__.template read>(2), - "assigning variable y0_p"); + y0_p = in__.template read>(2); std::vector theta_p; theta_p = std::vector(1, DUMMY_VAR__); current_statement__ = 2; - assign(theta_p, in__.template read>(1), - "assigning variable theta_p"); + theta_p = in__.template read>(1); std::vector x_p; x_p = std::vector(1, DUMMY_VAR__); current_statement__ = 3; - assign(x_p, in__.template read>(1), - "assigning variable x_p"); + x_p = in__.template read>(1); Eigen::Matrix x_p_v; x_p_v = Eigen::Matrix(2); stan::math::fill(x_p_v, DUMMY_VAR__); current_statement__ = 4; - assign(x_p_v, - in__.template read>(2), - "assigning variable x_p_v"); + x_p_v = in__.template read>(2); Eigen::Matrix shared_params_p; shared_params_p = Eigen::Matrix(3); stan::math::fill(shared_params_p, DUMMY_VAR__); current_statement__ = 5; - assign(shared_params_p, - in__.template read>(3), - "assigning variable shared_params_p"); + shared_params_p = in__.template read>( + 3); std::vector> job_params_p; job_params_p = std::vector>(3, Eigen::Matrix(3)); stan::math::fill(job_params_p, DUMMY_VAR__); current_statement__ = 6; - assign(job_params_p, - in__.template read>>( - 3, 3), "assigning variable job_params_p"); + job_params_p = in__.template read>>( + 3, 3); local_scalar_t__ x_r; x_r = DUMMY_VAR__; @@ -11386,44 +11260,37 @@ class motherHOF_model final : public model_base_crtp { y0_p = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(y0_p, in__.template read>(2), - "assigning variable y0_p"); + y0_p = in__.template read>(2); std::vector theta_p; theta_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(theta_p, in__.template read>(1), - "assigning variable theta_p"); + theta_p = in__.template read>(1); std::vector x_p; x_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(x_p, in__.template read>(1), - "assigning variable x_p"); + x_p = in__.template read>(1); Eigen::Matrix x_p_v; x_p_v = Eigen::Matrix(2); stan::math::fill(x_p_v, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(x_p_v, - in__.template read>(2), - "assigning variable x_p_v"); + x_p_v = in__.template read>(2); Eigen::Matrix shared_params_p; shared_params_p = Eigen::Matrix(3); stan::math::fill(shared_params_p, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(shared_params_p, - in__.template read>(3), - "assigning variable shared_params_p"); + shared_params_p = in__.template read>( + 3); std::vector> job_params_p; job_params_p = std::vector>(3, Eigen::Matrix(3)); stan::math::fill(job_params_p, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(job_params_p, - in__.template read>>( - 3, 3), "assigning variable job_params_p"); + job_params_p = in__.template read>>( + 3, 3); double x_r; x_r = std::numeric_limits::quiet_NaN(); @@ -11822,18 +11689,17 @@ class motherHOF_model final : public model_base_crtp { y0_p = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(y0_p, context__.vals_r("y0_p"), "assigning variable y0_p"); + y0_p = context__.vals_r("y0_p"); std::vector theta_p; theta_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(theta_p, context__.vals_r("theta_p"), - "assigning variable theta_p"); + theta_p = context__.vals_r("theta_p"); std::vector x_p; x_p = std::vector(1, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(x_p, context__.vals_r("x_p"), "assigning variable x_p"); + x_p = context__.vals_r("x_p"); Eigen::Matrix x_p_v; x_p_v = Eigen::Matrix(2); stan::math::fill(x_p_v, std::numeric_limits::quiet_NaN()); @@ -11841,8 +11707,7 @@ class motherHOF_model final : public model_base_crtp { { std::vector x_p_v_flat__; current_statement__ = 4; - assign(x_p_v_flat__, context__.vals_r("x_p_v"), - "assigning variable x_p_v_flat__"); + x_p_v_flat__ = context__.vals_r("x_p_v"); current_statement__ = 4; pos__ = 1; current_statement__ = 4; @@ -11860,8 +11725,7 @@ class motherHOF_model final : public model_base_crtp { { std::vector shared_params_p_flat__; current_statement__ = 5; - assign(shared_params_p_flat__, context__.vals_r("shared_params_p"), - "assigning variable shared_params_p_flat__"); + shared_params_p_flat__ = context__.vals_r("shared_params_p"); current_statement__ = 5; pos__ = 1; current_statement__ = 5; @@ -11879,8 +11743,7 @@ class motherHOF_model final : public model_base_crtp { { std::vector job_params_p_flat__; current_statement__ = 6; - assign(job_params_p_flat__, context__.vals_r("job_params_p"), - "assigning variable job_params_p_flat__"); + job_params_p_flat__ = context__.vals_r("job_params_p"); current_statement__ = 6; pos__ = 1; current_statement__ = 6; @@ -13186,7 +13049,7 @@ class new_integrate_interface_model final : public model_base_crtp(N, std::numeric_limits::quiet_NaN()); current_statement__ = 605; - assign(rad, context__.vals_r("rad"), "assigning variable rad"); + rad = context__.vals_r("rad"); current_statement__ = 606; validate_non_negative_index("vd", "N", N); current_statement__ = 607; @@ -13198,8 +13061,7 @@ class new_integrate_interface_model final : public model_base_crtp vd_flat__; current_statement__ = 607; - assign(vd_flat__, context__.vals_r("vd"), - "assigning variable vd_flat__"); + vd_flat__ = context__.vals_r("vd"); current_statement__ = 607; pos__ = 1; current_statement__ = 607; @@ -13317,16 +13179,13 @@ class new_integrate_interface_model final : public model_base_crtp(N, DUMMY_VAR__); current_statement__ = 2; - assign(ra, in__.template read>(N), - "assigning variable ra"); + ra = in__.template read>(N); Eigen::Matrix v; v = Eigen::Matrix(N); stan::math::fill(v, DUMMY_VAR__); current_statement__ = 3; - assign(v, - in__.template read>(N), - "assigning variable v"); + v = in__.template read>(N); std::vector> z; z = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(z, DUMMY_VAR__); @@ -14779,16 +14638,13 @@ class new_integrate_interface_model final : public model_base_crtp(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(ra, in__.template read>(N), - "assigning variable ra"); + ra = in__.template read>(N); Eigen::Matrix v; v = Eigen::Matrix(N); stan::math::fill(v, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(v, - in__.template read>(N), - "assigning variable v"); + v = in__.template read>(N); std::vector> z; z = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(z, std::numeric_limits::quiet_NaN()); @@ -16235,7 +16091,7 @@ class new_integrate_interface_model final : public model_base_crtp(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(ra, context__.vals_r("ra"), "assigning variable ra"); + ra = context__.vals_r("ra"); Eigen::Matrix v; v = Eigen::Matrix(N); stan::math::fill(v, std::numeric_limits::quiet_NaN()); @@ -16243,7 +16099,7 @@ class new_integrate_interface_model final : public model_base_crtp v_flat__; current_statement__ = 3; - assign(v_flat__, context__.vals_r("v"), "assigning variable v_flat__"); + v_flat__ = context__.vals_r("v"); current_statement__ = 3; pos__ = 1; current_statement__ = 3; @@ -16650,14 +16506,14 @@ class old_integrate_interface_model final : public model_base_crtp(N, std::numeric_limits::quiet_NaN()); current_statement__ = 20; - assign(ts, context__.vals_r("ts"), "assigning variable ts"); + ts = context__.vals_r("ts"); current_statement__ = 21; context__.validate_dims("data initialization","y_init","double", context__.to_vec(2)); y_init = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 21; - assign(y_init, context__.vals_r("y_init"), "assigning variable y_init"); + y_init = context__.vals_r("y_init"); current_statement__ = 22; validate_non_negative_index("y", "N", N); current_statement__ = 23; @@ -16668,7 +16524,7 @@ class old_integrate_interface_model final : public model_base_crtp y_flat__; current_statement__ = 23; - assign(y_flat__, context__.vals_r("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_r("y"); current_statement__ = 23; pos__ = 1; current_statement__ = 23; @@ -16758,16 +16614,14 @@ class old_integrate_interface_model final : public model_base_crtp(2, DUMMY_VAR__); current_statement__ = 5; - assign(z_init, - in__.template read_constrain_lb, jacobian__>( - 0, lp__, 2), "assigning variable z_init"); + z_init = in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2); std::vector sigma; sigma = std::vector(2, DUMMY_VAR__); current_statement__ = 6; - assign(sigma, - in__.template read_constrain_lb, jacobian__>( - 0, lp__, 2), "assigning variable sigma"); + sigma = in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2); std::vector> z; z = std::vector>(N, std::vector(2, DUMMY_VAR__)); @@ -16865,16 +16719,14 @@ class old_integrate_interface_model final : public model_base_crtp(2, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(z_init, - in__.template read_constrain_lb, jacobian__>( - 0, lp__, 2), "assigning variable z_init"); + z_init = in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2); std::vector sigma; sigma = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(sigma, - in__.template read_constrain_lb, jacobian__>( - 0, lp__, 2), "assigning variable sigma"); + sigma = in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2); std::vector> z; z = std::vector>(N, std::vector(2, std::numeric_limits::quiet_NaN())); @@ -16971,7 +16823,7 @@ class old_integrate_interface_model final : public model_base_crtp(2, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(z_init, context__.vals_r("z_init"), "assigning variable z_init"); + z_init = context__.vals_r("z_init"); std::vector z_init_free__; z_init_free__ = std::vector(2, std::numeric_limits::quiet_NaN()); @@ -16984,7 +16836,7 @@ class old_integrate_interface_model final : public model_base_crtp(2, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(sigma, context__.vals_r("sigma"), "assigning variable sigma"); + sigma = context__.vals_r("sigma"); std::vector sigma_free__; sigma_free__ = std::vector(2, std::numeric_limits::quiet_NaN()); @@ -17532,8 +17384,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector X_d_flat__; current_statement__ = 180; - assign(X_d_flat__, context__.vals_r("X_d"), - "assigning variable X_d_flat__"); + X_d_flat__ = context__.vals_r("X_d"); current_statement__ = 180; pos__ = 1; current_statement__ = 180; @@ -17559,8 +17410,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector X_d_a_flat__; current_statement__ = 183; - assign(X_d_a_flat__, context__.vals_r("X_d_a"), - "assigning variable X_d_a_flat__"); + X_d_a_flat__ = context__.vals_r("X_d_a"); current_statement__ = 183; pos__ = 1; current_statement__ = 183; @@ -17588,8 +17438,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector y_v_d_flat__; current_statement__ = 185; - assign(y_v_d_flat__, context__.vals_r("y_v_d"), - "assigning variable y_v_d_flat__"); + y_v_d_flat__ = context__.vals_r("y_v_d"); current_statement__ = 185; pos__ = 1; current_statement__ = 185; @@ -17611,8 +17460,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector X_rv_d_flat__; current_statement__ = 187; - assign(X_rv_d_flat__, context__.vals_r("X_rv_d"), - "assigning variable X_rv_d_flat__"); + X_rv_d_flat__ = context__.vals_r("X_rv_d"); current_statement__ = 187; pos__ = 1; current_statement__ = 187; @@ -17631,7 +17479,7 @@ class optimize_glm_model final : public model_base_crtp { y_vi_d = std::vector(n, std::numeric_limits::min()); current_statement__ = 189; - assign(y_vi_d, context__.vals_i("y_vi_d"), "assigning variable y_vi_d"); + y_vi_d = context__.vals_i("y_vi_d"); current_statement__ = 190; validate_non_negative_index("y2_vi_d", "n", n); current_statement__ = 191; @@ -17640,8 +17488,7 @@ class optimize_glm_model final : public model_base_crtp { y2_vi_d = std::vector(n, std::numeric_limits::min()); current_statement__ = 191; - assign(y2_vi_d, context__.vals_i("y2_vi_d"), - "assigning variable y2_vi_d"); + y2_vi_d = context__.vals_i("y2_vi_d"); current_statement__ = 192; context__.validate_dims("data initialization","y_s_d","int", context__.to_vec()); @@ -17767,25 +17614,19 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, DUMMY_VAR__); current_statement__ = 1; - assign(alpha_v, - in__.template read>(k), - "assigning variable alpha_v"); + alpha_v = in__.template read>(k); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - assign(beta, - in__.template read>(k), - "assigning variable beta"); + beta = in__.template read>(k); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, DUMMY_VAR__); current_statement__ = 3; - assign(cuts, - in__.template read>(k), - "assigning variable cuts"); + cuts = in__.template read>(k); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -17807,25 +17648,20 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(X_p, DUMMY_VAR__); current_statement__ = 7; - assign(X_p, - in__.template read>(n, k), - "assigning variable X_p"); + X_p = in__.template read>(n, k); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, DUMMY_VAR__); current_statement__ = 8; - assign(beta_m, - in__.template read>(n, k), - "assigning variable beta_m"); + beta_m = in__.template read>(n, + k); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, DUMMY_VAR__); current_statement__ = 9; - assign(X_rv_p, - in__.template read>(n), - "assigning variable X_rv_p"); + X_rv_p = in__.template read>(n); { current_statement__ = 10; lp_accum__.add( @@ -18401,25 +18237,19 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(alpha_v, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(alpha_v, - in__.template read>(k), - "assigning variable alpha_v"); + alpha_v = in__.template read>(k); Eigen::Matrix beta; beta = Eigen::Matrix(k); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(beta, - in__.template read>(k), - "assigning variable beta"); + beta = in__.template read>(k); Eigen::Matrix cuts; cuts = Eigen::Matrix(k); stan::math::fill(cuts, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(cuts, - in__.template read>(k), - "assigning variable cuts"); + cuts = in__.template read>(k); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -18441,25 +18271,20 @@ class optimize_glm_model final : public model_base_crtp { stan::math::fill(X_p, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - assign(X_p, - in__.template read>(n, k), - "assigning variable X_p"); + X_p = in__.template read>(n, k); Eigen::Matrix beta_m; beta_m = Eigen::Matrix(n, k); stan::math::fill(beta_m, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - assign(beta_m, - in__.template read>(n, k), - "assigning variable beta_m"); + beta_m = in__.template read>(n, + k); Eigen::Matrix X_rv_p; X_rv_p = Eigen::Matrix(n); stan::math::fill(X_rv_p, std::numeric_limits::quiet_NaN()); current_statement__ = 9; - assign(X_rv_p, - in__.template read>(n), - "assigning variable X_rv_p"); + X_rv_p = in__.template read>(n); for (int sym1__ = 1; sym1__ <= k; ++sym1__) { vars__.emplace_back(alpha_v[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= k; ++sym1__) { @@ -18517,8 +18342,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector alpha_v_flat__; current_statement__ = 1; - assign(alpha_v_flat__, context__.vals_r("alpha_v"), - "assigning variable alpha_v_flat__"); + alpha_v_flat__ = context__.vals_r("alpha_v"); current_statement__ = 1; pos__ = 1; current_statement__ = 1; @@ -18536,8 +18360,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector beta_flat__; current_statement__ = 2; - assign(beta_flat__, context__.vals_r("beta"), - "assigning variable beta_flat__"); + beta_flat__ = context__.vals_r("beta"); current_statement__ = 2; pos__ = 1; current_statement__ = 2; @@ -18555,8 +18378,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector cuts_flat__; current_statement__ = 3; - assign(cuts_flat__, context__.vals_r("cuts"), - "assigning variable cuts_flat__"); + cuts_flat__ = context__.vals_r("cuts"); current_statement__ = 3; pos__ = 1; current_statement__ = 3; @@ -18594,8 +18416,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector X_p_flat__; current_statement__ = 7; - assign(X_p_flat__, context__.vals_r("X_p"), - "assigning variable X_p_flat__"); + X_p_flat__ = context__.vals_r("X_p"); current_statement__ = 7; pos__ = 1; current_statement__ = 7; @@ -18615,8 +18436,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector beta_m_flat__; current_statement__ = 8; - assign(beta_m_flat__, context__.vals_r("beta_m"), - "assigning variable beta_m_flat__"); + beta_m_flat__ = context__.vals_r("beta_m"); current_statement__ = 8; pos__ = 1; current_statement__ = 8; @@ -18637,8 +18457,7 @@ class optimize_glm_model final : public model_base_crtp { { std::vector X_rv_p_flat__; current_statement__ = 9; - assign(X_rv_p_flat__, context__.vals_r("X_rv_p"), - "assigning variable X_rv_p_flat__"); + X_rv_p_flat__ = context__.vals_r("X_rv_p"); current_statement__ = 9; pos__ = 1; current_statement__ = 9; @@ -19031,19 +18850,16 @@ class param_constraint_model final : public model_base_crtp>, jacobian__>( - lp__, nt, 2), "assigning variable L_Omega"); + L_Omega = in__.template read_constrain_cholesky_factor_corr>, jacobian__>( + lp__, nt, 2); Eigen::Matrix z1; z1 = Eigen::Matrix(NS); stan::math::fill(z1, DUMMY_VAR__); current_statement__ = 2; - assign(z1, - in__.template read_constrain_lb, jacobian__>( - rvalue(L_Omega, "L_Omega", - index_uni(1), index_uni(1), index_uni(2)), lp__, NS), - "assigning variable z1"); + z1 = in__.template read_constrain_lb, jacobian__>( + rvalue(L_Omega, "L_Omega", + index_uni(1), index_uni(1), index_uni(2)), lp__, NS); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); // Next line prevents compiler griping about no return @@ -19081,19 +18897,16 @@ class param_constraint_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 1; - assign(L_Omega, - in__.template read_constrain_cholesky_factor_corr>, jacobian__>( - lp__, nt, 2), "assigning variable L_Omega"); + L_Omega = in__.template read_constrain_cholesky_factor_corr>, jacobian__>( + lp__, nt, 2); Eigen::Matrix z1; z1 = Eigen::Matrix(NS); stan::math::fill(z1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(z1, - in__.template read_constrain_lb, jacobian__>( - rvalue(L_Omega, "L_Omega", - index_uni(1), index_uni(1), index_uni(2)), lp__, NS), - "assigning variable z1"); + z1 = in__.template read_constrain_lb, jacobian__>( + rvalue(L_Omega, "L_Omega", + index_uni(1), index_uni(1), index_uni(2)), lp__, NS); for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { for (int sym2__ = 1; sym2__ <= 2; ++sym2__) { for (int sym3__ = 1; sym3__ <= nt; ++sym3__) { @@ -19139,8 +18952,7 @@ class param_constraint_model final : public model_base_crtp L_Omega_flat__; current_statement__ = 1; - assign(L_Omega_flat__, context__.vals_r("L_Omega"), - "assigning variable L_Omega_flat__"); + L_Omega_flat__ = context__.vals_r("L_Omega"); current_statement__ = 1; pos__ = 1; current_statement__ = 1; @@ -19175,8 +18987,7 @@ class param_constraint_model final : public model_base_crtp z1_flat__; current_statement__ = 2; - assign(z1_flat__, context__.vals_r("z1"), - "assigning variable z1_flat__"); + z1_flat__ = context__.vals_r("z1"); current_statement__ = 2; pos__ = 1; current_statement__ = 2; @@ -19660,20 +19471,17 @@ class reduce_sum_m1_model final : public model_base_crtp { y1 = std::vector(N, DUMMY_VAR__); current_statement__ = 1; - assign(y1, in__.template read>(N), - "assigning variable y1"); + y1 = in__.template read>(N); std::vector y2; y2 = std::vector(N, DUMMY_VAR__); current_statement__ = 2; - assign(y2, in__.template read>(N), - "assigning variable y2"); + y2 = in__.template read>(N); std::vector y3; y3 = std::vector(N, DUMMY_VAR__); current_statement__ = 3; - assign(y3, in__.template read>(N), - "assigning variable y3"); + y3 = in__.template read>(N); { current_statement__ = 4; lp_accum__.add(reduce_sum(y1, 1, pstream__)); @@ -19722,20 +19530,17 @@ class reduce_sum_m1_model final : public model_base_crtp { y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(y1, in__.template read>(N), - "assigning variable y1"); + y1 = in__.template read>(N); std::vector y2; y2 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(y2, in__.template read>(N), - "assigning variable y2"); + y2 = in__.template read>(N); std::vector y3; y3 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(y3, in__.template read>(N), - "assigning variable y3"); + y3 = in__.template read>(N); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { vars__.emplace_back(y1[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= N; ++sym1__) { @@ -19776,17 +19581,17 @@ class reduce_sum_m1_model final : public model_base_crtp { y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(y1, context__.vals_r("y1"), "assigning variable y1"); + y1 = context__.vals_r("y1"); std::vector y2; y2 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(y2, context__.vals_r("y2"), "assigning variable y2"); + y2 = context__.vals_r("y2"); std::vector y3; y3 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(y3, context__.vals_r("y3"), "assigning variable y3"); + y3 = context__.vals_r("y3"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { vars__.emplace_back(y1[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= N; ++sym1__) { @@ -21261,123 +21066,107 @@ class reduce_sum_m2_model final : public model_base_crtp { stan::math::fill(a8, DUMMY_VAR__); current_statement__ = 1; - assign(a8, - in__.template read>>>( - N, N, N, N), "assigning variable a8"); + a8 = in__.template read>>>( + N, N, N, N); std::vector>> a7; a7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a7, DUMMY_VAR__); current_statement__ = 2; - assign(a7, - in__.template read>>>( - N, N, N), "assigning variable a7"); + a7 = in__.template read>>>( + N, N, N); std::vector>> a6; a6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a6, DUMMY_VAR__); current_statement__ = 3; - assign(a6, - in__.template read>>>( - N, N, N), "assigning variable a6"); + a6 = in__.template read>>>( + N, N, N); std::vector> a5; a5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 4; - assign(a5, - in__.template read>>(N, N), - "assigning variable a5"); + a5 = in__.template read>>(N, + N); std::vector> a4; a4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(a4, DUMMY_VAR__); current_statement__ = 5; - assign(a4, - in__.template read>>( - N, N, N), "assigning variable a4"); + a4 = in__.template read>>( + N, N, N); std::vector> a3; a3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a3, DUMMY_VAR__); current_statement__ = 6; - assign(a3, - in__.template read>>( - N, N), "assigning variable a3"); + a3 = in__.template read>>( + N, N); std::vector> a2; a2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a2, DUMMY_VAR__); current_statement__ = 7; - assign(a2, - in__.template read>>( - N, N), "assigning variable a2"); + a2 = in__.template read>>( + N, N); std::vector a1; a1 = std::vector(N, DUMMY_VAR__); current_statement__ = 8; - assign(a1, in__.template read>(N), - "assigning variable a1"); + a1 = in__.template read>(N); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, DUMMY_VAR__); current_statement__ = 9; - assign(y8, - in__.template read>>>( - N, N, N, N), "assigning variable y8"); + y8 = in__.template read>>>( + N, N, N, N); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, DUMMY_VAR__); current_statement__ = 10; - assign(y7, - in__.template read>>>( - N, N, N), "assigning variable y7"); + y7 = in__.template read>>>( + N, N, N); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, DUMMY_VAR__); current_statement__ = 11; - assign(y6, - in__.template read>>>( - N, N, N), "assigning variable y6"); + y6 = in__.template read>>>( + N, N, N); std::vector> y5; y5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 12; - assign(y5, - in__.template read>>(N, N), - "assigning variable y5"); + y5 = in__.template read>>(N, + N); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, DUMMY_VAR__); current_statement__ = 13; - assign(y4, - in__.template read>>( - N, N, N), "assigning variable y4"); + y4 = in__.template read>>( + N, N, N); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, DUMMY_VAR__); current_statement__ = 14; - assign(y3, - in__.template read>>( - N, N), "assigning variable y3"); + y3 = in__.template read>>( + N, N); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, DUMMY_VAR__); current_statement__ = 15; - assign(y2, - in__.template read>>( - N, N), "assigning variable y2"); + y2 = in__.template read>>( + N, N); std::vector y1; y1 = std::vector(N, DUMMY_VAR__); current_statement__ = 16; - assign(y1, in__.template read>(N), - "assigning variable y1"); + y1 = in__.template read>(N); { current_statement__ = 17; lp_accum__.add(reduce_sum(x, 1, pstream__, a8)); @@ -21449,123 +21238,107 @@ class reduce_sum_m2_model final : public model_base_crtp { stan::math::fill(a8, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(a8, - in__.template read>>>( - N, N, N, N), "assigning variable a8"); + a8 = in__.template read>>>( + N, N, N, N); std::vector>> a7; a7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a7, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(a7, - in__.template read>>>( - N, N, N), "assigning variable a7"); + a7 = in__.template read>>>( + N, N, N); std::vector>> a6; a6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(a6, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(a6, - in__.template read>>>( - N, N, N), "assigning variable a6"); + a6 = in__.template read>>>( + N, N, N); std::vector> a5; a5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 4; - assign(a5, - in__.template read>>(N, N), - "assigning variable a5"); + a5 = in__.template read>>(N, + N); std::vector> a4; a4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(a4, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(a4, - in__.template read>>( - N, N, N), "assigning variable a4"); + a4 = in__.template read>>( + N, N, N); std::vector> a3; a3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a3, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(a3, - in__.template read>>( - N, N), "assigning variable a3"); + a3 = in__.template read>>( + N, N); std::vector> a2; a2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(a2, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - assign(a2, - in__.template read>>( - N, N), "assigning variable a2"); + a2 = in__.template read>>( + N, N); std::vector a1; a1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - assign(a1, in__.template read>(N), - "assigning variable a1"); + a1 = in__.template read>(N); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, std::numeric_limits::quiet_NaN()); current_statement__ = 9; - assign(y8, - in__.template read>>>( - N, N, N, N), "assigning variable y8"); + y8 = in__.template read>>>( + N, N, N, N); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, std::numeric_limits::quiet_NaN()); current_statement__ = 10; - assign(y7, - in__.template read>>>( - N, N, N), "assigning variable y7"); + y7 = in__.template read>>>( + N, N, N); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, std::numeric_limits::quiet_NaN()); current_statement__ = 11; - assign(y6, - in__.template read>>>( - N, N, N), "assigning variable y6"); + y6 = in__.template read>>>( + N, N, N); std::vector> y5; y5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 12; - assign(y5, - in__.template read>>(N, N), - "assigning variable y5"); + y5 = in__.template read>>(N, + N); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, std::numeric_limits::quiet_NaN()); current_statement__ = 13; - assign(y4, - in__.template read>>( - N, N, N), "assigning variable y4"); + y4 = in__.template read>>( + N, N, N); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, std::numeric_limits::quiet_NaN()); current_statement__ = 14; - assign(y3, - in__.template read>>( - N, N), "assigning variable y3"); + y3 = in__.template read>>( + N, N); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, std::numeric_limits::quiet_NaN()); current_statement__ = 15; - assign(y2, - in__.template read>>( - N, N), "assigning variable y2"); + y2 = in__.template read>>( + N, N); std::vector y1; y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 16; - assign(y1, in__.template read>(N), - "assigning variable y1"); + y1 = in__.template read>(N); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { for (int sym2__ = 1; sym2__ <= N; ++sym2__) { for (int sym3__ = 1; sym3__ <= N; ++sym3__) { @@ -21673,8 +21446,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector a8_flat__; current_statement__ = 1; - assign(a8_flat__, context__.vals_r("a8"), - "assigning variable a8_flat__"); + a8_flat__ = context__.vals_r("a8"); current_statement__ = 1; pos__ = 1; current_statement__ = 1; @@ -21701,8 +21473,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector a7_flat__; current_statement__ = 2; - assign(a7_flat__, context__.vals_r("a7"), - "assigning variable a7_flat__"); + a7_flat__ = context__.vals_r("a7"); current_statement__ = 2; pos__ = 1; current_statement__ = 2; @@ -21726,8 +21497,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector a6_flat__; current_statement__ = 3; - assign(a6_flat__, context__.vals_r("a6"), - "assigning variable a6_flat__"); + a6_flat__ = context__.vals_r("a6"); current_statement__ = 3; pos__ = 1; current_statement__ = 3; @@ -21750,8 +21520,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector a5_flat__; current_statement__ = 4; - assign(a5_flat__, context__.vals_r("a5"), - "assigning variable a5_flat__"); + a5_flat__ = context__.vals_r("a5"); current_statement__ = 4; pos__ = 1; current_statement__ = 4; @@ -21771,8 +21540,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector a4_flat__; current_statement__ = 5; - assign(a4_flat__, context__.vals_r("a4"), - "assigning variable a4_flat__"); + a4_flat__ = context__.vals_r("a4"); current_statement__ = 5; pos__ = 1; current_statement__ = 5; @@ -21796,8 +21564,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector a3_flat__; current_statement__ = 6; - assign(a3_flat__, context__.vals_r("a3"), - "assigning variable a3_flat__"); + a3_flat__ = context__.vals_r("a3"); current_statement__ = 6; pos__ = 1; current_statement__ = 6; @@ -21817,8 +21584,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector a2_flat__; current_statement__ = 7; - assign(a2_flat__, context__.vals_r("a2"), - "assigning variable a2_flat__"); + a2_flat__ = context__.vals_r("a2"); current_statement__ = 7; pos__ = 1; current_statement__ = 7; @@ -21835,7 +21601,7 @@ class reduce_sum_m2_model final : public model_base_crtp { a1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - assign(a1, context__.vals_r("a1"), "assigning variable a1"); + a1 = context__.vals_r("a1"); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, std::numeric_limits::quiet_NaN()); @@ -21843,8 +21609,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector y8_flat__; current_statement__ = 9; - assign(y8_flat__, context__.vals_r("y8"), - "assigning variable y8_flat__"); + y8_flat__ = context__.vals_r("y8"); current_statement__ = 9; pos__ = 1; current_statement__ = 9; @@ -21871,8 +21636,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector y7_flat__; current_statement__ = 10; - assign(y7_flat__, context__.vals_r("y7"), - "assigning variable y7_flat__"); + y7_flat__ = context__.vals_r("y7"); current_statement__ = 10; pos__ = 1; current_statement__ = 10; @@ -21896,8 +21660,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector y6_flat__; current_statement__ = 11; - assign(y6_flat__, context__.vals_r("y6"), - "assigning variable y6_flat__"); + y6_flat__ = context__.vals_r("y6"); current_statement__ = 11; pos__ = 1; current_statement__ = 11; @@ -21920,8 +21683,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector y5_flat__; current_statement__ = 12; - assign(y5_flat__, context__.vals_r("y5"), - "assigning variable y5_flat__"); + y5_flat__ = context__.vals_r("y5"); current_statement__ = 12; pos__ = 1; current_statement__ = 12; @@ -21941,8 +21703,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector y4_flat__; current_statement__ = 13; - assign(y4_flat__, context__.vals_r("y4"), - "assigning variable y4_flat__"); + y4_flat__ = context__.vals_r("y4"); current_statement__ = 13; pos__ = 1; current_statement__ = 13; @@ -21966,8 +21727,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector y3_flat__; current_statement__ = 14; - assign(y3_flat__, context__.vals_r("y3"), - "assigning variable y3_flat__"); + y3_flat__ = context__.vals_r("y3"); current_statement__ = 14; pos__ = 1; current_statement__ = 14; @@ -21987,8 +21747,7 @@ class reduce_sum_m2_model final : public model_base_crtp { { std::vector y2_flat__; current_statement__ = 15; - assign(y2_flat__, context__.vals_r("y2"), - "assigning variable y2_flat__"); + y2_flat__ = context__.vals_r("y2"); current_statement__ = 15; pos__ = 1; current_statement__ = 15; @@ -22005,7 +21764,7 @@ class reduce_sum_m2_model final : public model_base_crtp { y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 16; - assign(y1, context__.vals_r("y1"), "assigning variable y1"); + y1 = context__.vals_r("y1"); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { for (int sym2__ = 1; sym2__ <= N; ++sym2__) { for (int sym3__ = 1; sym3__ <= N; ++sym3__) { @@ -24657,7 +24416,7 @@ class reduce_sum_m3_model final : public model_base_crtp { y1d = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 69; - assign(y1d, context__.vals_r("y1d"), "assigning variable y1d"); + y1d = context__.vals_r("y1d"); current_statement__ = 70; validate_non_negative_index("y2d", "N", N); current_statement__ = 71; @@ -24671,8 +24430,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y2d_flat__; current_statement__ = 72; - assign(y2d_flat__, context__.vals_r("y2d"), - "assigning variable y2d_flat__"); + y2d_flat__ = context__.vals_r("y2d"); current_statement__ = 72; pos__ = 1; current_statement__ = 72; @@ -24698,8 +24456,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y3d_flat__; current_statement__ = 75; - assign(y3d_flat__, context__.vals_r("y3d"), - "assigning variable y3d_flat__"); + y3d_flat__ = context__.vals_r("y3d"); current_statement__ = 75; pos__ = 1; current_statement__ = 75; @@ -24727,8 +24484,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y4d_flat__; current_statement__ = 79; - assign(y4d_flat__, context__.vals_r("y4d"), - "assigning variable y4d_flat__"); + y4d_flat__ = context__.vals_r("y4d"); current_statement__ = 79; pos__ = 1; current_statement__ = 79; @@ -24757,8 +24513,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y5d_flat__; current_statement__ = 82; - assign(y5d_flat__, context__.vals_r("y5d"), - "assigning variable y5d_flat__"); + y5d_flat__ = context__.vals_r("y5d"); current_statement__ = 82; pos__ = 1; current_statement__ = 82; @@ -24786,8 +24541,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y6d_flat__; current_statement__ = 86; - assign(y6d_flat__, context__.vals_r("y6d"), - "assigning variable y6d_flat__"); + y6d_flat__ = context__.vals_r("y6d"); current_statement__ = 86; pos__ = 1; current_statement__ = 86; @@ -24819,8 +24573,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y7d_flat__; current_statement__ = 90; - assign(y7d_flat__, context__.vals_r("y7d"), - "assigning variable y7d_flat__"); + y7d_flat__ = context__.vals_r("y7d"); current_statement__ = 90; pos__ = 1; current_statement__ = 90; @@ -24854,8 +24607,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y8d_flat__; current_statement__ = 95; - assign(y8d_flat__, context__.vals_r("y8d"), - "assigning variable y8d_flat__"); + y8d_flat__ = context__.vals_r("y8d"); current_statement__ = 95; pos__ = 1; current_statement__ = 95; @@ -24893,8 +24645,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y10d_flat__; current_statement__ = 98; - assign(y10d_flat__, context__.vals_r("y10d"), - "assigning variable y10d_flat__"); + y10d_flat__ = context__.vals_r("y10d"); current_statement__ = 98; pos__ = 1; current_statement__ = 98; @@ -24916,8 +24667,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y11d_flat__; current_statement__ = 100; - assign(y11d_flat__, context__.vals_r("y11d"), - "assigning variable y11d_flat__"); + y11d_flat__ = context__.vals_r("y11d"); current_statement__ = 100; pos__ = 1; current_statement__ = 100; @@ -24941,8 +24691,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y12d_flat__; current_statement__ = 103; - assign(y12d_flat__, context__.vals_r("y12d"), - "assigning variable y12d_flat__"); + y12d_flat__ = context__.vals_r("y12d"); current_statement__ = 103; pos__ = 1; current_statement__ = 103; @@ -24970,7 +24719,7 @@ class reduce_sum_m3_model final : public model_base_crtp { y14d = std::vector(N, std::numeric_limits::min()); current_statement__ = 106; - assign(y14d, context__.vals_i("y14d"), "assigning variable y14d"); + y14d = context__.vals_i("y14d"); current_statement__ = 107; validate_non_negative_index("y15d", "N", N); current_statement__ = 108; @@ -24983,8 +24732,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y15d_flat__; current_statement__ = 109; - assign(y15d_flat__, context__.vals_i("y15d"), - "assigning variable y15d_flat__"); + y15d_flat__ = context__.vals_i("y15d"); current_statement__ = 109; pos__ = 1; current_statement__ = 109; @@ -25011,8 +24759,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y16d_flat__; current_statement__ = 113; - assign(y16d_flat__, context__.vals_i("y16d"), - "assigning variable y16d_flat__"); + y16d_flat__ = context__.vals_i("y16d"); current_statement__ = 113; pos__ = 1; current_statement__ = 113; @@ -25043,8 +24790,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y17d_flat__; current_statement__ = 117; - assign(y17d_flat__, context__.vals_r("y17d"), - "assigning variable y17d_flat__"); + y17d_flat__ = context__.vals_r("y17d"); current_statement__ = 117; pos__ = 1; current_statement__ = 117; @@ -25298,63 +25044,55 @@ class reduce_sum_m3_model final : public model_base_crtp { y1 = std::vector(N, DUMMY_VAR__); current_statement__ = 1; - assign(y1, in__.template read>(N), - "assigning variable y1"); + y1 = in__.template read>(N); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, DUMMY_VAR__); current_statement__ = 2; - assign(y2, - in__.template read>>( - N, N), "assigning variable y2"); + y2 = in__.template read>>( + N, N); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, DUMMY_VAR__); current_statement__ = 3; - assign(y3, - in__.template read>>( - N, N), "assigning variable y3"); + y3 = in__.template read>>( + N, N); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, DUMMY_VAR__); current_statement__ = 4; - assign(y4, - in__.template read>>( - N, N, N), "assigning variable y4"); + y4 = in__.template read>>( + N, N, N); std::vector> y5; y5 = std::vector>(N, std::vector(N, DUMMY_VAR__)); current_statement__ = 5; - assign(y5, - in__.template read>>(N, N), - "assigning variable y5"); + y5 = in__.template read>>(N, + N); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, DUMMY_VAR__); current_statement__ = 6; - assign(y6, - in__.template read>>>( - N, N, N), "assigning variable y6"); + y6 = in__.template read>>>( + N, N, N); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, DUMMY_VAR__); current_statement__ = 7; - assign(y7, - in__.template read>>>( - N, N, N), "assigning variable y7"); + y7 = in__.template read>>>( + N, N, N); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, DUMMY_VAR__); current_statement__ = 8; - assign(y8, - in__.template read>>>( - N, N, N, N), "assigning variable y8"); + y8 = in__.template read>>>( + N, N, N, N); local_scalar_t__ y9; y9 = DUMMY_VAR__; @@ -25365,32 +25103,25 @@ class reduce_sum_m3_model final : public model_base_crtp { stan::math::fill(y10, DUMMY_VAR__); current_statement__ = 10; - assign(y10, - in__.template read>(N), - "assigning variable y10"); + y10 = in__.template read>(N); Eigen::Matrix y11; y11 = Eigen::Matrix(N); stan::math::fill(y11, DUMMY_VAR__); current_statement__ = 11; - assign(y11, - in__.template read>(N), - "assigning variable y11"); + y11 = in__.template read>(N); Eigen::Matrix y12; y12 = Eigen::Matrix(N, N); stan::math::fill(y12, DUMMY_VAR__); current_statement__ = 12; - assign(y12, - in__.template read>(N, N), - "assigning variable y12"); + y12 = in__.template read>(N, N); std::vector>> y17; y17 = std::vector>>(N, std::vector>(N, std::vector(N, DUMMY_VAR__))); current_statement__ = 13; - assign(y17, - in__.template read>>>( - N, N, N), "assigning variable y17"); + y17 = in__.template read>>>( + N, N, N); { local_scalar_t__ t1; t1 = DUMMY_VAR__; @@ -25566,63 +25297,55 @@ class reduce_sum_m3_model final : public model_base_crtp { y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(y1, in__.template read>(N), - "assigning variable y1"); + y1 = in__.template read>(N); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(y2, - in__.template read>>( - N, N), "assigning variable y2"); + y2 = in__.template read>>( + N, N); std::vector> y3; y3 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y3, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(y3, - in__.template read>>( - N, N), "assigning variable y3"); + y3 = in__.template read>>( + N, N); std::vector> y4; y4 = std::vector>(N, Eigen::Matrix(N, N)); stan::math::fill(y4, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(y4, - in__.template read>>( - N, N, N), "assigning variable y4"); + y4 = in__.template read>>( + N, N, N); std::vector> y5; y5 = std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN())); current_statement__ = 5; - assign(y5, - in__.template read>>(N, N), - "assigning variable y5"); + y5 = in__.template read>>(N, + N); std::vector>> y6; y6 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y6, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(y6, - in__.template read>>>( - N, N, N), "assigning variable y6"); + y6 = in__.template read>>>( + N, N, N); std::vector>> y7; y7 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N))); stan::math::fill(y7, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - assign(y7, - in__.template read>>>( - N, N, N), "assigning variable y7"); + y7 = in__.template read>>>( + N, N, N); std::vector>> y8; y8 = std::vector>>(N, std::vector>(N, Eigen::Matrix(N, N))); stan::math::fill(y8, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - assign(y8, - in__.template read>>>( - N, N, N, N), "assigning variable y8"); + y8 = in__.template read>>>( + N, N, N, N); double y9; y9 = std::numeric_limits::quiet_NaN(); @@ -25633,32 +25356,25 @@ class reduce_sum_m3_model final : public model_base_crtp { stan::math::fill(y10, std::numeric_limits::quiet_NaN()); current_statement__ = 10; - assign(y10, - in__.template read>(N), - "assigning variable y10"); + y10 = in__.template read>(N); Eigen::Matrix y11; y11 = Eigen::Matrix(N); stan::math::fill(y11, std::numeric_limits::quiet_NaN()); current_statement__ = 11; - assign(y11, - in__.template read>(N), - "assigning variable y11"); + y11 = in__.template read>(N); Eigen::Matrix y12; y12 = Eigen::Matrix(N, N); stan::math::fill(y12, std::numeric_limits::quiet_NaN()); current_statement__ = 12; - assign(y12, - in__.template read>(N, N), - "assigning variable y12"); + y12 = in__.template read>(N, N); std::vector>> y17; y17 = std::vector>>(N, std::vector>(N, std::vector(N, std::numeric_limits::quiet_NaN()))); current_statement__ = 13; - assign(y17, - in__.template read>>>( - N, N, N), "assigning variable y17"); + y17 = in__.template read>>>( + N, N, N); for (int sym1__ = 1; sym1__ <= N; ++sym1__) { vars__.emplace_back(y1[(sym1__ - 1)]);} for (int sym1__ = 1; sym1__ <= N; ++sym1__) { @@ -25901,7 +25617,7 @@ class reduce_sum_m3_model final : public model_base_crtp { y1 = std::vector(N, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(y1, context__.vals_r("y1"), "assigning variable y1"); + y1 = context__.vals_r("y1"); std::vector> y2; y2 = std::vector>(N, Eigen::Matrix(N)); stan::math::fill(y2, std::numeric_limits::quiet_NaN()); @@ -25909,8 +25625,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y2_flat__; current_statement__ = 2; - assign(y2_flat__, context__.vals_r("y2"), - "assigning variable y2_flat__"); + y2_flat__ = context__.vals_r("y2"); current_statement__ = 2; pos__ = 1; current_statement__ = 2; @@ -25930,8 +25645,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y3_flat__; current_statement__ = 3; - assign(y3_flat__, context__.vals_r("y3"), - "assigning variable y3_flat__"); + y3_flat__ = context__.vals_r("y3"); current_statement__ = 3; pos__ = 1; current_statement__ = 3; @@ -25951,8 +25665,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y4_flat__; current_statement__ = 4; - assign(y4_flat__, context__.vals_r("y4"), - "assigning variable y4_flat__"); + y4_flat__ = context__.vals_r("y4"); current_statement__ = 4; pos__ = 1; current_statement__ = 4; @@ -25975,8 +25688,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y5_flat__; current_statement__ = 5; - assign(y5_flat__, context__.vals_r("y5"), - "assigning variable y5_flat__"); + y5_flat__ = context__.vals_r("y5"); current_statement__ = 5; pos__ = 1; current_statement__ = 5; @@ -25996,8 +25708,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y6_flat__; current_statement__ = 6; - assign(y6_flat__, context__.vals_r("y6"), - "assigning variable y6_flat__"); + y6_flat__ = context__.vals_r("y6"); current_statement__ = 6; pos__ = 1; current_statement__ = 6; @@ -26021,8 +25732,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y7_flat__; current_statement__ = 7; - assign(y7_flat__, context__.vals_r("y7"), - "assigning variable y7_flat__"); + y7_flat__ = context__.vals_r("y7"); current_statement__ = 7; pos__ = 1; current_statement__ = 7; @@ -26046,8 +25756,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y8_flat__; current_statement__ = 8; - assign(y8_flat__, context__.vals_r("y8"), - "assigning variable y8_flat__"); + y8_flat__ = context__.vals_r("y8"); current_statement__ = 8; pos__ = 1; current_statement__ = 8; @@ -26079,8 +25788,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y10_flat__; current_statement__ = 10; - assign(y10_flat__, context__.vals_r("y10"), - "assigning variable y10_flat__"); + y10_flat__ = context__.vals_r("y10"); current_statement__ = 10; pos__ = 1; current_statement__ = 10; @@ -26098,8 +25806,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y11_flat__; current_statement__ = 11; - assign(y11_flat__, context__.vals_r("y11"), - "assigning variable y11_flat__"); + y11_flat__ = context__.vals_r("y11"); current_statement__ = 11; pos__ = 1; current_statement__ = 11; @@ -26117,8 +25824,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y12_flat__; current_statement__ = 12; - assign(y12_flat__, context__.vals_r("y12"), - "assigning variable y12_flat__"); + y12_flat__ = context__.vals_r("y12"); current_statement__ = 12; pos__ = 1; current_statement__ = 12; @@ -26137,8 +25843,7 @@ class reduce_sum_m3_model final : public model_base_crtp { { std::vector y17_flat__; current_statement__ = 13; - assign(y17_flat__, context__.vals_r("y17"), - "assigning variable y17_flat__"); + y17_flat__ = context__.vals_r("y17"); current_statement__ = 13; pos__ = 1; current_statement__ = 13; @@ -27791,8 +27496,7 @@ class transform_model final : public model_base_crtp { { std::vector ds_flat__; current_statement__ = 43; - assign(ds_flat__, context__.vals_r("ds"), - "assigning variable ds_flat__"); + ds_flat__ = context__.vals_r("ds"); current_statement__ = 43; pos__ = 1; current_statement__ = 43; @@ -27824,8 +27528,7 @@ class transform_model final : public model_base_crtp { { std::vector dv_flat__; current_statement__ = 47; - assign(dv_flat__, context__.vals_r("dv"), - "assigning variable dv_flat__"); + dv_flat__ = context__.vals_r("dv"); current_statement__ = 47; pos__ = 1; current_statement__ = 47; @@ -27857,8 +27560,7 @@ class transform_model final : public model_base_crtp { { std::vector dr_flat__; current_statement__ = 51; - assign(dr_flat__, context__.vals_r("dr"), - "assigning variable dr_flat__"); + dr_flat__ = context__.vals_r("dr"); current_statement__ = 51; pos__ = 1; current_statement__ = 51; @@ -27890,8 +27592,7 @@ class transform_model final : public model_base_crtp { { std::vector dm_flat__; current_statement__ = 55; - assign(dm_flat__, context__.vals_r("dm"), - "assigning variable dm_flat__"); + dm_flat__ = context__.vals_r("dm"); current_statement__ = 55; pos__ = 1; current_statement__ = 55; @@ -28083,10 +27784,8 @@ class transform_model final : public model_base_crtp { p_1 = std::vector(k, DUMMY_VAR__); current_statement__ = 1; - assign(p_1, - in__.template read_constrain_lb, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), - "assigning variable p_1"); + p_1 = in__.template read_constrain_lb, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k); current_statement__ = 1; check_matching_dims("constraint", "p_1", p_1, "lower", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28094,10 +27793,8 @@ class transform_model final : public model_base_crtp { p_2 = std::vector(k, DUMMY_VAR__); current_statement__ = 2; - assign(p_2, - in__.template read_constrain_ub, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), - "assigning variable p_2"); + p_2 = in__.template read_constrain_ub, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k); current_statement__ = 2; check_matching_dims("constraint", "p_2", p_2, "upper", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28105,11 +27802,9 @@ class transform_model final : public model_base_crtp { p_3 = std::vector(k, DUMMY_VAR__); current_statement__ = 3; - assign(p_3, - in__.template read_constrain_lub, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), - rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), - "assigning variable p_3"); + p_3 = in__.template read_constrain_lub, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), + rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k); current_statement__ = 3; check_matching_dims("constraint", "p_3", p_3, "lower", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28120,10 +27815,8 @@ class transform_model final : public model_base_crtp { p_4 = std::vector(k, DUMMY_VAR__); current_statement__ = 4; - assign(p_4, - in__.template read_constrain_lub, jacobian__>( - 0, rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), - "assigning variable p_4"); + p_4 = in__.template read_constrain_lub, jacobian__>( + 0, rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k); current_statement__ = 4; check_matching_dims("constraint", "p_4", p_4, "upper", rvalue(ds, "ds", index_uni(1), index_uni(2))); @@ -28131,10 +27824,8 @@ class transform_model final : public model_base_crtp { p_5 = std::vector(k, DUMMY_VAR__); current_statement__ = 5; - assign(p_5, - in__.template read_constrain_lub, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), - "assigning variable p_5"); + p_5 = in__.template read_constrain_lub, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k); current_statement__ = 5; check_matching_dims("constraint", "p_5", p_5, "lower", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28142,10 +27833,8 @@ class transform_model final : public model_base_crtp { p_6 = std::vector(k, DUMMY_VAR__); current_statement__ = 6; - assign(p_6, - in__.template read_constrain_offset_multiplier, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), - "assigning variable p_6"); + p_6 = in__.template read_constrain_offset_multiplier, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k); current_statement__ = 6; check_matching_dims("constraint", "p_6", p_6, "offset", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28153,10 +27842,8 @@ class transform_model final : public model_base_crtp { p_7 = std::vector(k, DUMMY_VAR__); current_statement__ = 7; - assign(p_7, - in__.template read_constrain_offset_multiplier, jacobian__>( - 0, rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), - "assigning variable p_7"); + p_7 = in__.template read_constrain_offset_multiplier, jacobian__>( + 0, rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k); current_statement__ = 7; check_matching_dims("constraint", "p_7", p_7, "multiplier", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28164,11 +27851,9 @@ class transform_model final : public model_base_crtp { p_8 = std::vector(k, DUMMY_VAR__); current_statement__ = 8; - assign(p_8, - in__.template read_constrain_offset_multiplier, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), - rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), - "assigning variable p_8"); + p_8 = in__.template read_constrain_offset_multiplier, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), + rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k); current_statement__ = 8; check_matching_dims("constraint", "p_8", p_8, "offset", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28179,10 +27864,8 @@ class transform_model final : public model_base_crtp { p_9 = std::vector>(m, std::vector(k, DUMMY_VAR__)); current_statement__ = 9; - assign(p_9, - in__.template read_constrain_lub>, jacobian__>( - rvalue(ds, "ds", index_uni(1)), 1, lp__, m, k), - "assigning variable p_9"); + p_9 = in__.template read_constrain_lub>, jacobian__>( + rvalue(ds, "ds", index_uni(1)), 1, lp__, m, k); current_statement__ = 9; check_matching_dims("constraint", "p_9", p_9, "lower", rvalue(ds, "ds", index_uni(1))); @@ -28190,9 +27873,8 @@ class transform_model final : public model_base_crtp { p_10 = std::vector>>(n, std::vector>(m, std::vector(k, DUMMY_VAR__))); current_statement__ = 10; - assign(p_10, - in__.template read_constrain_lub>>, jacobian__>( - 0, ds, lp__, n, m, k), "assigning variable p_10"); + p_10 = in__.template read_constrain_lub>>, jacobian__>( + 0, ds, lp__, n, m, k); current_statement__ = 10; check_matching_dims("constraint", "p_10", p_10, "upper", ds); Eigen::Matrix pv_1; @@ -28200,11 +27882,9 @@ class transform_model final : public model_base_crtp { stan::math::fill(pv_1, DUMMY_VAR__); current_statement__ = 11; - assign(pv_1, - in__.template read_constrain_lub, jacobian__>( - rvalue(dv, "dv", index_uni(1), index_uni(1)), - rvalue(dv, "dv", index_uni(1), index_uni(2)), lp__, k), - "assigning variable pv_1"); + pv_1 = in__.template read_constrain_lub, jacobian__>( + rvalue(dv, "dv", index_uni(1), index_uni(1)), + rvalue(dv, "dv", index_uni(1), index_uni(2)), lp__, k); current_statement__ = 11; check_matching_dims("constraint", "pv_1", pv_1, "lower", rvalue(dv, "dv", index_uni(1), index_uni(1))); @@ -28216,10 +27896,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pv_2, DUMMY_VAR__); current_statement__ = 12; - assign(pv_2, - in__.template read_constrain_lb>, jacobian__>( - rvalue(dv, "dv", index_uni(1)), lp__, m, k), - "assigning variable pv_2"); + pv_2 = in__.template read_constrain_lb>, jacobian__>( + rvalue(dv, "dv", index_uni(1)), lp__, m, k); current_statement__ = 12; check_matching_dims("constraint", "pv_2", pv_2, "lower", rvalue(dv, "dv", index_uni(1))); @@ -28228,9 +27906,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pv_3, DUMMY_VAR__); current_statement__ = 13; - assign(pv_3, - in__.template read_constrain_ub>>, jacobian__>( - dv, lp__, n, m, k), "assigning variable pv_3"); + pv_3 = in__.template read_constrain_ub>>, jacobian__>( + dv, lp__, n, m, k); current_statement__ = 13; check_matching_dims("constraint", "pv_3", pv_3, "upper", dv); Eigen::Matrix pr_1; @@ -28238,11 +27915,9 @@ class transform_model final : public model_base_crtp { stan::math::fill(pr_1, DUMMY_VAR__); current_statement__ = 14; - assign(pr_1, - in__.template read_constrain_lub, jacobian__>( - rvalue(dr, "dr", index_uni(1), index_uni(1)), - rvalue(dr, "dr", index_uni(1), index_uni(2)), lp__, k), - "assigning variable pr_1"); + pr_1 = in__.template read_constrain_lub, jacobian__>( + rvalue(dr, "dr", index_uni(1), index_uni(1)), + rvalue(dr, "dr", index_uni(1), index_uni(2)), lp__, k); current_statement__ = 14; check_matching_dims("constraint", "pr_1", pr_1, "lower", rvalue(dr, "dr", index_uni(1), index_uni(1))); @@ -28254,10 +27929,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pr_2, DUMMY_VAR__); current_statement__ = 15; - assign(pr_2, - in__.template read_constrain_lb>, jacobian__>( - rvalue(dr, "dr", index_uni(1)), lp__, m, k), - "assigning variable pr_2"); + pr_2 = in__.template read_constrain_lb>, jacobian__>( + rvalue(dr, "dr", index_uni(1)), lp__, m, k); current_statement__ = 15; check_matching_dims("constraint", "pr_2", pr_2, "lower", rvalue(dr, "dr", index_uni(1))); @@ -28266,9 +27939,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pr_3, DUMMY_VAR__); current_statement__ = 16; - assign(pr_3, - in__.template read_constrain_ub>>, jacobian__>( - dr, lp__, n, m, k), "assigning variable pr_3"); + pr_3 = in__.template read_constrain_ub>>, jacobian__>( + dr, lp__, n, m, k); current_statement__ = 16; check_matching_dims("constraint", "pr_3", pr_3, "upper", dr); Eigen::Matrix pm_1; @@ -28276,10 +27948,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pm_1, DUMMY_VAR__); current_statement__ = 17; - assign(pm_1, - in__.template read_constrain_lb, jacobian__>( - rvalue(dm, "dm", index_uni(1)), lp__, m, k), - "assigning variable pm_1"); + pm_1 = in__.template read_constrain_lb, jacobian__>( + rvalue(dm, "dm", index_uni(1)), lp__, m, k); current_statement__ = 17; check_matching_dims("constraint", "pm_1", pm_1, "lower", rvalue(dm, "dm", index_uni(1))); @@ -28288,9 +27958,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pm_2, DUMMY_VAR__); current_statement__ = 18; - assign(pm_2, - in__.template read_constrain_ub>, jacobian__>( - dm, lp__, n, m, k), "assigning variable pm_2"); + pm_2 = in__.template read_constrain_ub>, jacobian__>( + dm, lp__, n, m, k); current_statement__ = 18; check_matching_dims("constraint", "pm_2", pm_2, "upper", dm); std::vector tp_1; @@ -28692,10 +28361,8 @@ class transform_model final : public model_base_crtp { p_1 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(p_1, - in__.template read_constrain_lb, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), - "assigning variable p_1"); + p_1 = in__.template read_constrain_lb, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k); current_statement__ = 1; check_matching_dims("constraint", "p_1", p_1, "lower", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28703,10 +28370,8 @@ class transform_model final : public model_base_crtp { p_2 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(p_2, - in__.template read_constrain_ub, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), - "assigning variable p_2"); + p_2 = in__.template read_constrain_ub, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k); current_statement__ = 2; check_matching_dims("constraint", "p_2", p_2, "upper", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28714,11 +28379,9 @@ class transform_model final : public model_base_crtp { p_3 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(p_3, - in__.template read_constrain_lub, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), - rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), - "assigning variable p_3"); + p_3 = in__.template read_constrain_lub, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), + rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k); current_statement__ = 3; check_matching_dims("constraint", "p_3", p_3, "lower", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28729,10 +28392,8 @@ class transform_model final : public model_base_crtp { p_4 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(p_4, - in__.template read_constrain_lub, jacobian__>( - 0, rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), - "assigning variable p_4"); + p_4 = in__.template read_constrain_lub, jacobian__>( + 0, rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k); current_statement__ = 4; check_matching_dims("constraint", "p_4", p_4, "upper", rvalue(ds, "ds", index_uni(1), index_uni(2))); @@ -28740,10 +28401,8 @@ class transform_model final : public model_base_crtp { p_5 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(p_5, - in__.template read_constrain_lub, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), - "assigning variable p_5"); + p_5 = in__.template read_constrain_lub, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k); current_statement__ = 5; check_matching_dims("constraint", "p_5", p_5, "lower", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28751,10 +28410,8 @@ class transform_model final : public model_base_crtp { p_6 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(p_6, - in__.template read_constrain_offset_multiplier, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k), - "assigning variable p_6"); + p_6 = in__.template read_constrain_offset_multiplier, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), 1, lp__, k); current_statement__ = 6; check_matching_dims("constraint", "p_6", p_6, "offset", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28762,10 +28419,8 @@ class transform_model final : public model_base_crtp { p_7 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - assign(p_7, - in__.template read_constrain_offset_multiplier, jacobian__>( - 0, rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k), - "assigning variable p_7"); + p_7 = in__.template read_constrain_offset_multiplier, jacobian__>( + 0, rvalue(ds, "ds", index_uni(1), index_uni(1)), lp__, k); current_statement__ = 7; check_matching_dims("constraint", "p_7", p_7, "multiplier", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28773,11 +28428,9 @@ class transform_model final : public model_base_crtp { p_8 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - assign(p_8, - in__.template read_constrain_offset_multiplier, jacobian__>( - rvalue(ds, "ds", index_uni(1), index_uni(1)), - rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k), - "assigning variable p_8"); + p_8 = in__.template read_constrain_offset_multiplier, jacobian__>( + rvalue(ds, "ds", index_uni(1), index_uni(1)), + rvalue(ds, "ds", index_uni(1), index_uni(2)), lp__, k); current_statement__ = 8; check_matching_dims("constraint", "p_8", p_8, "offset", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -28788,10 +28441,8 @@ class transform_model final : public model_base_crtp { p_9 = std::vector>(m, std::vector(k, std::numeric_limits::quiet_NaN())); current_statement__ = 9; - assign(p_9, - in__.template read_constrain_lub>, jacobian__>( - rvalue(ds, "ds", index_uni(1)), 1, lp__, m, k), - "assigning variable p_9"); + p_9 = in__.template read_constrain_lub>, jacobian__>( + rvalue(ds, "ds", index_uni(1)), 1, lp__, m, k); current_statement__ = 9; check_matching_dims("constraint", "p_9", p_9, "lower", rvalue(ds, "ds", index_uni(1))); @@ -28799,9 +28450,8 @@ class transform_model final : public model_base_crtp { p_10 = std::vector>>(n, std::vector>(m, std::vector(k, std::numeric_limits::quiet_NaN()))); current_statement__ = 10; - assign(p_10, - in__.template read_constrain_lub>>, jacobian__>( - 0, ds, lp__, n, m, k), "assigning variable p_10"); + p_10 = in__.template read_constrain_lub>>, jacobian__>( + 0, ds, lp__, n, m, k); current_statement__ = 10; check_matching_dims("constraint", "p_10", p_10, "upper", ds); Eigen::Matrix pv_1; @@ -28809,11 +28459,9 @@ class transform_model final : public model_base_crtp { stan::math::fill(pv_1, std::numeric_limits::quiet_NaN()); current_statement__ = 11; - assign(pv_1, - in__.template read_constrain_lub, jacobian__>( - rvalue(dv, "dv", index_uni(1), index_uni(1)), - rvalue(dv, "dv", index_uni(1), index_uni(2)), lp__, k), - "assigning variable pv_1"); + pv_1 = in__.template read_constrain_lub, jacobian__>( + rvalue(dv, "dv", index_uni(1), index_uni(1)), + rvalue(dv, "dv", index_uni(1), index_uni(2)), lp__, k); current_statement__ = 11; check_matching_dims("constraint", "pv_1", pv_1, "lower", rvalue(dv, "dv", index_uni(1), index_uni(1))); @@ -28825,10 +28473,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pv_2, std::numeric_limits::quiet_NaN()); current_statement__ = 12; - assign(pv_2, - in__.template read_constrain_lb>, jacobian__>( - rvalue(dv, "dv", index_uni(1)), lp__, m, k), - "assigning variable pv_2"); + pv_2 = in__.template read_constrain_lb>, jacobian__>( + rvalue(dv, "dv", index_uni(1)), lp__, m, k); current_statement__ = 12; check_matching_dims("constraint", "pv_2", pv_2, "lower", rvalue(dv, "dv", index_uni(1))); @@ -28837,9 +28483,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pv_3, std::numeric_limits::quiet_NaN()); current_statement__ = 13; - assign(pv_3, - in__.template read_constrain_ub>>, jacobian__>( - dv, lp__, n, m, k), "assigning variable pv_3"); + pv_3 = in__.template read_constrain_ub>>, jacobian__>( + dv, lp__, n, m, k); current_statement__ = 13; check_matching_dims("constraint", "pv_3", pv_3, "upper", dv); Eigen::Matrix pr_1; @@ -28847,11 +28492,9 @@ class transform_model final : public model_base_crtp { stan::math::fill(pr_1, std::numeric_limits::quiet_NaN()); current_statement__ = 14; - assign(pr_1, - in__.template read_constrain_lub, jacobian__>( - rvalue(dr, "dr", index_uni(1), index_uni(1)), - rvalue(dr, "dr", index_uni(1), index_uni(2)), lp__, k), - "assigning variable pr_1"); + pr_1 = in__.template read_constrain_lub, jacobian__>( + rvalue(dr, "dr", index_uni(1), index_uni(1)), + rvalue(dr, "dr", index_uni(1), index_uni(2)), lp__, k); current_statement__ = 14; check_matching_dims("constraint", "pr_1", pr_1, "lower", rvalue(dr, "dr", index_uni(1), index_uni(1))); @@ -28863,10 +28506,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pr_2, std::numeric_limits::quiet_NaN()); current_statement__ = 15; - assign(pr_2, - in__.template read_constrain_lb>, jacobian__>( - rvalue(dr, "dr", index_uni(1)), lp__, m, k), - "assigning variable pr_2"); + pr_2 = in__.template read_constrain_lb>, jacobian__>( + rvalue(dr, "dr", index_uni(1)), lp__, m, k); current_statement__ = 15; check_matching_dims("constraint", "pr_2", pr_2, "lower", rvalue(dr, "dr", index_uni(1))); @@ -28875,9 +28516,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pr_3, std::numeric_limits::quiet_NaN()); current_statement__ = 16; - assign(pr_3, - in__.template read_constrain_ub>>, jacobian__>( - dr, lp__, n, m, k), "assigning variable pr_3"); + pr_3 = in__.template read_constrain_ub>>, jacobian__>( + dr, lp__, n, m, k); current_statement__ = 16; check_matching_dims("constraint", "pr_3", pr_3, "upper", dr); Eigen::Matrix pm_1; @@ -28885,10 +28525,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pm_1, std::numeric_limits::quiet_NaN()); current_statement__ = 17; - assign(pm_1, - in__.template read_constrain_lb, jacobian__>( - rvalue(dm, "dm", index_uni(1)), lp__, m, k), - "assigning variable pm_1"); + pm_1 = in__.template read_constrain_lb, jacobian__>( + rvalue(dm, "dm", index_uni(1)), lp__, m, k); current_statement__ = 17; check_matching_dims("constraint", "pm_1", pm_1, "lower", rvalue(dm, "dm", index_uni(1))); @@ -28897,9 +28535,8 @@ class transform_model final : public model_base_crtp { stan::math::fill(pm_2, std::numeric_limits::quiet_NaN()); current_statement__ = 18; - assign(pm_2, - in__.template read_constrain_ub>, jacobian__>( - dm, lp__, n, m, k), "assigning variable pm_2"); + pm_2 = in__.template read_constrain_ub>, jacobian__>( + dm, lp__, n, m, k); current_statement__ = 18; check_matching_dims("constraint", "pm_2", pm_2, "upper", dm); std::vector tp_1; @@ -29411,7 +29048,7 @@ class transform_model final : public model_base_crtp { p_1 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(p_1, context__.vals_r("p_1"), "assigning variable p_1"); + p_1 = context__.vals_r("p_1"); current_statement__ = 1; check_matching_dims("constraint", "p_1", p_1, "lower", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -29429,7 +29066,7 @@ class transform_model final : public model_base_crtp { p_2 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(p_2, context__.vals_r("p_2"), "assigning variable p_2"); + p_2 = context__.vals_r("p_2"); current_statement__ = 2; check_matching_dims("constraint", "p_2", p_2, "upper", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -29447,7 +29084,7 @@ class transform_model final : public model_base_crtp { p_3 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(p_3, context__.vals_r("p_3"), "assigning variable p_3"); + p_3 = context__.vals_r("p_3"); current_statement__ = 3; check_matching_dims("constraint", "p_3", p_3, "lower", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -29469,7 +29106,7 @@ class transform_model final : public model_base_crtp { p_4 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(p_4, context__.vals_r("p_4"), "assigning variable p_4"); + p_4 = context__.vals_r("p_4"); current_statement__ = 4; check_matching_dims("constraint", "p_4", p_4, "upper", rvalue(ds, "ds", index_uni(1), index_uni(2))); @@ -29487,7 +29124,7 @@ class transform_model final : public model_base_crtp { p_5 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(p_5, context__.vals_r("p_5"), "assigning variable p_5"); + p_5 = context__.vals_r("p_5"); current_statement__ = 5; check_matching_dims("constraint", "p_5", p_5, "lower", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -29505,7 +29142,7 @@ class transform_model final : public model_base_crtp { p_6 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(p_6, context__.vals_r("p_6"), "assigning variable p_6"); + p_6 = context__.vals_r("p_6"); current_statement__ = 6; check_matching_dims("constraint", "p_6", p_6, "offset", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -29523,7 +29160,7 @@ class transform_model final : public model_base_crtp { p_7 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 7; - assign(p_7, context__.vals_r("p_7"), "assigning variable p_7"); + p_7 = context__.vals_r("p_7"); current_statement__ = 7; check_matching_dims("constraint", "p_7", p_7, "multiplier", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -29541,7 +29178,7 @@ class transform_model final : public model_base_crtp { p_8 = std::vector(k, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - assign(p_8, context__.vals_r("p_8"), "assigning variable p_8"); + p_8 = context__.vals_r("p_8"); current_statement__ = 8; check_matching_dims("constraint", "p_8", p_8, "offset", rvalue(ds, "ds", index_uni(1), index_uni(1))); @@ -29565,8 +29202,7 @@ class transform_model final : public model_base_crtp { { std::vector p_9_flat__; current_statement__ = 9; - assign(p_9_flat__, context__.vals_r("p_9"), - "assigning variable p_9_flat__"); + p_9_flat__ = context__.vals_r("p_9"); current_statement__ = 9; pos__ = 1; current_statement__ = 9; @@ -29601,8 +29237,7 @@ class transform_model final : public model_base_crtp { { std::vector p_10_flat__; current_statement__ = 10; - assign(p_10_flat__, context__.vals_r("p_10"), - "assigning variable p_10_flat__"); + p_10_flat__ = context__.vals_r("p_10"); current_statement__ = 10; pos__ = 1; current_statement__ = 10; @@ -29645,8 +29280,7 @@ class transform_model final : public model_base_crtp { { std::vector pv_1_flat__; current_statement__ = 11; - assign(pv_1_flat__, context__.vals_r("pv_1"), - "assigning variable pv_1_flat__"); + pv_1_flat__ = context__.vals_r("pv_1"); current_statement__ = 11; pos__ = 1; current_statement__ = 11; @@ -29682,8 +29316,7 @@ class transform_model final : public model_base_crtp { { std::vector pv_2_flat__; current_statement__ = 12; - assign(pv_2_flat__, context__.vals_r("pv_2"), - "assigning variable pv_2_flat__"); + pv_2_flat__ = context__.vals_r("pv_2"); current_statement__ = 12; pos__ = 1; current_statement__ = 12; @@ -29720,8 +29353,7 @@ class transform_model final : public model_base_crtp { { std::vector pv_3_flat__; current_statement__ = 13; - assign(pv_3_flat__, context__.vals_r("pv_3"), - "assigning variable pv_3_flat__"); + pv_3_flat__ = context__.vals_r("pv_3"); current_statement__ = 13; pos__ = 1; current_statement__ = 13; @@ -29765,8 +29397,7 @@ class transform_model final : public model_base_crtp { { std::vector pr_1_flat__; current_statement__ = 14; - assign(pr_1_flat__, context__.vals_r("pr_1"), - "assigning variable pr_1_flat__"); + pr_1_flat__ = context__.vals_r("pr_1"); current_statement__ = 14; pos__ = 1; current_statement__ = 14; @@ -29802,8 +29433,7 @@ class transform_model final : public model_base_crtp { { std::vector pr_2_flat__; current_statement__ = 15; - assign(pr_2_flat__, context__.vals_r("pr_2"), - "assigning variable pr_2_flat__"); + pr_2_flat__ = context__.vals_r("pr_2"); current_statement__ = 15; pos__ = 1; current_statement__ = 15; @@ -29840,8 +29470,7 @@ class transform_model final : public model_base_crtp { { std::vector pr_3_flat__; current_statement__ = 16; - assign(pr_3_flat__, context__.vals_r("pr_3"), - "assigning variable pr_3_flat__"); + pr_3_flat__ = context__.vals_r("pr_3"); current_statement__ = 16; pos__ = 1; current_statement__ = 16; @@ -29885,8 +29514,7 @@ class transform_model final : public model_base_crtp { { std::vector pm_1_flat__; current_statement__ = 17; - assign(pm_1_flat__, context__.vals_r("pm_1"), - "assigning variable pm_1_flat__"); + pm_1_flat__ = context__.vals_r("pm_1"); current_statement__ = 17; pos__ = 1; current_statement__ = 17; @@ -29925,8 +29553,7 @@ class transform_model final : public model_base_crtp { { std::vector pm_2_flat__; current_statement__ = 18; - assign(pm_2_flat__, context__.vals_r("pm_2"), - "assigning variable pm_2_flat__"); + pm_2_flat__ = context__.vals_r("pm_2"); current_statement__ = 18; pos__ = 1; current_statement__ = 18; diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index 589045772b..1e01ac2ac7 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -203,7 +203,7 @@ class simple_function_model final : public model_base_crtp m_flat__; current_statement__ = 4; - assign(m_flat__, context__.vals_r("m"), "assigning variable m_flat__"); + m_flat__ = context__.vals_r("m"); current_statement__ = 4; pos__ = 1; current_statement__ = 4; diff --git a/test/integration/good/code-gen/opencl/cpp.expected b/test/integration/good/code-gen/opencl/cpp.expected index e5816ab2ac..ab299daf30 100644 --- a/test/integration/good/code-gen/opencl/cpp.expected +++ b/test/integration/good/code-gen/opencl/cpp.expected @@ -849,8 +849,7 @@ class distributions_model final : public model_base_crtp { d_int_array = std::vector(d_int, std::numeric_limits::min()); current_statement__ = 758; - assign(d_int_array, context__.vals_i("d_int_array"), - "assigning variable d_int_array"); + d_int_array = context__.vals_i("d_int_array"); current_statement__ = 759; context__.validate_dims("data initialization","d_real","double", context__.to_vec()); @@ -866,8 +865,7 @@ class distributions_model final : public model_base_crtp { d_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 761; - assign(d_real_array, context__.vals_r("d_real_array"), - "assigning variable d_real_array"); + d_real_array = context__.vals_r("d_real_array"); current_statement__ = 762; validate_non_negative_index("d_vector", "d_int", d_int); current_statement__ = 763; @@ -879,8 +877,7 @@ class distributions_model final : public model_base_crtp { { std::vector d_vector_flat__; current_statement__ = 763; - assign(d_vector_flat__, context__.vals_r("d_vector"), - "assigning variable d_vector_flat__"); + d_vector_flat__ = context__.vals_r("d_vector"); current_statement__ = 763; pos__ = 1; current_statement__ = 763; @@ -902,8 +899,7 @@ class distributions_model final : public model_base_crtp { { std::vector d_row_vector_flat__; current_statement__ = 765; - assign(d_row_vector_flat__, context__.vals_r("d_row_vector"), - "assigning variable d_row_vector_flat__"); + d_row_vector_flat__ = context__.vals_r("d_row_vector"); current_statement__ = 765; pos__ = 1; current_statement__ = 765; @@ -980,33 +976,28 @@ class distributions_model final : public model_base_crtp { p_real_array = std::vector(d_int, DUMMY_VAR__); current_statement__ = 2; - assign(p_real_array, - in__.template read>(d_int), - "assigning variable p_real_array"); + p_real_array = in__.template read>(d_int); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); stan::math::fill(p_matrix, DUMMY_VAR__); current_statement__ = 3; - assign(p_matrix, - in__.template read>(d_int, - d_int), "assigning variable p_matrix"); + p_matrix = in__.template read>( + d_int, d_int); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, DUMMY_VAR__); current_statement__ = 4; - assign(p_vector, - in__.template read>(d_int), - "assigning variable p_vector"); + p_vector = in__.template read>( + d_int); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, DUMMY_VAR__); current_statement__ = 5; - assign(p_row_vector, - in__.template read>(d_int), - "assigning variable p_row_vector"); + p_row_vector = in__.template read>( + d_int); local_scalar_t__ y_p; y_p = DUMMY_VAR__; @@ -3529,33 +3520,28 @@ class distributions_model final : public model_base_crtp { p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(p_real_array, - in__.template read>(d_int), - "assigning variable p_real_array"); + p_real_array = in__.template read>(d_int); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); stan::math::fill(p_matrix, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(p_matrix, - in__.template read>(d_int, - d_int), "assigning variable p_matrix"); + p_matrix = in__.template read>( + d_int, d_int); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(p_vector, - in__.template read>(d_int), - "assigning variable p_vector"); + p_vector = in__.template read>( + d_int); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(p_row_vector, - in__.template read>(d_int), - "assigning variable p_row_vector"); + p_row_vector = in__.template read>( + d_int); double y_p; y_p = std::numeric_limits::quiet_NaN(); @@ -6088,8 +6074,7 @@ class distributions_model final : public model_base_crtp { p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(p_real_array, context__.vals_r("p_real_array"), - "assigning variable p_real_array"); + p_real_array = context__.vals_r("p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); stan::math::fill(p_matrix, std::numeric_limits::quiet_NaN()); @@ -6097,8 +6082,7 @@ class distributions_model final : public model_base_crtp { { std::vector p_matrix_flat__; current_statement__ = 3; - assign(p_matrix_flat__, context__.vals_r("p_matrix"), - "assigning variable p_matrix_flat__"); + p_matrix_flat__ = context__.vals_r("p_matrix"); current_statement__ = 3; pos__ = 1; current_statement__ = 3; @@ -6119,8 +6103,7 @@ class distributions_model final : public model_base_crtp { { std::vector p_vector_flat__; current_statement__ = 4; - assign(p_vector_flat__, context__.vals_r("p_vector"), - "assigning variable p_vector_flat__"); + p_vector_flat__ = context__.vals_r("p_vector"); current_statement__ = 4; pos__ = 1; current_statement__ = 4; @@ -6138,8 +6121,7 @@ class distributions_model final : public model_base_crtp { { std::vector p_row_vector_flat__; current_statement__ = 5; - assign(p_row_vector_flat__, context__.vals_r("p_row_vector"), - "assigning variable p_row_vector_flat__"); + p_row_vector_flat__ = context__.vals_r("p_row_vector"); current_statement__ = 5; pos__ = 1; current_statement__ = 5; @@ -6494,8 +6476,7 @@ class restricted_model final : public model_base_crtp { d_int_array = std::vector(d_int, std::numeric_limits::min()); current_statement__ = 27; - assign(d_int_array, context__.vals_i("d_int_array"), - "assigning variable d_int_array"); + d_int_array = context__.vals_i("d_int_array"); current_statement__ = 28; context__.validate_dims("data initialization","d_real","double", context__.to_vec()); @@ -6511,8 +6492,7 @@ class restricted_model final : public model_base_crtp { d_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 30; - assign(d_real_array, context__.vals_r("d_real_array"), - "assigning variable d_real_array"); + d_real_array = context__.vals_r("d_real_array"); current_statement__ = 31; validate_non_negative_index("d_vector", "d_int", d_int); current_statement__ = 32; @@ -6524,8 +6504,7 @@ class restricted_model final : public model_base_crtp { { std::vector d_vector_flat__; current_statement__ = 32; - assign(d_vector_flat__, context__.vals_r("d_vector"), - "assigning variable d_vector_flat__"); + d_vector_flat__ = context__.vals_r("d_vector"); current_statement__ = 32; pos__ = 1; current_statement__ = 32; @@ -6547,8 +6526,7 @@ class restricted_model final : public model_base_crtp { { std::vector d_row_vector_flat__; current_statement__ = 34; - assign(d_row_vector_flat__, context__.vals_r("d_row_vector"), - "assigning variable d_row_vector_flat__"); + d_row_vector_flat__ = context__.vals_r("d_row_vector"); current_statement__ = 34; pos__ = 1; current_statement__ = 34; @@ -6619,33 +6597,28 @@ class restricted_model final : public model_base_crtp { p_real_array = std::vector(d_int, DUMMY_VAR__); current_statement__ = 2; - assign(p_real_array, - in__.template read>(d_int), - "assigning variable p_real_array"); + p_real_array = in__.template read>(d_int); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); stan::math::fill(p_matrix, DUMMY_VAR__); current_statement__ = 3; - assign(p_matrix, - in__.template read>(d_int, - d_int), "assigning variable p_matrix"); + p_matrix = in__.template read>( + d_int, d_int); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, DUMMY_VAR__); current_statement__ = 4; - assign(p_vector, - in__.template read>(d_int), - "assigning variable p_vector"); + p_vector = in__.template read>( + d_int); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, DUMMY_VAR__); current_statement__ = 5; - assign(p_row_vector, - in__.template read>(d_int), - "assigning variable p_row_vector"); + p_row_vector = in__.template read>( + d_int); local_scalar_t__ y_p; y_p = DUMMY_VAR__; @@ -6737,33 +6710,28 @@ class restricted_model final : public model_base_crtp { p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(p_real_array, - in__.template read>(d_int), - "assigning variable p_real_array"); + p_real_array = in__.template read>(d_int); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); stan::math::fill(p_matrix, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(p_matrix, - in__.template read>(d_int, - d_int), "assigning variable p_matrix"); + p_matrix = in__.template read>( + d_int, d_int); Eigen::Matrix p_vector; p_vector = Eigen::Matrix(d_int); stan::math::fill(p_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(p_vector, - in__.template read>(d_int), - "assigning variable p_vector"); + p_vector = in__.template read>( + d_int); Eigen::Matrix p_row_vector; p_row_vector = Eigen::Matrix(d_int); stan::math::fill(p_row_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(p_row_vector, - in__.template read>(d_int), - "assigning variable p_row_vector"); + p_row_vector = in__.template read>( + d_int); double y_p; y_p = std::numeric_limits::quiet_NaN(); @@ -6865,8 +6833,7 @@ class restricted_model final : public model_base_crtp { p_real_array = std::vector(d_int, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(p_real_array, context__.vals_r("p_real_array"), - "assigning variable p_real_array"); + p_real_array = context__.vals_r("p_real_array"); Eigen::Matrix p_matrix; p_matrix = Eigen::Matrix(d_int, d_int); stan::math::fill(p_matrix, std::numeric_limits::quiet_NaN()); @@ -6874,8 +6841,7 @@ class restricted_model final : public model_base_crtp { { std::vector p_matrix_flat__; current_statement__ = 3; - assign(p_matrix_flat__, context__.vals_r("p_matrix"), - "assigning variable p_matrix_flat__"); + p_matrix_flat__ = context__.vals_r("p_matrix"); current_statement__ = 3; pos__ = 1; current_statement__ = 3; @@ -6896,8 +6862,7 @@ class restricted_model final : public model_base_crtp { { std::vector p_vector_flat__; current_statement__ = 4; - assign(p_vector_flat__, context__.vals_r("p_vector"), - "assigning variable p_vector_flat__"); + p_vector_flat__ = context__.vals_r("p_vector"); current_statement__ = 4; pos__ = 1; current_statement__ = 4; @@ -6915,8 +6880,7 @@ class restricted_model final : public model_base_crtp { { std::vector p_row_vector_flat__; current_statement__ = 5; - assign(p_row_vector_flat__, context__.vals_r("p_row_vector"), - "assigning variable p_row_vector_flat__"); + p_row_vector_flat__ = context__.vals_r("p_row_vector"); current_statement__ = 5; pos__ = 1; current_statement__ = 5; diff --git a/test/integration/good/code-gen/profiling/cpp.expected b/test/integration/good/code-gen/profiling/cpp.expected index 2ad26fc9b6..393eed5204 100644 --- a/test/integration/good/code-gen/profiling/cpp.expected +++ b/test/integration/good/code-gen/profiling/cpp.expected @@ -104,7 +104,7 @@ class simple_function_model final : public model_base_crtp(N, std::numeric_limits::quiet_NaN()); current_statement__ = 23; - assign(x, context__.vals_r("x"), "assigning variable x"); + x = context__.vals_r("x"); current_statement__ = 24; validate_non_negative_index("y", "N", N); current_statement__ = 25; @@ -116,7 +116,7 @@ class simple_function_model final : public model_base_crtp y_flat__; current_statement__ = 25; - assign(y_flat__, context__.vals_r("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_r("y"); current_statement__ = 25; pos__ = 1; current_statement__ = 25; diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 2a67fc44ae..261fc4c76f 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -184,14 +184,14 @@ class ad_level_failing_model final : public model_base_crtp(N_t, std::numeric_limits::quiet_NaN()); current_statement__ = 18; - assign(t, context__.vals_r("t"), "assigning variable t"); + t = context__.vals_r("t"); current_statement__ = 19; context__.validate_dims("data initialization","y0","double", context__.to_vec(4)); y0 = std::vector(4, std::numeric_limits::quiet_NaN()); current_statement__ = 19; - assign(y0, context__.vals_r("y0"), "assigning variable y0"); + y0 = context__.vals_r("y0"); current_statement__ = 20; validate_non_negative_index("stoi_hat", "N_t", N_t); current_statement__ = 21; @@ -200,8 +200,7 @@ class ad_level_failing_model final : public model_base_crtp(N_t, std::numeric_limits::min()); current_statement__ = 21; - assign(stoi_hat, context__.vals_i("stoi_hat"), - "assigning variable stoi_hat"); + stoi_hat = context__.vals_i("stoi_hat"); current_statement__ = 22; validate_non_negative_index("B_hat", "N_t", N_t); current_statement__ = 23; @@ -210,7 +209,7 @@ class ad_level_failing_model final : public model_base_crtp(N_t, std::numeric_limits::quiet_NaN()); current_statement__ = 23; - assign(B_hat, context__.vals_r("B_hat"), "assigning variable B_hat"); + B_hat = context__.vals_r("B_hat"); current_statement__ = 24; t0 = std::numeric_limits::quiet_NaN(); @@ -1351,7 +1350,7 @@ class copy_fail_model final : public model_base_crtp { { std::vector y_flat__; current_statement__ = 35; - assign(y_flat__, context__.vals_i("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_i("y"); current_statement__ = 35; pos__ = 1; lcm_sym156__ = logical_gte(n_occasions, 1); @@ -1475,7 +1474,7 @@ class copy_fail_model final : public model_base_crtp { { std::vector x_flat__; current_statement__ = 38; - assign(x_flat__, context__.vals_i("x"), "assigning variable x_flat__"); + x_flat__ = context__.vals_i("x"); current_statement__ = 38; pos__ = 1; lcm_sym158__ = logical_gte(lcm_sym159__, 1); @@ -1862,9 +1861,8 @@ class copy_fail_model final : public model_base_crtp { stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - assign(beta, - in__.template read_constrain_lub, jacobian__>( - 0, 1, lp__, max_age), "assigning variable beta"); + beta = in__.template read_constrain_lub, jacobian__>( + 0, 1, lp__, max_age); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -2400,9 +2398,8 @@ class copy_fail_model final : public model_base_crtp { stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(beta, - in__.template read_constrain_lub, jacobian__>( - 0, 1, lp__, max_age), "assigning variable beta"); + beta = in__.template read_constrain_lub, jacobian__>( + 0, 1, lp__, max_age); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -2893,8 +2890,7 @@ class copy_fail_model final : public model_base_crtp { { std::vector beta_flat__; current_statement__ = 2; - assign(beta_flat__, context__.vals_r("beta"), - "assigning variable beta_flat__"); + beta_flat__ = context__.vals_r("beta"); current_statement__ = 2; pos__ = 1; lcm_sym46__ = logical_gte(max_age, 1); @@ -3379,7 +3375,7 @@ class dce_fail_model final : public model_base_crtp { female = std::vector(N, std::numeric_limits::min()); current_statement__ = 45; - assign(female, context__.vals_i("female"), "assigning variable female"); + female = context__.vals_i("female"); lcm_sym68__ = logical_gte(N, 1); if (lcm_sym68__) { current_statement__ = 45; @@ -3412,7 +3408,7 @@ class dce_fail_model final : public model_base_crtp { black = std::vector(N, std::numeric_limits::min()); current_statement__ = 47; - assign(black, context__.vals_i("black"), "assigning variable black"); + black = context__.vals_i("black"); current_statement__ = 47; if (lcm_sym68__) { current_statement__ = 47; @@ -3445,7 +3441,7 @@ class dce_fail_model final : public model_base_crtp { age = std::vector(N, std::numeric_limits::min()); current_statement__ = 49; - assign(age, context__.vals_i("age"), "assigning variable age"); + age = context__.vals_i("age"); current_statement__ = 49; if (lcm_sym68__) { current_statement__ = 49; @@ -3478,7 +3474,7 @@ class dce_fail_model final : public model_base_crtp { edu = std::vector(N, std::numeric_limits::min()); current_statement__ = 51; - assign(edu, context__.vals_i("edu"), "assigning variable edu"); + edu = context__.vals_i("edu"); current_statement__ = 51; if (lcm_sym68__) { current_statement__ = 51; @@ -3511,7 +3507,7 @@ class dce_fail_model final : public model_base_crtp { region = std::vector(n_state, std::numeric_limits::min()); current_statement__ = 53; - assign(region, context__.vals_i("region"), "assigning variable region"); + region = context__.vals_i("region"); lcm_sym69__ = logical_gte(n_state, 1); if (lcm_sym69__) { current_statement__ = 53; @@ -3544,7 +3540,7 @@ class dce_fail_model final : public model_base_crtp { state = std::vector(N, std::numeric_limits::min()); current_statement__ = 55; - assign(state, context__.vals_i("state"), "assigning variable state"); + state = context__.vals_i("state"); current_statement__ = 55; if (lcm_sym68__) { current_statement__ = 55; @@ -3577,7 +3573,7 @@ class dce_fail_model final : public model_base_crtp { y = std::vector(N, std::numeric_limits::min()); current_statement__ = 57; - assign(y, context__.vals_i("y"), "assigning variable y"); + y = context__.vals_i("y"); current_statement__ = 57; if (lcm_sym68__) { current_statement__ = 57; @@ -3612,8 +3608,7 @@ class dce_fail_model final : public model_base_crtp { { std::vector v_prev_flat__; current_statement__ = 59; - assign(v_prev_flat__, context__.vals_r("v_prev"), - "assigning variable v_prev_flat__"); + v_prev_flat__ = context__.vals_r("v_prev"); current_statement__ = 59; pos__ = 1; current_statement__ = 59; @@ -3781,41 +3776,36 @@ class dce_fail_model final : public model_base_crtp { stan::math::fill(b_age, DUMMY_VAR__); current_statement__ = 12; - assign(b_age, - in__.template read>(n_age), - "assigning variable b_age"); + b_age = in__.template read>( + n_age); Eigen::Matrix b_edu; b_edu = Eigen::Matrix(n_edu); stan::math::fill(b_edu, DUMMY_VAR__); current_statement__ = 13; - assign(b_edu, - in__.template read>(n_edu), - "assigning variable b_edu"); + b_edu = in__.template read>( + n_edu); Eigen::Matrix b_region; b_region = Eigen::Matrix(n_region); stan::math::fill(b_region, DUMMY_VAR__); current_statement__ = 14; - assign(b_region, - in__.template read>(n_region), - "assigning variable b_region"); + b_region = in__.template read>( + n_region); Eigen::Matrix b_age_edu; b_age_edu = Eigen::Matrix(n_age, n_edu); stan::math::fill(b_age_edu, DUMMY_VAR__); current_statement__ = 15; - assign(b_age_edu, - in__.template read>(n_age, - n_edu), "assigning variable b_age_edu"); + b_age_edu = in__.template read>( + n_age, n_edu); Eigen::Matrix b_hat; b_hat = Eigen::Matrix(n_state); stan::math::fill(b_hat, DUMMY_VAR__); current_statement__ = 16; - assign(b_hat, - in__.template read>(n_state), - "assigning variable b_hat"); + b_hat = in__.template read>( + n_state); { current_statement__ = 17; validate_non_negative_index("p", "N", N); @@ -4066,41 +4056,36 @@ class dce_fail_model final : public model_base_crtp { stan::math::fill(b_age, std::numeric_limits::quiet_NaN()); current_statement__ = 12; - assign(b_age, - in__.template read>(n_age), - "assigning variable b_age"); + b_age = in__.template read>( + n_age); Eigen::Matrix b_edu; b_edu = Eigen::Matrix(n_edu); stan::math::fill(b_edu, std::numeric_limits::quiet_NaN()); current_statement__ = 13; - assign(b_edu, - in__.template read>(n_edu), - "assigning variable b_edu"); + b_edu = in__.template read>( + n_edu); Eigen::Matrix b_region; b_region = Eigen::Matrix(n_region); stan::math::fill(b_region, std::numeric_limits::quiet_NaN()); current_statement__ = 14; - assign(b_region, - in__.template read>(n_region), - "assigning variable b_region"); + b_region = in__.template read>( + n_region); Eigen::Matrix b_age_edu; b_age_edu = Eigen::Matrix(n_age, n_edu); stan::math::fill(b_age_edu, std::numeric_limits::quiet_NaN()); current_statement__ = 15; - assign(b_age_edu, - in__.template read>(n_age, - n_edu), "assigning variable b_age_edu"); + b_age_edu = in__.template read>( + n_age, n_edu); Eigen::Matrix b_hat; b_hat = Eigen::Matrix(n_state); stan::math::fill(b_hat, std::numeric_limits::quiet_NaN()); current_statement__ = 16; - assign(b_hat, - in__.template read>(n_state), - "assigning variable b_hat"); + b_hat = in__.template read>( + n_state); vars__.emplace_back(sigma); vars__.emplace_back(sigma_age); vars__.emplace_back(sigma_edu); @@ -4302,8 +4287,7 @@ class dce_fail_model final : public model_base_crtp { { std::vector b_age_flat__; current_statement__ = 12; - assign(b_age_flat__, context__.vals_r("b_age"), - "assigning variable b_age_flat__"); + b_age_flat__ = context__.vals_r("b_age"); current_statement__ = 12; pos__ = 1; lcm_sym1__ = logical_gte(n_age, 1); @@ -4328,8 +4312,7 @@ class dce_fail_model final : public model_base_crtp { { std::vector b_edu_flat__; current_statement__ = 13; - assign(b_edu_flat__, context__.vals_r("b_edu"), - "assigning variable b_edu_flat__"); + b_edu_flat__ = context__.vals_r("b_edu"); current_statement__ = 13; pos__ = 1; lcm_sym2__ = logical_gte(n_edu, 1); @@ -4354,8 +4337,7 @@ class dce_fail_model final : public model_base_crtp { { std::vector b_region_flat__; current_statement__ = 14; - assign(b_region_flat__, context__.vals_r("b_region"), - "assigning variable b_region_flat__"); + b_region_flat__ = context__.vals_r("b_region"); current_statement__ = 14; pos__ = 1; lcm_sym3__ = logical_gte(n_region, 1); @@ -4381,8 +4363,7 @@ class dce_fail_model final : public model_base_crtp { { std::vector b_age_edu_flat__; current_statement__ = 15; - assign(b_age_edu_flat__, context__.vals_r("b_age_edu"), - "assigning variable b_age_edu_flat__"); + b_age_edu_flat__ = context__.vals_r("b_age_edu"); current_statement__ = 15; pos__ = 1; current_statement__ = 15; @@ -4429,8 +4410,7 @@ class dce_fail_model final : public model_base_crtp { { std::vector b_hat_flat__; current_statement__ = 16; - assign(b_hat_flat__, context__.vals_r("b_hat"), - "assigning variable b_hat_flat__"); + b_hat_flat__ = context__.vals_r("b_hat"); current_statement__ = 16; pos__ = 1; lcm_sym4__ = logical_gte(n_state, 1); @@ -5552,7 +5532,7 @@ class expr_prop_fail_model final : public model_base_crtp { std::vector y_flat__; current_statement__ = 11; - assign(y_flat__, context__.vals_r("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_r("y"); current_statement__ = 11; pos__ = 1; current_statement__ = 11; @@ -5617,16 +5597,14 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::fill(mu, DUMMY_VAR__); current_statement__ = 1; - assign(mu, - in__.template read_constrain_ordered, jacobian__>( - lp__, 2), "assigning variable mu"); + mu = in__.template read_constrain_ordered, jacobian__>( + lp__, 2); std::vector sigma; sigma = std::vector(2, DUMMY_VAR__); current_statement__ = 2; - assign(sigma, - in__.template read_constrain_lb, jacobian__>( - 0, lp__, 2), "assigning variable sigma"); + sigma = in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2); local_scalar_t__ theta; theta = DUMMY_VAR__; @@ -5706,16 +5684,14 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::fill(mu, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(mu, - in__.template read_constrain_ordered, jacobian__>( - lp__, 2), "assigning variable mu"); + mu = in__.template read_constrain_ordered, jacobian__>( + lp__, 2); std::vector sigma; sigma = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(sigma, - in__.template read_constrain_lb, jacobian__>( - 0, lp__, 2), "assigning variable sigma"); + sigma = in__.template read_constrain_lb, jacobian__>( + 0, lp__, 2); double theta; theta = std::numeric_limits::quiet_NaN(); @@ -5781,8 +5757,7 @@ class expr_prop_fail_model final : public model_base_crtp { std::vector mu_flat__; current_statement__ = 1; - assign(mu_flat__, context__.vals_r("mu"), - "assigning variable mu_flat__"); + mu_flat__ = context__.vals_r("mu"); current_statement__ = 1; pos__ = 1; { @@ -5811,7 +5786,7 @@ class expr_prop_fail_model final : public model_base_crtp sigma = std::vector(2, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(sigma, context__.vals_r("sigma"), "assigning variable sigma"); + sigma = context__.vals_r("sigma"); std::vector sigma_free__; sigma_free__ = std::vector(2, std::numeric_limits::quiet_NaN()); @@ -6118,7 +6093,7 @@ class expr_prop_fail2_model final : public model_base_crtp(J, std::numeric_limits::quiet_NaN()); current_statement__ = 8; - assign(y, context__.vals_r("y"), "assigning variable y"); + y = context__.vals_r("y"); current_statement__ = 9; validate_non_negative_index("sigma", "J", J); current_statement__ = 10; @@ -6127,7 +6102,7 @@ class expr_prop_fail2_model final : public model_base_crtp(J, std::numeric_limits::quiet_NaN()); current_statement__ = 10; - assign(sigma, context__.vals_r("sigma"), "assigning variable sigma"); + sigma = context__.vals_r("sigma"); current_statement__ = 10; if (logical_gte(J, 1)) { current_statement__ = 10; @@ -6189,8 +6164,7 @@ class expr_prop_fail2_model final : public model_base_crtp(J, DUMMY_VAR__); current_statement__ = 2; - assign(theta, in__.template read>(J), - "assigning variable theta"); + theta = in__.template read>(J); local_scalar_t__ tau; tau = DUMMY_VAR__; @@ -6249,8 +6223,7 @@ class expr_prop_fail2_model final : public model_base_crtp(J, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(theta, in__.template read>(J), - "assigning variable theta"); + theta = in__.template read>(J); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -6306,7 +6279,7 @@ class expr_prop_fail2_model final : public model_base_crtp(J, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(theta, context__.vals_r("theta"), "assigning variable theta"); + theta = context__.vals_r("theta"); double tau; tau = std::numeric_limits::quiet_NaN(); @@ -6728,7 +6701,7 @@ class expr_prop_fail3_model final : public model_base_crtp(N, std::numeric_limits::min()); current_statement__ = 29; - assign(age, context__.vals_i("age"), "assigning variable age"); + age = context__.vals_i("age"); lcm_sym65__ = logical_gte(N, 1); if (lcm_sym65__) { current_statement__ = 29; @@ -6761,8 +6734,7 @@ class expr_prop_fail3_model final : public model_base_crtp(N, std::numeric_limits::min()); current_statement__ = 31; - assign(age_edu, context__.vals_i("age_edu"), - "assigning variable age_edu"); + age_edu = context__.vals_i("age_edu"); current_statement__ = 31; if (lcm_sym65__) { current_statement__ = 31; @@ -6799,8 +6771,7 @@ class expr_prop_fail3_model final : public model_base_crtp black_flat__; current_statement__ = 33; - assign(black_flat__, context__.vals_r("black"), - "assigning variable black_flat__"); + black_flat__ = context__.vals_r("black"); current_statement__ = 33; pos__ = 1; current_statement__ = 33; @@ -6850,7 +6821,7 @@ class expr_prop_fail3_model final : public model_base_crtp(N, std::numeric_limits::min()); current_statement__ = 35; - assign(edu, context__.vals_i("edu"), "assigning variable edu"); + edu = context__.vals_i("edu"); current_statement__ = 35; if (lcm_sym65__) { current_statement__ = 35; @@ -6886,8 +6857,7 @@ class expr_prop_fail3_model final : public model_base_crtp female_flat__; current_statement__ = 37; - assign(female_flat__, context__.vals_r("female"), - "assigning variable female_flat__"); + female_flat__ = context__.vals_r("female"); current_statement__ = 37; pos__ = 1; current_statement__ = 37; @@ -6938,8 +6908,7 @@ class expr_prop_fail3_model final : public model_base_crtp(N, std::numeric_limits::min()); current_statement__ = 39; - assign(region_full, context__.vals_i("region_full"), - "assigning variable region_full"); + region_full = context__.vals_i("region_full"); current_statement__ = 39; if (lcm_sym65__) { current_statement__ = 39; @@ -6974,7 +6943,7 @@ class expr_prop_fail3_model final : public model_base_crtp(N, std::numeric_limits::min()); current_statement__ = 41; - assign(state, context__.vals_i("state"), "assigning variable state"); + state = context__.vals_i("state"); current_statement__ = 41; if (lcm_sym65__) { current_statement__ = 41; @@ -7010,8 +6979,7 @@ class expr_prop_fail3_model final : public model_base_crtp v_prev_full_flat__; current_statement__ = 43; - assign(v_prev_full_flat__, context__.vals_r("v_prev_full"), - "assigning variable v_prev_full_flat__"); + v_prev_full_flat__ = context__.vals_r("v_prev_full"); current_statement__ = 43; pos__ = 1; current_statement__ = 43; @@ -7038,7 +7006,7 @@ class expr_prop_fail3_model final : public model_base_crtp(N, std::numeric_limits::min()); current_statement__ = 45; - assign(y, context__.vals_i("y"), "assigning variable y"); + y = context__.vals_i("y"); current_statement__ = 45; if (lcm_sym65__) { current_statement__ = 45; @@ -7133,49 +7101,39 @@ class expr_prop_fail3_model final : public model_base_crtp>(n_age), - "assigning variable a"); + a = in__.template read>(n_age); Eigen::Matrix b; b = Eigen::Matrix(n_edu); stan::math::fill(b, DUMMY_VAR__); current_statement__ = 2; - assign(b, - in__.template read>(n_edu), - "assigning variable b"); + b = in__.template read>(n_edu); Eigen::Matrix c; c = Eigen::Matrix(n_age_edu); stan::math::fill(c, DUMMY_VAR__); current_statement__ = 3; - assign(c, - in__.template read>(n_age_edu), - "assigning variable c"); + c = in__.template read>( + n_age_edu); Eigen::Matrix d; d = Eigen::Matrix(n_state); stan::math::fill(d, DUMMY_VAR__); current_statement__ = 4; - assign(d, - in__.template read>(n_state), - "assigning variable d"); + d = in__.template read>(n_state); Eigen::Matrix e; e = Eigen::Matrix(n_region_full); stan::math::fill(e, DUMMY_VAR__); current_statement__ = 5; - assign(e, - in__.template read>( - n_region_full), "assigning variable e"); + e = in__.template read>( + n_region_full); Eigen::Matrix beta; beta = Eigen::Matrix(5); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 6; - assign(beta, - in__.template read>(5), - "assigning variable beta"); + beta = in__.template read>(5); local_scalar_t__ sigma_a; sigma_a = DUMMY_VAR__; @@ -7338,49 +7296,39 @@ class expr_prop_fail3_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 1; - assign(a, - in__.template read>(n_age), - "assigning variable a"); + a = in__.template read>(n_age); Eigen::Matrix b; b = Eigen::Matrix(n_edu); stan::math::fill(b, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(b, - in__.template read>(n_edu), - "assigning variable b"); + b = in__.template read>(n_edu); Eigen::Matrix c; c = Eigen::Matrix(n_age_edu); stan::math::fill(c, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(c, - in__.template read>(n_age_edu), - "assigning variable c"); + c = in__.template read>( + n_age_edu); Eigen::Matrix d; d = Eigen::Matrix(n_state); stan::math::fill(d, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(d, - in__.template read>(n_state), - "assigning variable d"); + d = in__.template read>(n_state); Eigen::Matrix e; e = Eigen::Matrix(n_region_full); stan::math::fill(e, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(e, - in__.template read>( - n_region_full), "assigning variable e"); + e = in__.template read>( + n_region_full); Eigen::Matrix beta; beta = Eigen::Matrix(5); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(beta, - in__.template read>(5), - "assigning variable beta"); + beta = in__.template read>(5); double sigma_a; sigma_a = std::numeric_limits::quiet_NaN(); @@ -7585,7 +7533,7 @@ class expr_prop_fail3_model final : public model_base_crtp a_flat__; current_statement__ = 1; - assign(a_flat__, context__.vals_r("a"), "assigning variable a_flat__"); + a_flat__ = context__.vals_r("a"); current_statement__ = 1; pos__ = 1; lcm_sym1__ = logical_gte(n_age, 1); @@ -7610,7 +7558,7 @@ class expr_prop_fail3_model final : public model_base_crtp b_flat__; current_statement__ = 2; - assign(b_flat__, context__.vals_r("b"), "assigning variable b_flat__"); + b_flat__ = context__.vals_r("b"); current_statement__ = 2; pos__ = 1; lcm_sym3__ = logical_gte(n_edu, 1); @@ -7635,7 +7583,7 @@ class expr_prop_fail3_model final : public model_base_crtp c_flat__; current_statement__ = 3; - assign(c_flat__, context__.vals_r("c"), "assigning variable c_flat__"); + c_flat__ = context__.vals_r("c"); current_statement__ = 3; pos__ = 1; lcm_sym2__ = logical_gte(n_age_edu, 1); @@ -7660,7 +7608,7 @@ class expr_prop_fail3_model final : public model_base_crtp d_flat__; current_statement__ = 4; - assign(d_flat__, context__.vals_r("d"), "assigning variable d_flat__"); + d_flat__ = context__.vals_r("d"); current_statement__ = 4; pos__ = 1; lcm_sym5__ = logical_gte(n_state, 1); @@ -7685,7 +7633,7 @@ class expr_prop_fail3_model final : public model_base_crtp e_flat__; current_statement__ = 5; - assign(e_flat__, context__.vals_r("e"), "assigning variable e_flat__"); + e_flat__ = context__.vals_r("e"); current_statement__ = 5; pos__ = 1; lcm_sym4__ = logical_gte(n_region_full, 1); @@ -7710,8 +7658,7 @@ class expr_prop_fail3_model final : public model_base_crtp beta_flat__; current_statement__ = 6; - assign(beta_flat__, context__.vals_r("beta"), - "assigning variable beta_flat__"); + beta_flat__ = context__.vals_r("beta"); current_statement__ = 6; pos__ = 1; { @@ -8252,7 +8199,7 @@ class expr_prop_fail4_model final : public model_base_crtp(N_edges, std::numeric_limits::min()); current_statement__ = 31; - assign(node1, context__.vals_i("node1"), "assigning variable node1"); + node1 = context__.vals_i("node1"); lcm_sym41__ = logical_gte(N_edges, 1); if (lcm_sym41__) { current_statement__ = 31; @@ -8285,7 +8232,7 @@ class expr_prop_fail4_model final : public model_base_crtp(N_edges, std::numeric_limits::min()); current_statement__ = 33; - assign(node2, context__.vals_i("node2"), "assigning variable node2"); + node2 = context__.vals_i("node2"); current_statement__ = 33; if (lcm_sym41__) { current_statement__ = 33; @@ -8321,7 +8268,7 @@ class expr_prop_fail4_model final : public model_base_crtp E_flat__; current_statement__ = 35; - assign(E_flat__, context__.vals_r("E"), "assigning variable E_flat__"); + E_flat__ = context__.vals_r("E"); current_statement__ = 35; pos__ = 1; lcm_sym40__ = logical_gte(N, 1); @@ -8428,9 +8375,8 @@ class expr_prop_fail4_model final : public model_base_crtp>( - lcm_sym39__), "assigning variable phi_std_raw"); + phi_std_raw = in__.template read>( + lcm_sym39__); local_scalar_t__ sigma_phi; sigma_phi = DUMMY_VAR__; @@ -8528,9 +8474,8 @@ class expr_prop_fail4_model final : public model_base_crtp::quiet_NaN()); lcm_sym20__ = (N - 1); - assign(phi_std_raw, - in__.template read>( - lcm_sym20__), "assigning variable phi_std_raw"); + phi_std_raw = in__.template read>( + lcm_sym20__); double sigma_phi; sigma_phi = std::numeric_limits::quiet_NaN(); @@ -8730,8 +8675,7 @@ class expr_prop_fail4_model final : public model_base_crtp phi_std_raw_flat__; current_statement__ = 2; - assign(phi_std_raw_flat__, context__.vals_r("phi_std_raw"), - "assigning variable phi_std_raw_flat__"); + phi_std_raw_flat__ = context__.vals_r("phi_std_raw"); current_statement__ = 2; pos__ = 1; lcm_sym2__ = (N - 1); @@ -9461,7 +9405,7 @@ class expr_prop_fail5_model final : public model_base_crtp y_flat__; current_statement__ = 41; - assign(y_flat__, context__.vals_i("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_i("y"); current_statement__ = 41; pos__ = 1; lcm_sym153__ = logical_gte(n_occasions, 1); @@ -9858,9 +9802,8 @@ class expr_prop_fail5_model final : public model_base_crtp>(nind), - "assigning variable epsilon"); + epsilon = in__.template read>( + nind); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -10409,9 +10352,8 @@ class expr_prop_fail5_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 3; - assign(epsilon, - in__.template read>(nind), - "assigning variable epsilon"); + epsilon = in__.template read>( + nind); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -10929,8 +10871,7 @@ class expr_prop_fail5_model final : public model_base_crtp epsilon_flat__; current_statement__ = 3; - assign(epsilon_flat__, context__.vals_r("epsilon"), - "assigning variable epsilon_flat__"); + epsilon_flat__ = context__.vals_r("epsilon"); current_statement__ = 3; pos__ = 1; lcm_sym46__ = logical_gte(nind, 1); @@ -12215,7 +12156,7 @@ class expr_prop_fail6_model final : public model_base_crtp y_flat__; current_statement__ = 110; - assign(y_flat__, context__.vals_i("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_i("y"); current_statement__ = 110; pos__ = 1; lcm_sym310__ = logical_gte(n_occasions, 1); @@ -12670,17 +12611,14 @@ class expr_prop_fail6_model final : public model_base_crtp, jacobian__>( - 0, lp__, n_occasions), "assigning variable beta"); + beta = in__.template read_constrain_lb, jacobian__>( + 0, lp__, n_occasions); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(M); stan::math::fill(epsilon, DUMMY_VAR__); current_statement__ = 5; - assign(epsilon, - in__.template read>(M), - "assigning variable epsilon"); + epsilon = in__.template read>(M); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -13651,17 +13589,14 @@ class expr_prop_fail6_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 4; - assign(beta, - in__.template read_constrain_lb, jacobian__>( - 0, lp__, n_occasions), "assigning variable beta"); + beta = in__.template read_constrain_lb, jacobian__>( + 0, lp__, n_occasions); Eigen::Matrix epsilon; epsilon = Eigen::Matrix(M); stan::math::fill(epsilon, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(epsilon, - in__.template read>(M), - "assigning variable epsilon"); + epsilon = in__.template read>(M); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -14564,8 +14499,7 @@ class expr_prop_fail6_model final : public model_base_crtp beta_flat__; current_statement__ = 4; - assign(beta_flat__, context__.vals_r("beta"), - "assigning variable beta_flat__"); + beta_flat__ = context__.vals_r("beta"); current_statement__ = 4; pos__ = 1; lcm_sym117__ = logical_gte(n_occasions, 1); @@ -14605,8 +14539,7 @@ class expr_prop_fail6_model final : public model_base_crtp epsilon_flat__; current_statement__ = 5; - assign(epsilon_flat__, context__.vals_r("epsilon"), - "assigning variable epsilon_flat__"); + epsilon_flat__ = context__.vals_r("epsilon"); current_statement__ = 5; pos__ = 1; lcm_sym116__ = logical_gte(M, 1); @@ -15139,7 +15072,7 @@ class expr_prop_fail7_model final : public model_base_crtp y_flat__; current_statement__ = 25; - assign(y_flat__, context__.vals_i("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_i("y"); current_statement__ = 25; pos__ = 1; lcm_sym64__ = logical_gte(J, 1); @@ -15252,8 +15185,7 @@ class expr_prop_fail7_model final : public model_base_crtp alpha_flat__; current_statement__ = 27; - assign(alpha_flat__, context__.vals_r("alpha"), - "assigning variable alpha_flat__"); + alpha_flat__ = context__.vals_r("alpha"); current_statement__ = 27; pos__ = 1; lcm_sym65__ = logical_gte(K, 1); @@ -15296,8 +15228,7 @@ class expr_prop_fail7_model final : public model_base_crtp beta_flat__; current_statement__ = 30; - assign(beta_flat__, context__.vals_r("beta"), - "assigning variable beta_flat__"); + beta_flat__ = context__.vals_r("beta"); current_statement__ = 30; pos__ = 1; current_statement__ = 30; @@ -15431,17 +15362,15 @@ class expr_prop_fail7_model final : public model_base_crtp, jacobian__>( - lp__, K), "assigning variable pi"); + pi = in__.template read_constrain_simplex, jacobian__>( + lp__, K); std::vector>> theta; theta = std::vector>>(J, std::vector>(K, Eigen::Matrix(K))); stan::math::fill(theta, DUMMY_VAR__); current_statement__ = 2; - assign(theta, - in__.template read_constrain_simplex>>, jacobian__>( - lp__, J, K, K), "assigning variable theta"); + theta = in__.template read_constrain_simplex>>, jacobian__>( + lp__, J, K, K); { current_statement__ = 10; lp_accum__.add(dirichlet_lpdf(pi, alpha)); @@ -15612,17 +15541,15 @@ class expr_prop_fail7_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 1; - assign(pi, - in__.template read_constrain_simplex, jacobian__>( - lp__, K), "assigning variable pi"); + pi = in__.template read_constrain_simplex, jacobian__>( + lp__, K); std::vector>> theta; theta = std::vector>>(J, std::vector>(K, Eigen::Matrix(K))); stan::math::fill(theta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(theta, - in__.template read_constrain_simplex>>, jacobian__>( - lp__, J, K, K), "assigning variable theta"); + theta = in__.template read_constrain_simplex>>, jacobian__>( + lp__, J, K, K); lcm_sym26__ = logical_gte(K, 1); if (lcm_sym26__) { vars__.emplace_back(rvalue(pi, "pi", index_uni(1))); @@ -15828,8 +15755,7 @@ class expr_prop_fail7_model final : public model_base_crtp pi_flat__; current_statement__ = 1; - assign(pi_flat__, context__.vals_r("pi"), - "assigning variable pi_flat__"); + pi_flat__ = context__.vals_r("pi"); current_statement__ = 1; pos__ = 1; lcm_sym2__ = logical_gte(K, 1); @@ -15861,8 +15787,7 @@ class expr_prop_fail7_model final : public model_base_crtp theta_flat__; current_statement__ = 2; - assign(theta_flat__, context__.vals_r("theta"), - "assigning variable theta_flat__"); + theta_flat__ = context__.vals_r("theta"); current_statement__ = 2; pos__ = 1; current_statement__ = 2; @@ -16380,7 +16305,7 @@ class expr_prop_fail8_model final : public model_base_crtp(N_edges, std::numeric_limits::min()); current_statement__ = 15; - assign(node1, context__.vals_i("node1"), "assigning variable node1"); + node1 = context__.vals_i("node1"); lcm_sym26__ = logical_gte(N_edges, 1); if (lcm_sym26__) { current_statement__ = 15; @@ -16413,7 +16338,7 @@ class expr_prop_fail8_model final : public model_base_crtp(N_edges, std::numeric_limits::min()); current_statement__ = 17; - assign(node2, context__.vals_i("node2"), "assigning variable node2"); + node2 = context__.vals_i("node2"); current_statement__ = 17; if (lcm_sym26__) { current_statement__ = 17; @@ -16446,7 +16371,7 @@ class expr_prop_fail8_model final : public model_base_crtp(N, std::numeric_limits::min()); current_statement__ = 19; - assign(y, context__.vals_i("y"), "assigning variable y"); + y = context__.vals_i("y"); lcm_sym25__ = logical_gte(N, 1); if (lcm_sym25__) { current_statement__ = 19; @@ -16470,7 +16395,7 @@ class expr_prop_fail8_model final : public model_base_crtp x_flat__; current_statement__ = 21; - assign(x_flat__, context__.vals_r("x"), "assigning variable x_flat__"); + x_flat__ = context__.vals_r("x"); current_statement__ = 21; pos__ = 1; current_statement__ = 21; @@ -16563,17 +16488,15 @@ class expr_prop_fail8_model final : public model_base_crtp>(N), - "assigning variable theta_std"); + theta_std = in__.template read>( + N); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix(N); stan::math::fill(phi_std_raw, DUMMY_VAR__); current_statement__ = 6; - assign(phi_std_raw, - in__.template read>(N), - "assigning variable phi_std_raw"); + phi_std_raw = in__.template read>( + N); local_scalar_t__ sigma_phi; sigma_phi = DUMMY_VAR__; @@ -16665,17 +16588,15 @@ class expr_prop_fail8_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 5; - assign(theta_std, - in__.template read>(N), - "assigning variable theta_std"); + theta_std = in__.template read>( + N); Eigen::Matrix phi_std_raw; phi_std_raw = Eigen::Matrix(N); stan::math::fill(phi_std_raw, std::numeric_limits::quiet_NaN()); current_statement__ = 6; - assign(phi_std_raw, - in__.template read>(N), - "assigning variable phi_std_raw"); + phi_std_raw = in__.template read>( + N); double sigma_phi; sigma_phi = std::numeric_limits::quiet_NaN(); @@ -16794,8 +16715,7 @@ class expr_prop_fail8_model final : public model_base_crtp theta_std_flat__; current_statement__ = 5; - assign(theta_std_flat__, context__.vals_r("theta_std"), - "assigning variable theta_std_flat__"); + theta_std_flat__ = context__.vals_r("theta_std"); current_statement__ = 5; pos__ = 1; lcm_sym1__ = logical_gte(N, 1); @@ -16821,8 +16741,7 @@ class expr_prop_fail8_model final : public model_base_crtp phi_std_raw_flat__; current_statement__ = 6; - assign(phi_std_raw_flat__, context__.vals_r("phi_std_raw"), - "assigning variable phi_std_raw_flat__"); + phi_std_raw_flat__ = context__.vals_r("phi_std_raw"); current_statement__ = 6; pos__ = 1; current_statement__ = 6; @@ -17534,7 +17453,7 @@ class fails_test_model final : public model_base_crtp { { std::vector y_flat__; current_statement__ = 35; - assign(y_flat__, context__.vals_i("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_i("y"); current_statement__ = 35; pos__ = 1; lcm_sym156__ = logical_gte(n_occasions, 1); @@ -17658,7 +17577,7 @@ class fails_test_model final : public model_base_crtp { { std::vector x_flat__; current_statement__ = 38; - assign(x_flat__, context__.vals_i("x"), "assigning variable x_flat__"); + x_flat__ = context__.vals_i("x"); current_statement__ = 38; pos__ = 1; lcm_sym158__ = logical_gte(lcm_sym159__, 1); @@ -18045,9 +17964,8 @@ class fails_test_model final : public model_base_crtp { stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - assign(beta, - in__.template read_constrain_lub, jacobian__>( - 0, 1, lp__, max_age), "assigning variable beta"); + beta = in__.template read_constrain_lub, jacobian__>( + 0, 1, lp__, max_age); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -18583,9 +18501,8 @@ class fails_test_model final : public model_base_crtp { stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(beta, - in__.template read_constrain_lub, jacobian__>( - 0, 1, lp__, max_age), "assigning variable beta"); + beta = in__.template read_constrain_lub, jacobian__>( + 0, 1, lp__, max_age); Eigen::Matrix phi; phi = Eigen::Matrix(nind, (n_occasions - 1)); stan::math::fill(phi, DUMMY_VAR__); @@ -19076,8 +18993,7 @@ class fails_test_model final : public model_base_crtp { { std::vector beta_flat__; current_statement__ = 2; - assign(beta_flat__, context__.vals_r("beta"), - "assigning variable beta_flat__"); + beta_flat__ = context__.vals_r("beta"); current_statement__ = 2; pos__ = 1; lcm_sym46__ = logical_gte(max_age, 1); @@ -20412,7 +20328,7 @@ class inlining_fail2_model final : public model_base_crtp { std::vector y_flat__; current_statement__ = 107; - assign(y_flat__, context__.vals_i("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_i("y"); current_statement__ = 107; pos__ = 1; lcm_sym317__ = logical_gte(n_occasions, 1); @@ -20853,17 +20769,15 @@ class inlining_fail2_model final : public model_base_crtp stan::math::fill(gamma, DUMMY_VAR__); current_statement__ = 3; - assign(gamma, - in__.template read_constrain_lub, jacobian__>( - 0, 1, lp__, n_occasions), "assigning variable gamma"); + gamma = in__.template read_constrain_lub, jacobian__>( + 0, 1, lp__, n_occasions); Eigen::Matrix epsilon; epsilon = Eigen::Matrix((n_occasions - 1)); stan::math::fill(epsilon, DUMMY_VAR__); lcm_sym297__ = (n_occasions - 1); - assign(epsilon, - in__.template read>( - lcm_sym297__), "assigning variable epsilon"); + epsilon = in__.template read>( + lcm_sym297__); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -21783,17 +21697,15 @@ class inlining_fail2_model final : public model_base_crtp stan::math::fill(gamma, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(gamma, - in__.template read_constrain_lub, jacobian__>( - 0, 1, lp__, n_occasions), "assigning variable gamma"); + gamma = in__.template read_constrain_lub, jacobian__>( + 0, 1, lp__, n_occasions); Eigen::Matrix epsilon; epsilon = Eigen::Matrix((n_occasions - 1)); stan::math::fill(epsilon, std::numeric_limits::quiet_NaN()); lcm_sym198__ = (n_occasions - 1); - assign(epsilon, - in__.template read>( - lcm_sym198__), "assigning variable epsilon"); + epsilon = in__.template read>( + lcm_sym198__); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -22596,8 +22508,7 @@ class inlining_fail2_model final : public model_base_crtp { std::vector gamma_flat__; current_statement__ = 3; - assign(gamma_flat__, context__.vals_r("gamma"), - "assigning variable gamma_flat__"); + gamma_flat__ = context__.vals_r("gamma"); current_statement__ = 3; pos__ = 1; lcm_sym129__ = logical_gte(n_occasions, 1); @@ -22638,8 +22549,7 @@ class inlining_fail2_model final : public model_base_crtp { std::vector epsilon_flat__; current_statement__ = 4; - assign(epsilon_flat__, context__.vals_r("epsilon"), - "assigning variable epsilon_flat__"); + epsilon_flat__ = context__.vals_r("epsilon"); current_statement__ = 4; pos__ = 1; lcm_sym131__ = (n_occasions - 1); @@ -23755,7 +23665,7 @@ class lcm_fails_model final : public model_base_crtp { y = std::vector(J, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(y, context__.vals_r("y"), "assigning variable y"); + y = context__.vals_r("y"); current_statement__ = 6; validate_non_negative_index("theta", "J", J); } catch (const std::exception& e) { @@ -23797,8 +23707,7 @@ class lcm_fails_model final : public model_base_crtp { theta = std::vector(J, DUMMY_VAR__); current_statement__ = 1; - assign(theta, in__.template read>(J), - "assigning variable theta"); + theta = in__.template read>(J); { current_statement__ = 2; lp_accum__.add(normal_lpdf(y, theta, 1)); @@ -23844,8 +23753,7 @@ class lcm_fails_model final : public model_base_crtp { theta = std::vector(J, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(theta, in__.template read>(J), - "assigning variable theta"); + theta = in__.template read>(J); if (logical_gte(J, 1)) { vars__.emplace_back(rvalue(theta, "theta", index_uni(1))); for (int sym1__ = 2; sym1__ <= J; ++sym1__) { @@ -23888,7 +23796,7 @@ class lcm_fails_model final : public model_base_crtp { theta = std::vector(J, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(theta, context__.vals_r("theta"), "assigning variable theta"); + theta = context__.vals_r("theta"); if (logical_gte(J, 1)) { vars__.emplace_back(rvalue(theta, "theta", index_uni(1))); for (int sym1__ = 2; sym1__ <= J; ++sym1__) { @@ -24507,7 +24415,7 @@ class lcm_fails2_model final : public model_base_crtp { { std::vector y_flat__; current_statement__ = 35; - assign(y_flat__, context__.vals_i("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_i("y"); current_statement__ = 35; pos__ = 1; lcm_sym137__ = logical_gte(n_occasions, 1); @@ -26813,7 +26721,7 @@ class off_dce_model final : public model_base_crtp { { std::vector y_flat__; current_statement__ = 35; - assign(y_flat__, context__.vals_i("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_i("y"); current_statement__ = 35; pos__ = 1; lcm_sym42__ = logical_gte(T, 1); @@ -26926,7 +26834,7 @@ class off_dce_model final : public model_base_crtp { { std::vector X_flat__; current_statement__ = 37; - assign(X_flat__, context__.vals_r("X"), "assigning variable X_flat__"); + X_flat__ = context__.vals_r("X"); current_statement__ = 37; pos__ = 1; current_statement__ = 37; @@ -27791,7 +27699,7 @@ class off_small_model final : public model_base_crtp { person = std::vector(N, std::numeric_limits::min()); current_statement__ = 23; - assign(person, context__.vals_i("person"), "assigning variable person"); + person = context__.vals_i("person"); lcm_sym40__ = logical_gte(N, 1); if (lcm_sym40__) { current_statement__ = 23; @@ -27827,8 +27735,7 @@ class off_small_model final : public model_base_crtp { { std::vector time_flat__; current_statement__ = 25; - assign(time_flat__, context__.vals_r("time"), - "assigning variable time_flat__"); + time_flat__ = context__.vals_r("time"); current_statement__ = 25; pos__ = 1; current_statement__ = 25; @@ -27857,8 +27764,7 @@ class off_small_model final : public model_base_crtp { { std::vector treatment_flat__; current_statement__ = 27; - assign(treatment_flat__, context__.vals_r("treatment"), - "assigning variable treatment_flat__"); + treatment_flat__ = context__.vals_r("treatment"); current_statement__ = 27; pos__ = 1; current_statement__ = 27; @@ -27888,7 +27794,7 @@ class off_small_model final : public model_base_crtp { { std::vector y_flat__; current_statement__ = 29; - assign(y_flat__, context__.vals_r("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_r("y"); current_statement__ = 29; pos__ = 1; current_statement__ = 29; @@ -27978,17 +27884,13 @@ class off_small_model final : public model_base_crtp { stan::math::fill(eta1, DUMMY_VAR__); current_statement__ = 2; - assign(eta1, - in__.template read>(J), - "assigning variable eta1"); + eta1 = in__.template read>(J); Eigen::Matrix eta2; eta2 = Eigen::Matrix(J); stan::math::fill(eta2, DUMMY_VAR__); current_statement__ = 3; - assign(eta2, - in__.template read>(J), - "assigning variable eta2"); + eta2 = in__.template read>(J); local_scalar_t__ mu_a1; mu_a1 = DUMMY_VAR__; @@ -28135,17 +28037,13 @@ class off_small_model final : public model_base_crtp { stan::math::fill(eta1, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(eta1, - in__.template read>(J), - "assigning variable eta1"); + eta1 = in__.template read>(J); Eigen::Matrix eta2; eta2 = Eigen::Matrix(J); stan::math::fill(eta2, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(eta2, - in__.template read>(J), - "assigning variable eta2"); + eta2 = in__.template read>(J); double mu_a1; mu_a1 = std::numeric_limits::quiet_NaN(); @@ -28306,8 +28204,7 @@ class off_small_model final : public model_base_crtp { { std::vector eta1_flat__; current_statement__ = 2; - assign(eta1_flat__, context__.vals_r("eta1"), - "assigning variable eta1_flat__"); + eta1_flat__ = context__.vals_r("eta1"); current_statement__ = 2; pos__ = 1; lcm_sym1__ = logical_gte(J, 1); @@ -28332,8 +28229,7 @@ class off_small_model final : public model_base_crtp { { std::vector eta2_flat__; current_statement__ = 3; - assign(eta2_flat__, context__.vals_r("eta2"), - "assigning variable eta2_flat__"); + eta2_flat__ = context__.vals_r("eta2"); current_statement__ = 3; pos__ = 1; current_statement__ = 3; @@ -28958,25 +28854,22 @@ class optimizations_model final : public model_base_crtp { stan::math::fill(x_matrix, DUMMY_VAR__); current_statement__ = 3; - assign(x_matrix, - in__.template read>(3, 2), - "assigning variable x_matrix"); + x_matrix = in__.template read>( + 3, 2); Eigen::Matrix x_vector; x_vector = Eigen::Matrix(2); stan::math::fill(x_vector, DUMMY_VAR__); current_statement__ = 4; - assign(x_vector, - in__.template read>(2), - "assigning variable x_vector"); + x_vector = in__.template read>( + 2); Eigen::Matrix x_cov; x_cov = Eigen::Matrix(2, 2); stan::math::fill(x_cov, DUMMY_VAR__); current_statement__ = 5; - assign(x_cov, - in__.template read_constrain_cov_matrix, jacobian__>( - lp__, 2), "assigning variable x_cov"); + x_cov = in__.template read_constrain_cov_matrix, jacobian__>( + lp__, 2); { double x; x = std::numeric_limits::quiet_NaN(); @@ -29530,25 +29423,22 @@ class optimizations_model final : public model_base_crtp { stan::math::fill(x_matrix, std::numeric_limits::quiet_NaN()); current_statement__ = 3; - assign(x_matrix, - in__.template read>(3, 2), - "assigning variable x_matrix"); + x_matrix = in__.template read>( + 3, 2); Eigen::Matrix x_vector; x_vector = Eigen::Matrix(2); stan::math::fill(x_vector, std::numeric_limits::quiet_NaN()); current_statement__ = 4; - assign(x_vector, - in__.template read>(2), - "assigning variable x_vector"); + x_vector = in__.template read>( + 2); Eigen::Matrix x_cov; x_cov = Eigen::Matrix(2, 2); stan::math::fill(x_cov, std::numeric_limits::quiet_NaN()); current_statement__ = 5; - assign(x_cov, - in__.template read_constrain_cov_matrix, jacobian__>( - lp__, 2), "assigning variable x_cov"); + x_cov = in__.template read_constrain_cov_matrix, jacobian__>( + lp__, 2); vars__.emplace_back(theta); vars__.emplace_back(phi); { @@ -29667,8 +29557,7 @@ class optimizations_model final : public model_base_crtp { { std::vector x_matrix_flat__; current_statement__ = 3; - assign(x_matrix_flat__, context__.vals_r("x_matrix"), - "assigning variable x_matrix_flat__"); + x_matrix_flat__ = context__.vals_r("x_matrix"); current_statement__ = 3; pos__ = 1; { @@ -29726,8 +29615,7 @@ class optimizations_model final : public model_base_crtp { { std::vector x_vector_flat__; current_statement__ = 4; - assign(x_vector_flat__, context__.vals_r("x_vector"), - "assigning variable x_vector_flat__"); + x_vector_flat__ = context__.vals_r("x_vector"); current_statement__ = 4; pos__ = 1; { @@ -29753,8 +29641,7 @@ class optimizations_model final : public model_base_crtp { { std::vector x_cov_flat__; current_statement__ = 5; - assign(x_cov_flat__, context__.vals_r("x_cov"), - "assigning variable x_cov_flat__"); + x_cov_flat__ = context__.vals_r("x_cov"); current_statement__ = 5; pos__ = 1; { @@ -30182,7 +30069,7 @@ class partial_eval_model final : public model_base_crtp { pair = std::vector(N, std::numeric_limits::min()); current_statement__ = 16; - assign(pair, context__.vals_i("pair"), "assigning variable pair"); + pair = context__.vals_i("pair"); lcm_sym30__ = logical_gte(N, 1); if (lcm_sym30__) { current_statement__ = 16; @@ -30218,8 +30105,7 @@ class partial_eval_model final : public model_base_crtp { { std::vector pre_test_flat__; current_statement__ = 18; - assign(pre_test_flat__, context__.vals_r("pre_test"), - "assigning variable pre_test_flat__"); + pre_test_flat__ = context__.vals_r("pre_test"); current_statement__ = 18; pos__ = 1; current_statement__ = 18; @@ -30249,8 +30135,7 @@ class partial_eval_model final : public model_base_crtp { { std::vector treatment_flat__; current_statement__ = 20; - assign(treatment_flat__, context__.vals_r("treatment"), - "assigning variable treatment_flat__"); + treatment_flat__ = context__.vals_r("treatment"); current_statement__ = 20; pos__ = 1; current_statement__ = 20; @@ -30305,7 +30190,7 @@ class partial_eval_model final : public model_base_crtp { { std::vector y_flat__; current_statement__ = 22; - assign(y_flat__, context__.vals_r("y"), "assigning variable y_flat__"); + y_flat__ = context__.vals_r("y"); current_statement__ = 22; pos__ = 1; current_statement__ = 22; @@ -30377,17 +30262,13 @@ class partial_eval_model final : public model_base_crtp { stan::math::fill(a, DUMMY_VAR__); current_statement__ = 1; - assign(a, - in__.template read>(n_pair), - "assigning variable a"); + a = in__.template read>(n_pair); Eigen::Matrix beta; beta = Eigen::Matrix(2); stan::math::fill(beta, DUMMY_VAR__); current_statement__ = 2; - assign(beta, - in__.template read>(2), - "assigning variable beta"); + beta = in__.template read>(2); local_scalar_t__ mu_a; mu_a = DUMMY_VAR__; @@ -30488,17 +30369,13 @@ class partial_eval_model final : public model_base_crtp { stan::math::fill(a, std::numeric_limits::quiet_NaN()); current_statement__ = 1; - assign(a, - in__.template read>(n_pair), - "assigning variable a"); + a = in__.template read>(n_pair); Eigen::Matrix beta; beta = Eigen::Matrix(2); stan::math::fill(beta, std::numeric_limits::quiet_NaN()); current_statement__ = 2; - assign(beta, - in__.template read>(2), - "assigning variable beta"); + beta = in__.template read>(2); double mu_a; mu_a = std::numeric_limits::quiet_NaN(); @@ -30608,7 +30485,7 @@ class partial_eval_model final : public model_base_crtp { { std::vector a_flat__; current_statement__ = 1; - assign(a_flat__, context__.vals_r("a"), "assigning variable a_flat__"); + a_flat__ = context__.vals_r("a"); current_statement__ = 1; pos__ = 1; lcm_sym1__ = logical_gte(n_pair, 1); @@ -30633,8 +30510,7 @@ class partial_eval_model final : public model_base_crtp { { std::vector beta_flat__; current_statement__ = 2; - assign(beta_flat__, context__.vals_r("beta"), - "assigning variable beta_flat__"); + beta_flat__ = context__.vals_r("beta"); current_statement__ = 2; pos__ = 1; { @@ -31017,7 +30893,7 @@ class stalled1_failure_model final : public model_base_crtp(I, std::numeric_limits::min()); current_statement__ = 19; - assign(n, context__.vals_i("n"), "assigning variable n"); + n = context__.vals_i("n"); lcm_sym29__ = logical_gte(I, 1); if (lcm_sym29__) { current_statement__ = 19; @@ -31038,7 +30914,7 @@ class stalled1_failure_model final : public model_base_crtp(I, std::numeric_limits::min()); current_statement__ = 21; - assign(N, context__.vals_i("N"), "assigning variable N"); + N = context__.vals_i("N"); current_statement__ = 21; if (lcm_sym29__) { current_statement__ = 21; @@ -31062,8 +30938,7 @@ class stalled1_failure_model final : public model_base_crtp x1_flat__; current_statement__ = 23; - assign(x1_flat__, context__.vals_r("x1"), - "assigning variable x1_flat__"); + x1_flat__ = context__.vals_r("x1"); current_statement__ = 23; pos__ = 1; current_statement__ = 23; @@ -31092,8 +30967,7 @@ class stalled1_failure_model final : public model_base_crtp x2_flat__; current_statement__ = 25; - assign(x2_flat__, context__.vals_r("x2"), - "assigning variable x2_flat__"); + x2_flat__ = context__.vals_r("x2"); current_statement__ = 25; pos__ = 1; current_statement__ = 25; @@ -31209,9 +31083,8 @@ class stalled1_failure_model final : public model_base_crtp>>( - I, 8), "assigning variable b"); + b = in__.template read>>( + I, 8); local_scalar_t__ sigma; sigma = DUMMY_VAR__; @@ -31332,9 +31205,8 @@ class stalled1_failure_model final : public model_base_crtp::quiet_NaN()); current_statement__ = 6; - assign(b, - in__.template read>>( - I, 8), "assigning variable b"); + b = in__.template read>>( + I, 8); double sigma; sigma = std::numeric_limits::quiet_NaN(); @@ -31488,7 +31360,7 @@ class stalled1_failure_model final : public model_base_crtp b_flat__; current_statement__ = 6; - assign(b_flat__, context__.vals_r("b"), "assigning variable b_flat__"); + b_flat__ = context__.vals_r("b"); current_statement__ = 6; pos__ = 1; { From 7b9cf1c28aa6a43bc127bb51bd7a475244dbb92b Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Fri, 19 Mar 2021 17:40:19 -0400 Subject: [PATCH 16/31] make format --- src/stan_math_backend/Statement_gen.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stan_math_backend/Statement_gen.ml b/src/stan_math_backend/Statement_gen.ml index 6110706f8f..7f152df399 100644 --- a/src/stan_math_backend/Statement_gen.ml +++ b/src/stan_math_backend/Statement_gen.ml @@ -109,8 +109,9 @@ let rec pp_statement (ppf : Format.formatter) | _ -> Locations.pp_smeta ppf meta ) ; match pattern with | Assignment - ((vident, _, []), ({pattern = FunApp (CompilerInternal, f, _); _} as rhs)) when - f = (Internal_fun.to_string FnReadData) || f = (Internal_fun.to_string FnReadParam) -> + ((vident, _, []), ({pattern= FunApp (CompilerInternal, f, _); _} as rhs)) + when f = Internal_fun.to_string FnReadData + || f = Internal_fun.to_string FnReadParam -> pf ppf "@[%s = %a;@]" vident pp_expr rhs | Assignment ((vident, _, []), ({meta= Expr.Typed.Meta.({type_= UInt; _}); _} as rhs)) From 4a846cfcda6909127e0eaa55c94f7ba22bdaa785 Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Fri, 19 Mar 2021 23:26:53 -0400 Subject: [PATCH 17/31] turn down the number of parallel jobs for compilation --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index de1c1d89b6..e97a1cd261 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,6 @@ import org.stan.Utils def utils = new org.stan.Utils() def skipExpressionTests = false - /* Functions that runs a sh command and returns the stdout */ def runShell(String command){ def output = sh (returnStdout: true, script: "${command}").trim() @@ -156,7 +155,8 @@ pipeline { text:"O=0\nCXX=${CXX}") sh """ cd performance-tests-cmdstan - cd cmdstan; make -j${env.PARALLEL} build; cd .. + + cd cmdstan; make -j6 build; cd .. cp ../bin/stanc cmdstan/bin/stanc ./runPerformanceTests.py --runs=0 ../test/integration/good ./runPerformanceTests.py --runs=0 example-models From 854c78ec6856a92c60422e895c33e586d54fc573 Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Sun, 21 Mar 2021 12:19:30 -0400 Subject: [PATCH 18/31] update to master --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 00a12e56b4..2e3d53a546 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -156,7 +156,7 @@ pipeline { sh """ cd performance-tests-cmdstan - cd cmdstan; make -j6 build; cd .. + cd cmdstan; make -j${env.PARALLEL} build; cd .. cp ../bin/stanc cmdstan/bin/stanc ./runPerformanceTests.py -j${env.PARALLEL} --runs=0 ../test/integration/good ./runPerformanceTests.py -j${env.PARALLEL} --runs=0 example-models From aa5c9bcc8fe6085b9d7bede1412fcbce77689786 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 29 Mar 2021 15:11:11 -0400 Subject: [PATCH 19/31] Small code cleanup --- Jenkinsfile | 1 - src/analysis_and_optimization/Pedantic_analysis.ml | 1 - src/stan_math_backend/Transform_Mir.ml | 11 +++-------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2e3d53a546..b7681c2ab1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -155,7 +155,6 @@ pipeline { text:"O=0\nCXX=${CXX}") sh """ cd performance-tests-cmdstan - cd cmdstan; make -j${env.PARALLEL} build; cd .. cp ../bin/stanc cmdstan/bin/stanc ./runPerformanceTests.py -j${env.PARALLEL} --runs=0 ../test/integration/good diff --git a/src/analysis_and_optimization/Pedantic_analysis.ml b/src/analysis_and_optimization/Pedantic_analysis.ml index ef6e8e8b85..5c5c6d565c 100644 --- a/src/analysis_and_optimization/Pedantic_analysis.ml +++ b/src/analysis_and_optimization/Pedantic_analysis.ml @@ -75,7 +75,6 @@ let list_multi_twiddles (mir : Program.Typed.t) : let var_deps info_map label ?expr:(expr_opt : Expr.Typed.t option = None) (targets : string Set.Poly.t) : string Set.Poly.t = (* Labels of dependencies *) - (* let expr_vars_opt = Set.Poly.map ~f:fst (expr_var_set expr) in *) let dep_labels, expr_vars = match expr_opt with | None -> (node_dependencies info_map label, Set.Poly.empty) diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index d22c551d49..ce328d8273 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -163,7 +163,7 @@ let data_read smeta (decl_id, st) = type constrainaction = Check | Constrain | Unconstrain [@@deriving sexp] -let check_constraint_to_string t (c : constrainaction) = +let constraint_to_string t (c : constrainaction) = match t with | Program.Ordered -> "ordered" | PositiveOrdered -> "positive_ordered" @@ -187,12 +187,7 @@ let check_constraint_to_string t (c : constrainaction) = | Constrain | Unconstrain -> "lub" ) | Offset _ | Multiplier _ | OffsetMultiplier _ -> ( match c with Check -> "" | Constrain | Unconstrain -> "offset_multiplier" ) - | Identity -> "" - -let constrain_constraint_to_string t (c : constrainaction) = - match t with - | Program.CholeskyCorr -> "cholesky_factor_corr" - | _ -> check_constraint_to_string t c + | Identity -> "identity" let default_multiplier = 1 let default_offset = 0 @@ -245,7 +240,7 @@ let param_read smeta Helpers.( internal_funapp FnReadParam ( Expr.Helpers.str - (constrain_constraint_to_string out_trans Constrain) + (constraint_to_string out_trans Constrain) :: n_args_expression :: (transform_args @ read_constrain_dims out_trans cst) )) Typed.Meta.{decl_var.meta with type_= ut}) From 75eba6a6fbc61c51b3b8669e163a9135e3dd8eee Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Mon, 29 Mar 2021 15:32:33 -0400 Subject: [PATCH 20/31] format --- src/stan_math_backend/Transform_Mir.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index ce328d8273..4642ddb054 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -187,7 +187,7 @@ let constraint_to_string t (c : constrainaction) = | Constrain | Unconstrain -> "lub" ) | Offset _ | Multiplier _ | OffsetMultiplier _ -> ( match c with Check -> "" | Constrain | Unconstrain -> "offset_multiplier" ) - | Identity -> "identity" + | Identity -> "" let default_multiplier = 1 let default_offset = 0 @@ -239,8 +239,7 @@ let param_read smeta Expr.( Helpers.( internal_funapp FnReadParam - ( Expr.Helpers.str - (constraint_to_string out_trans Constrain) + ( Expr.Helpers.str (constraint_to_string out_trans Constrain) :: n_args_expression :: (transform_args @ read_constrain_dims out_trans cst) )) Typed.Meta.{decl_var.meta with type_= ut}) From ef054337b6d053bb8b3e5c41b568422ba049251a Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Mon, 29 Mar 2021 17:08:08 -0400 Subject: [PATCH 21/31] dune promote --- src/stan_math_backend/Transform_Mir.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index ce328d8273..35aab659bd 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -239,8 +239,7 @@ let param_read smeta Expr.( Helpers.( internal_funapp FnReadParam - ( Expr.Helpers.str - (constraint_to_string out_trans Constrain) + ( Expr.Helpers.str (constraint_to_string out_trans Constrain) :: n_args_expression :: (transform_args @ read_constrain_dims out_trans cst) )) Typed.Meta.{decl_var.meta with type_= ut}) From 2a531d141d35b09c720f07af40bf92ee74d1de34 Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Mon, 29 Mar 2021 18:27:13 -0400 Subject: [PATCH 22/31] First pass at function variant types --- src/analysis_and_optimization/Factor_graph.ml | 8 +- src/analysis_and_optimization/Mir_utils.ml | 14 +- .../Monotone_framework.ml | 43 +- src/analysis_and_optimization/Optimize.ml | 117 +- .../Partial_evaluator.ml | 1140 ++++++++--------- .../Pedantic_analysis.ml | 9 +- src/frontend/Ast_to_Mir.ml | 92 +- src/middle/Expr.ml | 26 +- src/middle/Expr.mli | 7 +- src/middle/Fun_kind.ml | 11 +- src/middle/Internal_fun.ml | 11 +- src/middle/Stmt.ml | 22 +- src/middle/Stmt.mli | 8 +- src/stan_math_backend/Expression_gen.ml | 72 +- src/stan_math_backend/Stan_math_code_gen.ml | 3 +- src/stan_math_backend/Statement_gen.ml | 46 +- src/stan_math_backend/Transform_Mir.ml | 44 +- src/tfp_backend/Code_gen.ml | 21 +- src/tfp_backend/Transform_mir.ml | 37 +- test/unit/Optimize.ml | 9 +- test/unit/Stan_math_code_gen_tests.ml | 6 +- 21 files changed, 880 insertions(+), 866 deletions(-) diff --git a/src/analysis_and_optimization/Factor_graph.ml b/src/analysis_and_optimization/Factor_graph.ml index 00ce08b14a..bc8a24c359 100644 --- a/src/analysis_and_optimization/Factor_graph.ml +++ b/src/analysis_and_optimization/Factor_graph.ml @@ -22,12 +22,12 @@ let extract_factors_statement stmt = match stmt with | Stmt.Fixed.Pattern.TargetPE e -> List.map (summation_terms e) ~f:(fun x -> TargetTerm x) - | NRFunApp (_, f, _) when Internal_fun.of_string_opt f = Some FnReject -> - [Reject] - | NRFunApp (_, s, args) when String.suffix s 3 = "_lp" -> + | NRFunApp (CompilerInternal FnReject, _) -> [Reject] + | NRFunApp ((UserDefined s | StanLib s), args) when String.suffix s 3 = "_lp" + -> [LPFunction (s, args)] | Assignment (_, _) - |NRFunApp (_, _, _) + |NRFunApp (_, _) |Break | Continue | Return _ | Skip |IfElse (_, _, _) |While (_, _) diff --git a/src/analysis_and_optimization/Mir_utils.ml b/src/analysis_and_optimization/Mir_utils.ml index 0d00837a31..0875525fb7 100644 --- a/src/analysis_and_optimization/Mir_utils.ml +++ b/src/analysis_and_optimization/Mir_utils.ml @@ -30,7 +30,7 @@ let rec num_expr_value (v : Expr.Typed.t) : (float * string) option = | {pattern= Fixed.Pattern.Lit (Real, str); _} |{pattern= Fixed.Pattern.Lit (Int, str); _} -> Some (float_of_string str, str) - | {pattern= Fixed.Pattern.FunApp (StanLib, "PMinus__", [v]); _} -> ( + | {pattern= Fixed.Pattern.FunApp (StanLib "PMinus__", [v]); _} -> ( match num_expr_value v with | Some (v, s) -> Some (-.v, "-" ^ s) | None -> None ) @@ -252,7 +252,7 @@ let rec expr_var_set Expr.Fixed.({pattern; meta}) = match pattern with | Var s -> Set.Poly.singleton (VVar s, meta) | Lit _ -> Set.Poly.empty - | FunApp (_, _, exprs) -> union_recur exprs + | FunApp (_, exprs) -> union_recur exprs | TernaryIf (expr1, expr2, expr3) -> union_recur [expr1; expr2; expr3] | Indexed (expr, ix) -> Set.Poly.union_list (expr_var_set expr :: List.map ix ~f:index_var_set) @@ -270,7 +270,7 @@ and index_var_set ix = let stmt_rhs stmt = match stmt with | Stmt.Fixed.Pattern.For vars -> Set.Poly.of_list [vars.lower; vars.upper] - | NRFunApp (_, _, exprs) -> Set.Poly.of_list exprs + | NRFunApp (_, exprs) -> Set.Poly.of_list exprs | IfElse (rhs, _, _) |While (rhs, _) |Assignment (_, rhs) @@ -296,7 +296,7 @@ let expr_assigned_var Expr.Fixed.({pattern; _}) = (** See interface file *) let rec summation_terms (Expr.Fixed.({pattern; _}) as rhs) = match pattern with - | FunApp (_, "Plus__", [e1; e2]) -> + | FunApp (StanLib "Plus__", [e1; e2]) -> List.append (summation_terms e1) (summation_terms e2) | _ -> [rhs] @@ -356,7 +356,7 @@ let expr_subst_stmt m = map_rec_stmt_loc (expr_subst_stmt_base m) let rec expr_depth Expr.Fixed.({pattern; _}) = match pattern with | Var _ | Lit (_, _) -> 0 - | FunApp (_, _, l) -> + | FunApp (_, l) -> 1 + Option.value ~default:0 (List.max_elt ~compare:compare_int (List.map ~f:expr_depth l)) @@ -394,9 +394,9 @@ let rec update_expr_ad_levels autodiffable_variables Expr.Typed.{e with meta= Meta.{e.meta with adlevel= AutoDiffable}} else {e with meta= {e.meta with adlevel= DataOnly}} | Lit (_, _) -> {e with meta= {e.meta with adlevel= DataOnly}} - | FunApp (o, f, l) -> + | FunApp (kind, l) -> let l = List.map ~f:(update_expr_ad_levels autodiffable_variables) l in - {pattern= FunApp (o, f, l); meta= {e.meta with adlevel= ad_level_sup l}} + {pattern= FunApp (kind, l); meta= {e.meta with adlevel= ad_level_sup l}} | TernaryIf (e1, e2, e3) -> let e1 = update_expr_ad_levels autodiffable_variables e1 in let e2 = update_expr_ad_levels autodiffable_variables e2 in diff --git a/src/analysis_and_optimization/Monotone_framework.ml b/src/analysis_and_optimization/Monotone_framework.ml index 5c7af0c6e4..32b93b4c8f 100644 --- a/src/analysis_and_optimization/Monotone_framework.ml +++ b/src/analysis_and_optimization/Monotone_framework.ml @@ -29,8 +29,13 @@ let rec free_vars_expr (e : Expr.Typed.t) = match e.pattern with | Var x -> Set.Poly.singleton x | Lit (_, _) -> Set.Poly.empty - | FunApp (_, f, l) -> - Set.Poly.union_list (Set.Poly.singleton f :: List.map ~f:free_vars_expr l) + | FunApp (kind, l) -> ( + let arg_vars = List.map ~f:free_vars_expr l in + match kind with + | UserDefined f -> + Set.Poly.union_list + (Set.Poly.singleton f :: List.map ~f:free_vars_expr l) + | _ -> Set.Poly.union_list arg_vars ) | TernaryIf (e1, e2, e3) -> Set.Poly.union_list (List.map ~f:free_vars_expr [e1; e2; e3]) | Indexed (e, l) -> @@ -53,8 +58,13 @@ let rec free_vars_stmt free_vars_expr e | Assignment ((_, _, l), e) -> Set.Poly.union_list (free_vars_expr e :: List.map ~f:free_vars_idx l) - | NRFunApp (_, f, l) -> - Set.Poly.union_list (Set.Poly.singleton f :: List.map ~f:free_vars_expr l) + | NRFunApp (kind, l) -> ( + let arg_vars = List.map ~f:free_vars_expr l in + match kind with + | UserDefined f -> + Set.Poly.union_list + (Set.Poly.singleton f :: List.map ~f:free_vars_expr l) + | _ -> Set.Poly.union_list arg_vars ) | IfElse (e, b1, Some b2) -> Set.Poly.union_list [free_vars_expr e; free_vars_stmt b1.pattern; free_vars_stmt b2.pattern] @@ -314,7 +324,7 @@ let constant_propagation_transfer | Decl {decl_id= s; _} | Assignment ((s, _, _ :: _), _) -> Map.remove m s | TargetPE _ - |NRFunApp (_, _, _) + |NRFunApp (_, _) |Break | Continue | Return _ | Skip |IfElse (_, _, _) |While (_, _) @@ -373,7 +383,7 @@ let expression_propagation_transfer in Set.Poly.fold kills ~init:m ~f:kill_var | TargetPE _ - |NRFunApp (_, _, _) + |NRFunApp (_, _) |Break | Continue | Return _ | Skip |IfElse (_, _, _) |While (_, _) @@ -414,7 +424,7 @@ let copy_propagation_transfer (globals : string Set.Poly.t) in Set.Poly.fold kills ~init:m ~f:kill_var | TargetPE _ - |NRFunApp (_, _, _) + |NRFunApp (_, _) |Break | Continue | Return _ | Skip |IfElse (_, _, _) |While (_, _) @@ -435,11 +445,11 @@ let assigned_vars_stmt (s : (Expr.Typed.t, 'a) Stmt.Fixed.Pattern.t) = match s with | Assignment ((x, _, _), _) -> Set.Poly.singleton x | TargetPE _ -> Set.Poly.singleton "target" - | NRFunApp (_, s, _) when String.suffix s 3 = "_lp" -> + | NRFunApp ((UserDefined s | StanLib s), _) when String.suffix s 3 = "_lp" -> Set.Poly.singleton "target" | For {loopvar= x; _} -> Set.Poly.singleton x | Decl {decl_id= _; _} - |NRFunApp (_, _, _) + |NRFunApp (_, _) |Break | Continue | Return _ | Skip |IfElse (_, _, _) |While (_, _) @@ -478,9 +488,10 @@ let reaching_definitions_transfer |For {loopvar= x; _} -> Set.filter p ~f:(fun (y, _) -> y = x) | TargetPE _ -> Set.filter p ~f:(fun (y, _) -> y = "target") - | NRFunApp (_, s, _) when String.suffix s 3 = "_lp" -> + | NRFunApp ((UserDefined s | StanLib s), _) + when String.suffix s 3 = "_lp" -> Set.filter p ~f:(fun (y, _) -> y = "target") - | NRFunApp (_, _, _) + | NRFunApp (_, _) |Break | Continue | Return _ | Skip |IfElse (_, _, _) |While (_, _) @@ -523,7 +534,7 @@ let live_variables_transfer (never_kill : string Set.Poly.t) | Assignment ((x, _, []), _) | Decl {decl_id= x; _} -> Set.Poly.singleton x | TargetPE _ - |NRFunApp (_, _, _) + |NRFunApp (_, _) |Break | Continue | Return _ | Skip |IfElse (_, _, _) |While (_, _) @@ -542,7 +553,7 @@ let rec used_subexpressions_expr (e : Expr.Typed.t) = (Expr.Typed.Set.singleton e) ( match e.pattern with | Var _ | Lit (_, _) -> Expr.Typed.Set.empty - | FunApp (_, _, l) -> + | FunApp (_, l) -> Expr.Typed.Set.union_list (List.map ~f:used_subexpressions_expr l) | TernaryIf (e1, e2, e3) -> Expr.Typed.Set.union_list @@ -580,7 +591,7 @@ let rec used_expressions_stmt_help f [ f e ; used_expressions_stmt_help f b1.pattern ; used_expressions_stmt_help f b2.pattern ] - | NRFunApp (_, _, l) -> Expr.Typed.Set.union_list (List.map ~f l) + | NRFunApp (_, l) -> Expr.Typed.Set.union_list (List.map ~f l) | Decl _ | Return None | Break | Continue | Skip -> Expr.Typed.Set.empty | IfElse (e, b, None) | While (e, b) -> Expr.Typed.Set.union (f e) (used_expressions_stmt_help f b.pattern) @@ -614,7 +625,7 @@ let top_used_expressions_stmt_help f (Expr.Typed.Set.union_list (List.map ~f:(used_expressions_idx_help f) l)) | While (e, _) | IfElse (e, _, _) -> f e - | NRFunApp (_, _, l) -> Expr.Typed.Set.union_list (List.map ~f l) + | NRFunApp (_, l) -> Expr.Typed.Set.union_list (List.map ~f l) | Profile _ | Block _ | SList _ | Decl _ |Return None |Break | Continue | Skip -> @@ -899,7 +910,7 @@ let rec declared_variables_stmt | Decl {decl_id= x; _} -> Set.Poly.singleton x | Assignment (_, _) |TargetPE _ - |NRFunApp (_, _, _) + |NRFunApp (_, _) |Break | Continue | Return _ | Skip -> Set.Poly.empty | IfElse (_, b1, Some b2) -> diff --git a/src/analysis_and_optimization/Optimize.ml b/src/analysis_and_optimization/Optimize.ml index 84e303dc49..9582524aa9 100644 --- a/src/analysis_and_optimization/Optimize.ml +++ b/src/analysis_and_optimization/Optimize.ml @@ -219,7 +219,7 @@ let rec inline_function_expression propto adt fim match pattern with | Var _ -> ([], [], e) | Lit (_, _) -> ([], [], e) - | FunApp (t, s, es) -> ( + | FunApp (kind, es) -> ( let dse_list = List.map ~f:(inline_function_expression propto adt fim) es in @@ -231,30 +231,48 @@ let rec inline_function_expression propto adt fim List.concat (List.rev (List.map ~f:(function _, x, _ -> x) dse_list)) in let es = List.map ~f:(function _, _, x -> x) dse_list in - let s = if propto then s else Middle.Utils.stdlib_distribution_name s in - match Map.find fim s with - | None -> (d_list, s_list, {e with pattern= FunApp (t, s, es)}) - | Some (rt, args, b) -> - let x = Gensym.generate ~prefix:"inline_" () in - let handle = handle_early_returns (Some x) in - let d_list2, s_list2, (e : Expr.Typed.t) = - ( [ Stmt.Fixed.Pattern.Decl - {decl_adtype= adt; decl_id= x; decl_type= Option.value_exn rt} - ] - (* We should minimize the code that's having its variables + match kind with + | CompilerInternal _ -> + (d_list, s_list, {e with pattern= FunApp (kind, es)}) + | UserDefined fname | StanLib fname -> ( + let s = + if propto then fname + else Middle.Utils.stdlib_distribution_name fname + in + match Map.find fim s with + | None -> + ( d_list + , s_list + , { e with + pattern= + FunApp + ( ( match kind with + | UserDefined _ -> UserDefined s + | _ -> StanLib s ) + , es ) } ) + | Some (rt, args, b) -> + let x = Gensym.generate ~prefix:"inline_" () in + let handle = handle_early_returns (Some x) in + let d_list2, s_list2, (e : Expr.Typed.t) = + ( [ Stmt.Fixed.Pattern.Decl + { decl_adtype= adt + ; decl_id= x + ; decl_type= Option.value_exn rt } ] + (* We should minimize the code that's having its variables replaced to avoid conflict with the (two) new dummy variables introduced by inlining *) - , [handle (replace_fresh_local_vars (subst_args_stmt args es b))] - , { pattern= Var x - ; meta= - Expr.Typed.Meta. - { type_= Type.to_unsized (Option.value_exn rt) - ; adlevel= adt - ; loc= Location_span.empty } } ) - in - let d_list = d_list @ d_list2 in - let s_list = s_list @ s_list2 in - (d_list, s_list, e) ) + , [ handle + (replace_fresh_local_vars (subst_args_stmt args es b)) ] + , { pattern= Var x + ; meta= + Expr.Typed.Meta. + { type_= Type.to_unsized (Option.value_exn rt) + ; adlevel= adt + ; loc= Location_span.empty } } ) + in + let d_list = d_list @ d_list2 in + let s_list = s_list @ s_list2 in + (d_list, s_list, e) ) ) | TernaryIf (e1, e2, e3) -> let dl1, sl1, e1 = inline_function_expression propto adt fim e1 in let dl2, sl2, e2 = inline_function_expression propto adt fim e2 in @@ -347,7 +365,7 @@ let rec inline_function_statement propto adt fim Stmt.Fixed.({pattern; meta}) = | TargetPE e -> let d, s, e = inline_function_expression propto adt fim e in slist_concat_no_loc (d @ s) (TargetPE e) - | NRFunApp (t, s, es) -> + | NRFunApp (kind, es) -> let dse_list = List.map ~f:(inline_function_expression propto adt fim) es in @@ -362,14 +380,17 @@ let rec inline_function_statement propto adt fim Stmt.Fixed.({pattern; meta}) = in let es = List.map ~f:(function _, _, x -> x) dse_list in slist_concat_no_loc (d_list @ s_list) - ( match Map.find fim s with - | None -> NRFunApp (t, s, es) - | Some (_, args, b) -> - let b = replace_fresh_local_vars b in - let b = handle_early_returns None b in - (subst_args_stmt args es - {pattern= b; meta= Location_span.empty}) - .pattern ) + ( match kind with + | CompilerInternal _ -> NRFunApp (kind, es) + | UserDefined s | StanLib s -> ( + match Map.find fim s with + | None -> NRFunApp (kind, es) + | Some (_, args, b) -> + let b = replace_fresh_local_vars b in + let b = handle_early_returns None b in + (subst_args_stmt args es + {pattern= b; meta= Location_span.empty}) + .pattern ) ) | Return e -> ( match e with | None -> Return None @@ -499,7 +520,7 @@ let rec contains_top_break_or_continue Stmt.Fixed.({pattern; _}) = | Break | Continue -> true | Assignment (_, _) |TargetPE _ - |NRFunApp (_, _, _) + |NRFunApp (_, _) |Return _ | Decl _ |While (_, _) |For _ | Skip -> @@ -565,7 +586,7 @@ let unroll_loop_one_step_statement _ = else IfElse ( Expr.Fixed. - {lower with pattern= FunApp (StanLib, "Geq__", [upper; lower])} + {lower with pattern= FunApp (StanLib "Geq__", [upper; lower])} , { pattern= (let body_unrolled = subst_args_stmt [loopvar] [lower] @@ -581,8 +602,7 @@ let unroll_loop_one_step_statement _ = { lower with pattern= FunApp - ( StanLib - , "Plus__" + ( StanLib "Plus__" , [lower; Expr.Helpers.loop_bottom] ) } } ; meta= Location_span.empty } in @@ -666,26 +686,21 @@ and accum_any pred b e = b || expr_any pred e let can_side_effect_top_expr (e : Expr.Typed.t) = match e.pattern with - | FunApp (t, f, _) -> - String.suffix f 3 = "_lp" - || (t = CompilerInternal && f = Internal_fun.to_string FnReadParam) - || (t = CompilerInternal && f = Internal_fun.to_string FnReadData) - || (t = CompilerInternal && f = Internal_fun.to_string FnWriteParam) - || (t = CompilerInternal && f = Internal_fun.to_string FnConstrain) - || (t = CompilerInternal && f = Internal_fun.to_string FnValidateSize) - || (t = CompilerInternal && f = Internal_fun.to_string FnValidateSize) - || t = CompilerInternal - && f = Internal_fun.to_string FnValidateSizeSimplex - || t = CompilerInternal - && f = Internal_fun.to_string FnValidateSizeUnitVector - || (t = CompilerInternal && f = Internal_fun.to_string FnUnconstrain) + | FunApp ((UserDefined f | StanLib f), _) -> String.suffix f 3 = "_lp" + | FunApp + ( CompilerInternal + ( FnReadParam | FnReadData | FnWriteParam | FnConstrain _ + | FnValidateSize | FnValidateSizeSimplex | FnValidateSizeUnitVector + | FnUnconstrain _ ) + , _ ) -> + true | _ -> false let cannot_duplicate_expr (e : Expr.Typed.t) = let pred e = can_side_effect_top_expr e || ( match e.pattern with - | FunApp (_, f, _) -> String.suffix f 4 = "_rng" + | FunApp ((UserDefined f | StanLib f), _) -> String.suffix f 4 = "_rng" | _ -> false ) || (preserve_stability && UnsizedType.is_autodiffable e.meta.type_) in @@ -746,7 +761,7 @@ let dead_code_elimination (mir : Program.Typed.t) = due to side effects. *) (* TODO: maybe we should revisit that. *) | Decl _ | TargetPE _ - |NRFunApp (_, _, _) + |NRFunApp (_, _) |Break | Continue | Return _ | Skip -> stmt | IfElse (e, b1, b2) -> ( diff --git a/src/analysis_and_optimization/Partial_evaluator.ml b/src/analysis_and_optimization/Partial_evaluator.ml index c33d72b639..f24ac3ca1b 100644 --- a/src/analysis_and_optimization/Partial_evaluator.ml +++ b/src/analysis_and_optimization/Partial_evaluator.ml @@ -84,583 +84,571 @@ let rec eval_expr (e : Expr.Typed.t) = pattern= ( match e.pattern with | Var _ | Lit (_, _) -> e.pattern - | FunApp (t, f, l) -> + | FunApp (kind, l) -> ( let l = List.map ~f:eval_expr l in - let get_fun_or_op_rt_opt name l' = - let argument_types = - List.map ~f:(fun x -> Expr.Typed.(adlevel_of x, type_of x)) l' - in - Operator.of_string_opt name - |> Option.value_map - ~f:(fun op -> - Stan_math_signatures.operator_stan_math_return_type op - argument_types ) - ~default: - (Stan_math_signatures.stan_math_returntype name - argument_types) - in - let try_partially_evaluate_to e = - Expr.Fixed.Pattern.( - match e with - | FunApp (StanLib, f', l') -> ( - match get_fun_or_op_rt_opt f' l' with - | Some _ -> FunApp (StanLib, f', l') - | None -> FunApp (StanLib, f, l) ) - | e -> e) - in - try_partially_evaluate_to - ( match (f, l) with - (* TODO: deal with tilde statements and unnormalized distributions properly here *) - | ( "bernoulli_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "inv_logit" - , [ { pattern= - FunApp - ( StanLib - , "Plus__" - , [ alpha - ; { pattern= - FunApp (StanLib, "Times__", [x; beta]); _ - } ] ); _ } ] ); _ } ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - (StanLib, "bernoulli_logit_glm_lpmf", [y; x; alpha; beta]) - | ( "bernoulli_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "inv_logit" - , [ { pattern= - FunApp - ( StanLib - , "Plus__" - , [ { pattern= - FunApp (StanLib, "Times__", [x; beta]); _ - } - ; alpha ] ); _ } ] ); _ } ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - (StanLib, "bernoulli_logit_glm_lpmf", [y; x; alpha; beta]) - | ( "bernoulli_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "inv_logit" - , [{pattern= FunApp (StanLib, "Times__", [x; beta]); _}] - ); _ } ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - ( StanLib - , "bernoulli_logit_glm_lpmf" - , [y; x; Expr.Helpers.zero; beta] ) - | ( "bernoulli_logit_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "Plus__" - , [ alpha - ; {pattern= FunApp (StanLib, "Times__", [x; beta]); _} - ] ); _ } ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - (StanLib, "bernoulli_logit_glm_lpmf", [y; x; alpha; beta]) - | ( "bernoulli_logit_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "Plus__" - , [ {pattern= FunApp (StanLib, "Times__", [x; beta]); _} - ; alpha ] ); _ } ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - (StanLib, "bernoulli_logit_glm_lpmf", [y; x; alpha; beta]) - | ( "bernoulli_logit_lpmf" - , [y; {pattern= FunApp (StanLib, "Times__", [x; beta]); _}] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - ( StanLib - , "bernoulli_logit_glm_lpmf" - , [y; x; Expr.Helpers.zero; beta] ) - | ( "bernoulli_lpmf" - , [y; {pattern= FunApp (StanLib, "inv_logit", [alpha]); _}] ) -> - FunApp (StanLib, "bernoulli_logit_lpmf", [y; alpha]) - | ( "bernoulli_rng" - , [{pattern= FunApp (StanLib, "inv_logit", [alpha]); _}] ) -> - FunApp (StanLib, "bernoulli_logit_rng", [alpha]) - | ( "binomial_lpmf" - , [y; n; {pattern= FunApp (StanLib, "inv_logit", [alpha]); _}] ) - -> - FunApp (StanLib, "binomial_logit_lpmf", [y; n; alpha]) - | ( "categorical_lpmf" - , [y; {pattern= FunApp (StanLib, "inv_logit", [alpha]); _}] ) -> - FunApp (StanLib, "categorical_logit_lpmf", [y; alpha]) - | ( "categorical_rng" - , [{pattern= FunApp (StanLib, "inv_logit", [alpha]); _}] ) -> - FunApp (StanLib, "categorical_logit_rng", [alpha]) - | "columns_dot_product", [x; y] when Expr.Typed.equal x y -> - FunApp (StanLib, "columns_dot_self", [x]) - | "dot_product", [x; y] when Expr.Typed.equal x y -> - FunApp (StanLib, "dot_self", [x]) - | "inv", [{pattern= FunApp (StanLib, "sqrt", l); _}] -> - FunApp (StanLib, "inv_sqrt", l) - | "inv", [{pattern= FunApp (StanLib, "square", [x]); _}] -> - FunApp (StanLib, "inv_square", [x]) - | ( "log" - , [ { pattern= - FunApp - ( StanLib - , "Minus__" - , [y; {pattern= FunApp (StanLib, "exp", [x]); _}] ); _ - } ] ) - when is_int 1 y && not preserve_stability -> - FunApp (StanLib, "log1m_exp", [x]) - | ( "log" - , [ { pattern= - FunApp - ( StanLib - , "Minus__" - , [y; {pattern= FunApp (StanLib, "inv_logit", [x]); _}] - ); _ } ] ) - when is_int 1 y && not preserve_stability -> - FunApp (StanLib, "log1m_inv_logit", [x]) - | "log", [{pattern= FunApp (StanLib, "Minus__", [y; x]); _}] - when is_int 1 y && not preserve_stability -> - FunApp (StanLib, "log1m", [x]) - | ( "log" - , [ { pattern= - FunApp - ( StanLib - , "Plus__" - , [y; {pattern= FunApp (StanLib, "exp", [x]); _}] ); _ - } ] ) - when is_int 1 y && not preserve_stability -> - FunApp (StanLib, "log1p_exp", [x]) - | "log", [{pattern= FunApp (StanLib, "Plus__", [y; x]); _}] - when is_int 1 y && not preserve_stability -> - FunApp (StanLib, "log1p", [x]) - | ( "log" - , [ { pattern= - FunApp - ( StanLib - , "fabs" - , [{pattern= FunApp (StanLib, "determinant", [x]); _}] - ); _ } ] ) -> - FunApp (StanLib, "log_determinant", [x]) - | ( "log" - , [ { pattern= - FunApp - ( StanLib - , "Minus__" - , [ {pattern= FunApp (StanLib, "exp", [x]); _} - ; {pattern= FunApp (StanLib, "exp", [y]); _} ] ); _ - } ] ) -> - FunApp (StanLib, "log_diff_exp", [x; y]) - (* TODO: log_mix?*) - | "log", [{pattern= FunApp (StanLib, "falling_factorial", l); _}] - -> - FunApp (StanLib, "log_falling_factorial", l) - | "log", [{pattern= FunApp (StanLib, "rising_factorial", l); _}] -> - FunApp (StanLib, "log_rising_factorial", l) - | "log", [{pattern= FunApp (StanLib, "inv_logit", l); _}] -> - FunApp (StanLib, "log_inv_logit", l) - | "log", [{pattern= FunApp (StanLib, "softmax", l); _}] -> - FunApp (StanLib, "log_softmax", l) - | ( "log" - , [ { pattern= - FunApp - ( StanLib - , "sum" - , [{pattern= FunApp (StanLib, "exp", l); _}] ); _ } ] ) - -> - FunApp (StanLib, "log_sum_exp", l) - | ( "log" - , [ { pattern= - FunApp - ( StanLib - , "Plus__" - , [ {pattern= FunApp (StanLib, "exp", [x]); _} - ; {pattern= FunApp (StanLib, "exp", [y]); _} ] ); _ - } ] ) -> - FunApp (StanLib, "log_sum_exp", [x; y]) - | ( "multi_normal_lpdf" - , [y; mu; {pattern= FunApp (StanLib, "inverse", [tau]); _}] ) -> - FunApp (StanLib, "multi_normal_prec_lpdf", [y; mu; tau]) - | ( "neg_binomial_2_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "exp" - , [ { pattern= - FunApp - ( StanLib - , "Plus__" - , [ alpha - ; { pattern= - FunApp (StanLib, "Times__", [x; beta]); _ - } ] ); _ } ] ); _ } - ; sigma ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - ( StanLib - , "neg_binomial_2_log_glm_lpmf" - , [y; x; alpha; beta; sigma] ) - | ( "neg_binomial_2_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "exp" - , [ { pattern= - FunApp - ( StanLib - , "Plus__" - , [ { pattern= - FunApp (StanLib, "Times__", [x; beta]); _ - } - ; alpha ] ); _ } ] ); _ } - ; sigma ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - ( StanLib - , "neg_binomial_2_log_glm_lpmf" - , [y; x; alpha; beta; sigma] ) - | ( "neg_binomial_2_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "exp" - , [{pattern= FunApp (StanLib, "Times__", [x; beta]); _}] - ); _ } - ; sigma ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - ( StanLib - , "neg_binomial_2_log_glm_lpmf" - , [y; x; Expr.Helpers.zero; beta; sigma] ) - | ( "neg_binomial_2_log_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "Plus__" - , [ alpha - ; {pattern= FunApp (StanLib, "Times__", [x; beta]); _} - ] ); _ } - ; sigma ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - ( StanLib - , "neg_binomial_2_log_glm_lpmf" - , [y; x; alpha; beta; sigma] ) - | ( "neg_binomial_2_log_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "Plus__" - , [ {pattern= FunApp (StanLib, "Times__", [x; beta]); _} - ; alpha ] ); _ } - ; sigma ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - ( StanLib - , "neg_binomial_2_log_glm_lpmf" - , [y; x; alpha; beta; sigma] ) - | ( "neg_binomial_2_log_lpmf" - , [y; {pattern= FunApp (StanLib, "Times__", [x; beta]); _}; sigma] - ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - ( StanLib - , "neg_binomial_2_log_glm_lpmf" - , [y; x; Expr.Helpers.zero; beta; sigma] ) - | ( "neg_binomial_2_lpmf" - , [y; {pattern= FunApp (StanLib, "exp", [eta]); _}; phi] ) -> - FunApp (StanLib, "neg_binomial_2_log_lpmf", [y; eta; phi]) - | ( "neg_binomial_2_rng" - , [{pattern= FunApp (StanLib, "exp", [eta]); _}; phi] ) -> - FunApp (StanLib, "neg_binomial_2_log_rng", [eta; phi]) - | ( "normal_lpdf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "Plus__" - , [ alpha - ; {pattern= FunApp (StanLib, "Times__", [x; beta]); _} - ] ); _ } - ; sigma ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - (StanLib, "normal_id_glm_lpdf", [y; x; alpha; beta; sigma]) - | ( "normal_lpdf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "Plus__" - , [ {pattern= FunApp (StanLib, "Times__", [x; beta]); _} - ; alpha ] ); _ } - ; sigma ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - (StanLib, "normal_id_glm_lpdf", [y; x; alpha; beta; sigma]) - | ( "normal_lpdf" - , [y; {pattern= FunApp (StanLib, "Times__", [x; beta]); _}; sigma] - ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - ( StanLib - , "normal_id_glm_lpdf" - , [y; x; Expr.Helpers.zero; beta; sigma] ) - | ( "poisson_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "exp" - , [ { pattern= - FunApp - ( StanLib - , "Plus__" - , [ alpha - ; { pattern= - FunApp (StanLib, "Times__", [x; beta]); _ - } ] ); _ } ] ); _ } ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp (StanLib, "poisson_log_glm_lpmf", [y; x; alpha; beta]) - | ( "poisson_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "exp" - , [ { pattern= - FunApp - ( StanLib - , "Plus__" - , [ { pattern= - FunApp (StanLib, "Times__", [x; beta]); _ - } - ; alpha ] ); _ } ] ); _ } ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp (StanLib, "poisson_log_glm_lpmf", [y; x; alpha; beta]) - | ( "poisson_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "exp" - , [{pattern= FunApp (StanLib, "Times__", [x; beta]); _}] - ); _ } ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - ( StanLib - , "poisson_log_glm_lpmf" - , [y; x; Expr.Helpers.zero; beta] ) - | ( "poisson_log_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "Plus__" - , [ alpha - ; {pattern= FunApp (StanLib, "Times__", [x; beta]); _} - ] ); _ } ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp (StanLib, "poisson_log_glm_lpmf", [y; x; alpha; beta]) - | ( "poisson_log_lpmf" - , [ y - ; { pattern= - FunApp - ( StanLib - , "Plus__" - , [ {pattern= FunApp (StanLib, "Times__", [x; beta]); _} - ; alpha ] ); _ } ] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp (StanLib, "poisson_log_glm_lpmf", [y; x; alpha; beta]) - | ( "poisson_log_lpmf" - , [y; {pattern= FunApp (StanLib, "Times__", [x; beta]); _}] ) - when Expr.Typed.type_of x = UMatrix -> - FunApp - ( StanLib - , "poisson_log_glm_lpmf" - , [y; x; Expr.Helpers.zero; beta] ) - | "poisson_lpmf", [y; {pattern= FunApp (StanLib, "exp", [eta]); _}] - -> - FunApp (StanLib, "poisson_log_lpmf", [y; eta]) - | "poisson_rng", [{pattern= FunApp (StanLib, "exp", [eta]); _}] -> - FunApp (StanLib, "poisson_log_rng", [eta]) - | "pow", [y; x] when is_int 2 y -> FunApp (StanLib, "exp2", [x]) - | "rows_dot_product", [x; y] when Expr.Typed.equal x y -> - FunApp (StanLib, "rows_dot_self", [x]) - | "pow", [x; {pattern= Lit (Int, "2"); _}] -> - FunApp (StanLib, "square", [x]) - | "pow", [x; {pattern= Lit (Real, "0.5"); _}] -> - FunApp (StanLib, "sqrt", [x]) - | "pow", [x; {pattern= FunApp (StanLib, "Divide__", [y; z]); _}] - when is_int 1 y && is_int 2 z -> - FunApp (StanLib, "sqrt", [x]) - (* This is wrong; if both are type UInt the exponent is rounds down to zero. *) - | "square", [{pattern= FunApp (StanLib, "sd", [x]); _}] -> - FunApp (StanLib, "variance", [x]) - | "sqrt", [x] when is_int 2 x -> FunApp (StanLib, "sqrt2", []) - | ( "sum" - , [ { pattern= - FunApp - ( StanLib - , "square" - , [{pattern= FunApp (StanLib, "Minus__", [x; y]); _}] ); _ - } ] ) -> - FunApp (StanLib, "squared_distance", [x; y]) - | "sum", [{pattern= FunApp (StanLib, "diagonal", l); _}] -> - FunApp (StanLib, "trace", l) - | ( "trace" - , [ { pattern= - FunApp - ( StanLib - , "Times__" - , [ { pattern= - FunApp - ( StanLib - , "Times__" - , [ { pattern= - FunApp - ( StanLib - , "Times__" - , [ d - ; { pattern= - FunApp - ( StanLib - , "transpose" - , [b] ); _ } ] ); _ } - ; a ] ); _ } - ; c ] ); _ } ] ) - when Expr.Typed.equal b c -> - FunApp (StanLib, "trace_gen_quad_form", [d; a; b]) - | "trace", [{pattern= FunApp (StanLib, "quad_form", [a; b]); _}] -> - FunApp (StanLib, "trace_quad_form", [a; b]) - | "Minus__", [x; {pattern= FunApp (StanLib, "erf", l); _}] - when is_int 1 x -> - FunApp (StanLib, "erfc", l) - | "Minus__", [x; {pattern= FunApp (StanLib, "erfc", l); _}] - when is_int 1 x -> - FunApp (StanLib, "erf", l) - | "Minus__", [{pattern= FunApp (StanLib, "exp", l'); _}; x] - when is_int 1 x && not preserve_stability -> - FunApp (StanLib, "expm1", l') - | "Plus__", [{pattern= FunApp (StanLib, "Times__", [x; y]); _}; z] - |"Plus__", [z; {pattern= FunApp (StanLib, "Times__", [x; y]); _}] - when not preserve_stability -> - FunApp (StanLib, "fma", [x; y; z]) - | "Minus__", [x; {pattern= FunApp (StanLib, "gamma_p", l); _}] - when is_int 1 x -> - FunApp (StanLib, "gamma_q", l) - | "Minus__", [x; {pattern= FunApp (StanLib, "gamma_q", l); _}] - when is_int 1 x -> - FunApp (StanLib, "gamma_p", l) - | ( "Times__" - , [ { pattern= - FunApp - ( StanLib - , "matrix_exp" - , [{pattern= FunApp (StanLib, "Times__", [t; a]); _}] ); _ - } - ; b ] ) - when Expr.Typed.type_of t = UInt || Expr.Typed.type_of t = UReal - -> - FunApp (StanLib, "scale_matrix_exp_multiply", [t; a; b]) - | ( "Times__" - , [ { pattern= - FunApp - ( StanLib - , "matrix_exp" - , [{pattern= FunApp (StanLib, "Times__", [a; t]); _}] ); _ - } - ; b ] ) - when Expr.Typed.type_of t = UInt || Expr.Typed.type_of t = UReal - -> - FunApp (StanLib, "scale_matrix_exp_multiply", [t; a; b]) - | "Times__", [{pattern= FunApp (StanLib, "matrix_exp", [a]); _}; b] - -> - FunApp (StanLib, "matrix_exp_multiply", [a; b]) - | "Times__", [x; {pattern= FunApp (StanLib, "log", [y]); _}] - |"Times__", [{pattern= FunApp (StanLib, "log", [y]); _}; x] - when not preserve_stability -> - FunApp (StanLib, "lmultiply", [x; y]) - | ( "Times__" - , [ {pattern= FunApp (StanLib, "diag_matrix", [v]); _} - ; {pattern= FunApp (StanLib, "diag_post_multiply", [a; w]); _} - ] ) - when Expr.Typed.equal v w -> - FunApp (StanLib, "quad_form_diag", [a; v]) - | ( "Times__" - , [ {pattern= FunApp (StanLib, "diag_pre_multiply", [v; a]); _} - ; {pattern= FunApp (StanLib, "diag_matrix", [w]); _} ] ) - when Expr.Typed.equal v w -> - FunApp (StanLib, "quad_form_diag", [a; v]) - | ( "Times__" - , [ {pattern= FunApp (StanLib, "transpose", [b]); _} - ; {pattern= FunApp (StanLib, "Times__", [a; c]); _} ] ) - when Expr.Typed.equal b c -> - FunApp (StanLib, "quad_form", [a; b]) - | ( "Times__" - , [ { pattern= - FunApp - ( StanLib - , "Times__" - , [{pattern= FunApp (StanLib, "transpose", [b]); _}; a] - ); _ } - ; c ] ) - when Expr.Typed.equal b c -> - FunApp (StanLib, "quad_form", [a; b]) - | ( "Times__" - , [e1'; {pattern= FunApp (StanLib, "diag_matrix", [v]); _}] ) -> - FunApp (StanLib, "diag_post_multiply", [e1'; v]) - | ( "Times__" - , [{pattern= FunApp (StanLib, "diag_matrix", [v]); _}; e2'] ) -> - FunApp (StanLib, "diag_pre_multiply", [v; e2']) - (* Constant folding for operators *) - | op, [{pattern= Lit (Int, i); _}] -> ( - match op with - | "PPlus__" | "PMinus__" | "PNot__" -> - apply_prefix_operator_int op (Int.of_string i) - | _ -> FunApp (t, op, l) ) - | op, [{pattern= Lit (Real, r); _}] -> ( - match op with - | "PPlus__" | "PMinus__" -> - apply_prefix_operator_real op (Float.of_string r) - | _ -> FunApp (t, op, l) ) - | op, [{pattern= Lit (Int, i1); _}; {pattern= Lit (Int, i2); _}] -> ( - match op with - | "Plus__" | "Minus__" | "Times__" | "Divide__" | "IntDivide__" - |"Modulo__" | "Or__" | "And__" | "Equals__" | "NEquals__" - |"Less__" | "Leq__" | "Greater__" | "Geq__" -> - apply_operator_int op (Int.of_string i1) (Int.of_string i2) - | _ -> FunApp (t, op, l) ) - | op, [{pattern= Lit (Real, i1); _}; {pattern= Lit (Real, i2); _}] - |op, [{pattern= Lit (Int, i1); _}; {pattern= Lit (Real, i2); _}] - |op, [{pattern= Lit (Real, i1); _}; {pattern= Lit (Int, i2); _}] - -> ( - match op with - | "Plus__" | "Minus__" | "Times__" | "Divide__" -> - apply_arithmetic_operator_real op (Float.of_string i1) - (Float.of_string i2) - | "Or__" | "And__" | "Equals__" | "NEquals__" | "Less__" - |"Leq__" | "Greater__" | "Geq__" -> - apply_logical_operator_real op (Float.of_string i1) - (Float.of_string i2) - | _ -> FunApp (t, op, l) ) - | _ -> FunApp (t, f, l) ) + match kind with + | UserDefined _ | CompilerInternal _ -> FunApp (kind, l) + | StanLib f -> + let get_fun_or_op_rt_opt name l' = + let argument_types = + List.map + ~f:(fun x -> Expr.Typed.(adlevel_of x, type_of x)) + l' + in + Operator.of_string_opt name + |> Option.value_map + ~f:(fun op -> + Stan_math_signatures.operator_stan_math_return_type op + argument_types ) + ~default: + (Stan_math_signatures.stan_math_returntype name + argument_types) + in + let try_partially_evaluate_stanlib e = + Expr.Fixed.Pattern.( + match e with + | FunApp (StanLib f', l') -> ( + match get_fun_or_op_rt_opt f' l' with + | Some _ -> FunApp (StanLib f', l') + | None -> FunApp (StanLib f, l) ) + | e -> e) + in + try_partially_evaluate_stanlib + ( match (f, l) with + (* TODO: deal with tilde statements and unnormalized distributions properly here *) + | ( "bernoulli_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "inv_logit" + , [ { pattern= + FunApp + ( StanLib "Plus__" + , [ alpha + ; { pattern= + FunApp + (StanLib "Times__", [x; beta]); _ + } ] ); _ } ] ); _ } ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + (StanLib "bernoulli_logit_glm_lpmf", [y; x; alpha; beta]) + | ( "bernoulli_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "inv_logit" + , [ { pattern= + FunApp + ( StanLib "Plus__" + , [ { pattern= + FunApp + (StanLib "Times__", [x; beta]); _ + } + ; alpha ] ); _ } ] ); _ } ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + (StanLib "bernoulli_logit_glm_lpmf", [y; x; alpha; beta]) + | ( "bernoulli_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "inv_logit" + , [ { pattern= FunApp (StanLib "Times__", [x; beta]); _ + } ] ); _ } ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + ( StanLib "bernoulli_logit_glm_lpmf" + , [y; x; Expr.Helpers.zero; beta] ) + | ( "bernoulli_logit_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "Plus__" + , [ alpha + ; { pattern= FunApp (StanLib "Times__", [x; beta]); _ + } ] ); _ } ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + (StanLib "bernoulli_logit_glm_lpmf", [y; x; alpha; beta]) + | ( "bernoulli_logit_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "Plus__" + , [ { pattern= FunApp (StanLib "Times__", [x; beta]); _ + } + ; alpha ] ); _ } ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + (StanLib "bernoulli_logit_glm_lpmf", [y; x; alpha; beta]) + | ( "bernoulli_logit_lpmf" + , [y; {pattern= FunApp (StanLib "Times__", [x; beta]); _}] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + ( StanLib "bernoulli_logit_glm_lpmf" + , [y; x; Expr.Helpers.zero; beta] ) + | ( "bernoulli_lpmf" + , [y; {pattern= FunApp (StanLib "inv_logit", [alpha]); _}] ) + -> + FunApp (StanLib "bernoulli_logit_lpmf", [y; alpha]) + | ( "bernoulli_rng" + , [{pattern= FunApp (StanLib "inv_logit", [alpha]); _}] ) -> + FunApp (StanLib "bernoulli_logit_rng", [alpha]) + | ( "binomial_lpmf" + , [y; n; {pattern= FunApp (StanLib "inv_logit", [alpha]); _}] + ) -> + FunApp (StanLib "binomial_logit_lpmf", [y; n; alpha]) + | ( "categorical_lpmf" + , [y; {pattern= FunApp (StanLib "inv_logit", [alpha]); _}] ) + -> + FunApp (StanLib "categorical_logit_lpmf", [y; alpha]) + | ( "categorical_rng" + , [{pattern= FunApp (StanLib "inv_logit", [alpha]); _}] ) -> + FunApp (StanLib "categorical_logit_rng", [alpha]) + | "columns_dot_product", [x; y] when Expr.Typed.equal x y -> + FunApp (StanLib "columns_dot_self", [x]) + | "dot_product", [x; y] when Expr.Typed.equal x y -> + FunApp (StanLib "dot_self", [x]) + | "inv", [{pattern= FunApp (StanLib "sqrt", l); _}] -> + FunApp (StanLib "inv_sqrt", l) + | "inv", [{pattern= FunApp (StanLib "square", [x]); _}] -> + FunApp (StanLib "inv_square", [x]) + | ( "log" + , [ { pattern= + FunApp + ( StanLib "Minus__" + , [y; {pattern= FunApp (StanLib "exp", [x]); _}] ); _ + } ] ) + when is_int 1 y && not preserve_stability -> + FunApp (StanLib "log1m_exp", [x]) + | ( "log" + , [ { pattern= + FunApp + ( StanLib "Minus__" + , [ y + ; {pattern= FunApp (StanLib "inv_logit", [x]); _} + ] ); _ } ] ) + when is_int 1 y && not preserve_stability -> + FunApp (StanLib "log1m_inv_logit", [x]) + | "log", [{pattern= FunApp (StanLib "Minus__", [y; x]); _}] + when is_int 1 y && not preserve_stability -> + FunApp (StanLib "log1m", [x]) + | ( "log" + , [ { pattern= + FunApp + ( StanLib "Plus__" + , [y; {pattern= FunApp (StanLib "exp", [x]); _}] ); _ + } ] ) + when is_int 1 y && not preserve_stability -> + FunApp (StanLib "log1p_exp", [x]) + | "log", [{pattern= FunApp (StanLib "Plus__", [y; x]); _}] + when is_int 1 y && not preserve_stability -> + FunApp (StanLib "log1p", [x]) + | ( "log" + , [ { pattern= + FunApp + ( StanLib "fabs" + , [ { pattern= FunApp (StanLib "determinant", [x]); _ + } ] ); _ } ] ) -> + FunApp (StanLib "log_determinant", [x]) + | ( "log" + , [ { pattern= + FunApp + ( StanLib "Minus__" + , [ {pattern= FunApp (StanLib "exp", [x]); _} + ; {pattern= FunApp (StanLib "exp", [y]); _} ] ); _ + } ] ) -> + FunApp (StanLib "log_diff_exp", [x; y]) + (* TODO: log_mix?*) + | "log", [{pattern= FunApp (StanLib "falling_factorial", l); _}] + -> + FunApp (StanLib "log_falling_factorial", l) + | "log", [{pattern= FunApp (StanLib "rising_factorial", l); _}] + -> + FunApp (StanLib "log_rising_factorial", l) + | "log", [{pattern= FunApp (StanLib "inv_logit", l); _}] -> + FunApp (StanLib "log_inv_logit", l) + | "log", [{pattern= FunApp (StanLib "softmax", l); _}] -> + FunApp (StanLib "log_softmax", l) + | ( "log" + , [ { pattern= + FunApp + ( StanLib "sum" + , [{pattern= FunApp (StanLib "exp", l); _}] ); _ } + ] ) -> + FunApp (StanLib "log_sum_exp", l) + | ( "log" + , [ { pattern= + FunApp + ( StanLib "Plus__" + , [ {pattern= FunApp (StanLib "exp", [x]); _} + ; {pattern= FunApp (StanLib "exp", [y]); _} ] ); _ + } ] ) -> + FunApp (StanLib "log_sum_exp", [x; y]) + | ( "multi_normal_lpdf" + , [y; mu; {pattern= FunApp (StanLib "inverse", [tau]); _}] ) + -> + FunApp (StanLib "multi_normal_prec_lpdf", [y; mu; tau]) + | ( "neg_binomial_2_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "exp" + , [ { pattern= + FunApp + ( StanLib "Plus__" + , [ alpha + ; { pattern= + FunApp + (StanLib "Times__", [x; beta]); _ + } ] ); _ } ] ); _ } + ; sigma ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + ( StanLib "neg_binomial_2_log_glm_lpmf" + , [y; x; alpha; beta; sigma] ) + | ( "neg_binomial_2_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "exp" + , [ { pattern= + FunApp + ( StanLib "Plus__" + , [ { pattern= + FunApp + (StanLib "Times__", [x; beta]); _ + } + ; alpha ] ); _ } ] ); _ } + ; sigma ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + ( StanLib "neg_binomial_2_log_glm_lpmf" + , [y; x; alpha; beta; sigma] ) + | ( "neg_binomial_2_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "exp" + , [ { pattern= FunApp (StanLib "Times__", [x; beta]); _ + } ] ); _ } + ; sigma ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + ( StanLib "neg_binomial_2_log_glm_lpmf" + , [y; x; Expr.Helpers.zero; beta; sigma] ) + | ( "neg_binomial_2_log_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "Plus__" + , [ alpha + ; { pattern= FunApp (StanLib "Times__", [x; beta]); _ + } ] ); _ } + ; sigma ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + ( StanLib "neg_binomial_2_log_glm_lpmf" + , [y; x; alpha; beta; sigma] ) + | ( "neg_binomial_2_log_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "Plus__" + , [ { pattern= FunApp (StanLib "Times__", [x; beta]); _ + } + ; alpha ] ); _ } + ; sigma ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + ( StanLib "neg_binomial_2_log_glm_lpmf" + , [y; x; alpha; beta; sigma] ) + | ( "neg_binomial_2_log_lpmf" + , [ y + ; {pattern= FunApp (StanLib "Times__", [x; beta]); _} + ; sigma ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + ( StanLib "neg_binomial_2_log_glm_lpmf" + , [y; x; Expr.Helpers.zero; beta; sigma] ) + | ( "neg_binomial_2_lpmf" + , [y; {pattern= FunApp (StanLib "exp", [eta]); _}; phi] ) -> + FunApp (StanLib "neg_binomial_2_log_lpmf", [y; eta; phi]) + | ( "neg_binomial_2_rng" + , [{pattern= FunApp (StanLib "exp", [eta]); _}; phi] ) -> + FunApp (StanLib "neg_binomial_2_log_rng", [eta; phi]) + | ( "normal_lpdf" + , [ y + ; { pattern= + FunApp + ( StanLib "Plus__" + , [ alpha + ; { pattern= FunApp (StanLib "Times__", [x; beta]); _ + } ] ); _ } + ; sigma ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + (StanLib "normal_id_glm_lpdf", [y; x; alpha; beta; sigma]) + | ( "normal_lpdf" + , [ y + ; { pattern= + FunApp + ( StanLib "Plus__" + , [ { pattern= FunApp (StanLib "Times__", [x; beta]); _ + } + ; alpha ] ); _ } + ; sigma ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + (StanLib "normal_id_glm_lpdf", [y; x; alpha; beta; sigma]) + | ( "normal_lpdf" + , [ y + ; {pattern= FunApp (StanLib "Times__", [x; beta]); _} + ; sigma ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + ( StanLib "normal_id_glm_lpdf" + , [y; x; Expr.Helpers.zero; beta; sigma] ) + | ( "poisson_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "exp" + , [ { pattern= + FunApp + ( StanLib "Plus__" + , [ alpha + ; { pattern= + FunApp + (StanLib "Times__", [x; beta]); _ + } ] ); _ } ] ); _ } ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp (StanLib "poisson_log_glm_lpmf", [y; x; alpha; beta]) + | ( "poisson_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "exp" + , [ { pattern= + FunApp + ( StanLib "Plus__" + , [ { pattern= + FunApp + (StanLib "Times__", [x; beta]); _ + } + ; alpha ] ); _ } ] ); _ } ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp (StanLib "poisson_log_glm_lpmf", [y; x; alpha; beta]) + | ( "poisson_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "exp" + , [ { pattern= FunApp (StanLib "Times__", [x; beta]); _ + } ] ); _ } ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + ( StanLib "poisson_log_glm_lpmf" + , [y; x; Expr.Helpers.zero; beta] ) + | ( "poisson_log_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "Plus__" + , [ alpha + ; { pattern= FunApp (StanLib "Times__", [x; beta]); _ + } ] ); _ } ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp (StanLib "poisson_log_glm_lpmf", [y; x; alpha; beta]) + | ( "poisson_log_lpmf" + , [ y + ; { pattern= + FunApp + ( StanLib "Plus__" + , [ { pattern= FunApp (StanLib "Times__", [x; beta]); _ + } + ; alpha ] ); _ } ] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp (StanLib "poisson_log_glm_lpmf", [y; x; alpha; beta]) + | ( "poisson_log_lpmf" + , [y; {pattern= FunApp (StanLib "Times__", [x; beta]); _}] ) + when Expr.Typed.type_of x = UMatrix -> + FunApp + ( StanLib "poisson_log_glm_lpmf" + , [y; x; Expr.Helpers.zero; beta] ) + | ( "poisson_lpmf" + , [y; {pattern= FunApp (StanLib "exp", [eta]); _}] ) -> + FunApp (StanLib "poisson_log_lpmf", [y; eta]) + | "poisson_rng", [{pattern= FunApp (StanLib "exp", [eta]); _}] + -> + FunApp (StanLib "poisson_log_rng", [eta]) + | "pow", [y; x] when is_int 2 y -> FunApp (StanLib "exp2", [x]) + | "rows_dot_product", [x; y] when Expr.Typed.equal x y -> + FunApp (StanLib "rows_dot_self", [x]) + | "pow", [x; {pattern= Lit (Int, "2"); _}] -> + FunApp (StanLib "square", [x]) + | "pow", [x; {pattern= Lit (Real, "0.5"); _}] -> + FunApp (StanLib "sqrt", [x]) + | "pow", [x; {pattern= FunApp (StanLib "Divide__", [y; z]); _}] + when is_int 1 y && is_int 2 z -> + FunApp (StanLib "sqrt", [x]) + (* This is wrong; if both are type UInt the exponent is rounds down to zero. *) + | "square", [{pattern= FunApp (StanLib "sd", [x]); _}] -> + FunApp (StanLib "variance", [x]) + | "sqrt", [x] when is_int 2 x -> FunApp (StanLib "sqrt2", []) + | ( "sum" + , [ { pattern= + FunApp + ( StanLib "square" + , [{pattern= FunApp (StanLib "Minus__", [x; y]); _}] + ); _ } ] ) -> + FunApp (StanLib "squared_distance", [x; y]) + | "sum", [{pattern= FunApp (StanLib "diagonal", l); _}] -> + FunApp (StanLib "trace", l) + | ( "trace" + , [ { pattern= + FunApp + ( StanLib "Times__" + , [ { pattern= + FunApp + ( StanLib "Times__" + , [ { pattern= + FunApp + ( StanLib "Times__" + , [ d + ; { pattern= + FunApp + ( StanLib "transpose" + , [b] ); _ } ] ); _ + } + ; a ] ); _ } + ; c ] ); _ } ] ) + when Expr.Typed.equal b c -> + FunApp (StanLib "trace_gen_quad_form", [d; a; b]) + | "trace", [{pattern= FunApp (StanLib "quad_form", [a; b]); _}] + -> + FunApp (StanLib "trace_quad_form", [a; b]) + | "Minus__", [x; {pattern= FunApp (StanLib "erf", l); _}] + when is_int 1 x -> + FunApp (StanLib "erfc", l) + | "Minus__", [x; {pattern= FunApp (StanLib "erfc", l); _}] + when is_int 1 x -> + FunApp (StanLib "erf", l) + | "Minus__", [{pattern= FunApp (StanLib "exp", l'); _}; x] + when is_int 1 x && not preserve_stability -> + FunApp (StanLib "expm1", l') + | ( "Plus__" + , [{pattern= FunApp (StanLib "Times__", [x; y]); _}; z] ) + |( "Plus__" + , [z; {pattern= FunApp (StanLib "Times__", [x; y]); _}] ) + when not preserve_stability -> + FunApp (StanLib "fma", [x; y; z]) + | "Minus__", [x; {pattern= FunApp (StanLib "gamma_p", l); _}] + when is_int 1 x -> + FunApp (StanLib "gamma_q", l) + | "Minus__", [x; {pattern= FunApp (StanLib "gamma_q", l); _}] + when is_int 1 x -> + FunApp (StanLib "gamma_p", l) + | ( "Times__" + , [ { pattern= + FunApp + ( StanLib "matrix_exp" + , [{pattern= FunApp (StanLib "Times__", [t; a]); _}] + ); _ } + ; b ] ) + when Expr.Typed.type_of t = UInt + || Expr.Typed.type_of t = UReal -> + FunApp (StanLib "scale_matrix_exp_multiply", [t; a; b]) + | ( "Times__" + , [ { pattern= + FunApp + ( StanLib "matrix_exp" + , [{pattern= FunApp (StanLib "Times__", [a; t]); _}] + ); _ } + ; b ] ) + when Expr.Typed.type_of t = UInt + || Expr.Typed.type_of t = UReal -> + FunApp (StanLib "scale_matrix_exp_multiply", [t; a; b]) + | ( "Times__" + , [{pattern= FunApp (StanLib "matrix_exp", [a]); _}; b] ) -> + FunApp (StanLib "matrix_exp_multiply", [a; b]) + | "Times__", [x; {pattern= FunApp (StanLib "log", [y]); _}] + |"Times__", [{pattern= FunApp (StanLib "log", [y]); _}; x] + when not preserve_stability -> + FunApp (StanLib "lmultiply", [x; y]) + | ( "Times__" + , [ {pattern= FunApp (StanLib "diag_matrix", [v]); _} + ; { pattern= FunApp (StanLib "diag_post_multiply", [a; w]); _ + } ] ) + when Expr.Typed.equal v w -> + FunApp (StanLib "quad_form_diag", [a; v]) + | ( "Times__" + , [ {pattern= FunApp (StanLib "diag_pre_multiply", [v; a]); _} + ; {pattern= FunApp (StanLib "diag_matrix", [w]); _} ] ) + when Expr.Typed.equal v w -> + FunApp (StanLib "quad_form_diag", [a; v]) + | ( "Times__" + , [ {pattern= FunApp (StanLib "transpose", [b]); _} + ; {pattern= FunApp (StanLib "Times__", [a; c]); _} ] ) + when Expr.Typed.equal b c -> + FunApp (StanLib "quad_form", [a; b]) + | ( "Times__" + , [ { pattern= + FunApp + ( StanLib "Times__" + , [ {pattern= FunApp (StanLib "transpose", [b]); _} + ; a ] ); _ } + ; c ] ) + when Expr.Typed.equal b c -> + FunApp (StanLib "quad_form", [a; b]) + | ( "Times__" + , [e1'; {pattern= FunApp (StanLib "diag_matrix", [v]); _}] ) + -> + FunApp (StanLib "diag_post_multiply", [e1'; v]) + | ( "Times__" + , [{pattern= FunApp (StanLib "diag_matrix", [v]); _}; e2'] ) + -> + FunApp (StanLib "diag_pre_multiply", [v; e2']) + (* Constant folding for operators *) + | op, [{pattern= Lit (Int, i); _}] -> ( + match op with + | "PPlus__" | "PMinus__" | "PNot__" -> + apply_prefix_operator_int op (Int.of_string i) + | _ -> FunApp (kind, l) ) + | op, [{pattern= Lit (Real, r); _}] -> ( + match op with + | "PPlus__" | "PMinus__" -> + apply_prefix_operator_real op (Float.of_string r) + | _ -> FunApp (kind, l) ) + | op, [{pattern= Lit (Int, i1); _}; {pattern= Lit (Int, i2); _}] + -> ( + match op with + | "Plus__" | "Minus__" | "Times__" | "Divide__" + |"IntDivide__" | "Modulo__" | "Or__" | "And__" + |"Equals__" | "NEquals__" | "Less__" | "Leq__" + |"Greater__" | "Geq__" -> + apply_operator_int op (Int.of_string i1) + (Int.of_string i2) + | _ -> FunApp (kind, l) ) + | ( op + , [{pattern= Lit (Real, i1); _}; {pattern= Lit (Real, i2); _}] + ) + |( op + , [{pattern= Lit (Int, i1); _}; {pattern= Lit (Real, i2); _}] + ) + |( op + , [{pattern= Lit (Real, i1); _}; {pattern= Lit (Int, i2); _}] + ) -> ( + match op with + | "Plus__" | "Minus__" | "Times__" | "Divide__" -> + apply_arithmetic_operator_real op (Float.of_string i1) + (Float.of_string i2) + | "Or__" | "And__" | "Equals__" | "NEquals__" | "Less__" + |"Leq__" | "Greater__" | "Geq__" -> + apply_logical_operator_real op (Float.of_string i1) + (Float.of_string i2) + | _ -> FunApp (kind, l) ) + | _ -> FunApp (kind, l) ) ) | TernaryIf (e1, e2, e3) -> ( match (eval_expr e1, eval_expr e2, eval_expr e3) with | x, _, e3' when is_int 0 x -> e3'.pattern diff --git a/src/analysis_and_optimization/Pedantic_analysis.ml b/src/analysis_and_optimization/Pedantic_analysis.ml index 5c5c6d565c..314092d78a 100644 --- a/src/analysis_and_optimization/Pedantic_analysis.ml +++ b/src/analysis_and_optimization/Pedantic_analysis.ml @@ -51,8 +51,7 @@ let list_multi_twiddles (mir : Program.Typed.t) : (string, Location_span.t Set.Poly.t) Map.Poly.t = match stmt.pattern with | Stmt.Fixed.Pattern.TargetPE - { pattern= - Expr.Fixed.Pattern.FunApp (_, _, {pattern= Var vname; _} :: _); _ + { pattern= Expr.Fixed.Pattern.FunApp (_, {pattern= Var vname; _} :: _); _ } -> Map.Poly.singleton vname (Set.Poly.singleton stmt.meta) | _ -> Map.Poly.empty @@ -179,7 +178,7 @@ let list_param_dependant_fundef_cf (mir : Program.Typed.t) union_map (stmt_rhs stmt) ~f:(fun rhs_expr -> expr_collect_exprs rhs_expr ~f:(fun rhs_subexpr -> match rhs_subexpr.pattern with - | Expr.Fixed.Pattern.FunApp (UserDefined, fname, _) + | Expr.Fixed.Pattern.FunApp (UserDefined fname, _) when fname = fun_def.fdname -> Some (rhs_subexpr, label) | _ -> None ) ) @@ -188,7 +187,7 @@ let list_param_dependant_fundef_cf (mir : Program.Typed.t) in let arg_exprs (fcall_expr : Expr.Typed.t) = match fcall_expr with - | {pattern= Expr.Fixed.Pattern.FunApp (UserDefined, fname, arg_exprs); _} + | {pattern= Expr.Fixed.Pattern.FunApp (UserDefined fname, arg_exprs); _} when fname = fun_def.fdname -> Set.Poly.map dep_args ~f:(fun (loc, ix, arg_name) -> (loc, List.nth_exn arg_exprs ix, arg_name) ) @@ -262,7 +261,7 @@ let compiletime_value_of_expr let list_distributions (mir : Program.Typed.t) : dist_info Set.Poly.t = let take_dist (expr : Expr.Typed.t) = match expr.pattern with - | Expr.Fixed.Pattern.FunApp (StanLib, fname, arg_exprs) -> ( + | Expr.Fixed.Pattern.FunApp (StanLib fname, arg_exprs) -> ( match chop_dist_name fname with | Some dname -> let params = parameter_set mir in diff --git a/src/frontend/Ast_to_Mir.ml b/src/frontend/Ast_to_Mir.ml index 1d62937090..a382db6007 100644 --- a/src/frontend/Ast_to_Mir.ml +++ b/src/frontend/Ast_to_Mir.ml @@ -9,9 +9,10 @@ let unwrap_return_exn = function [%message "Unexpected return type " (x : UnsizedType.returntype option)] -let trans_fn_kind = function - | Ast.StanLib -> Fun_kind.StanLib - | UserDefined -> UserDefined +let trans_fn_kind kind name = + match kind with + | Ast.StanLib -> Fun_kind.StanLib name + | UserDefined -> UserDefined name let without_underscores = String.filter ~f:(( <> ) '_') @@ -44,7 +45,7 @@ let rec op_to_funapp op args = and loc = Ast.expr_loc_lub args and adlevel = Ast.expr_ad_lub args in Expr. - { Fixed.pattern= FunApp (StanLib, Operator.to_string op, trans_exprs args) + { Fixed.pattern= FunApp (StanLib (Operator.to_string op), trans_exprs args) ; meta= Expr.Typed.Meta.create ~type_ ~adlevel ~loc () } and trans_expr {Ast.expr; Ast.emeta} = @@ -71,18 +72,12 @@ and trans_expr {Ast.expr; Ast.emeta} = | RealNumeral x -> Lit (Real, format_number x) |> ewrap | FunApp (fn_kind, {name; _}, args) | CondDistApp (fn_kind, {name; _}, args) -> - FunApp (trans_fn_kind fn_kind, name, trans_exprs args) |> ewrap - | GetLP | GetTarget -> FunApp (StanLib, "target", []) |> ewrap + FunApp (trans_fn_kind fn_kind name, trans_exprs args) |> ewrap + | GetLP | GetTarget -> FunApp (StanLib "target", []) |> ewrap | ArrayExpr eles -> - FunApp - (CompilerInternal, Internal_fun.to_string FnMakeArray, trans_exprs eles) - |> ewrap + FunApp (CompilerInternal FnMakeArray, trans_exprs eles) |> ewrap | RowVectorExpr eles -> - FunApp - ( CompilerInternal - , Internal_fun.to_string FnMakeRowVec - , trans_exprs eles ) - |> ewrap + FunApp (CompilerInternal FnMakeRowVec, trans_exprs eles) |> ewrap | Indexed (lhs, indices) -> Indexed (trans_expr lhs, List.map ~f:trans_idx indices) |> ewrap @@ -105,7 +100,7 @@ let trans_sizedtype = SizedType.map trans_expr let neg_inf = Expr. - { Fixed.pattern= FunApp (StanLib, Internal_fun.to_string FnNegInf, []) + { Fixed.pattern= FunApp (CompilerInternal FnNegInf, []) ; meta= Typed.Meta.{type_= UReal; loc= Location_span.empty; adlevel= DataOnly} } @@ -198,13 +193,6 @@ let trans_printables mloc (ps : Ast.typed_expression Ast.printable list) = They are only interpreted by trans_decl.*) type constrainaction = Check | Constrain | Unconstrain [@@deriving sexp] -let constrainaction_fname c = - Internal_fun.to_string - ( match c with - | Check -> FnCheck - | Constrain -> FnConstrain - | Unconstrain -> FnUnconstrain ) - type decl_context = {dconstrain: constrainaction option; dadlevel: UnsizedType.autodifftype} @@ -253,8 +241,7 @@ let same_shape decl_id decl_var id var meta = [ Stmt. { Fixed.pattern= NRFunApp - ( StanLib - , "check_matching_dims" + ( StanLib "check_matching_dims" , Expr.Helpers. [str "constraint"; str decl_id; decl_var; str id; var] ) ; meta } ] @@ -363,24 +350,26 @@ let remove_possibly_exn pst action loc = "Error extracting sizedtype" ~action ~loc:(loc : Location_span.t)] let constrain_decl st dconstrain t decl_id decl_var smeta = - let mkstring = mkstring (Expr.Typed.loc_of decl_var) in match Option.map ~f:(constrain_constraint_to_string t) dconstrain with | None | Some "" -> [] | Some constraint_str -> let dc = Option.value_exn dconstrain in - let fname = constrainaction_fname dc in let extra_args = match dconstrain with | Some Constrain -> extra_constraint_args st t | _ -> [] in - let args var = - (var :: mkstring constraint_str :: extract_transform_args var t) - @ extra_args + let args var = (var :: extract_transform_args var t) @ extra_args in + let internal_fun = + match dc with + | Check -> Internal_fun.FnCheck constraint_str + | Constrain -> FnConstrain constraint_str + | Unconstrain -> FnUnconstrain constraint_str in let constrainvar var = { var with - Expr.Fixed.pattern= FunApp (CompilerInternal, fname, args var) } + Expr.Fixed.pattern= FunApp (CompilerInternal internal_fun, args var) + } in let unconstrained_decls, decl_id, ut = let ut = SizedType.to_unsized (param_size t st) in @@ -406,9 +395,9 @@ let rec check_decl var decl_type' decl_id decl_trans smeta adlevel = let decl_type = remove_possibly_exn decl_type' "check" smeta in let chk fn var = let check_id id = - let id_str = Expr.Helpers.str (Fmt.strf "%a" Expr.Typed.pp id) in + let id_str = Fmt.strf "%a" Expr.Typed.pp id in let args = extract_transform_args id decl_trans in - Stmt.Helpers.internal_nrfunapp FnCheck (fn :: id_str :: id :: args) smeta + Stmt.Helpers.internal_nrfunapp (FnCheck id_str) (fn :: id :: args) smeta in [(constraint_forl decl_trans) decl_type check_id var smeta] in @@ -553,26 +542,26 @@ let rec trans_stmt ud_dists (declc : decl_context) (ts : Ast.typed_statement) = , rhs ) |> swrap | Ast.NRFunApp (fn_kind, {name; _}, args) -> - NRFunApp (trans_fn_kind fn_kind, name, trans_exprs args) |> swrap + NRFunApp (trans_fn_kind fn_kind name, trans_exprs args) |> swrap | Ast.IncrementLogProb e | Ast.TargetPE e -> TargetPE (trans_expr e) |> swrap | Ast.Tilde {arg; distribution; args; truncation} -> let suffix = Stan_math_signatures.dist_name_suffix ud_dists distribution.name in + let name = distribution.name ^ Utils.unnormalized_suffix suffix in let kind = let possible_names = List.map ~f:(( ^ ) distribution.name) Utils.distribution_suffices |> String.Set.of_list in if List.exists ~f:(fun (n, _) -> Set.mem possible_names n) ud_dists - then Fun_kind.UserDefined - else StanLib + then Fun_kind.UserDefined name + else StanLib name in - let name = distribution.name ^ Utils.unnormalized_suffix suffix in let add_dist = Stmt.Fixed.Pattern.TargetPE Expr. - { Fixed.pattern= FunApp (kind, name, trans_exprs (arg :: args)) + { Fixed.pattern= FunApp (kind, trans_exprs (arg :: args)) ; meta= Typed.Meta.create ~type_:UReal ~loc:mloc ~adlevel:(Ast.expr_ad_lub (arg :: args)) @@ -580,17 +569,9 @@ let rec trans_stmt ud_dists (declc : decl_context) (ts : Ast.typed_statement) = in truncate_dist ud_dists distribution arg args truncation @ swrap add_dist | Ast.Print ps -> - NRFunApp - ( CompilerInternal - , Internal_fun.to_string FnPrint - , trans_printables smeta ps ) - |> swrap + NRFunApp (CompilerInternal FnPrint, trans_printables smeta ps) |> swrap | Ast.Reject ps -> - NRFunApp - ( CompilerInternal - , Internal_fun.to_string FnReject - , trans_printables smeta ps ) - |> swrap + NRFunApp (CompilerInternal FnReject, trans_printables smeta ps) |> swrap | Ast.IfThenElse (cond, ifb, elseb) -> IfElse ( trans_expr cond @@ -745,8 +726,7 @@ let trans_sizedtype_decl declc tr name = | Some Constrain, CholeskyCov -> [ { Stmt.Fixed.pattern= NRFunApp - ( StanLib - , "check_greater_or_equal" + ( StanLib "check_greater_or_equal" , Expr.Helpers. [ str ("cholesky_factor_cov " ^ name) ; str @@ -836,9 +816,15 @@ let trans_block ud_dists declc block prog = Option.value ~default:[] (get_block block prog) |> List.fold_right ~f ~init:([], [], []) +let stmt_contains_check stmt = + let is_check = function + | Fun_kind.CompilerInternal (Internal_fun.FnCheck _) -> true + | _ -> false + in + Stmt.Helpers.contains_fn_kind is_check stmt + let migrate_checks_to_end_of_block stmts = - let is_check = Stmt.Helpers.contains_fn FnCheck in - let checks, not_checks = List.partition_tf ~f:is_check stmts in + let checks, not_checks = List.partition_tf ~f:stmt_contains_check stmts in not_checks @ checks let trans_prog filename (p : Ast.typed_program) : Program.Typed.t = @@ -916,7 +902,7 @@ let trans_prog filename (p : Ast.typed_program) : Program.Typed.t = txparam_gq |> List.partition3_map ~f:(function | {pattern= Decl _; _} as d -> `Fst d - | s when Stmt.Helpers.contains_fn FnCheck s -> `Snd s + | s when stmt_contains_check s -> `Snd s | s -> `Trd s ) in let compiler_if_return cond = @@ -926,7 +912,7 @@ let trans_prog filename (p : Ast.typed_program) : Program.Typed.t = ; meta= Location_span.empty } in let iexpr pattern = Expr.{pattern; Fixed.meta= Typed.Meta.empty} in - let fnot e = FunApp (StanLib, Operator.to_string PNot, [e]) |> iexpr in + let fnot e = FunApp (StanLib (Operator.to_string PNot), [e]) |> iexpr in let tparam_early_return = let to_var fv = iexpr (Var (Flag_vars.to_string fv)) in let v1 = to_var EmitTransformedParameters in diff --git a/src/middle/Expr.ml b/src/middle/Expr.ml index 15dfdd65ea..6a08500b72 100644 --- a/src/middle/Expr.ml +++ b/src/middle/Expr.ml @@ -10,7 +10,7 @@ module Fixed = struct type 'a t = | Var of string | Lit of litType * string - | FunApp of Fun_kind.t * string * 'a list + | FunApp of Internal_fun.t Fun_kind.t * 'a list | TernaryIf of 'a * 'a * 'a | EAnd of 'a * 'a | EOr of 'a * 'a @@ -21,14 +21,15 @@ module Fixed = struct | Var varname -> Fmt.string ppf varname | Lit (Str, str) -> Fmt.pf ppf "%S" str | Lit (_, str) -> Fmt.string ppf str - | FunApp (StanLib, name, [lhs; rhs]) + | FunApp (StanLib name, [lhs; rhs]) when Option.is_some (Operator.of_string_opt name) -> Fmt.pf ppf "(%a %a %a)" pp_e lhs Operator.pp (Option.value_exn (Operator.of_string_opt name)) pp_e rhs - | FunApp (_, name, args) -> - Fmt.string ppf name ; - Fmt.(list pp_e ~sep:Fmt.comma |> parens) ppf args + | FunApp (fun_kind, args) -> + Fmt.pf ppf "%a(%a)" Fun_kind.pp fun_kind + Fmt.(list pp_e ~sep:Fmt.comma) + args | TernaryIf (pred, texpr, fexpr) -> Fmt.pf ppf {|@[%a@ %a@,%a@,%a@ %a@]|} pp_e pred pp_builtin_syntax "?" pp_e texpr pp_builtin_syntax ":" pp_e fexpr @@ -135,7 +136,7 @@ module Labelled = struct and associate_pattern assocs = function | Fixed.Pattern.Lit _ | Var _ -> assocs - | FunApp (_, _, args) -> + | FunApp (_, args) -> List.fold args ~init:assocs ~f:(fun accu x -> associate ~init:accu x) | EAnd (e1, e2) | EOr (e1, e2) -> associate ~init:(associate ~init:assocs e2) e1 @@ -163,27 +164,26 @@ module Helpers = struct let binop e1 op e2 = { Fixed.meta= Typed.Meta.empty - ; pattern= FunApp (StanLib, Operator.to_string op, [e1; e2]) } + ; pattern= FunApp (StanLib (Operator.to_string op), [e1; e2]) } let loop_bottom = one let internal_funapp fn args meta = - { Fixed.meta - ; pattern= FunApp (CompilerInternal, Internal_fun.to_string fn, args) } + {Fixed.meta; pattern= FunApp (CompilerInternal fn, args)} - let contains_fn fn ?(init = false) e = - let fstr = Internal_fun.to_string fn in + let contains_fn_kind is_fn_kind ?(init = false) e = let rec aux accu Fixed.({pattern; _}) = accu || match pattern with - | FunApp (_, name, _) when name = fstr -> true + | FunApp (kind, _) when is_fn_kind kind -> true | x -> Fixed.Pattern.fold aux accu x in aux init e let%test "expr contains fn" = - internal_funapp FnReadData [] () |> contains_fn FnReadData + internal_funapp FnReadData [] () + |> contains_fn_kind (fun kind -> kind = CompilerInternal FnReadData) let rec infer_type_of_indexed ut indices = match (ut, indices) with diff --git a/src/middle/Expr.mli b/src/middle/Expr.mli index 5d8879a482..333f78507d 100644 --- a/src/middle/Expr.mli +++ b/src/middle/Expr.mli @@ -8,7 +8,7 @@ module Fixed : sig type 'a t = | Var of string | Lit of litType * string - | FunApp of Fun_kind.t * string * 'a list + | FunApp of Internal_fun.t Fun_kind.t * 'a list | TernaryIf of 'a * 'a * 'a | EAnd of 'a * 'a | EOr of 'a * 'a @@ -85,7 +85,10 @@ module Helpers : sig val binop : Typed.t -> Operator.t -> Typed.t -> Typed.t val loop_bottom : Typed.t val internal_funapp : Internal_fun.t -> 'a Fixed.t list -> 'a -> 'a Fixed.t - val contains_fn : Internal_fun.t -> ?init:bool -> 'a Fixed.t -> bool + + val contains_fn_kind : + (Internal_fun.t Fun_kind.t -> bool) -> ?init:bool -> 'a Fixed.t -> bool + val infer_type_of_indexed : UnsizedType.t -> 'a Index.t list -> UnsizedType.t val add_int_index : Typed.t -> Typed.t Index.t -> Typed.t val collect_indices : 'a Fixed.t -> 'a Fixed.t Index.t list diff --git a/src/middle/Fun_kind.ml b/src/middle/Fun_kind.ml index 7728311a6a..63808d8c66 100644 --- a/src/middle/Fun_kind.ml +++ b/src/middle/Fun_kind.ml @@ -1,2 +1,11 @@ -type t = StanLib | CompilerInternal | UserDefined +open Core_kernel + +type 'internal t = + | StanLib of string + | CompilerInternal of 'internal + | UserDefined of string [@@deriving compare, sexp, hash] + +let pp ppf = function + | StanLib s | UserDefined s -> Fmt.string ppf s + | CompilerInternal internal -> Internal_fun.pp ppf internal diff --git a/src/middle/Internal_fun.ml b/src/middle/Internal_fun.ml index e889bedf49..fd0460e1db 100644 --- a/src/middle/Internal_fun.ml +++ b/src/middle/Internal_fun.ml @@ -5,6 +5,7 @@ type t = | FnMakeArray | FnMakeRowVec | FnNegInf + (* In AST_to_MIR being used as StanLib *) | FnReadData (* XXX move these to a backend specific file?*) | FnReadParam @@ -12,16 +13,18 @@ type t = | FnValidateSize | FnValidateSizeSimplex | FnValidateSizeUnitVector - | FnConstrain - | FnUnconstrain - | FnCheck + | FnConstrain of string + | FnUnconstrain of string + | FnCheck of string | FnPrint | FnReject | FnResizeToMatch | FnNaN -[@@deriving sexp] + | FnDeepCopy +[@@deriving sexp, hash, compare] let to_string x = Sexp.to_string (sexp_of_t x) ^ "__" +let pp ppf internal = Fmt.string ppf (to_string internal) let of_string_opt x = try diff --git a/src/middle/Stmt.ml b/src/middle/Stmt.ml index f3a95ff519..e45147f407 100644 --- a/src/middle/Stmt.ml +++ b/src/middle/Stmt.ml @@ -10,7 +10,7 @@ module Fixed = struct type ('a, 'b) t = | Assignment of 'a lvalue * 'a | TargetPE of 'a - | NRFunApp of Fun_kind.t * string * 'a list + | NRFunApp of Internal_fun.t Fun_kind.t * 'a list | Break | Continue | Return of 'a option @@ -36,8 +36,8 @@ module Fixed = struct (assignee, idcs) pp_e rhs | TargetPE expr -> Fmt.pf ppf {|@[%a +=@ %a;@]|} pp_keyword "target" pp_e expr - | NRFunApp (_, name, args) -> - Fmt.pf ppf {|@[%s%a;@]|} name + | NRFunApp (kind, args) -> + Fmt.pf ppf {|@[%a%a;@]|} Fun_kind.pp kind Fmt.(list pp_e ~sep:comma |> parens) args | Break -> pp_keyword ppf "break;" @@ -177,7 +177,7 @@ module Labelled = struct | Fixed.Pattern.Break | Skip | Continue | Return None -> assocs | Return (Some e) | TargetPE e -> {assocs with exprs= Expr.Labelled.associate ~init:assocs.exprs e} - | NRFunApp (_, _, args) -> + | NRFunApp (_, args) -> { assocs with exprs= List.fold args ~init:assocs.exprs ~f:(fun accu x -> @@ -250,9 +250,7 @@ module Helpers = struct {body with Fixed.pattern= Block [decl; assign; body]} let internal_nrfunapp fn args meta = - { Fixed.pattern= - NRFunApp (CompilerInternal, Internal_fun.to_string fn, args) - ; meta } + {Fixed.pattern= NRFunApp (CompilerInternal fn, args); meta} (** [mkfor] returns a MIR For statement that iterates over the given expression [iteratee]. *) @@ -289,21 +287,21 @@ module Helpers = struct let emeta' = {emeta with Expr.Typed.Meta.type_= UInt} in let rows = Expr.Fixed. - {meta= emeta'; pattern= FunApp (StanLib, "rows", [iteratee])} + {meta= emeta'; pattern= FunApp (StanLib "rows", [iteratee])} in mkfor rows (fun e -> for_each bodyfn e smeta) iteratee smeta | UArray _ -> mkfor (len iteratee) bodyfn iteratee smeta | UMathLibraryFunction | UFun _ -> raise_s [%message "can't iterate over " (iteratee : Expr.Typed.t)] - let contains_fn fn ?(init = false) stmt = - let fstr = Internal_fun.to_string fn in + let contains_fn_kind is_fn_kind ?(init = false) stmt = let rec aux accu Fixed.({pattern; _}) = match pattern with - | NRFunApp (_, fname, _) when fname = fstr -> true + | NRFunApp (kind, _) when is_fn_kind kind -> true | stmt_pattern -> Fixed.Pattern.fold_left ~init:accu stmt_pattern - ~f:(fun accu expr -> Expr.Helpers.contains_fn fn ~init:accu expr) + ~f:(fun accu expr -> + Expr.Helpers.contains_fn_kind is_fn_kind ~init:accu expr ) ~g:aux in aux init stmt diff --git a/src/middle/Stmt.mli b/src/middle/Stmt.mli index 6997266b70..e76fce953f 100644 --- a/src/middle/Stmt.mli +++ b/src/middle/Stmt.mli @@ -7,7 +7,7 @@ module Fixed : sig type ('a, 'b) t = | Assignment of 'a lvalue * 'a | TargetPE of 'a - | NRFunApp of Fun_kind.t * string * 'a list + | NRFunApp of Internal_fun.t Fun_kind.t * 'a list | Break | Continue | Return of 'a option @@ -122,7 +122,11 @@ module Helpers : sig val internal_nrfunapp : Internal_fun.t -> 'a Fixed.First.t list -> 'b -> ('a, 'b) Fixed.t - val contains_fn : Internal_fun.t -> ?init:bool -> ('a, 'b) Fixed.t -> bool + val contains_fn_kind : + (Internal_fun.t Fun_kind.t -> bool) + -> ?init:bool + -> ('a, 'b) Fixed.t + -> bool val mkfor : Expr.Typed.t diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index 78fee212f3..855db3d7d6 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -51,7 +51,7 @@ let rec local_scalar ut ad = let minus_one e = { e with Expr.Fixed.pattern= - FunApp (StanLib, Operator.to_string Minus, [e; Expr.Helpers.loop_bottom]) + FunApp (StanLib (Operator.to_string Minus), [e; Expr.Helpers.loop_bottom]) } let is_single_index = function Index.Single _ -> true | _ -> false @@ -290,7 +290,7 @@ and gen_fun_app ppf fname es = | {Expr.Fixed.pattern= Var name; meta= {Expr.Typed.Meta.type_= UFun _; _}} as e -> { e with - pattern= FunApp (StanLib, name ^ functor_suffix_select fname, []) + pattern= FunApp (StanLib (name ^ functor_suffix_select fname), []) } | e -> e in @@ -323,7 +323,10 @@ and gen_fun_app ppf fname es = , "integrate_ode_rk45" , f :: y0 :: t0 :: ts :: theta :: x :: x_int :: tl ) -> (fname, f :: y0 :: t0 :: ts :: theta :: x :: x_int :: msgs :: tl) - | true, x, {pattern= FunApp (_, f, _); _} :: grainsize :: container :: tl + | ( true + , x + , {pattern= FunApp ((UserDefined f | StanLib f), _); _} + :: grainsize :: container :: tl ) when Stan_math_signatures.is_reduce_sum_fn x -> let chop_functor_suffix = String.chop_suffix_exn ~suffix:reduce_sum_functor_suffix @@ -351,7 +354,9 @@ and gen_fun_app ppf fname es = | true, x, f :: y0 :: t0 :: ts :: tl when Stan_math_signatures.is_variadic_ode_fn x -> (fname, f :: y0 :: t0 :: ts :: msgs :: tl) - | true, "map_rect", {pattern= FunApp (_, f, _); _} :: tl -> + | ( true + , "map_rect" + , {pattern= FunApp ((UserDefined f | StanLib f), _); _} :: tl ) -> let next_map_rect_id = Hashtbl.length map_rect_calls + 1 in Hashtbl.add_exn map_rect_calls ~key:next_map_rect_id ~data:f ; (strf "%s<%d, %s>" fname next_map_rect_id f, tl @ [msgs]) @@ -370,8 +375,8 @@ and gen_fun_app ppf fname es = in pf ppf "@[%a@]" pp es -and pp_constrain_funapp constrain_or_un_str ppf = function - | var :: {Expr.Fixed.pattern= Lit (Str, constraint_flavor); _} :: args -> +and pp_constrain_funapp constrain_or_un_str constraint_flavor ppf = function + | var :: args -> pf ppf "@[stan::math::%s_%s(@,%a@])" constraint_flavor constrain_or_un_str (list ~sep:comma pp_expr) (var :: args) | es -> raise_s [%message "Bad constraint " (es : Expr.Typed.t list)] @@ -390,15 +395,15 @@ and pp_compiler_internal_fn ad ut f ppf es = (list ~sep:comma (pp_promoted ad ut)) es in - match Internal_fun.of_string_opt f with - | Some FnMakeArray -> + match f with + | Internal_fun.FnMakeArray -> let ut = match ut with | UnsizedType.UArray ut -> ut | _ -> raise_s [%message "Array literal must have array type"] in pp_array_literal ut ppf es - | Some FnMakeRowVec -> ( + | FnMakeRowVec -> ( match ut with | UnsizedType.URowVector -> let st = local_scalar ut (promote_adtype es) in @@ -412,10 +417,10 @@ and pp_compiler_internal_fn ad ut f ppf es = raise_s [%message "Unexpected type for row vector literal" (ut : UnsizedType.t)] ) - | Some FnConstrain -> pp_constrain_funapp "constrain" ppf es - | Some FnUnconstrain -> pp_constrain_funapp "free" ppf es - | Some FnReadData -> read_data ut ppf es - | Some FnReadParam -> ( + | FnConstrain flavor -> pp_constrain_funapp "constrain" flavor ppf es + | FnUnconstrain flavor -> pp_constrain_funapp "free" flavor ppf es + | FnReadData -> read_data ut ppf es + | FnReadParam -> ( match es with | {Expr.Fixed.pattern= Lit (Str, constraint_string); meta= emeta} :: {Expr.Fixed.pattern= Lit (Int, n_constraint_args_str); _} :: args -> @@ -435,16 +440,15 @@ and pp_compiler_internal_fn ad ut f ppf es = (UnsizedType.AutoDiffable, ut) (list ~sep:comma pp_expr) arg_exprs | _ -> raise_s [%message "emit ReadParam with " (es : Expr.Typed.t list)] ) - | _ -> gen_fun_app ppf f es + | _ -> gen_fun_app ppf (Internal_fun.to_string f) es and pp_promoted ad ut ppf e = match e with | Expr.({Fixed.meta= {Typed.Meta.type_; adlevel; _}; _}) when type_ = ut && adlevel = ad -> pp_expr ppf e - | {pattern= FunApp (CompilerInternal, f, es); _} - when Internal_fun.of_string_opt f = Some FnMakeArray -> - pp_compiler_internal_fn ad ut f ppf es + | {pattern= FunApp (CompilerInternal Internal_fun.FnMakeArray, es); _} -> + pp_compiler_internal_fn ad ut Internal_fun.FnMakeArray ppf es | _ -> pf ppf "stan::math::promote_scalar<%s>(@[%a@])" (local_scalar ut ad) pp_expr e @@ -480,22 +484,20 @@ and pp_expr ppf Expr.Fixed.({pattern; meta} as e) = | Lit (Str, s) -> pf ppf "%S" s | Lit (_, s) -> pf ppf "%s" s | FunApp - ( StanLib - , op + ( StanLib op , [ { meta= {type_= URowVector; _} - ; pattern= FunApp (CompilerInternal, f, es) } ] ) - when Operator.(Some Transpose = of_string_opt op) - && Internal_fun.(Some FnMakeRowVec = of_string_opt f) -> + ; pattern= FunApp (CompilerInternal FnMakeRowVec, es) } ] ) + when Operator.(Some Transpose = of_string_opt op) -> let st = local_scalar UVector (promote_adtype es) in if List.is_empty es then pf ppf "Eigen::Matrix<%s,-1,1>(0)" st else pf ppf "(Eigen::Matrix<%s,-1,1>(%d) <<@ %a).finished()" st (List.length es) (list ~sep:comma pp_expr) es - | FunApp (StanLib, f, es) -> gen_fun_app ppf f es - | FunApp (CompilerInternal, f, es) -> - pp_compiler_internal_fn meta.adlevel meta.type_ - (stan_namespace_qualify f) ppf es - | FunApp (UserDefined, f, es) -> pp_user_defined_fun ppf (f, es) + | FunApp (StanLib f, es) -> gen_fun_app ppf f es + | FunApp (CompilerInternal f, es) -> + pp_compiler_internal_fn meta.adlevel meta.type_ f ppf es + (* stan_namespace_qualify? *) + | FunApp (UserDefined f, es) -> pp_user_defined_fun ppf (f, es) | EAnd (e1, e2) -> pp_logical_op ppf "&&" e1 e2 | EOr (e1, e2) -> pp_logical_op ppf "||" e1 e2 | TernaryIf (ec, et, ef) -> @@ -510,11 +512,8 @@ and pp_expr ppf Expr.Fixed.({pattern; meta} as e) = | Indexed (e, []) -> pp_expr ppf e | Indexed (e, idx) -> ( match e.pattern with - | FunApp (CompilerInternal, f, _) - when Some Internal_fun.FnReadParam = Internal_fun.of_string_opt f -> - pp_expr ppf e - | FunApp (CompilerInternal, f, _) - when Some Internal_fun.FnReadData = Internal_fun.of_string_opt f -> + | FunApp (CompilerInternal FnReadParam, _) -> pp_expr ppf e + | FunApp (CompilerInternal FnReadData, _) -> pp_indexed_simple ppf (strf "%a" pp_expr e, idx) | _ when List.for_all ~f:dont_need_range_check idx @@ -551,20 +550,19 @@ let%expect_test "pp_expr4" = [%expect {| 112 |}] let%expect_test "pp_expr5" = - printf "%s" (pp_unlocated (FunApp (StanLib, "pi", []))) ; + printf "%s" (pp_unlocated (FunApp (StanLib "pi", []))) ; [%expect {| stan::math::pi() |}] let%expect_test "pp_expr6" = printf "%s" - (pp_unlocated (FunApp (StanLib, "sqrt", [dummy_locate (Lit (Int, "123"))]))) ; + (pp_unlocated (FunApp (StanLib "sqrt", [dummy_locate (Lit (Int, "123"))]))) ; [%expect {| stan::math::sqrt(123) |}] let%expect_test "pp_expr7" = printf "%s" (pp_unlocated (FunApp - ( StanLib - , "atan" + ( StanLib "atan" , [dummy_locate (Lit (Int, "123")); dummy_locate (Lit (Real, "1.2"))] ))) ; [%expect {| stan::math::atan(123, 1.2) |}] @@ -585,5 +583,5 @@ let%expect_test "pp_expr10" = let%expect_test "pp_expr11" = printf "%s" (pp_unlocated - (FunApp (UserDefined, "poisson_rng", [dummy_locate (Lit (Int, "123"))]))) ; + (FunApp (UserDefined "poisson_rng", [dummy_locate (Lit (Int, "123"))]))) ; [%expect {| poisson_rng(123, base_rng__, pstream__) |}] diff --git a/src/stan_math_backend/Stan_math_code_gen.ml b/src/stan_math_backend/Stan_math_code_gen.ml index b4b32ad69b..3f8f68e24d 100644 --- a/src/stan_math_backend/Stan_math_code_gen.ml +++ b/src/stan_math_backend/Stan_math_code_gen.ml @@ -851,8 +851,7 @@ let is_fun_used_with_variadic_fn variadic_fn_test p = let rec find_functors_expr accum Expr.Fixed.({pattern; _}) = String.Set.union accum ( match pattern with - | FunApp (StanLib, x, {pattern= Var f; _} :: _) when variadic_fn_test x - -> + | FunApp (StanLib x, {pattern= Var f; _} :: _) when variadic_fn_test x -> String.Set.of_list [Utils.stdlib_distribution_name f] | x -> Expr.Fixed.Pattern.fold find_functors_expr accum x ) in diff --git a/src/stan_math_backend/Statement_gen.ml b/src/stan_math_backend/Statement_gen.ml index 7f152df399..8c4087aeed 100644 --- a/src/stan_math_backend/Statement_gen.ml +++ b/src/stan_math_backend/Statement_gen.ml @@ -109,9 +109,9 @@ let rec pp_statement (ppf : Format.formatter) | _ -> Locations.pp_smeta ppf meta ) ; match pattern with | Assignment - ((vident, _, []), ({pattern= FunApp (CompilerInternal, f, _); _} as rhs)) - when f = Internal_fun.to_string FnReadData - || f = Internal_fun.to_string FnReadParam -> + ( (vident, _, []) + , ( {pattern= FunApp (CompilerInternal (FnReadData | FnReadParam), _); _} + as rhs ) ) -> pf ppf "@[%s = %a;@]" vident pp_expr rhs | Assignment ((vident, _, []), ({meta= Expr.Typed.Meta.({type_= UInt; _}); _} as rhs)) @@ -134,20 +134,16 @@ let rec pp_statement (ppf : Format.formatter) in match e.pattern with | _ when UnsizedType.is_scalar_type (Expr.Typed.type_of e) -> e - | FunApp (CompilerInternal, _, _) -> e + | FunApp (CompilerInternal _, _) -> e | (Indexed ({Expr.Fixed.pattern= Var v; _}, _) | Var v) when v = assignee -> { e with - Expr.Fixed.pattern= - FunApp (CompilerInternal, "stan::model::deep_copy", [e]) } + Expr.Fixed.pattern= FunApp (CompilerInternal FnDeepCopy, [e]) } | _ -> recurse e in let rhs = match rhs.pattern with - | FunApp (CompilerInternal, f, _) - when f = Internal_fun.to_string FnConstrain - || f = Internal_fun.to_string FnUnconstrain -> - rhs + | FunApp (CompilerInternal (FnConstrain _ | FnUnconstrain _), _) -> rhs | _ -> maybe_deep_copy rhs in pf ppf "@[assign(@,%s,@ %a,@ %S%s%a@]);" assignee pp_expr rhs @@ -155,38 +151,32 @@ let rec pp_statement (ppf : Format.formatter) (if List.length idcs = 0 then "" else ", ") pp_indexes idcs | TargetPE e -> pf ppf "@[lp_accum__.add(@,%a@]);" pp_expr e - | NRFunApp (CompilerInternal, fname, args) - when fname = Internal_fun.to_string FnPrint -> + | NRFunApp (CompilerInternal FnPrint, args) -> let pp_arg ppf a = pf ppf "stan_print(pstream__, %a);" pp_expr a in let args = args @ [Expr.Helpers.str "\n"] in pf ppf "if (pstream__) %a" pp_block (list ~sep:cut pp_arg, args) - | NRFunApp (CompilerInternal, fname, args) - when fname = Internal_fun.to_string FnReject -> + | NRFunApp (CompilerInternal FnReject, args) -> let err_strm = "errmsg_stream__" in let add_to_string ppf e = pf ppf "%s << %a;" err_strm pp_expr e in pf ppf "std::stringstream %s;@," err_strm ; pf ppf "%a@," (list ~sep:cut add_to_string) args ; pf ppf "throw std::domain_error(%s.str());" err_strm - | NRFunApp - (CompilerInternal, fname, {pattern= Lit (Str, check_name); _} :: args) - when fname = Internal_fun.to_string FnCheck -> + | NRFunApp ((CompilerInternal (FnCheck _) as kind), args) -> let args = {Expr.Fixed.pattern= Var "function__"; meta= Expr.Typed.Meta.empty} :: args in - pp_statement ppf - { pattern= NRFunApp (CompilerInternal, "check_" ^ check_name, args) - ; meta= stmt.meta } - | NRFunApp (CompilerInternal, fname, [var]) - when fname = Internal_fun.to_string FnWriteParam -> + pp_statement ppf {pattern= NRFunApp (kind, args); meta= stmt.meta} + | NRFunApp (CompilerInternal FnWriteParam, [var]) -> pf ppf "@[vars__.emplace_back(@,%a);@]" pp_expr var - | NRFunApp (CompilerInternal, fname, args) -> + | NRFunApp (CompilerInternal f, args) -> + let fname = Internal_fun.to_string f in let fname, extra_args = trans_math_fn fname in pf ppf "%s(@[%a@]);" fname (list ~sep:comma pp_expr) (extra_args @ args) - | NRFunApp (StanLib, fname, args) -> + | NRFunApp (StanLib fname, args) -> pf ppf "%s(@[%a@]);" fname (list ~sep:comma pp_expr) args - | NRFunApp (UserDefined, fname, args) -> + | NRFunApp (UserDefined fname, args) -> pf ppf "%a;" pp_user_defined_fun (fname, args) | Break -> string ppf "break;" | Continue -> string ppf "continue;" @@ -201,9 +191,9 @@ let rec pp_statement (ppf : Format.formatter) | For { body= { pattern= - Assignment (_, {pattern= FunApp (CompilerInternal, f, _); _}); _ - } as body; _ } - when Internal_fun.of_string_opt f = Some FnReadParam -> + Assignment + (_, {pattern= FunApp (CompilerInternal FnReadParam, _); _}); _ + } as body; _ } -> pp_statement ppf body (* Skip For loop part, just emit body due to the way FnReadParam emits *) | For {loopvar; lower; upper; body} -> diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index 4642ddb054..81a351c7b8 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -51,7 +51,7 @@ let opencl_supported_functions = let opencl_suffix = "_opencl__" let to_matrix_cl e = - Expr.Fixed.{e with pattern= FunApp (StanLib, "to_matrix_cl", [e])} + Expr.Fixed.{e with pattern= FunApp (StanLib "to_matrix_cl", [e])} let rec switch_expr_to_opencl available_cl_vars (Expr.Fixed.({pattern; _}) as e) = @@ -80,11 +80,11 @@ let rec switch_expr_to_opencl available_cl_vars (Expr.Fixed.({pattern; _}) as e) Set.mem opencl_supported_functions (Utils.stdlib_distribution_name f) in match pattern with - | FunApp (StanLib, f, args) when is_fn_opencl_supported f -> + | FunApp (StanLib f, args) when is_fn_opencl_supported f -> let trigger = Map.find opencl_trigger_restrictions (Utils.stdlib_distribution_name f) in - {e with pattern= FunApp (StanLib, f, maybe_map_args args trigger)} + {e with pattern= FunApp (StanLib f, maybe_map_args args trigger)} | x -> { e with pattern= @@ -254,8 +254,10 @@ let escape_name str = let rec add_jacobians Stmt.Fixed.({meta= smeta; pattern}) = match pattern with - | Assignment (lhs, {pattern= FunApp (CompilerInternal, f, args); meta= emeta}) - when Internal_fun.of_string_opt f = Some FnConstrain -> + | Assignment + ( lhs + , { pattern= FunApp (CompilerInternal (FnConstrain trans), args) + ; meta= emeta } ) -> let var n = Expr.{Fixed.pattern= Var n; meta= Typed.Meta.empty} in let assign rhs = Stmt.{Fixed.pattern= Assignment (lhs, rhs); meta= smeta} @@ -265,11 +267,14 @@ let rec add_jacobians Stmt.Fixed.({meta= smeta; pattern}) = ( var "jacobian__" , assign { Expr.Fixed.pattern= - FunApp (CompilerInternal, f, args @ [var "lp__"]) + FunApp + ( CompilerInternal (FnConstrain trans) + , args @ [var "lp__"] ) ; meta= emeta } , Some (assign - { Expr.Fixed.pattern= FunApp (CompilerInternal, f, args) + { Expr.Fixed.pattern= + FunApp (CompilerInternal (FnConstrain trans), args) ; meta= emeta }) ) ; meta= smeta } | ptn -> @@ -420,9 +425,11 @@ let constrain_in_params outvars stmts = let rec change_constrain_target (Stmt.Fixed.({pattern; _}) as s) = match pattern with | Assignment - (lval, {pattern= FunApp (CompilerInternal, f, var :: args); meta}) - when Internal_fun.of_string_opt f = Some FnConstrain - && contains_var_expr (Set.mem target_vars) false var -> + ( lval + , { pattern= + FunApp ((CompilerInternal (FnConstrain _) as kind), var :: args) + ; meta } ) + when contains_var_expr (Set.mem target_vars) false var -> let rec change_var_expr (Expr.Fixed.({pattern; _}) as e) = match pattern with | Var vident when Set.mem target_vars vident -> @@ -435,9 +442,8 @@ let constrain_in_params outvars stmts = pattern= Assignment ( lval - , { pattern= - FunApp (CompilerInternal, f, change_var_expr var :: args) - ; meta } ) } + , {pattern= FunApp (kind, change_var_expr var :: args); meta} + ) } | pattern -> Stmt.Fixed. {s with pattern= Pattern.map Fn.id change_constrain_target pattern} @@ -452,8 +458,8 @@ let rec map_fn_names s = let pattern = Expr.Fixed.( match e.pattern with - | FunApp (k, f, a) when Map.mem fn_name_map f -> - Pattern.FunApp (k, Map.find_exn fn_name_map f, a) + | FunApp (StanLib f, a) when Map.mem fn_name_map f -> + Pattern.FunApp (StanLib (Map.find_exn fn_name_map f), a) | expr -> Pattern.map map_fn_names_expr expr) in {e with pattern} @@ -461,8 +467,8 @@ let rec map_fn_names s = let stmt = Stmt.Fixed.( match s.pattern with - | NRFunApp (k, f, a) when Map.mem fn_name_map f -> - Pattern.NRFunApp (k, Map.find_exn fn_name_map f, a) + | NRFunApp (StanLib f, a) when Map.mem fn_name_map f -> + Pattern.NRFunApp (StanLib (Map.find_exn fn_name_map f), a) | stmt -> Pattern.map map_fn_names_expr map_fn_names stmt) in {s with pattern= stmt} @@ -496,7 +502,7 @@ let%expect_test "collect vars expr" = let args = List.map ~f:mkvar ["y"; "x_opencl__"; "z"; "w_opencl__"] in let fnapp = Expr. - {Fixed.pattern= FunApp (StanLib, "print", args); meta= Typed.Meta.empty} + {Fixed.pattern= FunApp (StanLib "print", args); meta= Typed.Meta.empty} in Stmt.Fixed.{pattern= TargetPE fnapp; meta= Location_span.empty} |> collect_opencl_vars |> String.Set.sexp_of_t |> print_s ; @@ -564,7 +570,7 @@ let trans_prog (p : Program.Typed.t) = match pattern with | IfElse ( { pattern= - FunApp (_, _, [{pattern= Var "emit_generated_quantities__"; _}]); _ + FunApp (_, [{pattern= Var "emit_generated_quantities__"; _}]); _ } , _ , _ ) -> diff --git a/src/tfp_backend/Code_gen.ml b/src/tfp_backend/Code_gen.ml index 4ba156693a..2b0bd2d786 100644 --- a/src/tfp_backend/Code_gen.ml +++ b/src/tfp_backend/Code_gen.ml @@ -19,15 +19,14 @@ let rec pp_expr ppf {Expr.Fixed.pattern; _} = | Var ident -> string ppf ident | Lit (Str, s) -> pf ppf "%S" s | Lit (_, s) -> pf ppf "tf__.cast(%s, tf__.float64)" s - | FunApp (StanLib, f, obs :: dist_params) + | FunApp (StanLib f, obs :: dist_params) when f = Transform_mir.dist_prefix ^ "CholeskyLKJ" -> pf ppf "%s(@[(%a).shape[0], %a@]).log_prob(%a)" f pp_expr obs (list ~sep:comma pp_expr) dist_params pp_expr obs - | FunApp (StanLib, f, obs :: dist_params) + | FunApp (StanLib f, obs :: dist_params) when String.is_prefix ~prefix:Transform_mir.dist_prefix f -> pf ppf "%a.log_prob(%a)" pp_call (f, pp_expr, dist_params) pp_expr obs - | FunApp (StanLib, f, args) when Operator.of_string_opt f |> Option.is_some - -> ( + | FunApp (StanLib f, args) when Operator.of_string_opt f |> Option.is_some -> ( match ( Operator.of_string_opt f |> Option.value_exn |> pystring_of_operator , args ) @@ -36,7 +35,13 @@ let rec pp_expr ppf {Expr.Fixed.pattern; _} = | op, [unary] -> pf ppf "%s%a" op pp_paren unary | op, args -> raise_s [%message "Need to implement" op (args : Expr.Typed.t list)] ) - | FunApp (_, fname, args) -> pp_call ppf (fname, pp_expr, args) + | FunApp ((UserDefined fname | StanLib fname), args) -> + pp_call ppf (fname, pp_expr, args) + | FunApp (CompilerInternal _, _) as e -> + raise_s + [%message + "Not implemented CompilerInternal " + (e : Expr.Typed.Meta.t Expr.Fixed.t Expr.Fixed.Pattern.t)] | TernaryIf (cond, iftrue, iffalse) -> pf ppf "%a if %a else %a" pp_paren iftrue pp_paren cond pp_paren iffalse | EAnd (a, b) -> pf ppf "%a and %a" pp_paren a pp_paren b @@ -59,7 +64,7 @@ and pp_indices ppf = function and pp_paren ppf expr = match expr.Expr.Fixed.pattern with | TernaryIf _ | EAnd _ | EOr _ -> pf ppf "(%a)" pp_expr expr - | FunApp (StanLib, f, _) when Operator.of_string_opt f |> Option.is_some -> + | FunApp (StanLib f, _) when Operator.of_string_opt f |> Option.is_some -> pf ppf "(%a)" pp_expr expr | _ -> pp_expr ppf expr @@ -68,7 +73,7 @@ let rec pp_stmt ppf s = | Assignment ((lhs, _, indices), rhs) -> pf ppf "%s%a = %a" lhs pp_indices indices pp_expr rhs | TargetPE rhs -> pf ppf "target += tf__.reduce_sum(%a)" pp_expr rhs - | NRFunApp (StanLib, f, args) | NRFunApp (UserDefined, f, args) -> + | NRFunApp (StanLib f, args) | NRFunApp (UserDefined f, args) -> pp_call ppf (f, pp_expr, args) | Break -> pf ppf "break" | Continue -> pf ppf "continue" @@ -83,7 +88,7 @@ let rec pp_stmt ppf s = their arguments. I think these functions need to be named and defined inline in general because lambdas are limited. *) - | IfElse (_, _, _) | While (_, _) | For _ | NRFunApp (CompilerInternal, _, _) + | IfElse (_, _, _) | While (_, _) | For _ | NRFunApp (CompilerInternal _, _) -> raise_s [%message "Not implemented" (s : Stmt.Located.t)] diff --git a/src/tfp_backend/Transform_mir.ml b/src/tfp_backend/Transform_mir.ml index 58d119d0e5..ff0705cb5f 100644 --- a/src/tfp_backend/Transform_mir.ml +++ b/src/tfp_backend/Transform_mir.ml @@ -65,16 +65,16 @@ let translate_funapps_and_kwrds e = let open Expr.Fixed in let f ({pattern; _} as expr) = match pattern with - | FunApp (StanLib, fname, args) -> + | FunApp (StanLib fname, args) -> let prefix = if Utils.is_distribution_name fname then dist_prefix else "" in let fname = remove_stan_dist_suffix fname in let fname, args = map_functions fname args in - {expr with pattern= FunApp (StanLib, prefix ^ fname, args)} - | FunApp (UserDefined, fname, args) -> + {expr with pattern= FunApp (StanLib (prefix ^ fname), args)} + | FunApp (UserDefined fname, args) -> { expr with - pattern= FunApp (UserDefined, add_suffix_to_kwrds fname, args) } + pattern= FunApp (UserDefined (add_suffix_to_kwrds fname), args) } | Var s -> {expr with pattern= Var (add_suffix_to_kwrds s)} | _ -> expr in @@ -85,9 +85,8 @@ let%expect_test "nested dist prefixes translated" = let e pattern = {Expr.Fixed.pattern; meta= Expr.Typed.Meta.empty} in let f = FunApp - ( Fun_kind.StanLib - , "normal_lpdf" - , [FunApp (Fun_kind.StanLib, "normal_lpdf", []) |> e] ) + ( Fun_kind.StanLib "normal_lpdf" + , [FunApp (Fun_kind.StanLib "normal_lpdf", []) |> e] ) |> e |> translate_funapps_and_kwrds in print_s [%sexp (f : Expr.Typed.Meta.t Expr.Fixed.t)] ; @@ -103,17 +102,18 @@ let%expect_test "nested dist prefixes translated" = let rec remove_unused_stmts s = let pattern = match s.Stmt.Fixed.pattern with - | Assignment (_, {Expr.Fixed.pattern= FunApp (CompilerInternal, f, _); _}) - when Internal_fun.to_string FnConstrain = f - || Internal_fun.to_string FnUnconstrain = f -> + | Assignment + ( _ + , { Expr.Fixed.pattern= + FunApp (CompilerInternal (FnConstrain _ | FnUnconstrain _), _); _ + } ) -> Stmt.Fixed.Pattern.Skip | Decl _ -> Stmt.Fixed.Pattern.Skip - | NRFunApp (CompilerInternal, name, _) - when Internal_fun.( - to_string FnCheck = name - || to_string FnValidateSize = name - || to_string FnValidateSizeSimplex = name - || to_string FnValidateSizeUnitVector = name) -> + | NRFunApp + ( CompilerInternal + ( FnCheck _ | FnValidateSize | FnValidateSizeSimplex + | FnValidateSizeUnitVector ) + , _ ) -> Stmt.Fixed.Pattern.Skip | x -> Stmt.Fixed.Pattern.map Fn.id remove_unused_stmts x in @@ -124,7 +124,10 @@ let rec change_kwrds_stmts s = let pattern = match s.Stmt.Fixed.pattern with | Decl e -> Decl {e with decl_id= add_suffix_to_kwrds e.decl_id} - | NRFunApp (t, s, e) -> NRFunApp (t, add_suffix_to_kwrds s, e) + | NRFunApp (UserDefined s, e) -> + NRFunApp (UserDefined (add_suffix_to_kwrds s), e) + | NRFunApp (StanLib s, e) -> + NRFunApp (UserDefined (add_suffix_to_kwrds s), e) | Assignment ((s, t, e1), e2) -> Assignment ((add_suffix_to_kwrds s, t, e1), e2) | For e -> For {e with loopvar= add_suffix_to_kwrds e.loopvar} diff --git a/test/unit/Optimize.ml b/test/unit/Optimize.ml index efc8f7e4e9..36ba7f5f20 100644 --- a/test/unit/Optimize.ml +++ b/test/unit/Optimize.ml @@ -25,8 +25,8 @@ let%expect_test "map_rec_stmt_loc" = |} in let f = function - | Stmt.Fixed.Pattern.NRFunApp (CompilerInternal, "FnPrint__", [s]) -> - Stmt.Fixed.Pattern.NRFunApp (CompilerInternal, "FnPrint__", [s; s]) + | Stmt.Fixed.Pattern.NRFunApp (CompilerInternal FnPrint, [s]) -> + Stmt.Fixed.Pattern.NRFunApp (CompilerInternal FnPrint, [s; s]) | x -> x in let mir = Program.map Fn.id (map_rec_stmt_loc f) mir in @@ -66,9 +66,8 @@ let%expect_test "map_rec_state_stmt_loc" = |} in let f i = function - | Stmt.Fixed.Pattern.NRFunApp (CompilerInternal, "FnPrint__", [s]) -> - Stmt.Fixed.Pattern. - (NRFunApp (CompilerInternal, "FnPrint__", [s; s]), i + 1) + | Stmt.Fixed.Pattern.NRFunApp (CompilerInternal FnPrint, [s]) -> + Stmt.Fixed.Pattern.(NRFunApp (CompilerInternal FnPrint, [s; s]), i + 1) | x -> (x, i) in let mir_stmt, num = diff --git a/test/unit/Stan_math_code_gen_tests.ml b/test/unit/Stan_math_code_gen_tests.ml index 2a65688933..08b8a49208 100644 --- a/test/unit/Stan_math_code_gen_tests.ml +++ b/test/unit/Stan_math_code_gen_tests.ml @@ -15,8 +15,7 @@ let%expect_test "udf" = ; fdargs= [(DataOnly, "x", UMatrix); (AutoDiffable, "y", URowVector)] ; fdbody= Stmt.Fixed.Pattern.Return - (Some - (w @@ FunApp (StanLib, "add", [w @@ Var "x"; w @@ Lit (Int, "1")]))) + (Some (w @@ FunApp (StanLib "add", [w @@ Var "x"; w @@ Lit (Int, "1")]))) |> with_no_loc |> List.return |> Stmt.Fixed.Pattern.Block |> with_no_loc |> Some ; fdloc= Location_span.empty } @@ -70,8 +69,7 @@ let%expect_test "udf-expressions" = ; (AutoDiffable, "w", UArray UMatrix) ] ; fdbody= Stmt.Fixed.Pattern.Return - (Some - (w @@ FunApp (StanLib, "add", [w @@ Var "x"; w @@ Lit (Int, "1")]))) + (Some (w @@ FunApp (StanLib "add", [w @@ Var "x"; w @@ Lit (Int, "1")]))) |> with_no_loc |> List.return |> Stmt.Fixed.Pattern.Block |> with_no_loc |> Some ; fdloc= Location_span.empty } From 53115a709c0549c544fa91c8594b8b0eaaa6f315 Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Mon, 29 Mar 2021 21:02:32 -0400 Subject: [PATCH 23/31] update Identity for constraints to be blank to match the deserializer API --- src/stan_math_backend/Transform_Mir.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index 35aab659bd..4642ddb054 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -187,7 +187,7 @@ let constraint_to_string t (c : constrainaction) = | Constrain | Unconstrain -> "lub" ) | Offset _ | Multiplier _ | OffsetMultiplier _ -> ( match c with Check -> "" | Constrain | Unconstrain -> "offset_multiplier" ) - | Identity -> "identity" + | Identity -> "" let default_multiplier = 1 let default_offset = 0 From b4ad3aed77a1752ba3dfc164d492883425395eb1 Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Mon, 29 Mar 2021 21:31:39 -0400 Subject: [PATCH 24/31] Function variant types might be working --- src/frontend/Ast_to_Mir.ml | 20 ++++++++++---------- src/stan_math_backend/Expression_gen.ml | 1 + src/stan_math_backend/Statement_gen.ml | 11 +++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/frontend/Ast_to_Mir.ml b/src/frontend/Ast_to_Mir.ml index a382db6007..4d3286417b 100644 --- a/src/frontend/Ast_to_Mir.ml +++ b/src/frontend/Ast_to_Mir.ml @@ -393,20 +393,20 @@ let constrain_decl st dconstrain t decl_id decl_var smeta = let rec check_decl var decl_type' decl_id decl_trans smeta adlevel = let decl_type = remove_possibly_exn decl_type' "check" smeta in - let chk fn var = - let check_id id = - let id_str = Fmt.strf "%a" Expr.Typed.pp id in - let args = extract_transform_args id decl_trans in - Stmt.Helpers.internal_nrfunapp (FnCheck id_str) (fn :: id :: args) smeta - in - [(constraint_forl decl_trans) decl_type check_id var smeta] - in match decl_trans with - | Identity | Offset _ | Multiplier _ | OffsetMultiplier (_, _) -> [] + | Program.Identity | Offset _ | Multiplier _ | OffsetMultiplier (_, _) -> [] | LowerUpper (lb, ub) -> check_decl var decl_type' decl_id (Lower lb) smeta adlevel @ check_decl var decl_type' decl_id (Upper ub) smeta adlevel - | _ -> chk (mkstring smeta (check_constraint_to_string decl_trans Check)) var + | _ -> + let fn = check_constraint_to_string decl_trans Check in + let check_id id = + let id_str = Expr.Helpers.str (Fmt.strf "%a" Expr.Typed.pp id) in + let args = extract_transform_args id decl_trans in + Stmt.Helpers.internal_nrfunapp (FnCheck fn) (id_str :: id :: args) + smeta + in + [(constraint_forl decl_trans) decl_type check_id var smeta] let check_sizedtype name = let check x = function diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index 855db3d7d6..1bb5c432d9 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -440,6 +440,7 @@ and pp_compiler_internal_fn ad ut f ppf es = (UnsizedType.AutoDiffable, ut) (list ~sep:comma pp_expr) arg_exprs | _ -> raise_s [%message "emit ReadParam with " (es : Expr.Typed.t list)] ) + | FnDeepCopy -> gen_fun_app ppf "stan::model::deep_copy" es | _ -> gen_fun_app ppf (Internal_fun.to_string f) es and pp_promoted ad ut ppf e = diff --git a/src/stan_math_backend/Statement_gen.ml b/src/stan_math_backend/Statement_gen.ml index 8c4087aeed..5e592ac8f5 100644 --- a/src/stan_math_backend/Statement_gen.ml +++ b/src/stan_math_backend/Statement_gen.ml @@ -100,8 +100,7 @@ let pp_bool_expr ppf expr = | UReal -> pp_call ppf ("as_bool", pp_expr, [expr]) | _ -> pp_expr ppf expr -let rec pp_statement (ppf : Format.formatter) - (Stmt.Fixed.({pattern; meta}) as stmt) = +let rec pp_statement (ppf : Format.formatter) Stmt.Fixed.({pattern; meta}) = (* ({stmt; smeta} : (mtype_loc_ad, 'a) stmt_with) = *) let pp_stmt_list = list ~sep:cut pp_statement in ( match pattern with @@ -161,12 +160,12 @@ let rec pp_statement (ppf : Format.formatter) pf ppf "std::stringstream %s;@," err_strm ; pf ppf "%a@," (list ~sep:cut add_to_string) args ; pf ppf "throw std::domain_error(%s.str());" err_strm - | NRFunApp ((CompilerInternal (FnCheck _) as kind), args) -> - let args = + | NRFunApp (CompilerInternal (FnCheck check_name), args) -> + let function_arg = {Expr.Fixed.pattern= Var "function__"; meta= Expr.Typed.Meta.empty} - :: args in - pp_statement ppf {pattern= NRFunApp (kind, args); meta= stmt.meta} + pf ppf "%s(@[%a@]);" ("check_" ^ check_name) + (list ~sep:comma pp_expr) (function_arg :: args) | NRFunApp (CompilerInternal FnWriteParam, [var]) -> pf ppf "@[vars__.emplace_back(@,%a);@]" pp_expr var | NRFunApp (CompilerInternal f, args) -> From 5591542d0b99d9049598a7578cc536321e808604 Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Mon, 29 Mar 2021 21:52:27 -0400 Subject: [PATCH 25/31] promote tests --- src/tfp_backend/Transform_mir.ml | 4 +- test/integration/good/code-gen/cl.expected | 4 - test/integration/good/code-gen/cpp.expected | 114 -- test/integration/good/code-gen/mir.expected | 1546 ++++++++--------- .../good/code-gen/profiling/cpp.expected | 1 - .../standalone_functions/cpp.expected | 2 +- .../good/compiler-optimizations/cpp.expected | 616 ------- test/unit/Optimize.ml | 44 +- 8 files changed, 718 insertions(+), 1613 deletions(-) diff --git a/src/tfp_backend/Transform_mir.ml b/src/tfp_backend/Transform_mir.ml index ff0705cb5f..8b632c28dc 100644 --- a/src/tfp_backend/Transform_mir.ml +++ b/src/tfp_backend/Transform_mir.ml @@ -93,8 +93,8 @@ let%expect_test "nested dist prefixes translated" = [%expect {| ((pattern - (FunApp StanLib tfd__.Normal - (((pattern (FunApp StanLib tfd__.Normal ())) + (FunApp (StanLib tfd__.Normal) + (((pattern (FunApp (StanLib tfd__.Normal) ())) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) |}] diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index 7f8b62af65..484009e565 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -303,7 +303,6 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 176; k = context__.vals_i("k")[(1 - 1)]; current_statement__ = 176; - current_statement__ = 176; check_greater_or_equal(function__, "k", k, 1); current_statement__ = 177; context__.validate_dims("data initialization","n","int", @@ -313,7 +312,6 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 177; n = context__.vals_i("n")[(1 - 1)]; current_statement__ = 177; - current_statement__ = 177; check_greater_or_equal(function__, "n", n, 0); current_statement__ = 178; validate_non_negative_index("X_d", "n", n); @@ -489,11 +487,9 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 208; y_r_d_td = std::numeric_limits::quiet_NaN(); - current_statement__ = 194; current_statement__ = 194; check_greater_or_equal(function__, "k_td", k_td, 1); current_statement__ = 195; - current_statement__ = 195; check_greater_or_equal(function__, "n_td", n_td, 0); current_statement__ = 209; validate_non_negative_index("alpha_v", "k", k); diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 9a2f09d200..87445c0f66 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -80,7 +80,6 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> current_statement__ = 9; J = context__.vals_i("J")[(1 - 1)]; current_statement__ = 9; - current_statement__ = 9; check_greater_or_equal(function__, "J", J, 0); current_statement__ = 10; validate_non_negative_index("y", "J", J); @@ -102,7 +101,6 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> sigma = context__.vals_r("sigma"); current_statement__ = 13; for (int sym1__ = 1; sym1__ <= J; ++sym1__) { - current_statement__ = 13; current_statement__ = 13; check_greater_or_equal(function__, "sigma[sym1__]", sigma[(sym1__ - 1)], 0);} @@ -900,7 +898,6 @@ class eight_schools_ncp_model final : public model_base_crtp { current_statement__ = 186; N = context__.vals_i("N")[(1 - 1)]; current_statement__ = 186; - current_statement__ = 186; check_greater_or_equal(function__, "N", N, 0); current_statement__ = 187; context__.validate_dims("data initialization","M","int", @@ -4669,7 +4664,6 @@ class mother_model final : public model_base_crtp { current_statement__ = 187; M = context__.vals_i("M")[(1 - 1)]; current_statement__ = 187; - current_statement__ = 187; check_greater_or_equal(function__, "M", M, 0); current_statement__ = 188; context__.validate_dims("data initialization","K","int", @@ -4679,10 +4673,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 188; K = context__.vals_i("K")[(1 - 1)]; current_statement__ = 188; - current_statement__ = 188; check_greater_or_equal(function__, "K", K, 0); current_statement__ = 188; - current_statement__ = 188; check_less_or_equal(function__, "K", K, (N * M)); current_statement__ = 189; validate_non_negative_index("d_int_1d_ar", "N", N); @@ -4695,7 +4687,6 @@ class mother_model final : public model_base_crtp { d_int_1d_ar = context__.vals_i("d_int_1d_ar"); current_statement__ = 190; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 190; current_statement__ = 190; check_less_or_equal(function__, "d_int_1d_ar[sym1__]", d_int_1d_ar[(sym1__ - 1)], N);} @@ -4736,7 +4727,6 @@ class mother_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= M; ++sym2__) { current_statement__ = 194; for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 194; current_statement__ = 194; check_less_or_equal(function__, "d_int_3d_ar[sym1__, sym2__, sym3__]", @@ -4750,10 +4740,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 195; J = context__.vals_r("J")[(1 - 1)]; current_statement__ = 195; - current_statement__ = 195; check_greater_or_equal(function__, "J", J, -2.0); current_statement__ = 195; - current_statement__ = 195; check_less_or_equal(function__, "J", J, 2.0); current_statement__ = 196; validate_non_negative_index("d_real_1d_ar", "N", N); @@ -5004,7 +4992,6 @@ class mother_model final : public model_base_crtp { for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { current_statement__ = 222; for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 222; current_statement__ = 222; check_greater_or_equal(function__, "d_ar_mat[sym1__, sym2__, sym3__, sym4__]", @@ -5020,7 +5007,6 @@ class mother_model final : public model_base_crtp { for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { current_statement__ = 222; for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 222; current_statement__ = 222; check_less_or_equal(function__, "d_ar_mat[sym1__, sym2__, sym3__, sym4__]", @@ -5051,7 +5037,6 @@ class mother_model final : public model_base_crtp { pos__ = (pos__ + 1);} } current_statement__ = 224; - current_statement__ = 224; check_simplex(function__, "d_simplex", d_simplex); current_statement__ = 225; validate_non_negative_index("d_1d_simplex", "N", N); @@ -5082,7 +5067,6 @@ class mother_model final : public model_base_crtp { } current_statement__ = 227; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 227; current_statement__ = 227; check_simplex(function__, "d_1d_simplex[sym1__]", d_1d_simplex[(sym1__ - 1)]);} @@ -5129,7 +5113,6 @@ class mother_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= M; ++sym2__) { current_statement__ = 232; for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 232; current_statement__ = 232; check_simplex(function__, "d_3d_simplex[sym1__, sym2__, sym3__]", d_3d_simplex[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - @@ -5158,7 +5141,6 @@ class mother_model final : public model_base_crtp { pos__ = (pos__ + 1);}} } current_statement__ = 233; - current_statement__ = 233; check_cholesky_factor(function__, "d_cfcov_54", d_cfcov_54); current_statement__ = 234; context__.validate_dims("data initialization","d_cfcov_33","double", @@ -5184,7 +5166,6 @@ class mother_model final : public model_base_crtp { pos__ = (pos__ + 1);}} } current_statement__ = 234; - current_statement__ = 234; check_cholesky_factor(function__, "d_cfcov_33", d_cfcov_33); current_statement__ = 235; validate_non_negative_index("d_cfcov_33_ar", "K", K); @@ -5216,7 +5197,6 @@ class mother_model final : public model_base_crtp { } current_statement__ = 236; for (int sym1__ = 1; sym1__ <= K; ++sym1__) { - current_statement__ = 236; current_statement__ = 236; check_cholesky_factor(function__, "d_cfcov_33_ar[sym1__]", d_cfcov_33_ar[(sym1__ - 1)]);} @@ -6402,7 +6382,6 @@ class mother_model final : public model_base_crtp { for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { current_statement__ = 296; for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 296; current_statement__ = 296; check_greater_or_equal(function__, "td_ar_mat[sym1__, sym2__, sym3__, sym4__]", @@ -6418,7 +6397,6 @@ class mother_model final : public model_base_crtp { for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { current_statement__ = 296; for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 296; current_statement__ = 296; check_less_or_equal(function__, "td_ar_mat[sym1__, sym2__, sym3__, sym4__]", @@ -6427,11 +6405,9 @@ class mother_model final : public model_base_crtp { index_uni(sym3__), index_uni(sym4__)), 1);}}}} current_statement__ = 298; - current_statement__ = 298; check_simplex(function__, "td_simplex", td_simplex); current_statement__ = 301; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 301; current_statement__ = 301; check_simplex(function__, "td_1d_simplex[sym1__]", td_1d_simplex[(sym1__ - 1)]);} @@ -6441,17 +6417,14 @@ class mother_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= M; ++sym2__) { current_statement__ = 306; for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 306; current_statement__ = 306; check_simplex(function__, "td_3d_simplex[sym1__, sym2__, sym3__]", td_3d_simplex[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]);}}} current_statement__ = 307; - current_statement__ = 307; check_cholesky_factor(function__, "td_cfcov_54", td_cfcov_54); current_statement__ = 308; - current_statement__ = 308; check_cholesky_factor(function__, "td_cfcov_33", td_cfcov_33); current_statement__ = 500; validate_non_negative_index("p_real_1d_ar", "N", N); @@ -6973,7 +6946,6 @@ class mother_model final : public model_base_crtp { tp_real = (p_real / p_real); current_statement__ = 24; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 24; current_statement__ = 24; check_greater_or_equal(function__, "tp_real_1d_ar[sym1__]", tp_real_1d_ar[(sym1__ - 1)], 0);} @@ -6983,7 +6955,6 @@ class mother_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= M; ++sym2__) { current_statement__ = 25; for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 25; current_statement__ = 25; check_greater_or_equal(function__, "tp_real_3d_ar[sym1__, sym2__, sym3__]", @@ -6991,7 +6962,6 @@ class mother_model final : public model_base_crtp { (sym3__ - 1)], 0);}}} current_statement__ = 26; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 26; current_statement__ = 26; check_less_or_equal(function__, "tp_vec[sym1__]", tp_vec[(sym1__ - 1)], 0);} @@ -7003,7 +6973,6 @@ class mother_model final : public model_base_crtp { for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { current_statement__ = 32; for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 32; current_statement__ = 32; check_greater_or_equal(function__, "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]", @@ -7019,7 +6988,6 @@ class mother_model final : public model_base_crtp { for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { current_statement__ = 32; for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 32; current_statement__ = 32; check_less_or_equal(function__, "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]", @@ -7028,11 +6996,9 @@ class mother_model final : public model_base_crtp { index_uni(sym3__), index_uni(sym4__)), 1);}}}} current_statement__ = 33; - current_statement__ = 33; check_simplex(function__, "tp_simplex", tp_simplex); current_statement__ = 34; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 34; current_statement__ = 34; check_simplex(function__, "tp_1d_simplex[sym1__]", tp_1d_simplex[(sym1__ - 1)]);} @@ -7042,21 +7008,17 @@ class mother_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= M; ++sym2__) { current_statement__ = 35; for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 35; current_statement__ = 35; check_simplex(function__, "tp_3d_simplex[sym1__, sym2__, sym3__]", tp_3d_simplex[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]);}}} current_statement__ = 36; - current_statement__ = 36; check_cholesky_factor(function__, "tp_cfcov_54", tp_cfcov_54); current_statement__ = 37; - current_statement__ = 37; check_cholesky_factor(function__, "tp_cfcov_33", tp_cfcov_33); current_statement__ = 38; for (int sym1__ = 1; sym1__ <= K; ++sym1__) { - current_statement__ = 38; current_statement__ = 38; check_cholesky_factor(function__, "tp_cfcov_33_ar[sym1__]", tp_cfcov_33_ar[(sym1__ - 1)]);} @@ -7583,7 +7545,6 @@ class mother_model final : public model_base_crtp { tp_real = (p_real / p_real); current_statement__ = 24; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 24; current_statement__ = 24; check_greater_or_equal(function__, "tp_real_1d_ar[sym1__]", tp_real_1d_ar[(sym1__ - 1)], 0);} @@ -7593,7 +7554,6 @@ class mother_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= M; ++sym2__) { current_statement__ = 25; for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 25; current_statement__ = 25; check_greater_or_equal(function__, "tp_real_3d_ar[sym1__, sym2__, sym3__]", @@ -7601,7 +7561,6 @@ class mother_model final : public model_base_crtp { (sym3__ - 1)], 0);}}} current_statement__ = 26; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 26; current_statement__ = 26; check_less_or_equal(function__, "tp_vec[sym1__]", tp_vec[(sym1__ - 1)], 0);} @@ -7613,7 +7572,6 @@ class mother_model final : public model_base_crtp { for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { current_statement__ = 32; for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 32; current_statement__ = 32; check_greater_or_equal(function__, "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]", @@ -7629,7 +7587,6 @@ class mother_model final : public model_base_crtp { for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { current_statement__ = 32; for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 32; current_statement__ = 32; check_less_or_equal(function__, "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]", @@ -7638,11 +7595,9 @@ class mother_model final : public model_base_crtp { index_uni(sym3__), index_uni(sym4__)), 1);}}}} current_statement__ = 33; - current_statement__ = 33; check_simplex(function__, "tp_simplex", tp_simplex); current_statement__ = 34; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 34; current_statement__ = 34; check_simplex(function__, "tp_1d_simplex[sym1__]", tp_1d_simplex[(sym1__ - 1)]);} @@ -7652,21 +7607,17 @@ class mother_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= M; ++sym2__) { current_statement__ = 35; for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 35; current_statement__ = 35; check_simplex(function__, "tp_3d_simplex[sym1__, sym2__, sym3__]", tp_3d_simplex[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]);}}} current_statement__ = 36; - current_statement__ = 36; check_cholesky_factor(function__, "tp_cfcov_54", tp_cfcov_54); current_statement__ = 37; - current_statement__ = 37; check_cholesky_factor(function__, "tp_cfcov_33", tp_cfcov_33); current_statement__ = 38; for (int sym1__ = 1; sym1__ <= K; ++sym1__) { - current_statement__ = 38; current_statement__ = 38; check_cholesky_factor(function__, "tp_cfcov_33_ar[sym1__]", tp_cfcov_33_ar[(sym1__ - 1)]);} @@ -8015,7 +7966,6 @@ class mother_model final : public model_base_crtp { "assigning variable idx_res5"); current_statement__ = 76; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 76; current_statement__ = 76; check_greater_or_equal(function__, "gq_real_1d_ar[sym1__]", gq_real_1d_ar[(sym1__ - 1)], 0);} @@ -8025,7 +7975,6 @@ class mother_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= M; ++sym2__) { current_statement__ = 77; for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 77; current_statement__ = 77; check_greater_or_equal(function__, "gq_real_3d_ar[sym1__, sym2__, sym3__]", @@ -8033,7 +7982,6 @@ class mother_model final : public model_base_crtp { (sym3__ - 1)], 0);}}} current_statement__ = 78; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 78; current_statement__ = 78; check_less_or_equal(function__, "gq_vec[sym1__]", gq_vec[(sym1__ - 1)], 1);} @@ -8045,7 +7993,6 @@ class mother_model final : public model_base_crtp { for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { current_statement__ = 84; for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 84; current_statement__ = 84; check_greater_or_equal(function__, "gq_ar_mat[sym1__, sym2__, sym3__, sym4__]", @@ -8061,7 +8008,6 @@ class mother_model final : public model_base_crtp { for (int sym3__ = 1; sym3__ <= 2; ++sym3__) { current_statement__ = 84; for (int sym4__ = 1; sym4__ <= 3; ++sym4__) { - current_statement__ = 84; current_statement__ = 84; check_less_or_equal(function__, "gq_ar_mat[sym1__, sym2__, sym3__, sym4__]", @@ -8070,11 +8016,9 @@ class mother_model final : public model_base_crtp { index_uni(sym3__), index_uni(sym4__)), 1);}}}} current_statement__ = 85; - current_statement__ = 85; check_simplex(function__, "gq_simplex", gq_simplex); current_statement__ = 86; for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - current_statement__ = 86; current_statement__ = 86; check_simplex(function__, "gq_1d_simplex[sym1__]", gq_1d_simplex[(sym1__ - 1)]);} @@ -8084,21 +8028,17 @@ class mother_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= M; ++sym2__) { current_statement__ = 87; for (int sym3__ = 1; sym3__ <= K; ++sym3__) { - current_statement__ = 87; current_statement__ = 87; check_simplex(function__, "gq_3d_simplex[sym1__, sym2__, sym3__]", gq_3d_simplex[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - 1)]);}}} current_statement__ = 88; - current_statement__ = 88; check_cholesky_factor(function__, "gq_cfcov_54", gq_cfcov_54); current_statement__ = 89; - current_statement__ = 89; check_cholesky_factor(function__, "gq_cfcov_33", gq_cfcov_33); current_statement__ = 90; for (int sym1__ = 1; sym1__ <= K; ++sym1__) { - current_statement__ = 90; current_statement__ = 90; check_cholesky_factor(function__, "gq_cfcov_33_ar[sym1__]", gq_cfcov_33_ar[(sym1__ - 1)]);} @@ -10724,7 +10664,6 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 123; T = context__.vals_i("T")[(1 - 1)]; current_statement__ = 123; - current_statement__ = 123; check_greater_or_equal(function__, "T", T, 1); current_statement__ = 124; context__.validate_dims("data initialization","y0_d","double", @@ -16496,7 +16435,6 @@ class old_integrate_interface_model final : public model_base_crtp { current_statement__ = 176; k = context__.vals_i("k")[(1 - 1)]; current_statement__ = 176; - current_statement__ = 176; check_greater_or_equal(function__, "k", k, 1); current_statement__ = 177; context__.validate_dims("data initialization","n","int", @@ -17369,7 +17305,6 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 177; n = context__.vals_i("n")[(1 - 1)]; current_statement__ = 177; - current_statement__ = 177; check_greater_or_equal(function__, "n", n, 0); current_statement__ = 178; validate_non_negative_index("X_d", "n", n); @@ -17545,11 +17480,9 @@ class optimize_glm_model final : public model_base_crtp { current_statement__ = 208; y_r_d_td = std::numeric_limits::quiet_NaN(); - current_statement__ = 194; current_statement__ = 194; check_greater_or_equal(function__, "k_td", k_td, 1); current_statement__ = 195; - current_statement__ = 195; check_greater_or_equal(function__, "n_td", n_td, 0); current_statement__ = 209; validate_non_negative_index("alpha_v", "k", k); @@ -27460,7 +27393,6 @@ class transform_model final : public model_base_crtp { current_statement__ = 37; n = context__.vals_i("n")[(1 - 1)]; current_statement__ = 37; - current_statement__ = 37; check_greater_or_equal(function__, "n", n, 1); current_statement__ = 38; context__.validate_dims("data initialization","m","int", @@ -27470,7 +27402,6 @@ class transform_model final : public model_base_crtp { current_statement__ = 38; m = context__.vals_i("m")[(1 - 1)]; current_statement__ = 38; - current_statement__ = 38; check_greater_or_equal(function__, "m", m, 1); current_statement__ = 39; context__.validate_dims("data initialization","k","int", @@ -27480,7 +27411,6 @@ class transform_model final : public model_base_crtp { current_statement__ = 39; k = context__.vals_i("k")[(1 - 1)]; current_statement__ = 39; - current_statement__ = 39; check_greater_or_equal(function__, "k", k, 1); current_statement__ = 40; validate_non_negative_index("ds", "n", n); @@ -28124,7 +28054,6 @@ class transform_model final : public model_base_crtp { check_matching_dims("constraint", "tpm_2", tpm_2, "upper", dm); current_statement__ = 19; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 19; current_statement__ = 19; check_greater_or_equal(function__, "tp_1[sym1__]", tp_1[(sym1__ - 1)], @@ -28132,14 +28061,12 @@ class transform_model final : public model_base_crtp { (sym1__ - 1)]);} current_statement__ = 20; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 20; current_statement__ = 20; check_less_or_equal(function__, "tp_2[sym1__]", tp_2[(sym1__ - 1)], rvalue(ds, "ds", index_uni(1), index_uni(1))[ (sym1__ - 1)]);} current_statement__ = 21; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 21; current_statement__ = 21; check_greater_or_equal(function__, "tp_3[sym1__]", tp_3[(sym1__ - 1)], @@ -28147,27 +28074,23 @@ class transform_model final : public model_base_crtp { (sym1__ - 1)]);} current_statement__ = 21; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 21; current_statement__ = 21; check_less_or_equal(function__, "tp_3[sym1__]", tp_3[(sym1__ - 1)], rvalue(ds, "ds", index_uni(1), index_uni(2))[ (sym1__ - 1)]);} current_statement__ = 22; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 22; current_statement__ = 22; check_greater_or_equal(function__, "tp_4[sym1__]", tp_4[(sym1__ - 1)], 0);} current_statement__ = 22; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 22; current_statement__ = 22; check_less_or_equal(function__, "tp_4[sym1__]", tp_4[(sym1__ - 1)], rvalue(ds, "ds", index_uni(1), index_uni(2))[ (sym1__ - 1)]);} current_statement__ = 23; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 23; current_statement__ = 23; check_greater_or_equal(function__, "tp_5[sym1__]", tp_5[(sym1__ - 1)], @@ -28175,7 +28098,6 @@ class transform_model final : public model_base_crtp { (sym1__ - 1)]);} current_statement__ = 23; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 23; current_statement__ = 23; check_less_or_equal(function__, "tp_5[sym1__]", tp_5[(sym1__ - 1)], 1); } @@ -28183,7 +28105,6 @@ class transform_model final : public model_base_crtp { for (int sym1__ = 1; sym1__ <= m; ++sym1__) { current_statement__ = 27; for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 27; current_statement__ = 27; check_greater_or_equal(function__, "tp_9[sym1__, sym2__]", tp_9[(sym1__ - 1)][(sym2__ - 1)], @@ -28193,7 +28114,6 @@ class transform_model final : public model_base_crtp { for (int sym1__ = 1; sym1__ <= m; ++sym1__) { current_statement__ = 27; for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 27; current_statement__ = 27; check_less_or_equal(function__, "tp_9[sym1__, sym2__]", tp_9[(sym1__ - 1)][(sym2__ - 1)], 1);}} @@ -28203,7 +28123,6 @@ class transform_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= m; ++sym2__) { current_statement__ = 28; for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 28; current_statement__ = 28; check_greater_or_equal(function__, "tp_10[sym1__, sym2__, sym3__]", @@ -28215,7 +28134,6 @@ class transform_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= m; ++sym2__) { current_statement__ = 28; for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 28; current_statement__ = 28; check_less_or_equal(function__, "tp_10[sym1__, sym2__, sym3__]", tp_10[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - @@ -28224,7 +28142,6 @@ class transform_model final : public model_base_crtp { }}} current_statement__ = 29; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 29; current_statement__ = 29; check_greater_or_equal(function__, "tpv_1[sym1__]", tpv_1[(sym1__ - 1)], @@ -28232,7 +28149,6 @@ class transform_model final : public model_base_crtp { (sym1__ - 1)]);} current_statement__ = 29; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 29; current_statement__ = 29; check_less_or_equal(function__, "tpv_1[sym1__]", tpv_1[(sym1__ - 1)], rvalue(dv, "dv", index_uni(1), index_uni(2))[ @@ -28241,7 +28157,6 @@ class transform_model final : public model_base_crtp { for (int sym1__ = 1; sym1__ <= m; ++sym1__) { current_statement__ = 30; for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 30; current_statement__ = 30; check_greater_or_equal(function__, "tpv_2[sym1__, sym2__]", tpv_2[(sym1__ - 1)][(sym2__ - 1)], @@ -28253,7 +28168,6 @@ class transform_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= m; ++sym2__) { current_statement__ = 31; for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 31; current_statement__ = 31; check_less_or_equal(function__, "tpv_3[sym1__, sym2__, sym3__]", tpv_3[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - @@ -28262,7 +28176,6 @@ class transform_model final : public model_base_crtp { }}} current_statement__ = 32; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 32; current_statement__ = 32; check_greater_or_equal(function__, "tpr_1[sym1__]", tpr_1[(sym1__ - 1)], @@ -28270,7 +28183,6 @@ class transform_model final : public model_base_crtp { (sym1__ - 1)]);} current_statement__ = 32; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 32; current_statement__ = 32; check_less_or_equal(function__, "tpr_1[sym1__]", tpr_1[(sym1__ - 1)], rvalue(dr, "dr", index_uni(1), index_uni(2))[ @@ -28279,7 +28191,6 @@ class transform_model final : public model_base_crtp { for (int sym1__ = 1; sym1__ <= m; ++sym1__) { current_statement__ = 33; for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 33; current_statement__ = 33; check_greater_or_equal(function__, "tpr_2[sym1__, sym2__]", tpr_2[(sym1__ - 1)][(sym2__ - 1)], @@ -28291,7 +28202,6 @@ class transform_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= m; ++sym2__) { current_statement__ = 34; for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 34; current_statement__ = 34; check_less_or_equal(function__, "tpr_3[sym1__, sym2__, sym3__]", tpr_3[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - @@ -28302,7 +28212,6 @@ class transform_model final : public model_base_crtp { for (int sym1__ = 1; sym1__ <= m; ++sym1__) { current_statement__ = 35; for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "tpm_1[sym1__, sym2__]", rvalue(tpm_1, "tpm_1", @@ -28316,7 +28225,6 @@ class transform_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= m; ++sym2__) { current_statement__ = 36; for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 36; current_statement__ = 36; check_less_or_equal(function__, "tpm_2[sym1__, sym2__, sym3__]", rvalue(tpm_2, "tpm_2", @@ -28759,7 +28667,6 @@ class transform_model final : public model_base_crtp { check_matching_dims("constraint", "tpm_2", tpm_2, "upper", dm); current_statement__ = 19; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 19; current_statement__ = 19; check_greater_or_equal(function__, "tp_1[sym1__]", tp_1[(sym1__ - 1)], @@ -28767,14 +28674,12 @@ class transform_model final : public model_base_crtp { (sym1__ - 1)]);} current_statement__ = 20; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 20; current_statement__ = 20; check_less_or_equal(function__, "tp_2[sym1__]", tp_2[(sym1__ - 1)], rvalue(ds, "ds", index_uni(1), index_uni(1))[ (sym1__ - 1)]);} current_statement__ = 21; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 21; current_statement__ = 21; check_greater_or_equal(function__, "tp_3[sym1__]", tp_3[(sym1__ - 1)], @@ -28782,27 +28687,23 @@ class transform_model final : public model_base_crtp { (sym1__ - 1)]);} current_statement__ = 21; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 21; current_statement__ = 21; check_less_or_equal(function__, "tp_3[sym1__]", tp_3[(sym1__ - 1)], rvalue(ds, "ds", index_uni(1), index_uni(2))[ (sym1__ - 1)]);} current_statement__ = 22; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 22; current_statement__ = 22; check_greater_or_equal(function__, "tp_4[sym1__]", tp_4[(sym1__ - 1)], 0);} current_statement__ = 22; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 22; current_statement__ = 22; check_less_or_equal(function__, "tp_4[sym1__]", tp_4[(sym1__ - 1)], rvalue(ds, "ds", index_uni(1), index_uni(2))[ (sym1__ - 1)]);} current_statement__ = 23; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 23; current_statement__ = 23; check_greater_or_equal(function__, "tp_5[sym1__]", tp_5[(sym1__ - 1)], @@ -28810,7 +28711,6 @@ class transform_model final : public model_base_crtp { (sym1__ - 1)]);} current_statement__ = 23; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 23; current_statement__ = 23; check_less_or_equal(function__, "tp_5[sym1__]", tp_5[(sym1__ - 1)], 1); } @@ -28818,7 +28718,6 @@ class transform_model final : public model_base_crtp { for (int sym1__ = 1; sym1__ <= m; ++sym1__) { current_statement__ = 27; for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 27; current_statement__ = 27; check_greater_or_equal(function__, "tp_9[sym1__, sym2__]", tp_9[(sym1__ - 1)][(sym2__ - 1)], @@ -28828,7 +28727,6 @@ class transform_model final : public model_base_crtp { for (int sym1__ = 1; sym1__ <= m; ++sym1__) { current_statement__ = 27; for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 27; current_statement__ = 27; check_less_or_equal(function__, "tp_9[sym1__, sym2__]", tp_9[(sym1__ - 1)][(sym2__ - 1)], 1);}} @@ -28838,7 +28736,6 @@ class transform_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= m; ++sym2__) { current_statement__ = 28; for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 28; current_statement__ = 28; check_greater_or_equal(function__, "tp_10[sym1__, sym2__, sym3__]", @@ -28850,7 +28747,6 @@ class transform_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= m; ++sym2__) { current_statement__ = 28; for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 28; current_statement__ = 28; check_less_or_equal(function__, "tp_10[sym1__, sym2__, sym3__]", tp_10[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - @@ -28859,7 +28755,6 @@ class transform_model final : public model_base_crtp { }}} current_statement__ = 29; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 29; current_statement__ = 29; check_greater_or_equal(function__, "tpv_1[sym1__]", tpv_1[(sym1__ - 1)], @@ -28867,7 +28762,6 @@ class transform_model final : public model_base_crtp { (sym1__ - 1)]);} current_statement__ = 29; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 29; current_statement__ = 29; check_less_or_equal(function__, "tpv_1[sym1__]", tpv_1[(sym1__ - 1)], rvalue(dv, "dv", index_uni(1), index_uni(2))[ @@ -28876,7 +28770,6 @@ class transform_model final : public model_base_crtp { for (int sym1__ = 1; sym1__ <= m; ++sym1__) { current_statement__ = 30; for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 30; current_statement__ = 30; check_greater_or_equal(function__, "tpv_2[sym1__, sym2__]", tpv_2[(sym1__ - 1)][(sym2__ - 1)], @@ -28888,7 +28781,6 @@ class transform_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= m; ++sym2__) { current_statement__ = 31; for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 31; current_statement__ = 31; check_less_or_equal(function__, "tpv_3[sym1__, sym2__, sym3__]", tpv_3[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - @@ -28897,7 +28789,6 @@ class transform_model final : public model_base_crtp { }}} current_statement__ = 32; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 32; current_statement__ = 32; check_greater_or_equal(function__, "tpr_1[sym1__]", tpr_1[(sym1__ - 1)], @@ -28905,7 +28796,6 @@ class transform_model final : public model_base_crtp { (sym1__ - 1)]);} current_statement__ = 32; for (int sym1__ = 1; sym1__ <= k; ++sym1__) { - current_statement__ = 32; current_statement__ = 32; check_less_or_equal(function__, "tpr_1[sym1__]", tpr_1[(sym1__ - 1)], rvalue(dr, "dr", index_uni(1), index_uni(2))[ @@ -28914,7 +28804,6 @@ class transform_model final : public model_base_crtp { for (int sym1__ = 1; sym1__ <= m; ++sym1__) { current_statement__ = 33; for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 33; current_statement__ = 33; check_greater_or_equal(function__, "tpr_2[sym1__, sym2__]", tpr_2[(sym1__ - 1)][(sym2__ - 1)], @@ -28926,7 +28815,6 @@ class transform_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= m; ++sym2__) { current_statement__ = 34; for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 34; current_statement__ = 34; check_less_or_equal(function__, "tpr_3[sym1__, sym2__, sym3__]", tpr_3[(sym1__ - 1)][(sym2__ - 1)][(sym3__ - @@ -28937,7 +28825,6 @@ class transform_model final : public model_base_crtp { for (int sym1__ = 1; sym1__ <= m; ++sym1__) { current_statement__ = 35; for (int sym2__ = 1; sym2__ <= k; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "tpm_1[sym1__, sym2__]", rvalue(tpm_1, "tpm_1", @@ -28951,7 +28838,6 @@ class transform_model final : public model_base_crtp { for (int sym2__ = 1; sym2__ <= m; ++sym2__) { current_statement__ = 36; for (int sym3__ = 1; sym3__ <= k; ++sym3__) { - current_statement__ = 36; current_statement__ = 36; check_less_or_equal(function__, "tpm_2[sym1__, sym2__, sym3__]", rvalue(tpm_2, "tpm_2", diff --git a/test/integration/good/code-gen/mir.expected b/test/integration/good/code-gen/mir.expected index b687c9ff45..3619b3cb15 100644 --- a/test/integration/good/code-gen/mir.expected +++ b/test/integration/good/code-gen/mir.expected @@ -9,7 +9,7 @@ (((pattern (IfElse ((pattern - (FunApp StanLib Equals__ + (FunApp (StanLib Equals__) (((pattern (Var n)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 0)) @@ -25,13 +25,13 @@ ((pattern (Return (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var n)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp UserDefined foo + (FunApp (UserDefined foo) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var n)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -91,9 +91,9 @@ ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Indexed ((pattern (Var y)) @@ -109,7 +109,7 @@ (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Indexed ((pattern (Var theta)) @@ -225,7 +225,7 @@ (((pattern (Return (((pattern - (FunApp StanLib normal_rng + (FunApp (StanLib normal_rng) (((pattern (Var mu)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -243,7 +243,7 @@ (((pattern (TargetPE ((pattern - (FunApp StanLib normal_log + (FunApp (StanLib normal_log) (((pattern (Var u)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -256,12 +256,12 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib uniform_lupdf + (FunApp (StanLib uniform_lupdf) (((pattern (Var u)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Lit Int 100)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -412,7 +412,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -462,7 +462,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -512,7 +512,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -553,7 +553,7 @@ (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var v)) (meta ((type_ (UArray UInt)) (loc ) @@ -642,7 +642,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var vs)) (meta ((type_ UMatrix) (loc ) @@ -661,7 +661,7 @@ (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Indexed ((pattern (Var vs)) @@ -731,7 +731,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var vs)) (meta ((type_ UMatrix) (loc ) @@ -750,7 +750,7 @@ (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Indexed ((pattern (Var vs)) @@ -841,7 +841,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ UVector) (loc ) @@ -892,7 +892,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ UVector) (loc ) @@ -964,7 +964,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ URowVector) (loc ) @@ -1015,7 +1015,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ URowVector) (loc ) @@ -1122,7 +1122,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) @@ -1176,7 +1176,7 @@ (((pattern (Return (((pattern - (FunApp StanLib rep_array + (FunApp (StanLib rep_array) (((pattern (Var t)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -1195,11 +1195,11 @@ (((pattern (Return (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var x)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (FunApp StanLib target ())) + ((pattern (FunApp (StanLib target) ())) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) @@ -1211,7 +1211,7 @@ (((pattern (Block (((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "user-specified rejection")) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var x)) @@ -1237,9 +1237,9 @@ ((pattern (Assignment (abs_diff UReal ()) ((pattern - (FunApp StanLib fabs + (FunApp (StanLib fabs) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var x)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -1253,11 +1253,11 @@ ((pattern (Assignment (avg_scale UReal ()) ((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib fabs + (FunApp (StanLib fabs) (((pattern (Var x)) (meta ((type_ UReal) (loc ) @@ -1265,7 +1265,7 @@ (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern - (FunApp StanLib fabs + (FunApp (StanLib fabs) (((pattern (Var y)) (meta ((type_ UReal) (loc ) @@ -1281,9 +1281,9 @@ ((pattern (IfElse ((pattern - (FunApp StanLib Greater__ + (FunApp (StanLib Greater__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Var abs_diff)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -1297,7 +1297,7 @@ ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UInt) (loc ) (adlevel AutoDiffable)))) ((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "user-specified rejection, difference above ")) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) @@ -1320,9 +1320,9 @@ ((pattern (IfElse ((pattern - (FunApp StanLib Less__ + (FunApp (StanLib Less__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Var abs_diff)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -1336,7 +1336,7 @@ ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UInt) (loc ) (adlevel AutoDiffable)))) ((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "user-specified rejection, difference below ")) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) @@ -1359,7 +1359,7 @@ ((pattern (Return (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Var abs_diff)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -1380,9 +1380,9 @@ (((pattern (Return (((pattern - (FunApp StanLib Transpose__ + (FunApp (StanLib Transpose__) (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -1433,26 +1433,26 @@ (((pattern (Block (((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str o)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str "rows(mat)")) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var mat)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UInt) (loc ) (adlevel AutoDiffable))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str o)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str "cols(mat)")) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib cols + (FunApp (StanLib cols) (((pattern (Var mat)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) @@ -1464,13 +1464,13 @@ (Sized (SMatrix ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var mat)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UInt) (loc ) (adlevel AutoDiffable)))) ((pattern - (FunApp StanLib cols + (FunApp (StanLib cols) (((pattern (Var mat)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) @@ -1539,7 +1539,7 @@ (((pattern (Block (((pattern - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Lit Str hi)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ))))) @@ -1866,9 +1866,9 @@ (((pattern (Return (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -1902,7 +1902,7 @@ (meta ((type_ URowVector) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -1936,7 +1936,7 @@ (meta ((type_ URowVector) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -1980,9 +1980,9 @@ (((pattern (Return (((pattern - (FunApp StanLib Transpose__ + (FunApp (StanLib Transpose__) (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2034,11 +2034,11 @@ ((pattern (Assignment (l UVector ()) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var mu)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (FunApp UserDefined vecfoo ())) + ((pattern (FunApp (UserDefined vecfoo) ())) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) (meta )) @@ -2064,14 +2064,14 @@ ((pattern (Assignment (l UVector ()) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var mu)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern - (FunApp StanLib Transpose__ + (FunApp (StanLib Transpose__) (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2116,7 +2116,7 @@ ((type_ UVector) (loc ) (adlevel AutoDiffable)))) ((MultiIndex ((pattern - (FunApp CompilerInternal FnMakeArray__ + (FunApp (CompilerInternal FnMakeArray) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2161,7 +2161,7 @@ ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Indexed ((pattern (Var x)) @@ -2193,7 +2193,7 @@ ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Indexed ((pattern (Var x)) @@ -2551,10 +2551,8 @@ (Decl (decl_adtype DataOnly) (decl_id N) (decl_type (Sized SInt)))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str N)) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2565,10 +2563,8 @@ (Decl (decl_adtype DataOnly) (decl_id M) (decl_type (Sized SInt)))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str M)) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str M)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var M)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2579,10 +2575,8 @@ (Decl (decl_adtype DataOnly) (decl_id K) (decl_type (Sized SInt)))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str K)) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2590,15 +2584,13 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str K)) + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var M)) @@ -2606,7 +2598,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_1d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2634,10 +2626,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_int_1d_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str d_int_1d_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -2654,7 +2644,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2663,7 +2653,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -2672,7 +2662,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -2730,12 +2720,9 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str "d_int_3d_ar[sym1__, sym2__, sym3__]")) (meta @@ -2780,24 +2767,20 @@ (Decl (decl_adtype DataOnly) (decl_id J) (decl_type (Sized SReal)))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str J)) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str J)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var J)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Lit Real 2.0)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str J)) + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str J)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var J)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) @@ -2805,7 +2788,7 @@ (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_1d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2822,7 +2805,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2831,7 +2814,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -2840,7 +2823,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -2863,7 +2846,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2880,7 +2863,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2889,7 +2872,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2909,7 +2892,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2918,7 +2901,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -2927,7 +2910,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -2936,7 +2919,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2962,7 +2945,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2979,7 +2962,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2988,7 +2971,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3008,7 +2991,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3017,7 +3000,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -3026,7 +3009,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -3035,7 +3018,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3127,12 +3110,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck greater_or_equal)) + (((pattern (Lit Str "d_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -3233,12 +3214,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck less_or_equal)) + (((pattern (Lit Str "d_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -3289,7 +3268,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3306,16 +3285,14 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_simplex)) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_simplex)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3324,7 +3301,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3355,10 +3332,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_1d_simplex[sym1__])) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str d_1d_simplex[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -3374,7 +3349,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3383,7 +3358,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -3392,7 +3367,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -3401,7 +3376,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3462,12 +3437,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str "d_3d_simplex[sym1__, sym2__, sym3__]")) (meta @@ -3516,10 +3487,8 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_cfcov_54)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str d_cfcov_54)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) @@ -3535,16 +3504,14 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_cfcov_33)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str d_cfcov_33)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_cfcov_33_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -3577,10 +3544,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_cfcov_33_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str d_cfcov_33_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -3599,7 +3564,7 @@ (Decl (decl_adtype DataOnly) (decl_id d_int) (decl_type (Sized SInt)))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3616,7 +3581,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3636,7 +3601,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3662,7 +3627,7 @@ (Decl (decl_adtype DataOnly) (decl_id d_real) (decl_type (Sized SReal)))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3679,7 +3644,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3699,7 +3664,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3722,7 +3687,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3731,7 +3696,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3750,7 +3715,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3759,7 +3724,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3768,7 +3733,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3790,7 +3755,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3799,7 +3764,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3808,7 +3773,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3833,7 +3798,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3842,7 +3807,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3851,7 +3816,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3879,7 +3844,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3896,7 +3861,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3905,7 +3870,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3925,7 +3890,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3934,7 +3899,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3957,7 +3922,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3966,7 +3931,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -3992,7 +3957,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -4009,7 +3974,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -4018,7 +3983,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -4038,7 +4003,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -4047,7 +4012,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -4070,7 +4035,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -4079,7 +4044,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -4108,7 +4073,7 @@ (Decl (decl_adtype DataOnly) (decl_id td_int) (decl_type (Sized SInt)))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_1d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -4125,7 +4090,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_1dk)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -4144,7 +4109,7 @@ ((pattern (Assignment (td_1dk (UArray UInt) ()) ((pattern - (FunApp StanLib rep_array + (FunApp (StanLib rep_array) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var M)) @@ -4165,7 +4130,7 @@ ((pattern (Assignment (td_b UReal ()) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var J)) @@ -4178,7 +4143,7 @@ ((pattern (Assignment (td_c UReal ()) ((pattern - (FunApp UserDefined foo_bar1 + (FunApp (UserDefined foo_bar1) (((pattern (Var td_b)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -4200,7 +4165,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -4217,7 +4182,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -4226,7 +4191,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -4246,7 +4211,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -4255,7 +4220,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -4264,7 +4229,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -4273,7 +4238,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -4496,7 +4461,7 @@ ((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Lit Real 1.0)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var N)) @@ -4526,7 +4491,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Lit Real 1.0)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) @@ -4589,7 +4554,7 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Lit Real 1.0)) (meta ((type_ UReal) (loc ) @@ -4664,7 +4629,7 @@ ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Lit Str "ar dim1: ")) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) @@ -4691,13 +4656,13 @@ ((pattern (Assignment (td_cfcov_54 UMatrix ()) ((pattern - (FunApp StanLib diag_matrix + (FunApp (StanLib diag_matrix) (((pattern - (FunApp StanLib rep_vector + (FunApp (StanLib rep_vector) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var td_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) @@ -4707,13 +4672,13 @@ ((pattern (Assignment (td_cfcov_33 UMatrix ()) ((pattern - (FunApp StanLib diag_matrix + (FunApp (StanLib diag_matrix) (((pattern - (FunApp StanLib rep_vector + (FunApp (StanLib rep_vector) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var td_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) @@ -4740,7 +4705,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var blocked_tdata_vs)) (meta ((type_ URowVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) @@ -4788,7 +4753,7 @@ ((pattern (Assignment (indices (UArray UInt) ()) ((pattern - (FunApp CompilerInternal FnMakeArray__ + (FunApp (CompilerInternal FnMakeArray) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 2)) @@ -4827,7 +4792,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var sym1__)) (meta ((type_ (UArray UInt)) (loc ) @@ -4943,7 +4908,7 @@ ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnMakeArray__ + (FunApp (CompilerInternal FnMakeArray) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -4961,7 +4926,7 @@ ((pattern (Assignment (x_mul_ind (UArray UInt) ()) ((pattern - (FunApp CompilerInternal FnMakeArray__ + (FunApp (CompilerInternal FnMakeArray) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 2)) @@ -4973,7 +4938,7 @@ (decl_type (Sized SReal)))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_real_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -4990,7 +4955,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_real_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5010,7 +4975,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_real_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5033,7 +4998,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5042,7 +5007,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5061,7 +5026,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5070,7 +5035,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5079,7 +5044,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5101,7 +5066,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5110,7 +5075,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5119,7 +5084,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5144,7 +5109,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5153,7 +5118,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5162,7 +5127,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5190,7 +5155,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5207,7 +5172,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5216,7 +5181,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5236,7 +5201,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5245,7 +5210,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5268,7 +5233,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5277,7 +5242,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5303,7 +5268,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5320,7 +5285,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5329,7 +5294,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5349,7 +5314,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5358,7 +5323,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5382,7 +5347,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5391,7 +5356,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5420,7 +5385,7 @@ ((pattern (Assignment (transformed_data_real UReal ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -5430,7 +5395,7 @@ ((pattern (Assignment (transformed_data_real UReal ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -5440,7 +5405,7 @@ ((pattern (Assignment (transformed_data_real UReal ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -5450,7 +5415,7 @@ ((pattern (Assignment (transformed_data_real UReal ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -5460,7 +5425,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -5470,7 +5435,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -5480,7 +5445,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_2d)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -5493,7 +5458,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_2d)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -5507,7 +5472,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_3d)) (meta ((type_ (UArray (UArray (UArray UInt)))) (loc ) @@ -5522,7 +5487,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_3d)) (meta ((type_ (UArray (UArray (UArray UInt)))) (loc ) @@ -5536,7 +5501,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array)) @@ -5546,7 +5511,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array)) @@ -5556,7 +5521,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array_2d)) @@ -5569,7 +5534,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array_2d)) @@ -5583,7 +5548,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array_3d)) @@ -5598,7 +5563,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array_3d)) @@ -5612,7 +5577,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array)) @@ -5622,7 +5587,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array)) @@ -5632,7 +5597,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array_2d)) @@ -5645,7 +5610,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array_2d)) @@ -5659,7 +5624,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array_3d)) @@ -5674,7 +5639,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array_3d)) @@ -5688,7 +5653,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -5698,7 +5663,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -5708,7 +5673,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_2d)) (meta ((type_ (UArray (UArray UReal))) (loc ) @@ -5721,7 +5686,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_2d)) (meta ((type_ (UArray (UArray UReal))) (loc ) @@ -5735,7 +5700,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_3d)) (meta ((type_ (UArray (UArray (UArray UReal)))) (loc ) @@ -5750,7 +5715,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_3d)) (meta ((type_ (UArray (UArray (UArray UReal)))) (loc ) @@ -5764,7 +5729,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array)) @@ -5774,7 +5739,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array)) @@ -5784,7 +5749,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_2d)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -5799,7 +5764,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_2d)) (meta ((type_ (UArray (UArray UReal))) (loc ) @@ -5815,7 +5780,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_3d)) (meta ((type_ (UArray (UArray (UArray UInt)))) (loc ) @@ -5832,7 +5797,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_3d)) (meta ((type_ (UArray (UArray (UArray UReal)))) (loc ) @@ -5848,7 +5813,7 @@ ((pattern (Assignment (transformed_data_vector UVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector)) (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -5858,7 +5823,7 @@ ((pattern (Assignment (transformed_data_vector UVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector)) (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -5868,7 +5833,7 @@ ((pattern (Assignment (transformed_data_vector_array (UArray UVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array)) (meta ((type_ (UArray UVector)) (loc ) (adlevel DataOnly)))) @@ -5879,7 +5844,7 @@ ((pattern (Assignment (transformed_data_vector_array (UArray UVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array)) (meta ((type_ (UArray UVector)) (loc ) (adlevel DataOnly)))) @@ -5891,7 +5856,7 @@ (Assignment (transformed_data_vector_array_2d (UArray (UArray UVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_2d)) (meta ((type_ (UArray (UArray UVector))) (loc ) @@ -5905,7 +5870,7 @@ (Assignment (transformed_data_vector_array_2d (UArray (UArray UVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_2d)) (meta ((type_ (UArray (UArray UVector))) (loc ) @@ -5920,7 +5885,7 @@ (transformed_data_vector_array_3d (UArray (UArray (UArray UVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray UVector)))) (loc ) @@ -5936,7 +5901,7 @@ (transformed_data_vector_array_3d (UArray (UArray (UArray UVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray UVector)))) (loc ) @@ -5950,7 +5915,7 @@ ((pattern (Assignment (transformed_data_vector UVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector)) @@ -5960,7 +5925,7 @@ ((pattern (Assignment (transformed_data_vector UVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector)) @@ -5970,7 +5935,7 @@ ((pattern (Assignment (transformed_data_vector_array (UArray UVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array)) @@ -5981,7 +5946,7 @@ ((pattern (Assignment (transformed_data_vector_array (UArray UVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array)) @@ -5993,7 +5958,7 @@ (Assignment (transformed_data_vector_array_2d (UArray (UArray UVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array_2d)) @@ -6007,7 +5972,7 @@ (Assignment (transformed_data_vector_array_2d (UArray (UArray UVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array_2d)) @@ -6022,7 +5987,7 @@ (transformed_data_vector_array_3d (UArray (UArray (UArray UVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array_3d)) @@ -6038,7 +6003,7 @@ (transformed_data_vector_array_3d (UArray (UArray (UArray UVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array_3d)) @@ -6052,7 +6017,7 @@ ((pattern (Assignment (transformed_data_vector UVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector)) (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector)) @@ -6062,7 +6027,7 @@ ((pattern (Assignment (transformed_data_vector_array (UArray UVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array)) (meta ((type_ (UArray UVector)) (loc ) (adlevel DataOnly)))) @@ -6075,7 +6040,7 @@ (Assignment (transformed_data_vector_array_2d (UArray (UArray UVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_2d)) (meta ((type_ (UArray (UArray UVector))) (loc ) @@ -6092,7 +6057,7 @@ (transformed_data_vector_array_3d (UArray (UArray (UArray UVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray UVector)))) (loc ) @@ -6108,7 +6073,7 @@ ((pattern (Assignment (transformed_data_row_vector URowVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector)) (meta ((type_ URowVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -6118,7 +6083,7 @@ ((pattern (Assignment (transformed_data_row_vector URowVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector)) (meta ((type_ URowVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -6128,7 +6093,7 @@ ((pattern (Assignment (transformed_data_row_vector_array (UArray URowVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array)) (meta ((type_ (UArray URowVector)) (loc ) (adlevel DataOnly)))) @@ -6139,7 +6104,7 @@ ((pattern (Assignment (transformed_data_row_vector_array (UArray URowVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array)) (meta ((type_ (UArray URowVector)) (loc ) (adlevel DataOnly)))) @@ -6151,7 +6116,7 @@ (Assignment (transformed_data_row_vector_array_2d (UArray (UArray URowVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_2d)) (meta ((type_ (UArray (UArray URowVector))) (loc ) @@ -6166,7 +6131,7 @@ (Assignment (transformed_data_row_vector_array_2d (UArray (UArray URowVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_2d)) (meta ((type_ (UArray (UArray URowVector))) (loc ) @@ -6182,7 +6147,7 @@ (transformed_data_row_vector_array_3d (UArray (UArray (UArray URowVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray URowVector)))) (loc ) @@ -6198,7 +6163,7 @@ (transformed_data_row_vector_array_3d (UArray (UArray (UArray URowVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray URowVector)))) (loc ) @@ -6212,7 +6177,7 @@ ((pattern (Assignment (transformed_data_row_vector URowVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector)) @@ -6222,7 +6187,7 @@ ((pattern (Assignment (transformed_data_row_vector URowVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector)) @@ -6232,7 +6197,7 @@ ((pattern (Assignment (transformed_data_row_vector_array (UArray URowVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array)) @@ -6243,7 +6208,7 @@ ((pattern (Assignment (transformed_data_row_vector_array (UArray URowVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array)) @@ -6255,7 +6220,7 @@ (Assignment (transformed_data_row_vector_array_2d (UArray (UArray URowVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array_2d)) @@ -6270,7 +6235,7 @@ (Assignment (transformed_data_row_vector_array_2d (UArray (UArray URowVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array_2d)) @@ -6286,7 +6251,7 @@ (transformed_data_row_vector_array_3d (UArray (UArray (UArray URowVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array_3d)) @@ -6302,7 +6267,7 @@ (transformed_data_row_vector_array_3d (UArray (UArray (UArray URowVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array_3d)) @@ -6316,7 +6281,7 @@ ((pattern (Assignment (transformed_data_row_vector URowVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector)) (meta ((type_ URowVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector)) @@ -6326,7 +6291,7 @@ ((pattern (Assignment (transformed_data_row_vector_array (UArray URowVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array)) (meta ((type_ (UArray URowVector)) (loc ) (adlevel DataOnly)))) @@ -6339,7 +6304,7 @@ (Assignment (transformed_data_row_vector_array_2d (UArray (UArray URowVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_2d)) (meta ((type_ (UArray (UArray URowVector))) (loc ) @@ -6357,7 +6322,7 @@ (transformed_data_row_vector_array_3d (UArray (UArray (UArray URowVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray URowVector)))) (loc ) @@ -6373,7 +6338,7 @@ ((pattern (Assignment (transformed_data_matrix UMatrix ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -6383,7 +6348,7 @@ ((pattern (Assignment (transformed_data_matrix UMatrix ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -6393,7 +6358,7 @@ ((pattern (Assignment (transformed_data_matrix_array (UArray UMatrix) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array)) (meta ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly)))) @@ -6404,7 +6369,7 @@ ((pattern (Assignment (transformed_data_matrix_array (UArray UMatrix) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array)) (meta ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly)))) @@ -6416,7 +6381,7 @@ (Assignment (transformed_data_matrix_array_2d (UArray (UArray UMatrix)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_2d)) (meta ((type_ (UArray (UArray UMatrix))) (loc ) @@ -6430,7 +6395,7 @@ (Assignment (transformed_data_matrix_array_2d (UArray (UArray UMatrix)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_2d)) (meta ((type_ (UArray (UArray UMatrix))) (loc ) @@ -6445,7 +6410,7 @@ (transformed_data_matrix_array_3d (UArray (UArray (UArray UMatrix))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_3d)) (meta ((type_ (UArray (UArray (UArray UMatrix)))) (loc ) @@ -6461,7 +6426,7 @@ (transformed_data_matrix_array_3d (UArray (UArray (UArray UMatrix))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_3d)) (meta ((type_ (UArray (UArray (UArray UMatrix)))) (loc ) @@ -6475,7 +6440,7 @@ ((pattern (Assignment (transformed_data_matrix UMatrix ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix)) @@ -6485,7 +6450,7 @@ ((pattern (Assignment (transformed_data_matrix UMatrix ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix)) @@ -6495,7 +6460,7 @@ ((pattern (Assignment (transformed_data_matrix_array (UArray UMatrix) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array)) @@ -6506,7 +6471,7 @@ ((pattern (Assignment (transformed_data_matrix_array (UArray UMatrix) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array)) @@ -6518,7 +6483,7 @@ (Assignment (transformed_data_matrix_array_2d (UArray (UArray UMatrix)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array_2d)) @@ -6532,7 +6497,7 @@ (Assignment (transformed_data_matrix_array_2d (UArray (UArray UMatrix)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array_2d)) @@ -6547,7 +6512,7 @@ (transformed_data_matrix_array_3d (UArray (UArray (UArray UMatrix))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array_3d)) @@ -6563,7 +6528,7 @@ (transformed_data_matrix_array_3d (UArray (UArray (UArray UMatrix))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array_3d)) @@ -6577,7 +6542,7 @@ ((pattern (Assignment (transformed_data_matrix UMatrix ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix)) @@ -6587,7 +6552,7 @@ ((pattern (Assignment (transformed_data_matrix_array (UArray UMatrix) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array)) (meta ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly)))) @@ -6600,7 +6565,7 @@ (Assignment (transformed_data_matrix_array_2d (UArray (UArray UMatrix)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_2d)) (meta ((type_ (UArray (UArray UMatrix))) (loc ) @@ -6617,7 +6582,7 @@ (transformed_data_matrix_array_3d (UArray (UArray (UArray UMatrix))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_3d)) (meta ((type_ (UArray (UArray (UArray UMatrix)))) (loc ) @@ -6633,7 +6598,7 @@ ((pattern (Assignment (td_int UInt ()) ((pattern - (FunApp StanLib EltTimes__ + (FunApp (StanLib EltTimes__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -6643,7 +6608,7 @@ ((pattern (Assignment (transformed_data_real UReal ()) ((pattern - (FunApp StanLib EltTimes__ + (FunApp (StanLib EltTimes__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -6701,12 +6666,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck greater_or_equal)) + (((pattern (Lit Str "td_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -6807,12 +6770,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck less_or_equal)) + (((pattern (Lit Str "td_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -6863,10 +6824,8 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str td_simplex)) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str td_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var td_simplex)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) @@ -6883,10 +6842,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str td_1d_simplex[sym1__])) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str td_1d_simplex[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -6937,12 +6894,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str "td_3d_simplex[sym1__, sym2__, sym3__]")) (meta @@ -6981,25 +6934,21 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str td_cfcov_54)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str td_cfcov_54)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var td_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str td_cfcov_33)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str td_cfcov_33)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var td_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_real_1d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7008,7 +6957,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7017,7 +6966,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7026,7 +6975,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7035,7 +6984,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7044,7 +6993,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7053,7 +7002,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7062,7 +7011,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7071,7 +7020,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7080,7 +7029,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7089,7 +7038,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7098,7 +7047,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7107,7 +7056,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7116,7 +7065,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7125,7 +7074,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7134,7 +7083,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7143,7 +7092,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7152,7 +7101,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7161,7 +7110,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSizeSimplex__ + (NRFunApp (CompilerInternal FnValidateSizeSimplex) (((pattern (Lit Str p_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7170,7 +7119,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7179,7 +7128,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSizeSimplex__ + (NRFunApp (CompilerInternal FnValidateSizeSimplex) (((pattern (Lit Str p_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7188,7 +7137,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7197,7 +7146,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7206,7 +7155,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7215,7 +7164,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSizeSimplex__ + (NRFunApp (CompilerInternal FnValidateSizeSimplex) (((pattern (Lit Str p_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7224,7 +7173,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp StanLib check_greater_or_equal + (NRFunApp (StanLib check_greater_or_equal) (((pattern (Lit Str "cholesky_factor_cov p_cfcov_54")) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str "num rows (must be greater or equal to num cols)")) @@ -7235,7 +7184,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp StanLib check_greater_or_equal + (NRFunApp (StanLib check_greater_or_equal) (((pattern (Lit Str "cholesky_factor_cov p_cfcov_33")) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str "num rows (must be greater or equal to num cols)")) @@ -7246,7 +7195,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_cfcov_33_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7255,7 +7204,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp StanLib check_greater_or_equal + (NRFunApp (StanLib check_greater_or_equal) (((pattern (Lit Str "cholesky_factor_cov p_cfcov_33_ar")) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str "num rows (must be greater or equal to num cols)")) @@ -7266,7 +7215,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_real_1d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7275,7 +7224,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7284,7 +7233,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7293,7 +7242,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7302,7 +7251,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7311,7 +7260,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7320,7 +7269,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7329,7 +7278,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7338,7 +7287,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7347,7 +7296,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7356,7 +7305,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7365,7 +7314,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7374,7 +7323,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7383,7 +7332,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7392,7 +7341,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7401,7 +7350,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7410,7 +7359,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7419,7 +7368,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7428,7 +7377,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7437,7 +7386,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7446,7 +7395,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7455,7 +7404,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7464,7 +7413,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7473,7 +7422,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7482,7 +7431,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7491,7 +7440,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_cfcov_33_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7500,7 +7449,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_real_1d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7509,7 +7458,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7518,7 +7467,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7527,7 +7476,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7536,7 +7485,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7545,7 +7494,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7554,7 +7503,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7563,7 +7512,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7572,7 +7521,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7581,7 +7530,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7590,7 +7539,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7599,7 +7548,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7608,7 +7557,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7617,7 +7566,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7626,7 +7575,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7635,7 +7584,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7644,7 +7593,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7653,7 +7602,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7662,7 +7611,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7671,7 +7620,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7680,7 +7629,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7689,7 +7638,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7698,7 +7647,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7707,7 +7656,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7716,7 +7665,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7725,7 +7674,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_cfcov_33_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -8319,9 +8268,9 @@ ((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Lit Real 1.0)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) @@ -8345,7 +8294,7 @@ ((pattern (Assignment (tp_row_vec URowVector ()) ((pattern - (FunApp StanLib Transpose__ + (FunApp (StanLib Transpose__) (((pattern (Indexed ((pattern (Var tp_1d_vec)) @@ -8374,7 +8323,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -8396,7 +8345,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -8424,7 +8373,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -8452,7 +8401,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -8474,7 +8423,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -8502,7 +8451,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -8524,7 +8473,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -8552,7 +8501,7 @@ ((pattern (Assignment (tp_real UReal ()) ((pattern - (FunApp StanLib EltTimes__ + (FunApp (StanLib EltTimes__) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var p_real)) @@ -8562,7 +8511,7 @@ ((pattern (Assignment (tp_real UReal ()) ((pattern - (FunApp StanLib EltDivide__ + (FunApp (StanLib EltDivide__) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var p_real)) @@ -8581,10 +8530,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_real_1d_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str tp_real_1d_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -8637,12 +8584,9 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str "tp_real_3d_ar[sym1__, sym2__, sym3__]")) (meta @@ -8695,10 +8639,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_vec[sym1__])) + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str tp_vec[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -8765,12 +8707,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck greater_or_equal)) + (((pattern (Lit Str "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -8871,12 +8811,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck less_or_equal)) + (((pattern (Lit Str "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -8927,10 +8865,8 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_simplex)) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str tp_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var tp_simplex)) (meta ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) @@ -8947,10 +8883,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_1d_simplex[sym1__])) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str tp_1d_simplex[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -9002,12 +8936,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str "tp_3d_simplex[sym1__, sym2__, sym3__]")) (meta @@ -9046,19 +8976,15 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_54)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_54)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var tp_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_33)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_33)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var tp_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) @@ -9075,10 +9001,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_33_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_33_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -9122,7 +9046,7 @@ ((pattern (Assignment (r1 UReal ()) ((pattern - (FunApp UserDefined foo_bar1 + (FunApp (UserDefined foo_bar1) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) @@ -9134,7 +9058,7 @@ ((pattern (Assignment (r2 UReal ()) ((pattern - (FunApp UserDefined foo_bar1 + (FunApp (UserDefined foo_bar1) (((pattern (Var J)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -9142,7 +9066,7 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Lit Int 0)) @@ -9154,7 +9078,7 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var offset_multiplier)) (meta ((type_ (UArray UReal)) (loc ) @@ -9168,7 +9092,7 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var no_offset_multiplier)) (meta ((type_ (UArray UReal)) (loc ) @@ -9182,7 +9106,7 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var offset_no_multiplier)) (meta ((type_ (UArray UReal)) (loc ) @@ -9196,9 +9120,9 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Var p_real_1d_ar)) (meta ((type_ (UArray UReal)) (loc ) @@ -9224,9 +9148,9 @@ (((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Indexed ((pattern (Var p_1d_vec)) @@ -9256,9 +9180,9 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Indexed ((pattern (Var p_1d_row_vec)) @@ -9288,9 +9212,9 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Indexed ((pattern (Var p_1d_simplex)) @@ -9344,9 +9268,9 @@ (((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Indexed ((pattern (Var p_3d_vec)) @@ -9415,9 +9339,9 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Indexed ((pattern (Var p_3d_row_vec)) @@ -9488,9 +9412,9 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Indexed ((pattern (Var p_3d_simplex)) @@ -9559,7 +9483,7 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Indexed ((pattern (Var p_real_3d_ar)) @@ -9651,9 +9575,9 @@ (((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Indexed ((pattern (Var p_ar_mat)) @@ -9707,9 +9631,9 @@ (((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Indexed ((pattern (Var p_cfcov_33_ar)) @@ -9741,9 +9665,9 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Var p_vec)) (meta ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) @@ -9757,9 +9681,9 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Var p_row_vec)) (meta ((type_ URowVector) (loc ) @@ -9774,9 +9698,9 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Var p_simplex)) (meta ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) @@ -9790,9 +9714,9 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Var p_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) @@ -9806,9 +9730,9 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern - (FunApp StanLib to_vector + (FunApp (StanLib to_vector) (((pattern (Var p_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) @@ -9822,7 +9746,7 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib map_rect + (FunApp (StanLib map_rect) (((pattern (Var binomialf)) (meta ((type_ @@ -10273,7 +10197,7 @@ ((pattern (IfElse ((pattern - (FunApp StanLib PNot__ + (FunApp (StanLib PNot__) (((pattern (EOr ((pattern (Var emit_transformed_parameters__)) @@ -10447,9 +10371,9 @@ ((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Lit Real 1.0)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) @@ -10473,7 +10397,7 @@ ((pattern (Assignment (tp_row_vec URowVector ()) ((pattern - (FunApp StanLib Transpose__ + (FunApp (StanLib Transpose__) (((pattern (Indexed ((pattern (Var tp_1d_vec)) @@ -10502,7 +10426,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -10524,7 +10448,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -10552,7 +10476,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -10580,7 +10504,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -10602,7 +10526,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -10630,7 +10554,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -10652,7 +10576,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -10680,7 +10604,7 @@ ((pattern (Assignment (tp_real UReal ()) ((pattern - (FunApp StanLib EltTimes__ + (FunApp (StanLib EltTimes__) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var p_real)) @@ -10690,7 +10614,7 @@ ((pattern (Assignment (tp_real UReal ()) ((pattern - (FunApp StanLib EltDivide__ + (FunApp (StanLib EltDivide__) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var p_real)) @@ -10709,10 +10633,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_real_1d_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str tp_real_1d_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -10765,12 +10687,9 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str "tp_real_3d_ar[sym1__, sym2__, sym3__]")) (meta @@ -10823,10 +10742,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_vec[sym1__])) + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str tp_vec[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -10892,12 +10809,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck greater_or_equal)) + (((pattern (Lit Str "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -10998,12 +10913,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck less_or_equal)) + (((pattern (Lit Str "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -11054,10 +10967,8 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_simplex)) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str tp_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var tp_simplex)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) @@ -11074,10 +10985,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_1d_simplex[sym1__])) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str tp_1d_simplex[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -11128,12 +11037,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str "tp_3d_simplex[sym1__, sym2__, sym3__]")) (meta @@ -11172,19 +11077,15 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_54)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_54)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var tp_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_33)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_33)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var tp_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) @@ -11201,10 +11102,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_33_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_33_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -11222,7 +11121,7 @@ ((pattern (IfElse ((pattern - (FunApp StanLib PNot__ + (FunApp (StanLib PNot__) (((pattern (Var emit_generated_quantities__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -11234,7 +11133,7 @@ ((pattern (Assignment (gq_r1 UReal ()) ((pattern - (FunApp UserDefined foo_bar1 + (FunApp (UserDefined foo_bar1) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -11245,7 +11144,7 @@ ((pattern (Assignment (gq_r2 UReal ()) ((pattern - (FunApp UserDefined foo_bar1 + (FunApp (UserDefined foo_bar1) (((pattern (Var J)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -11440,7 +11339,7 @@ ((pattern (Assignment (indices (UArray UInt) ()) ((pattern - (FunApp CompilerInternal FnMakeArray__ + (FunApp (CompilerInternal FnMakeArray) (((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -11757,9 +11656,9 @@ ((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Lit Real 1.0)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) @@ -11832,7 +11731,7 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib normal_rng + (FunApp (StanLib normal_rng) (((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) @@ -11858,7 +11757,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib size + (FunApp (StanLib size) (((pattern (Var indices)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) @@ -11872,7 +11771,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib size + (FunApp (StanLib size) (((pattern (Var indices)) (meta ((type_ (UArray UInt)) (loc ) @@ -11951,7 +11850,7 @@ ((pattern (IfElse ((pattern - (FunApp StanLib NEquals__ + (FunApp (StanLib NEquals__) (((pattern (Indexed ((pattern @@ -11997,7 +11896,7 @@ (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "indexing test 1 failed")) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) @@ -12021,7 +11920,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib size + (FunApp (StanLib size) (((pattern (Var indices)) (meta ((type_ (UArray UInt)) (loc ) @@ -12088,7 +11987,7 @@ ((pattern (IfElse ((pattern - (FunApp StanLib NEquals__ + (FunApp (StanLib NEquals__) (((pattern (Indexed ((pattern @@ -12131,7 +12030,7 @@ (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "indexing test 2 failed")) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) @@ -12144,7 +12043,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib size + (FunApp (StanLib size) (((pattern (Var indices)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) @@ -12170,7 +12069,7 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib size + (FunApp (StanLib size) (((pattern (Var indices)) (meta ((type_ (UArray UInt)) (loc ) @@ -12267,7 +12166,7 @@ ((pattern (IfElse ((pattern - (FunApp StanLib NEquals__ + (FunApp (StanLib NEquals__) (((pattern (Indexed ((pattern @@ -12314,7 +12213,7 @@ (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "indexing test 3 failed")) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) @@ -12368,10 +12267,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_real_1d_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str gq_real_1d_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -12424,12 +12321,9 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str "gq_real_3d_ar[sym1__, sym2__, sym3__]")) (meta @@ -12482,10 +12376,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_vec[sym1__])) + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str gq_vec[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -12551,12 +12443,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck greater_or_equal)) + (((pattern (Lit Str "gq_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -12657,12 +12547,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck less_or_equal)) + (((pattern (Lit Str "gq_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -12713,10 +12601,8 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_simplex)) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str gq_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var gq_simplex)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) @@ -12733,10 +12619,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_1d_simplex[sym1__])) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str gq_1d_simplex[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -12787,12 +12671,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str "gq_3d_simplex[sym1__, sym2__, sym3__]")) (meta @@ -12831,19 +12711,15 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_cfcov_54)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str gq_cfcov_54)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var gq_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_cfcov_33)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str gq_cfcov_33)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var gq_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) @@ -12860,10 +12736,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_cfcov_33_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str gq_cfcov_33_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -12893,11 +12767,9 @@ ((pattern (Assignment (p_upper_free__ UReal ()) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain lb)) (((pattern (Var p_upper)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -12913,11 +12785,9 @@ ((pattern (Assignment (p_lower_free__ UReal ()) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain ub)) (((pattern (Var p_lower)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str ub)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var p_upper)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -12956,7 +12826,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain offset_multiplier)) (((pattern (Indexed ((pattern (Var offset_multiplier)) @@ -12968,8 +12838,6 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 2)) @@ -13012,7 +12880,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain offset_multiplier)) (((pattern (Indexed ((pattern (Var no_offset_multiplier)) @@ -13024,8 +12892,6 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 2)) @@ -13068,7 +12934,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain offset_multiplier)) (((pattern (Indexed ((pattern (Var offset_no_multiplier)) @@ -13080,8 +12946,6 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -13124,7 +12988,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain lb)) (((pattern (Indexed ((pattern (Var p_real_1d_ar)) @@ -13136,8 +13000,6 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -13227,7 +13089,7 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain lb)) (((pattern (Indexed ((pattern (Var p_real_3d_ar)) @@ -13253,10 +13115,6 @@ (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) ((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) @@ -13305,7 +13163,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain lb)) (((pattern (Indexed ((pattern (Var p_vec)) @@ -13316,8 +13174,6 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -13495,8 +13351,9 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal - FnUnconstrain__ + (FunApp + (CompilerInternal + (FnUnconstrain lub)) (((pattern (Indexed ((pattern (Var p_ar_mat)) @@ -13528,10 +13385,6 @@ (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lub)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) ((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) @@ -13566,7 +13419,7 @@ (Sized (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -13576,11 +13429,9 @@ ((pattern (Assignment (p_simplex_free__ UVector ()) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain simplex)) (((pattern (Var p_simplex)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ UVector) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern @@ -13601,7 +13452,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -13628,7 +13479,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain simplex)) (((pattern (Indexed ((pattern (Var p_1d_simplex)) @@ -13639,9 +13490,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ UVector) (loc ) (adlevel DataOnly)))))) (meta ))))) (meta ))))) @@ -13672,7 +13521,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -13740,7 +13589,8 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp + (CompilerInternal (FnUnconstrain simplex)) (((pattern (Indexed ((pattern (Var p_3d_simplex)) @@ -13765,10 +13615,6 @@ (adlevel DataOnly)))))))) (meta ((type_ UVector) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UVector) (loc ) @@ -13796,18 +13642,18 @@ (Sized (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) @@ -13826,9 +13672,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 4)) @@ -13842,11 +13688,9 @@ ((pattern (Assignment (p_cfcov_54_free__ UVector ()) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain cholesky_factor)) (((pattern (Var p_cfcov_54)) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern @@ -13865,18 +13709,18 @@ (Sized (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) @@ -13895,9 +13739,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -13911,11 +13755,9 @@ ((pattern (Assignment (p_cfcov_33_free__ UVector ()) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain cholesky_factor)) (((pattern (Var p_cfcov_33)) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern @@ -13938,18 +13780,18 @@ (SArray (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) @@ -13970,9 +13812,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -14005,7 +13847,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain cholesky_factor)) (((pattern (Indexed ((pattern (Var p_cfcov_33_ar)) @@ -14016,9 +13858,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) (meta ))))) (meta ))))) @@ -14289,7 +14129,7 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -14305,7 +14145,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -14328,7 +14168,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -14358,18 +14198,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -14386,9 +14226,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 4)) @@ -14409,18 +14249,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -14437,9 +14277,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -14461,18 +14301,18 @@ (SArray (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) @@ -14491,9 +14331,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -14723,7 +14563,7 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -14739,7 +14579,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -14762,7 +14602,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -14792,18 +14632,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -14820,9 +14660,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 4)) @@ -14843,18 +14683,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -14871,9 +14711,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -14895,18 +14735,18 @@ (SArray (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) @@ -14925,9 +14765,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -15156,7 +14996,7 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -15172,7 +15012,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -15195,7 +15035,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -15225,18 +15065,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -15253,9 +15093,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 4)) @@ -15276,18 +15116,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -15304,9 +15144,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -15328,18 +15168,18 @@ (SArray (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) @@ -15358,9 +15198,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) diff --git a/test/integration/good/code-gen/profiling/cpp.expected b/test/integration/good/code-gen/profiling/cpp.expected index 393eed5204..6de08e733c 100644 --- a/test/integration/good/code-gen/profiling/cpp.expected +++ b/test/integration/good/code-gen/profiling/cpp.expected @@ -94,7 +94,6 @@ class simple_function_model final : public model_base_crtp(0, std::numeric_limits::min()); - current_statement__ = 25; current_statement__ = 25; check_greater_or_equal(function__, "kappa", 1000000, 0); current_statement__ = 28; @@ -333,21 +331,18 @@ class ad_level_failing_model final : public model_base_crtp { current_statement__ = 31; nind = context__.vals_i("nind")[(1 - 1)]; current_statement__ = 31; - current_statement__ = 31; check_greater_or_equal(function__, "nind", nind, 0); current_statement__ = 32; context__.validate_dims("data initialization","n_occasions","int", @@ -1336,7 +1318,6 @@ class copy_fail_model final : public model_base_crtp { current_statement__ = 32; n_occasions = context__.vals_i("n_occasions")[(1 - 1)]; current_statement__ = 32; - current_statement__ = 32; check_greater_or_equal(function__, "n_occasions", n_occasions, 2); current_statement__ = 33; validate_non_negative_index("y", "nind", nind); @@ -1395,13 +1376,11 @@ class copy_fail_model final : public model_base_crtp { if (lcm_sym157__) { current_statement__ = 35; if (lcm_sym156__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", @@ -1410,13 +1389,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 35; if (lcm_sym156__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], 0);} @@ -1426,12 +1403,10 @@ class copy_fail_model final : public model_base_crtp { if (lcm_sym157__) { current_statement__ = 35; if (lcm_sym156__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", @@ -1440,13 +1415,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 35; if (lcm_sym156__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], 1);} @@ -1460,7 +1433,6 @@ class copy_fail_model final : public model_base_crtp { current_statement__ = 36; max_age = context__.vals_i("max_age")[(1 - 1)]; current_statement__ = 36; - current_statement__ = 36; check_greater_or_equal(function__, "max_age", max_age, 1); current_statement__ = 37; validate_non_negative_index("x", "nind", nind); @@ -1515,13 +1487,11 @@ class copy_fail_model final : public model_base_crtp { if (lcm_sym157__) { current_statement__ = 38; if (lcm_sym158__) { - current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { - current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", @@ -1530,13 +1500,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 38; if (lcm_sym158__) { - current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { - current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", x[(sym1__ - 1)][(sym2__ - 1)], 0);} @@ -1546,13 +1514,11 @@ class copy_fail_model final : public model_base_crtp { if (lcm_sym157__) { current_statement__ = 38; if (lcm_sym158__) { - current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", index_uni(1), index_uni(1)), max_age); for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { - current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", @@ -1562,13 +1528,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 38; if (lcm_sym158__) { - current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", index_uni(sym1__), index_uni(1)), max_age); for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { - current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", x[(sym1__ - 1)][(sym2__ - 1)], max_age);} @@ -1702,48 +1666,40 @@ class copy_fail_model final : public model_base_crtp { } current_statement__ = 41; if (lcm_sym157__) { - current_statement__ = 41; current_statement__ = 41; check_greater_or_equal(function__, "first[sym1__]", rvalue(first, "first", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 41; current_statement__ = 41; check_greater_or_equal(function__, "first[sym1__]", first[(sym1__ - 1)], 0);} } current_statement__ = 41; if (lcm_sym157__) { - current_statement__ = 41; current_statement__ = 41; check_less_or_equal(function__, "first[sym1__]", rvalue(first, "first", index_uni(1)), n_occasions); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 41; current_statement__ = 41; check_less_or_equal(function__, "first[sym1__]", first[(sym1__ - 1)], n_occasions);} } current_statement__ = 43; if (lcm_sym157__) { - current_statement__ = 43; current_statement__ = 43; check_greater_or_equal(function__, "last[sym1__]", rvalue(last, "last", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 43; current_statement__ = 43; check_greater_or_equal(function__, "last[sym1__]", last[(sym1__ - 1)], 0);} } current_statement__ = 43; if (lcm_sym157__) { - current_statement__ = 43; current_statement__ = 43; check_less_or_equal(function__, "last[sym1__]", rvalue(last, "last", index_uni(1)), n_occasions); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 43; current_statement__ = 43; check_less_or_equal(function__, "last[sym1__]", last[(sym1__ - 1)], n_occasions);} @@ -2039,13 +1995,11 @@ class copy_fail_model final : public model_base_crtp { lcm_sym115__ = (n_occasions - 1); lcm_sym105__ = logical_gte(lcm_sym115__, 1); if (lcm_sym105__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -2054,13 +2008,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym105__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -2073,13 +2025,11 @@ class copy_fail_model final : public model_base_crtp { lcm_sym115__ = (n_occasions - 1); lcm_sym105__ = logical_gte(lcm_sym115__, 1); if (lcm_sym105__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -2088,13 +2038,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym105__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -2107,13 +2055,11 @@ class copy_fail_model final : public model_base_crtp { lcm_sym115__ = (n_occasions - 1); lcm_sym105__ = logical_gte(lcm_sym115__, 1); if (lcm_sym105__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -2122,13 +2068,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym105__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -2141,12 +2085,10 @@ class copy_fail_model final : public model_base_crtp { lcm_sym115__ = (n_occasions - 1); lcm_sym105__ = logical_gte(lcm_sym115__, 1); if (lcm_sym105__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -2155,13 +2097,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym105__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -2173,13 +2113,11 @@ class copy_fail_model final : public model_base_crtp { if (lcm_sym104__) { lcm_sym103__ = logical_gte(n_occasions, 1); if (lcm_sym103__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -2188,13 +2126,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym103__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -2206,13 +2142,11 @@ class copy_fail_model final : public model_base_crtp { if (lcm_sym104__) { lcm_sym103__ = logical_gte(n_occasions, 1); if (lcm_sym103__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -2221,13 +2155,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym103__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -2585,13 +2517,11 @@ class copy_fail_model final : public model_base_crtp { lcm_sym63__ = (n_occasions - 1); lcm_sym57__ = logical_gte(lcm_sym63__, 1); if (lcm_sym57__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -2600,13 +2530,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym57__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -2619,13 +2547,11 @@ class copy_fail_model final : public model_base_crtp { lcm_sym63__ = (n_occasions - 1); lcm_sym57__ = logical_gte(lcm_sym63__, 1); if (lcm_sym57__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -2634,13 +2560,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym57__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -2653,13 +2577,11 @@ class copy_fail_model final : public model_base_crtp { lcm_sym63__ = (n_occasions - 1); lcm_sym57__ = logical_gte(lcm_sym63__, 1); if (lcm_sym57__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -2668,13 +2590,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym57__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -2687,12 +2607,10 @@ class copy_fail_model final : public model_base_crtp { lcm_sym63__ = (n_occasions - 1); lcm_sym57__ = logical_gte(lcm_sym63__, 1); if (lcm_sym57__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -2701,13 +2619,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym57__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -2719,13 +2635,11 @@ class copy_fail_model final : public model_base_crtp { if (lcm_sym56__) { lcm_sym55__ = logical_gte(n_occasions, 1); if (lcm_sym55__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -2734,13 +2648,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym55__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -2752,13 +2664,11 @@ class copy_fail_model final : public model_base_crtp { if (lcm_sym56__) { lcm_sym55__ = logical_gte(n_occasions, 1); if (lcm_sym55__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -2767,13 +2677,11 @@ class copy_fail_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym55__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -3325,7 +3233,6 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 39; N = context__.vals_i("N")[(1 - 1)]; current_statement__ = 39; - current_statement__ = 39; check_greater_or_equal(function__, "N", N, 0); current_statement__ = 40; context__.validate_dims("data initialization","n_age","int", @@ -3335,7 +3242,6 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 40; n_age = context__.vals_i("n_age")[(1 - 1)]; current_statement__ = 40; - current_statement__ = 40; check_greater_or_equal(function__, "n_age", n_age, 0); current_statement__ = 41; context__.validate_dims("data initialization","n_edu","int", @@ -3345,7 +3251,6 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 41; n_edu = context__.vals_i("n_edu")[(1 - 1)]; current_statement__ = 41; - current_statement__ = 41; check_greater_or_equal(function__, "n_edu", n_edu, 0); current_statement__ = 42; context__.validate_dims("data initialization","n_region","int", @@ -3355,7 +3260,6 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 42; n_region = context__.vals_i("n_region")[(1 - 1)]; current_statement__ = 42; - current_statement__ = 42; check_greater_or_equal(function__, "n_region", n_region, 0); current_statement__ = 43; context__.validate_dims("data initialization","n_state","int", @@ -3365,7 +3269,6 @@ class dce_fail_model final : public model_base_crtp { current_statement__ = 43; n_state = context__.vals_i("n_state")[(1 - 1)]; current_statement__ = 43; - current_statement__ = 43; check_greater_or_equal(function__, "n_state", n_state, 0); current_statement__ = 44; validate_non_negative_index("female", "N", N); @@ -3378,24 +3281,20 @@ class dce_fail_model final : public model_base_crtp { female = context__.vals_i("female"); lcm_sym68__ = logical_gte(N, 1); if (lcm_sym68__) { - current_statement__ = 45; current_statement__ = 45; check_greater_or_equal(function__, "female[sym1__]", rvalue(female, "female", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 45; current_statement__ = 45; check_greater_or_equal(function__, "female[sym1__]", female[(sym1__ - 1)], 0);} } current_statement__ = 45; if (lcm_sym68__) { - current_statement__ = 45; current_statement__ = 45; check_less_or_equal(function__, "female[sym1__]", rvalue(female, "female", index_uni(1)), 1); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 45; current_statement__ = 45; check_less_or_equal(function__, "female[sym1__]", female[(sym1__ - 1)], 1);} @@ -3411,24 +3310,20 @@ class dce_fail_model final : public model_base_crtp { black = context__.vals_i("black"); current_statement__ = 47; if (lcm_sym68__) { - current_statement__ = 47; current_statement__ = 47; check_greater_or_equal(function__, "black[sym1__]", rvalue(black, "black", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 47; current_statement__ = 47; check_greater_or_equal(function__, "black[sym1__]", black[(sym1__ - 1)], 0);} } current_statement__ = 47; if (lcm_sym68__) { - current_statement__ = 47; current_statement__ = 47; check_less_or_equal(function__, "black[sym1__]", rvalue(black, "black", index_uni(1)), 1); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 47; current_statement__ = 47; check_less_or_equal(function__, "black[sym1__]", black[(sym1__ - 1)], 1);} @@ -3444,24 +3339,20 @@ class dce_fail_model final : public model_base_crtp { age = context__.vals_i("age"); current_statement__ = 49; if (lcm_sym68__) { - current_statement__ = 49; current_statement__ = 49; check_greater_or_equal(function__, "age[sym1__]", rvalue(age, "age", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 49; current_statement__ = 49; check_greater_or_equal(function__, "age[sym1__]", age[(sym1__ - 1)], 0);} } current_statement__ = 49; if (lcm_sym68__) { - current_statement__ = 49; current_statement__ = 49; check_less_or_equal(function__, "age[sym1__]", rvalue(age, "age", index_uni(1)), n_age); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 49; current_statement__ = 49; check_less_or_equal(function__, "age[sym1__]", age[(sym1__ - 1)], n_age);} @@ -3477,24 +3368,20 @@ class dce_fail_model final : public model_base_crtp { edu = context__.vals_i("edu"); current_statement__ = 51; if (lcm_sym68__) { - current_statement__ = 51; current_statement__ = 51; check_greater_or_equal(function__, "edu[sym1__]", rvalue(edu, "edu", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 51; current_statement__ = 51; check_greater_or_equal(function__, "edu[sym1__]", edu[(sym1__ - 1)], 0);} } current_statement__ = 51; if (lcm_sym68__) { - current_statement__ = 51; current_statement__ = 51; check_less_or_equal(function__, "edu[sym1__]", rvalue(edu, "edu", index_uni(1)), n_edu); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 51; current_statement__ = 51; check_less_or_equal(function__, "edu[sym1__]", edu[(sym1__ - 1)], n_edu);} @@ -3510,24 +3397,20 @@ class dce_fail_model final : public model_base_crtp { region = context__.vals_i("region"); lcm_sym69__ = logical_gte(n_state, 1); if (lcm_sym69__) { - current_statement__ = 53; current_statement__ = 53; check_greater_or_equal(function__, "region[sym1__]", rvalue(region, "region", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= n_state; ++sym1__) { - current_statement__ = 53; current_statement__ = 53; check_greater_or_equal(function__, "region[sym1__]", region[(sym1__ - 1)], 0);} } current_statement__ = 53; if (lcm_sym69__) { - current_statement__ = 53; current_statement__ = 53; check_less_or_equal(function__, "region[sym1__]", rvalue(region, "region", index_uni(1)), n_state); for (int sym1__ = 2; sym1__ <= n_state; ++sym1__) { - current_statement__ = 53; current_statement__ = 53; check_less_or_equal(function__, "region[sym1__]", region[(sym1__ - 1)], n_state);} @@ -3543,24 +3426,20 @@ class dce_fail_model final : public model_base_crtp { state = context__.vals_i("state"); current_statement__ = 55; if (lcm_sym68__) { - current_statement__ = 55; current_statement__ = 55; check_greater_or_equal(function__, "state[sym1__]", rvalue(state, "state", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 55; current_statement__ = 55; check_greater_or_equal(function__, "state[sym1__]", state[(sym1__ - 1)], 0);} } current_statement__ = 55; if (lcm_sym68__) { - current_statement__ = 55; current_statement__ = 55; check_less_or_equal(function__, "state[sym1__]", rvalue(state, "state", index_uni(1)), n_state); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 55; current_statement__ = 55; check_less_or_equal(function__, "state[sym1__]", state[(sym1__ - 1)], n_state);} @@ -3576,24 +3455,20 @@ class dce_fail_model final : public model_base_crtp { y = context__.vals_i("y"); current_statement__ = 57; if (lcm_sym68__) { - current_statement__ = 57; current_statement__ = 57; check_greater_or_equal(function__, "y[sym1__]", rvalue(y, "y", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 57; current_statement__ = 57; check_greater_or_equal(function__, "y[sym1__]", y[(sym1__ - 1)], 0); } } current_statement__ = 57; if (lcm_sym68__) { - current_statement__ = 57; current_statement__ = 57; check_less_or_equal(function__, "y[sym1__]", rvalue(y, "y", index_uni(1)), 1); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 57; current_statement__ = 57; check_less_or_equal(function__, "y[sym1__]", y[(sym1__ - 1)], 1);} } @@ -5519,7 +5394,6 @@ class expr_prop_fail_model final : public model_base_crtp current_statement__ = 9; N = context__.vals_i("N")[(1 - 1)]; current_statement__ = 9; - current_statement__ = 9; check_greater_or_equal(function__, "N", N, 0); current_statement__ = 10; validate_non_negative_index("y", "N", N); @@ -6083,7 +5957,6 @@ class expr_prop_fail2_model final : public model_base_crtp { current_statement__ = 31; nind = context__.vals_i("nind")[(1 - 1)]; current_statement__ = 31; - current_statement__ = 31; check_greater_or_equal(function__, "nind", nind, 0); current_statement__ = 32; context__.validate_dims("data initialization","n_occasions","int", @@ -17439,7 +17067,6 @@ class fails_test_model final : public model_base_crtp { current_statement__ = 32; n_occasions = context__.vals_i("n_occasions")[(1 - 1)]; current_statement__ = 32; - current_statement__ = 32; check_greater_or_equal(function__, "n_occasions", n_occasions, 2); current_statement__ = 33; validate_non_negative_index("y", "nind", nind); @@ -17498,13 +17125,11 @@ class fails_test_model final : public model_base_crtp { if (lcm_sym157__) { current_statement__ = 35; if (lcm_sym156__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", @@ -17513,13 +17138,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 35; if (lcm_sym156__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], 0);} @@ -17529,12 +17152,10 @@ class fails_test_model final : public model_base_crtp { if (lcm_sym157__) { current_statement__ = 35; if (lcm_sym156__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", @@ -17543,13 +17164,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 35; if (lcm_sym156__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], 1);} @@ -17563,7 +17182,6 @@ class fails_test_model final : public model_base_crtp { current_statement__ = 36; max_age = context__.vals_i("max_age")[(1 - 1)]; current_statement__ = 36; - current_statement__ = 36; check_greater_or_equal(function__, "max_age", max_age, 1); current_statement__ = 37; validate_non_negative_index("x", "nind", nind); @@ -17618,13 +17236,11 @@ class fails_test_model final : public model_base_crtp { if (lcm_sym157__) { current_statement__ = 38; if (lcm_sym158__) { - current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { - current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", @@ -17633,13 +17249,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 38; if (lcm_sym158__) { - current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { - current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "x[sym1__, sym2__]", x[(sym1__ - 1)][(sym2__ - 1)], 0);} @@ -17649,13 +17263,11 @@ class fails_test_model final : public model_base_crtp { if (lcm_sym157__) { current_statement__ = 38; if (lcm_sym158__) { - current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", index_uni(1), index_uni(1)), max_age); for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { - current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", @@ -17665,13 +17277,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 38; if (lcm_sym158__) { - current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", rvalue(x, "x", index_uni(sym1__), index_uni(1)), max_age); for (int sym2__ = 2; sym2__ <= lcm_sym159__; ++sym2__) { - current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "x[sym1__, sym2__]", x[(sym1__ - 1)][(sym2__ - 1)], max_age);} @@ -17805,48 +17415,40 @@ class fails_test_model final : public model_base_crtp { } current_statement__ = 41; if (lcm_sym157__) { - current_statement__ = 41; current_statement__ = 41; check_greater_or_equal(function__, "first[sym1__]", rvalue(first, "first", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 41; current_statement__ = 41; check_greater_or_equal(function__, "first[sym1__]", first[(sym1__ - 1)], 0);} } current_statement__ = 41; if (lcm_sym157__) { - current_statement__ = 41; current_statement__ = 41; check_less_or_equal(function__, "first[sym1__]", rvalue(first, "first", index_uni(1)), n_occasions); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 41; current_statement__ = 41; check_less_or_equal(function__, "first[sym1__]", first[(sym1__ - 1)], n_occasions);} } current_statement__ = 43; if (lcm_sym157__) { - current_statement__ = 43; current_statement__ = 43; check_greater_or_equal(function__, "last[sym1__]", rvalue(last, "last", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 43; current_statement__ = 43; check_greater_or_equal(function__, "last[sym1__]", last[(sym1__ - 1)], 0);} } current_statement__ = 43; if (lcm_sym157__) { - current_statement__ = 43; current_statement__ = 43; check_less_or_equal(function__, "last[sym1__]", rvalue(last, "last", index_uni(1)), n_occasions); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 43; current_statement__ = 43; check_less_or_equal(function__, "last[sym1__]", last[(sym1__ - 1)], n_occasions);} @@ -18142,13 +17744,11 @@ class fails_test_model final : public model_base_crtp { lcm_sym115__ = (n_occasions - 1); lcm_sym105__ = logical_gte(lcm_sym115__, 1); if (lcm_sym105__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -18157,13 +17757,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym105__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -18176,13 +17774,11 @@ class fails_test_model final : public model_base_crtp { lcm_sym115__ = (n_occasions - 1); lcm_sym105__ = logical_gte(lcm_sym115__, 1); if (lcm_sym105__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -18191,13 +17787,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym105__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -18210,13 +17804,11 @@ class fails_test_model final : public model_base_crtp { lcm_sym115__ = (n_occasions - 1); lcm_sym105__ = logical_gte(lcm_sym115__, 1); if (lcm_sym105__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -18225,13 +17817,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym105__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -18244,12 +17834,10 @@ class fails_test_model final : public model_base_crtp { lcm_sym115__ = (n_occasions - 1); lcm_sym105__ = logical_gte(lcm_sym115__, 1); if (lcm_sym105__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -18258,13 +17846,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym105__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym115__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -18276,13 +17862,11 @@ class fails_test_model final : public model_base_crtp { if (lcm_sym104__) { lcm_sym103__ = logical_gte(n_occasions, 1); if (lcm_sym103__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -18291,13 +17875,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym103__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -18309,13 +17891,11 @@ class fails_test_model final : public model_base_crtp { if (lcm_sym104__) { lcm_sym103__ = logical_gte(n_occasions, 1); if (lcm_sym103__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -18324,13 +17904,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym103__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -18688,13 +18266,11 @@ class fails_test_model final : public model_base_crtp { lcm_sym63__ = (n_occasions - 1); lcm_sym57__ = logical_gte(lcm_sym63__, 1); if (lcm_sym57__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -18703,13 +18279,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym57__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -18722,13 +18296,11 @@ class fails_test_model final : public model_base_crtp { lcm_sym63__ = (n_occasions - 1); lcm_sym57__ = logical_gte(lcm_sym63__, 1); if (lcm_sym57__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -18737,13 +18309,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym57__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -18756,13 +18326,11 @@ class fails_test_model final : public model_base_crtp { lcm_sym63__ = (n_occasions - 1); lcm_sym57__ = logical_gte(lcm_sym63__, 1); if (lcm_sym57__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -18771,13 +18339,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym57__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -18790,12 +18356,10 @@ class fails_test_model final : public model_base_crtp { lcm_sym63__ = (n_occasions - 1); lcm_sym57__ = logical_gte(lcm_sym63__, 1); if (lcm_sym57__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -18804,13 +18368,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym57__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym63__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -18822,13 +18384,11 @@ class fails_test_model final : public model_base_crtp { if (lcm_sym56__) { lcm_sym55__ = logical_gte(n_occasions, 1); if (lcm_sym55__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -18837,13 +18397,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym55__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -18855,13 +18413,11 @@ class fails_test_model final : public model_base_crtp { if (lcm_sym56__) { lcm_sym55__ = logical_gte(n_occasions, 1); if (lcm_sym55__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -18870,13 +18426,11 @@ class fails_test_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym55__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -20304,7 +19858,6 @@ class inlining_fail2_model final : public model_base_crtp current_statement__ = 103; M = context__.vals_i("M")[(1 - 1)]; current_statement__ = 103; - current_statement__ = 103; check_greater_or_equal(function__, "M", M, 0); current_statement__ = 104; context__.validate_dims("data initialization","n_occasions","int", @@ -20314,7 +19867,6 @@ class inlining_fail2_model final : public model_base_crtp current_statement__ = 104; n_occasions = context__.vals_i("n_occasions")[(1 - 1)]; current_statement__ = 104; - current_statement__ = 104; check_greater_or_equal(function__, "n_occasions", n_occasions, 0); current_statement__ = 105; validate_non_negative_index("y", "M", M); @@ -20373,13 +19925,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym316__) { current_statement__ = 107; if (lcm_sym317__) { - current_statement__ = 107; current_statement__ = 107; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 107; current_statement__ = 107; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", @@ -20388,13 +19938,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 107; if (lcm_sym317__) { - current_statement__ = 107; current_statement__ = 107; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 107; current_statement__ = 107; check_greater_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], 0);} @@ -20404,12 +19952,10 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym316__) { current_statement__ = 107; if (lcm_sym317__) { - current_statement__ = 107; current_statement__ = 107; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 107; current_statement__ = 107; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", @@ -20418,13 +19964,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 107; if (lcm_sym317__) { - current_statement__ = 107; current_statement__ = 107; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 107; current_statement__ = 107; check_less_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], 1);} @@ -20553,48 +20097,40 @@ class inlining_fail2_model final : public model_base_crtp } current_statement__ = 109; if (lcm_sym316__) { - current_statement__ = 109; current_statement__ = 109; check_greater_or_equal(function__, "first[sym1__]", rvalue(first, "first", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= M; ++sym1__) { - current_statement__ = 109; current_statement__ = 109; check_greater_or_equal(function__, "first[sym1__]", first[(sym1__ - 1)], 0);} } current_statement__ = 109; if (lcm_sym316__) { - current_statement__ = 109; current_statement__ = 109; check_less_or_equal(function__, "first[sym1__]", rvalue(first, "first", index_uni(1)), n_occasions); for (int sym1__ = 2; sym1__ <= M; ++sym1__) { - current_statement__ = 109; current_statement__ = 109; check_less_or_equal(function__, "first[sym1__]", first[(sym1__ - 1)], n_occasions);} } current_statement__ = 111; if (lcm_sym316__) { - current_statement__ = 111; current_statement__ = 111; check_greater_or_equal(function__, "last[sym1__]", rvalue(last, "last", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= M; ++sym1__) { - current_statement__ = 111; current_statement__ = 111; check_greater_or_equal(function__, "last[sym1__]", last[(sym1__ - 1)], 0);} } current_statement__ = 111; if (lcm_sym316__) { - current_statement__ = 111; current_statement__ = 111; check_less_or_equal(function__, "last[sym1__]", rvalue(last, "last", index_uni(1)), n_occasions); for (int sym1__ = 2; sym1__ <= M; ++sym1__) { - current_statement__ = 111; current_statement__ = 111; check_less_or_equal(function__, "last[sym1__]", last[(sym1__ - 1)], n_occasions);} @@ -20925,13 +20461,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym238__) { current_statement__ = 6; if (lcm_sym240__) { - current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym297__; ++sym2__) { - current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -20940,13 +20474,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 6; if (lcm_sym240__) { - current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym297__; ++sym2__) { - current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -20958,13 +20490,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym238__) { current_statement__ = 6; if (lcm_sym240__) { - current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym297__; ++sym2__) { - current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -20973,13 +20503,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 6; if (lcm_sym240__) { - current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym297__; ++sym2__) { - current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -20991,13 +20519,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym238__) { lcm_sym239__ = logical_gte(n_occasions, 1); if (lcm_sym239__) { - current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym295__, "lcm_sym295__", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym295__, "lcm_sym295__", @@ -21006,13 +20532,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 7; if (lcm_sym239__) { - current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym295__, "lcm_sym295__", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym295__, "lcm_sym295__", @@ -21024,13 +20548,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym238__) { lcm_sym239__ = logical_gte(n_occasions, 1); if (lcm_sym239__) { - current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym295__, "lcm_sym295__", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym295__, "lcm_sym295__", @@ -21039,13 +20561,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 7; if (lcm_sym239__) { - current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym295__, "lcm_sym295__", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym295__, "lcm_sym295__", @@ -21057,13 +20577,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym238__) { lcm_sym239__ = logical_gte(n_occasions, 1); if (lcm_sym239__) { - current_statement__ = 8; current_statement__ = 8; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym22__, "inline_sym22__", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 8; current_statement__ = 8; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym22__, "inline_sym22__", @@ -21072,13 +20590,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 8; if (lcm_sym239__) { - current_statement__ = 8; current_statement__ = 8; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym22__, "inline_sym22__", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 8; current_statement__ = 8; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym22__, "inline_sym22__", @@ -21090,13 +20606,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym238__) { lcm_sym239__ = logical_gte(n_occasions, 1); if (lcm_sym239__) { - current_statement__ = 8; current_statement__ = 8; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym22__, "inline_sym22__", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 8; current_statement__ = 8; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym22__, "inline_sym22__", @@ -21105,13 +20619,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 8; if (lcm_sym239__) { - current_statement__ = 8; current_statement__ = 8; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym22__, "inline_sym22__", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 8; current_statement__ = 8; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym22__, "inline_sym22__", @@ -21872,13 +21384,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym144__) { current_statement__ = 6; if (lcm_sym147__) { - current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym198__; ++sym2__) { - current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -21887,13 +21397,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 6; if (lcm_sym147__) { - current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym198__; ++sym2__) { - current_statement__ = 6; current_statement__ = 6; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -21905,13 +21413,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym144__) { current_statement__ = 6; if (lcm_sym147__) { - current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym198__; ++sym2__) { - current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -21920,13 +21426,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 6; if (lcm_sym147__) { - current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym198__; ++sym2__) { - current_statement__ = 6; current_statement__ = 6; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -21938,13 +21442,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym144__) { current_statement__ = 7; if (lcm_sym145__) { - current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym184__, "lcm_sym184__", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym184__, "lcm_sym184__", @@ -21953,13 +21455,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 7; if (lcm_sym145__) { - current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym184__, "lcm_sym184__", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 7; current_statement__ = 7; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym184__, "lcm_sym184__", @@ -21971,13 +21471,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym144__) { current_statement__ = 7; if (lcm_sym145__) { - current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym184__, "lcm_sym184__", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym184__, "lcm_sym184__", @@ -21986,13 +21484,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 7; if (lcm_sym145__) { - current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym184__, "lcm_sym184__", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 7; current_statement__ = 7; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(lcm_sym184__, "lcm_sym184__", @@ -22004,13 +21500,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym144__) { current_statement__ = 8; if (lcm_sym145__) { - current_statement__ = 8; current_statement__ = 8; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 8; current_statement__ = 8; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -22019,13 +21513,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 8; if (lcm_sym145__) { - current_statement__ = 8; current_statement__ = 8; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 8; current_statement__ = 8; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -22037,13 +21529,11 @@ class inlining_fail2_model final : public model_base_crtp if (lcm_sym144__) { current_statement__ = 8; if (lcm_sym145__) { - current_statement__ = 8; current_statement__ = 8; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 8; current_statement__ = 8; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -22052,13 +21542,11 @@ class inlining_fail2_model final : public model_base_crtp for (int sym1__ = 2; sym1__ <= M; ++sym1__) { current_statement__ = 8; if (lcm_sym145__) { - current_statement__ = 8; current_statement__ = 8; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 8; current_statement__ = 8; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -23655,7 +23143,6 @@ class lcm_fails_model final : public model_base_crtp { current_statement__ = 3; J = context__.vals_i("J")[(1 - 1)]; current_statement__ = 3; - current_statement__ = 3; check_greater_or_equal(function__, "J", J, 0); current_statement__ = 4; validate_non_negative_index("y", "J", J); @@ -24391,7 +23878,6 @@ class lcm_fails2_model final : public model_base_crtp { current_statement__ = 31; nind = context__.vals_i("nind")[(1 - 1)]; current_statement__ = 31; - current_statement__ = 31; check_greater_or_equal(function__, "nind", nind, 0); current_statement__ = 32; context__.validate_dims("data initialization","n_occasions","int", @@ -24401,7 +23887,6 @@ class lcm_fails2_model final : public model_base_crtp { current_statement__ = 32; n_occasions = context__.vals_i("n_occasions")[(1 - 1)]; current_statement__ = 32; - current_statement__ = 32; check_greater_or_equal(function__, "n_occasions", n_occasions, 2); current_statement__ = 33; validate_non_negative_index("y", "nind", nind); @@ -24460,13 +23945,11 @@ class lcm_fails2_model final : public model_base_crtp { if (lcm_sym138__) { current_statement__ = 35; if (lcm_sym137__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", @@ -24475,13 +23958,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 35; if (lcm_sym137__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], 0);} @@ -24491,12 +23972,10 @@ class lcm_fails2_model final : public model_base_crtp { if (lcm_sym138__) { current_statement__ = 35; if (lcm_sym137__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", @@ -24505,13 +23984,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 35; if (lcm_sym137__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], 1);} @@ -24645,48 +24122,40 @@ class lcm_fails2_model final : public model_base_crtp { } current_statement__ = 38; if (lcm_sym138__) { - current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "first[sym1__]", rvalue(first, "first", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 38; current_statement__ = 38; check_greater_or_equal(function__, "first[sym1__]", first[(sym1__ - 1)], 0);} } current_statement__ = 38; if (lcm_sym138__) { - current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "first[sym1__]", rvalue(first, "first", index_uni(1)), n_occasions); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 38; current_statement__ = 38; check_less_or_equal(function__, "first[sym1__]", first[(sym1__ - 1)], n_occasions);} } current_statement__ = 40; if (lcm_sym138__) { - current_statement__ = 40; current_statement__ = 40; check_greater_or_equal(function__, "last[sym1__]", rvalue(last, "last", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 40; current_statement__ = 40; check_greater_or_equal(function__, "last[sym1__]", last[(sym1__ - 1)], 0);} } current_statement__ = 40; if (lcm_sym138__) { - current_statement__ = 40; current_statement__ = 40; check_less_or_equal(function__, "last[sym1__]", rvalue(last, "last", index_uni(1)), n_occasions); for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { - current_statement__ = 40; current_statement__ = 40; check_less_or_equal(function__, "last[sym1__]", last[(sym1__ - 1)], n_occasions);} @@ -24966,13 +24435,11 @@ class lcm_fails2_model final : public model_base_crtp { lcm_sym100__ = (n_occasions - 1); lcm_sym90__ = logical_gte(lcm_sym100__, 1); if (lcm_sym90__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym100__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -24981,13 +24448,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym90__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym100__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -25000,13 +24465,11 @@ class lcm_fails2_model final : public model_base_crtp { lcm_sym100__ = (n_occasions - 1); lcm_sym90__ = logical_gte(lcm_sym100__, 1); if (lcm_sym90__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym100__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -25015,13 +24478,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym90__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym100__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -25034,13 +24495,11 @@ class lcm_fails2_model final : public model_base_crtp { lcm_sym100__ = (n_occasions - 1); lcm_sym90__ = logical_gte(lcm_sym100__, 1); if (lcm_sym90__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym100__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -25049,13 +24508,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym90__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym100__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -25068,12 +24525,10 @@ class lcm_fails2_model final : public model_base_crtp { lcm_sym100__ = (n_occasions - 1); lcm_sym90__ = logical_gte(lcm_sym100__, 1); if (lcm_sym90__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym100__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -25082,13 +24537,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym90__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym100__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -25100,13 +24553,11 @@ class lcm_fails2_model final : public model_base_crtp { if (lcm_sym89__) { lcm_sym88__ = logical_gte(n_occasions, 1); if (lcm_sym88__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -25115,13 +24566,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym88__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -25133,13 +24582,11 @@ class lcm_fails2_model final : public model_base_crtp { if (lcm_sym89__) { lcm_sym88__ = logical_gte(n_occasions, 1); if (lcm_sym88__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -25148,13 +24595,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym88__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym9__, "inline_sym9__", @@ -25491,13 +24936,11 @@ class lcm_fails2_model final : public model_base_crtp { lcm_sym54__ = (n_occasions - 1); lcm_sym48__ = logical_gte(lcm_sym54__, 1); if (lcm_sym48__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym54__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -25506,13 +24949,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym48__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym54__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_greater_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -25525,13 +24966,11 @@ class lcm_fails2_model final : public model_base_crtp { lcm_sym54__ = (n_occasions - 1); lcm_sym48__ = logical_gte(lcm_sym54__, 1); if (lcm_sym48__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym54__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -25540,13 +24979,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 3; if (lcm_sym48__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym54__; ++sym2__) { - current_statement__ = 3; current_statement__ = 3; check_less_or_equal(function__, "phi[sym1__, sym2__]", rvalue(phi, "phi", @@ -25559,13 +24996,11 @@ class lcm_fails2_model final : public model_base_crtp { lcm_sym54__ = (n_occasions - 1); lcm_sym48__ = logical_gte(lcm_sym54__, 1); if (lcm_sym48__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym54__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -25574,13 +25009,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym48__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= lcm_sym54__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_greater_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -25593,12 +25026,10 @@ class lcm_fails2_model final : public model_base_crtp { lcm_sym54__ = (n_occasions - 1); lcm_sym48__ = logical_gte(lcm_sym54__, 1); if (lcm_sym48__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym54__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -25607,13 +25038,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 4; if (lcm_sym48__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= lcm_sym54__; ++sym2__) { - current_statement__ = 4; current_statement__ = 4; check_less_or_equal(function__, "p[sym1__, sym2__]", rvalue(p, "p", @@ -25625,13 +25054,11 @@ class lcm_fails2_model final : public model_base_crtp { if (lcm_sym47__) { lcm_sym46__ = logical_gte(n_occasions, 1); if (lcm_sym46__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -25640,13 +25067,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym46__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_greater_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -25658,13 +25083,11 @@ class lcm_fails2_model final : public model_base_crtp { if (lcm_sym47__) { lcm_sym46__ = logical_gte(n_occasions, 1); if (lcm_sym46__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -25673,13 +25096,11 @@ class lcm_fails2_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= nind; ++sym1__) { current_statement__ = 5; if (lcm_sym46__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= n_occasions; ++sym2__) { - current_statement__ = 5; current_statement__ = 5; check_less_or_equal(function__, "chi[sym1__, sym2__]", rvalue(inline_sym1__, "inline_sym1__", @@ -26697,7 +26118,6 @@ class off_dce_model final : public model_base_crtp { current_statement__ = 31; R = context__.vals_i("R")[(1 - 1)]; current_statement__ = 31; - current_statement__ = 31; check_greater_or_equal(function__, "R", R, 1); current_statement__ = 32; context__.validate_dims("data initialization","T","int", @@ -26707,7 +26127,6 @@ class off_dce_model final : public model_base_crtp { current_statement__ = 32; T = context__.vals_i("T")[(1 - 1)]; current_statement__ = 32; - current_statement__ = 32; check_greater_or_equal(function__, "T", T, 1); current_statement__ = 33; validate_non_negative_index("y", "R", R); @@ -26766,13 +26185,11 @@ class off_dce_model final : public model_base_crtp { if (lcm_sym41__) { current_statement__ = 35; if (lcm_sym42__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(1), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= T; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", @@ -26781,13 +26198,11 @@ class off_dce_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= R; ++sym1__) { current_statement__ = 35; if (lcm_sym42__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(sym1__), index_uni(1)), 0); for (int sym2__ = 2; sym2__ <= T; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_greater_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], 0);} @@ -26797,12 +26212,10 @@ class off_dce_model final : public model_base_crtp { if (lcm_sym41__) { current_statement__ = 35; if (lcm_sym42__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(1), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= T; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", @@ -26811,13 +26224,11 @@ class off_dce_model final : public model_base_crtp { for (int sym1__ = 2; sym1__ <= R; ++sym1__) { current_statement__ = 35; if (lcm_sym42__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", rvalue(y, "y", index_uni(sym1__), index_uni(1)), 1); for (int sym2__ = 2; sym2__ <= T; ++sym2__) { - current_statement__ = 35; current_statement__ = 35; check_less_or_equal(function__, "y[sym1__, sym2__]", y[(sym1__ - 1)][(sym2__ - 1)], 1);} @@ -26884,33 +26295,27 @@ class off_dce_model final : public model_base_crtp { } current_statement__ = 39; if (lcm_sym41__) { - current_statement__ = 39; current_statement__ = 39; check_greater_or_equal(function__, "sum_y[sym1__]", rvalue(sum_y, "sum_y", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= R; ++sym1__) { - current_statement__ = 39; current_statement__ = 39; check_greater_or_equal(function__, "sum_y[sym1__]", sum_y[(sym1__ - 1)], 0);} } current_statement__ = 39; if (lcm_sym41__) { - current_statement__ = 39; current_statement__ = 39; check_less_or_equal(function__, "sum_y[sym1__]", rvalue(sum_y, "sum_y", index_uni(1)), T); for (int sym1__ = 2; sym1__ <= R; ++sym1__) { - current_statement__ = 39; current_statement__ = 39; check_less_or_equal(function__, "sum_y[sym1__]", sum_y[(sym1__ - 1)], T);} } current_statement__ = 40; - current_statement__ = 40; check_greater_or_equal(function__, "occ_obs", occ_obs, 0); current_statement__ = 40; - current_statement__ = 40; check_less_or_equal(function__, "occ_obs", occ_obs, R); current_statement__ = 47; validate_non_negative_index("logit_psi", "R", R); @@ -27679,7 +27084,6 @@ class off_small_model final : public model_base_crtp { current_statement__ = 20; J = context__.vals_i("J")[(1 - 1)]; current_statement__ = 20; - current_statement__ = 20; check_greater_or_equal(function__, "J", J, 0); current_statement__ = 21; context__.validate_dims("data initialization","N","int", @@ -27689,7 +27093,6 @@ class off_small_model final : public model_base_crtp { current_statement__ = 21; N = context__.vals_i("N")[(1 - 1)]; current_statement__ = 21; - current_statement__ = 21; check_greater_or_equal(function__, "N", N, 0); current_statement__ = 22; validate_non_negative_index("person", "N", N); @@ -27702,24 +27105,20 @@ class off_small_model final : public model_base_crtp { person = context__.vals_i("person"); lcm_sym40__ = logical_gte(N, 1); if (lcm_sym40__) { - current_statement__ = 23; current_statement__ = 23; check_greater_or_equal(function__, "person[sym1__]", rvalue(person, "person", index_uni(1)), 1); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 23; current_statement__ = 23; check_greater_or_equal(function__, "person[sym1__]", person[(sym1__ - 1)], 1);} } current_statement__ = 23; if (lcm_sym40__) { - current_statement__ = 23; current_statement__ = 23; check_less_or_equal(function__, "person[sym1__]", rvalue(person, "person", index_uni(1)), J); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 23; current_statement__ = 23; check_less_or_equal(function__, "person[sym1__]", person[(sym1__ - 1)], J);} @@ -30049,7 +29448,6 @@ class partial_eval_model final : public model_base_crtp { current_statement__ = 13; N = context__.vals_i("N")[(1 - 1)]; current_statement__ = 13; - current_statement__ = 13; check_greater_or_equal(function__, "N", N, 0); current_statement__ = 14; context__.validate_dims("data initialization","n_pair","int", @@ -30059,7 +29457,6 @@ class partial_eval_model final : public model_base_crtp { current_statement__ = 14; n_pair = context__.vals_i("n_pair")[(1 - 1)]; current_statement__ = 14; - current_statement__ = 14; check_greater_or_equal(function__, "n_pair", n_pair, 0); current_statement__ = 15; validate_non_negative_index("pair", "N", N); @@ -30072,24 +29469,20 @@ class partial_eval_model final : public model_base_crtp { pair = context__.vals_i("pair"); lcm_sym30__ = logical_gte(N, 1); if (lcm_sym30__) { - current_statement__ = 16; current_statement__ = 16; check_greater_or_equal(function__, "pair[sym1__]", rvalue(pair, "pair", index_uni(1)), 1); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 16; current_statement__ = 16; check_greater_or_equal(function__, "pair[sym1__]", pair[(sym1__ - 1)], 1);} } current_statement__ = 16; if (lcm_sym30__) { - current_statement__ = 16; current_statement__ = 16; check_less_or_equal(function__, "pair[sym1__]", rvalue(pair, "pair", index_uni(1)), n_pair); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 16; current_statement__ = 16; check_less_or_equal(function__, "pair[sym1__]", pair[(sym1__ - 1)], n_pair);} @@ -30156,25 +29549,21 @@ class partial_eval_model final : public model_base_crtp { } current_statement__ = 20; if (lcm_sym30__) { - current_statement__ = 20; current_statement__ = 20; check_greater_or_equal(function__, "treatment[sym1__]", rvalue(treatment, "treatment", index_uni(1)), 0); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 20; current_statement__ = 20; check_greater_or_equal(function__, "treatment[sym1__]", treatment[(sym1__ - 1)], 0);} } current_statement__ = 20; if (lcm_sym30__) { - current_statement__ = 20; current_statement__ = 20; check_less_or_equal(function__, "treatment[sym1__]", rvalue(treatment, "treatment", index_uni(1)), 1); for (int sym1__ = 2; sym1__ <= N; ++sym1__) { - current_statement__ = 20; current_statement__ = 20; check_less_or_equal(function__, "treatment[sym1__]", treatment[(sym1__ - 1)], 1);} @@ -30883,7 +30272,6 @@ class stalled1_failure_model final : public model_base_crtp) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Var y)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) (meta ))))) @@ -270,7 +270,7 @@ let%expect_test "list collapsing" = (((pattern (Return (((pattern - (FunApp StanLib Pow__ + (FunApp (StanLib Pow__) (((pattern (Var z)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 2)) @@ -304,16 +304,16 @@ let%expect_test "list collapsing" = ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -324,7 +324,7 @@ let%expect_test "list collapsing" = ((type_ URowVector) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -371,7 +371,7 @@ let%expect_test "list collapsing" = ((pattern (Assignment (inline_sym3__ UReal ()) ((pattern - (FunApp StanLib Pow__ + (FunApp (StanLib Pow__) (((pattern (Lit Int 53)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -384,7 +384,7 @@ let%expect_test "list collapsing" = (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Var inline_sym3__)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ))))) @@ -400,7 +400,7 @@ let%expect_test "list collapsing" = ((pattern (IfElse ((pattern - (FunApp StanLib PNot__ + (FunApp (StanLib PNot__) (((pattern (EOr ((pattern (Var emit_transformed_parameters__)) @@ -414,7 +414,7 @@ let%expect_test "list collapsing" = ((pattern (IfElse ((pattern - (FunApp StanLib PNot__ + (FunApp (StanLib PNot__) (((pattern (Var emit_generated_quantities__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2336,7 +2336,7 @@ model { data vector[3] y_vector; data matrix[2, 2] x_cov; data vector[3] x_cov_free__; - x_cov_free__ = FnUnconstrain__(x_cov, "cov_matrix"); + x_cov_free__ = (FnUnconstrain cov_matrix)__(x_cov); data real theta_u; data real phi_u; } @@ -3050,7 +3050,7 @@ let%expect_test "block fixing" = (((pattern (IfElse ((pattern - (FunApp StanLib PNot__ + (FunApp (StanLib PNot__) (((pattern (EOr ((pattern (Var emit_transformed_parameters__)) @@ -3064,7 +3064,7 @@ let%expect_test "block fixing" = ((pattern (IfElse ((pattern - (FunApp StanLib PNot__ + (FunApp (StanLib PNot__) (((pattern (Var emit_generated_quantities__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -3249,7 +3249,7 @@ let%expect_test "adlevel_optimization expressions" = ((pattern (IfElse ((pattern - (FunApp StanLib Greater__ + (FunApp (StanLib Greater__) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 2)) @@ -3258,7 +3258,7 @@ let%expect_test "adlevel_optimization expressions" = ((pattern (Assignment (y UReal ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var y)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var x)) @@ -3268,7 +3268,7 @@ let%expect_test "adlevel_optimization expressions" = (((pattern (Assignment (y UReal ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var y)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var w)) @@ -3279,7 +3279,7 @@ let%expect_test "adlevel_optimization expressions" = ((pattern (IfElse ((pattern - (FunApp StanLib Greater__ + (FunApp (StanLib Greater__) (((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -3295,7 +3295,7 @@ let%expect_test "adlevel_optimization expressions" = ((pattern (IfElse ((pattern - (FunApp StanLib Greater__ + (FunApp (StanLib Greater__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -3309,12 +3309,12 @@ let%expect_test "adlevel_optimization expressions" = ())) (meta )) ((pattern - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Var z)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Var z_data)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ))))) From 87ba3f1132392c2f190100665dea25e08cf90106 Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Mon, 29 Mar 2021 22:16:13 -0400 Subject: [PATCH 26/31] Improved FnReadParam hack --- src/analysis_and_optimization/Optimize.ml | 2 +- src/middle/Internal_fun.ml | 2 +- src/stan_math_backend/Expression_gen.ml | 31 +++++--------- src/stan_math_backend/Statement_gen.ml | 6 +-- src/stan_math_backend/Transform_Mir.ml | 17 +++----- test/unit/Factor_graph.ml | 50 +++++++++++------------ 6 files changed, 46 insertions(+), 62 deletions(-) diff --git a/src/analysis_and_optimization/Optimize.ml b/src/analysis_and_optimization/Optimize.ml index 9582524aa9..883b0e06c1 100644 --- a/src/analysis_and_optimization/Optimize.ml +++ b/src/analysis_and_optimization/Optimize.ml @@ -689,7 +689,7 @@ let can_side_effect_top_expr (e : Expr.Typed.t) = | FunApp ((UserDefined f | StanLib f), _) -> String.suffix f 3 = "_lp" | FunApp ( CompilerInternal - ( FnReadParam | FnReadData | FnWriteParam | FnConstrain _ + ( FnReadParam _ | FnReadData | FnWriteParam | FnConstrain _ | FnValidateSize | FnValidateSizeSimplex | FnValidateSizeUnitVector | FnUnconstrain _ ) , _ ) -> diff --git a/src/middle/Internal_fun.ml b/src/middle/Internal_fun.ml index fd0460e1db..5a4b3f7e36 100644 --- a/src/middle/Internal_fun.ml +++ b/src/middle/Internal_fun.ml @@ -8,7 +8,7 @@ type t = (* In AST_to_MIR being used as StanLib *) | FnReadData (* XXX move these to a backend specific file?*) - | FnReadParam + | FnReadParam of string | FnWriteParam | FnValidateSize | FnValidateSizeSimplex diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index 1bb5c432d9..431fa223a0 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -420,26 +420,15 @@ and pp_compiler_internal_fn ad ut f ppf es = | FnConstrain flavor -> pp_constrain_funapp "constrain" flavor ppf es | FnUnconstrain flavor -> pp_constrain_funapp "free" flavor ppf es | FnReadData -> read_data ut ppf es - | FnReadParam -> ( - match es with - | {Expr.Fixed.pattern= Lit (Str, constraint_string); meta= emeta} - :: {Expr.Fixed.pattern= Lit (Int, n_constraint_args_str); _} :: args -> - let n_constraint_args = int_of_string n_constraint_args_str in - let constraint_args, dims = List.split_n args n_constraint_args in - if String.is_empty constraint_string then - let arg_exprs = constraint_args @ dims in - pf ppf "@[in__.template read<%a>(@,%a)@]" pp_unsizedtype_local - (UnsizedType.AutoDiffable, ut) - (list ~sep:comma pp_expr) arg_exprs - else - let lp_expr = Expr.Fixed.{pattern= Var "lp__"; meta= emeta} in - let arg_exprs = constraint_args @ [lp_expr] @ dims in - pf ppf - "@[in__.template read_constrain_%s<%a, jacobian__>(@,%a)@]" - constraint_string pp_unsizedtype_local - (UnsizedType.AutoDiffable, ut) - (list ~sep:comma pp_expr) arg_exprs - | _ -> raise_s [%message "emit ReadParam with " (es : Expr.Typed.t list)] ) + | FnReadParam constraint_string -> + let constraint_suffix_opt, jacobian_param_opt = + if String.is_empty constraint_string then (None, None) + else (Some ("_constrain_" ^ constraint_string), Some ", jacobian__") + in + pf ppf "@[in__.template read%a<%a%a>(@,%a)@]" + (Fmt.option Fmt.string) constraint_suffix_opt pp_unsizedtype_local + (UnsizedType.AutoDiffable, ut) + (Fmt.option Fmt.string) jacobian_param_opt (list ~sep:comma pp_expr) es | FnDeepCopy -> gen_fun_app ppf "stan::model::deep_copy" es | _ -> gen_fun_app ppf (Internal_fun.to_string f) es @@ -513,7 +502,7 @@ and pp_expr ppf Expr.Fixed.({pattern; meta} as e) = | Indexed (e, []) -> pp_expr ppf e | Indexed (e, idx) -> ( match e.pattern with - | FunApp (CompilerInternal FnReadParam, _) -> pp_expr ppf e + | FunApp (CompilerInternal (FnReadParam _), _) -> pp_expr ppf e | FunApp (CompilerInternal FnReadData, _) -> pp_indexed_simple ppf (strf "%a" pp_expr e, idx) | _ diff --git a/src/stan_math_backend/Statement_gen.ml b/src/stan_math_backend/Statement_gen.ml index 5e592ac8f5..2a6dff89ec 100644 --- a/src/stan_math_backend/Statement_gen.ml +++ b/src/stan_math_backend/Statement_gen.ml @@ -109,8 +109,8 @@ let rec pp_statement (ppf : Format.formatter) Stmt.Fixed.({pattern; meta}) = match pattern with | Assignment ( (vident, _, []) - , ( {pattern= FunApp (CompilerInternal (FnReadData | FnReadParam), _); _} - as rhs ) ) -> + , ( { pattern= FunApp (CompilerInternal (FnReadData | FnReadParam _), _); _ + } as rhs ) ) -> pf ppf "@[%s = %a;@]" vident pp_expr rhs | Assignment ((vident, _, []), ({meta= Expr.Typed.Meta.({type_= UInt; _}); _} as rhs)) @@ -191,7 +191,7 @@ let rec pp_statement (ppf : Format.formatter) Stmt.Fixed.({pattern; meta}) = { body= { pattern= Assignment - (_, {pattern= FunApp (CompilerInternal FnReadParam, _); _}); _ + (_, {pattern= FunApp (CompilerInternal (FnReadParam _), _); _}); _ } as body; _ } -> pp_statement ppf body (* Skip For loop part, just emit body due to the way FnReadParam emits *) diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index 81a351c7b8..0e1ee10e3c 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -228,20 +228,15 @@ let param_read smeta constrain_get_dims st | _ -> SizedType.get_dims st in - (* this is an absolute hack - - I need to unpack the constraint arguments and the dimensions in codegen, but we pack them all together into a fake function FnReadParam as expressions - So, I'm packing in the number of constraint arguments to read as an int expression - To avoid this hack, keep internal functions as a variant type instead of a normal funapp - *) - let n_args_expression = Expr.Helpers.int (List.length transform_args) in let read = Expr.( Helpers.( - internal_funapp FnReadParam - ( Expr.Helpers.str (constraint_to_string out_trans Constrain) - :: n_args_expression - :: (transform_args @ read_constrain_dims out_trans cst) )) + internal_funapp + (FnReadParam (constraint_to_string out_trans Constrain)) + ( transform_args + @ ( if out_trans = Identity then [] + else [{decl_var with pattern= Var "lp__"}] ) + @ read_constrain_dims out_trans cst )) Typed.Meta.{decl_var.meta with type_= ut}) in [ Stmt.Fixed. diff --git a/test/unit/Factor_graph.ml b/test/unit/Factor_graph.ml index 469aaa8a46..d67a8a558b 100644 --- a/test/unit/Factor_graph.ml +++ b/test/unit/Factor_graph.ml @@ -104,7 +104,7 @@ let%expect_test "Factor graph complex example" = ((factor_map ((((TargetTerm ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var f)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var f)) @@ -114,7 +114,7 @@ let%expect_test "Factor graph complex example" = ((VVar f))) (((TargetTerm ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var z)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var e)) @@ -124,7 +124,7 @@ let%expect_test "Factor graph complex example" = ((VVar a) (VVar b) (VVar c) (VVar d) (VVar e))) (((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var a)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var b)) @@ -136,7 +136,7 @@ let%expect_test "Factor graph complex example" = ((VVar a) (VVar b))) (((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var b)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Lit Int 0)) @@ -148,7 +148,7 @@ let%expect_test "Factor graph complex example" = ((VVar b))) (((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var c)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var x)) @@ -160,7 +160,7 @@ let%expect_test "Factor graph complex example" = ((VVar a) (VVar c))) (((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var d)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var c)) @@ -174,7 +174,7 @@ let%expect_test "Factor graph complex example" = (((VVar a) (((TargetTerm ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var z)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var e)) @@ -183,7 +183,7 @@ let%expect_test "Factor graph complex example" = 21) ((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var a)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var b)) @@ -194,7 +194,7 @@ let%expect_test "Factor graph complex example" = 10) ((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var c)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var x)) @@ -206,7 +206,7 @@ let%expect_test "Factor graph complex example" = ((VVar b) (((TargetTerm ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var z)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var e)) @@ -215,7 +215,7 @@ let%expect_test "Factor graph complex example" = 21) ((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var a)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var b)) @@ -226,7 +226,7 @@ let%expect_test "Factor graph complex example" = 10) ((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var b)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Lit Int 0)) @@ -237,7 +237,7 @@ let%expect_test "Factor graph complex example" = 9) ((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var d)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var c)) @@ -249,7 +249,7 @@ let%expect_test "Factor graph complex example" = ((VVar c) (((TargetTerm ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var z)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var e)) @@ -258,7 +258,7 @@ let%expect_test "Factor graph complex example" = 21) ((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var c)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var x)) @@ -269,7 +269,7 @@ let%expect_test "Factor graph complex example" = 17) ((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var d)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var c)) @@ -281,7 +281,7 @@ let%expect_test "Factor graph complex example" = ((VVar d) (((TargetTerm ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var z)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var e)) @@ -290,7 +290,7 @@ let%expect_test "Factor graph complex example" = 21) ((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var d)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var c)) @@ -302,7 +302,7 @@ let%expect_test "Factor graph complex example" = ((VVar e) (((TargetTerm ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var z)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var e)) @@ -312,7 +312,7 @@ let%expect_test "Factor graph complex example" = ((VVar f) (((TargetTerm ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var f)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var f)) @@ -361,7 +361,7 @@ let%expect_test "Priors complex example" = (((VVar a) ((((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var a)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Lit Int 0)) @@ -372,7 +372,7 @@ let%expect_test "Priors complex example" = 9) ((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var e)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var a)) @@ -383,7 +383,7 @@ let%expect_test "Priors complex example" = 14) ((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var f)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var a)) @@ -395,7 +395,7 @@ let%expect_test "Priors complex example" = ((VVar b) ((((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var b)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var a)) @@ -406,7 +406,7 @@ let%expect_test "Priors complex example" = 10) ((TargetTerm ((pattern - (FunApp StanLib normal_lupdf + (FunApp (StanLib normal_lupdf) (((pattern (Var d)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var b)) From 9d511d519930865fb749abd47de07f06f40b536d Mon Sep 17 00:00:00 2001 From: Ryan Bernstein Date: Tue, 30 Mar 2021 10:52:42 -0400 Subject: [PATCH 27/31] Use option type for FnReadParam transformation --- src/frontend/Ast_to_Mir.ml | 58 ++++++++++++++----------- src/middle/Internal_fun.ml | 2 +- src/stan_math_backend/Expression_gen.ml | 12 +++-- src/stan_math_backend/Transform_Mir.ml | 32 ++++++++------ test/unit/Ast_to_Mir_tests.ml | 19 ++++---- test/unit/Dataflow_utils.ml | 26 +++++------ 6 files changed, 80 insertions(+), 69 deletions(-) diff --git a/src/frontend/Ast_to_Mir.ml b/src/frontend/Ast_to_Mir.ml index 4d3286417b..fd2e2b2f6d 100644 --- a/src/frontend/Ast_to_Mir.ml +++ b/src/frontend/Ast_to_Mir.ml @@ -198,33 +198,37 @@ type decl_context = let check_constraint_to_string t (c : constrainaction) = match t with - | Program.Ordered -> "ordered" - | PositiveOrdered -> "positive_ordered" - | Simplex -> "simplex" - | UnitVector -> "unit_vector" - | CholeskyCorr -> "cholesky_factor_corr" - | CholeskyCov -> "cholesky_factor" - | Correlation -> "corr_matrix" - | Covariance -> "cov_matrix" + | Program.Ordered -> Some "ordered" + | PositiveOrdered -> Some "positive_ordered" + | Simplex -> Some "simplex" + | UnitVector -> Some "unit_vector" + | CholeskyCorr -> Some "cholesky_factor_corr" + | CholeskyCov -> Some "cholesky_factor" + | Correlation -> Some "corr_matrix" + | Covariance -> Some "cov_matrix" | Lower _ -> ( match c with - | Check -> "greater_or_equal" - | Constrain | Unconstrain -> "lb" ) + | Check -> Some "greater_or_equal" + | Constrain | Unconstrain -> Some "lb" ) | Upper _ -> ( - match c with Check -> "less_or_equal" | Constrain | Unconstrain -> "ub" ) + match c with + | Check -> Some "less_or_equal" + | Constrain | Unconstrain -> Some "ub" ) | LowerUpper _ -> ( match c with | Check -> raise_s [%message "LowerUpper is really two other checks tied together"] - | Constrain | Unconstrain -> "lub" ) + | Constrain | Unconstrain -> Some "lub" ) | Offset _ | Multiplier _ | OffsetMultiplier _ -> ( - match c with Check -> "" | Constrain | Unconstrain -> "offset_multiplier" ) - | Identity -> "" + match c with + | Check -> None + | Constrain | Unconstrain -> Some "offset_multiplier" ) + | Identity -> None let constrain_constraint_to_string t (c : constrainaction) = match t with - | Program.CholeskyCorr -> "cholesky_corr" + | Program.CholeskyCorr -> Some "cholesky_corr" | _ -> check_constraint_to_string t c let constraint_forl = function @@ -350,8 +354,8 @@ let remove_possibly_exn pst action loc = "Error extracting sizedtype" ~action ~loc:(loc : Location_span.t)] let constrain_decl st dconstrain t decl_id decl_var smeta = - match Option.map ~f:(constrain_constraint_to_string t) dconstrain with - | None | Some "" -> [] + match Option.bind ~f:(constrain_constraint_to_string t) dconstrain with + | None -> [] | Some constraint_str -> let dc = Option.value_exn dconstrain in let extra_args = @@ -398,15 +402,17 @@ let rec check_decl var decl_type' decl_id decl_trans smeta adlevel = | LowerUpper (lb, ub) -> check_decl var decl_type' decl_id (Lower lb) smeta adlevel @ check_decl var decl_type' decl_id (Upper ub) smeta adlevel - | _ -> - let fn = check_constraint_to_string decl_trans Check in - let check_id id = - let id_str = Expr.Helpers.str (Fmt.strf "%a" Expr.Typed.pp id) in - let args = extract_transform_args id decl_trans in - Stmt.Helpers.internal_nrfunapp (FnCheck fn) (id_str :: id :: args) - smeta - in - [(constraint_forl decl_trans) decl_type check_id var smeta] + | _ -> ( + match check_constraint_to_string decl_trans Check with + | Some fn -> + let check_id id = + let id_str = Expr.Helpers.str (Fmt.strf "%a" Expr.Typed.pp id) in + let args = extract_transform_args id decl_trans in + Stmt.Helpers.internal_nrfunapp (FnCheck fn) (id_str :: id :: args) + smeta + in + [(constraint_forl decl_trans) decl_type check_id var smeta] + | None -> [] ) let check_sizedtype name = let check x = function diff --git a/src/middle/Internal_fun.ml b/src/middle/Internal_fun.ml index 5a4b3f7e36..126ad7be3a 100644 --- a/src/middle/Internal_fun.ml +++ b/src/middle/Internal_fun.ml @@ -8,7 +8,7 @@ type t = (* In AST_to_MIR being used as StanLib *) | FnReadData (* XXX move these to a backend specific file?*) - | FnReadParam of string + | FnReadParam of string option | FnWriteParam | FnValidateSize | FnValidateSizeSimplex diff --git a/src/stan_math_backend/Expression_gen.ml b/src/stan_math_backend/Expression_gen.ml index 431fa223a0..02e09c1955 100644 --- a/src/stan_math_backend/Expression_gen.ml +++ b/src/stan_math_backend/Expression_gen.ml @@ -420,10 +420,14 @@ and pp_compiler_internal_fn ad ut f ppf es = | FnConstrain flavor -> pp_constrain_funapp "constrain" flavor ppf es | FnUnconstrain flavor -> pp_constrain_funapp "free" flavor ppf es | FnReadData -> read_data ut ppf es - | FnReadParam constraint_string -> - let constraint_suffix_opt, jacobian_param_opt = - if String.is_empty constraint_string then (None, None) - else (Some ("_constrain_" ^ constraint_string), Some ", jacobian__") + | FnReadParam constraint_opt -> + let constraint_suffix_opt = + Option.map + ~f:(fun constraint_string -> "_constrain_" ^ constraint_string) + constraint_opt + in + let jacobian_param_opt = + Option.map ~f:(fun _ -> ", jacobian__") constraint_opt in pf ppf "@[in__.template read%a<%a%a>(@,%a)@]" (Fmt.option Fmt.string) constraint_suffix_opt pp_unsizedtype_local diff --git a/src/stan_math_backend/Transform_Mir.ml b/src/stan_math_backend/Transform_Mir.ml index 0e1ee10e3c..bc93344348 100644 --- a/src/stan_math_backend/Transform_Mir.ml +++ b/src/stan_math_backend/Transform_Mir.ml @@ -165,29 +165,33 @@ type constrainaction = Check | Constrain | Unconstrain [@@deriving sexp] let constraint_to_string t (c : constrainaction) = match t with - | Program.Ordered -> "ordered" - | PositiveOrdered -> "positive_ordered" - | Simplex -> "simplex" - | UnitVector -> "unit_vector" - | CholeskyCorr -> "cholesky_factor_corr" - | CholeskyCov -> "cholesky_factor_cov" - | Correlation -> "corr_matrix" - | Covariance -> "cov_matrix" + | Program.Ordered -> Some "ordered" + | PositiveOrdered -> Some "positive_ordered" + | Simplex -> Some "simplex" + | UnitVector -> Some "unit_vector" + | CholeskyCorr -> Some "cholesky_factor_corr" + | CholeskyCov -> Some "cholesky_factor_cov" + | Correlation -> Some "corr_matrix" + | Covariance -> Some "cov_matrix" | Lower _ -> ( match c with - | Check -> "greater_or_equal" - | Constrain | Unconstrain -> "lb" ) + | Check -> Some "greater_or_equal" + | Constrain | Unconstrain -> Some "lb" ) | Upper _ -> ( - match c with Check -> "less_or_equal" | Constrain | Unconstrain -> "ub" ) + match c with + | Check -> Some "less_or_equal" + | Constrain | Unconstrain -> Some "ub" ) | LowerUpper _ -> ( match c with | Check -> raise_s [%message "LowerUpper is really two other checks tied together"] - | Constrain | Unconstrain -> "lub" ) + | Constrain | Unconstrain -> Some "lub" ) | Offset _ | Multiplier _ | OffsetMultiplier _ -> ( - match c with Check -> "" | Constrain | Unconstrain -> "offset_multiplier" ) - | Identity -> "" + match c with + | Check -> None + | Constrain | Unconstrain -> Some "offset_multiplier" ) + | Identity -> None let default_multiplier = 1 let default_offset = 0 diff --git a/test/unit/Ast_to_Mir_tests.ml b/test/unit/Ast_to_Mir_tests.ml index f9594a6b2a..14692ac046 100644 --- a/test/unit/Ast_to_Mir_tests.ml +++ b/test/unit/Ast_to_Mir_tests.ml @@ -51,17 +51,17 @@ let%expect_test "Prefix-Op-Example" = ((pattern (IfElse ((pattern - (FunApp StanLib Less__ + (FunApp (StanLib Less__) (((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Lit Str Badger)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) @@ -117,7 +117,7 @@ let%expect_test "gen quant" = (((pattern (IfElse ((pattern - (FunApp StanLib PNot__ + (FunApp (StanLib PNot__) (((pattern (EOr ((pattern (Var emit_transformed_parameters__)) @@ -131,7 +131,7 @@ let%expect_test "gen quant" = ((pattern (IfElse ((pattern - (FunApp StanLib PNot__ + (FunApp (StanLib PNot__) (((pattern (Var emit_generated_quantities__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -184,12 +184,9 @@ let%expect_test "gen quant" = ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str "mat[sym1__, sym2__, sym3__]")) (meta ((type_ UInt) (loc ) diff --git a/test/unit/Dataflow_utils.ml b/test/unit/Dataflow_utils.ml index 258b684fed..fb2329075d 100644 --- a/test/unit/Dataflow_utils.ml +++ b/test/unit/Dataflow_utils.ml @@ -70,9 +70,9 @@ let%expect_test "Loop test" = (end_loc ((filename string) (line_num 4) (col_num 23) (included_from ())))))) (5 - ((NRFunApp CompilerInternal FnPrint__ + ((NRFunApp (CompilerInternal FnPrint) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 4)) @@ -191,7 +191,7 @@ let%expect_test "Statement label map example" = (5 (IfElse ((pattern - (FunApp StanLib Less__ + (FunApp (StanLib Less__) (((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 0)) @@ -200,7 +200,7 @@ let%expect_test "Statement label map example" = 6 (8))) (6 (Block (7))) (7 - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (8 (Block (9))) @@ -217,7 +217,7 @@ let%expect_test "Statement label map example" = (11 (IfElse ((pattern - (FunApp StanLib Greater__ + (FunApp (StanLib Greater__) (((pattern (Var j)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 9)) @@ -230,18 +230,18 @@ let%expect_test "Statement label map example" = ((pattern (EAnd ((pattern - (FunApp StanLib Greater__ + (FunApp (StanLib Greater__) (((pattern (Var j)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 8)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Less__ + (FunApp (StanLib Less__) (((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) @@ -252,7 +252,7 @@ let%expect_test "Statement label map example" = (17 (IfElse ((pattern - (FunApp StanLib Greater__ + (FunApp (StanLib Greater__) (((pattern (Var j)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 5)) @@ -261,18 +261,18 @@ let%expect_test "Statement label map example" = 18 (20))) (18 (Block (19))) (19 Continue) (20 (Block (21))) (21 - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Lit Str Badger)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var j)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (22 - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Lit Str Fin)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))))) |}] @@ -372,7 +372,7 @@ let%expect_test "Statement label map example 3" = (end_loc ((filename string) (line_num 3) (col_num 19) (included_from ())))))) (6 - ((NRFunApp CompilerInternal FnPrint__ + ((NRFunApp (CompilerInternal FnPrint) (((pattern (Lit Str exit)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) ((begin_loc From af670fa102c0c3600e02d5844bd96e4118a7897c Mon Sep 17 00:00:00 2001 From: Sean Talts Date: Fri, 2 Apr 2021 13:12:32 -0400 Subject: [PATCH 28/31] Unify NRFunApp with FunApp monotone free vars --- .../Monotone_framework.ml | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/analysis_and_optimization/Monotone_framework.ml b/src/analysis_and_optimization/Monotone_framework.ml index 32b93b4c8f..48008c6264 100644 --- a/src/analysis_and_optimization/Monotone_framework.ml +++ b/src/analysis_and_optimization/Monotone_framework.ml @@ -29,13 +29,7 @@ let rec free_vars_expr (e : Expr.Typed.t) = match e.pattern with | Var x -> Set.Poly.singleton x | Lit (_, _) -> Set.Poly.empty - | FunApp (kind, l) -> ( - let arg_vars = List.map ~f:free_vars_expr l in - match kind with - | UserDefined f -> - Set.Poly.union_list - (Set.Poly.singleton f :: List.map ~f:free_vars_expr l) - | _ -> Set.Poly.union_list arg_vars ) + | FunApp (kind, l) -> free_vars_fnapp kind l | TernaryIf (e1, e2, e3) -> Set.Poly.union_list (List.map ~f:free_vars_expr [e1; e2; e3]) | Indexed (e, l) -> @@ -50,6 +44,13 @@ and free_vars_idx (i : Expr.Typed.t Index.t) = | Single e | Upfrom e | MultiIndex e -> free_vars_expr e | Between (e1, e2) -> Set.Poly.union (free_vars_expr e1) (free_vars_expr e2) +and free_vars_fnapp kind l = + let arg_vars = List.map ~f:free_vars_expr l in + match kind with + | Fun_kind.UserDefined f -> + Set.Poly.union_list (Set.Poly.singleton f :: List.map ~f:free_vars_expr l) + | _ -> Set.Poly.union_list arg_vars + (** Calculate the free (non-bound) variables in a statement *) let rec free_vars_stmt (s : (Expr.Typed.t, Stmt.Located.t) Stmt.Fixed.Pattern.t) = @@ -58,13 +59,7 @@ let rec free_vars_stmt free_vars_expr e | Assignment ((_, _, l), e) -> Set.Poly.union_list (free_vars_expr e :: List.map ~f:free_vars_idx l) - | NRFunApp (kind, l) -> ( - let arg_vars = List.map ~f:free_vars_expr l in - match kind with - | UserDefined f -> - Set.Poly.union_list - (Set.Poly.singleton f :: List.map ~f:free_vars_expr l) - | _ -> Set.Poly.union_list arg_vars ) + | NRFunApp (kind, l) -> free_vars_fnapp kind l | IfElse (e, b1, Some b2) -> Set.Poly.union_list [free_vars_expr e; free_vars_stmt b1.pattern; free_vars_stmt b2.pattern] From 171edb355040eef330ba43ac0a6c205d2f9bf536 Mon Sep 17 00:00:00 2001 From: Sean Talts Date: Fri, 2 Apr 2021 13:24:01 -0400 Subject: [PATCH 29/31] Make Fun_kind.t non-parametric --- src/middle/Expr.ml | 6 +++--- src/middle/Expr.mli | 4 ++-- src/middle/Fun_kind.ml | 4 ++-- src/middle/Stmt.ml | 2 +- src/middle/Stmt.mli | 7 ++----- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/middle/Expr.ml b/src/middle/Expr.ml index 6a08500b72..f71b85dbe9 100644 --- a/src/middle/Expr.ml +++ b/src/middle/Expr.ml @@ -10,7 +10,7 @@ module Fixed = struct type 'a t = | Var of string | Lit of litType * string - | FunApp of Internal_fun.t Fun_kind.t * 'a list + | FunApp of Fun_kind.t * 'a list | TernaryIf of 'a * 'a * 'a | EAnd of 'a * 'a | EOr of 'a * 'a @@ -113,8 +113,8 @@ module Labelled = struct let adlevel_of Fixed.({meta= Meta.({adlevel; _}); _}) = adlevel let loc_of Fixed.({meta= Meta.({loc; _}); _}) = loc - (** Traverse a typed expression adding unique labels using locally mutable - state + (** Traverse a typed expression adding unique labels using locally mutable + state *) let label ?(init = Label.Int_label.init) (expr : Typed.t) : t = let lbl = ref init in diff --git a/src/middle/Expr.mli b/src/middle/Expr.mli index 333f78507d..6035f20cc9 100644 --- a/src/middle/Expr.mli +++ b/src/middle/Expr.mli @@ -8,7 +8,7 @@ module Fixed : sig type 'a t = | Var of string | Lit of litType * string - | FunApp of Internal_fun.t Fun_kind.t * 'a list + | FunApp of Fun_kind.t * 'a list | TernaryIf of 'a * 'a * 'a | EAnd of 'a * 'a | EOr of 'a * 'a @@ -87,7 +87,7 @@ module Helpers : sig val internal_funapp : Internal_fun.t -> 'a Fixed.t list -> 'a -> 'a Fixed.t val contains_fn_kind : - (Internal_fun.t Fun_kind.t -> bool) -> ?init:bool -> 'a Fixed.t -> bool + (Fun_kind.t -> bool) -> ?init:bool -> 'a Fixed.t -> bool val infer_type_of_indexed : UnsizedType.t -> 'a Index.t list -> UnsizedType.t val add_int_index : Typed.t -> Typed.t Index.t -> Typed.t diff --git a/src/middle/Fun_kind.ml b/src/middle/Fun_kind.ml index 63808d8c66..ed6a233579 100644 --- a/src/middle/Fun_kind.ml +++ b/src/middle/Fun_kind.ml @@ -1,8 +1,8 @@ open Core_kernel -type 'internal t = +type t = | StanLib of string - | CompilerInternal of 'internal + | CompilerInternal of Internal_fun.t | UserDefined of string [@@deriving compare, sexp, hash] diff --git a/src/middle/Stmt.ml b/src/middle/Stmt.ml index e45147f407..44c2c1170a 100644 --- a/src/middle/Stmt.ml +++ b/src/middle/Stmt.ml @@ -10,7 +10,7 @@ module Fixed = struct type ('a, 'b) t = | Assignment of 'a lvalue * 'a | TargetPE of 'a - | NRFunApp of Internal_fun.t Fun_kind.t * 'a list + | NRFunApp of Fun_kind.t * 'a list | Break | Continue | Return of 'a option diff --git a/src/middle/Stmt.mli b/src/middle/Stmt.mli index e76fce953f..1344b797aa 100644 --- a/src/middle/Stmt.mli +++ b/src/middle/Stmt.mli @@ -7,7 +7,7 @@ module Fixed : sig type ('a, 'b) t = | Assignment of 'a lvalue * 'a | TargetPE of 'a - | NRFunApp of Internal_fun.t Fun_kind.t * 'a list + | NRFunApp of Fun_kind.t * 'a list | Break | Continue | Return of 'a option @@ -123,10 +123,7 @@ module Helpers : sig Internal_fun.t -> 'a Fixed.First.t list -> 'b -> ('a, 'b) Fixed.t val contains_fn_kind : - (Internal_fun.t Fun_kind.t -> bool) - -> ?init:bool - -> ('a, 'b) Fixed.t - -> bool + (Fun_kind.t -> bool) -> ?init:bool -> ('a, 'b) Fixed.t -> bool val mkfor : Expr.Typed.t From 21154d4df795f979f7c42efb22623e6cc8250b91 Mon Sep 17 00:00:00 2001 From: Sean Talts Date: Fri, 2 Apr 2021 15:19:35 -0400 Subject: [PATCH 30/31] tiny reformat --- src/analysis_and_optimization/Optimize.ml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/analysis_and_optimization/Optimize.ml b/src/analysis_and_optimization/Optimize.ml index 883b0e06c1..1ed958c590 100644 --- a/src/analysis_and_optimization/Optimize.ml +++ b/src/analysis_and_optimization/Optimize.ml @@ -235,21 +235,18 @@ let rec inline_function_expression propto adt fim | CompilerInternal _ -> (d_list, s_list, {e with pattern= FunApp (kind, es)}) | UserDefined fname | StanLib fname -> ( - let s = + let fname = if propto then fname else Middle.Utils.stdlib_distribution_name fname in - match Map.find fim s with + match Map.find fim fname with | None -> - ( d_list - , s_list - , { e with - pattern= - FunApp - ( ( match kind with - | UserDefined _ -> UserDefined s - | _ -> StanLib s ) - , es ) } ) + let fun_kind = + match kind with + | Fun_kind.UserDefined _ -> Fun_kind.UserDefined fname + | _ -> StanLib fname + in + (d_list, s_list, {e with pattern= FunApp (fun_kind, es)}) | Some (rt, args, b) -> let x = Gensym.generate ~prefix:"inline_" () in let handle = handle_early_returns (Some x) in From b8e666ee840d5f92943a14abbd802891516f0b6c Mon Sep 17 00:00:00 2001 From: Sean Talts Date: Sat, 3 Apr 2021 08:33:25 -0400 Subject: [PATCH 31/31] Promote transformed MIR expect tests --- .../good/code-gen/transformed_mir.expected | 10091 +++++----------- 1 file changed, 3187 insertions(+), 6904 deletions(-) diff --git a/test/integration/good/code-gen/transformed_mir.expected b/test/integration/good/code-gen/transformed_mir.expected index 334f98b8ee..6ecc90b549 100644 --- a/test/integration/good/code-gen/transformed_mir.expected +++ b/test/integration/good/code-gen/transformed_mir.expected @@ -9,7 +9,7 @@ (((pattern (IfElse ((pattern - (FunApp StanLib Equals__ + (FunApp (StanLib Equals__) (((pattern (Var n)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 0)) @@ -28,13 +28,13 @@ ((pattern (Return (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var n)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp UserDefined foo + (FunApp (UserDefined foo) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var n)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -94,9 +94,9 @@ ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Indexed ((pattern (Var y)) @@ -112,7 +112,7 @@ (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Indexed ((pattern (Var theta)) @@ -228,7 +228,7 @@ (((pattern (Return (((pattern - (FunApp StanLib normal_rng + (FunApp (StanLib normal_rng) (((pattern (Var mu)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -246,7 +246,7 @@ (((pattern (TargetPE ((pattern - (FunApp StanLib normal_log + (FunApp (StanLib normal_log) (((pattern (Var u)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -259,12 +259,12 @@ ((pattern (TargetPE ((pattern - (FunApp StanLib uniform_lupdf + (FunApp (StanLib uniform_lupdf) (((pattern (Var u)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Lit Int 100)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -430,7 +430,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -480,7 +480,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -530,7 +530,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -571,7 +571,7 @@ (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var v)) (meta ((type_ (UArray UInt)) (loc ) @@ -660,7 +660,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var vs)) (meta ((type_ UMatrix) (loc ) @@ -679,7 +679,7 @@ (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Indexed ((pattern (Var vs)) @@ -749,7 +749,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var vs)) (meta ((type_ UMatrix) (loc ) @@ -768,7 +768,7 @@ (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Indexed ((pattern (Var vs)) @@ -859,7 +859,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ UVector) (loc ) @@ -910,7 +910,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ UVector) (loc ) @@ -982,7 +982,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ URowVector) (loc ) @@ -1033,7 +1033,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ URowVector) (loc ) @@ -1140,7 +1140,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var vs)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) @@ -1194,7 +1194,7 @@ (((pattern (Return (((pattern - (FunApp StanLib rep_array + (FunApp (StanLib rep_array) (((pattern (Var t)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -1213,11 +1213,11 @@ (((pattern (Return (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var x)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (FunApp StanLib target ())) + ((pattern (FunApp (StanLib target) ())) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) @@ -1229,7 +1229,7 @@ (((pattern (Block (((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "user-specified rejection")) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var x)) @@ -1255,9 +1255,9 @@ ((pattern (Assignment (abs_diff UReal ()) ((pattern - (FunApp StanLib fabs + (FunApp (StanLib fabs) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var x)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -1271,11 +1271,11 @@ ((pattern (Assignment (avg_scale UReal ()) ((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib fabs + (FunApp (StanLib fabs) (((pattern (Var x)) (meta ((type_ UReal) (loc ) @@ -1283,7 +1283,7 @@ (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern - (FunApp StanLib fabs + (FunApp (StanLib fabs) (((pattern (Var y)) (meta ((type_ UReal) (loc ) @@ -1299,9 +1299,9 @@ ((pattern (IfElse ((pattern - (FunApp StanLib Greater__ + (FunApp (StanLib Greater__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Var abs_diff)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -1317,7 +1317,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "user-specified rejection, difference above ")) @@ -1345,9 +1345,9 @@ ((pattern (IfElse ((pattern - (FunApp StanLib Less__ + (FunApp (StanLib Less__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Var abs_diff)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -1363,7 +1363,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "user-specified rejection, difference below ")) @@ -1391,7 +1391,7 @@ ((pattern (Return (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Var abs_diff)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) @@ -1412,9 +1412,9 @@ (((pattern (Return (((pattern - (FunApp StanLib Transpose__ + (FunApp (StanLib Transpose__) (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -1465,26 +1465,26 @@ (((pattern (Block (((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str o)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str "rows(mat)")) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var mat)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UInt) (loc ) (adlevel AutoDiffable))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str o)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str "cols(mat)")) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib cols + (FunApp (StanLib cols) (((pattern (Var mat)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) @@ -1496,13 +1496,13 @@ (Sized (SMatrix ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var mat)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UInt) (loc ) (adlevel AutoDiffable)))) ((pattern - (FunApp StanLib cols + (FunApp (StanLib cols) (((pattern (Var mat)) (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) @@ -1571,7 +1571,7 @@ (((pattern (Block (((pattern - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Lit Str hi)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ))))) @@ -1898,9 +1898,9 @@ (((pattern (Return (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -1934,7 +1934,7 @@ (meta ((type_ URowVector) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -1968,7 +1968,7 @@ (meta ((type_ URowVector) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2012,9 +2012,9 @@ (((pattern (Return (((pattern - (FunApp StanLib Transpose__ + (FunApp (StanLib Transpose__) (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2066,11 +2066,11 @@ ((pattern (Assignment (l UVector ()) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var mu)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (FunApp UserDefined vecfoo ())) + ((pattern (FunApp (UserDefined vecfoo) ())) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) (meta )) @@ -2096,14 +2096,14 @@ ((pattern (Assignment (l UVector ()) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var mu)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern - (FunApp StanLib Transpose__ + (FunApp (StanLib Transpose__) (((pattern - (FunApp CompilerInternal FnMakeRowVec__ + (FunApp (CompilerInternal FnMakeRowVec) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2148,7 +2148,7 @@ ((type_ UVector) (loc ) (adlevel AutoDiffable)))) ((MultiIndex ((pattern - (FunApp CompilerInternal FnMakeArray__ + (FunApp (CompilerInternal FnMakeArray) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2193,7 +2193,7 @@ ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Indexed ((pattern (Var x)) @@ -2225,7 +2225,7 @@ ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Indexed ((pattern (Var x)) @@ -2595,7 +2595,7 @@ ((pattern (Indexed ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) @@ -2605,10 +2605,8 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str N)) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2623,7 +2621,7 @@ ((pattern (Indexed ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str M)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) @@ -2633,10 +2631,8 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str M)) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str M)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var M)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2651,7 +2647,7 @@ ((pattern (Indexed ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) @@ -2661,10 +2657,8 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str K)) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -2672,15 +2666,13 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str K)) + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var M)) @@ -2688,7 +2680,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_1d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2707,7 +2699,7 @@ ((pattern (Assignment (d_int_1d_ar (UArray UInt) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_int_1d_ar)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))))) @@ -2724,10 +2716,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_int_1d_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str d_int_1d_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -2744,7 +2734,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -2753,7 +2743,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -2762,7 +2752,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -2793,7 +2783,7 @@ ((pattern (Assignment (d_int_3d_ar_flat__ (UArray UInt) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_int_3d_ar)) (meta ((type_ (UArray (UArray (UArray UInt)))) (loc ) @@ -2877,7 +2867,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -2933,12 +2923,9 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str "d_int_3d_ar[sym1__, sym2__, sym3__]")) (meta @@ -2987,7 +2974,7 @@ ((pattern (Indexed ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str J)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) @@ -2997,24 +2984,20 @@ (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str J)) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str J)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var J)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Lit Real 2.0)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str J)) + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str J)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var J)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) @@ -3022,7 +3005,7 @@ (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_1d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3041,13 +3024,13 @@ ((pattern (Assignment (d_real_1d_ar (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_real_1d_ar)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3056,7 +3039,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -3065,7 +3048,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -3096,7 +3079,7 @@ ((pattern (Assignment (d_real_3d_ar_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_real_3d_ar)) (meta ((type_ (UArray (UArray (UArray UReal)))) (loc ) @@ -3180,7 +3163,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -3201,7 +3184,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3226,7 +3209,7 @@ ((pattern (Assignment (d_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_vec)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -3268,7 +3251,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -3281,7 +3264,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3290,7 +3273,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3318,7 +3301,7 @@ ((pattern (Assignment (d_1d_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_1d_vec)) (meta ((type_ (UArray UVector)) (loc ) (adlevel DataOnly))))))) @@ -3381,7 +3364,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -3399,7 +3382,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3408,7 +3391,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -3417,7 +3400,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -3426,7 +3409,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3460,7 +3443,7 @@ ((pattern (Assignment (d_3d_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_3d_vec)) (meta ((type_ (UArray (UArray (UArray UVector)))) (loc ) @@ -3565,7 +3548,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -3588,7 +3571,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3613,7 +3596,7 @@ ((pattern (Assignment (d_row_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_row_vec)) (meta ((type_ URowVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -3655,7 +3638,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -3668,7 +3651,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3677,7 +3660,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3705,7 +3688,7 @@ ((pattern (Assignment (d_1d_row_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_1d_row_vec)) (meta ((type_ (UArray URowVector)) (loc ) @@ -3769,7 +3752,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -3787,7 +3770,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3796,7 +3779,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -3805,7 +3788,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -3814,7 +3797,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -3848,7 +3831,7 @@ ((pattern (Assignment (d_3d_row_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_3d_row_vec)) (meta ((type_ (UArray (UArray (UArray URowVector)))) (loc ) @@ -3955,7 +3938,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -4002,7 +3985,7 @@ ((pattern (Assignment (d_ar_mat_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_ar_mat)) (meta ((type_ (UArray (UArray UMatrix))) (loc ) @@ -4106,7 +4089,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -4179,12 +4162,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck greater_or_equal)) + (((pattern (Lit Str "d_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -4285,12 +4266,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck less_or_equal)) + (((pattern (Lit Str "d_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -4341,7 +4320,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -4366,7 +4345,7 @@ ((pattern (Assignment (d_simplex_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_simplex)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -4408,7 +4387,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -4421,16 +4400,14 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_simplex)) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_simplex)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -4439,7 +4416,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -4467,7 +4444,7 @@ ((pattern (Assignment (d_1d_simplex_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_1d_simplex)) (meta ((type_ (UArray UVector)) (loc ) (adlevel DataOnly))))))) @@ -4530,7 +4507,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -4559,10 +4536,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_1d_simplex[sym1__])) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str d_1d_simplex[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -4578,7 +4553,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -4587,7 +4562,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -4596,7 +4571,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -4605,7 +4580,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -4639,7 +4614,7 @@ ((pattern (Assignment (d_3d_simplex_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_3d_simplex)) (meta ((type_ (UArray (UArray (UArray UVector)))) (loc ) @@ -4745,7 +4720,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -4803,12 +4778,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str "d_3d_simplex[sym1__, sym2__, sym3__]")) (meta @@ -4865,7 +4836,7 @@ ((pattern (Assignment (d_cfcov_54_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -4927,7 +4898,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -4945,10 +4916,8 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_cfcov_54)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str d_cfcov_54)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) @@ -4972,7 +4941,7 @@ ((pattern (Assignment (d_cfcov_33_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -5034,7 +5003,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -5052,16 +5021,14 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_cfcov_33)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str d_cfcov_33)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_cfcov_33_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -5091,7 +5058,7 @@ ((pattern (Assignment (d_cfcov_33_ar_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_cfcov_33_ar)) (meta ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly))))))) @@ -5173,7 +5140,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -5205,10 +5172,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str d_cfcov_33_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str d_cfcov_33_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -5231,7 +5196,7 @@ ((pattern (Indexed ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) @@ -5241,7 +5206,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5260,13 +5225,13 @@ ((pattern (Assignment (d_int_array (UArray UInt) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_int_array)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5294,7 +5259,7 @@ ((pattern (Assignment (d_int_array_2d_flat__ (UArray UInt) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_int_array_2d)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -5358,7 +5323,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -5376,7 +5341,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_int_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5407,7 +5372,7 @@ ((pattern (Assignment (d_int_array_3d_flat__ (UArray UInt) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_int_array_3d)) (meta ((type_ (UArray (UArray (UArray UInt)))) (loc ) @@ -5491,7 +5456,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -5519,7 +5484,7 @@ ((pattern (Indexed ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) @@ -5529,7 +5494,7 @@ (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5548,13 +5513,13 @@ ((pattern (Assignment (d_real_array (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_real_array)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5582,7 +5547,7 @@ ((pattern (Assignment (d_real_array_2d_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_real_array_2d)) (meta ((type_ (UArray (UArray UReal))) (loc ) @@ -5646,7 +5611,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -5664,7 +5629,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_real_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5695,7 +5660,7 @@ ((pattern (Assignment (d_real_array_3d_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_real_array_3d)) (meta ((type_ (UArray (UArray (UArray UReal)))) (loc ) @@ -5779,7 +5744,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -5800,7 +5765,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5809,7 +5774,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5836,7 +5801,7 @@ ((pattern (Assignment (d_matrix_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_matrix)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -5898,7 +5863,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -5916,7 +5881,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5925,7 +5890,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5934,7 +5899,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -5964,7 +5929,7 @@ ((pattern (Assignment (d_matrix_array_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_matrix_array)) (meta ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly))))))) @@ -6046,7 +6011,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -6067,7 +6032,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6076,7 +6041,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6085,7 +6050,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6118,7 +6083,7 @@ ((pattern (Assignment (d_matrix_array_2d_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_matrix_array_2d)) (meta ((type_ (UArray (UArray UMatrix))) (loc ) @@ -6224,7 +6189,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -6247,7 +6212,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6256,7 +6221,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6265,7 +6230,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6301,7 +6266,7 @@ ((pattern (Assignment (d_matrix_array_3d_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_matrix_array_3d)) (meta ((type_ (UArray (UArray (UArray UMatrix)))) (loc ) @@ -6437,7 +6402,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) @@ -6465,7 +6430,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6490,7 +6455,7 @@ ((pattern (Assignment (d_vector_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_vector)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -6532,7 +6497,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -6545,7 +6510,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6554,7 +6519,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6582,7 +6547,7 @@ ((pattern (Assignment (d_vector_array_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_vector_array)) (meta ((type_ (UArray UVector)) (loc ) (adlevel DataOnly))))))) @@ -6645,7 +6610,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -6663,7 +6628,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6672,7 +6637,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6703,7 +6668,7 @@ ((pattern (Assignment (d_vector_array_2d_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_vector_array_2d)) (meta ((type_ (UArray (UArray UVector))) (loc ) @@ -6788,7 +6753,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -6809,7 +6774,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6818,7 +6783,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -6852,7 +6817,7 @@ ((pattern (Assignment (d_vector_array_3d_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray UVector)))) (loc ) @@ -6958,7 +6923,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -6981,7 +6946,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -7006,7 +6971,7 @@ ((pattern (Assignment (d_row_vector_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_row_vector)) (meta ((type_ URowVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -7048,7 +7013,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -7061,7 +7026,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -7070,7 +7035,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -7098,7 +7063,7 @@ ((pattern (Assignment (d_row_vector_array_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_row_vector_array)) (meta ((type_ (UArray URowVector)) (loc ) @@ -7162,7 +7127,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -7180,7 +7145,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -7189,7 +7154,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -7221,7 +7186,7 @@ ((pattern (Assignment (d_row_vector_array_2d_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_row_vector_array_2d)) (meta ((type_ (UArray (UArray URowVector))) (loc ) @@ -7306,7 +7271,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -7327,7 +7292,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -7336,7 +7301,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str d_row_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -7371,7 +7336,7 @@ ((pattern (Assignment (d_row_vector_array_3d_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str d_row_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray URowVector)))) (loc ) @@ -7479,7 +7444,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -7505,7 +7470,7 @@ (Decl (decl_adtype DataOnly) (decl_id td_int) (decl_type (Sized SInt)))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_1d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7522,7 +7487,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_1dk)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7541,7 +7506,7 @@ ((pattern (Assignment (td_1dk (UArray UInt) ()) ((pattern - (FunApp StanLib rep_array + (FunApp (StanLib rep_array) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var M)) @@ -7562,7 +7527,7 @@ ((pattern (Assignment (td_b UReal ()) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var J)) @@ -7575,7 +7540,7 @@ ((pattern (Assignment (td_c UReal ()) ((pattern - (FunApp UserDefined foo_bar1 + (FunApp (UserDefined foo_bar1) (((pattern (Var td_b)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -7597,7 +7562,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7614,7 +7579,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7623,7 +7588,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7643,7 +7608,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7652,7 +7617,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -7661,7 +7626,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -7670,7 +7635,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str td_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -7893,7 +7858,7 @@ ((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Lit Real 1.0)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var N)) @@ -7923,7 +7888,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Lit Real 1.0)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) @@ -7986,7 +7951,7 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern (Lit Real 1.0)) (meta ((type_ UReal) (loc ) @@ -8061,7 +8026,7 @@ ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnPrint__ + (NRFunApp (CompilerInternal FnPrint) (((pattern (Lit Str "ar dim1: ")) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) @@ -8088,13 +8053,13 @@ ((pattern (Assignment (td_cfcov_54 UMatrix ()) ((pattern - (FunApp StanLib diag_matrix + (FunApp (StanLib diag_matrix) (((pattern - (FunApp StanLib rep_vector + (FunApp (StanLib rep_vector) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var td_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) @@ -8104,13 +8069,13 @@ ((pattern (Assignment (td_cfcov_33 UMatrix ()) ((pattern - (FunApp StanLib diag_matrix + (FunApp (StanLib diag_matrix) (((pattern - (FunApp StanLib rep_vector + (FunApp (StanLib rep_vector) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib rows + (FunApp (StanLib rows) (((pattern (Var td_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) @@ -8137,7 +8102,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var blocked_tdata_vs)) (meta ((type_ URowVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) @@ -8185,7 +8150,7 @@ ((pattern (Assignment (indices (UArray UInt) ()) ((pattern - (FunApp CompilerInternal FnMakeArray__ + (FunApp (CompilerInternal FnMakeArray) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 2)) @@ -8224,7 +8189,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp CompilerInternal FnLength__ + (FunApp (CompilerInternal FnLength) (((pattern (Var sym1__)) (meta ((type_ (UArray UInt)) (loc ) @@ -8340,7 +8305,7 @@ ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnMakeArray__ + (FunApp (CompilerInternal FnMakeArray) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -8358,7 +8323,7 @@ ((pattern (Assignment (x_mul_ind (UArray UInt) ()) ((pattern - (FunApp CompilerInternal FnMakeArray__ + (FunApp (CompilerInternal FnMakeArray) (((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 2)) @@ -8370,7 +8335,7 @@ (decl_type (Sized SReal)))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_real_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8387,7 +8352,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_real_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8407,7 +8372,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_real_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8430,7 +8395,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8439,7 +8404,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8458,7 +8423,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8467,7 +8432,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8476,7 +8441,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8498,7 +8463,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8507,7 +8472,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8516,7 +8481,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8541,7 +8506,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8550,7 +8515,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8559,7 +8524,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_matrix_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8587,7 +8552,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8604,7 +8569,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8613,7 +8578,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8633,7 +8598,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8642,7 +8607,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8665,7 +8630,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8674,7 +8639,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8700,7 +8665,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8717,7 +8682,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8726,7 +8691,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8746,7 +8711,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8755,7 +8720,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array_2d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8779,7 +8744,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8788,7 +8753,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str transformed_data_row_vector_array_3d)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str d_int)) @@ -8817,7 +8782,7 @@ ((pattern (Assignment (transformed_data_real UReal ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -8827,7 +8792,7 @@ ((pattern (Assignment (transformed_data_real UReal ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -8837,7 +8802,7 @@ ((pattern (Assignment (transformed_data_real UReal ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -8847,7 +8812,7 @@ ((pattern (Assignment (transformed_data_real UReal ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -8857,7 +8822,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -8867,7 +8832,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -8877,7 +8842,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_2d)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -8890,7 +8855,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_2d)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -8904,7 +8869,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_3d)) (meta ((type_ (UArray (UArray (UArray UInt)))) (loc ) @@ -8919,7 +8884,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_3d)) (meta ((type_ (UArray (UArray (UArray UInt)))) (loc ) @@ -8933,7 +8898,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array)) @@ -8943,7 +8908,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array)) @@ -8953,7 +8918,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array_2d)) @@ -8966,7 +8931,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array_2d)) @@ -8980,7 +8945,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array_3d)) @@ -8995,7 +8960,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array_3d)) @@ -9009,7 +8974,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array)) @@ -9019,7 +8984,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array)) @@ -9029,7 +8994,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array_2d)) @@ -9042,7 +9007,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array_2d)) @@ -9056,7 +9021,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array_3d)) @@ -9071,7 +9036,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array_3d)) @@ -9085,7 +9050,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -9095,7 +9060,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -9105,7 +9070,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_2d)) (meta ((type_ (UArray (UArray UReal))) (loc ) @@ -9118,7 +9083,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_2d)) (meta ((type_ (UArray (UArray UReal))) (loc ) @@ -9132,7 +9097,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_3d)) (meta ((type_ (UArray (UArray (UArray UReal)))) (loc ) @@ -9147,7 +9112,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_3d)) (meta ((type_ (UArray (UArray (UArray UReal)))) (loc ) @@ -9161,7 +9126,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int_array)) @@ -9171,7 +9136,7 @@ ((pattern (Assignment (transformed_data_real_array (UArray UReal) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real_array)) @@ -9181,7 +9146,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_2d)) (meta ((type_ (UArray (UArray UInt))) (loc ) @@ -9196,7 +9161,7 @@ ((pattern (Assignment (transformed_data_real_array_2d (UArray (UArray UReal)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_2d)) (meta ((type_ (UArray (UArray UReal))) (loc ) @@ -9212,7 +9177,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int_array_3d)) (meta ((type_ (UArray (UArray (UArray UInt)))) (loc ) @@ -9229,7 +9194,7 @@ (Assignment (transformed_data_real_array_3d (UArray (UArray (UArray UReal))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real_array_3d)) (meta ((type_ (UArray (UArray (UArray UReal)))) (loc ) @@ -9245,7 +9210,7 @@ ((pattern (Assignment (transformed_data_vector UVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector)) (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -9255,7 +9220,7 @@ ((pattern (Assignment (transformed_data_vector UVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector)) (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -9265,7 +9230,7 @@ ((pattern (Assignment (transformed_data_vector_array (UArray UVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array)) (meta ((type_ (UArray UVector)) (loc ) (adlevel DataOnly)))) @@ -9276,7 +9241,7 @@ ((pattern (Assignment (transformed_data_vector_array (UArray UVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array)) (meta ((type_ (UArray UVector)) (loc ) (adlevel DataOnly)))) @@ -9288,7 +9253,7 @@ (Assignment (transformed_data_vector_array_2d (UArray (UArray UVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_2d)) (meta ((type_ (UArray (UArray UVector))) (loc ) @@ -9302,7 +9267,7 @@ (Assignment (transformed_data_vector_array_2d (UArray (UArray UVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_2d)) (meta ((type_ (UArray (UArray UVector))) (loc ) @@ -9317,7 +9282,7 @@ (transformed_data_vector_array_3d (UArray (UArray (UArray UVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray UVector)))) (loc ) @@ -9333,7 +9298,7 @@ (transformed_data_vector_array_3d (UArray (UArray (UArray UVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray UVector)))) (loc ) @@ -9347,7 +9312,7 @@ ((pattern (Assignment (transformed_data_vector UVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector)) @@ -9357,7 +9322,7 @@ ((pattern (Assignment (transformed_data_vector UVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector)) @@ -9367,7 +9332,7 @@ ((pattern (Assignment (transformed_data_vector_array (UArray UVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array)) @@ -9378,7 +9343,7 @@ ((pattern (Assignment (transformed_data_vector_array (UArray UVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array)) @@ -9390,7 +9355,7 @@ (Assignment (transformed_data_vector_array_2d (UArray (UArray UVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array_2d)) @@ -9404,7 +9369,7 @@ (Assignment (transformed_data_vector_array_2d (UArray (UArray UVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array_2d)) @@ -9419,7 +9384,7 @@ (transformed_data_vector_array_3d (UArray (UArray (UArray UVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array_3d)) @@ -9435,7 +9400,7 @@ (transformed_data_vector_array_3d (UArray (UArray (UArray UVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector_array_3d)) @@ -9449,7 +9414,7 @@ ((pattern (Assignment (transformed_data_vector UVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector)) (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_vector)) @@ -9459,7 +9424,7 @@ ((pattern (Assignment (transformed_data_vector_array (UArray UVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array)) (meta ((type_ (UArray UVector)) (loc ) (adlevel DataOnly)))) @@ -9472,7 +9437,7 @@ (Assignment (transformed_data_vector_array_2d (UArray (UArray UVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_2d)) (meta ((type_ (UArray (UArray UVector))) (loc ) @@ -9489,7 +9454,7 @@ (transformed_data_vector_array_3d (UArray (UArray (UArray UVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray UVector)))) (loc ) @@ -9505,7 +9470,7 @@ ((pattern (Assignment (transformed_data_row_vector URowVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector)) (meta ((type_ URowVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -9515,7 +9480,7 @@ ((pattern (Assignment (transformed_data_row_vector URowVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector)) (meta ((type_ URowVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -9525,7 +9490,7 @@ ((pattern (Assignment (transformed_data_row_vector_array (UArray URowVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array)) (meta ((type_ (UArray URowVector)) (loc ) (adlevel DataOnly)))) @@ -9536,7 +9501,7 @@ ((pattern (Assignment (transformed_data_row_vector_array (UArray URowVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array)) (meta ((type_ (UArray URowVector)) (loc ) (adlevel DataOnly)))) @@ -9548,7 +9513,7 @@ (Assignment (transformed_data_row_vector_array_2d (UArray (UArray URowVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_2d)) (meta ((type_ (UArray (UArray URowVector))) (loc ) @@ -9563,7 +9528,7 @@ (Assignment (transformed_data_row_vector_array_2d (UArray (UArray URowVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_2d)) (meta ((type_ (UArray (UArray URowVector))) (loc ) @@ -9579,7 +9544,7 @@ (transformed_data_row_vector_array_3d (UArray (UArray (UArray URowVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray URowVector)))) (loc ) @@ -9595,7 +9560,7 @@ (transformed_data_row_vector_array_3d (UArray (UArray (UArray URowVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray URowVector)))) (loc ) @@ -9609,7 +9574,7 @@ ((pattern (Assignment (transformed_data_row_vector URowVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector)) @@ -9619,7 +9584,7 @@ ((pattern (Assignment (transformed_data_row_vector URowVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector)) @@ -9629,7 +9594,7 @@ ((pattern (Assignment (transformed_data_row_vector_array (UArray URowVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array)) @@ -9640,7 +9605,7 @@ ((pattern (Assignment (transformed_data_row_vector_array (UArray URowVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array)) @@ -9652,7 +9617,7 @@ (Assignment (transformed_data_row_vector_array_2d (UArray (UArray URowVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array_2d)) @@ -9667,7 +9632,7 @@ (Assignment (transformed_data_row_vector_array_2d (UArray (UArray URowVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array_2d)) @@ -9683,7 +9648,7 @@ (transformed_data_row_vector_array_3d (UArray (UArray (UArray URowVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array_3d)) @@ -9699,7 +9664,7 @@ (transformed_data_row_vector_array_3d (UArray (UArray (UArray URowVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector_array_3d)) @@ -9713,7 +9678,7 @@ ((pattern (Assignment (transformed_data_row_vector URowVector ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector)) (meta ((type_ URowVector) (loc ) (adlevel DataOnly)))) ((pattern (Var d_row_vector)) @@ -9723,7 +9688,7 @@ ((pattern (Assignment (transformed_data_row_vector_array (UArray URowVector) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array)) (meta ((type_ (UArray URowVector)) (loc ) (adlevel DataOnly)))) @@ -9736,7 +9701,7 @@ (Assignment (transformed_data_row_vector_array_2d (UArray (UArray URowVector)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_2d)) (meta ((type_ (UArray (UArray URowVector))) (loc ) @@ -9754,7 +9719,7 @@ (transformed_data_row_vector_array_3d (UArray (UArray (UArray URowVector))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_row_vector_array_3d)) (meta ((type_ (UArray (UArray (UArray URowVector)))) (loc ) @@ -9770,7 +9735,7 @@ ((pattern (Assignment (transformed_data_matrix UMatrix ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -9780,7 +9745,7 @@ ((pattern (Assignment (transformed_data_matrix UMatrix ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -9790,7 +9755,7 @@ ((pattern (Assignment (transformed_data_matrix_array (UArray UMatrix) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array)) (meta ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly)))) @@ -9801,7 +9766,7 @@ ((pattern (Assignment (transformed_data_matrix_array (UArray UMatrix) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array)) (meta ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly)))) @@ -9813,7 +9778,7 @@ (Assignment (transformed_data_matrix_array_2d (UArray (UArray UMatrix)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_2d)) (meta ((type_ (UArray (UArray UMatrix))) (loc ) @@ -9827,7 +9792,7 @@ (Assignment (transformed_data_matrix_array_2d (UArray (UArray UMatrix)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_2d)) (meta ((type_ (UArray (UArray UMatrix))) (loc ) @@ -9842,7 +9807,7 @@ (transformed_data_matrix_array_3d (UArray (UArray (UArray UMatrix))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_3d)) (meta ((type_ (UArray (UArray (UArray UMatrix)))) (loc ) @@ -9858,7 +9823,7 @@ (transformed_data_matrix_array_3d (UArray (UArray (UArray UMatrix))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_3d)) (meta ((type_ (UArray (UArray (UArray UMatrix)))) (loc ) @@ -9872,7 +9837,7 @@ ((pattern (Assignment (transformed_data_matrix UMatrix ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix)) @@ -9882,7 +9847,7 @@ ((pattern (Assignment (transformed_data_matrix UMatrix ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix)) @@ -9892,7 +9857,7 @@ ((pattern (Assignment (transformed_data_matrix_array (UArray UMatrix) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array)) @@ -9903,7 +9868,7 @@ ((pattern (Assignment (transformed_data_matrix_array (UArray UMatrix) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array)) @@ -9915,7 +9880,7 @@ (Assignment (transformed_data_matrix_array_2d (UArray (UArray UMatrix)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array_2d)) @@ -9929,7 +9894,7 @@ (Assignment (transformed_data_matrix_array_2d (UArray (UArray UMatrix)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array_2d)) @@ -9944,7 +9909,7 @@ (transformed_data_matrix_array_3d (UArray (UArray (UArray UMatrix))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array_3d)) @@ -9960,7 +9925,7 @@ (transformed_data_matrix_array_3d (UArray (UArray (UArray UMatrix))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix_array_3d)) @@ -9974,7 +9939,7 @@ ((pattern (Assignment (transformed_data_matrix UMatrix ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) ((pattern (Var d_matrix)) @@ -9984,7 +9949,7 @@ ((pattern (Assignment (transformed_data_matrix_array (UArray UMatrix) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array)) (meta ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly)))) @@ -9997,7 +9962,7 @@ (Assignment (transformed_data_matrix_array_2d (UArray (UArray UMatrix)) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_2d)) (meta ((type_ (UArray (UArray UMatrix))) (loc ) @@ -10014,7 +9979,7 @@ (transformed_data_matrix_array_3d (UArray (UArray (UArray UMatrix))) ()) ((pattern - (FunApp StanLib EltPow__ + (FunApp (StanLib EltPow__) (((pattern (Var d_matrix_array_3d)) (meta ((type_ (UArray (UArray (UArray UMatrix)))) (loc ) @@ -10030,7 +9995,7 @@ ((pattern (Assignment (td_int UInt ()) ((pattern - (FunApp StanLib EltTimes__ + (FunApp (StanLib EltTimes__) (((pattern (Var d_int)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var d_int)) @@ -10040,7 +10005,7 @@ ((pattern (Assignment (transformed_data_real UReal ()) ((pattern - (FunApp StanLib EltTimes__ + (FunApp (StanLib EltTimes__) (((pattern (Var d_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var d_real)) @@ -10098,12 +10063,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck greater_or_equal)) + (((pattern (Lit Str "td_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -10204,12 +10167,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck less_or_equal)) + (((pattern (Lit Str "td_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -10260,10 +10221,8 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str td_simplex)) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str td_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var td_simplex)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) @@ -10280,10 +10239,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str td_1d_simplex[sym1__])) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str td_1d_simplex[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -10334,12 +10291,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str "td_3d_simplex[sym1__, sym2__, sym3__]")) (meta @@ -10378,25 +10331,21 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str td_cfcov_54)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str td_cfcov_54)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var td_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str td_cfcov_33)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str td_cfcov_33)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var td_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_real_1d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10405,7 +10354,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10414,7 +10363,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -10423,7 +10372,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10432,7 +10381,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10441,7 +10390,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10450,7 +10399,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10459,7 +10408,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10468,7 +10417,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -10477,7 +10426,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10486,7 +10435,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10495,7 +10444,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10504,7 +10453,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10513,7 +10462,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10522,7 +10471,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10531,7 +10480,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -10540,7 +10489,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10549,7 +10498,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10558,7 +10507,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSizeSimplex__ + (NRFunApp (CompilerInternal FnValidateSizeSimplex) (((pattern (Lit Str p_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10567,7 +10516,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10576,7 +10525,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSizeSimplex__ + (NRFunApp (CompilerInternal FnValidateSizeSimplex) (((pattern (Lit Str p_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10585,7 +10534,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10594,7 +10543,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -10603,7 +10552,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10612,7 +10561,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSizeSimplex__ + (NRFunApp (CompilerInternal FnValidateSizeSimplex) (((pattern (Lit Str p_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10621,7 +10570,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp StanLib check_greater_or_equal + (NRFunApp (StanLib check_greater_or_equal) (((pattern (Lit Str "cholesky_factor_cov p_cfcov_54")) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str "num rows (must be greater or equal to num cols)")) @@ -10632,7 +10581,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp StanLib check_greater_or_equal + (NRFunApp (StanLib check_greater_or_equal) (((pattern (Lit Str "cholesky_factor_cov p_cfcov_33")) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str "num rows (must be greater or equal to num cols)")) @@ -10643,7 +10592,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str p_cfcov_33_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10652,7 +10601,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp StanLib check_greater_or_equal + (NRFunApp (StanLib check_greater_or_equal) (((pattern (Lit Str "cholesky_factor_cov p_cfcov_33_ar")) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str "num rows (must be greater or equal to num cols)")) @@ -10663,7 +10612,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_real_1d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10672,7 +10621,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10681,7 +10630,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -10690,7 +10639,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10699,7 +10648,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10708,7 +10657,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10717,7 +10666,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10726,7 +10675,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10735,7 +10684,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -10744,7 +10693,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10753,7 +10702,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10762,7 +10711,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10771,7 +10720,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10780,7 +10729,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10789,7 +10738,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10798,7 +10747,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -10807,7 +10756,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10816,7 +10765,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10825,7 +10774,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10834,7 +10783,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10843,7 +10792,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10852,7 +10801,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10861,7 +10810,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -10870,7 +10819,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10879,7 +10828,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10888,7 +10837,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str tp_cfcov_33_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10897,7 +10846,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_real_1d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10906,7 +10855,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10915,7 +10864,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -10924,7 +10873,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_real_3d_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10933,7 +10882,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10942,7 +10891,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10951,7 +10900,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10960,7 +10909,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10969,7 +10918,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -10978,7 +10927,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -10987,7 +10936,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -10996,7 +10945,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -11005,7 +10954,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -11014,7 +10963,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -11023,7 +10972,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -11032,7 +10981,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -11041,7 +10990,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -11050,7 +10999,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_row_vec)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -11059,7 +11008,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -11068,7 +11017,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -11077,7 +11026,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_1d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -11086,7 +11035,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -11095,7 +11044,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str M)) @@ -11104,7 +11053,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -11113,7 +11062,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_3d_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str N)) @@ -11122,7 +11071,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnValidateSize__ + (NRFunApp (CompilerInternal FnValidateSize) (((pattern (Lit Str gq_cfcov_33_ar)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Str K)) @@ -11137,10 +11086,7 @@ (meta )) ((pattern (Assignment (p_real UReal ()) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + ((pattern (FunApp (CompilerInternal (FnReadParam ())) ())) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern @@ -11150,52 +11096,13 @@ ((pattern (Assignment (p_upper UReal ()) ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (FunApp (CompilerInternal (FnReadParam (lb))) + (((pattern (Var p_real)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var lp__)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) (meta )) - ((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment (p_upper UReal ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_upper)) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var p_real)) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var lp__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment (p_upper UReal ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_upper)) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var p_real)) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_lower) (decl_type (Sized SReal)))) @@ -11203,52 +11110,13 @@ ((pattern (Assignment (p_lower UReal ()) ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (FunApp (CompilerInternal (FnReadParam (ub))) + (((pattern (Var p_upper)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var lp__)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) (meta )) - ((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment (p_lower UReal ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_lower)) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str ub)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var p_upper)) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var lp__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment (p_lower UReal ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_lower)) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str ub)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var p_upper)) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id offset_multiplier) (decl_type @@ -11258,126 +11126,19 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment - (offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str offset_multiplier)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment - (offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str offset_multiplier)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (Assignment (offset_multiplier (UArray UReal) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (offset_multiplier))) + (((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id no_offset_multiplier) @@ -11388,126 +11149,19 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (no_offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment - (no_offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var no_offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str offset_multiplier)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment - (no_offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var no_offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str offset_multiplier)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (Assignment (no_offset_multiplier (UArray UReal) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (offset_multiplier))) + (((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id offset_no_multiplier) @@ -11518,126 +11172,19 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (offset_no_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment - (offset_no_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var offset_no_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str offset_multiplier)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment - (offset_no_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var offset_no_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str offset_multiplier)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (Assignment (offset_no_multiplier (UArray UReal) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (offset_multiplier))) + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_real_1d_ar) @@ -11648,120 +11195,17 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_real_1d_ar (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment - (p_real_1d_ar (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_real_1d_ar)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment - (p_real_1d_ar (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_real_1d_ar)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (Assignment (p_real_1d_ar (UArray UReal) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (lb))) + (((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_real_3d_ar) @@ -11778,252 +11222,24 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_real_3d_ar (UArray (UArray (UArray UReal))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment - (p_real_3d_ar - (UArray (UArray (UArray UReal))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_real_3d_ar)) - (meta - ((type_ - (UArray - (UArray (UArray UReal)))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment - (p_real_3d_ar - (UArray (UArray (UArray UReal))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal - FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_real_3d_ar)) - (meta - ((type_ - (UArray - (UArray (UArray UReal)))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (Assignment (p_real_3d_ar (UArray (UArray (UArray UReal))) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (lb))) + (((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray (UArray (UArray UReal)))) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray (UArray (UArray UReal)))) (loc ) + (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_vec) @@ -12036,103 +11252,14 @@ ((pattern (Assignment (p_vec UVector ()) ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) + (FunApp (CompilerInternal (FnReadParam (lb))) + (((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment - (p_vec UVector - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_vec)) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment - (p_vec UVector - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_vec)) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_1d_vec) @@ -12146,31 +11273,15 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_1d_vec (UArray UVector) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) + (Assignment (p_1d_vec (UArray UVector) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray UVector)) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_3d_vec) @@ -12190,77 +11301,20 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_3d_vec (UArray (UArray (UArray UVector))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Var N)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (Assignment (p_3d_vec (UArray (UArray (UArray UVector))) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray (UArray (UArray UVector)))) (loc ) + (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_row_vec) @@ -12273,12 +11327,10 @@ ((pattern (Assignment (p_row_vec URowVector ()) ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str row_vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var N)) + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta ((type_ URowVector) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_1d_row_vec) @@ -12292,31 +11344,15 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_1d_row_vec (UArray URowVector) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str row_vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) + (Assignment (p_1d_row_vec (UArray URowVector) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray URowVector)) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_3d_row_vec) @@ -12336,78 +11372,20 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_3d_row_vec - (UArray (UArray (UArray URowVector))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str row_vector)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Var N)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (Assignment (p_3d_row_vec (UArray (UArray (UArray URowVector))) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray (UArray (UArray URowVector)))) (loc ) + (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_ar_mat) @@ -12426,311 +11404,28 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_ar_mat (UArray (UArray UMatrix)) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str matrix)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym4__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment - (p_ar_mat - (UArray (UArray UMatrix)) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym4__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal - FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_ar_mat)) - (meta - ((type_ - (UArray - (UArray UMatrix))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym4__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) - (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str lub)) - (meta - ((type_ UReal) - (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment - (p_ar_mat - (UArray (UArray UMatrix)) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym4__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal - FnConstrain__ - (((pattern - (Indexed - ((pattern - (Var p_ar_mat)) - (meta - ((type_ - (UArray - (UArray UMatrix))) - (loc ) - (adlevel - AutoDiffable)))) - ((Single - ((pattern - (Var sym1__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern - (Var sym2__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern - (Var sym3__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))) - (Single - ((pattern - (Var sym4__)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) - (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str lub)) - (meta - ((type_ UReal) - (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) - (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (Assignment (p_ar_mat (UArray (UArray UMatrix)) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (lub))) + (((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray (UArray UMatrix))) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 4)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray (UArray UMatrix))) (loc ) + (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_simplex) @@ -12741,67 +11436,14 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_simplex_in__) - (decl_type - (Sized - (SVector - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Assignment (p_simplex_in__ UVector ()) + (Assignment (p_simplex UVector ()) ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (FunApp (CompilerInternal (FnReadParam (simplex))) + (((pattern (Var lp__)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment (p_simplex UVector ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_simplex_in__)) - (meta - ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment (p_simplex UVector ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_simplex_in__)) - (meta - ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype AutoDiffable) (decl_id p_1d_simplex) @@ -12815,152 +11457,176 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_1d_simplex_in__) + (Assignment (p_1d_simplex (UArray UVector) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (simplex))) + (((pattern (Var lp__)) + (meta + ((type_ (UArray UVector)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray UVector)) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id p_3d_simplex) (decl_type (Sized (SArray - (SVector - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) + (SArray + (SArray + (SVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_1d_simplex_in__ (UArray UVector) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) + (Assignment (p_3d_simplex (UArray (UArray (UArray UVector))) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (simplex))) + (((pattern (Var lp__)) + (meta + ((type_ (UArray (UArray (UArray UVector)))) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray (UArray (UArray UVector)))) (loc ) + (adlevel AutoDiffable)))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment - (p_1d_simplex (UArray UVector) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_1d_simplex_in__)) - (meta - ((type_ (UArray UVector)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment - (p_1d_simplex (UArray UVector) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_1d_simplex_in__)) - (meta - ((type_ (UArray UVector)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_54) + (decl_type + (Sized + (SMatrix + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 4)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_3d_simplex) + (Assignment (p_cfcov_54 UMatrix ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (cholesky_factor_cov))) + (((pattern (Var lp__)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 4)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_33) + (decl_type + (Sized + (SMatrix + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Assignment (p_cfcov_33 UMatrix ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (cholesky_factor_cov))) + (((pattern (Var lp__)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_33_ar) + (decl_type + (Sized + (SArray + (SMatrix + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Assignment (p_cfcov_33_ar (UArray UMatrix) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (cholesky_factor_cov))) + (((pattern (Var lp__)) + (meta + ((type_ (UArray UMatrix)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray UMatrix)) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id x_p) + (decl_type + (Sized + (SVector + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Assignment (x_p UVector ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id y_p) + (decl_type + (Sized + (SVector + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Assignment (y_p UVector ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_real_1d_ar) + (decl_type + (Sized + (SArray SReal + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_real_3d_ar) (decl_type (Sized (SArray (SArray - (SArray - (SVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (SArray SReal ((pattern (Var K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) ((pattern (Var M)) @@ -12969,19 +11635,33 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_3d_simplex_in__) + (Decl (decl_adtype AutoDiffable) (decl_id tp_vec) + (decl_type + (Sized + (SVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_1d_vec) + (decl_type + (Sized + (SArray + (SVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_3d_vec) (decl_type (Sized (SArray (SArray (SArray (SVector - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) ((pattern (Var K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) @@ -12991,252 +11671,274 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower + (Decl (decl_adtype AutoDiffable) (decl_id tp_row_vec) + (decl_type + (Sized + (SRowVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_1d_row_vec) + (decl_type + (Sized + (SArray + (SRowVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_3d_row_vec) + (decl_type + (Sized + (SArray + (SArray + (SArray + (SRowVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_ar_mat) + (decl_type + (Sized + (SArray + (SArray + (SMatrix + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Lit Int 4)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_simplex) + (decl_type + (Sized + (SVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_1d_simplex) + (decl_type + (Sized + (SArray + (SVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_3d_simplex) + (decl_type + (Sized + (SArray + (SArray + (SArray + (SVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_cfcov_54) + (decl_type + (Sized + (SMatrix + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 4)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_cfcov_33) + (decl_type + (Sized + (SMatrix + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_cfcov_33_ar) + (decl_type + (Sized + (SArray + (SMatrix + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id theta_p) + (decl_type + (Sized + (SVector + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tp_real) + (decl_type (Sized SReal)))) + (meta )) + ((pattern + (Assignment (tp_real_1d_ar (UArray UReal) ()) + ((pattern (Var p_real_1d_ar)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (tp_real_3d_ar (UArray (UArray (UArray UReal))) ()) + ((pattern (Var p_real_3d_ar)) + (meta + ((type_ (UArray (UArray (UArray UReal)))) (loc ) + (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (tp_1d_vec (UArray UVector) ()) + ((pattern (Var p_1d_vec)) + (meta + ((type_ (UArray UVector)) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (tp_3d_vec (UArray (UArray (UArray UVector))) ()) + ((pattern (Var p_3d_vec)) + (meta + ((type_ (UArray (UArray (UArray UVector)))) (loc ) + (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (tp_simplex UVector ()) + ((pattern (Var p_simplex)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (tp_1d_simplex (UArray UVector) ()) + ((pattern (Var p_1d_simplex)) + (meta + ((type_ (UArray UVector)) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (tp_3d_simplex (UArray (UArray (UArray UVector))) ()) + ((pattern (Var p_3d_simplex)) + (meta + ((type_ (UArray (UArray (UArray UVector)))) (loc ) + (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (tp_cfcov_54 UMatrix ()) + ((pattern (Var p_cfcov_54)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (tp_cfcov_33 UMatrix ()) + ((pattern (Var p_cfcov_33)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (tp_cfcov_33_ar (UArray UMatrix) ()) + ((pattern (Var p_cfcov_33_ar)) + (meta + ((type_ (UArray UMatrix)) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (For (loopvar i) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar j) + (lower ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper - ((pattern (Var M)) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (body ((pattern (Block (((pattern - (For (loopvar sym3__) + (For (loopvar m) (lower ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper - ((pattern (Var K)) + ((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (body ((pattern (Block (((pattern - (Assignment - (p_3d_simplex_in__ - (UArray (UArray (UArray UVector))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment - (p_3d_simplex - (UArray (UArray (UArray UVector))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern - (Var p_3d_simplex_in__)) - (meta - ((type_ - (UArray - (UArray (UArray UVector)))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern + (For (loopvar n) + (lower + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 5)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (body + ((pattern (Block (((pattern (Assignment - (p_3d_simplex - (UArray (UArray (UArray UVector))) + (tp_ar_mat (UArray (UArray UMatrix)) ((Single - ((pattern (Var sym1__)) + ((pattern (Var m)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (Single - ((pattern (Var sym2__)) + ((pattern (Var n)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (Single - ((pattern (Var sym3__)) + ((pattern (Var i)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var j)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal - FnConstrain__ - (((pattern - (Indexed - ((pattern - (Var p_3d_simplex_in__)) - (meta - ((type_ - (UArray - (UArray (UArray UVector)))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly))))))) + ((pattern (Lit Real 0.4)) (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))))) + ((type_ UReal) (loc ) + (adlevel DataOnly)))))) (meta ))))) (meta ))))) (meta ))))) @@ -13247,387 +11949,272 @@ (meta ))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_54) - (decl_type - (Sized - (SMatrix - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_54_in__) - (decl_type - (Sized - (SVector - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 4)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 4)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) + (For (loopvar i) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (Assignment + (tp_vec UVector + ((Single + ((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Assignment (p_cfcov_54_in__ UMatrix ()) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 4)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 4)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 5)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) + (FunApp (StanLib PMinus__) + (((pattern (Lit Real 1.0)) (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern + (Indexed + ((pattern (Var p_vec)) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var i)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta + ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta ))))) + (meta ))))) (meta )) ((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + (Assignment (tp_row_vec URowVector ()) ((pattern - (Block + (FunApp (StanLib Transpose__) (((pattern - (Assignment (p_cfcov_54 UMatrix ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_cfcov_54_in__)) - (meta - ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment (p_cfcov_54 UMatrix ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_cfcov_54_in__)) - (meta - ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) + (Indexed + ((pattern (Var tp_1d_vec)) + (meta + ((type_ (UArray UVector)) (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ URowVector) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_33) - (decl_type - (Sized - (SMatrix - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (Assignment (tp_1d_row_vec (UArray URowVector) ()) + ((pattern (Var p_1d_row_vec)) + (meta + ((type_ (UArray URowVector)) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_33_in__) - (decl_type - (Sized - (SVector - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (Assignment (tp_3d_row_vec (UArray (UArray (UArray URowVector))) ()) + ((pattern (Var p_3d_row_vec)) + (meta + ((type_ (UArray (UArray (UArray URowVector)))) (loc ) + (adlevel AutoDiffable)))))) (meta )) ((pattern - (Assignment (p_cfcov_33_in__ UMatrix ()) + (Assignment (theta_p UVector ()) ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (FunApp (StanLib algebra_solver) + (((pattern (Var algebra_system)) + (meta + ((type_ + (UFun + ((AutoDiffable UVector) (AutoDiffable UVector) + (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) + (ReturnType UVector))) + (loc ) (adlevel AutoDiffable)))) + ((pattern (Var x)) + (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) + ((pattern (Var y)) + (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) + ((pattern (Var dat)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((pattern (Var dat_int)) + (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (theta_p UVector ()) + ((pattern + (FunApp (StanLib algebra_solver) + (((pattern (Var algebra_system)) + (meta + ((type_ + (UFun + ((AutoDiffable UVector) (AutoDiffable UVector) + (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) + (ReturnType UVector))) + (loc ) (adlevel AutoDiffable)))) + ((pattern (Var x)) + (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) + ((pattern (Var y)) + (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) + ((pattern (Var dat)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((pattern (Var dat_int)) + (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Real 0.01)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Real 0.01)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 10)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + (Assignment (theta_p UVector ()) ((pattern - (Block - (((pattern - (Assignment (p_cfcov_33 UMatrix ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_cfcov_33_in__)) - (meta - ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern - (Block - (((pattern - (Assignment (p_cfcov_33 UMatrix ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_cfcov_33_in__)) - (meta - ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) + (FunApp (StanLib algebra_solver) + (((pattern (Var algebra_system)) + (meta + ((type_ + (UFun + ((AutoDiffable UVector) (AutoDiffable UVector) + (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) + (ReturnType UVector))) + (loc ) (adlevel AutoDiffable)))) + ((pattern (Var x)) + (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) + ((pattern (Var y_p)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var dat)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((pattern (Var dat_int)) + (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Real 0.01)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Real 0.01)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 10)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_33_ar) - (decl_type - (Sized - (SArray - (SMatrix - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (Assignment (theta_p UVector ()) + ((pattern + (FunApp (StanLib algebra_solver) + (((pattern (Var algebra_system)) + (meta + ((type_ + (UFun + ((AutoDiffable UVector) (AutoDiffable UVector) + (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) + (ReturnType UVector))) + (loc ) (adlevel AutoDiffable)))) + ((pattern (Var x_p)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var y)) + (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) + ((pattern (Var dat)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((pattern (Var dat_int)) + (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_33_ar_in__) - (decl_type - (Sized - (SArray - (SVector - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (Assignment (theta_p UVector ()) + ((pattern + (FunApp (StanLib algebra_solver) + (((pattern (Var algebra_system)) + (meta + ((type_ + (UFun + ((AutoDiffable UVector) (AutoDiffable UVector) + (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) + (ReturnType UVector))) + (loc ) (adlevel AutoDiffable)))) + ((pattern (Var x_p)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var y)) + (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) + ((pattern (Var dat)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((pattern (Var dat_int)) + (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Real 0.01)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Real 0.01)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 10)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (theta_p UVector ()) + ((pattern + (FunApp (StanLib algebra_solver) + (((pattern (Var algebra_system)) + (meta + ((type_ + (UFun + ((AutoDiffable UVector) (AutoDiffable UVector) + (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) + (ReturnType UVector))) + (loc ) (adlevel AutoDiffable)))) + ((pattern (Var x_p)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var y_p)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var dat)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((pattern (Var dat_int)) + (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (theta_p UVector ()) + ((pattern + (FunApp (StanLib algebra_solver) + (((pattern (Var algebra_system)) + (meta + ((type_ + (UFun + ((AutoDiffable UVector) (AutoDiffable UVector) + (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) + (ReturnType UVector))) + (loc ) (adlevel AutoDiffable)))) + ((pattern (Var x_p)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var y_p)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var dat)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((pattern (Var dat_int)) + (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Real 0.01)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Real 0.01)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 10)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (tp_real UReal ()) + ((pattern + (FunApp (StanLib EltTimes__) + (((pattern (Var p_real)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var p_real)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Assignment (tp_real UReal ()) + ((pattern + (FunApp (StanLib EltDivide__) + (((pattern (Var p_real)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var p_real)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (For (loopvar sym1__) @@ -13635,81 +12222,27 @@ ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper - ((pattern (Var K)) + ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (body ((pattern (Block (((pattern - (Assignment - (p_cfcov_33_ar_in__ (UArray UMatrix) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str tp_real_1d_ar[sym1__])) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern + (Indexed + ((pattern (Var tp_real_1d_ar)) + (meta + ((type_ (UArray UReal)) (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var sym1__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ))))) (meta ))))) (meta )) @@ -13719,429 +12252,256 @@ ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper - ((pattern (Var K)) + ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (body ((pattern (Block (((pattern - (IfElse - ((pattern (Var jacobian__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Block - (((pattern - (Assignment - (p_cfcov_33_ar (UArray UMatrix) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_cfcov_33_ar_in__)) - (meta - ((type_ (UArray UMatrix)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UMatrix) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str cholesky_factor)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var lp__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UMatrix) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta )) - (((pattern + (For (loopvar sym2__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern (Block (((pattern - (Assignment - (p_cfcov_33_ar (UArray UMatrix) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_cfcov_33_ar_in__)) - (meta - ((type_ (UArray UMatrix)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UMatrix) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Str cholesky_factor)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UMatrix) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) + (For (loopvar sym3__) + (lower + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var K)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (NRFunApp + (CompilerInternal (FnCheck greater_or_equal)) + (((pattern + (Lit Str + "tp_real_3d_ar[sym1__, sym2__, sym3__]")) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))) + ((pattern + (Indexed + ((pattern (Var tp_real_3d_ar)) + (meta + ((type_ (UArray (UArray (UArray UReal)))) + (loc ) (adlevel AutoDiffable)))) + ((Single + ((pattern (Var sym1__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var sym2__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var sym3__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ UReal) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) (meta ))))) (meta ))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id x_p) - (decl_type - (Sized - (SVector - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Assignment (x_p UVector ()) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id y_p) - (decl_type - (Sized - (SVector - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Assignment (y_p UVector ()) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_real_1d_ar) - (decl_type - (Sized - (SArray SReal - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_real_3d_ar) - (decl_type - (Sized - (SArray - (SArray - (SArray SReal - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_vec) - (decl_type - (Sized - (SVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (For (loopvar sym1__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str tp_vec[sym1__])) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern + (Indexed + ((pattern (Var tp_vec)) + (meta + ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((Single + ((pattern (Var sym1__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ))))) + (meta ))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_1d_vec) - (decl_type - (Sized - (SArray - (SVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (For (loopvar sym1__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 4)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar sym2__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar sym3__) + (lower + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 2)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar sym4__) + (lower + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 3)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (NRFunApp + (CompilerInternal + (FnCheck greater_or_equal)) + (((pattern + (Lit Str + "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]")) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))) + ((pattern + (Indexed + ((pattern (Var tp_ar_mat)) + (meta + ((type_ + (UArray (UArray UMatrix))) + (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var sym1__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var sym2__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var sym3__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var sym4__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ UReal) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_3d_vec) - (decl_type - (Sized - (SArray - (SArray - (SArray - (SVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_row_vec) - (decl_type - (Sized - (SRowVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_1d_row_vec) - (decl_type - (Sized - (SArray - (SRowVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_3d_row_vec) - (decl_type - (Sized - (SArray - (SArray - (SArray - (SRowVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_ar_mat) - (decl_type - (Sized - (SArray - (SArray - (SMatrix - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_simplex) - (decl_type - (Sized - (SVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_1d_simplex) - (decl_type - (Sized - (SArray - (SVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_3d_simplex) - (decl_type - (Sized - (SArray - (SArray - (SArray - (SVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_cfcov_54) - (decl_type - (Sized - (SMatrix - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_cfcov_33) - (decl_type - (Sized - (SMatrix - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_cfcov_33_ar) - (decl_type - (Sized - (SArray - (SMatrix - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id theta_p) - (decl_type - (Sized - (SVector - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tp_real) - (decl_type (Sized SReal)))) - (meta )) - ((pattern - (Assignment (tp_real_1d_ar (UArray UReal) ()) - ((pattern (Var p_real_1d_ar)) - (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (tp_real_3d_ar (UArray (UArray (UArray UReal))) ()) - ((pattern (Var p_real_3d_ar)) - (meta - ((type_ (UArray (UArray (UArray UReal)))) (loc ) - (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (tp_1d_vec (UArray UVector) ()) - ((pattern (Var p_1d_vec)) - (meta - ((type_ (UArray UVector)) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (tp_3d_vec (UArray (UArray (UArray UVector))) ()) - ((pattern (Var p_3d_vec)) - (meta - ((type_ (UArray (UArray (UArray UVector)))) (loc ) - (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (tp_simplex UVector ()) - ((pattern (Var p_simplex)) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (tp_1d_simplex (UArray UVector) ()) - ((pattern (Var p_1d_simplex)) - (meta - ((type_ (UArray UVector)) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (tp_3d_simplex (UArray (UArray (UArray UVector))) ()) - ((pattern (Var p_3d_simplex)) - (meta - ((type_ (UArray (UArray (UArray UVector)))) (loc ) - (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (tp_cfcov_54 UMatrix ()) - ((pattern (Var p_cfcov_54)) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (tp_cfcov_33 UMatrix ()) - ((pattern (Var p_cfcov_33)) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (tp_cfcov_33_ar (UArray UMatrix) ()) - ((pattern (Var p_cfcov_33_ar)) - (meta - ((type_ (UArray UMatrix)) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (For (loopvar i) + (For (loopvar sym1__) (lower ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper - ((pattern (Lit Int 2)) + ((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (body ((pattern (Block (((pattern - (For (loopvar j) + (For (loopvar sym2__) (lower ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper - ((pattern (Lit Int 3)) + ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (body ((pattern (Block (((pattern - (For (loopvar m) + (For (loopvar sym3__) (lower ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper - ((pattern (Lit Int 4)) + ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (body ((pattern (Block (((pattern - (For (loopvar n) + (For (loopvar sym4__) (lower ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper - ((pattern (Lit Int 5)) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) @@ -14149,2792 +12509,1172 @@ ((pattern (Block (((pattern - (Assignment - (tp_ar_mat (UArray (UArray UMatrix)) - ((Single - ((pattern (Var m)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var i)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var j)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern (Lit Real 0.4)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar i) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (NRFunApp + (CompilerInternal + (FnCheck less_or_equal)) + (((pattern + (Lit Str + "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]")) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))) + ((pattern + (Indexed + ((pattern (Var tp_ar_mat)) + (meta + ((type_ + (UArray (UArray UMatrix))) + (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var sym1__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var sym2__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var sym3__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var sym4__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ UReal) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta )) + ((pattern + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str tp_simplex)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var tp_simplex)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) + (meta )) + ((pattern + (For (loopvar sym1__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (body ((pattern (Block (((pattern - (Assignment - (tp_vec UVector - ((Single - ((pattern (Var i)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib PMinus__ - (((pattern (Lit Real 1.0)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern - (Indexed - ((pattern (Var p_vec)) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var i)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str tp_1d_simplex[sym1__])) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern + (Indexed + ((pattern (Var tp_1d_simplex)) (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + ((type_ (UArray UVector)) (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var sym1__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta + ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) (meta ))))) (meta ))))) (meta )) ((pattern - (Assignment (tp_row_vec URowVector ()) - ((pattern - (FunApp StanLib Transpose__ - (((pattern - (Indexed - ((pattern (Var tp_1d_vec)) - (meta - ((type_ (UArray UVector)) (loc ) - (adlevel AutoDiffable)))) - ((Single + (For (loopvar sym1__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar sym2__) + (lower ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ URowVector) (loc ) (adlevel AutoDiffable)))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar sym3__) + (lower + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var K)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern + (Lit Str + "tp_3d_simplex[sym1__, sym2__, sym3__]")) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))) + ((pattern + (Indexed + ((pattern (Var tp_3d_simplex)) + (meta + ((type_ + (UArray (UArray (UArray UVector)))) + (loc ) (adlevel AutoDiffable)))) + ((Single + ((pattern (Var sym1__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var sym2__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var sym3__)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable))))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) (meta )) ((pattern - (Assignment (tp_1d_row_vec (UArray URowVector) ()) - ((pattern (Var p_1d_row_vec)) - (meta - ((type_ (UArray URowVector)) (loc ) (adlevel AutoDiffable)))))) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_54)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var tp_cfcov_54)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) (meta )) ((pattern - (Assignment (tp_3d_row_vec (UArray (UArray (UArray URowVector))) ()) - ((pattern (Var p_3d_row_vec)) - (meta - ((type_ (UArray (UArray (UArray URowVector)))) (loc ) - (adlevel AutoDiffable)))))) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_33)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var tp_cfcov_33)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) (meta )) ((pattern - (Assignment (theta_p UVector ()) - ((pattern - (FunApp StanLib algebra_solver - (((pattern (Var algebra_system)) - (meta - ((type_ - (UFun - ((AutoDiffable UVector) (AutoDiffable UVector) - (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) - (ReturnType UVector))) - (loc ) (adlevel AutoDiffable)))) - ((pattern (Var x)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Var y)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Var dat)) - (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) - ((pattern (Var dat_int)) - (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) + (For (loopvar sym1__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_33_ar[sym1__])) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern + (Indexed + ((pattern (Var tp_cfcov_33_ar)) + (meta + ((type_ (UArray UMatrix)) (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var sym1__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta + ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ))))) + (meta ))))) (meta )) ((pattern - (Assignment (theta_p UVector ()) - ((pattern - (FunApp StanLib algebra_solver - (((pattern (Var algebra_system)) - (meta - ((type_ - (UFun - ((AutoDiffable UVector) (AutoDiffable UVector) - (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) - (ReturnType UVector))) - (loc ) (adlevel AutoDiffable)))) - ((pattern (Var x)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Var y)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Var dat)) - (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) - ((pattern (Var dat_int)) - (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Real 0.01)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Real 0.01)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 10)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (theta_p UVector ()) - ((pattern - (FunApp StanLib algebra_solver - (((pattern (Var algebra_system)) - (meta - ((type_ - (UFun - ((AutoDiffable UVector) (AutoDiffable UVector) - (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) - (ReturnType UVector))) - (loc ) (adlevel AutoDiffable)))) - ((pattern (Var x)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Var y_p)) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var dat)) - (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) - ((pattern (Var dat_int)) - (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Real 0.01)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Real 0.01)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 10)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (theta_p UVector ()) - ((pattern - (FunApp StanLib algebra_solver - (((pattern (Var algebra_system)) - (meta - ((type_ - (UFun - ((AutoDiffable UVector) (AutoDiffable UVector) - (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) - (ReturnType UVector))) - (loc ) (adlevel AutoDiffable)))) - ((pattern (Var x_p)) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var y)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Var dat)) - (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) - ((pattern (Var dat_int)) - (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (theta_p UVector ()) - ((pattern - (FunApp StanLib algebra_solver - (((pattern (Var algebra_system)) - (meta - ((type_ - (UFun - ((AutoDiffable UVector) (AutoDiffable UVector) - (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) - (ReturnType UVector))) - (loc ) (adlevel AutoDiffable)))) - ((pattern (Var x_p)) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var y)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Var dat)) - (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) - ((pattern (Var dat_int)) - (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Real 0.01)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Real 0.01)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 10)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (theta_p UVector ()) - ((pattern - (FunApp StanLib algebra_solver - (((pattern (Var algebra_system)) - (meta - ((type_ - (UFun - ((AutoDiffable UVector) (AutoDiffable UVector) - (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) - (ReturnType UVector))) - (loc ) (adlevel AutoDiffable)))) - ((pattern (Var x_p)) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var y_p)) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var dat)) - (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) - ((pattern (Var dat_int)) - (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (theta_p UVector ()) - ((pattern - (FunApp StanLib algebra_solver - (((pattern (Var algebra_system)) - (meta - ((type_ - (UFun - ((AutoDiffable UVector) (AutoDiffable UVector) - (AutoDiffable (UArray UReal)) (AutoDiffable (UArray UInt))) - (ReturnType UVector))) - (loc ) (adlevel AutoDiffable)))) - ((pattern (Var x_p)) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var y_p)) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var dat)) - (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) - ((pattern (Var dat_int)) - (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Real 0.01)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Real 0.01)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 10)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (tp_real UReal ()) - ((pattern - (FunApp StanLib EltTimes__ - (((pattern (Var p_real)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var p_real)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (tp_real UReal ()) - ((pattern - (FunApp StanLib EltDivide__ - (((pattern (Var p_real)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var p_real)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_real_1d_ar[sym1__])) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Indexed - ((pattern (Var tp_real_1d_ar)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern - (Lit Str - "tp_real_3d_ar[sym1__, sym2__, sym3__]")) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern - (Indexed - ((pattern (Var tp_real_3d_ar)) - (meta - ((type_ (UArray (UArray (UArray UReal)))) - (loc ) (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_vec[sym1__])) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Indexed - ((pattern (Var tp_vec)) - (meta - ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym4__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern - (Lit Str - "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]")) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern - (Indexed - ((pattern (Var tp_ar_mat)) - (meta - ((type_ - (UArray (UArray UMatrix))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym4__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym4__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern - (Lit Str - "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]")) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern - (Indexed - ((pattern (Var tp_ar_mat)) - (meta - ((type_ - (UArray (UArray UMatrix))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym4__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_simplex)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var tp_simplex)) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_1d_simplex[sym1__])) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Indexed - ((pattern (Var tp_1d_simplex)) - (meta - ((type_ (UArray UVector)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern - (Lit Str - "tp_3d_simplex[sym1__, sym2__, sym3__]")) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern - (Indexed - ((pattern (Var tp_3d_simplex)) - (meta - ((type_ - (UArray (UArray (UArray UVector)))) - (loc ) (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable))))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_54)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var tp_cfcov_54)) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) - (meta )) - ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_33)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var tp_cfcov_33)) - (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_33_ar[sym1__])) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (Indexed - ((pattern (Var tp_cfcov_33_ar)) - (meta - ((type_ (UArray UMatrix)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta - ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (Block - (((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tmp) - (decl_type - (Sized - (SVector - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id tmp2) - (decl_type - (Sized - (SArray - (SVector - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id r1) - (decl_type (Sized SReal)))) - (meta )) - ((pattern - (Assignment (r1 UReal ()) - ((pattern - (FunApp UserDefined foo_bar1 - (((pattern (Var p_real)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id r2) - (decl_type (Sized SReal)))) - (meta )) - ((pattern - (Assignment (r2 UReal ()) - ((pattern - (FunApp UserDefined foo_bar1 - (((pattern (Var J)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern (Var p_real)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern (Var offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern (Var no_offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern (Var offset_no_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern (Var p_real_1d_ar)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel AutoDiffable))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (For (loopvar n) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern - (Indexed - ((pattern (Var p_1d_vec)) - (meta - ((type_ (UArray UVector)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern - (Indexed - ((pattern (Var p_1d_row_vec)) - (meta - ((type_ (UArray URowVector)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ URowVector) (loc ) - (adlevel AutoDiffable))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern - (Indexed - ((pattern (Var p_1d_simplex)) - (meta - ((type_ (UArray UVector)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (For (loopvar m) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar k) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern - (Indexed - ((pattern (Var p_3d_vec)) - (meta - ((type_ - (UArray - (UArray (UArray UVector)))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var m)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var k)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern - (Indexed - ((pattern (Var d_3d_vec)) - (meta - ((type_ - (UArray - (UArray (UArray UVector)))) - (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var m)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var k)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern - (Indexed - ((pattern (Var p_3d_row_vec)) - (meta - ((type_ - (UArray - (UArray - (UArray URowVector)))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var m)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var k)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ URowVector) - (loc ) - (adlevel AutoDiffable))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern - (Indexed - ((pattern (Var d_3d_row_vec)) - (meta - ((type_ - (UArray - (UArray (UArray URowVector)))) - (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var m)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var k)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ URowVector) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern - (Indexed - ((pattern (Var p_3d_simplex)) - (meta - ((type_ - (UArray - (UArray (UArray UVector)))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var m)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var k)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern - (Indexed - ((pattern (Var d_3d_simplex)) - (meta - ((type_ - (UArray - (UArray (UArray UVector)))) - (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var m)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var k)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (Indexed - ((pattern (Var p_real_3d_ar)) - (meta - ((type_ - (UArray (UArray (UArray UReal)))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var m)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var k)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern - (Indexed - ((pattern (Var p_real_3d_ar)) - (meta - ((type_ - (UArray (UArray (UArray UReal)))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var n)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var m)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var k)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar i) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar j) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern - (Indexed - ((pattern (Var p_ar_mat)) - (meta - ((type_ (UArray (UArray UMatrix))) - (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var i)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var j)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UMatrix) (loc ) - (adlevel AutoDiffable))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar k) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern - (Indexed - ((pattern (Var p_cfcov_33_ar)) - (meta - ((type_ (UArray UMatrix)) (loc ) - (adlevel AutoDiffable)))) - ((Single - ((pattern (Var k)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UMatrix) (loc ) - (adlevel AutoDiffable))))))) - (meta - ((type_ UVector) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern (Var p_vec)) - (meta - ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var d_vec)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern (Var p_row_vec)) - (meta - ((type_ URowVector) (loc ) - (adlevel AutoDiffable))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern (Var p_simplex)) - (meta - ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern (Var p_cfcov_54)) - (meta - ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib normal_lupdf - (((pattern - (FunApp StanLib to_vector - (((pattern (Var p_cfcov_33)) - (meta - ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (TargetPE - ((pattern - (FunApp StanLib map_rect - (((pattern (Var binomialf)) - (meta - ((type_ - (UFun - ((AutoDiffable UVector) (AutoDiffable UVector) - (DataOnly (UArray UReal)) (DataOnly (UArray UInt))) - (ReturnType UVector))) - (loc ) (adlevel AutoDiffable)))) - ((pattern (Var tmp)) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) - ((pattern (Var tmp2)) - (meta - ((type_ (UArray UVector)) (loc ) - (adlevel AutoDiffable)))) - ((pattern (Var x_r)) - (meta - ((type_ (UArray (UArray UReal))) (loc ) - (adlevel DataOnly)))) - ((pattern (Var x_i)) - (meta - ((type_ (UArray (UArray UInt))) (loc ) - (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta )))) - (generate_quantities - (((pattern - (Decl (decl_adtype DataOnly) (decl_id p_real) (decl_type (Sized SReal)))) - (meta )) - ((pattern - (Assignment (p_real UReal ()) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_upper) - (decl_type (Sized SReal)))) - (meta )) - ((pattern - (Assignment (p_upper UReal ()) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (p_upper UReal ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_upper)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var p_real)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_lower) - (decl_type (Sized SReal)))) - (meta )) - ((pattern - (Assignment (p_lower UReal ()) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Assignment (p_lower UReal ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_lower)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str ub)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Var p_upper)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id offset_multiplier) - (decl_type - (Sized - (SArray SReal - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id no_offset_multiplier) - (decl_type - (Sized - (SArray SReal - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (no_offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (no_offset_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var no_offset_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id offset_no_multiplier) - (decl_type - (Sized - (SArray SReal - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (offset_no_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (offset_no_multiplier (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var offset_no_multiplier)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_real_1d_ar) - (decl_type - (Sized - (SArray SReal - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_real_1d_ar (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_real_1d_ar (UArray UReal) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_real_1d_ar)) - (meta - ((type_ (UArray UReal)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_real_3d_ar) - (decl_type - (Sized - (SArray - (SArray - (SArray SReal - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_real_3d_ar (UArray (UArray (UArray UReal))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str scalar)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_real_3d_ar (UArray (UArray (UArray UReal))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_real_3d_ar)) - (meta - ((type_ - (UArray (UArray (UArray UReal)))) - (loc ) (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_vec) - (decl_type - (Sized - (SVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Assignment (p_vec UVector ()) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body + (Block + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id tmp) + (decl_type + (Sized + (SVector + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) ((pattern - (Block - (((pattern - (Assignment - (p_vec UVector - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_vec)) - (meta - ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_1d_vec) - (decl_type - (Sized - (SArray - (SVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body + (Decl (decl_adtype AutoDiffable) (decl_id tmp2) + (decl_type + (Sized + (SArray + (SVector + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) ((pattern - (Block - (((pattern - (Assignment - (p_1d_vec (UArray UVector) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_3d_vec) - (decl_type - (Sized - (SArray - (SArray - (SArray - (SVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body + (Decl (decl_adtype AutoDiffable) (decl_id r1) + (decl_type (Sized SReal)))) + (meta )) ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_3d_vec (UArray (UArray (UArray UVector))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Var N)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_row_vec) - (decl_type - (Sized - (SRowVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Assignment (p_row_vec URowVector ()) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str row_vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_1d_row_vec) - (decl_type - (Sized - (SArray - (SRowVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body + (Assignment (r1 UReal ()) + ((pattern + (FunApp (UserDefined foo_bar1) + (((pattern (Var p_real)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) ((pattern - (Block - (((pattern - (Assignment - (p_1d_row_vec (UArray URowVector) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str row_vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_3d_row_vec) - (decl_type - (Sized - (SArray - (SArray - (SArray - (SRowVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body + (Decl (decl_adtype AutoDiffable) (decl_id r2) + (decl_type (Sized SReal)))) + (meta )) + ((pattern + (Assignment (r2 UReal ()) + ((pattern + (FunApp (UserDefined foo_bar1) + (((pattern (Var J)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern (Var p_real)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern (Var offset_multiplier)) + (meta + ((type_ (UArray UReal)) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern (Var no_offset_multiplier)) + (meta + ((type_ (UArray UReal)) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern (Var offset_no_multiplier)) + (meta + ((type_ (UArray UReal)) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern (Var p_real_1d_ar)) + (meta + ((type_ (UArray UReal)) (loc ) + (adlevel AutoDiffable))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_3d_row_vec - (UArray (UArray (UArray URowVector))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str row_vector)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Var N)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_ar_mat) - (decl_type - (Sized - (SArray - (SArray - (SMatrix - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) + (For (loopvar n) + (lower + ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_ar_mat (UArray (UArray UMatrix)) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str matrix)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) + (upper + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern + (Indexed + ((pattern (Var p_1d_vec)) + (meta + ((type_ (UArray UVector)) (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var n)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) + ((type_ UVector) (loc ) + (adlevel AutoDiffable))))))) (meta - ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body + ((type_ UVector) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym4__) - (lower - ((pattern (Lit Int 1)) + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern + (Indexed + ((pattern (Var p_1d_row_vec)) + (meta + ((type_ (UArray URowVector)) (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var n)) (meta ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (upper - ((pattern (Lit Int 3)) + (adlevel DataOnly)))))))) + (meta + ((type_ URowVector) (loc ) + (adlevel AutoDiffable))))))) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern + (Indexed + ((pattern (Var p_1d_simplex)) + (meta + ((type_ (UArray UVector)) (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var n)) (meta ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_ar_mat (UArray (UArray UMatrix)) - ((Single - ((pattern (Var sym1__)) + (adlevel DataOnly)))))))) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable))))))) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (For (loopvar m) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar k) + (lower + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var K)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern + (Indexed + ((pattern (Var p_3d_vec)) + (meta + ((type_ + (UArray + (UArray (UArray UVector)))) + (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var n)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var m)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var k)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable))))))) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable)))) + ((pattern + (Indexed + ((pattern (Var d_3d_vec)) (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) + ((type_ + (UArray + (UArray (UArray UVector)))) + (loc ) + (adlevel DataOnly)))) + ((Single + ((pattern (Var n)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var m)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var k)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ UVector) (loc ) + (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))))) + (meta + ((type_ UReal) (loc ) + (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern + (Indexed + ((pattern (Var p_3d_row_vec)) + (meta + ((type_ + (UArray + (UArray + (UArray URowVector)))) + (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var n)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var m)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var k)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ URowVector) + (loc ) + (adlevel AutoDiffable))))))) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable)))) + ((pattern + (Indexed + ((pattern (Var d_3d_row_vec)) (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) + ((type_ + (UArray + (UArray (UArray URowVector)))) + (loc ) + (adlevel DataOnly)))) + ((Single + ((pattern (Var n)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var m)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var k)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ URowVector) (loc ) + (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))))) + (meta + ((type_ UReal) (loc ) + (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern + (Indexed + ((pattern (Var p_3d_simplex)) + (meta + ((type_ + (UArray + (UArray (UArray UVector)))) + (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var n)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var m)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var k)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable))))))) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable)))) + ((pattern + (Indexed + ((pattern (Var d_3d_simplex)) (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym4__)) + ((type_ + (UArray + (UArray (UArray UVector)))) + (loc ) + (adlevel DataOnly)))) + ((Single + ((pattern (Var n)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var m)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var k)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ UVector) (loc ) + (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))))) + (meta + ((type_ UReal) (loc ) + (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (Indexed + ((pattern (Var p_real_3d_ar)) (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) + ((type_ + (UArray (UArray (UArray UReal)))) + (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var n)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var m)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var k)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ UReal) (loc ) + (adlevel AutoDiffable)))) ((pattern - (FunApp CompilerInternal - FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_ar_mat)) - (meta - ((type_ - (UArray (UArray UMatrix))) - (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym4__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Str lub)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 0)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) + (Indexed + ((pattern (Var p_real_3d_ar)) + (meta + ((type_ + (UArray (UArray (UArray UReal)))) + (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var n)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var m)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var k)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) (meta ((type_ UReal) (loc ) - (adlevel DataOnly)))))) - (meta ))))) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))))) + (meta + ((type_ UReal) (loc ) + (adlevel AutoDiffable)))))) (meta ))))) (meta ))))) (meta ))))) (meta ))))) (meta ))))) (meta ))))) + (meta )) + ((pattern + (For (loopvar i) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 4)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar j) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern + (Indexed + ((pattern (Var p_ar_mat)) + (meta + ((type_ (UArray (UArray UMatrix))) + (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var i)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))) + (Single + ((pattern (Var j)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ UMatrix) (loc ) + (adlevel AutoDiffable))))))) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly))))))) + (meta + ((type_ UReal) (loc ) + (adlevel AutoDiffable)))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta )) + ((pattern + (For (loopvar k) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern + (Indexed + ((pattern (Var p_cfcov_33_ar)) + (meta + ((type_ (UArray UMatrix)) (loc ) + (adlevel AutoDiffable)))) + ((Single + ((pattern (Var k)) + (meta + ((type_ UInt) (loc ) + (adlevel DataOnly)))))))) + (meta + ((type_ UMatrix) (loc ) + (adlevel AutoDiffable))))))) + (meta + ((type_ UVector) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta ))))) + (meta ))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern (Var p_vec)) + (meta + ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var d_vec)) + (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern (Var p_row_vec)) + (meta + ((type_ URowVector) (loc ) + (adlevel AutoDiffable))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern (Var p_simplex)) + (meta + ((type_ UVector) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern (Var p_cfcov_54)) + (meta + ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib normal_lupdf) + (((pattern + (FunApp (StanLib to_vector) + (((pattern (Var p_cfcov_33)) + (meta + ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (StanLib map_rect) + (((pattern (Var binomialf)) + (meta + ((type_ + (UFun + ((AutoDiffable UVector) (AutoDiffable UVector) + (DataOnly (UArray UReal)) (DataOnly (UArray UInt))) + (ReturnType UVector))) + (loc ) (adlevel AutoDiffable)))) + ((pattern (Var tmp)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var tmp2)) + (meta + ((type_ (UArray UVector)) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Var x_r)) + (meta + ((type_ (UArray (UArray UReal))) (loc ) + (adlevel DataOnly)))) + ((pattern (Var x_i)) + (meta + ((type_ (UArray (UArray UInt))) (loc ) + (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) (meta ))))) + (meta )))) + (generate_quantities + (((pattern + (Decl (decl_adtype DataOnly) (decl_id p_real) (decl_type (Sized SReal)))) (meta )) ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_simplex) + (Assignment (p_real UReal ()) + ((pattern (FunApp (CompilerInternal (FnReadParam ())) ())) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_upper) + (decl_type (Sized SReal)))) + (meta )) + ((pattern + (Assignment (p_upper UReal ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (lb))) + (((pattern (Var p_real)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var lp__)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_lower) + (decl_type (Sized SReal)))) + (meta )) + ((pattern + (Assignment (p_lower UReal ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (ub))) + (((pattern (Var p_upper)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var lp__)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id offset_multiplier) (decl_type (Sized - (SVector - ((pattern (Var N)) + (SArray SReal + ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_simplex_in__) + (Assignment (offset_multiplier (UArray UReal) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (offset_multiplier))) + (((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id no_offset_multiplier) (decl_type (Sized - (SVector - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (SArray SReal + ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Assignment (p_simplex_in__ UVector ()) + (Assignment (no_offset_multiplier (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) + (FunApp (CompilerInternal (FnReadParam (offset_multiplier))) + (((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern - (Assignment (p_simplex UVector ()) + (Decl (decl_adtype DataOnly) (decl_id offset_no_multiplier) + (decl_type + (Sized + (SArray SReal + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Assignment (offset_no_multiplier (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_simplex_in__)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))))) + (FunApp (CompilerInternal (FnReadParam (offset_multiplier))) + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_1d_simplex) + (Decl (decl_adtype DataOnly) (decl_id p_real_1d_ar) (decl_type (Sized - (SArray - (SVector - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (SArray SReal ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_1d_simplex_in__) + (Assignment (p_real_1d_ar (UArray UReal) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (lb))) + (((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_real_3d_ar) (decl_type (Sized (SArray - (SVector - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (SArray + (SArray SReal + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var M)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_1d_simplex_in__ (UArray UVector) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) + (Assignment (p_real_3d_ar (UArray (UArray (UArray UReal))) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (lb))) + (((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray (UArray (UArray UReal)))) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray (UArray (UArray UReal)))) (loc ) + (adlevel AutoDiffable)))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_1d_simplex (UArray UVector) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_1d_simplex_in__)) - (meta - ((type_ (UArray UVector)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) + (Decl (decl_adtype DataOnly) (decl_id p_vec) + (decl_type + (Sized + (SVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Assignment (p_vec UVector ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (lb))) + (((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_1d_vec) + (decl_type + (Sized + (SArray + (SVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_3d_simplex) + (Assignment (p_1d_vec (UArray UVector) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray UVector)) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_3d_vec) (decl_type (Sized (SArray @@ -16951,19 +13691,68 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_3d_simplex_in__) + (Assignment (p_3d_vec (UArray (UArray (UArray UVector))) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray (UArray (UArray UVector)))) (loc ) + (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_row_vec) + (decl_type + (Sized + (SRowVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Assignment (p_row_vec URowVector ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ URowVector) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_1d_row_vec) + (decl_type + (Sized + (SArray + (SRowVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Assignment (p_1d_row_vec (UArray URowVector) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray URowVector)) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_3d_row_vec) (decl_type (Sized (SArray (SArray (SArray - (SVector - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (SRowVector + ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) ((pattern (Var K)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) @@ -16973,310 +13762,162 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_3d_simplex_in__ - (UArray (UArray (UArray UVector))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Var N)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UReal) (loc ) - (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (Assignment (p_3d_row_vec (UArray (UArray (UArray URowVector))) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray (UArray (UArray URowVector)))) (loc ) + (adlevel AutoDiffable)))))) (meta )) ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var N)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym2__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var M)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (For (loopvar sym3__) - (lower - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_3d_simplex - (UArray (UArray (UArray UVector))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_3d_simplex_in__)) - (meta - ((type_ - (UArray (UArray (UArray UVector)))) - (loc ) (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym2__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))) - (Single - ((pattern (Var sym3__)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))))))) - (meta - ((type_ UVector) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UVector) (loc ) - (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) - (meta ))))) + (Decl (decl_adtype DataOnly) (decl_id p_ar_mat) + (decl_type + (Sized + (SArray + (SArray + (SMatrix + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Lit Int 4)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype DataOnly) (decl_id p_cfcov_54) + (Assignment (p_ar_mat (UArray (UArray UMatrix)) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (lub))) + (((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var lp__)) + (meta + ((type_ (UArray (UArray UMatrix))) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Lit Int 4)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray (UArray UMatrix))) (loc ) + (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_simplex) (decl_type (Sized - (SMatrix - ((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) + (SVector + ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_54_in__) + (Assignment (p_simplex UVector ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (simplex))) + (((pattern (Var lp__)) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_1d_simplex) (decl_type (Sized - (SVector - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 4)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 4)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 5)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (SArray + (SVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Assignment (p_cfcov_54_in__ UMatrix ()) + (Assignment (p_1d_simplex (UArray UVector) ()) ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) + (FunApp (CompilerInternal (FnReadParam (simplex))) + (((pattern (Var lp__)) + (meta + ((type_ (UArray UVector)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 4)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 4)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 5)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 4)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + ((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta + ((type_ (UArray UVector)) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_3d_simplex) + (decl_type + (Sized + (SArray + (SArray + (SArray + (SVector + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (meta )) + ((pattern + (Assignment (p_3d_simplex (UArray (UArray (UArray UVector))) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (simplex))) + (((pattern (Var lp__)) + (meta + ((type_ (UArray (UArray (UArray UVector)))) (loc ) + (adlevel AutoDiffable)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var M)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var N)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray (UArray (UArray UVector)))) (loc ) + (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id p_cfcov_54) + (decl_type + (Sized + (SMatrix + ((pattern (Lit Int 5)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 4)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern (Assignment (p_cfcov_54 UMatrix ()) ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_cfcov_54_in__)) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + (FunApp (CompilerInternal (FnReadParam (cholesky_factor_cov))) + (((pattern (Var lp__)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) ((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_cfcov_33) @@ -17288,123 +13929,17 @@ ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) - ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_33_in__) - (decl_type - (Sized - (SVector - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (Assignment (p_cfcov_33_in__ UMatrix ()) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta )) ((pattern (Assignment (p_cfcov_33 UMatrix ()) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern (Var p_cfcov_33_in__)) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern + (FunApp (CompilerInternal (FnReadParam (cholesky_factor_cov))) + (((pattern (Var lp__)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id p_cfcov_33_ar) @@ -17420,184 +13955,20 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) (meta )) ((pattern - (Decl (decl_adtype AutoDiffable) (decl_id p_cfcov_33_ar_in__) - (decl_type - (Sized - (SArray - (SVector - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_cfcov_33_ar_in__ (UArray UMatrix) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Plus__ - (((pattern - (FunApp StanLib Divide__ - (((pattern - (FunApp StanLib Times__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 1)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 2)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern - (FunApp StanLib Times__ - (((pattern - (FunApp StanLib Minus__ - (((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) - (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) - (meta ))))) - (meta ))))) - (meta )) - ((pattern - (For (loopvar sym1__) - (lower - ((pattern (Lit Int 1)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (upper - ((pattern (Var K)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) - (body - ((pattern - (Block - (((pattern - (Assignment - (p_cfcov_33_ar (UArray UMatrix) - ((Single - ((pattern (Var sym1__)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - ((pattern - (FunApp CompilerInternal FnConstrain__ - (((pattern - (Indexed - ((pattern (Var p_cfcov_33_ar_in__)) - (meta - ((type_ (UArray UMatrix)) (loc ) - (adlevel DataOnly)))) - ((Single - ((pattern (Var sym1__)) - (meta - ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 3)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) - (meta ))))) - (meta ))))) + (Assignment (p_cfcov_33_ar (UArray UMatrix) ()) + ((pattern + (FunApp (CompilerInternal (FnReadParam (cholesky_factor_cov))) + (((pattern (Var lp__)) + (meta + ((type_ (UArray UMatrix)) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var K)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray UMatrix)) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id x_p) @@ -17610,12 +13981,10 @@ ((pattern (Assignment (x_p UVector ()) ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id y_p) @@ -17628,12 +13997,10 @@ ((pattern (Assignment (y_p UVector ()) ((pattern - (FunApp CompilerInternal FnReadParam__ - (((pattern (Lit Str vector)) - (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Int 2)) + (FunApp (CompilerInternal (FnReadParam ())) + (((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))))) + (meta ((type_ UVector) (loc ) (adlevel AutoDiffable)))))) (meta )) ((pattern (Decl (decl_adtype DataOnly) (decl_id tp_real_1d_ar) @@ -17827,17 +14194,17 @@ (decl_type (Sized SReal)))) (meta )) ((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Var p_upper)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Var p_lower)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) @@ -17853,7 +14220,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var offset_multiplier)) @@ -17879,7 +14246,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var no_offset_multiplier)) @@ -17905,7 +14272,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var offset_no_multiplier)) @@ -17931,7 +14298,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_real_1d_ar)) @@ -17981,7 +14348,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_real_3d_ar)) @@ -18025,7 +14392,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_vec)) @@ -18060,7 +14427,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_1d_vec)) @@ -18135,8 +14502,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_3d_vec)) @@ -18190,7 +14557,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_row_vec)) @@ -18226,7 +14593,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_1d_row_vec)) @@ -18301,8 +14668,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_3d_row_vec)) @@ -18395,8 +14762,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_ar_mat)) @@ -18449,7 +14816,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_simplex)) @@ -18484,7 +14851,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_1d_simplex)) @@ -18559,8 +14926,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_3d_simplex)) @@ -18625,7 +14992,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_cfcov_54)) @@ -18672,7 +15039,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_cfcov_33)) @@ -18732,7 +15099,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_cfcov_33_ar)) @@ -18776,7 +15143,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var x_p)) @@ -18800,7 +15167,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var y_p)) @@ -18815,7 +15182,7 @@ ((pattern (IfElse ((pattern - (FunApp StanLib PNot__ + (FunApp (StanLib PNot__) (((pattern (EOr ((pattern (Var emit_transformed_parameters__)) @@ -18991,9 +15358,9 @@ ((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Lit Real 1.0)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) @@ -19017,7 +15384,7 @@ ((pattern (Assignment (tp_row_vec URowVector ()) ((pattern - (FunApp StanLib Transpose__ + (FunApp (StanLib Transpose__) (((pattern (Indexed ((pattern (Var tp_1d_vec)) @@ -19046,7 +15413,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -19068,7 +15435,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -19096,7 +15463,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -19124,7 +15491,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -19146,7 +15513,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -19174,7 +15541,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -19196,7 +15563,7 @@ ((pattern (Assignment (theta_p UVector ()) ((pattern - (FunApp StanLib algebra_solver + (FunApp (StanLib algebra_solver) (((pattern (Var algebra_system)) (meta ((type_ @@ -19224,7 +15591,7 @@ ((pattern (Assignment (tp_real UReal ()) ((pattern - (FunApp StanLib EltTimes__ + (FunApp (StanLib EltTimes__) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var p_real)) @@ -19234,7 +15601,7 @@ ((pattern (Assignment (tp_real UReal ()) ((pattern - (FunApp StanLib EltDivide__ + (FunApp (StanLib EltDivide__) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) ((pattern (Var p_real)) @@ -19253,10 +15620,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_real_1d_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str tp_real_1d_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -19309,12 +15674,9 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str "tp_real_3d_ar[sym1__, sym2__, sym3__]")) (meta @@ -19367,10 +15729,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_vec[sym1__])) + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str tp_vec[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -19436,12 +15796,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck greater_or_equal)) + (((pattern (Lit Str "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -19542,12 +15900,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck less_or_equal)) + (((pattern (Lit Str "tp_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -19598,10 +15954,8 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_simplex)) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str tp_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var tp_simplex)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) @@ -19618,10 +15972,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_1d_simplex[sym1__])) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str tp_1d_simplex[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -19672,12 +16024,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str "tp_3d_simplex[sym1__, sym2__, sym3__]")) (meta @@ -19716,19 +16064,15 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_54)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_54)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var tp_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_33)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_33)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var tp_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) @@ -19745,10 +16089,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str tp_cfcov_33_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str tp_cfcov_33_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -19781,7 +16123,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_real_1d_ar)) @@ -19837,7 +16179,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_real_3d_ar)) @@ -19883,7 +16225,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_vec)) @@ -19924,7 +16266,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_1d_vec)) @@ -20004,8 +16346,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_3d_vec)) @@ -20064,7 +16406,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_row_vec)) @@ -20105,7 +16447,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_1d_row_vec)) @@ -20185,8 +16527,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern @@ -20289,8 +16631,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_ar_mat)) @@ -20348,7 +16690,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_simplex)) @@ -20389,7 +16731,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_1d_simplex)) @@ -20469,8 +16811,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern @@ -20543,7 +16885,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_cfcov_54)) @@ -20593,7 +16935,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_cfcov_33)) @@ -20658,7 +17000,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var tp_cfcov_33_ar)) @@ -20703,7 +17045,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var theta_p)) @@ -20720,7 +17062,7 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Var tp_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ))))) @@ -20730,7 +17072,7 @@ ((pattern (IfElse ((pattern - (FunApp StanLib PNot__ + (FunApp (StanLib PNot__) (((pattern (Var emit_generated_quantities__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -20744,7 +17086,7 @@ ((pattern (Assignment (gq_r1 UReal ()) ((pattern - (FunApp UserDefined foo_bar1 + (FunApp (UserDefined foo_bar1) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -20755,7 +17097,7 @@ ((pattern (Assignment (gq_r2 UReal ()) ((pattern - (FunApp UserDefined foo_bar1 + (FunApp (UserDefined foo_bar1) (((pattern (Var J)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -20950,7 +17292,7 @@ ((pattern (Assignment (indices (UArray UInt) ()) ((pattern - (FunApp CompilerInternal FnMakeArray__ + (FunApp (CompilerInternal FnMakeArray) (((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -21267,9 +17609,9 @@ ((pattern (Var i)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib PMinus__ + (FunApp (StanLib PMinus__) (((pattern (Lit Real 1.0)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) @@ -21342,7 +17684,7 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp StanLib normal_rng + (FunApp (StanLib normal_rng) (((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) @@ -21368,7 +17710,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib size + (FunApp (StanLib size) (((pattern (Var indices)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) @@ -21382,7 +17724,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib size + (FunApp (StanLib size) (((pattern (Var indices)) (meta ((type_ (UArray UInt)) (loc ) @@ -21461,7 +17803,7 @@ ((pattern (IfElse ((pattern - (FunApp StanLib NEquals__ + (FunApp (StanLib NEquals__) (((pattern (Indexed ((pattern @@ -21509,7 +17851,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "indexing test 1 failed")) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ))))) @@ -21534,7 +17876,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib size + (FunApp (StanLib size) (((pattern (Var indices)) (meta ((type_ (UArray UInt)) (loc ) @@ -21601,7 +17943,7 @@ ((pattern (IfElse ((pattern - (FunApp StanLib NEquals__ + (FunApp (StanLib NEquals__) (((pattern (Indexed ((pattern @@ -21646,7 +17988,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "indexing test 2 failed")) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ))))) @@ -21660,7 +18002,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib size + (FunApp (StanLib size) (((pattern (Var indices)) (meta ((type_ (UArray UInt)) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) @@ -21686,7 +18028,7 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib size + (FunApp (StanLib size) (((pattern (Var indices)) (meta ((type_ (UArray UInt)) (loc ) @@ -21783,7 +18125,7 @@ ((pattern (IfElse ((pattern - (FunApp StanLib NEquals__ + (FunApp (StanLib NEquals__) (((pattern (Indexed ((pattern @@ -21832,7 +18174,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnReject__ + (NRFunApp (CompilerInternal FnReject) (((pattern (Lit Str "indexing test 3 failed")) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ))))) @@ -21887,10 +18229,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_real_1d_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str gq_real_1d_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -21943,12 +18283,9 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal (FnCheck greater_or_equal)) + (((pattern (Lit Str "gq_real_3d_ar[sym1__, sym2__, sym3__]")) (meta @@ -22001,10 +18338,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_vec[sym1__])) + (NRFunApp (CompilerInternal (FnCheck less_or_equal)) + (((pattern (Lit Str gq_vec[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -22070,12 +18405,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str greater_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck greater_or_equal)) + (((pattern (Lit Str "gq_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -22176,12 +18509,10 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str less_or_equal)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp + (CompilerInternal + (FnCheck less_or_equal)) + (((pattern (Lit Str "gq_ar_mat[sym1__, sym2__, sym3__, sym4__]")) (meta @@ -22232,10 +18563,8 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_simplex)) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str gq_simplex)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var gq_simplex)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) @@ -22252,10 +18581,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_1d_simplex[sym1__])) + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str gq_1d_simplex[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -22306,12 +18633,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) - ((pattern + (NRFunApp (CompilerInternal (FnCheck simplex)) + (((pattern (Lit Str "gq_3d_simplex[sym1__, sym2__, sym3__]")) (meta @@ -22350,19 +18673,15 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_cfcov_54)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str gq_cfcov_54)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var gq_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_cfcov_33)) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str gq_cfcov_33)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Var gq_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) @@ -22379,10 +18698,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnCheck__ - (((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str gq_cfcov_33_ar[sym1__])) + (NRFunApp (CompilerInternal (FnCheck cholesky_factor)) + (((pattern (Lit Str gq_cfcov_33_ar[sym1__])) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Indexed @@ -22398,12 +18715,12 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Var gq_r1)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Var gq_r2)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) @@ -22419,7 +18736,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_real_1d_ar)) @@ -22469,7 +18786,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_real_3d_ar)) @@ -22513,7 +18830,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_vec)) @@ -22548,7 +18865,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_1d_vec)) @@ -22623,8 +18940,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_3d_vec)) @@ -22678,7 +18995,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_row_vec)) @@ -22714,7 +19031,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_1d_row_vec)) @@ -22789,8 +19106,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_3d_row_vec)) @@ -22883,8 +19200,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_ar_mat)) @@ -22937,7 +19254,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_simplex)) @@ -22972,7 +19289,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_1d_simplex)) @@ -23047,8 +19364,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_3d_simplex)) @@ -23113,7 +19430,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_cfcov_54)) @@ -23160,7 +19477,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_cfcov_33)) @@ -23220,7 +19537,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var gq_cfcov_33_ar)) @@ -23264,7 +19581,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var indices)) @@ -23313,7 +19630,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var indexing_mat)) @@ -23381,7 +19698,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var idx_res1)) @@ -23449,7 +19766,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var idx_res2)) @@ -23517,7 +19834,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var idx_res3)) @@ -23585,7 +19902,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var idx_res11)) @@ -23653,7 +19970,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var idx_res21)) @@ -23721,7 +20038,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var idx_res31)) @@ -23776,7 +20093,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var idx_res4)) @@ -23823,7 +20140,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var idx_res5)) @@ -23864,7 +20181,7 @@ ((pattern (Indexed ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) @@ -23882,7 +20199,7 @@ ((pattern (Indexed ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_upper)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) @@ -23898,11 +20215,9 @@ ((pattern (Assignment (p_upper_free__ UReal ()) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain lb)) (((pattern (Var p_upper)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -23916,7 +20231,7 @@ ((pattern (Indexed ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_lower)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) @@ -23932,11 +20247,9 @@ ((pattern (Assignment (p_lower_free__ UReal ()) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain ub)) (((pattern (Var p_lower)) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str ub)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Var p_upper)) (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -23952,7 +20265,7 @@ ((pattern (Assignment (offset_multiplier (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str offset_multiplier)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -23983,7 +20296,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain offset_multiplier)) (((pattern (Indexed ((pattern (Var offset_multiplier)) @@ -23995,8 +20308,6 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 2)) @@ -24016,7 +20327,7 @@ ((pattern (Assignment (no_offset_multiplier (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str no_offset_multiplier)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -24047,7 +20358,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain offset_multiplier)) (((pattern (Indexed ((pattern (Var no_offset_multiplier)) @@ -24059,8 +20370,6 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 2)) @@ -24080,7 +20389,7 @@ ((pattern (Assignment (offset_no_multiplier (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str offset_no_multiplier)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -24111,7 +20420,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain offset_multiplier)) (((pattern (Indexed ((pattern (Var offset_no_multiplier)) @@ -24123,8 +20432,6 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str offset_multiplier)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -24144,7 +20451,7 @@ ((pattern (Assignment (p_real_1d_ar (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_real_1d_ar)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -24175,7 +20482,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain lb)) (((pattern (Indexed ((pattern (Var p_real_1d_ar)) @@ -24187,8 +20494,6 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -24218,7 +20523,7 @@ ((pattern (Assignment (p_real_3d_ar_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_real_3d_ar)) (meta ((type_ (UArray (UArray (UArray UReal)))) (loc ) @@ -24302,7 +20607,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -24391,7 +20696,7 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain lb)) (((pattern (Indexed ((pattern (Var p_real_3d_ar)) @@ -24417,10 +20722,6 @@ (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) ((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) @@ -24452,7 +20753,7 @@ ((pattern (Assignment (p_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_vec)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -24494,7 +20795,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -24532,7 +20833,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain lb)) (((pattern (Indexed ((pattern (Var p_vec)) @@ -24543,8 +20844,6 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lb)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) @@ -24571,7 +20870,7 @@ ((pattern (Assignment (p_1d_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_1d_vec)) (meta ((type_ (UArray UVector)) (loc ) (adlevel DataOnly))))))) @@ -24634,7 +20933,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -24677,7 +20976,7 @@ ((pattern (Assignment (p_3d_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_3d_vec)) (meta ((type_ (UArray (UArray (UArray UVector)))) (loc ) @@ -24782,7 +21081,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -24821,7 +21120,7 @@ ((pattern (Assignment (p_row_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_row_vec)) (meta ((type_ URowVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -24863,7 +21162,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -24895,7 +21194,7 @@ ((pattern (Assignment (p_1d_row_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_1d_row_vec)) (meta ((type_ (UArray URowVector)) (loc ) @@ -24959,7 +21258,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -25002,7 +21301,7 @@ ((pattern (Assignment (p_3d_row_vec_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_3d_row_vec)) (meta ((type_ (UArray (UArray (UArray URowVector)))) (loc ) @@ -25109,7 +21408,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -25156,7 +21455,7 @@ ((pattern (Assignment (p_ar_mat_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_ar_mat)) (meta ((type_ (UArray (UArray UMatrix))) (loc ) @@ -25260,7 +21559,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -25373,8 +21672,9 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal - FnUnconstrain__ + (FunApp + (CompilerInternal + (FnUnconstrain lub)) (((pattern (Indexed ((pattern (Var p_ar_mat)) @@ -25406,10 +21706,6 @@ (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str lub)) - (meta - ((type_ UReal) (loc ) - (adlevel DataOnly)))) ((pattern (Lit Int 0)) (meta ((type_ UInt) (loc ) @@ -25447,7 +21743,7 @@ ((pattern (Assignment (p_simplex_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_simplex)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -25489,7 +21785,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -25507,7 +21803,7 @@ (Sized (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -25517,11 +21813,9 @@ ((pattern (Assignment (p_simplex_free__ UVector ()) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain simplex)) (((pattern (Var p_simplex)) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ UVector) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern @@ -25544,7 +21838,7 @@ ((pattern (Assignment (p_1d_simplex_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_1d_simplex)) (meta ((type_ (UArray UVector)) (loc ) (adlevel DataOnly))))))) @@ -25607,7 +21901,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -25631,7 +21925,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -25658,7 +21952,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain simplex)) (((pattern (Indexed ((pattern (Var p_1d_simplex)) @@ -25669,9 +21963,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UVector) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ UVector) (loc ) (adlevel DataOnly)))))) (meta ))))) (meta ))))) @@ -25702,7 +21994,7 @@ ((pattern (Assignment (p_3d_simplex_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_3d_simplex)) (meta ((type_ (UArray (UArray (UArray UVector)))) (loc ) @@ -25808,7 +22100,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -25839,7 +22131,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -25907,7 +22199,8 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp + (CompilerInternal (FnUnconstrain simplex)) (((pattern (Indexed ((pattern (Var p_3d_simplex)) @@ -25932,10 +22225,6 @@ (adlevel DataOnly)))))))) (meta ((type_ UVector) (loc ) - (adlevel DataOnly)))) - ((pattern (Lit Str simplex)) - (meta - ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta ((type_ UVector) (loc ) @@ -25966,7 +22255,7 @@ ((pattern (Assignment (p_cfcov_54_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_cfcov_54)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -26028,7 +22317,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -26051,18 +22340,18 @@ (Sized (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) @@ -26081,9 +22370,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 4)) @@ -26097,11 +22386,9 @@ ((pattern (Assignment (p_cfcov_54_free__ UVector ()) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain cholesky_factor)) (((pattern (Var p_cfcov_54)) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern @@ -26123,7 +22410,7 @@ ((pattern (Assignment (p_cfcov_33_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_cfcov_33)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -26185,7 +22472,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -26208,18 +22495,18 @@ (Sized (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) @@ -26238,9 +22525,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -26254,11 +22541,9 @@ ((pattern (Assignment (p_cfcov_33_free__ UVector ()) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain cholesky_factor)) (((pattern (Var p_cfcov_33)) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) (meta )) ((pattern @@ -26283,7 +22568,7 @@ ((pattern (Assignment (p_cfcov_33_ar_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str p_cfcov_33_ar)) (meta ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly))))))) @@ -26365,7 +22650,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) @@ -26392,18 +22677,18 @@ (SArray (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) @@ -26424,9 +22709,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -26459,7 +22744,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) ((pattern - (FunApp CompilerInternal FnUnconstrain__ + (FunApp (CompilerInternal (FnUnconstrain cholesky_factor)) (((pattern (Indexed ((pattern (Var p_cfcov_33_ar)) @@ -26470,9 +22755,7 @@ ((pattern (Var sym1__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) - (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) - ((pattern (Lit Str cholesky_factor)) - (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))))) (meta ))))) (meta ))))) @@ -26494,7 +22777,7 @@ ((pattern (Assignment (x_p_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str x_p)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -26536,7 +22819,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -26565,7 +22848,7 @@ ((pattern (Assignment (y_p_flat__ (UArray UReal) ()) ((pattern - (FunApp CompilerInternal FnReadData__ + (FunApp (CompilerInternal FnReadData) (((pattern (Lit Str y_p)) (meta ((type_ UVector) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) @@ -26607,7 +22890,7 @@ ((pattern (Assignment (pos__ UInt ()) ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern (Var pos__)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -26620,17 +22903,17 @@ (meta ))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Var p_real)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Var p_upper_free__)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) ((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Var p_lower_free__)) (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) (meta )) @@ -26646,7 +22929,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var offset_multiplier_free__)) @@ -26672,7 +22955,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var no_offset_multiplier_free__)) @@ -26698,7 +22981,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var offset_no_multiplier_free__)) @@ -26724,7 +23007,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_real_1d_ar_free__)) @@ -26774,7 +23057,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_real_3d_ar_free__)) @@ -26818,7 +23101,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_vec_free__)) @@ -26853,7 +23136,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_1d_vec)) @@ -26928,8 +23211,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_3d_vec)) @@ -26983,7 +23266,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_row_vec)) @@ -27019,7 +23302,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_1d_row_vec)) @@ -27094,8 +23377,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_3d_row_vec)) @@ -27188,8 +23471,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_ar_mat_free__)) @@ -27237,7 +23520,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -27247,7 +23530,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_simplex_free__)) @@ -27277,7 +23560,7 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -27287,7 +23570,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_1d_simplex_free__)) @@ -27355,7 +23638,7 @@ (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) @@ -27371,8 +23654,8 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal - FnWriteParam__ + (NRFunApp + (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern @@ -27422,18 +23705,18 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -27450,9 +23733,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 4)) @@ -27466,7 +23749,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_cfcov_54_free__)) @@ -27485,18 +23768,18 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -27513,9 +23796,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -27529,7 +23812,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_cfcov_33_free__)) @@ -27559,19 +23842,19 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) (upper ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) @@ -27595,9 +23878,9 @@ ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -27615,7 +23898,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var p_cfcov_33_ar_free__)) @@ -27651,7 +23934,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var x_p)) @@ -27675,7 +23958,7 @@ ((pattern (Block (((pattern - (NRFunApp CompilerInternal FnWriteParam__ + (NRFunApp (CompilerInternal FnWriteParam) (((pattern (Indexed ((pattern (Var y_p)) @@ -27937,7 +24220,7 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -27953,7 +24236,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -27976,7 +24259,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -28006,18 +24289,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -28034,9 +24317,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 4)) @@ -28057,18 +24340,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -28085,9 +24368,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -28109,18 +24392,18 @@ (SArray (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) @@ -28139,9 +24422,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -28371,7 +24654,7 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -28387,7 +24670,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -28410,7 +24693,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -28440,18 +24723,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -28468,9 +24751,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 4)) @@ -28491,18 +24774,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -28519,9 +24802,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -28543,18 +24826,18 @@ (SArray (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) @@ -28573,9 +24856,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -28804,7 +25087,7 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -28820,7 +25103,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -28843,7 +25126,7 @@ (SArray (SVector ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Var N)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 1)) @@ -28873,18 +25156,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 4)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -28901,9 +25184,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 5)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 4)) @@ -28924,18 +25207,18 @@ ((out_unconstrained_st (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -28952,9 +25235,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3)) @@ -28976,18 +25259,18 @@ (SArray (SVector ((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Plus__ + (FunApp (StanLib Plus__) (((pattern - (FunApp StanLib Divide__ + (FunApp (StanLib Divide__) (((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) @@ -29006,9 +25289,9 @@ (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern - (FunApp StanLib Times__ + (FunApp (StanLib Times__) (((pattern - (FunApp StanLib Minus__ + (FunApp (StanLib Minus__) (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 3))