Stan  2.14.0
probability, sampling & optimization
semantic_actions.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_GRAMMARS_SEMANTIC_ACTIONS_HPP
2 #define STAN_LANG_GRAMMARS_SEMANTIC_ACTIONS_HPP
3 
4 #include <stan/lang/ast.hpp>
6 #include <boost/variant/recursive_variant.hpp>
7 #include <boost/spirit/include/qi.hpp>
8 #include <map>
9 #include <set>
10 #include <string>
11 #include <utility>
12 #include <vector>
13 
14 namespace stan {
15 
16  namespace lang {
17 
18  bool has_prob_suffix(const std::string& s);
19 
20  void replace_suffix(const std::string& old_suffix,
21  const std::string& new_suffix, fun& f);
22 
23  void set_fun_type(fun& fun, std::ostream& error_msgs);
24 
25  int num_dimss(std::vector<std::vector<stan::lang::expression> >& dimss);
26 
36  template <class> struct result;
37 
42  template <typename F, typename T1>
43  struct result<F(T1)> { typedef void type; };
44  };
45 
55  template <class> struct result;
56 
61  template <typename F, typename T1, typename T2>
62  struct result<F(T1, T2)> { typedef void type; };
63  };
64 
74  template <class> struct result;
75 
80  template <typename F, typename T1, typename T2, typename T3>
81  struct result<F(T1, T2, T3)> { typedef void type; };
82  };
83 
93  template <class> struct result;
94 
99  template <typename F, typename T1, typename T2, typename T3, typename T4>
100  struct result<F(T1, T2, T3, T4)> { typedef void type; };
101  };
102 
112  template <class> struct result;
113 
118  template <typename F, typename T1, typename T2, typename T3,
119  typename T4, typename T5>
120  struct result<F(T1, T2, T3, T4, T5)> { typedef void type; };
121  };
122 
132  template <class> struct result;
133 
138  template <typename F, typename T1, typename T2, typename T3,
139  typename T4, typename T5, typename T6>
140  struct result<F(T1, T2, T3, T4, T5, T6)> { typedef void type; };
141  };
142 
152  template <class> struct result;
153 
158  template <typename F, typename T1, typename T2, typename T3,
159  typename T4, typename T5, typename T6, typename T7>
160  struct result<F(T1, T2, T3, T4, T5, T6, T7)> { typedef void type; };
161  };
162 
163 
165  template <typename L, typename R>
166  void operator()(L& lhs, const R& rhs) const;
167  };
168  extern boost::phoenix::function<assign_lhs> assign_lhs_f;
169 
170 
171  // called from: expression07_grammar
173  void operator()(const expression& expr, bool& pass,
174  std::ostream& error_msgs) const;
175  };
176  extern boost::phoenix::function<validate_expr_type3> validate_expr_type3_f;
177 
178  // called from: term_grammar
180  void operator()(const std::string& s,
181  bool& pass) const;
182  };
183  extern boost::phoenix::function<is_prob_fun> is_prob_fun_f;
184 
185  // called from: expression07_grammar
187  void operator()(expression& expr1, const expression& expr2,
188  std::ostream& error_msgs) const;
189  };
190  extern boost::phoenix::function<addition_expr3> addition3_f;
191 
192  // called from: expression07_grammar
194  void operator()(expression& expr1, const expression& expr2,
195  std::ostream& error_msgs) const;
196  };
197  extern boost::phoenix::function<subtraction_expr3> subtraction3_f;
198 
199  // called from bare_type_grammar
201  void operator()(size_t& lhs) const;
202  };
203  extern boost::phoenix::function<increment_size_t> increment_size_t_f;
204 
205 
206  // called from: expression_grammar
208  void operator()(conditional_op& cond_expr,
209  const var_origin& var_origin,
210  bool& pass,
211  const variable_map& var_map,
212  std::ostream& error_msgs) const;
213  };
214  extern boost::phoenix::function<validate_conditional_op>
216 
217 
218  // called from: expression_grammar
220  void operator()(expression& expr1, const expression& expr2,
221  const std::string& op, const std::string& fun_name,
222  std::ostream& error_msgs) const;
223  };
224  extern boost::phoenix::function<binary_op_expr> binary_op_f;
225 
226  // called from: functions_grammar
228  void operator()(const expr_type& arg_type,
229  bool& pass,
230  std::ostream& error_msgs) const;
231  };
232  extern boost::phoenix::function<validate_non_void_arg_function>
234 
235  // called from: functions_grammar
237  void operator()(const expr_type& return_type, var_origin& origin,
238  bool& pass, std::ostream& error_msgs) const;
239  };
240  extern boost::phoenix::function<set_void_function> set_void_function_f;
241 
242  // called from: functions_grammar
244  void operator()(const std::string& identifier, bool& allow_sampling,
245  int& origin) const;
246  };
247  extern boost::phoenix::function<set_allows_sampling_origin>
249 
250  // called from: functions_grammar
252  void operator()(bool& pass,
253  std::set<std::pair<std::string,
254  function_signature_t> >& declared,
255  std::set<std::pair<std::string,
256  function_signature_t> >& defined,
257  std::ostream& error_msgs,
258  bool allow_undefined) const;
259  };
260  extern boost::phoenix::function<validate_declarations>
262 
263  // called from: functions_grammar
265  void operator()(const function_decl_def& decl,
266  bool& pass,
267  std::set<std::pair<std::string,
268  function_signature_t> >& functions_declared,
269  std::set<std::pair<std::string,
270  function_signature_t> >& functions_defined,
271  std::ostream& error_msgs) const;
272  };
273  extern boost::phoenix::function<add_function_signature>
275 
276  // called from: functions_grammar
278  void operator()(function_decl_def& decl, bool& pass,
279  std::ostream& error_msgs) const;
280  };
281  extern boost::phoenix::function<validate_return_type>
283 
284  // called from: functions_grammar
286  void operator()(function_decl_def& decl, bool& pass,
287  std::ostream& error_msgs) const;
288  };
289  extern boost::phoenix::function<validate_pmf_pdf_variate>
291 
292  // called from: functions_grammar
294  void operator()(std::string& fname, bool& pass,
295  std::ostream& error_msgs) const;
296  };
297  extern boost::phoenix::function<validate_prob_fun> validate_prob_fun_f;
298 
299 
300  // called from: functions_grammar
301  struct scope_lp : public phoenix_functor_unary {
302  void operator()(variable_map& vm) const;
303  };
304  extern boost::phoenix::function<scope_lp> scope_lp_f;
305 
306  // called from: functions_grammar
308  void operator()(function_decl_def& decl,
309  variable_map& vm) const;
310  };
311  extern boost::phoenix::function<unscope_variables> unscope_variables_f;
312 
313  // called from: functions_grammar
315  void operator()(arg_decl& decl, bool& pass, variable_map& vm,
316  std::ostream& error_msgs) const;
317  };
318  extern boost::phoenix::function<add_fun_var> add_fun_var_f;
319 
320  // called from: indexes_grammar
322  void operator()(omni_idx& val) const;
323  };
324  extern boost::phoenix::function<set_omni_idx> set_omni_idx_f;
325 
326  // called from: indexes_grammar, statement_grammar
328  void operator()(const expression & e, bool& pass) const;
329  };
330  extern boost::phoenix::function<validate_int_expr_silent>
332 
333  // called from: term_grammar
335  void operator()(const expression & e, bool& pass,
336  std::ostream& error_msgs) const;
337  };
338  extern boost::phoenix::function<validate_int_expression_warn>
340 
341  // called from: indexes_grammar
343  void operator()(const expression & e, bool& pass,
344  std::ostream& error_msgs) const;
345  };
346  extern boost::phoenix::function<validate_ints_expression>
348 
349  // called from: program_grammar
351  void operator()(variable_map& vm) const;
352  };
353  extern boost::phoenix::function<add_lp_var> add_lp_var_f;
354 
355  // called from: program_grammar
357  void operator()(variable_map& vm) const;
358  };
359  extern boost::phoenix::function<remove_lp_var> remove_lp_var_f;
360 
361  // called from: program_grammar
363  void operator()(pos_iterator_t _begin, pos_iterator_t _end,
364  pos_iterator_t _where, variable_map& vm,
365  std::stringstream& error_msgs) const;
366  };
367  extern boost::phoenix::function<program_error> program_error_f;
368 
369  // called from: statement_2_grammar
371  void operator()(conditional_statement& cs, const expression& e,
372  bool& pass, std::stringstream& error_msgs) const;
373  };
374  extern boost::phoenix::function<add_conditional_condition>
376 
377  // called from: statement_2_grammar
379  void operator()(conditional_statement& cs, const statement& s) const;
380  };
381  extern boost::phoenix::function<add_conditional_body>
383 
384  // called from: statement_grammar
386  void operator()(std::ostream& error_msgs) const;
387  };
388  extern boost::phoenix::function<deprecate_old_assignment_op>
390 
391  // called from: statement_grammar
393  void operator()(var_origin origin, bool& pass, std::ostream& error_msgs)
394  const;
395  };
396  extern boost::phoenix::function<validate_return_allowed>
398 
399  // called from: statement_grammar
401  void operator()(var_origin origin, bool& pass, std::ostream& error_msgs)
402  const;
403  };
404  extern boost::phoenix::function<validate_void_return_allowed>
406 
407  // called from: statement_grammar
409  void operator()(const std::string& name, const var_origin& origin_allowed,
410  variable& v, bool& pass, const variable_map& vm,
411  std::ostream& error_msgs) const;
412  };
413  extern boost::phoenix::function<identifier_to_var> identifier_to_var_f;
414 
415  // called from: statement_grammar
417  void operator()(const assgn& a, bool& pass, std::ostream& error_msgs)
418  const;
419  };
420  extern boost::phoenix::function<validate_assgn> validate_assgn_f;
421 
422  // called from: statement_grammar
424  void operator()(assignment& a, const var_origin& origin_allowed,
425  bool& pass, variable_map& vm, std::ostream& error_msgs)
426  const;
427  };
428  extern boost::phoenix::function<validate_assignment> validate_assignment_f;
429 
430  // called from: statement_grammar
432  void operator()(sample& s, const variable_map& var_map,
433  bool& pass, std::ostream& error_msgs) const;
434  };
435  extern boost::phoenix::function<validate_sample> validate_sample_f;
436 
437  // called from: statement_grammar
439  void operator()(bool& pass, const stan::lang::expression& expr,
440  std::stringstream& error_msgs) const;
441  };
442  extern boost::phoenix::function<expression_as_statement>
444 
445  // called from: statement_grammar
447  void operator()(const std::vector<var_decl>& var_decls, variable_map& vm)
448  const;
449  };
450  extern boost::phoenix::function<unscope_locals> unscope_locals_f;
451 
452  // called from: statement_grammar
454  void operator()(while_statement& ws, const expression& e,
455  bool& pass, std::stringstream& error_msgs) const;
456  };
457  extern boost::phoenix::function<add_while_condition> add_while_condition_f;
458 
459  // called from: statement_grammar
461  void operator()(while_statement& ws, const statement& s) const;
462  };
463  extern boost::phoenix::function<add_while_body> add_while_body_f;
464 
465  // called from: statement_grammar
467  void operator()(const std::string& name, std::string& name_local,
468  bool& pass, variable_map& vm,
469  std::stringstream& error_msgs) const;
470  };
471  extern boost::phoenix::function<add_loop_identifier> add_loop_identifier_f;
472 
473  // called from: statement_grammar
475  void operator()(const std::string& name, variable_map& vm) const;
476  };
477  extern boost::phoenix::function<remove_loop_identifier>
479 
480  // called from: statement_grammar
482  void operator()(std::stringstream& error_msgs) const;
483  };
484  extern boost::phoenix::function<deprecate_increment_log_prob>
486 
487  // called from: statement_grammar
489  void operator()(const bool& allow_sample, bool& pass,
490  std::stringstream& error_msgs) const;
491  };
492  extern boost::phoenix::function<validate_allow_sample>
494 
495  // called from: statement_grammar
497  void operator()(const expression& e, bool& pass, std::ostream& error_msgs)
498  const;
499  };
500  extern boost::phoenix::function<validate_non_void_expression>
502 
503  // called from: statement_grammar
505  void operator()(statement& stmt,
506  const pos_iterator_t& begin,
507  const pos_iterator_t& end) const;
508  };
509  extern boost::phoenix::function<add_line_number> add_line_number_f;
510 
511  // called from: statement_grammar
513  void operator()(return_statement& s) const;
514  };
515  extern boost::phoenix::function<set_void_return> set_void_return_f;
516 
517  // called from: statement_grammar
519  void operator()(no_op_statement& s) const;
520  };
521  extern boost::phoenix::function<set_no_op> set_no_op_f;
522 
523  // called from: term_grammar
524 
525 
527  void operator()(std::ostream& error_msgs) const;
528  };
529  extern boost::phoenix::function<deprecated_integrate_ode>
531 
532  // test first arguments for both ode calling patterns
533  // (with/without control)
534  template <class T>
535  void validate_integrate_ode_non_control_args(const T& ode_fun,
536  const variable_map& var_map,
537  bool& pass,
538  std::ostream& error_msgs);
539 
540  // called from: term_grammar
542  void operator()(const integrate_ode& ode_fun,
543  const variable_map& var_map, bool& pass,
544  std::ostream& error_msgs) const;
545  };
546  extern boost::phoenix::function<validate_integrate_ode>
548 
549  // called from: term_grammar
551  : public phoenix_functor_quaternary {
552  void operator()(const integrate_ode_control& ode_fun,
553  const variable_map& var_map, bool& pass,
554  std::ostream& error_msgs) const;
555  };
556  extern boost::phoenix::function<validate_integrate_ode_control>
558 
559  // called from: term_grammar
561  void operator()(expression& fun_result, fun& fun,
562  const var_origin& var_origin, bool& pass,
563  std::ostream& error_msgs) const;
564  };
565  extern boost::phoenix::function<set_fun_type_named> set_fun_type_named_f;
566 
567  // called from: term_grammar
569  void operator()(expression& e,
571  const var_origin& var_origin,
572  bool& pass,
573  const variable_map& var_map,
574  std::ostream& error_msgs) const;
575  };
576  extern boost::phoenix::function<set_array_expr_type> set_array_expr_type_f;
577 
578  // called from: term_grammar
580  void operator()(expression& expr1, const expression& expr2,
581  const var_origin& var_origin, bool& pass,
582  std::ostream& error_msgs) const;
583  };
584  extern boost::phoenix::function<exponentiation_expr> exponentiation_f;
585 
586  // called from: term_grammar
588  void operator()(expression& expr1, const expression& expr2,
589  std::ostream& error_msgs) const;
590  };
591  extern boost::phoenix::function<multiplication_expr> multiplication_f;
592 
593  // called from: term_grammar
595  void operator()(expression& expr1, const expression& expr2,
596  std::ostream& error_msgs) const;
597  };
598  extern boost::phoenix::function<division_expr> division_f;
599 
600  // called from: term_grammar
602  void operator()(expression& expr1, const expression& expr2,
603  bool& pass, std::ostream& error_msgs) const;
604  };
605  extern boost::phoenix::function<modulus_expr> modulus_f;
606 
607  // called from: term_grammar
609  void operator()(expression& expr1, bool& pass, const expression& expr2,
610  std::ostream& error_msgs) const;
611  };
612  extern boost::phoenix::function<left_division_expr> left_division_f;
613 
614  // called from: term_grammar
616  void operator()(expression& expr1, const expression& expr2,
617  std::ostream& error_msgs) const;
618  };
619  extern boost::phoenix::function<elt_multiplication_expr>
621 
622  // called from: term_grammar
624  void operator()(expression& expr1, const expression& expr2,
625  std::ostream& error_msgs) const;
626  };
627  extern boost::phoenix::function<elt_division_expr> elt_division_f;
628 
629  // called from: term_grammar
631  void operator()(expression& expr_result, const expression& expr,
632  bool& pass, std::ostream& error_msgs) const;
633  };
634  extern boost::phoenix::function<negate_expr> negate_expr_f;
635 
636  // called from: term_grammar
638  void operator()(expression& expr_result, const expression& expr,
639  std::ostream& error_msgs) const;
640  };
641  extern boost::phoenix::function<logical_negate_expr> logical_negate_expr_f;
642 
643  // called from: term_grammar
645  void operator()(expression& expr, bool& pass,
646  std::ostream& error_msgs) const;
647  };
648  extern boost::phoenix::function<transpose_expr> transpose_f;
649 
650  // called from: term_grammar
652  void operator()(expression& e, std::vector<idx>& idxs, bool& pass,
653  std::ostream& error_msgs) const;
654  };
655  extern boost::phoenix::function<add_idxs> add_idxs_f;
656 
657  // called from: term_grammar
659  void operator()(expression& expression,
660  std::vector<std::vector<stan::lang::expression> >& dimss,
661  bool& pass, std::ostream& error_msgs) const;
662  };
663  extern boost::phoenix::function<add_expression_dimss>
665 
666  // called from: term_grammar
668  void operator()(variable& var_expr, expression& val, variable_map& vm,
669  std::ostream& error_msgs, bool& pass) const;
670  };
671  extern boost::phoenix::function<set_var_type> set_var_type_f;
672 
674  void operator()(bool& pass, std::ostream& error_msgs) const;
675  };
676  extern boost::phoenix::function<require_vbar> require_vbar_f;
677 
678  struct validate_no_constraints_vis : public boost::static_visitor<bool> {
679  std::stringstream& error_msgs_;
680  explicit validate_no_constraints_vis(std::stringstream& error_msgs);
681  bool operator()(const nil& /*x*/) const;
682  bool operator()(const int_var_decl& x) const;
683  bool operator()(const double_var_decl& x) const;
684  bool operator()(const vector_var_decl& x) const;
685  bool operator()(const row_vector_var_decl& x) const;
686  bool operator()(const matrix_var_decl& x) const;
687  bool operator()(const unit_vector_var_decl& /*x*/) const;
688  bool operator()(const simplex_var_decl& /*x*/) const;
689  bool operator()(const ordered_var_decl& /*x*/) const;
690  bool operator()(const positive_ordered_var_decl& /*x*/) const;
691  bool operator()(const cholesky_factor_var_decl& /*x*/) const;
692  bool operator()(const cholesky_corr_var_decl& /*x*/) const;
693  bool operator()(const cov_matrix_var_decl& /*x*/) const;
694  bool operator()(const corr_matrix_var_decl& /*x*/) const;
695  };
696 
697  struct data_only_expression : public boost::static_visitor<bool> {
698  std::stringstream& error_msgs_;
700  data_only_expression(std::stringstream& error_msgs,
701  variable_map& var_map);
702  bool operator()(const nil& /*e*/) const;
703  bool operator()(const int_literal& /*x*/) const;
704  bool operator()(const double_literal& /*x*/) const;
705  bool operator()(const array_expr& x) const;
706  bool operator()(const variable& x) const;
707  bool operator()(const integrate_ode& x) const;
708  bool operator()(const integrate_ode_control& x) const;
709  bool operator()(const fun& x) const;
710  bool operator()(const index_op& x) const;
711  bool operator()(const index_op_sliced& x) const;
712  bool operator()(const conditional_op& x) const;
713  bool operator()(const binary_op& x) const;
714  bool operator()(const unary_op& x) const;
715  };
716 
717  // called from: var_decls_grammar
719  void operator()(const bool& allow_constraints,
720  const bool& declaration_ok, const var_decl& var_decl,
721  bool& pass, std::stringstream& error_msgs) const;
722  };
723  extern boost::phoenix::function<validate_decl_constraints>
725 
726  // called from: var_decls_grammar
728  void operator()(const var_origin& origin, const var_decl& var_decl,
729  bool& pass, std::stringstream& error_msgs) const;
730  };
731  extern boost::phoenix::function<validate_definition>
733 
735  std::set<std::string> reserved_word_set_;
736  std::set<std::string> const_fun_name_set_;
738  void operator()(const std::string& identifier, bool& pass,
739  std::stringstream& error_msgs) const;
740  bool contains(const std::set<std::string>& s,
741  const std::string& x) const;
742  bool identifier_exists(const std::string& identifier) const;
743  void reserve(const std::string& w);
744  };
745  extern boost::phoenix::function<validate_identifier> validate_identifier_f;
746 
747  // copies single dimension from M to N if only M declared
749  : public phoenix_functor_unary {
750  void operator()(cholesky_factor_var_decl& var_decl) const;
751  };
752  extern boost::phoenix::function<copy_square_cholesky_dimension_if_necessary>
754 
756  void operator()(range& r, std::stringstream& /*error_msgs*/) const;
757  };
758  extern boost::phoenix::function<empty_range> empty_range_f;
759 
761  void operator()(const expression& expr, bool& pass,
762  std::stringstream& error_msgs) const;
763  };
764  extern boost::phoenix::function<validate_int_expr> validate_int_expr_f;
765 
767  void operator()(range& range, const expression& expr, bool& pass,
768  std::stringstream& error_msgs) const;
769  };
770  extern boost::phoenix::function<set_int_range_lower> set_int_range_lower_f;
771 
773  void operator()(range& range, const expression& expr, bool& pass,
774  std::stringstream& error_msgs) const;
775  };
776  extern boost::phoenix::function<set_int_range_upper> set_int_range_upper_f;
777 
779  void operator()(const expression& expr, int var_origin, bool& pass,
780  variable_map& var_map, std::stringstream& error_msgs)
781  const;
782  };
783  extern boost::phoenix::function<validate_int_data_expr>
785 
787  void operator()(const expression& expr, bool& pass,
788  std::stringstream& error_msgs) const;
789  };
790  extern boost::phoenix::function<validate_double_expr>
792 
794  void operator()(range& range, const expression& expr, bool& pass,
795  std::stringstream& error_msgs) const;
796  };
797  extern boost::phoenix::function<set_double_range_lower>
799 
801  void operator()(range& range, const expression& expr, bool& pass,
802  std::stringstream& error_msgs) const;
803  };
804  extern boost::phoenix::function<set_double_range_upper>
806 
807  struct add_var : public phoenix_functor_senary {
808  template <typename T>
809  void operator()(var_decl& var_decl_result, const T& var_decl,
810  variable_map& vm, bool& pass, const var_origin& vo,
811  std::ostream& error_msgs)
812  const;
813  };
814  extern boost::phoenix::function<add_var> add_var_f;
815 
817  void operator()(bool in_loop, bool& pass, std::ostream& error_msgs) const;
818  };
819  extern boost::phoenix::function<validate_in_loop> validate_in_loop_f;
820 
822  void operator()(const expression& e, bool& pass,
823  std::ostream& error_msgs) const;
824  };
825  extern boost::phoenix::function<non_void_expression> non_void_expression_f;
826  }
827 }
828 #endif
An integer variable declaration and optional definition.
boost::phoenix::function< validate_return_allowed > validate_return_allowed_f
boost::phoenix::function< require_vbar > require_vbar_f
Structure to hold the declaration of a positive ordered vector.
boost::phoenix::function< set_void_function > set_void_function_f
Structure to wrap the variant type of statements.
Definition: statement.hpp:29
boost::phoenix::function< add_while_body > add_while_body_f
boost::phoenix::function< set_int_range_upper > set_int_range_upper_f
AST node for the type delclaration for function arguments.
Definition: arg_decl.hpp:14
boost::phoenix::function< validate_assgn > validate_assgn_f
Structure to hold a row vector variable declaration.
boost::phoenix::function< set_var_type > set_var_type_f
AST node for assignment to variable with multi-indexing.
Definition: assgn.hpp:15
void set_fun_type(fun &fun, std::ostream &error_msgs)
boost::phoenix::function< set_int_range_lower > set_int_range_lower_f
boost::phoenix::function< binary_op_expr > binary_op_f
boost::phoenix::function< validate_expr_type3 > validate_expr_type3_f
boost::phoenix::function< deprecated_integrate_ode > deprecated_integrate_ode_f
Node for holding a double literal.
int num_dimss(std::vector< std::vector< stan::lang::expression > > &dimss)
boost::phoenix::function< set_fun_type_named > set_fun_type_named_f
std::set< std::string > const_fun_name_set_
Declare result to be a template struct.
boost::phoenix::function< set_no_op > set_no_op_f
boost::phoenix::function< validate_conditional_op > validate_conditional_op_f
Probability, optimization and sampling library.
Structure to hold an array expression.
Definition: array_expr.hpp:17
Declare result to be a template struct.
boost::phoenix::function< deprecate_increment_log_prob > deprecate_increment_log_prob_f
Structure for an indexed expression.
Definition: index_op.hpp:14
boost::phoenix::function< program_error > program_error_f
Structure to hold a covariance matrix variable declaration.
Structure for function application.
Definition: fun.hpp:17
bool has_prob_suffix(const std::string &s)
boost::spirit::line_pos_iterator< input_iterator_t > pos_iterator_t
Structure of the type of an expression, which consists of a base type and a number of dimensions...
Definition: expr_type.hpp:14
A map from function names to their base declarations and their origin.
boost::phoenix::function< validate_ints_expression > validate_ints_expression_f
AST node for sampling statements.
Definition: sample.hpp:17
boost::phoenix::function< add_conditional_condition > add_conditional_condition_f
boost::phoenix::function< empty_range > empty_range_f
boost::phoenix::function< subtraction_expr3 > subtraction3_f
Structure for integrate diff eq statement.
boost::phoenix::function< addition_expr3 > addition3_f
This is the base class for septenary functors that are adapted to lazy semantic actions by boost::pho...
This is the base class for quatenary functors that are adapted to lazy semantic actions by boost::pho...
void validate_integrate_ode_non_control_args(const T &ode_fun, const variable_map &var_map, bool &pass, std::ostream &error_msgs)
Structure to hold the declaration of a simplex.
void replace_suffix(const std::string &old_suffix, const std::string &new_suffix, fun &f)
Declare result to be a template struct.
boost::phoenix::function< add_var > add_var_f
boost::phoenix::function< remove_lp_var > remove_lp_var_f
Structure to hold a Cholesky factor for a correlation matrix variable declaration.
boost::phoenix::function< exponentiation_expr > exponentiation_f
boost::phoenix::function< add_loop_identifier > add_loop_identifier_f
Declare result to be a template struct.
boost::phoenix::function< set_double_range_lower > set_double_range_lower_f
boost::phoenix::function< validate_void_return_allowed > validate_void_return_allowed_f
boost::phoenix::function< validate_non_void_arg_function > validate_non_void_arg_f
AST structure for a range object with a low and high value.
Definition: range.hpp:14
boost::phoenix::function< non_void_expression > non_void_expression_f
boost::phoenix::function< remove_loop_identifier > remove_loop_identifier_f
boost::phoenix::function< add_conditional_body > add_conditional_body_f
boost::phoenix::function< transpose_expr > transpose_f
boost::phoenix::function< validate_definition > validate_definition_f
boost::phoenix::function< multiplication_expr > multiplication_f
boost::phoenix::function< validate_identifier > validate_identifier_f
boost::phoenix::function< validate_int_expression_warn > validate_int_expression_warn_f
This is the base class for binary functors that are adapted to lazy semantic actions by boost::phoeni...
boost::phoenix::function< validate_int_expr > validate_int_expr_f
Structure to hold the declaration of a unit vector.
boost::phoenix::function< validate_decl_constraints > validate_decl_constraints_f
AST structure for representing all legal indexes.
Definition: omni_idx.hpp:10
boost::phoenix::function< add_expression_dimss > add_expression_dimss_f
boost::phoenix::function< set_array_expr_type > set_array_expr_type_f
This is the base class for quinary functors that are adapted to lazy semantic actions by boost::phoen...
boost::phoenix::function< validate_prob_fun > validate_prob_fun_f
boost::phoenix::function< add_line_number > add_line_number_f
boost::phoenix::function< validate_int_data_expr > validate_int_data_expr_f
boost::phoenix::function< validate_int_expr_silent > validate_int_expr_silent_f
boost::phoenix::function< is_prob_fun > is_prob_fun_f
int var_origin
The type of a variable indicating where a variable was declared.
Definition: var_origin.hpp:12
Structure to hold a matrix variable declaration.
boost::phoenix::function< set_omni_idx > set_omni_idx_f
Structure to hold a Cholesky factor variable declaration.
std::pair< expr_type, std::vector< expr_type > > function_signature_t
The type of a function signature, mapping a vector of argument expression types to a result expressio...
boost::phoenix::function< validate_allow_sample > validate_allow_sample_f
boost::phoenix::function< assign_lhs > assign_lhs_f
This is the base class for senary functors that are adapted to lazy semantic actions by boost::phoeni...
std::set< std::string > reserved_word_set_
boost::phoenix::function< validate_integrate_ode > validate_integrate_ode_f
This is the base class for unnary functors that are adapted to lazy semantic actions by boost::phoeni...
boost::phoenix::function< validate_double_expr > validate_double_expr_f
boost::phoenix::function< expression_as_statement > expression_as_statement_f
Structure to hold a column vector variable declaration.
boost::phoenix::function< validate_pmf_pdf_variate > validate_pmf_pdf_variate_f
The variant structure to hold a variable declaration.
Definition: var_decl.hpp:30
boost::phoenix::function< add_lp_var > add_lp_var_f
Structure to hold a correlation matrix variable declaration.
AST node for representing while statements.
boost::phoenix::function< elt_multiplication_expr > elt_multiplication_f
AST structure for holding an expression with a sequence of indexes.
boost::phoenix::function< set_allows_sampling_origin > set_allows_sampling_origin_f
Structure for the conditional operator.
AST node for the no-operation statement.
boost::phoenix::function< logical_negate_expr > logical_negate_expr_f
An integer variable declaration and optional definition.
This is the base class for ternary functors that are adapted to lazy semantic actions by boost::phoen...
boost::phoenix::function< validate_sample > validate_sample_f
boost::phoenix::function< increment_size_t > increment_size_t_f
boost::phoenix::function< add_function_signature > add_function_signature_f
Structure to hold a variable.
Definition: variable.hpp:14
boost::phoenix::function< set_double_range_upper > set_double_range_upper_f
boost::phoenix::function< add_idxs > add_idxs_f
Structure to hold the declaration of an ordered vector.
boost::phoenix::function< unscope_locals > unscope_locals_f
AST node for the return statement.
Declare result to be a template struct.
boost::phoenix::function< division_expr > division_f
boost::phoenix::function< unscope_variables > unscope_variables_f
boost::phoenix::function< elt_division_expr > elt_division_f
Declare result to be a template struct.
boost::phoenix::function< identifier_to_var > identifier_to_var_f
boost::phoenix::function< validate_in_loop > validate_in_loop_f
boost::phoenix::function< negate_expr > negate_expr_f
AST structure for unary operations consisting of an operation and argument.
Definition: unary_op.hpp:14
AST node for a function declaration and definition including return type name, arguments, and body.
boost::phoenix::function< copy_square_cholesky_dimension_if_necessary > copy_square_cholesky_dimension_if_necessary_f
boost::phoenix::function< validate_return_type > validate_return_type_f
Node for storing binary operations consisting of an operation and left and right arguments.
Definition: binary_op.hpp:15
boost::phoenix::function< add_fun_var > add_fun_var_f
boost::phoenix::function< add_while_condition > add_while_condition_f
boost::phoenix::function< validate_assignment > validate_assignment_f
boost::phoenix::function< validate_integrate_ode_control > validate_integrate_ode_control_f
The nil structure used as a placeholder for undefined or empty values in several structures.
Definition: nil.hpp:11
boost::phoenix::function< validate_declarations > validate_declarations_f
boost::phoenix::function< left_division_expr > left_division_f
boost::phoenix::function< set_void_return > set_void_return_f
boost::phoenix::function< modulus_expr > modulus_f
boost::phoenix::function< scope_lp > scope_lp_f
Structure for a diff eq integration statement with control parameters for the integrator.
boost::phoenix::function< deprecate_old_assignment_op > deprecate_old_assignment_op_f
AST node for conditional statements.
Declare result to be a template struct.
boost::phoenix::function< validate_non_void_expression > validate_non_void_expression_f
AST node for assignment statements.
Definition: assignment.hpp:14

     [ Stan Home Page ] © 2011–2016, Stan Development Team.