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: 517 649 79.7 %
Date: 2020-02-19 00:44:21 Functions: 113 217 52.1 %
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        3229 :   process::action_label apply(const process::action_label& x)
      38             :   {
      39        3229 :     static_cast<Derived&>(*this).enter(x);
      40        3229 :     process::action_label result = process::action_label(x.name(), static_cast<Derived&>(*this).apply(x.sorts()));
      41        3229 :     static_cast<Derived&>(*this).leave(x);
      42        3229 :     return result;
      43             :   }
      44             : 
      45         951 :   void update(process::process_specification& x)
      46             :   {
      47         951 :     static_cast<Derived&>(*this).enter(x);
      48         951 :     x.action_labels() = static_cast<Derived&>(*this).apply(x.action_labels());
      49         951 :     static_cast<Derived&>(*this).update(x.global_variables());
      50         951 :     static_cast<Derived&>(*this).update(x.equations());
      51         951 :     x.init() = static_cast<Derived&>(*this).apply(x.init());
      52         951 :     static_cast<Derived&>(*this).leave(x);
      53         951 :   }
      54             : 
      55        1102 :   process::process_identifier apply(const process::process_identifier& x)
      56             :   {
      57        1102 :     static_cast<Derived&>(*this).enter(x);
      58        1102 :     process::process_identifier result = process::process_identifier(x.name(), static_cast<Derived&>(*this).apply(x.variables()));
      59        1102 :     static_cast<Derived&>(*this).leave(x);
      60        1102 :     return result;
      61             :   }
      62             : 
      63        1102 :   process::process_equation apply(const process::process_equation& x)
      64             :   {
      65        1102 :     static_cast<Derived&>(*this).enter(x);
      66        1102 :     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        1102 :     static_cast<Derived&>(*this).leave(x);
      68        1102 :     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         197 :   process::sync apply(const process::sync& x)
     178             :   {
     179         197 :     static_cast<Derived&>(*this).enter(x);
     180         197 :     process::sync result = process::sync(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     181         197 :     static_cast<Derived&>(*this).leave(x);
     182         197 :     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        2501 :   process::seq apply(const process::seq& x)
     194             :   {
     195        2501 :     static_cast<Derived&>(*this).enter(x);
     196        2501 :     process::seq result = process::seq(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     197        2501 :     static_cast<Derived&>(*this).leave(x);
     198        2501 :     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         994 :   process::choice apply(const process::choice& x)
     242             :   {
     243         994 :     static_cast<Derived&>(*this).enter(x);
     244         994 :     process::choice result = process::choice(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     245         994 :     static_cast<Derived&>(*this).leave(x);
     246         994 :     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         535 :   process::untyped_process_assignment apply(const process::untyped_process_assignment& x)
     258             :   {
     259         535 :     static_cast<Derived&>(*this).enter(x);
     260         535 :     process::untyped_process_assignment result = process::untyped_process_assignment(x.name(), static_cast<Derived&>(*this).apply(x.assignments()));
     261         535 :     static_cast<Derived&>(*this).leave(x);
     262         535 :     return result;
     263             :   }
     264             : 
     265       12465 :   process::process_expression apply(const process::process_expression& x)
     266             :   {
     267       12465 :     static_cast<Derived&>(*this).enter(x);
     268       12465 :     process::process_expression result;
     269       12465 :     if (process::is_action(x))
     270             :     {
     271           8 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::action>(x));
     272             :     }
     273       12457 :     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       12457 :     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       12457 :     else if (process::is_delta(x))
     282             :     {
     283         435 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::delta>(x));
     284             :     }
     285       12022 :     else if (process::is_tau(x))
     286             :     {
     287         138 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::tau>(x));
     288             :     }
     289       11884 :     else if (process::is_sum(x))
     290             :     {
     291         706 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sum>(x));
     292             :     }
     293       11178 :     else if (process::is_block(x))
     294             :     {
     295           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::block>(x));
     296             :     }
     297       11178 :     else if (process::is_hide(x))
     298             :     {
     299          18 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::hide>(x));
     300             :     }
     301       11160 :     else if (process::is_rename(x))
     302             :     {
     303           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::rename>(x));
     304             :     }
     305       11160 :     else if (process::is_comm(x))
     306             :     {
     307         113 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::comm>(x));
     308             :     }
     309       11047 :     else if (process::is_allow(x))
     310             :     {
     311          92 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::allow>(x));
     312             :     }
     313       10955 :     else if (process::is_sync(x))
     314             :     {
     315         197 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sync>(x));
     316             :     }
     317       10758 :     else if (process::is_at(x))
     318             :     {
     319         301 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::at>(x));
     320             :     }
     321       10457 :     else if (process::is_seq(x))
     322             :     {
     323        2501 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::seq>(x));
     324             :     }
     325        7956 :     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        7291 :     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        7170 :     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        7170 :     else if (process::is_merge(x))
     338             :     {
     339         378 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::merge>(x));
     340             :     }
     341        6792 :     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        6792 :     else if (process::is_choice(x))
     346             :     {
     347         994 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::choice>(x));
     348             :     }
     349        5798 :     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        5682 :     else if (process::is_untyped_process_assignment(x))
     354             :     {
     355         535 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::untyped_process_assignment>(x));
     356             :     }
     357        5147 :     else if (data::is_untyped_data_parameter(x))
     358             :     {
     359        5147 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<data::untyped_data_parameter>(x));
     360             :     }
     361       12465 :     static_cast<Derived&>(*this).leave(x);
     362       12465 :     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         944 :   void update(process::process_specification& x)
     386             :   {
     387         944 :     static_cast<Derived&>(*this).enter(x);
     388         944 :     static_cast<Derived&>(*this).update(x.equations());
     389         944 :     x.init() = static_cast<Derived&>(*this).apply(x.init());
     390         944 :     static_cast<Derived&>(*this).leave(x);
     391         944 :   }
     392             : 
     393        1184 :   process::process_equation apply(const process::process_equation& x)
     394             :   {
     395        1184 :     static_cast<Derived&>(*this).enter(x);
     396        1184 :     process::process_equation result = process::process_equation(x.identifier(), x.formal_parameters(), static_cast<Derived&>(*this).apply(x.expression()));
     397        1184 :     static_cast<Derived&>(*this).leave(x);
     398        1184 :     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       19574 :   process::action apply(const process::action& x)
     420             :   {
     421       19574 :     static_cast<Derived&>(*this).enter(x);
     422       19574 :     process::action result = process::action(x.label(), static_cast<Derived&>(*this).apply(x.arguments()));
     423       19574 :     static_cast<Derived&>(*this).leave(x);
     424       19574 :     return result;
     425             :   }
     426             : 
     427        2283 :   process::process_instance apply(const process::process_instance& x)
     428             :   {
     429        2283 :     static_cast<Derived&>(*this).enter(x);
     430        2283 :     process::process_instance result = process::process_instance(x.identifier(), static_cast<Derived&>(*this).apply(x.actual_parameters()));
     431        2283 :     static_cast<Derived&>(*this).leave(x);
     432        2283 :     return result;
     433             :   }
     434             : 
     435         515 :   process::process_instance_assignment apply(const process::process_instance_assignment& x)
     436             :   {
     437         515 :     static_cast<Derived&>(*this).enter(x);
     438         515 :     process::process_instance_assignment result = process::process_instance_assignment(x.identifier(), static_cast<Derived&>(*this).apply(x.assignments()));
     439         515 :     static_cast<Derived&>(*this).leave(x);
     440         515 :     return result;
     441             :   }
     442             : 
     443         434 :   process::delta apply(const process::delta& x)
     444             :   {
     445         434 :     static_cast<Derived&>(*this).enter(x);
     446             :     // skip
     447         434 :     static_cast<Derived&>(*this).leave(x);
     448         434 :     return x;
     449             :   }
     450             : 
     451         144 :   process::tau apply(const process::tau& x)
     452             :   {
     453         144 :     static_cast<Derived&>(*this).enter(x);
     454             :     // skip
     455         144 :     static_cast<Derived&>(*this).leave(x);
     456         144 :     return x;
     457             :   }
     458             : 
     459         745 :   process::sum apply(const process::sum& x)
     460             :   {
     461         745 :     static_cast<Derived&>(*this).enter(x);
     462         745 :     process::sum result = process::sum(x.variables(), static_cast<Derived&>(*this).apply(x.operand()));
     463         745 :     static_cast<Derived&>(*this).leave(x);
     464         745 :     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          24 :   process::hide apply(const process::hide& x)
     476             :   {
     477          24 :     static_cast<Derived&>(*this).enter(x);
     478          24 :     process::hide result = process::hide(x.hide_set(), static_cast<Derived&>(*this).apply(x.operand()));
     479          24 :     static_cast<Derived&>(*this).leave(x);
     480          24 :     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         119 :   process::comm apply(const process::comm& x)
     492             :   {
     493         119 :     static_cast<Derived&>(*this).enter(x);
     494         119 :     process::comm result = process::comm(x.comm_set(), static_cast<Derived&>(*this).apply(x.operand()));
     495         119 :     static_cast<Derived&>(*this).leave(x);
     496         119 :     return result;
     497             :   }
     498             : 
     499         510 :   process::allow apply(const process::allow& x)
     500             :   {
     501         510 :     static_cast<Derived&>(*this).enter(x);
     502         510 :     process::allow result = process::allow(x.allow_set(), static_cast<Derived&>(*this).apply(x.operand()));
     503         510 :     static_cast<Derived&>(*this).leave(x);
     504         510 :     return result;
     505             :   }
     506             : 
     507         209 :   process::sync apply(const process::sync& x)
     508             :   {
     509         209 :     static_cast<Derived&>(*this).enter(x);
     510         209 :     process::sync result = process::sync(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     511         209 :     static_cast<Derived&>(*this).leave(x);
     512         209 :     return result;
     513             :   }
     514             : 
     515         308 :   process::at apply(const process::at& x)
     516             :   {
     517         308 :     static_cast<Derived&>(*this).enter(x);
     518         308 :     process::at result = process::at(static_cast<Derived&>(*this).apply(x.operand()), static_cast<Derived&>(*this).apply(x.time_stamp()));
     519         308 :     static_cast<Derived&>(*this).leave(x);
     520         308 :     return result;
     521             :   }
     522             : 
     523        2825 :   process::seq apply(const process::seq& x)
     524             :   {
     525        2825 :     static_cast<Derived&>(*this).enter(x);
     526        2825 :     process::seq result = process::seq(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     527        2825 :     static_cast<Derived&>(*this).leave(x);
     528        2825 :     return result;
     529             :   }
     530             : 
     531         846 :   process::if_then apply(const process::if_then& x)
     532             :   {
     533         846 :     static_cast<Derived&>(*this).enter(x);
     534         846 :     process::if_then result = process::if_then(static_cast<Derived&>(*this).apply(x.condition()), static_cast<Derived&>(*this).apply(x.then_case()));
     535         846 :     static_cast<Derived&>(*this).leave(x);
     536         846 :     return result;
     537             :   }
     538             : 
     539         126 :   process::if_then_else apply(const process::if_then_else& x)
     540             :   {
     541         126 :     static_cast<Derived&>(*this).enter(x);
     542         126 :     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         126 :     static_cast<Derived&>(*this).leave(x);
     544         126 :     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         390 :   process::merge apply(const process::merge& x)
     556             :   {
     557         390 :     static_cast<Derived&>(*this).enter(x);
     558         390 :     process::merge result = process::merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     559         390 :     static_cast<Derived&>(*this).leave(x);
     560         390 :     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        1217 :   process::choice apply(const process::choice& x)
     572             :   {
     573        1217 :     static_cast<Derived&>(*this).enter(x);
     574        1217 :     process::choice result = process::choice(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
     575        1217 :     static_cast<Derived&>(*this).leave(x);
     576        1217 :     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       14390 :   process::process_expression apply(const process::process_expression& x)
     596             :   {
     597       14390 :     static_cast<Derived&>(*this).enter(x);
     598       14390 :     process::process_expression result;
     599       14390 :     if (process::is_action(x))
     600             :     {
     601        3432 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::action>(x));
     602             :     }
     603       10958 :     else if (process::is_process_instance(x))
     604             :     {
     605        2283 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance>(x));
     606             :     }
     607        8675 :     else if (process::is_process_instance_assignment(x))
     608             :     {
     609         653 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance_assignment>(x));
     610             :     }
     611        8022 :     else if (process::is_delta(x))
     612             :     {
     613         434 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::delta>(x));
     614             :     }
     615        7588 :     else if (process::is_tau(x))
     616             :     {
     617         144 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::tau>(x));
     618             :     }
     619        7444 :     else if (process::is_sum(x))
     620             :     {
     621         753 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sum>(x));
     622             :     }
     623        6691 :     else if (process::is_block(x))
     624             :     {
     625           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::block>(x));
     626             :     }
     627        6691 :     else if (process::is_hide(x))
     628             :     {
     629          24 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::hide>(x));
     630             :     }
     631        6667 :     else if (process::is_rename(x))
     632             :     {
     633           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::rename>(x));
     634             :     }
     635        6667 :     else if (process::is_comm(x))
     636             :     {
     637         119 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::comm>(x));
     638             :     }
     639        6548 :     else if (process::is_allow(x))
     640             :     {
     641         510 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::allow>(x));
     642             :     }
     643        6038 :     else if (process::is_sync(x))
     644             :     {
     645         209 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sync>(x));
     646             :     }
     647        5829 :     else if (process::is_at(x))
     648             :     {
     649         308 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::at>(x));
     650             :     }
     651        5521 :     else if (process::is_seq(x))
     652             :     {
     653        2825 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::seq>(x));
     654             :     }
     655        2696 :     else if (process::is_if_then(x))
     656             :     {
     657         846 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then>(x));
     658             :     }
     659        1850 :     else if (process::is_if_then_else(x))
     660             :     {
     661         126 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then_else>(x));
     662             :     }
     663        1724 :     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        1724 :     else if (process::is_merge(x))
     668             :     {
     669         390 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::merge>(x));
     670             :     }
     671        1334 :     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        1334 :     else if (process::is_choice(x))
     676             :     {
     677        1217 :       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       14390 :     static_cast<Derived&>(*this).leave(x);
     692       14390 :     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             :   void update(process::process_specification& x)
    1054             :   {
    1055             :     static_cast<Derived&>(*this).enter(x);
    1056             :     static_cast<Derived&>(*this).update(x.equations());
    1057             :     x.init() = static_cast<Derived&>(*this).apply(x.init());
    1058             :     static_cast<Derived&>(*this).leave(x);
    1059             :   }
    1060             : 
    1061             :   process::process_equation apply(const process::process_equation& x)
    1062             :   {
    1063             :     static_cast<Derived&>(*this).enter(x);
    1064             :     process::process_equation result = process::process_equation(x.identifier(), x.formal_parameters(), static_cast<Derived&>(*this).apply(x.expression()));
    1065             :     static_cast<Derived&>(*this).leave(x);
    1066             :     return result;
    1067             :   }
    1068             : 
    1069           4 :   process::action apply(const process::action& x)
    1070             :   {
    1071           4 :     static_cast<Derived&>(*this).enter(x);
    1072             :     // skip
    1073           4 :     static_cast<Derived&>(*this).leave(x);
    1074           4 :     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         734 :   process::delta apply(const process::delta& x)
    1094             :   {
    1095         734 :     static_cast<Derived&>(*this).enter(x);
    1096             :     // skip
    1097         734 :     static_cast<Derived&>(*this).leave(x);
    1098         734 :     return x;
    1099             :   }
    1100             : 
    1101         248 :   process::tau apply(const process::tau& x)
    1102             :   {
    1103         248 :     static_cast<Derived&>(*this).enter(x);
    1104             :     // skip
    1105         248 :     static_cast<Derived&>(*this).leave(x);
    1106         248 :     return x;
    1107             :   }
    1108             : 
    1109         527 :   process::sum apply(const process::sum& x)
    1110             :   {
    1111         527 :     static_cast<Derived&>(*this).enter(x);
    1112         527 :     process::sum result = process::sum(x.variables(), static_cast<Derived&>(*this).apply(x.operand()));
    1113         527 :     static_cast<Derived&>(*this).leave(x);
    1114         527 :     return result;
    1115             :   }
    1116             : 
    1117             :   process::block apply(const process::block& x)
    1118             :   {
    1119             :     static_cast<Derived&>(*this).enter(x);
    1120             :     process::block result = process::block(x.block_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1121             :     static_cast<Derived&>(*this).leave(x);
    1122             :     return result;
    1123             :   }
    1124             : 
    1125             :   process::hide apply(const process::hide& x)
    1126             :   {
    1127             :     static_cast<Derived&>(*this).enter(x);
    1128             :     process::hide result = process::hide(x.hide_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1129             :     static_cast<Derived&>(*this).leave(x);
    1130             :     return result;
    1131             :   }
    1132             : 
    1133             :   process::rename apply(const process::rename& x)
    1134             :   {
    1135             :     static_cast<Derived&>(*this).enter(x);
    1136             :     process::rename result = process::rename(x.rename_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1137             :     static_cast<Derived&>(*this).leave(x);
    1138             :     return result;
    1139             :   }
    1140             : 
    1141             :   process::comm apply(const process::comm& x)
    1142             :   {
    1143             :     static_cast<Derived&>(*this).enter(x);
    1144             :     process::comm result = process::comm(x.comm_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1145             :     static_cast<Derived&>(*this).leave(x);
    1146             :     return result;
    1147             :   }
    1148             : 
    1149             :   process::allow apply(const process::allow& x)
    1150             :   {
    1151             :     static_cast<Derived&>(*this).enter(x);
    1152             :     process::allow result = process::allow(x.allow_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1153             :     static_cast<Derived&>(*this).leave(x);
    1154             :     return result;
    1155             :   }
    1156             : 
    1157         197 :   process::sync apply(const process::sync& x)
    1158             :   {
    1159         197 :     static_cast<Derived&>(*this).enter(x);
    1160         197 :     process::sync result = process::sync(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1161         197 :     static_cast<Derived&>(*this).leave(x);
    1162         197 :     return result;
    1163             :   }
    1164             : 
    1165         422 :   process::at apply(const process::at& x)
    1166             :   {
    1167         422 :     static_cast<Derived&>(*this).enter(x);
    1168         422 :     process::at result = process::at(static_cast<Derived&>(*this).apply(x.operand()), x.time_stamp());
    1169         422 :     static_cast<Derived&>(*this).leave(x);
    1170         422 :     return result;
    1171             :   }
    1172             : 
    1173        5574 :   process::seq apply(const process::seq& x)
    1174             :   {
    1175        5574 :     static_cast<Derived&>(*this).enter(x);
    1176        5574 :     process::seq result = process::seq(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1177        5572 :     static_cast<Derived&>(*this).leave(x);
    1178        5572 :     return result;
    1179             :   }
    1180             : 
    1181         923 :   process::if_then apply(const process::if_then& x)
    1182             :   {
    1183         923 :     static_cast<Derived&>(*this).enter(x);
    1184         923 :     process::if_then result = process::if_then(x.condition(), static_cast<Derived&>(*this).apply(x.then_case()));
    1185         923 :     static_cast<Derived&>(*this).leave(x);
    1186         923 :     return result;
    1187             :   }
    1188             : 
    1189        1222 :   process::if_then_else apply(const process::if_then_else& x)
    1190             :   {
    1191        1222 :     static_cast<Derived&>(*this).enter(x);
    1192        1222 :     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        1222 :     static_cast<Derived&>(*this).leave(x);
    1194        1222 :     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         546 :   process::merge apply(const process::merge& x)
    1206             :   {
    1207         546 :     static_cast<Derived&>(*this).enter(x);
    1208         546 :     process::merge result = process::merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1209         546 :     static_cast<Derived&>(*this).leave(x);
    1210         546 :     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        1949 :   process::choice apply(const process::choice& x)
    1222             :   {
    1223        1949 :     static_cast<Derived&>(*this).enter(x);
    1224        1949 :     process::choice result = process::choice(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1225        1949 :     static_cast<Derived&>(*this).leave(x);
    1226        1949 :     return result;
    1227             :   }
    1228             : 
    1229         651 :   process::stochastic_operator apply(const process::stochastic_operator& x)
    1230             :   {
    1231         651 :     static_cast<Derived&>(*this).enter(x);
    1232         651 :     process::stochastic_operator result = process::stochastic_operator(x.variables(), x.distribution(), static_cast<Derived&>(*this).apply(x.operand()));
    1233         651 :     static_cast<Derived&>(*this).leave(x);
    1234         651 :     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       27901 :   process::process_expression apply(const process::process_expression& x)
    1246             :   {
    1247       27901 :     static_cast<Derived&>(*this).enter(x);
    1248       27901 :     process::process_expression result;
    1249       27901 :     if (process::is_action(x))
    1250             :     {
    1251        3467 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::action>(x));
    1252             :     }
    1253       24434 :     else if (process::is_process_instance(x))
    1254             :     {
    1255        2337 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance>(x));
    1256             :     }
    1257       22097 :     else if (process::is_process_instance_assignment(x))
    1258             :     {
    1259         896 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance_assignment>(x));
    1260             :     }
    1261       21201 :     else if (process::is_delta(x))
    1262             :     {
    1263         734 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::delta>(x));
    1264             :     }
    1265       20467 :     else if (process::is_tau(x))
    1266             :     {
    1267         248 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::tau>(x));
    1268             :     }
    1269       20219 :     else if (process::is_sum(x))
    1270             :     {
    1271        1233 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sum>(x));
    1272             :     }
    1273       18986 :     else if (process::is_block(x))
    1274             :     {
    1275           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::block>(x));
    1276             :     }
    1277       18986 :     else if (process::is_hide(x))
    1278             :     {
    1279          30 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::hide>(x));
    1280             :     }
    1281       18956 :     else if (process::is_rename(x))
    1282             :     {
    1283           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::rename>(x));
    1284             :     }
    1285       18956 :     else if (process::is_comm(x))
    1286             :     {
    1287         155 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::comm>(x));
    1288             :     }
    1289       18801 :     else if (process::is_allow(x))
    1290             :     {
    1291         180 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::allow>(x));
    1292             :     }
    1293       18621 :     else if (process::is_sync(x))
    1294             :     {
    1295         455 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sync>(x));
    1296             :     }
    1297       18166 :     else if (process::is_at(x))
    1298             :     {
    1299         723 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::at>(x));
    1300             :     }
    1301       17443 :     else if (process::is_seq(x))
    1302             :     {
    1303        5574 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::seq>(x));
    1304             :     }
    1305       11869 :     else if (process::is_if_then(x))
    1306             :     {
    1307        1588 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then>(x));
    1308             :     }
    1309       10281 :     else if (process::is_if_then_else(x))
    1310             :     {
    1311        1343 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then_else>(x));
    1312             :     }
    1313        8938 :     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        8938 :     else if (process::is_merge(x))
    1318             :     {
    1319         546 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::merge>(x));
    1320             :     }
    1321        8392 :     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        8392 :     else if (process::is_choice(x))
    1326             :     {
    1327        1949 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::choice>(x));
    1328             :     }
    1329        6443 :     else if (process::is_stochastic_operator(x))
    1330             :     {
    1331         767 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::stochastic_operator>(x));
    1332             :     }
    1333        5676 :     else if (process::is_untyped_process_assignment(x))
    1334             :     {
    1335         533 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::untyped_process_assignment>(x));
    1336             :     }
    1337        5143 :     else if (data::is_untyped_data_parameter(x))
    1338             :     {
    1339        5143 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<data::untyped_data_parameter>(x));
    1340             :     }
    1341       27894 :     static_cast<Derived&>(*this).leave(x);
    1342       27894 :     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       10497 :   process::action apply(const process::action& x)
    1389             :   {
    1390       10497 :     static_cast<Derived&>(*this).enter(x);
    1391             :     // skip
    1392       10497 :     static_cast<Derived&>(*this).leave(x);
    1393       10497 :     return x;
    1394             :   }
    1395             : 
    1396        7380 :   process::process_instance apply(const process::process_instance& x)
    1397             :   {
    1398        7380 :     static_cast<Derived&>(*this).enter(x);
    1399        7380 :     process::process_instance result = process::process_instance(static_cast<Derived&>(*this).apply(x.identifier()), x.actual_parameters());
    1400        7380 :     static_cast<Derived&>(*this).leave(x);
    1401        7380 :     return result;
    1402             :   }
    1403             : 
    1404         568 :   process::process_instance_assignment apply(const process::process_instance_assignment& x)
    1405             :   {
    1406         568 :     static_cast<Derived&>(*this).enter(x);
    1407         568 :     process::process_instance_assignment result = process::process_instance_assignment(static_cast<Derived&>(*this).apply(x.identifier()), x.assignments());
    1408         568 :     static_cast<Derived&>(*this).leave(x);
    1409         568 :     return result;
    1410             :   }
    1411             : 
    1412         494 :   process::delta apply(const process::delta& x)
    1413             :   {
    1414         494 :     static_cast<Derived&>(*this).enter(x);
    1415             :     // skip
    1416         494 :     static_cast<Derived&>(*this).leave(x);
    1417         494 :     return x;
    1418             :   }
    1419             : 
    1420         335 :   process::tau apply(const process::tau& x)
    1421             :   {
    1422         335 :     static_cast<Derived&>(*this).enter(x);
    1423             :     // skip
    1424         335 :     static_cast<Derived&>(*this).leave(x);
    1425         335 :     return x;
    1426             :   }
    1427             : 
    1428        2172 :   process::sum apply(const process::sum& x)
    1429             :   {
    1430        2172 :     static_cast<Derived&>(*this).enter(x);
    1431        2172 :     process::sum result = process::sum(x.variables(), static_cast<Derived&>(*this).apply(x.operand()));
    1432        2172 :     static_cast<Derived&>(*this).leave(x);
    1433        2172 :     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          48 :   process::hide apply(const process::hide& x)
    1445             :   {
    1446          48 :     static_cast<Derived&>(*this).enter(x);
    1447          48 :     process::hide result = process::hide(x.hide_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1448          48 :     static_cast<Derived&>(*this).leave(x);
    1449          48 :     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         140 :   process::comm apply(const process::comm& x)
    1461             :   {
    1462         140 :     static_cast<Derived&>(*this).enter(x);
    1463         140 :     process::comm result = process::comm(x.comm_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1464         140 :     static_cast<Derived&>(*this).leave(x);
    1465         140 :     return result;
    1466             :   }
    1467             : 
    1468         602 :   process::allow apply(const process::allow& x)
    1469             :   {
    1470         602 :     static_cast<Derived&>(*this).enter(x);
    1471         602 :     process::allow result = process::allow(x.allow_set(), static_cast<Derived&>(*this).apply(x.operand()));
    1472         602 :     static_cast<Derived&>(*this).leave(x);
    1473         602 :     return result;
    1474             :   }
    1475             : 
    1476         564 :   process::sync apply(const process::sync& x)
    1477             :   {
    1478         564 :     static_cast<Derived&>(*this).enter(x);
    1479         564 :     process::sync result = process::sync(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1480         564 :     static_cast<Derived&>(*this).leave(x);
    1481         564 :     return result;
    1482             :   }
    1483             : 
    1484         546 :   process::at apply(const process::at& x)
    1485             :   {
    1486         546 :     static_cast<Derived&>(*this).enter(x);
    1487         546 :     process::at result = process::at(static_cast<Derived&>(*this).apply(x.operand()), x.time_stamp());
    1488         546 :     static_cast<Derived&>(*this).leave(x);
    1489         546 :     return result;
    1490             :   }
    1491             : 
    1492        9121 :   process::seq apply(const process::seq& x)
    1493             :   {
    1494        9121 :     static_cast<Derived&>(*this).enter(x);
    1495        9121 :     process::seq result = process::seq(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1496        9121 :     static_cast<Derived&>(*this).leave(x);
    1497        9121 :     return result;
    1498             :   }
    1499             : 
    1500        2120 :   process::if_then apply(const process::if_then& x)
    1501             :   {
    1502        2120 :     static_cast<Derived&>(*this).enter(x);
    1503        2120 :     process::if_then result = process::if_then(x.condition(), static_cast<Derived&>(*this).apply(x.then_case()));
    1504        2120 :     static_cast<Derived&>(*this).leave(x);
    1505        2120 :     return result;
    1506             :   }
    1507             : 
    1508        1506 :   process::if_then_else apply(const process::if_then_else& x)
    1509             :   {
    1510        1506 :     static_cast<Derived&>(*this).enter(x);
    1511        1506 :     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        1506 :     static_cast<Derived&>(*this).leave(x);
    1513        1506 :     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         469 :   process::merge apply(const process::merge& x)
    1525             :   {
    1526         469 :     static_cast<Derived&>(*this).enter(x);
    1527         469 :     process::merge result = process::merge(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1528         469 :     static_cast<Derived&>(*this).leave(x);
    1529         469 :     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        3414 :   process::choice apply(const process::choice& x)
    1541             :   {
    1542        3414 :     static_cast<Derived&>(*this).enter(x);
    1543        3414 :     process::choice result = process::choice(static_cast<Derived&>(*this).apply(x.left()), static_cast<Derived&>(*this).apply(x.right()));
    1544        3414 :     static_cast<Derived&>(*this).leave(x);
    1545        3414 :     return result;
    1546             :   }
    1547             : 
    1548         769 :   process::stochastic_operator apply(const process::stochastic_operator& x)
    1549             :   {
    1550         769 :     static_cast<Derived&>(*this).enter(x);
    1551         769 :     process::stochastic_operator result = process::stochastic_operator(x.variables(), x.distribution(), static_cast<Derived&>(*this).apply(x.operand()));
    1552         769 :     static_cast<Derived&>(*this).leave(x);
    1553         769 :     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       40745 :   process::process_expression apply(const process::process_expression& x)
    1565             :   {
    1566       40745 :     static_cast<Derived&>(*this).enter(x);
    1567       40745 :     process::process_expression result;
    1568       40745 :     if (process::is_action(x))
    1569             :     {
    1570       10497 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::action>(x));
    1571             :     }
    1572       30248 :     else if (process::is_process_instance(x))
    1573             :     {
    1574        7380 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance>(x));
    1575             :     }
    1576       22868 :     else if (process::is_process_instance_assignment(x))
    1577             :     {
    1578         568 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::process_instance_assignment>(x));
    1579             :     }
    1580       22300 :     else if (process::is_delta(x))
    1581             :     {
    1582         494 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::delta>(x));
    1583             :     }
    1584       21806 :     else if (process::is_tau(x))
    1585             :     {
    1586         335 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::tau>(x));
    1587             :     }
    1588       21471 :     else if (process::is_sum(x))
    1589             :     {
    1590        2172 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sum>(x));
    1591             :     }
    1592       19299 :     else if (process::is_block(x))
    1593             :     {
    1594           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::block>(x));
    1595             :     }
    1596       19299 :     else if (process::is_hide(x))
    1597             :     {
    1598          48 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::hide>(x));
    1599             :     }
    1600       19251 :     else if (process::is_rename(x))
    1601             :     {
    1602           0 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::rename>(x));
    1603             :     }
    1604       19251 :     else if (process::is_comm(x))
    1605             :     {
    1606         140 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::comm>(x));
    1607             :     }
    1608       19111 :     else if (process::is_allow(x))
    1609             :     {
    1610         602 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::allow>(x));
    1611             :     }
    1612       18509 :     else if (process::is_sync(x))
    1613             :     {
    1614         564 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::sync>(x));
    1615             :     }
    1616       17945 :     else if (process::is_at(x))
    1617             :     {
    1618         546 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::at>(x));
    1619             :     }
    1620       17399 :     else if (process::is_seq(x))
    1621             :     {
    1622        9121 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::seq>(x));
    1623             :     }
    1624        8278 :     else if (process::is_if_then(x))
    1625             :     {
    1626        2120 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then>(x));
    1627             :     }
    1628        6158 :     else if (process::is_if_then_else(x))
    1629             :     {
    1630        1506 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::if_then_else>(x));
    1631             :     }
    1632        4652 :     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        4652 :     else if (process::is_merge(x))
    1637             :     {
    1638         469 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::merge>(x));
    1639             :     }
    1640        4183 :     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        4183 :     else if (process::is_choice(x))
    1645             :     {
    1646        3414 :       result = static_cast<Derived&>(*this).apply(atermpp::down_cast<process::choice>(x));
    1647             :     }
    1648         769 :     else if (process::is_stochastic_operator(x))
    1649             :     {
    1650         769 :       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       40745 :     static_cast<Derived&>(*this).leave(x);
    1661       40745 :     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