LCOV - code coverage report
Current view: top level - process/include/mcrl2/process - builder.h (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 416 685 60.7 %
Date: 2020-09-16 00:45:56 Functions: 93 240 38.8 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Author(s): Wieger Wesselink
       2             : // Copyright: see the accompanying file COPYING or copy at
       3             : // https://github.com/mCRL2org/mCRL2/blob/master/COPYING
       4             : //
       5             : // Distributed under the Boost Software License, Version 1.0.
       6             : // (See accompanying file LICENSE_1_0.txt or copy at
       7             : // http://www.boost.org/LICENSE_1_0.txt)
       8             : //
       9             : /// \file mcrl2/process/builder.h
      10             : /// \brief add your file description here.
      11             : 
      12             : #ifndef MCRL2_PROCESS_BUILDER_H
      13             : #define MCRL2_PROCESS_BUILDER_H
      14             : 
      15             : #include "mcrl2/data/builder.h"
      16             : #include "mcrl2/process/process_specification.h"
      17             : #include "mcrl2/process/untyped_multi_action.h"
      18             : #include "mcrl2/process/timed_multi_action.h"
      19             : 
      20             : namespace mcrl2
      21             : {
      22             : 
      23             : namespace process
      24             : {
      25             : 
      26             : // Adds sort expression traversal to a builder
      27             : //--- start generated add_sort_expressions code ---//
      28             : template <template <class> class Builder, class Derived>
      29             : struct add_sort_expressions: public Builder<Derived>
      30             : {
      31             :   typedef Builder<Derived> super;
      32             :   using super::enter;
      33             :   using super::leave;
      34             :   using super::update;
      35             :   using super::apply;
      36             : 
      37        3232 :   process::action_label apply(const process::action_label& x)
      38             :   {
      39        3232 :     static_cast<Derived&>(*this).enter(x);
      40        3232 :     process::action_label result = process::action_label(x.name(), static_cast<Derived&>(*this).apply(x.sorts()));
      41        3232 :     static_cast<Derived&>(*this).leave(x);
      42        3232 :     return result;
      43             :   }
      44             : 
      45         953 :   void update(process::process_specification& x)
      46             :   {
      47         953 :     static_cast<Derived&>(*this).enter(x);
      48         953 :     x.action_labels() = static_cast<Derived&>(*this).apply(x.action_labels());
      49         953 :     static_cast<Derived&>(*this).update(x.global_variables());
      50         953 :     static_cast<Derived&>(*this).update(x.equations());
      51         953 :     x.init() = static_cast<Derived&>(*this).apply(x.init());
      52         953 :     static_cast<Derived&>(*this).leave(x);
      53         953 :   }
      54             : 
      55        1104 :   process::process_identifier apply(const process::process_identifier& x)
      56             :   {
      57        1104 :     static_cast<Derived&>(*this).enter(x);
      58        1104 :     process::process_identifier result = process::process_identifier(x.name(), static_cast<Derived&>(*this).apply(x.variables()));
      59        1104 :     static_cast<Derived&>(*this).leave(x);
      60        1104 :     return result;
      61             :   }
      62             : 
      63        1104 :   process::process_equation apply(const process::process_equation& x)
      64             :   {
      65        1104 :     static_cast<Derived&>(*this).enter(x);
      66        1104 :     process::process_equation result = process::process_equation(static_cast<Derived&>(*this).apply(x.identifier()), static_cast<Derived&>(*this).apply(x.formal_parameters()), static_cast<Derived&>(*this).apply(x.expression()));
      67        1104 :     static_cast<Derived&>(*this).leave(x);
      68        1104 :     return result;
      69             :   }
      70             : 
      71         164 :   process::untyped_multi_action apply(const process::untyped_multi_action& x)
      72             :   {
      73         164 :     static_cast<Derived&>(*this).enter(x);
      74         164 :     process::untyped_multi_action result = process::untyped_multi_action(static_cast<Derived&>(*this).apply(x.actions()));
      75         164 :     static_cast<Derived&>(*this).leave(x);
      76         164 :     return result;
      77             :   }
      78             : 
      79             :   process::timed_multi_action apply(const process::timed_multi_action& x)
      80             :   {
      81             :     static_cast<Derived&>(*this).enter(x);
      82             :     process::timed_multi_action result = x.has_time() ?
      83             :       process::timed_multi_action(static_cast<Derived&>(*this).apply(x.actions()), static_cast<Derived&>(*this).apply(x.time())) :
      84             :       process::timed_multi_action(static_cast<Derived&>(*this).apply(x.actions()), x.time());
      85             :     static_cast<Derived&>(*this).leave(x);
      86             :     return result;
      87             :   }
      88             : 
      89         261 :   process::action apply(const process::action& x)
      90             :   {
      91         261 :     static_cast<Derived&>(*this).enter(x);
      92         261 :     process::action result = process::action(static_cast<Derived&>(*this).apply(x.label()), static_cast<Derived&>(*this).apply(x.arguments()));
      93         261 :     static_cast<Derived&>(*this).leave(x);
      94         261 :     return result;
      95             :   }
      96             : 
      97           0 :   process::process_instance apply(const process::process_instance& x)
      98             :   {
      99           0 :     static_cast<Derived&>(*this).enter(x);
     100           0 :     process::process_instance result = process::process_instance(static_cast<Derived&>(*this).apply(x.identifier()), static_cast<Derived&>(*this).apply(x.actual_parameters()));
     101           0 :     static_cast<Derived&>(*this).leave(x);
     102           0 :     return result;
     103             :   }
     104             : 
     105           0 :   process::process_instance_assignment apply(const process::process_instance_assignment& x)
     106             :   {
     107           0 :     static_cast<Derived&>(*this).enter(x);
     108           0 :     process::process_instance_assignment result = process::process_instance_assignment(static_cast<Derived&>(*this).apply(x.identifier()), static_cast<Derived&>(*this).apply(x.assignments()));
     109           0 :     static_cast<Derived&>(*this).leave(x);
     110           0 :     return result;
     111             :   }
     112             : 
     113         435 :   process::delta apply(const process::delta& x)
     114             :   {
     115         435 :     static_cast<Derived&>(*this).enter(x);
     116             :     // skip
     117         435 :     static_cast<Derived&>(*this).leave(x);
     118         435 :     return x;
     119             :   }
     120             : 
     121         138 :   process::tau apply(const process::tau& x)
     122             :   {
     123         138 :     static_cast<Derived&>(*this).enter(x);
     124             :     // skip
     125         138 :     static_cast<Derived&>(*this).leave(x);
     126         138 :     return x;
     127             :   }
     128             : 
     129         706 :   process::sum apply(const process::sum& x)
     130             :   {
     131         706 :     static_cast<Derived&>(*this).enter(x);
     132         706 :     process::sum result = process::sum(static_cast<Derived&>(*this).apply(x.variables()), static_cast<Derived&>(*this).apply(x.operand()));
     133         706 :     static_cast<Derived&>(*this).leave(x);
     134         706 :     return result;
     135             :   }
     136             : 
     137           0 :   process::block apply(const process::block& x)
     138             :   {
     139           0 :     static_cast<Derived&>(*this).enter(x);
     140           0 :     process::block result = process::block(x.block_set(), static_cast<Derived&>(*this).apply(x.operand()));
     141           0 :     static_cast<Derived&>(*this).leave(x);
     142           0 :     return result;
     143             :   }
     144             : 
     145          18 :   process::hide apply(const process::hide& x)
     146             :   {
     147          18 :     static_cast<Derived&>(*this).enter(x);
     148          18 :     process::hide result = process::hide(x.hide_set(), static_cast<Derived&>(*this).apply(x.operand()));
     149          18 :     static_cast<Derived&>(*this).leave(x);
     150          18 :     return result;
     151             :   }
     152             : 
     153           0 :   process::rename apply(const process::rename& x)
     154             :   {
     155           0 :     static_cast<Derived&>(*this).enter(x);
     156           0 :     process::rename result = process::rename(x.rename_set(), static_cast<Derived&>(*this).apply(x.operand()));
     157           0 :     static_cast<Derived&>(*this).leave(x);
     158           0 :     return result;
     159             :   }
     160             : 
     161         113 :   process::comm apply(const process::comm& x)
     162             :   {
     163         113 :     static_cast<Derived&>(*this).enter(x);
     164         113 :     process::comm result = process::comm(x.comm_set(), static_cast<Derived&>(*this).apply(x.operand()));
     165         113 :     static_cast<Derived&>(*this).leave(x);
     166         113 :     return result;
     167             :   }
     168             : 
     169          92 :   process::allow apply(const process::allow& x)
     170             :   {
     171          92 :     static_cast<Derived&>(*this).enter(x);
     172          92 :     process::allow result = process::allow(x.allow_set(), static_cast<Derived&>(*this).apply(x.operand()));
     173          92 :     static_cast<Derived&>(*this).leave(x);
     174          92 :     return result;
     175             :   }
     176             : 
     177         199 :   process::sync apply(const process::sync& x)
     178             :   {
     179         199 :     static_cast<Derived&>(*this).enter(x);
     180         199 :     process::sync result = process::sync(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     181         199 :     static_cast<Derived&>(*this).leave(x);
     182         199 :     return result;
     183             :   }
     184             : 
     185         301 :   process::at apply(const process::at& x)
     186             :   {
     187         301 :     static_cast<Derived&>(*this).enter(x);
     188         301 :     process::at result = process::at(static_cast<Derived&>(*this).apply(x.operand()), static_cast<Derived&>(*this).apply(x.time_stamp()));
     189         301 :     static_cast<Derived&>(*this).leave(x);
     190         301 :     return result;
     191             :   }
     192             : 
     193        2504 :   process::seq apply(const process::seq& x)
     194             :   {
     195        2504 :     static_cast<Derived&>(*this).enter(x);
     196        2504 :     process::seq result = process::seq(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     197        2504 :     static_cast<Derived&>(*this).leave(x);
     198        2504 :     return result;
     199             :   }
     200             : 
     201         665 :   process::if_then apply(const process::if_then& x)
     202             :   {
     203         665 :     static_cast<Derived&>(*this).enter(x);
     204         665 :     process::if_then result = process::if_then(static_cast<Derived&>(*this).apply(x.condition()), static_cast<Derived&>(*this).apply(x.then_case()));
     205         665 :     static_cast<Derived&>(*this).leave(x);
     206         665 :     return result;
     207             :   }
     208             : 
     209         121 :   process::if_then_else apply(const process::if_then_else& x)
     210             :   {
     211         121 :     static_cast<Derived&>(*this).enter(x);
     212         121 :     process::if_then_else result = process::if_then_else(static_cast<Derived&>(*this).apply(x.condition()), static_cast<Derived&>(*this).apply(x.then_case()), static_cast<Derived&>(*this).apply(x.else_case()));
     213         121 :     static_cast<Derived&>(*this).leave(x);
     214         121 :     return result;
     215             :   }
     216             : 
     217           0 :   process::bounded_init apply(const process::bounded_init& x)
     218             :   {
     219           0 :     static_cast<Derived&>(*this).enter(x);
     220           0 :     process::bounded_init result = process::bounded_init(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     221           0 :     static_cast<Derived&>(*this).leave(x);
     222           0 :     return result;
     223             :   }
     224             : 
     225         378 :   process::merge apply(const process::merge& x)
     226             :   {
     227         378 :     static_cast<Derived&>(*this).enter(x);
     228         378 :     process::merge result = process::merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     229         378 :     static_cast<Derived&>(*this).leave(x);
     230         378 :     return result;
     231             :   }
     232             : 
     233           0 :   process::left_merge apply(const process::left_merge& x)
     234             :   {
     235           0 :     static_cast<Derived&>(*this).enter(x);
     236           0 :     process::left_merge result = process::left_merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     237           0 :     static_cast<Derived&>(*this).leave(x);
     238           0 :     return result;
     239             :   }
     240             : 
     241         995 :   process::choice apply(const process::choice& x)
     242             :   {
     243         995 :     static_cast<Derived&>(*this).enter(x);
     244         995 :     process::choice result = process::choice(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     245         995 :     static_cast<Derived&>(*this).leave(x);
     246         995 :     return result;
     247             :   }
     248             : 
     249         116 :   process::stochastic_operator apply(const process::stochastic_operator& x)
     250             :   {
     251         116 :     static_cast<Derived&>(*this).enter(x);
     252         116 :     process::stochastic_operator result = process::stochastic_operator(static_cast<Derived&>(*this).apply(x.variables()), static_cast<Derived&>(*this).apply(x.distribution()), static_cast<Derived&>(*this).apply(x.operand()));
     253         116 :     static_cast<Derived&>(*this).leave(x);
     254         116 :     return result;
     255             :   }
     256             : 
     257         536 :   process::untyped_process_assignment apply(const process::untyped_process_assignment& x)
     258             :   {
     259         536 :     static_cast<Derived&>(*this).enter(x);
     260         536 :     process::untyped_process_assignment result = process::untyped_process_assignment(x.name(), static_cast<Derived&>(*this).apply(x.assignments()));
     261         536 :     static_cast<Derived&>(*this).leave(x);
     262         536 :     return result;
     263             :   }
     264             : 
     265       12481 :   process::process_expression apply(const process::process_expression& x)
     266             :   {
     267       12481 :     static_cast<Derived&>(*this).enter(x);
     268       12481 :     process::process_expression result;
     269       12481 :     if (process::is_action(x))
     270             :     {
     271           8 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::action>(x));
     272             :     }
     273       12473 :     else if (process::is_process_instance(x))
     274             :     {
     275           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance>(x));
     276             :     }
     277       12473 :     else if (process::is_process_instance_assignment(x))
     278             :     {
     279           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance_assignment>(x));
     280             :     }
     281       12473 :     else if (process::is_delta(x))
     282             :     {
     283         435 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::delta>(x));
     284             :     }
     285       12038 :     else if (process::is_tau(x))
     286             :     {
     287         138 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::tau>(x));
     288             :     }
     289       11900 :     else if (process::is_sum(x))
     290             :     {
     291         706 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sum>(x));
     292             :     }
     293       11194 :     else if (process::is_block(x))
     294             :     {
     295           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::block>(x));
     296             :     }
     297       11194 :     else if (process::is_hide(x))
     298             :     {
     299          18 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::hide>(x));
     300             :     }
     301       11176 :     else if (process::is_rename(x))
     302             :     {
     303           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::rename>(x));
     304             :     }
     305       11176 :     else if (process::is_comm(x))
     306             :     {
     307         113 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::comm>(x));
     308             :     }
     309       11063 :     else if (process::is_allow(x))
     310             :     {
     311          92 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::allow>(x));
     312             :     }
     313       10971 :     else if (process::is_sync(x))
     314             :     {
     315         199 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sync>(x));
     316             :     }
     317       10772 :     else if (process::is_at(x))
     318             :     {
     319         301 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::at>(x));
     320             :     }
     321       10471 :     else if (process::is_seq(x))
     322             :     {
     323        2504 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::seq>(x));
     324             :     }
     325        7967 :     else if (process::is_if_then(x))
     326             :     {
     327         665 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then>(x));
     328             :     }
     329        7302 :     else if (process::is_if_then_else(x))
     330             :     {
     331         121 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then_else>(x));
     332             :     }
     333        7181 :     else if (process::is_bounded_init(x))
     334             :     {
     335           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::bounded_init>(x));
     336             :     }
     337        7181 :     else if (process::is_merge(x))
     338             :     {
     339         378 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::merge>(x));
     340             :     }
     341        6803 :     else if (process::is_left_merge(x))
     342             :     {
     343           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::left_merge>(x));
     344             :     }
     345        6803 :     else if (process::is_choice(x))
     346             :     {
     347         995 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::choice>(x));
     348             :     }
     349        5808 :     else if (process::is_stochastic_operator(x))
     350             :     {
     351         116 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::stochastic_operator>(x));
     352             :     }
     353        5692 :     else if (process::is_untyped_process_assignment(x))
     354             :     {
     355         536 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::untyped_process_assignment>(x));
     356             :     }
     357        5156 :     else if (data::is_untyped_data_parameter(x))
     358             :     {
     359        5156 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<data::untyped_data_parameter>(x));
     360             :     }
     361       12481 :     static_cast<Derived&>(*this).leave(x);
     362       12481 :     return result;
     363             :   }
     364             : 
     365             : };
     366             : 
     367             : /// \brief Builder class
     368             : template <typename Derived>
     369             : struct sort_expression_builder: public add_sort_expressions<data::sort_expression_builder, Derived>
     370             : {
     371             : };
     372             : //--- end generated add_sort_expressions code ---//
     373             : 
     374             : // Adds data expression traversal to a builder
     375             : //--- start generated add_data_expressions code ---//
     376             : template <template <class> class Builder, class Derived>
     377             : struct add_data_expressions: public Builder<Derived>
     378             : {
     379             :   typedef Builder<Derived> super;
     380             :   using super::enter;
     381             :   using super::leave;
     382             :   using super::update;
     383             :   using super::apply;
     384             : 
     385         946 :   void update(process::process_specification& x)
     386             :   {
     387         946 :     static_cast<Derived&>(*this).enter(x);
     388         946 :     static_cast<Derived&>(*this).update(x.equations());
     389         946 :     x.init() = static_cast<Derived&>(*this).apply(x.init());
     390         946 :     static_cast<Derived&>(*this).leave(x);
     391         946 :   }
     392             : 
     393        1098 :   process::process_equation apply(const process::process_equation& x)
     394             :   {
     395        1098 :     static_cast<Derived&>(*this).enter(x);
     396        1098 :     process::process_equation result = process::process_equation(x.identifier(), x.formal_parameters(), static_cast<Derived&>(*this).apply(x.expression()));
     397        1098 :     static_cast<Derived&>(*this).leave(x);
     398        1098 :     return result;
     399             :   }
     400             : 
     401           0 :   process::untyped_multi_action apply(const process::untyped_multi_action& x)
     402             :   {
     403           0 :     static_cast<Derived&>(*this).enter(x);
     404           0 :     process::untyped_multi_action result = process::untyped_multi_action(static_cast<Derived&>(*this).apply(x.actions()));
     405           0 :     static_cast<Derived&>(*this).leave(x);
     406           0 :     return result;
     407             :   }
     408             : 
     409             :   process::timed_multi_action apply(const process::timed_multi_action& x)
     410             :   {
     411             :     static_cast<Derived&>(*this).enter(x);
     412             :     process::timed_multi_action result = x.has_time() ?
     413             :       process::timed_multi_action(static_cast<Derived&>(*this).apply(x.actions()), static_cast<Derived&>(*this).apply(x.time())) :
     414             :       process::timed_multi_action(static_cast<Derived&>(*this).apply(x.actions()), x.time());
     415             :     static_cast<Derived&>(*this).leave(x);
     416             :     return result;
     417             :   }
     418             : 
     419      138273 :   process::action apply(const process::action& x)
     420             :   {
     421      138273 :     static_cast<Derived&>(*this).enter(x);
     422      138273 :     process::action result = process::action(x.label(), static_cast<Derived&>(*this).apply(x.arguments()));
     423      138273 :     static_cast<Derived&>(*this).leave(x);
     424      138273 :     return result;
     425             :   }
     426             : 
     427        2052 :   process::process_instance apply(const process::process_instance& x)
     428             :   {
     429        2052 :     static_cast<Derived&>(*this).enter(x);
     430        2052 :     process::process_instance result = process::process_instance(x.identifier(), static_cast<Derived&>(*this).apply(x.actual_parameters()));
     431        2052 :     static_cast<Derived&>(*this).leave(x);
     432        2052 :     return result;
     433             :   }
     434             : 
     435         528 :   process::process_instance_assignment apply(const process::process_instance_assignment& x)
     436             :   {
     437         528 :     static_cast<Derived&>(*this).enter(x);
     438         528 :     process::process_instance_assignment result = process::process_instance_assignment(x.identifier(), static_cast<Derived&>(*this).apply(x.assignments()));
     439         528 :     static_cast<Derived&>(*this).leave(x);
     440         528 :     return result;
     441             :   }
     442             : 
     443         433 :   process::delta apply(const process::delta& x)
     444             :   {
     445         433 :     static_cast<Derived&>(*this).enter(x);
     446             :     // skip
     447         433 :     static_cast<Derived&>(*this).leave(x);
     448         433 :     return x;
     449             :   }
     450             : 
     451         132 :   process::tau apply(const process::tau& x)
     452             :   {
     453         132 :     static_cast<Derived&>(*this).enter(x);
     454             :     // skip
     455         132 :     static_cast<Derived&>(*this).leave(x);
     456         132 :     return x;
     457             :   }
     458             : 
     459         706 :   process::sum apply(const process::sum& x)
     460             :   {
     461         706 :     static_cast<Derived&>(*this).enter(x);
     462         706 :     process::sum result = process::sum(x.variables(), static_cast<Derived&>(*this).apply(x.operand()));
     463         706 :     static_cast<Derived&>(*this).leave(x);
     464         706 :     return result;
     465             :   }
     466             : 
     467           0 :   process::block apply(const process::block& x)
     468             :   {
     469           0 :     static_cast<Derived&>(*this).enter(x);
     470           0 :     process::block result = process::block(x.block_set(), static_cast<Derived&>(*this).apply(x.operand()));
     471           0 :     static_cast<Derived&>(*this).leave(x);
     472           0 :     return result;
     473             :   }
     474             : 
     475          18 :   process::hide apply(const process::hide& x)
     476             :   {
     477          18 :     static_cast<Derived&>(*this).enter(x);
     478          18 :     process::hide result = process::hide(x.hide_set(), static_cast<Derived&>(*this).apply(x.operand()));
     479          18 :     static_cast<Derived&>(*this).leave(x);
     480          18 :     return result;
     481             :   }
     482             : 
     483           0 :   process::rename apply(const process::rename& x)
     484             :   {
     485           0 :     static_cast<Derived&>(*this).enter(x);
     486           0 :     process::rename result = process::rename(x.rename_set(), static_cast<Derived&>(*this).apply(x.operand()));
     487           0 :     static_cast<Derived&>(*this).leave(x);
     488           0 :     return result;
     489             :   }
     490             : 
     491         113 :   process::comm apply(const process::comm& x)
     492             :   {
     493         113 :     static_cast<Derived&>(*this).enter(x);
     494         113 :     process::comm result = process::comm(x.comm_set(), static_cast<Derived&>(*this).apply(x.operand()));
     495         113 :     static_cast<Derived&>(*this).leave(x);
     496         113 :     return result;
     497             :   }
     498             : 
     499          92 :   process::allow apply(const process::allow& x)
     500             :   {
     501          92 :     static_cast<Derived&>(*this).enter(x);
     502          92 :     process::allow result = process::allow(x.allow_set(), static_cast<Derived&>(*this).apply(x.operand()));
     503          92 :     static_cast<Derived&>(*this).leave(x);
     504          92 :     return result;
     505             :   }
     506             : 
     507         199 :   process::sync apply(const process::sync& x)
     508             :   {
     509         199 :     static_cast<Derived&>(*this).enter(x);
     510         199 :     process::sync result = process::sync(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     511         199 :     static_cast<Derived&>(*this).leave(x);
     512         199 :     return result;
     513             :   }
     514             : 
     515         302 :   process::at apply(const process::at& x)
     516             :   {
     517         302 :     static_cast<Derived&>(*this).enter(x);
     518         302 :     process::at result = process::at(static_cast<Derived&>(*this).apply(x.operand()), static_cast<Derived&>(*this).apply(x.time_stamp()));
     519         302 :     static_cast<Derived&>(*this).leave(x);
     520         302 :     return result;
     521             :   }
     522             : 
     523        2635 :   process::seq apply(const process::seq& x)
     524             :   {
     525        2635 :     static_cast<Derived&>(*this).enter(x);
     526        2635 :     process::seq result = process::seq(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     527        2635 :     static_cast<Derived&>(*this).leave(x);
     528        2635 :     return result;
     529             :   }
     530             : 
     531         770 :   process::if_then apply(const process::if_then& x)
     532             :   {
     533         770 :     static_cast<Derived&>(*this).enter(x);
     534         770 :     process::if_then result = process::if_then(static_cast<Derived&>(*this).apply(x.condition()), static_cast<Derived&>(*this).apply(x.then_case()));
     535         770 :     static_cast<Derived&>(*this).leave(x);
     536         770 :     return result;
     537             :   }
     538             : 
     539         120 :   process::if_then_else apply(const process::if_then_else& x)
     540             :   {
     541         120 :     static_cast<Derived&>(*this).enter(x);
     542         120 :     process::if_then_else result = process::if_then_else(static_cast<Derived&>(*this).apply(x.condition()), static_cast<Derived&>(*this).apply(x.then_case()), static_cast<Derived&>(*this).apply(x.else_case()));
     543         120 :     static_cast<Derived&>(*this).leave(x);
     544         120 :     return result;
     545             :   }
     546             : 
     547           0 :   process::bounded_init apply(const process::bounded_init& x)
     548             :   {
     549           0 :     static_cast<Derived&>(*this).enter(x);
     550           0 :     process::bounded_init result = process::bounded_init(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     551           0 :     static_cast<Derived&>(*this).leave(x);
     552           0 :     return result;
     553             :   }
     554             : 
     555         378 :   process::merge apply(const process::merge& x)
     556             :   {
     557         378 :     static_cast<Derived&>(*this).enter(x);
     558         378 :     process::merge result = process::merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     559         378 :     static_cast<Derived&>(*this).leave(x);
     560         378 :     return result;
     561             :   }
     562             : 
     563           0 :   process::left_merge apply(const process::left_merge& x)
     564             :   {
     565           0 :     static_cast<Derived&>(*this).enter(x);
     566           0 :     process::left_merge result = process::left_merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     567           0 :     static_cast<Derived&>(*this).leave(x);
     568           0 :     return result;
     569             :   }
     570             : 
     571        1094 :   process::choice apply(const process::choice& x)
     572             :   {
     573        1094 :     static_cast<Derived&>(*this).enter(x);
     574        1094 :     process::choice result = process::choice(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     575        1094 :     static_cast<Derived&>(*this).leave(x);
     576        1094 :     return result;
     577             :   }
     578             : 
     579         117 :   process::stochastic_operator apply(const process::stochastic_operator& x)
     580             :   {
     581         117 :     static_cast<Derived&>(*this).enter(x);
     582         117 :     process::stochastic_operator result = process::stochastic_operator(x.variables(), static_cast<Derived&>(*this).apply(x.distribution()), static_cast<Derived&>(*this).apply(x.operand()));
     583         117 :     static_cast<Derived&>(*this).leave(x);
     584         117 :     return result;
     585             :   }
     586             : 
     587           0 :   process::untyped_process_assignment apply(const process::untyped_process_assignment& x)
     588             :   {
     589           0 :     static_cast<Derived&>(*this).enter(x);
     590           0 :     process::untyped_process_assignment result = process::untyped_process_assignment(x.name(), static_cast<Derived&>(*this).apply(x.assignments()));
     591           0 :     static_cast<Derived&>(*this).leave(x);
     592           0 :     return result;
     593             :   }
     594             : 
     595       13073 :   process::process_expression apply(const process::process_expression& x)
     596             :   {
     597       13073 :     static_cast<Derived&>(*this).enter(x);
     598       13073 :     process::process_expression result;
     599       13073 :     if (process::is_action(x))
     600             :     {
     601        3238 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::action>(x));
     602             :     }
     603        9835 :     else if (process::is_process_instance(x))
     604             :     {
     605        2052 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance>(x));
     606             :     }
     607        7783 :     else if (process::is_process_instance_assignment(x))
     608             :     {
     609         666 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance_assignment>(x));
     610             :     }
     611        7117 :     else if (process::is_delta(x))
     612             :     {
     613         433 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::delta>(x));
     614             :     }
     615        6684 :     else if (process::is_tau(x))
     616             :     {
     617         132 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::tau>(x));
     618             :     }
     619        6552 :     else if (process::is_sum(x))
     620             :     {
     621         714 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sum>(x));
     622             :     }
     623        5838 :     else if (process::is_block(x))
     624             :     {
     625           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::block>(x));
     626             :     }
     627        5838 :     else if (process::is_hide(x))
     628             :     {
     629          18 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::hide>(x));
     630             :     }
     631        5820 :     else if (process::is_rename(x))
     632             :     {
     633           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::rename>(x));
     634             :     }
     635        5820 :     else if (process::is_comm(x))
     636             :     {
     637         113 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::comm>(x));
     638             :     }
     639        5707 :     else if (process::is_allow(x))
     640             :     {
     641          92 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::allow>(x));
     642             :     }
     643        5615 :     else if (process::is_sync(x))
     644             :     {
     645         199 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sync>(x));
     646             :     }
     647        5416 :     else if (process::is_at(x))
     648             :     {
     649         302 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::at>(x));
     650             :     }
     651        5114 :     else if (process::is_seq(x))
     652             :     {
     653        2635 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::seq>(x));
     654             :     }
     655        2479 :     else if (process::is_if_then(x))
     656             :     {
     657         770 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then>(x));
     658             :     }
     659        1709 :     else if (process::is_if_then_else(x))
     660             :     {
     661         120 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then_else>(x));
     662             :     }
     663        1589 :     else if (process::is_bounded_init(x))
     664             :     {
     665           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::bounded_init>(x));
     666             :     }
     667        1589 :     else if (process::is_merge(x))
     668             :     {
     669         378 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::merge>(x));
     670             :     }
     671        1211 :     else if (process::is_left_merge(x))
     672             :     {
     673           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::left_merge>(x));
     674             :     }
     675        1211 :     else if (process::is_choice(x))
     676             :     {
     677        1094 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::choice>(x));
     678             :     }
     679         117 :     else if (process::is_stochastic_operator(x))
     680             :     {
     681         117 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::stochastic_operator>(x));
     682             :     }
     683           0 :     else if (process::is_untyped_process_assignment(x))
     684             :     {
     685           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::untyped_process_assignment>(x));
     686             :     }
     687           0 :     else if (data::is_untyped_data_parameter(x))
     688             :     {
     689           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<data::untyped_data_parameter>(x));
     690             :     }
     691       13073 :     static_cast<Derived&>(*this).leave(x);
     692       13073 :     return result;
     693             :   }
     694             : 
     695             : };
     696             : 
     697             : /// \brief Builder class
     698             : template <typename Derived>
     699             : struct data_expression_builder: public add_data_expressions<data::data_expression_builder, Derived>
     700             : {
     701             : };
     702             : //--- end generated add_data_expressions code ---//
     703             : 
     704             : //--- start generated add_variables code ---//
     705             : template <template <class> class Builder, class Derived>
     706             : struct add_variables: public Builder<Derived>
     707             : {
     708             :   typedef Builder<Derived> super;
     709             :   using super::enter;
     710             :   using super::leave;
     711             :   using super::update;
     712             :   using super::apply;
     713             : 
     714             :   void update(process::process_specification& x)
     715             :   {
     716             :     static_cast<Derived&>(*this).enter(x);
     717             :     static_cast<Derived&>(*this).update(x.global_variables());
     718             :     static_cast<Derived&>(*this).update(x.equations());
     719             :     x.init() = static_cast<Derived&>(*this).apply(x.init());
     720             :     static_cast<Derived&>(*this).leave(x);
     721             :   }
     722             : 
     723             :   process::process_identifier apply(const process::process_identifier& x)
     724             :   {
     725             :     static_cast<Derived&>(*this).enter(x);
     726             :     process::process_identifier result = process::process_identifier(x.name(), static_cast<Derived&>(*this).apply(x.variables()));
     727             :     static_cast<Derived&>(*this).leave(x);
     728             :     return result;
     729             :   }
     730             : 
     731             :   process::process_equation apply(const process::process_equation& x)
     732             :   {
     733             :     static_cast<Derived&>(*this).enter(x);
     734             :     process::process_equation result = process::process_equation(static_cast<Derived&>(*this).apply(x.identifier()), static_cast<Derived&>(*this).apply(x.formal_parameters()), static_cast<Derived&>(*this).apply(x.expression()));
     735             :     static_cast<Derived&>(*this).leave(x);
     736             :     return result;
     737             :   }
     738             : 
     739             :   process::untyped_multi_action apply(const process::untyped_multi_action& x)
     740             :   {
     741             :     static_cast<Derived&>(*this).enter(x);
     742             :     process::untyped_multi_action result = process::untyped_multi_action(static_cast<Derived&>(*this).apply(x.actions()));
     743             :     static_cast<Derived&>(*this).leave(x);
     744             :     return result;
     745             :   }
     746             : 
     747             :   process::timed_multi_action apply(const process::timed_multi_action& x)
     748             :   {
     749             :     static_cast<Derived&>(*this).enter(x);
     750             :     process::timed_multi_action result = x.has_time() ?
     751             :       process::timed_multi_action(static_cast<Derived&>(*this).apply(x.actions()), static_cast<Derived&>(*this).apply(x.time())) :
     752             :       process::timed_multi_action(static_cast<Derived&>(*this).apply(x.actions()), x.time());
     753             :     static_cast<Derived&>(*this).leave(x);
     754             :     return result;
     755             :   }
     756             : 
     757             :   process::action apply(const process::action& x)
     758             :   {
     759             :     static_cast<Derived&>(*this).enter(x);
     760             :     process::action result = process::action(x.label(), static_cast<Derived&>(*this).apply(x.arguments()));
     761             :     static_cast<Derived&>(*this).leave(x);
     762             :     return result;
     763             :   }
     764             : 
     765             :   process::process_instance apply(const process::process_instance& x)
     766             :   {
     767             :     static_cast<Derived&>(*this).enter(x);
     768             :     process::process_instance result = process::process_instance(static_cast<Derived&>(*this).apply(x.identifier()), static_cast<Derived&>(*this).apply(x.actual_parameters()));
     769             :     static_cast<Derived&>(*this).leave(x);
     770             :     return result;
     771             :   }
     772             : 
     773             :   process::process_instance_assignment apply(const process::process_instance_assignment& x)
     774             :   {
     775             :     static_cast<Derived&>(*this).enter(x);
     776             :     process::process_instance_assignment result = process::process_instance_assignment(static_cast<Derived&>(*this).apply(x.identifier()), static_cast<Derived&>(*this).apply(x.assignments()));
     777             :     static_cast<Derived&>(*this).leave(x);
     778             :     return result;
     779             :   }
     780             : 
     781             :   process::delta apply(const process::delta& x)
     782             :   {
     783             :     static_cast<Derived&>(*this).enter(x);
     784             :     // skip
     785             :     static_cast<Derived&>(*this).leave(x);
     786             :     return x;
     787             :   }
     788             : 
     789             :   process::tau apply(const process::tau& x)
     790             :   {
     791             :     static_cast<Derived&>(*this).enter(x);
     792             :     // skip
     793             :     static_cast<Derived&>(*this).leave(x);
     794             :     return x;
     795             :   }
     796             : 
     797             :   process::sum apply(const process::sum& x)
     798             :   {
     799             :     static_cast<Derived&>(*this).enter(x);
     800             :     process::sum result = process::sum(static_cast<Derived&>(*this).apply(x.variables()), static_cast<Derived&>(*this).apply(x.operand()));
     801             :     static_cast<Derived&>(*this).leave(x);
     802             :     return result;
     803             :   }
     804             : 
     805             :   process::block apply(const process::block& x)
     806             :   {
     807             :     static_cast<Derived&>(*this).enter(x);
     808             :     process::block result = process::block(x.block_set(), static_cast<Derived&>(*this).apply(x.operand()));
     809             :     static_cast<Derived&>(*this).leave(x);
     810             :     return result;
     811             :   }
     812             : 
     813             :   process::hide apply(const process::hide& x)
     814             :   {
     815             :     static_cast<Derived&>(*this).enter(x);
     816             :     process::hide result = process::hide(x.hide_set(), static_cast<Derived&>(*this).apply(x.operand()));
     817             :     static_cast<Derived&>(*this).leave(x);
     818             :     return result;
     819             :   }
     820             : 
     821             :   process::rename apply(const process::rename& x)
     822             :   {
     823             :     static_cast<Derived&>(*this).enter(x);
     824             :     process::rename result = process::rename(x.rename_set(), static_cast<Derived&>(*this).apply(x.operand()));
     825             :     static_cast<Derived&>(*this).leave(x);
     826             :     return result;
     827             :   }
     828             : 
     829             :   process::comm apply(const process::comm& x)
     830             :   {
     831             :     static_cast<Derived&>(*this).enter(x);
     832             :     process::comm result = process::comm(x.comm_set(), static_cast<Derived&>(*this).apply(x.operand()));
     833             :     static_cast<Derived&>(*this).leave(x);
     834             :     return result;
     835             :   }
     836             : 
     837             :   process::allow apply(const process::allow& x)
     838             :   {
     839             :     static_cast<Derived&>(*this).enter(x);
     840             :     process::allow result = process::allow(x.allow_set(), static_cast<Derived&>(*this).apply(x.operand()));
     841             :     static_cast<Derived&>(*this).leave(x);
     842             :     return result;
     843             :   }
     844             : 
     845             :   process::sync apply(const process::sync& x)
     846             :   {
     847             :     static_cast<Derived&>(*this).enter(x);
     848             :     process::sync result = process::sync(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     849             :     static_cast<Derived&>(*this).leave(x);
     850             :     return result;
     851             :   }
     852             : 
     853             :   process::at apply(const process::at& x)
     854             :   {
     855             :     static_cast<Derived&>(*this).enter(x);
     856             :     process::at result = process::at(static_cast<Derived&>(*this).apply(x.operand()), static_cast<Derived&>(*this).apply(x.time_stamp()));
     857             :     static_cast<Derived&>(*this).leave(x);
     858             :     return result;
     859             :   }
     860             : 
     861             :   process::seq apply(const process::seq& x)
     862             :   {
     863             :     static_cast<Derived&>(*this).enter(x);
     864             :     process::seq result = process::seq(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     865             :     static_cast<Derived&>(*this).leave(x);
     866             :     return result;
     867             :   }
     868             : 
     869             :   process::if_then apply(const process::if_then& x)
     870             :   {
     871             :     static_cast<Derived&>(*this).enter(x);
     872             :     process::if_then result = process::if_then(static_cast<Derived&>(*this).apply(x.condition()), static_cast<Derived&>(*this).apply(x.then_case()));
     873             :     static_cast<Derived&>(*this).leave(x);
     874             :     return result;
     875             :   }
     876             : 
     877             :   process::if_then_else apply(const process::if_then_else& x)
     878             :   {
     879             :     static_cast<Derived&>(*this).enter(x);
     880             :     process::if_then_else result = process::if_then_else(static_cast<Derived&>(*this).apply(x.condition()), static_cast<Derived&>(*this).apply(x.then_case()), static_cast<Derived&>(*this).apply(x.else_case()));
     881             :     static_cast<Derived&>(*this).leave(x);
     882             :     return result;
     883             :   }
     884             : 
     885             :   process::bounded_init apply(const process::bounded_init& x)
     886             :   {
     887             :     static_cast<Derived&>(*this).enter(x);
     888             :     process::bounded_init result = process::bounded_init(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     889             :     static_cast<Derived&>(*this).leave(x);
     890             :     return result;
     891             :   }
     892             : 
     893             :   process::merge apply(const process::merge& x)
     894             :   {
     895             :     static_cast<Derived&>(*this).enter(x);
     896             :     process::merge result = process::merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     897             :     static_cast<Derived&>(*this).leave(x);
     898             :     return result;
     899             :   }
     900             : 
     901             :   process::left_merge apply(const process::left_merge& x)
     902             :   {
     903             :     static_cast<Derived&>(*this).enter(x);
     904             :     process::left_merge result = process::left_merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     905             :     static_cast<Derived&>(*this).leave(x);
     906             :     return result;
     907             :   }
     908             : 
     909             :   process::choice apply(const process::choice& x)
     910             :   {
     911             :     static_cast<Derived&>(*this).enter(x);
     912             :     process::choice result = process::choice(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     913             :     static_cast<Derived&>(*this).leave(x);
     914             :     return result;
     915             :   }
     916             : 
     917             :   process::stochastic_operator apply(const process::stochastic_operator& x)
     918             :   {
     919             :     static_cast<Derived&>(*this).enter(x);
     920             :     process::stochastic_operator result = process::stochastic_operator(static_cast<Derived&>(*this).apply(x.variables()), static_cast<Derived&>(*this).apply(x.distribution()), static_cast<Derived&>(*this).apply(x.operand()));
     921             :     static_cast<Derived&>(*this).leave(x);
     922             :     return result;
     923             :   }
     924             : 
     925             :   process::untyped_process_assignment apply(const process::untyped_process_assignment& x)
     926             :   {
     927             :     static_cast<Derived&>(*this).enter(x);
     928             :     process::untyped_process_assignment result = process::untyped_process_assignment(x.name(), static_cast<Derived&>(*this).apply(x.assignments()));
     929             :     static_cast<Derived&>(*this).leave(x);
     930             :     return result;
     931             :   }
     932             : 
     933             :   process::process_expression apply(const process::process_expression& x)
     934             :   {
     935             :     static_cast<Derived&>(*this).enter(x);
     936             :     process::process_expression result;
     937             :     if (process::is_action(x))
     938             :     {
     939             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::action>(x));
     940             :     }
     941             :     else if (process::is_process_instance(x))
     942             :     {
     943             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance>(x));
     944             :     }
     945             :     else if (process::is_process_instance_assignment(x))
     946             :     {
     947             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance_assignment>(x));
     948             :     }
     949             :     else if (process::is_delta(x))
     950             :     {
     951             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::delta>(x));
     952             :     }
     953             :     else if (process::is_tau(x))
     954             :     {
     955             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::tau>(x));
     956             :     }
     957             :     else if (process::is_sum(x))
     958             :     {
     959             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sum>(x));
     960             :     }
     961             :     else if (process::is_block(x))
     962             :     {
     963             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::block>(x));
     964             :     }
     965             :     else if (process::is_hide(x))
     966             :     {
     967             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::hide>(x));
     968             :     }
     969             :     else if (process::is_rename(x))
     970             :     {
     971             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::rename>(x));
     972             :     }
     973             :     else if (process::is_comm(x))
     974             :     {
     975             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::comm>(x));
     976             :     }
     977             :     else if (process::is_allow(x))
     978             :     {
     979             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::allow>(x));
     980             :     }
     981             :     else if (process::is_sync(x))
     982             :     {
     983             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sync>(x));
     984             :     }
     985             :     else if (process::is_at(x))
     986             :     {
     987             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::at>(x));
     988             :     }
     989             :     else if (process::is_seq(x))
     990             :     {
     991             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::seq>(x));
     992             :     }
     993             :     else if (process::is_if_then(x))
     994             :     {
     995             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then>(x));
     996             :     }
     997             :     else if (process::is_if_then_else(x))
     998             :     {
     999             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then_else>(x));
    1000             :     }
    1001             :     else if (process::is_bounded_init(x))
    1002             :     {
    1003             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::bounded_init>(x));
    1004             :     }
    1005             :     else if (process::is_merge(x))
    1006             :     {
    1007             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::merge>(x));
    1008             :     }
    1009             :     else if (process::is_left_merge(x))
    1010             :     {
    1011             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::left_merge>(x));
    1012             :     }
    1013             :     else if (process::is_choice(x))
    1014             :     {
    1015             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::choice>(x));
    1016             :     }
    1017             :     else if (process::is_stochastic_operator(x))
    1018             :     {
    1019             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::stochastic_operator>(x));
    1020             :     }
    1021             :     else if (process::is_untyped_process_assignment(x))
    1022             :     {
    1023             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::untyped_process_assignment>(x));
    1024             :     }
    1025             :     else if (data::is_untyped_data_parameter(x))
    1026             :     {
    1027             :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<data::untyped_data_parameter>(x));
    1028             :     }
    1029             :     static_cast<Derived&>(*this).leave(x);
    1030             :     return result;
    1031             :   }
    1032             : 
    1033             : };
    1034             : 
    1035             : /// \brief Builder class
    1036             : template <typename Derived>
    1037             : struct variable_builder: public add_variables<data::data_expression_builder, Derived>
    1038             : {
    1039             : };
    1040             : //--- end generated add_variables code ---//
    1041             : 
    1042             : // Adds process expression traversal to a builder
    1043             : //--- start generated add_process_expressions code ---//
    1044             : template <template <class> class Builder, class Derived>
    1045             : struct add_process_expressions: public Builder<Derived>
    1046             : {
    1047             :   typedef Builder<Derived> super;
    1048             :   using super::enter;
    1049             :   using super::leave;
    1050             :   using super::update;
    1051             :   using super::apply;
    1052             : 
    1053           0 :   void update(process::process_specification& x)
    1054             :   {
    1055           0 :     static_cast<Derived&>(*this).enter(x);
    1056           0 :     static_cast<Derived&>(*this).update(x.equations());
    1057           0 :     x.init() = static_cast<Derived&>(*this).apply(x.init());
    1058           0 :     static_cast<Derived&>(*this).leave(x);
    1059           0 :   }
    1060             : 
    1061           0 :   process::process_equation apply(const process::process_equation& x)
    1062             :   {
    1063           0 :     static_cast<Derived&>(*this).enter(x);
    1064           0 :     process::process_equation result = process::process_equation(x.identifier(), x.formal_parameters(), static_cast<Derived&>(*this).apply(x.expression()));
    1065           0 :     static_cast<Derived&>(*this).leave(x);
    1066           0 :     return result;
    1067             :   }
    1068             : 
    1069           0 :   process::action apply(const process::action& x)
    1070             :   {
    1071           0 :     static_cast<Derived&>(*this).enter(x);
    1072             :     // skip
    1073           0 :     static_cast<Derived&>(*this).leave(x);
    1074           0 :     return x;
    1075             :   }
    1076             : 
    1077           0 :   process::process_instance apply(const process::process_instance& x)
    1078             :   {
    1079           0 :     static_cast<Derived&>(*this).enter(x);
    1080             :     // skip
    1081           0 :     static_cast<Derived&>(*this).leave(x);
    1082           0 :     return x;
    1083             :   }
    1084             : 
    1085           0 :   process::process_instance_assignment apply(const process::process_instance_assignment& x)
    1086             :   {
    1087           0 :     static_cast<Derived&>(*this).enter(x);
    1088             :     // skip
    1089           0 :     static_cast<Derived&>(*this).leave(x);
    1090           0 :     return x;
    1091             :   }
    1092             : 
    1093         533 :   process::delta apply(const process::delta& x)
    1094             :   {
    1095         533 :     static_cast<Derived&>(*this).enter(x);
    1096             :     // skip
    1097         533 :     static_cast<Derived&>(*this).leave(x);
    1098         533 :     return x;
    1099             :   }
    1100             : 
    1101         135 :   process::tau apply(const process::tau& x)
    1102             :   {
    1103         135 :     static_cast<Derived&>(*this).enter(x);
    1104             :     // skip
    1105         135 :     static_cast<Derived&>(*this).leave(x);
    1106         135 :     return x;
    1107             :   }
    1108             : 
    1109           0 :   process::sum apply(const process::sum& x)
    1110             :   {
    1111           0 :     static_cast<Derived&>(*this).enter(x);
    1112           0 :     process::sum result = process::sum(x.variables(), static_cast<Derived&>(*this).apply(x.operand()));
    1113           0 :     static_cast<Derived&>(*this).leave(x);
    1114           0 :     return result;
    1115             :   }
    1116             : 
    1117           0 :   process::block apply(const process::block& x)
    1118             :   {
    1119           0 :     static_cast<Derived&>(*this).enter(x);
    1120           0 :     process::block result = process::block(x.block_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1121           0 :     static_cast<Derived&>(*this).leave(x);
    1122           0 :     return result;
    1123             :   }
    1124             : 
    1125           0 :   process::hide apply(const process::hide& x)
    1126             :   {
    1127           0 :     static_cast<Derived&>(*this).enter(x);
    1128           0 :     process::hide result = process::hide(x.hide_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1129           0 :     static_cast<Derived&>(*this).leave(x);
    1130           0 :     return result;
    1131             :   }
    1132             : 
    1133           0 :   process::rename apply(const process::rename& x)
    1134             :   {
    1135           0 :     static_cast<Derived&>(*this).enter(x);
    1136           0 :     process::rename result = process::rename(x.rename_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1137           0 :     static_cast<Derived&>(*this).leave(x);
    1138           0 :     return result;
    1139             :   }
    1140             : 
    1141           0 :   process::comm apply(const process::comm& x)
    1142             :   {
    1143           0 :     static_cast<Derived&>(*this).enter(x);
    1144           0 :     process::comm result = process::comm(x.comm_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1145           0 :     static_cast<Derived&>(*this).leave(x);
    1146           0 :     return result;
    1147             :   }
    1148             : 
    1149           0 :   process::allow apply(const process::allow& x)
    1150             :   {
    1151           0 :     static_cast<Derived&>(*this).enter(x);
    1152           0 :     process::allow result = process::allow(x.allow_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1153           0 :     static_cast<Derived&>(*this).leave(x);
    1154           0 :     return result;
    1155             :   }
    1156             : 
    1157         199 :   process::sync apply(const process::sync& x)
    1158             :   {
    1159         199 :     static_cast<Derived&>(*this).enter(x);
    1160         199 :     process::sync result = process::sync(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1161         199 :     static_cast<Derived&>(*this).leave(x);
    1162         199 :     return result;
    1163             :   }
    1164             : 
    1165           0 :   process::at apply(const process::at& x)
    1166             :   {
    1167           0 :     static_cast<Derived&>(*this).enter(x);
    1168           0 :     process::at result = process::at(static_cast<Derived&>(*this).apply(x.operand()), x.time_stamp());
    1169           0 :     static_cast<Derived&>(*this).leave(x);
    1170           0 :     return result;
    1171             :   }
    1172             : 
    1173        2504 :   process::seq apply(const process::seq& x)
    1174             :   {
    1175        2504 :     static_cast<Derived&>(*this).enter(x);
    1176        2504 :     process::seq result = process::seq(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1177        2502 :     static_cast<Derived&>(*this).leave(x);
    1178        2502 :     return result;
    1179             :   }
    1180             : 
    1181           0 :   process::if_then apply(const process::if_then& x)
    1182             :   {
    1183           0 :     static_cast<Derived&>(*this).enter(x);
    1184           0 :     process::if_then result = process::if_then(x.condition(), static_cast<Derived&>(*this).apply(x.then_case()));
    1185           0 :     static_cast<Derived&>(*this).leave(x);
    1186           0 :     return result;
    1187             :   }
    1188             : 
    1189           0 :   process::if_then_else apply(const process::if_then_else& x)
    1190             :   {
    1191           0 :     static_cast<Derived&>(*this).enter(x);
    1192           0 :     process::if_then_else result = process::if_then_else(x.condition(), static_cast<Derived&>(*this).apply(x.then_case()), static_cast<Derived&>(*this).apply(x.else_case()));
    1193           0 :     static_cast<Derived&>(*this).leave(x);
    1194           0 :     return result;
    1195             :   }
    1196             : 
    1197           0 :   process::bounded_init apply(const process::bounded_init& x)
    1198             :   {
    1199           0 :     static_cast<Derived&>(*this).enter(x);
    1200           0 :     process::bounded_init result = process::bounded_init(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1201           0 :     static_cast<Derived&>(*this).leave(x);
    1202           0 :     return result;
    1203             :   }
    1204             : 
    1205         378 :   process::merge apply(const process::merge& x)
    1206             :   {
    1207         378 :     static_cast<Derived&>(*this).enter(x);
    1208         378 :     process::merge result = process::merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1209         378 :     static_cast<Derived&>(*this).leave(x);
    1210         378 :     return result;
    1211             :   }
    1212             : 
    1213           0 :   process::left_merge apply(const process::left_merge& x)
    1214             :   {
    1215           0 :     static_cast<Derived&>(*this).enter(x);
    1216           0 :     process::left_merge result = process::left_merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1217           0 :     static_cast<Derived&>(*this).leave(x);
    1218           0 :     return result;
    1219             :   }
    1220             : 
    1221         995 :   process::choice apply(const process::choice& x)
    1222             :   {
    1223         995 :     static_cast<Derived&>(*this).enter(x);
    1224         995 :     process::choice result = process::choice(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1225         995 :     static_cast<Derived&>(*this).leave(x);
    1226         995 :     return result;
    1227             :   }
    1228             : 
    1229           0 :   process::stochastic_operator apply(const process::stochastic_operator& x)
    1230             :   {
    1231           0 :     static_cast<Derived&>(*this).enter(x);
    1232           0 :     process::stochastic_operator result = process::stochastic_operator(x.variables(), x.distribution(), static_cast<Derived&>(*this).apply(x.operand()));
    1233           0 :     static_cast<Derived&>(*this).leave(x);
    1234           0 :     return result;
    1235             :   }
    1236             : 
    1237           0 :   process::untyped_process_assignment apply(const process::untyped_process_assignment& x)
    1238             :   {
    1239           0 :     static_cast<Derived&>(*this).enter(x);
    1240             :     // skip
    1241           0 :     static_cast<Derived&>(*this).leave(x);
    1242           0 :     return x;
    1243             :   }
    1244             : 
    1245       12571 :   process::process_expression apply(const process::process_expression& x)
    1246             :   {
    1247       12571 :     static_cast<Derived&>(*this).enter(x);
    1248       12571 :     process::process_expression result;
    1249       12571 :     if (process::is_action(x))
    1250             :     {
    1251           5 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::action>(x));
    1252             :     }
    1253       12566 :     else if (process::is_process_instance(x))
    1254             :     {
    1255           2 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance>(x));
    1256             :     }
    1257       12564 :     else if (process::is_process_instance_assignment(x))
    1258             :     {
    1259           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance_assignment>(x));
    1260             :     }
    1261       12564 :     else if (process::is_delta(x))
    1262             :     {
    1263         533 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::delta>(x));
    1264             :     }
    1265       12031 :     else if (process::is_tau(x))
    1266             :     {
    1267         135 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::tau>(x));
    1268             :     }
    1269       11896 :     else if (process::is_sum(x))
    1270             :     {
    1271         706 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sum>(x));
    1272             :     }
    1273       11190 :     else if (process::is_block(x))
    1274             :     {
    1275           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::block>(x));
    1276             :     }
    1277       11190 :     else if (process::is_hide(x))
    1278             :     {
    1279          18 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::hide>(x));
    1280             :     }
    1281       11172 :     else if (process::is_rename(x))
    1282             :     {
    1283           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::rename>(x));
    1284             :     }
    1285       11172 :     else if (process::is_comm(x))
    1286             :     {
    1287         113 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::comm>(x));
    1288             :     }
    1289       11059 :     else if (process::is_allow(x))
    1290             :     {
    1291          93 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::allow>(x));
    1292             :     }
    1293       10966 :     else if (process::is_sync(x))
    1294             :     {
    1295         199 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sync>(x));
    1296             :     }
    1297       10767 :     else if (process::is_at(x))
    1298             :     {
    1299         301 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::at>(x));
    1300             :     }
    1301       10466 :     else if (process::is_seq(x))
    1302             :     {
    1303        2504 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::seq>(x));
    1304             :     }
    1305        7962 :     else if (process::is_if_then(x))
    1306             :     {
    1307         665 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then>(x));
    1308             :     }
    1309        7297 :     else if (process::is_if_then_else(x))
    1310             :     {
    1311         121 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then_else>(x));
    1312             :     }
    1313        7176 :     else if (process::is_bounded_init(x))
    1314             :     {
    1315           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::bounded_init>(x));
    1316             :     }
    1317        7176 :     else if (process::is_merge(x))
    1318             :     {
    1319         378 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::merge>(x));
    1320             :     }
    1321        6798 :     else if (process::is_left_merge(x))
    1322             :     {
    1323           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::left_merge>(x));
    1324             :     }
    1325        6798 :     else if (process::is_choice(x))
    1326             :     {
    1327         996 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::choice>(x));
    1328             :     }
    1329        5802 :     else if (process::is_stochastic_operator(x))
    1330             :     {
    1331         116 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::stochastic_operator>(x));
    1332             :     }
    1333        5686 :     else if (process::is_untyped_process_assignment(x))
    1334             :     {
    1335         534 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::untyped_process_assignment>(x));
    1336             :     }
    1337        5152 :     else if (data::is_untyped_data_parameter(x))
    1338             :     {
    1339        5152 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<data::untyped_data_parameter>(x));
    1340             :     }
    1341       12564 :     static_cast<Derived&>(*this).leave(x);
    1342       12564 :     return result;
    1343             :   }
    1344             : 
    1345             : };
    1346             : 
    1347             : /// \brief Builder class
    1348             : template <typename Derived>
    1349             : struct process_expression_builder: public add_process_expressions<core::builder, Derived>
    1350             : {
    1351             : };
    1352             : //--- end generated add_process_expressions code ---//
    1353             : 
    1354             : //--- start generated add_process_identifiers code ---//
    1355             : template <template <class> class Builder, class Derived>
    1356             : struct add_process_identifiers: public Builder<Derived>
    1357             : {
    1358             :   typedef Builder<Derived> super;
    1359             :   using super::enter;
    1360             :   using super::leave;
    1361             :   using super::update;
    1362             :   using super::apply;
    1363             : 
    1364             :   void update(process::process_specification& x)
    1365             :   {
    1366             :     static_cast<Derived&>(*this).enter(x);
    1367             :     static_cast<Derived&>(*this).update(x.equations());
    1368             :     x.init() = static_cast<Derived&>(*this).apply(x.init());
    1369             :     static_cast<Derived&>(*this).leave(x);
    1370             :   }
    1371             : 
    1372             :   process::process_identifier apply(const process::process_identifier& x)
    1373             :   {
    1374             :     static_cast<Derived&>(*this).enter(x);
    1375             :     // skip
    1376             :     static_cast<Derived&>(*this).leave(x);
    1377             :     return x;
    1378             :   }
    1379             : 
    1380             :   process::process_equation apply(const process::process_equation& x)
    1381             :   {
    1382             :     static_cast<Derived&>(*this).enter(x);
    1383             :     process::process_equation result = process::process_equation(static_cast<Derived&>(*this).apply(x.identifier()), x.formal_parameters(), static_cast<Derived&>(*this).apply(x.expression()));
    1384             :     static_cast<Derived&>(*this).leave(x);
    1385             :     return result;
    1386             :   }
    1387             : 
    1388           5 :   process::action apply(const process::action& x)
    1389             :   {
    1390           5 :     static_cast<Derived&>(*this).enter(x);
    1391             :     // skip
    1392           5 :     static_cast<Derived&>(*this).leave(x);
    1393           5 :     return x;
    1394             :   }
    1395             : 
    1396           8 :   process::process_instance apply(const process::process_instance& x)
    1397             :   {
    1398           8 :     static_cast<Derived&>(*this).enter(x);
    1399           8 :     process::process_instance result = process::process_instance(static_cast<Derived&>(*this).apply(x.identifier()), x.actual_parameters());
    1400           8 :     static_cast<Derived&>(*this).leave(x);
    1401           8 :     return result;
    1402             :   }
    1403             : 
    1404           1 :   process::process_instance_assignment apply(const process::process_instance_assignment& x)
    1405             :   {
    1406           1 :     static_cast<Derived&>(*this).enter(x);
    1407           1 :     process::process_instance_assignment result = process::process_instance_assignment(static_cast<Derived&>(*this).apply(x.identifier()), x.assignments());
    1408           1 :     static_cast<Derived&>(*this).leave(x);
    1409           1 :     return result;
    1410             :   }
    1411             : 
    1412           0 :   process::delta apply(const process::delta& x)
    1413             :   {
    1414           0 :     static_cast<Derived&>(*this).enter(x);
    1415             :     // skip
    1416           0 :     static_cast<Derived&>(*this).leave(x);
    1417           0 :     return x;
    1418             :   }
    1419             : 
    1420           0 :   process::tau apply(const process::tau& x)
    1421             :   {
    1422           0 :     static_cast<Derived&>(*this).enter(x);
    1423             :     // skip
    1424           0 :     static_cast<Derived&>(*this).leave(x);
    1425           0 :     return x;
    1426             :   }
    1427             : 
    1428           2 :   process::sum apply(const process::sum& x)
    1429             :   {
    1430           2 :     static_cast<Derived&>(*this).enter(x);
    1431           2 :     process::sum result = process::sum(x.variables(), static_cast<Derived&>(*this).apply(x.operand()));
    1432           2 :     static_cast<Derived&>(*this).leave(x);
    1433           2 :     return result;
    1434             :   }
    1435             : 
    1436           0 :   process::block apply(const process::block& x)
    1437             :   {
    1438           0 :     static_cast<Derived&>(*this).enter(x);
    1439           0 :     process::block result = process::block(x.block_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1440           0 :     static_cast<Derived&>(*this).leave(x);
    1441           0 :     return result;
    1442             :   }
    1443             : 
    1444           0 :   process::hide apply(const process::hide& x)
    1445             :   {
    1446           0 :     static_cast<Derived&>(*this).enter(x);
    1447           0 :     process::hide result = process::hide(x.hide_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1448           0 :     static_cast<Derived&>(*this).leave(x);
    1449           0 :     return result;
    1450             :   }
    1451             : 
    1452           0 :   process::rename apply(const process::rename& x)
    1453             :   {
    1454           0 :     static_cast<Derived&>(*this).enter(x);
    1455           0 :     process::rename result = process::rename(x.rename_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1456           0 :     static_cast<Derived&>(*this).leave(x);
    1457           0 :     return result;
    1458             :   }
    1459             : 
    1460           0 :   process::comm apply(const process::comm& x)
    1461             :   {
    1462           0 :     static_cast<Derived&>(*this).enter(x);
    1463           0 :     process::comm result = process::comm(x.comm_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1464           0 :     static_cast<Derived&>(*this).leave(x);
    1465           0 :     return result;
    1466             :   }
    1467             : 
    1468           1 :   process::allow apply(const process::allow& x)
    1469             :   {
    1470           1 :     static_cast<Derived&>(*this).enter(x);
    1471           1 :     process::allow result = process::allow(x.allow_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1472           1 :     static_cast<Derived&>(*this).leave(x);
    1473           1 :     return result;
    1474             :   }
    1475             : 
    1476           0 :   process::sync apply(const process::sync& x)
    1477             :   {
    1478           0 :     static_cast<Derived&>(*this).enter(x);
    1479           0 :     process::sync result = process::sync(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1480           0 :     static_cast<Derived&>(*this).leave(x);
    1481           0 :     return result;
    1482             :   }
    1483             : 
    1484           0 :   process::at apply(const process::at& x)
    1485             :   {
    1486           0 :     static_cast<Derived&>(*this).enter(x);
    1487           0 :     process::at result = process::at(static_cast<Derived&>(*this).apply(x.operand()), x.time_stamp());
    1488           0 :     static_cast<Derived&>(*this).leave(x);
    1489           0 :     return result;
    1490             :   }
    1491             : 
    1492           6 :   process::seq apply(const process::seq& x)
    1493             :   {
    1494           6 :     static_cast<Derived&>(*this).enter(x);
    1495           6 :     process::seq result = process::seq(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1496           6 :     static_cast<Derived&>(*this).leave(x);
    1497           6 :     return result;
    1498             :   }
    1499             : 
    1500           0 :   process::if_then apply(const process::if_then& x)
    1501             :   {
    1502           0 :     static_cast<Derived&>(*this).enter(x);
    1503           0 :     process::if_then result = process::if_then(x.condition(), static_cast<Derived&>(*this).apply(x.then_case()));
    1504           0 :     static_cast<Derived&>(*this).leave(x);
    1505           0 :     return result;
    1506             :   }
    1507             : 
    1508           0 :   process::if_then_else apply(const process::if_then_else& x)
    1509             :   {
    1510           0 :     static_cast<Derived&>(*this).enter(x);
    1511           0 :     process::if_then_else result = process::if_then_else(x.condition(), static_cast<Derived&>(*this).apply(x.then_case()), static_cast<Derived&>(*this).apply(x.else_case()));
    1512           0 :     static_cast<Derived&>(*this).leave(x);
    1513           0 :     return result;
    1514             :   }
    1515             : 
    1516           0 :   process::bounded_init apply(const process::bounded_init& x)
    1517             :   {
    1518           0 :     static_cast<Derived&>(*this).enter(x);
    1519           0 :     process::bounded_init result = process::bounded_init(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1520           0 :     static_cast<Derived&>(*this).leave(x);
    1521           0 :     return result;
    1522             :   }
    1523             : 
    1524           0 :   process::merge apply(const process::merge& x)
    1525             :   {
    1526           0 :     static_cast<Derived&>(*this).enter(x);
    1527           0 :     process::merge result = process::merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1528           0 :     static_cast<Derived&>(*this).leave(x);
    1529           0 :     return result;
    1530             :   }
    1531             : 
    1532           0 :   process::left_merge apply(const process::left_merge& x)
    1533             :   {
    1534           0 :     static_cast<Derived&>(*this).enter(x);
    1535           0 :     process::left_merge result = process::left_merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1536           0 :     static_cast<Derived&>(*this).leave(x);
    1537           0 :     return result;
    1538             :   }
    1539             : 
    1540           0 :   process::choice apply(const process::choice& x)
    1541             :   {
    1542           0 :     static_cast<Derived&>(*this).enter(x);
    1543           0 :     process::choice result = process::choice(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1544           0 :     static_cast<Derived&>(*this).leave(x);
    1545           0 :     return result;
    1546             :   }
    1547             : 
    1548           0 :   process::stochastic_operator apply(const process::stochastic_operator& x)
    1549             :   {
    1550           0 :     static_cast<Derived&>(*this).enter(x);
    1551           0 :     process::stochastic_operator result = process::stochastic_operator(x.variables(), x.distribution(), static_cast<Derived&>(*this).apply(x.operand()));
    1552           0 :     static_cast<Derived&>(*this).leave(x);
    1553           0 :     return result;
    1554             :   }
    1555             : 
    1556           0 :   process::untyped_process_assignment apply(const process::untyped_process_assignment& x)
    1557             :   {
    1558           0 :     static_cast<Derived&>(*this).enter(x);
    1559             :     // skip
    1560           0 :     static_cast<Derived&>(*this).leave(x);
    1561           0 :     return x;
    1562             :   }
    1563             : 
    1564          23 :   process::process_expression apply(const process::process_expression& x)
    1565             :   {
    1566          23 :     static_cast<Derived&>(*this).enter(x);
    1567          23 :     process::process_expression result;
    1568          23 :     if (process::is_action(x))
    1569             :     {
    1570           5 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::action>(x));
    1571             :     }
    1572          18 :     else if (process::is_process_instance(x))
    1573             :     {
    1574           8 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance>(x));
    1575             :     }
    1576          10 :     else if (process::is_process_instance_assignment(x))
    1577             :     {
    1578           1 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance_assignment>(x));
    1579             :     }
    1580           9 :     else if (process::is_delta(x))
    1581             :     {
    1582           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::delta>(x));
    1583             :     }
    1584           9 :     else if (process::is_tau(x))
    1585             :     {
    1586           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::tau>(x));
    1587             :     }
    1588           9 :     else if (process::is_sum(x))
    1589             :     {
    1590           2 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sum>(x));
    1591             :     }
    1592           7 :     else if (process::is_block(x))
    1593             :     {
    1594           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::block>(x));
    1595             :     }
    1596           7 :     else if (process::is_hide(x))
    1597             :     {
    1598           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::hide>(x));
    1599             :     }
    1600           7 :     else if (process::is_rename(x))
    1601             :     {
    1602           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::rename>(x));
    1603             :     }
    1604           7 :     else if (process::is_comm(x))
    1605             :     {
    1606           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::comm>(x));
    1607             :     }
    1608           7 :     else if (process::is_allow(x))
    1609             :     {
    1610           1 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::allow>(x));
    1611             :     }
    1612           6 :     else if (process::is_sync(x))
    1613             :     {
    1614           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sync>(x));
    1615             :     }
    1616           6 :     else if (process::is_at(x))
    1617             :     {
    1618           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::at>(x));
    1619             :     }
    1620           6 :     else if (process::is_seq(x))
    1621             :     {
    1622           6 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::seq>(x));
    1623             :     }
    1624           0 :     else if (process::is_if_then(x))
    1625             :     {
    1626           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then>(x));
    1627             :     }
    1628           0 :     else if (process::is_if_then_else(x))
    1629             :     {
    1630           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then_else>(x));
    1631             :     }
    1632           0 :     else if (process::is_bounded_init(x))
    1633             :     {
    1634           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::bounded_init>(x));
    1635             :     }
    1636           0 :     else if (process::is_merge(x))
    1637             :     {
    1638           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::merge>(x));
    1639             :     }
    1640           0 :     else if (process::is_left_merge(x))
    1641             :     {
    1642           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::left_merge>(x));
    1643             :     }
    1644           0 :     else if (process::is_choice(x))
    1645             :     {
    1646           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::choice>(x));
    1647             :     }
    1648           0 :     else if (process::is_stochastic_operator(x))
    1649             :     {
    1650           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::stochastic_operator>(x));
    1651             :     }
    1652           0 :     else if (process::is_untyped_process_assignment(x))
    1653             :     {
    1654           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::untyped_process_assignment>(x));
    1655             :     }
    1656           0 :     else if (data::is_untyped_data_parameter(x))
    1657             :     {
    1658           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<data::untyped_data_parameter>(x));
    1659             :     }
    1660          23 :     static_cast<Derived&>(*this).leave(x);
    1661          23 :     return result;
    1662             :   }
    1663             : 
    1664             : };
    1665             : 
    1666             : /// \brief Builder class
    1667             : template <typename Derived>
    1668             : struct process_identifier_builder: public add_process_identifiers<core::builder, Derived>
    1669             : {
    1670             : };
    1671             : //--- end generated add_process_identifiers code ---//
    1672             : 
    1673             : } // namespace process
    1674             : 
    1675             : } // namespace mcrl2
    1676             : 
    1677             : #endif // MCRL2_PROCESS_BUILDER_H

Generated by: LCOV version 1.13