LCOV - code coverage report
Current view: top level - core/include/mcrl2/core/detail - soundness_checks.h (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 1698 2644 64.2 %
Date: 2024-05-01 03:37:31 Functions: 500 526 95.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/core/detail/soundness_checks.h
      10             : /// \brief Add your file description here.
      11             : 
      12             : #ifndef MCRL2_CORE_DETAIL_SOUNDNESS_CHECKS_H
      13             : #define MCRL2_CORE_DETAIL_SOUNDNESS_CHECKS_H
      14             : 
      15             : // This file contains soundness checks for LPS terms.
      16             : // N.B. This file is automatically generated!
      17             : 
      18             : #include "mcrl2/atermpp/aterm_string.h"
      19             : #include "mcrl2/core/detail/function_symbols.h"
      20             : 
      21             : namespace mcrl2
      22             : {
      23             : 
      24             : namespace core
      25             : {
      26             : 
      27             : namespace detail
      28             : {
      29             : 
      30             : // checks
      31             : // 1) if term t satisfies the predicate f
      32             : template <typename Term, typename CheckFunction>
      33  5710180672 : bool check_term_argument(const Term& t, CheckFunction f)
      34             : {
      35  5710180672 :   return f(t);
      36             : }
      37             : 
      38             : // checks
      39             : // 1) if term t is a list,
      40             : // 2) if the list has the proper minimum size
      41             : // 3) if all elements of the list satisfy the predicate f
      42             : template <typename Term, typename CheckFunction>
      43   612109152 : bool check_list_argument(const Term& t, CheckFunction f, unsigned int minimum_size)
      44             : {
      45   612109152 :   const atermpp::aterm& term(t);
      46   612109152 :   if (!t.type_is_list())
      47             :   {
      48           0 :     return false;
      49             :   }
      50   612109152 :   const atermpp::aterm_list& l = atermpp::down_cast<atermpp::aterm_list>(term);
      51   612109152 :   if (l.size() < minimum_size)
      52             :   {
      53           0 :     return false;
      54             :   }
      55  2266411102 :   for (const auto& x: l)
      56             :   {
      57  1042192798 :     if (!f(x))
      58             :     {
      59           0 :       return false;
      60             :     }
      61             :   }
      62   612109152 :   return true;
      63             : }
      64             : 
      65             : template <typename Term>
      66  2846731329 : bool check_rule_String(const Term& t)
      67             : {
      68  2846731329 :   const atermpp::aterm& term(t);
      69  2846731329 :   if (!term.type_is_appl())
      70             :   {
      71           0 :     return false;
      72             :   }
      73  2846731329 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
      74  2846731329 :   if (a.size() > 0)
      75             :   {
      76           0 :     return false;
      77             :   }
      78  2846731329 :   if (a == atermpp::empty_string())
      79             :   {
      80           0 :     return false;
      81             :   }
      82  2846731329 :   return true;
      83             : }
      84             : 
      85             : template <typename Term>
      86    26866709 : bool check_rule_StringOrEmpty(const Term& t)
      87             : {
      88    26866709 :   const atermpp::aterm& term(t);
      89    26866709 :   if (!term.type_is_appl())
      90             :   {
      91           0 :     return false;
      92             :   }
      93    26866709 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
      94    26866709 :   return a.size() <= 0;
      95             : }
      96             : 
      97             : template <typename Term>
      98   540699645 : bool check_rule_Number(const Term& t)
      99             : {
     100   540699645 :   const atermpp::aterm& term(t);
     101   540699645 :   return term.type_is_int();
     102             : }
     103             : 
     104             : template <typename Term> bool check_rule_DataExpr(const Term& t);
     105             : 
     106             : // DataAppl(DataExpr, DataExpr+)
     107             : template <typename Term>
     108   271318784 : bool check_term_DataAppl(const Term& t)
     109             : {
     110   271318784 :   utilities::mcrl2_unused(t);
     111             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     112             :   // check the type of the term
     113   271318784 :   const atermpp::aterm& term(t);
     114   271318784 :   if (!term.type_is_appl())
     115             :   {
     116           0 :     return false;
     117             :   }
     118   271318784 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
     119   271318784 :   if (!gsIsDataAppl(a))
     120             :   {
     121     5128185 :     return false;
     122             :   }
     123             : #ifndef LPS_NO_RECURSIVE_SOUNDNESS_CHECKS
     124  1270104388 :   for (const auto& child : a)
     125             :   {
     126   737723190 :     if (!check_term_argument(child, check_rule_DataExpr<atermpp::aterm>))
     127             :     {
     128           0 :       mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
     129           0 :       return false;
     130             :     }
     131             :   }
     132             : #endif // LPS_NO_RECURSIVE_SOUNDNESS_CHECKS
     133             : 
     134             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     135   266190599 :   return true;
     136             : }
     137             : 
     138             : //--- start generated code ---//
     139             : template <typename Term> bool check_rule_SortExpr(const Term& t);
     140             : template <typename Term> bool check_rule_SortId(const Term& t);
     141             : template <typename Term> bool check_rule_SortConsType(const Term& t);
     142             : template <typename Term> bool check_rule_StructCons(const Term& t);
     143             : template <typename Term> bool check_rule_StructProj(const Term& t);
     144             : template <typename Term> bool check_rule_DataExpr(const Term& t);
     145             : template <typename Term> bool check_rule_DataVarId(const Term& t);
     146             : template <typename Term> bool check_rule_OpId(const Term& t);
     147             : template <typename Term> bool check_rule_UntypedDataParameter(const Term& t);
     148             : template <typename Term> bool check_rule_BindingOperator(const Term& t);
     149             : template <typename Term> bool check_rule_WhrDecl(const Term& t);
     150             : template <typename Term> bool check_rule_DataVarIdInit(const Term& t);
     151             : template <typename Term> bool check_rule_UntypedIdentifierAssignment(const Term& t);
     152             : template <typename Term> bool check_rule_DataSpec(const Term& t);
     153             : template <typename Term> bool check_rule_SortSpec(const Term& t);
     154             : template <typename Term> bool check_rule_ConsSpec(const Term& t);
     155             : template <typename Term> bool check_rule_MapSpec(const Term& t);
     156             : template <typename Term> bool check_rule_DataEqnSpec(const Term& t);
     157             : template <typename Term> bool check_rule_SortDecl(const Term& t);
     158             : template <typename Term> bool check_rule_DataEqn(const Term& t);
     159             : template <typename Term> bool check_rule_MultAct(const Term& t);
     160             : template <typename Term> bool check_rule_TimedMultAct(const Term& t);
     161             : template <typename Term> bool check_rule_UntypedMultiAction(const Term& t);
     162             : template <typename Term> bool check_rule_Action(const Term& t);
     163             : template <typename Term> bool check_rule_ActId(const Term& t);
     164             : template <typename Term> bool check_rule_ProcExpr(const Term& t);
     165             : template <typename Term> bool check_rule_ProcVarId(const Term& t);
     166             : template <typename Term> bool check_rule_MultActName(const Term& t);
     167             : template <typename Term> bool check_rule_RenameExpr(const Term& t);
     168             : template <typename Term> bool check_rule_CommExpr(const Term& t);
     169             : template <typename Term> bool check_rule_ProcSpec(const Term& t);
     170             : template <typename Term> bool check_rule_ActSpec(const Term& t);
     171             : template <typename Term> bool check_rule_GlobVarSpec(const Term& t);
     172             : template <typename Term> bool check_rule_ProcEqnSpec(const Term& t);
     173             : template <typename Term> bool check_rule_ProcEqn(const Term& t);
     174             : template <typename Term> bool check_rule_MultActOrDelta(const Term& t);
     175             : template <typename Term> bool check_rule_ProcInit(const Term& t);
     176             : template <typename Term> bool check_rule_Distribution(const Term& t);
     177             : template <typename Term> bool check_rule_LinProcSpec(const Term& t);
     178             : template <typename Term> bool check_rule_LinearProcess(const Term& t);
     179             : template <typename Term> bool check_rule_LinearProcessSummand(const Term& t);
     180             : template <typename Term> bool check_rule_LinearProcessInit(const Term& t);
     181             : template <typename Term> bool check_rule_StateFrm(const Term& t);
     182             : template <typename Term> bool check_rule_RegFrm(const Term& t);
     183             : template <typename Term> bool check_rule_ActFrm(const Term& t);
     184             : template <typename Term> bool check_rule_ParamIdOrAction(const Term& t);
     185             : template <typename Term> bool check_rule_ActionRenameRules(const Term& t);
     186             : template <typename Term> bool check_rule_ActionRenameRule(const Term& t);
     187             : template <typename Term> bool check_rule_ActionRenameRuleRHS(const Term& t);
     188             : template <typename Term> bool check_rule_ActionRenameSpec(const Term& t);
     189             : template <typename Term> bool check_rule_PBES(const Term& t);
     190             : template <typename Term> bool check_rule_PBEqnSpec(const Term& t);
     191             : template <typename Term> bool check_rule_PBInit(const Term& t);
     192             : template <typename Term> bool check_rule_PBEqn(const Term& t);
     193             : template <typename Term> bool check_rule_FixPoint(const Term& t);
     194             : template <typename Term> bool check_rule_PropVarDecl(const Term& t);
     195             : template <typename Term> bool check_rule_PBExpr(const Term& t);
     196             : template <typename Term> bool check_rule_PropVarInst(const Term& t);
     197             : template <typename Term> bool check_rule_PRES(const Term& t);
     198             : template <typename Term> bool check_rule_PREqnSpec(const Term& t);
     199             : template <typename Term> bool check_rule_PRInit(const Term& t);
     200             : template <typename Term> bool check_rule_PREqn(const Term& t);
     201             : template <typename Term> bool check_rule_PRExpr(const Term& t);
     202             : template <typename Term> bool check_term_SortCons(const Term& t);
     203             : template <typename Term> bool check_term_SortStruct(const Term& t);
     204             : template <typename Term> bool check_term_SortArrow(const Term& t);
     205             : template <typename Term> bool check_term_UntypedSortUnknown(const Term& t);
     206             : template <typename Term> bool check_term_UntypedSortsPossible(const Term& t);
     207             : template <typename Term> bool check_term_UntypedSortVariable(const Term& t);
     208             : template <typename Term> bool check_term_SortId(const Term& t);
     209             : template <typename Term> bool check_term_SortList(const Term& t);
     210             : template <typename Term> bool check_term_SortSet(const Term& t);
     211             : template <typename Term> bool check_term_SortBag(const Term& t);
     212             : template <typename Term> bool check_term_SortFSet(const Term& t);
     213             : template <typename Term> bool check_term_SortFBag(const Term& t);
     214             : template <typename Term> bool check_term_StructCons(const Term& t);
     215             : template <typename Term> bool check_term_StructProj(const Term& t);
     216             : template <typename Term> bool check_term_Binder(const Term& t);
     217             : template <typename Term> bool check_term_Whr(const Term& t);
     218             : template <typename Term> bool check_term_UntypedIdentifier(const Term& t);
     219             : template <typename Term> bool check_term_DataVarId(const Term& t);
     220             : template <typename Term> bool check_term_OpId(const Term& t);
     221             : template <typename Term> bool check_term_UntypedDataParameter(const Term& t);
     222             : template <typename Term> bool check_term_Forall(const Term& t);
     223             : template <typename Term> bool check_term_Exists(const Term& t);
     224             : template <typename Term> bool check_term_SetComp(const Term& t);
     225             : template <typename Term> bool check_term_BagComp(const Term& t);
     226             : template <typename Term> bool check_term_Lambda(const Term& t);
     227             : template <typename Term> bool check_term_UntypedSetBagComp(const Term& t);
     228             : template <typename Term> bool check_term_DataVarIdInit(const Term& t);
     229             : template <typename Term> bool check_term_UntypedIdentifierAssignment(const Term& t);
     230             : template <typename Term> bool check_term_DataSpec(const Term& t);
     231             : template <typename Term> bool check_term_SortSpec(const Term& t);
     232             : template <typename Term> bool check_term_ConsSpec(const Term& t);
     233             : template <typename Term> bool check_term_MapSpec(const Term& t);
     234             : template <typename Term> bool check_term_DataEqnSpec(const Term& t);
     235             : template <typename Term> bool check_term_SortRef(const Term& t);
     236             : template <typename Term> bool check_term_DataEqn(const Term& t);
     237             : template <typename Term> bool check_term_MultAct(const Term& t);
     238             : template <typename Term> bool check_term_TimedMultAct(const Term& t);
     239             : template <typename Term> bool check_term_UntypedMultiAction(const Term& t);
     240             : template <typename Term> bool check_term_Action(const Term& t);
     241             : template <typename Term> bool check_term_ActId(const Term& t);
     242             : template <typename Term> bool check_term_Process(const Term& t);
     243             : template <typename Term> bool check_term_ProcessAssignment(const Term& t);
     244             : template <typename Term> bool check_term_Delta(const Term& t);
     245             : template <typename Term> bool check_term_Tau(const Term& t);
     246             : template <typename Term> bool check_term_Sum(const Term& t);
     247             : template <typename Term> bool check_term_Block(const Term& t);
     248             : template <typename Term> bool check_term_Hide(const Term& t);
     249             : template <typename Term> bool check_term_Rename(const Term& t);
     250             : template <typename Term> bool check_term_Comm(const Term& t);
     251             : template <typename Term> bool check_term_Allow(const Term& t);
     252             : template <typename Term> bool check_term_Sync(const Term& t);
     253             : template <typename Term> bool check_term_AtTime(const Term& t);
     254             : template <typename Term> bool check_term_Seq(const Term& t);
     255             : template <typename Term> bool check_term_IfThen(const Term& t);
     256             : template <typename Term> bool check_term_IfThenElse(const Term& t);
     257             : template <typename Term> bool check_term_BInit(const Term& t);
     258             : template <typename Term> bool check_term_Merge(const Term& t);
     259             : template <typename Term> bool check_term_LMerge(const Term& t);
     260             : template <typename Term> bool check_term_Choice(const Term& t);
     261             : template <typename Term> bool check_term_StochasticOperator(const Term& t);
     262             : template <typename Term> bool check_term_UntypedProcessAssignment(const Term& t);
     263             : template <typename Term> bool check_term_ProcVarId(const Term& t);
     264             : template <typename Term> bool check_term_MultActName(const Term& t);
     265             : template <typename Term> bool check_term_RenameExpr(const Term& t);
     266             : template <typename Term> bool check_term_CommExpr(const Term& t);
     267             : template <typename Term> bool check_term_ProcSpec(const Term& t);
     268             : template <typename Term> bool check_term_ActSpec(const Term& t);
     269             : template <typename Term> bool check_term_GlobVarSpec(const Term& t);
     270             : template <typename Term> bool check_term_ProcEqnSpec(const Term& t);
     271             : template <typename Term> bool check_term_ProcEqn(const Term& t);
     272             : template <typename Term> bool check_term_ProcessInit(const Term& t);
     273             : template <typename Term> bool check_term_Distribution(const Term& t);
     274             : template <typename Term> bool check_term_LinProcSpec(const Term& t);
     275             : template <typename Term> bool check_term_LinearProcess(const Term& t);
     276             : template <typename Term> bool check_term_LinearProcessSummand(const Term& t);
     277             : template <typename Term> bool check_term_LinearProcessInit(const Term& t);
     278             : template <typename Term> bool check_term_StateTrue(const Term& t);
     279             : template <typename Term> bool check_term_StateFalse(const Term& t);
     280             : template <typename Term> bool check_term_StateNot(const Term& t);
     281             : template <typename Term> bool check_term_StateMinus(const Term& t);
     282             : template <typename Term> bool check_term_StateAnd(const Term& t);
     283             : template <typename Term> bool check_term_StateOr(const Term& t);
     284             : template <typename Term> bool check_term_StateImp(const Term& t);
     285             : template <typename Term> bool check_term_StatePlus(const Term& t);
     286             : template <typename Term> bool check_term_StateConstantMultiply(const Term& t);
     287             : template <typename Term> bool check_term_StateConstantMultiplyAlt(const Term& t);
     288             : template <typename Term> bool check_term_StateForall(const Term& t);
     289             : template <typename Term> bool check_term_StateExists(const Term& t);
     290             : template <typename Term> bool check_term_StateInfimum(const Term& t);
     291             : template <typename Term> bool check_term_StateSupremum(const Term& t);
     292             : template <typename Term> bool check_term_StateSum(const Term& t);
     293             : template <typename Term> bool check_term_StateMust(const Term& t);
     294             : template <typename Term> bool check_term_StateMay(const Term& t);
     295             : template <typename Term> bool check_term_StateYaled(const Term& t);
     296             : template <typename Term> bool check_term_StateYaledTimed(const Term& t);
     297             : template <typename Term> bool check_term_StateDelay(const Term& t);
     298             : template <typename Term> bool check_term_StateDelayTimed(const Term& t);
     299             : template <typename Term> bool check_term_StateVar(const Term& t);
     300             : template <typename Term> bool check_term_StateNu(const Term& t);
     301             : template <typename Term> bool check_term_StateMu(const Term& t);
     302             : template <typename Term> bool check_term_RegNil(const Term& t);
     303             : template <typename Term> bool check_term_RegSeq(const Term& t);
     304             : template <typename Term> bool check_term_RegAlt(const Term& t);
     305             : template <typename Term> bool check_term_RegTrans(const Term& t);
     306             : template <typename Term> bool check_term_RegTransOrNil(const Term& t);
     307             : template <typename Term> bool check_term_UntypedRegFrm(const Term& t);
     308             : template <typename Term> bool check_term_ActTrue(const Term& t);
     309             : template <typename Term> bool check_term_ActFalse(const Term& t);
     310             : template <typename Term> bool check_term_ActNot(const Term& t);
     311             : template <typename Term> bool check_term_ActAnd(const Term& t);
     312             : template <typename Term> bool check_term_ActOr(const Term& t);
     313             : template <typename Term> bool check_term_ActImp(const Term& t);
     314             : template <typename Term> bool check_term_ActForall(const Term& t);
     315             : template <typename Term> bool check_term_ActExists(const Term& t);
     316             : template <typename Term> bool check_term_ActAt(const Term& t);
     317             : template <typename Term> bool check_term_ActMultAct(const Term& t);
     318             : template <typename Term> bool check_term_ActionRenameRules(const Term& t);
     319             : template <typename Term> bool check_term_ActionRenameRule(const Term& t);
     320             : template <typename Term> bool check_term_ActionRenameSpec(const Term& t);
     321             : template <typename Term> bool check_term_PBES(const Term& t);
     322             : template <typename Term> bool check_term_PBEqnSpec(const Term& t);
     323             : template <typename Term> bool check_term_PBInit(const Term& t);
     324             : template <typename Term> bool check_term_PBEqn(const Term& t);
     325             : template <typename Term> bool check_term_Mu(const Term& t);
     326             : template <typename Term> bool check_term_Nu(const Term& t);
     327             : template <typename Term> bool check_term_PropVarDecl(const Term& t);
     328             : template <typename Term> bool check_term_PBESTrue(const Term& t);
     329             : template <typename Term> bool check_term_PBESFalse(const Term& t);
     330             : template <typename Term> bool check_term_PBESNot(const Term& t);
     331             : template <typename Term> bool check_term_PBESAnd(const Term& t);
     332             : template <typename Term> bool check_term_PBESOr(const Term& t);
     333             : template <typename Term> bool check_term_PBESImp(const Term& t);
     334             : template <typename Term> bool check_term_PBESForall(const Term& t);
     335             : template <typename Term> bool check_term_PBESExists(const Term& t);
     336             : template <typename Term> bool check_term_PropVarInst(const Term& t);
     337             : template <typename Term> bool check_term_PRES(const Term& t);
     338             : template <typename Term> bool check_term_PREqnSpec(const Term& t);
     339             : template <typename Term> bool check_term_PRInit(const Term& t);
     340             : template <typename Term> bool check_term_PREqn(const Term& t);
     341             : template <typename Term> bool check_term_PRESTrue(const Term& t);
     342             : template <typename Term> bool check_term_PRESFalse(const Term& t);
     343             : template <typename Term> bool check_term_PRESMinus(const Term& t);
     344             : template <typename Term> bool check_term_PRESAnd(const Term& t);
     345             : template <typename Term> bool check_term_PRESOr(const Term& t);
     346             : template <typename Term> bool check_term_PRESImp(const Term& t);
     347             : template <typename Term> bool check_term_PRESPlus(const Term& t);
     348             : template <typename Term> bool check_term_PRESConstantMultiply(const Term& t);
     349             : template <typename Term> bool check_term_PRESConstantMultiplyAlt(const Term& t);
     350             : template <typename Term> bool check_term_PRESInfimum(const Term& t);
     351             : template <typename Term> bool check_term_PRESSupremum(const Term& t);
     352             : template <typename Term> bool check_term_PRESSum(const Term& t);
     353             : template <typename Term> bool check_term_PRESEqInf(const Term& t);
     354             : template <typename Term> bool check_term_PRESEqNInf(const Term& t);
     355             : template <typename Term> bool check_term_PRESCondSm(const Term& t);
     356             : template <typename Term> bool check_term_PRESCondEq(const Term& t);
     357             : 
     358             : template <typename Term>
     359  2625674646 : bool check_rule_SortExpr(const Term& t)
     360             : {
     361  2625674646 :   utilities::mcrl2_unused(t);
     362             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     363  2625674646 :   return check_rule_SortId(t)
     364   632286598 :          || check_term_SortCons(t)
     365   562781612 :          || check_term_SortStruct(t)
     366   553010882 :          || check_term_SortArrow(t)
     367    20483502 :          || check_term_UntypedSortUnknown(t)
     368      207744 :          || check_term_UntypedSortsPossible(t)
     369  3257961244 :          || check_term_UntypedSortVariable(t);
     370             : #else
     371             :   return true;
     372             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     373             : }
     374             : 
     375             : template <typename Term>
     376  2625675372 : bool check_rule_SortId(const Term& t)
     377             : {
     378  2625675372 :   utilities::mcrl2_unused(t);
     379             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     380  2625675372 :   return check_term_SortId(t);
     381             : #else
     382             :   return true;
     383             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     384             : }
     385             : 
     386             : template <typename Term>
     387    75316177 : bool check_rule_SortConsType(const Term& t)
     388             : {
     389    75316177 :   utilities::mcrl2_unused(t);
     390             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     391    75316177 :   return check_term_SortList(t)
     392    22796446 :          || check_term_SortSet(t)
     393    17977375 :          || check_term_SortBag(t)
     394    15719631 :          || check_term_SortFSet(t)
     395    98112623 :          || check_term_SortFBag(t);
     396             : #else
     397             :   return true;
     398             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     399             : }
     400             : 
     401             : template <typename Term>
     402    20838605 : bool check_rule_StructCons(const Term& t)
     403             : {
     404    20838605 :   utilities::mcrl2_unused(t);
     405             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     406    20838605 :   return check_term_StructCons(t);
     407             : #else
     408             :   return true;
     409             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     410             : }
     411             : 
     412             : template <typename Term>
     413     6028104 : bool check_rule_StructProj(const Term& t)
     414             : {
     415     6028104 :   utilities::mcrl2_unused(t);
     416             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     417     6028104 :   return check_term_StructProj(t);
     418             : #else
     419             :   return true;
     420             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     421             : }
     422             : 
     423             : template <typename Term>
     424   968855705 : bool check_rule_DataExpr(const Term& t)
     425             : {
     426   968855705 :   utilities::mcrl2_unused(t);
     427             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     428   968855705 :   return check_rule_DataVarId(t)
     429   722398433 :          || check_rule_OpId(t)
     430   228797632 :          || check_term_DataAppl(t)
     431     5128185 :          || check_term_Binder(t)
     432     4747839 :          || check_term_Whr(t)
     433  1691254138 :          || check_term_UntypedIdentifier(t);
     434             : #else
     435             :   return true;
     436             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     437             : }
     438             : 
     439             : template <typename Term>
     440   972621486 : bool check_rule_DataVarId(const Term& t)
     441             : {
     442   972621486 :   utilities::mcrl2_unused(t);
     443             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     444   972621486 :   return check_term_DataVarId(t);
     445             : #else
     446             :   return true;
     447             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     448             : }
     449             : 
     450             : template <typename Term>
     451   722398510 : bool check_rule_OpId(const Term& t)
     452             : {
     453   722398510 :   utilities::mcrl2_unused(t);
     454             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     455   722398510 :   return check_term_OpId(t);
     456             : #else
     457             :   return true;
     458             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     459             : }
     460             : 
     461             : template <typename Term>
     462      144203 : bool check_rule_UntypedDataParameter(const Term& t)
     463             : {
     464      144203 :   utilities::mcrl2_unused(t);
     465             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     466      144203 :   return check_term_UntypedDataParameter(t);
     467             : #else
     468             :   return true;
     469             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     470             : }
     471             : 
     472             : template <typename Term>
     473      602253 : bool check_rule_BindingOperator(const Term& t)
     474             : {
     475      602253 :   utilities::mcrl2_unused(t);
     476             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     477      602253 :   return check_term_Forall(t)
     478      301030 :          || check_term_Exists(t)
     479      294612 :          || check_term_SetComp(t)
     480      294177 :          || check_term_BagComp(t)
     481      293999 :          || check_term_Lambda(t)
     482      903283 :          || check_term_UntypedSetBagComp(t);
     483             : #else
     484             :   return true;
     485             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     486             : }
     487             : 
     488             : template <typename Term>
     489       31491 : bool check_rule_WhrDecl(const Term& t)
     490             : {
     491       31491 :   utilities::mcrl2_unused(t);
     492             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     493       31491 :   return check_rule_DataVarIdInit(t)
     494       31491 :          || check_rule_UntypedIdentifierAssignment(t);
     495             : #else
     496             :   return true;
     497             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     498             : }
     499             : 
     500             : template <typename Term>
     501     1093654 : bool check_rule_DataVarIdInit(const Term& t)
     502             : {
     503     1093654 :   utilities::mcrl2_unused(t);
     504             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     505     1093654 :   return check_term_DataVarIdInit(t);
     506             : #else
     507             :   return true;
     508             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     509             : }
     510             : 
     511             : template <typename Term>
     512       65569 : bool check_rule_UntypedIdentifierAssignment(const Term& t)
     513             : {
     514       65569 :   utilities::mcrl2_unused(t);
     515             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     516       65569 :   return check_term_UntypedIdentifierAssignment(t);
     517             : #else
     518             :   return true;
     519             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     520             : }
     521             : 
     522             : template <typename Term>
     523         187 : bool check_rule_DataSpec(const Term& t)
     524             : {
     525         187 :   utilities::mcrl2_unused(t);
     526             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     527         187 :   return check_term_DataSpec(t);
     528             : #else
     529             :   return true;
     530             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     531             : }
     532             : 
     533             : template <typename Term>
     534         187 : bool check_rule_SortSpec(const Term& t)
     535             : {
     536         187 :   utilities::mcrl2_unused(t);
     537             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     538         187 :   return check_term_SortSpec(t);
     539             : #else
     540             :   return true;
     541             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     542             : }
     543             : 
     544             : template <typename Term>
     545         187 : bool check_rule_ConsSpec(const Term& t)
     546             : {
     547         187 :   utilities::mcrl2_unused(t);
     548             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     549         187 :   return check_term_ConsSpec(t);
     550             : #else
     551             :   return true;
     552             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     553             : }
     554             : 
     555             : template <typename Term>
     556         187 : bool check_rule_MapSpec(const Term& t)
     557             : {
     558         187 :   utilities::mcrl2_unused(t);
     559             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     560         187 :   return check_term_MapSpec(t);
     561             : #else
     562             :   return true;
     563             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     564             : }
     565             : 
     566             : template <typename Term>
     567         187 : bool check_rule_DataEqnSpec(const Term& t)
     568             : {
     569         187 :   utilities::mcrl2_unused(t);
     570             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     571         187 :   return check_term_DataEqnSpec(t);
     572             : #else
     573             :   return true;
     574             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     575             : }
     576             : 
     577             : template <typename Term>
     578          80 : bool check_rule_SortDecl(const Term& t)
     579             : {
     580          80 :   utilities::mcrl2_unused(t);
     581             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     582          80 :   return check_rule_SortId(t)
     583          80 :          || check_term_SortRef(t);
     584             : #else
     585             :   return true;
     586             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     587             : }
     588             : 
     589             : template <typename Term>
     590          94 : bool check_rule_DataEqn(const Term& t)
     591             : {
     592          94 :   utilities::mcrl2_unused(t);
     593             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     594          94 :   return check_term_DataEqn(t);
     595             : #else
     596             :   return true;
     597             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     598             : }
     599             : 
     600             : template <typename Term>
     601             : bool check_rule_MultAct(const Term& t)
     602             : {
     603             :   utilities::mcrl2_unused(t);
     604             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     605             :   return check_term_MultAct(t);
     606             : #else
     607             :   return true;
     608             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     609             : }
     610             : 
     611             : template <typename Term>
     612             : bool check_rule_TimedMultAct(const Term& t)
     613             : {
     614             :   utilities::mcrl2_unused(t);
     615             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     616             :   return check_term_TimedMultAct(t);
     617             : #else
     618             :   return true;
     619             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     620             : }
     621             : 
     622             : template <typename Term>
     623        7508 : bool check_rule_UntypedMultiAction(const Term& t)
     624             : {
     625        7508 :   utilities::mcrl2_unused(t);
     626             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     627        7508 :   return check_term_UntypedMultiAction(t);
     628             : #else
     629             :   return true;
     630             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     631             : }
     632             : 
     633             : template <typename Term>
     634     4325545 : bool check_rule_Action(const Term& t)
     635             : {
     636     4325545 :   utilities::mcrl2_unused(t);
     637             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     638     4325545 :   return check_term_Action(t);
     639             : #else
     640             :   return true;
     641             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     642             : }
     643             : 
     644             : template <typename Term>
     645     1292445 : bool check_rule_ActId(const Term& t)
     646             : {
     647     1292445 :   utilities::mcrl2_unused(t);
     648             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     649     1292445 :   return check_term_ActId(t);
     650             : #else
     651             :   return true;
     652             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     653             : }
     654             : 
     655             : template <typename Term>
     656     4231638 : bool check_rule_ProcExpr(const Term& t)
     657             : {
     658     4231638 :   utilities::mcrl2_unused(t);
     659             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     660     4231638 :   return check_rule_Action(t)
     661     3069542 :          || check_term_Process(t)
     662     2996017 :          || check_term_ProcessAssignment(t)
     663     2150439 :          || check_term_Delta(t)
     664     2016816 :          || check_term_Tau(t)
     665     1982332 :          || check_term_Sum(t)
     666     1892641 :          || check_term_Block(t)
     667     1892641 :          || check_term_Hide(t)
     668     1891741 :          || check_term_Rename(t)
     669     1891741 :          || check_term_Comm(t)
     670     1886652 :          || check_term_Allow(t)
     671     1885051 :          || check_term_Sync(t)
     672     1762400 :          || check_term_AtTime(t)
     673     1670440 :          || check_term_Seq(t)
     674      935341 :          || check_term_IfThen(t)
     675      571129 :          || check_term_IfThenElse(t)
     676      537262 :          || check_term_BInit(t)
     677      537262 :          || check_term_Merge(t)
     678      504163 :          || check_term_LMerge(t)
     679      504163 :          || check_term_Choice(t)
     680      183516 :          || check_term_StochasticOperator(t)
     681      136288 :          || check_term_UntypedProcessAssignment(t)
     682     7301180 :          || check_rule_UntypedDataParameter(t);
     683             : #else
     684             :   return true;
     685             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     686             : }
     687             : 
     688             : template <typename Term>
     689      993845 : bool check_rule_ProcVarId(const Term& t)
     690             : {
     691      993845 :   utilities::mcrl2_unused(t);
     692             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     693      993845 :   return check_term_ProcVarId(t);
     694             : #else
     695             :   return true;
     696             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     697             : }
     698             : 
     699             : template <typename Term>
     700       22225 : bool check_rule_MultActName(const Term& t)
     701             : {
     702       22225 :   utilities::mcrl2_unused(t);
     703             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     704       22225 :   return check_term_MultActName(t);
     705             : #else
     706             :   return true;
     707             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     708             : }
     709             : 
     710             : template <typename Term>
     711           0 : bool check_rule_RenameExpr(const Term& t)
     712             : {
     713           0 :   utilities::mcrl2_unused(t);
     714             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     715           0 :   return check_term_RenameExpr(t);
     716             : #else
     717             :   return true;
     718             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     719             : }
     720             : 
     721             : template <typename Term>
     722       14913 : bool check_rule_CommExpr(const Term& t)
     723             : {
     724       14913 :   utilities::mcrl2_unused(t);
     725             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     726       14913 :   return check_term_CommExpr(t);
     727             : #else
     728             :   return true;
     729             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     730             : }
     731             : 
     732             : template <typename Term>
     733             : bool check_rule_ProcSpec(const Term& t)
     734             : {
     735             :   utilities::mcrl2_unused(t);
     736             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     737             :   return check_term_ProcSpec(t);
     738             : #else
     739             :   return true;
     740             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     741             : }
     742             : 
     743             : template <typename Term>
     744           0 : bool check_rule_ActSpec(const Term& t)
     745             : {
     746           0 :   utilities::mcrl2_unused(t);
     747             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     748           0 :   return check_term_ActSpec(t);
     749             : #else
     750             :   return true;
     751             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     752             : }
     753             : 
     754             : template <typename Term>
     755         184 : bool check_rule_GlobVarSpec(const Term& t)
     756             : {
     757         184 :   utilities::mcrl2_unused(t);
     758             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     759         184 :   return check_term_GlobVarSpec(t);
     760             : #else
     761             :   return true;
     762             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     763             : }
     764             : 
     765             : template <typename Term>
     766           0 : bool check_rule_ProcEqnSpec(const Term& t)
     767             : {
     768           0 :   utilities::mcrl2_unused(t);
     769             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     770           0 :   return check_term_ProcEqnSpec(t);
     771             : #else
     772             :   return true;
     773             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     774             : }
     775             : 
     776             : template <typename Term>
     777           0 : bool check_rule_ProcEqn(const Term& t)
     778             : {
     779           0 :   utilities::mcrl2_unused(t);
     780             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     781           0 :   return check_term_ProcEqn(t);
     782             : #else
     783             :   return true;
     784             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     785             : }
     786             : 
     787             : template <typename Term>
     788             : bool check_rule_MultActOrDelta(const Term& t)
     789             : {
     790             :   utilities::mcrl2_unused(t);
     791             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     792             :   return check_rule_MultAct(t)
     793             :          || check_term_Delta(t);
     794             : #else
     795             :   return true;
     796             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     797             : }
     798             : 
     799             : template <typename Term>
     800           0 : bool check_rule_ProcInit(const Term& t)
     801             : {
     802           0 :   utilities::mcrl2_unused(t);
     803             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     804           0 :   return check_term_ProcessInit(t);
     805             : #else
     806             :   return true;
     807             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     808             : }
     809             : 
     810             : template <typename Term>
     811       18855 : bool check_rule_Distribution(const Term& t)
     812             : {
     813       18855 :   utilities::mcrl2_unused(t);
     814             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     815       18855 :   return check_term_Distribution(t);
     816             : #else
     817             :   return true;
     818             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     819             : }
     820             : 
     821             : template <typename Term>
     822             : bool check_rule_LinProcSpec(const Term& t)
     823             : {
     824             :   utilities::mcrl2_unused(t);
     825             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     826             :   return check_term_LinProcSpec(t);
     827             : #else
     828             :   return true;
     829             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     830             : }
     831             : 
     832             : template <typename Term>
     833             : bool check_rule_LinearProcess(const Term& t)
     834             : {
     835             :   utilities::mcrl2_unused(t);
     836             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     837             :   return check_term_LinearProcess(t);
     838             : #else
     839             :   return true;
     840             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     841             : }
     842             : 
     843             : template <typename Term>
     844             : bool check_rule_LinearProcessSummand(const Term& t)
     845             : {
     846             :   utilities::mcrl2_unused(t);
     847             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     848             :   return check_term_LinearProcessSummand(t);
     849             : #else
     850             :   return true;
     851             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     852             : }
     853             : 
     854             : template <typename Term>
     855             : bool check_rule_LinearProcessInit(const Term& t)
     856             : {
     857             :   utilities::mcrl2_unused(t);
     858             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     859             :   return check_term_LinearProcessInit(t);
     860             : #else
     861             :   return true;
     862             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     863             : }
     864             : 
     865             : template <typename Term>
     866      491451 : bool check_rule_StateFrm(const Term& t)
     867             : {
     868      491451 :   utilities::mcrl2_unused(t);
     869             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     870      491451 :   return check_rule_DataExpr(t)
     871      480652 :          || check_term_StateTrue(t)
     872      449121 :          || check_term_StateFalse(t)
     873      402672 :          || check_term_StateNot(t)
     874      396419 :          || check_term_StateMinus(t)
     875      396419 :          || check_term_StateAnd(t)
     876      335164 :          || check_term_StateOr(t)
     877      307736 :          || check_term_StateImp(t)
     878      302599 :          || check_term_StatePlus(t)
     879      302599 :          || check_term_StateConstantMultiply(t)
     880      302550 :          || check_term_StateConstantMultiplyAlt(t)
     881      302536 :          || check_term_StateForall(t)
     882      300685 :          || check_term_StateExists(t)
     883      300070 :          || check_term_StateInfimum(t)
     884      300006 :          || check_term_StateSupremum(t)
     885      299991 :          || check_term_StateSum(t)
     886      299976 :          || check_term_StateMust(t)
     887      206270 :          || check_term_StateMay(t)
     888      153653 :          || check_term_StateYaled(t)
     889      153653 :          || check_term_StateYaledTimed(t)
     890      153541 :          || check_term_StateDelay(t)
     891      153541 :          || check_term_StateDelayTimed(t)
     892      153417 :          || check_term_StateVar(t)
     893       60820 :          || check_term_StateNu(t)
     894       26416 :          || check_term_StateMu(t)
     895      972103 :          || check_rule_UntypedDataParameter(t);
     896             : #else
     897             :   return true;
     898             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     899             : }
     900             : 
     901             : template <typename Term>
     902      161880 : bool check_rule_RegFrm(const Term& t)
     903             : {
     904      161880 :   utilities::mcrl2_unused(t);
     905             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     906      161880 :   return check_rule_ActFrm(t)
     907        1835 :          || check_term_RegNil(t)
     908        1835 :          || check_term_RegSeq(t)
     909        1787 :          || check_term_RegAlt(t)
     910        1692 :          || check_term_RegTrans(t)
     911        1692 :          || check_term_RegTransOrNil(t)
     912      163715 :          || check_term_UntypedRegFrm(t);
     913             : #else
     914             :   return true;
     915             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     916             : }
     917             : 
     918             : template <typename Term>
     919      189952 : bool check_rule_ActFrm(const Term& t)
     920             : {
     921      189952 :   utilities::mcrl2_unused(t);
     922             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     923      189952 :   return check_rule_DataExpr(t)
     924      189952 :          || check_term_ActTrue(t)
     925      176804 :          || check_term_ActFalse(t)
     926      168716 :          || check_term_ActNot(t)
     927      156343 :          || check_term_ActAnd(t)
     928      154130 :          || check_term_ActOr(t)
     929      153457 :          || check_term_ActImp(t)
     930      153457 :          || check_term_ActForall(t)
     931      152693 :          || check_term_ActExists(t)
     932      152350 :          || check_term_ActAt(t)
     933      152350 :          || check_term_ActMultAct(t)
     934        7508 :          || check_rule_UntypedDataParameter(t)
     935      379904 :          || check_rule_UntypedMultiAction(t);
     936             : #else
     937             :   return true;
     938             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     939             : }
     940             : 
     941             : template <typename Term>
     942             : bool check_rule_ParamIdOrAction(const Term& t)
     943             : {
     944             :   utilities::mcrl2_unused(t);
     945             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     946             :   return check_rule_UntypedDataParameter(t)
     947             :          || check_rule_Action(t);
     948             : #else
     949             :   return true;
     950             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     951             : }
     952             : 
     953             : template <typename Term>
     954             : bool check_rule_ActionRenameRules(const Term& t)
     955             : {
     956             :   utilities::mcrl2_unused(t);
     957             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     958             :   return check_term_ActionRenameRules(t);
     959             : #else
     960             :   return true;
     961             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     962             : }
     963             : 
     964             : template <typename Term>
     965             : bool check_rule_ActionRenameRule(const Term& t)
     966             : {
     967             :   utilities::mcrl2_unused(t);
     968             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     969             :   return check_term_ActionRenameRule(t);
     970             : #else
     971             :   return true;
     972             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     973             : }
     974             : 
     975             : template <typename Term>
     976             : bool check_rule_ActionRenameRuleRHS(const Term& t)
     977             : {
     978             :   utilities::mcrl2_unused(t);
     979             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     980             :   return check_rule_UntypedDataParameter(t)
     981             :          || check_rule_Action(t)
     982             :          || check_term_Delta(t)
     983             :          || check_term_Tau(t);
     984             : #else
     985             :   return true;
     986             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     987             : }
     988             : 
     989             : template <typename Term>
     990             : bool check_rule_ActionRenameSpec(const Term& t)
     991             : {
     992             :   utilities::mcrl2_unused(t);
     993             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
     994             :   return check_term_ActionRenameSpec(t);
     995             : #else
     996             :   return true;
     997             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
     998             : }
     999             : 
    1000             : template <typename Term>
    1001         183 : bool check_rule_PBES(const Term& t)
    1002             : {
    1003         183 :   utilities::mcrl2_unused(t);
    1004             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1005         183 :   return check_term_PBES(t);
    1006             : #else
    1007             :   return true;
    1008             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1009             : }
    1010             : 
    1011             : template <typename Term>
    1012         183 : bool check_rule_PBEqnSpec(const Term& t)
    1013             : {
    1014         183 :   utilities::mcrl2_unused(t);
    1015             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1016         183 :   return check_term_PBEqnSpec(t);
    1017             : #else
    1018             :   return true;
    1019             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1020             : }
    1021             : 
    1022             : template <typename Term>
    1023         183 : bool check_rule_PBInit(const Term& t)
    1024             : {
    1025         183 :   utilities::mcrl2_unused(t);
    1026             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1027         183 :   return check_term_PBInit(t);
    1028             : #else
    1029             :   return true;
    1030             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1031             : }
    1032             : 
    1033             : template <typename Term>
    1034         667 : bool check_rule_PBEqn(const Term& t)
    1035             : {
    1036         667 :   utilities::mcrl2_unused(t);
    1037             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1038         667 :   return check_term_PBEqn(t);
    1039             : #else
    1040             :   return true;
    1041             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1042             : }
    1043             : 
    1044             : template <typename Term>
    1045        4427 : bool check_rule_FixPoint(const Term& t)
    1046             : {
    1047        4427 :   utilities::mcrl2_unused(t);
    1048             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1049        4427 :   return check_term_Mu(t)
    1050        4427 :          || check_term_Nu(t);
    1051             : #else
    1052             :   return true;
    1053             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1054             : }
    1055             : 
    1056             : template <typename Term>
    1057         668 : bool check_rule_PropVarDecl(const Term& t)
    1058             : {
    1059         668 :   utilities::mcrl2_unused(t);
    1060             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1061         668 :   return check_term_PropVarDecl(t);
    1062             : #else
    1063             :   return true;
    1064             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1065             : }
    1066             : 
    1067             : template <typename Term>
    1068     4386895 : bool check_rule_PBExpr(const Term& t)
    1069             : {
    1070     4386895 :   utilities::mcrl2_unused(t);
    1071             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1072     4386895 :   return check_rule_DataExpr(t)
    1073     3037261 :          || check_term_PBESTrue(t)
    1074     3037261 :          || check_term_PBESFalse(t)
    1075     3037261 :          || check_term_PBESNot(t)
    1076     3019673 :          || check_term_PBESAnd(t)
    1077     2134517 :          || check_term_PBESOr(t)
    1078     1331068 :          || check_term_PBESImp(t)
    1079     1251368 :          || check_term_PBESForall(t)
    1080     1136426 :          || check_term_PBESExists(t)
    1081     1075584 :          || check_rule_PropVarInst(t)
    1082     7424156 :          || check_rule_UntypedDataParameter(t);
    1083             : #else
    1084             :   return true;
    1085             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1086             : }
    1087             : 
    1088             : template <typename Term>
    1089     1083639 : bool check_rule_PropVarInst(const Term& t)
    1090             : {
    1091     1083639 :   utilities::mcrl2_unused(t);
    1092             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1093     1083639 :   return check_term_PropVarInst(t);
    1094             : #else
    1095             :   return true;
    1096             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1097             : }
    1098             : 
    1099             : template <typename Term>
    1100           1 : bool check_rule_PRES(const Term& t)
    1101             : {
    1102           1 :   utilities::mcrl2_unused(t);
    1103             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1104           1 :   return check_term_PRES(t);
    1105             : #else
    1106             :   return true;
    1107             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1108             : }
    1109             : 
    1110             : template <typename Term>
    1111           1 : bool check_rule_PREqnSpec(const Term& t)
    1112             : {
    1113           1 :   utilities::mcrl2_unused(t);
    1114             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1115           1 :   return check_term_PREqnSpec(t);
    1116             : #else
    1117             :   return true;
    1118             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1119             : }
    1120             : 
    1121             : template <typename Term>
    1122           1 : bool check_rule_PRInit(const Term& t)
    1123             : {
    1124           1 :   utilities::mcrl2_unused(t);
    1125             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1126           1 :   return check_term_PRInit(t);
    1127             : #else
    1128             :   return true;
    1129             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1130             : }
    1131             : 
    1132             : template <typename Term>
    1133           1 : bool check_rule_PREqn(const Term& t)
    1134             : {
    1135           1 :   utilities::mcrl2_unused(t);
    1136             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1137           1 :   return check_term_PREqn(t);
    1138             : #else
    1139             :   return true;
    1140             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1141             : }
    1142             : 
    1143             : template <typename Term>
    1144       59750 : bool check_rule_PRExpr(const Term& t)
    1145             : {
    1146       59750 :   utilities::mcrl2_unused(t);
    1147             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1148       59750 :   return check_rule_DataExpr(t)
    1149       38695 :          || check_term_PRESTrue(t)
    1150       38695 :          || check_term_PRESFalse(t)
    1151       38695 :          || check_term_PRESMinus(t)
    1152       38604 :          || check_term_PRESAnd(t)
    1153       28131 :          || check_term_PRESOr(t)
    1154       20728 :          || check_term_PRESImp(t)
    1155       19393 :          || check_term_PRESPlus(t)
    1156       18986 :          || check_term_PRESConstantMultiply(t)
    1157       12084 :          || check_term_PRESConstantMultiplyAlt(t)
    1158       12084 :          || check_term_PRESInfimum(t)
    1159       10309 :          || check_term_PRESSupremum(t)
    1160        8525 :          || check_term_PRESSum(t)
    1161        8525 :          || check_term_PRESEqInf(t)
    1162        8390 :          || check_term_PRESEqNInf(t)
    1163        8147 :          || check_term_PRESCondSm(t)
    1164        8143 :          || check_term_PRESCondEq(t)
    1165        7871 :          || check_rule_PropVarInst(t)
    1166       98445 :          || check_rule_UntypedDataParameter(t);
    1167             : #else
    1168             :   return true;
    1169             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1170             : }
    1171             : 
    1172             : // SortCons(SortConsType, SortExpr)
    1173             : template <typename Term>
    1174   635544617 : bool check_term_SortCons(const Term& t)
    1175             : {
    1176   635544617 :   utilities::mcrl2_unused(t);
    1177             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1178             :   // check the type of the term
    1179   635544617 :   const atermpp::aterm& term(t);
    1180   635544617 :   if (!term.type_is_appl())
    1181             :   {
    1182           0 :     return false;
    1183             :   }
    1184   635544617 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1185   635544617 :   if (a.function() != core::detail::function_symbols::SortCons)
    1186             :   {
    1187   562781612 :     return false;
    1188             :   }
    1189             : 
    1190             :   // check the children
    1191    72763005 :   if (a.size() != 2)
    1192             :   {
    1193           0 :     return false;
    1194             :   }
    1195             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1196    72763005 :   if (!check_term_argument(a[0], check_rule_SortConsType<atermpp::aterm>))
    1197             :   {
    1198           0 :     mCRL2log(log::debug) << "check_rule_SortConsType" << std::endl;
    1199           0 :     return false;
    1200             :   }
    1201    72763005 :   if (!check_term_argument(a[1], check_rule_SortExpr<atermpp::aterm>))
    1202             :   {
    1203           0 :     mCRL2log(log::debug) << "check_rule_SortExpr" << std::endl;
    1204           0 :     return false;
    1205             :   }
    1206             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1207             : 
    1208             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1209    72763005 :   return true;
    1210             : }
    1211             : 
    1212             : // SortStruct(StructCons+)
    1213             : template <typename Term>
    1214   562800196 : bool check_term_SortStruct(const Term& t)
    1215             : {
    1216   562800196 :   utilities::mcrl2_unused(t);
    1217             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1218             :   // check the type of the term
    1219   562800196 :   const atermpp::aterm& term(t);
    1220   562800196 :   if (!term.type_is_appl())
    1221             :   {
    1222           0 :     return false;
    1223             :   }
    1224   562800196 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1225   562800196 :   if (a.function() != core::detail::function_symbols::SortStruct)
    1226             :   {
    1227   553010882 :     return false;
    1228             :   }
    1229             : 
    1230             :   // check the children
    1231     9789314 :   if (a.size() != 1)
    1232             :   {
    1233           0 :     return false;
    1234             :   }
    1235             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1236     9789314 :   if (!check_list_argument(a[0], check_rule_StructCons<atermpp::aterm>, 1))
    1237             :   {
    1238           0 :     mCRL2log(log::debug) << "check_rule_StructCons" << std::endl;
    1239           0 :     return false;
    1240             :   }
    1241             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1242             : 
    1243             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1244     9789314 :   return true;
    1245             : }
    1246             : 
    1247             : // SortArrow(SortExpr+, SortExpr)
    1248             : template <typename Term>
    1249   594012644 : bool check_term_SortArrow(const Term& t)
    1250             : {
    1251   594012644 :   utilities::mcrl2_unused(t);
    1252             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1253             :   // check the type of the term
    1254   594012644 :   const atermpp::aterm& term(t);
    1255   594012644 :   if (!term.type_is_appl())
    1256             :   {
    1257           0 :     return false;
    1258             :   }
    1259   594012644 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1260   594012644 :   if (a.function() != core::detail::function_symbols::SortArrow)
    1261             :   {
    1262    20483502 :     return false;
    1263             :   }
    1264             : 
    1265             :   // check the children
    1266   573529142 :   if (a.size() != 2)
    1267             :   {
    1268           0 :     return false;
    1269             :   }
    1270             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1271   573529142 :   if (!check_list_argument(a[0], check_rule_SortExpr<atermpp::aterm>, 1))
    1272             :   {
    1273           0 :     mCRL2log(log::debug) << "check_rule_SortExpr" << std::endl;
    1274           0 :     return false;
    1275             :   }
    1276   573529142 :   if (!check_term_argument(a[1], check_rule_SortExpr<atermpp::aterm>))
    1277             :   {
    1278           0 :     mCRL2log(log::debug) << "check_rule_SortExpr" << std::endl;
    1279           0 :     return false;
    1280             :   }
    1281             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1282             : 
    1283             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1284   573529142 :   return true;
    1285             : }
    1286             : 
    1287             : // UntypedSortUnknown()
    1288             : template <typename Term>
    1289    20492498 : bool check_term_UntypedSortUnknown(const Term& t)
    1290             : {
    1291    20492498 :   utilities::mcrl2_unused(t);
    1292             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1293             :   // check the type of the term
    1294    20492498 :   const atermpp::aterm& term(t);
    1295    20492498 :   if (!term.type_is_appl())
    1296             :   {
    1297           0 :     return false;
    1298             :   }
    1299    20492498 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1300    20492498 :   if (a.function() != core::detail::function_symbols::UntypedSortUnknown)
    1301             :   {
    1302      207744 :     return false;
    1303             :   }
    1304             : 
    1305             :   // check the children
    1306    20284754 :   if (a.size() != 0)
    1307             :   {
    1308           0 :     return false;
    1309             :   }
    1310             : 
    1311             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1312    20284754 :   return true;
    1313             : }
    1314             : 
    1315             : // UntypedSortsPossible(SortExpr+)
    1316             : template <typename Term>
    1317      222073 : bool check_term_UntypedSortsPossible(const Term& t)
    1318             : {
    1319      222073 :   utilities::mcrl2_unused(t);
    1320             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1321             :   // check the type of the term
    1322      222073 :   const atermpp::aterm& term(t);
    1323      222073 :   if (!term.type_is_appl())
    1324             :   {
    1325           0 :     return false;
    1326             :   }
    1327      222073 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1328      222073 :   if (a.function() != core::detail::function_symbols::UntypedSortsPossible)
    1329             :   {
    1330        4374 :     return false;
    1331             :   }
    1332             : 
    1333             :   // check the children
    1334      217699 :   if (a.size() != 1)
    1335             :   {
    1336           0 :     return false;
    1337             :   }
    1338             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1339      217699 :   if (!check_list_argument(a[0], check_rule_SortExpr<atermpp::aterm>, 1))
    1340             :   {
    1341           0 :     mCRL2log(log::debug) << "check_rule_SortExpr" << std::endl;
    1342           0 :     return false;
    1343             :   }
    1344             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1345             : 
    1346             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1347      217699 :   return true;
    1348             : }
    1349             : 
    1350             : // UntypedSortVariable(Number)
    1351             : template <typename Term>
    1352        6354 : bool check_term_UntypedSortVariable(const Term& t)
    1353             : {
    1354        6354 :   utilities::mcrl2_unused(t);
    1355             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1356             :   // check the type of the term
    1357        6354 :   const atermpp::aterm& term(t);
    1358        6354 :   if (!term.type_is_appl())
    1359             :   {
    1360           0 :     return false;
    1361             :   }
    1362        6354 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1363        6354 :   if (a.function() != core::detail::function_symbols::UntypedSortVariable)
    1364             :   {
    1365           0 :     return false;
    1366             :   }
    1367             : 
    1368             :   // check the children
    1369        6354 :   if (a.size() != 1)
    1370             :   {
    1371           0 :     return false;
    1372             :   }
    1373             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1374        6354 :   if (!check_term_argument(a[0], check_rule_Number<atermpp::aterm>))
    1375             :   {
    1376           0 :     mCRL2log(log::debug) << "check_rule_Number" << std::endl;
    1377           0 :     return false;
    1378             :   }
    1379             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1380             : 
    1381             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1382        6354 :   return true;
    1383             : }
    1384             : 
    1385             : // SortId(String)
    1386             : template <typename Term>
    1387  2633653010 : bool check_term_SortId(const Term& t)
    1388             : {
    1389  2633653010 :   utilities::mcrl2_unused(t);
    1390             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1391             :   // check the type of the term
    1392  2633653010 :   const atermpp::aterm& term(t);
    1393  2633653010 :   if (!term.type_is_appl())
    1394             :   {
    1395           0 :     return false;
    1396             :   }
    1397  2633653010 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1398  2633653010 :   if (a.function() != core::detail::function_symbols::SortId)
    1399             :   {
    1400   632286677 :     return false;
    1401             :   }
    1402             : 
    1403             :   // check the children
    1404  2001366333 :   if (a.size() != 1)
    1405             :   {
    1406           0 :     return false;
    1407             :   }
    1408             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1409  2001366333 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    1410             :   {
    1411           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    1412           0 :     return false;
    1413             :   }
    1414             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1415             : 
    1416             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1417  2001366333 :   return true;
    1418             : }
    1419             : 
    1420             : // SortList()
    1421             : template <typename Term>
    1422    75317838 : bool check_term_SortList(const Term& t)
    1423             : {
    1424    75317838 :   utilities::mcrl2_unused(t);
    1425             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1426             :   // check the type of the term
    1427    75317838 :   const atermpp::aterm& term(t);
    1428    75317838 :   if (!term.type_is_appl())
    1429             :   {
    1430           0 :     return false;
    1431             :   }
    1432    75317838 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1433    75317838 :   if (a.function() != core::detail::function_symbols::SortList)
    1434             :   {
    1435    22796446 :     return false;
    1436             :   }
    1437             : 
    1438             :   // check the children
    1439    52521392 :   if (a.size() != 0)
    1440             :   {
    1441           0 :     return false;
    1442             :   }
    1443             : 
    1444             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1445    52521392 :   return true;
    1446             : }
    1447             : 
    1448             : // SortSet()
    1449             : template <typename Term>
    1450    22797004 : bool check_term_SortSet(const Term& t)
    1451             : {
    1452    22797004 :   utilities::mcrl2_unused(t);
    1453             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1454             :   // check the type of the term
    1455    22797004 :   const atermpp::aterm& term(t);
    1456    22797004 :   if (!term.type_is_appl())
    1457             :   {
    1458           0 :     return false;
    1459             :   }
    1460    22797004 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1461    22797004 :   if (a.function() != core::detail::function_symbols::SortSet)
    1462             :   {
    1463    17977375 :     return false;
    1464             :   }
    1465             : 
    1466             :   // check the children
    1467     4819629 :   if (a.size() != 0)
    1468             :   {
    1469           0 :     return false;
    1470             :   }
    1471             : 
    1472             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1473     4819629 :   return true;
    1474             : }
    1475             : 
    1476             : // SortBag()
    1477             : template <typename Term>
    1478    17977699 : bool check_term_SortBag(const Term& t)
    1479             : {
    1480    17977699 :   utilities::mcrl2_unused(t);
    1481             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1482             :   // check the type of the term
    1483    17977699 :   const atermpp::aterm& term(t);
    1484    17977699 :   if (!term.type_is_appl())
    1485             :   {
    1486           0 :     return false;
    1487             :   }
    1488    17977699 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1489    17977699 :   if (a.function() != core::detail::function_symbols::SortBag)
    1490             :   {
    1491    15719631 :     return false;
    1492             :   }
    1493             : 
    1494             :   // check the children
    1495     2258068 :   if (a.size() != 0)
    1496             :   {
    1497           0 :     return false;
    1498             :   }
    1499             : 
    1500             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1501     2258068 :   return true;
    1502             : }
    1503             : 
    1504             : // SortFSet()
    1505             : template <typename Term>
    1506    15720335 : bool check_term_SortFSet(const Term& t)
    1507             : {
    1508    15720335 :   utilities::mcrl2_unused(t);
    1509             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1510             :   // check the type of the term
    1511    15720335 :   const atermpp::aterm& term(t);
    1512    15720335 :   if (!term.type_is_appl())
    1513             :   {
    1514           0 :     return false;
    1515             :   }
    1516    15720335 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1517    15720335 :   if (a.function() != core::detail::function_symbols::SortFSet)
    1518             :   {
    1519     4310328 :     return false;
    1520             :   }
    1521             : 
    1522             :   // check the children
    1523    11410007 :   if (a.size() != 0)
    1524             :   {
    1525           0 :     return false;
    1526             :   }
    1527             : 
    1528             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1529    11410007 :   return true;
    1530             : }
    1531             : 
    1532             : // SortFBag()
    1533             : template <typename Term>
    1534     4311737 : bool check_term_SortFBag(const Term& t)
    1535             : {
    1536     4311737 :   utilities::mcrl2_unused(t);
    1537             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1538             :   // check the type of the term
    1539     4311737 :   const atermpp::aterm& term(t);
    1540     4311737 :   if (!term.type_is_appl())
    1541             :   {
    1542           0 :     return false;
    1543             :   }
    1544     4311737 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1545     4311737 :   if (a.function() != core::detail::function_symbols::SortFBag)
    1546             :   {
    1547           0 :     return false;
    1548             :   }
    1549             : 
    1550             :   // check the children
    1551     4311737 :   if (a.size() != 0)
    1552             :   {
    1553           0 :     return false;
    1554             :   }
    1555             : 
    1556             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1557     4311737 :   return true;
    1558             : }
    1559             : 
    1560             : // StructCons(String, StructProj*, StringOrEmpty)
    1561             : template <typename Term>
    1562    20838605 : bool check_term_StructCons(const Term& t)
    1563             : {
    1564    20838605 :   utilities::mcrl2_unused(t);
    1565             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1566             :   // check the type of the term
    1567    20838605 :   const atermpp::aterm& term(t);
    1568    20838605 :   if (!term.type_is_appl())
    1569             :   {
    1570           0 :     return false;
    1571             :   }
    1572    20838605 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1573    20838605 :   if (a.function() != core::detail::function_symbols::StructCons)
    1574             :   {
    1575           0 :     return false;
    1576             :   }
    1577             : 
    1578             :   // check the children
    1579    20838605 :   if (a.size() != 3)
    1580             :   {
    1581           0 :     return false;
    1582             :   }
    1583             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1584    20838605 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    1585             :   {
    1586           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    1587           0 :     return false;
    1588             :   }
    1589    20838605 :   if (!check_list_argument(a[1], check_rule_StructProj<atermpp::aterm>, 0))
    1590             :   {
    1591           0 :     mCRL2log(log::debug) << "check_rule_StructProj" << std::endl;
    1592           0 :     return false;
    1593             :   }
    1594    20838605 :   if (!check_term_argument(a[2], check_rule_StringOrEmpty<atermpp::aterm>))
    1595             :   {
    1596           0 :     mCRL2log(log::debug) << "check_rule_StringOrEmpty" << std::endl;
    1597           0 :     return false;
    1598             :   }
    1599             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1600             : 
    1601             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1602    20838605 :   return true;
    1603             : }
    1604             : 
    1605             : // StructProj(StringOrEmpty, SortExpr)
    1606             : template <typename Term>
    1607     6028104 : bool check_term_StructProj(const Term& t)
    1608             : {
    1609     6028104 :   utilities::mcrl2_unused(t);
    1610             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1611             :   // check the type of the term
    1612     6028104 :   const atermpp::aterm& term(t);
    1613     6028104 :   if (!term.type_is_appl())
    1614             :   {
    1615           0 :     return false;
    1616             :   }
    1617     6028104 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1618     6028104 :   if (a.function() != core::detail::function_symbols::StructProj)
    1619             :   {
    1620           0 :     return false;
    1621             :   }
    1622             : 
    1623             :   // check the children
    1624     6028104 :   if (a.size() != 2)
    1625             :   {
    1626           0 :     return false;
    1627             :   }
    1628             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1629     6028104 :   if (!check_term_argument(a[0], check_rule_StringOrEmpty<atermpp::aterm>))
    1630             :   {
    1631           0 :     mCRL2log(log::debug) << "check_rule_StringOrEmpty" << std::endl;
    1632           0 :     return false;
    1633             :   }
    1634     6028104 :   if (!check_term_argument(a[1], check_rule_SortExpr<atermpp::aterm>))
    1635             :   {
    1636           0 :     mCRL2log(log::debug) << "check_rule_SortExpr" << std::endl;
    1637           0 :     return false;
    1638             :   }
    1639             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1640             : 
    1641             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1642     6028104 :   return true;
    1643             : }
    1644             : 
    1645             : // Binder(BindingOperator, DataVarId+, DataExpr)
    1646             : template <typename Term>
    1647     5233594 : bool check_term_Binder(const Term& t)
    1648             : {
    1649     5233594 :   utilities::mcrl2_unused(t);
    1650             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1651             :   // check the type of the term
    1652     5233594 :   const atermpp::aterm& term(t);
    1653     5233594 :   if (!term.type_is_appl())
    1654             :   {
    1655           0 :     return false;
    1656             :   }
    1657     5233594 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1658     5233594 :   if (a.function() != core::detail::function_symbols::Binder)
    1659             :   {
    1660     4747839 :     return false;
    1661             :   }
    1662             : 
    1663             :   // check the children
    1664      485755 :   if (a.size() != 3)
    1665             :   {
    1666           0 :     return false;
    1667             :   }
    1668             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1669      485755 :   if (!check_term_argument(a[0], check_rule_BindingOperator<atermpp::aterm>))
    1670             :   {
    1671           0 :     mCRL2log(log::debug) << "check_rule_BindingOperator" << std::endl;
    1672           0 :     return false;
    1673             :   }
    1674      485755 :   if (!check_list_argument(a[1], check_rule_DataVarId<atermpp::aterm>, 1))
    1675             :   {
    1676           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    1677           0 :     return false;
    1678             :   }
    1679      485755 :   if (!check_term_argument(a[2], check_rule_DataExpr<atermpp::aterm>))
    1680             :   {
    1681           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    1682           0 :     return false;
    1683             :   }
    1684             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1685             : 
    1686             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1687      485755 :   return true;
    1688             : }
    1689             : 
    1690             : // Whr(DataExpr, WhrDecl+)
    1691             : template <typename Term>
    1692     4748481 : bool check_term_Whr(const Term& t)
    1693             : {
    1694     4748481 :   utilities::mcrl2_unused(t);
    1695             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1696             :   // check the type of the term
    1697     4748481 :   const atermpp::aterm& term(t);
    1698     4748481 :   if (!term.type_is_appl())
    1699             :   {
    1700           0 :     return false;
    1701             :   }
    1702     4748481 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1703     4748481 :   if (a.function() != core::detail::function_symbols::Whr)
    1704             :   {
    1705     4746246 :     return false;
    1706             :   }
    1707             : 
    1708             :   // check the children
    1709        2235 :   if (a.size() != 2)
    1710             :   {
    1711           0 :     return false;
    1712             :   }
    1713             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1714        2235 :   if (!check_term_argument(a[0], check_rule_DataExpr<atermpp::aterm>))
    1715             :   {
    1716           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    1717           0 :     return false;
    1718             :   }
    1719        2235 :   if (!check_list_argument(a[1], check_rule_WhrDecl<atermpp::aterm>, 1))
    1720             :   {
    1721           0 :     mCRL2log(log::debug) << "check_rule_WhrDecl" << std::endl;
    1722           0 :     return false;
    1723             :   }
    1724             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1725             : 
    1726             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1727        2235 :   return true;
    1728             : }
    1729             : 
    1730             : // UntypedIdentifier(String)
    1731             : template <typename Term>
    1732     4835295 : bool check_term_UntypedIdentifier(const Term& t)
    1733             : {
    1734     4835295 :   utilities::mcrl2_unused(t);
    1735             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1736             :   // check the type of the term
    1737     4835295 :   const atermpp::aterm& term(t);
    1738     4835295 :   if (!term.type_is_appl())
    1739             :   {
    1740           0 :     return false;
    1741             :   }
    1742     4835295 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1743     4835295 :   if (a.function() != core::detail::function_symbols::UntypedIdentifier)
    1744             :   {
    1745     3746560 :     return false;
    1746             :   }
    1747             : 
    1748             :   // check the children
    1749     1088735 :   if (a.size() != 1)
    1750             :   {
    1751           0 :     return false;
    1752             :   }
    1753             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1754     1088735 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    1755             :   {
    1756           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    1757           0 :     return false;
    1758             :   }
    1759             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1760             : 
    1761             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1762     1088735 :   return true;
    1763             : }
    1764             : 
    1765             : // DataVarId(String, SortExpr)
    1766             : template <typename Term>
    1767  1000619560 : bool check_term_DataVarId(const Term& t)
    1768             : {
    1769  1000619560 :   utilities::mcrl2_unused(t);
    1770             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1771             :   // check the type of the term
    1772  1000619560 :   const atermpp::aterm& term(t);
    1773  1000619560 :   if (!term.type_is_appl())
    1774             :   {
    1775           0 :     return false;
    1776             :   }
    1777  1000619560 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1778  1000619560 :   if (a.function() != core::detail::function_symbols::DataVarId)
    1779             :   {
    1780   722398433 :     return false;
    1781             :   }
    1782             : 
    1783             :   // check the children
    1784   278221127 :   if (a.size() != 2)
    1785             :   {
    1786           0 :     return false;
    1787             :   }
    1788             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1789   278221127 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    1790             :   {
    1791           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    1792           0 :     return false;
    1793             :   }
    1794   278221127 :   if (!check_term_argument(a[1], check_rule_SortExpr<atermpp::aterm>))
    1795             :   {
    1796           0 :     mCRL2log(log::debug) << "check_rule_SortExpr" << std::endl;
    1797           0 :     return false;
    1798             :   }
    1799             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1800             : 
    1801             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1802   278221127 :   return true;
    1803             : }
    1804             : 
    1805             : // OpId(String, SortExpr, Number)
    1806             : template <typename Term>
    1807   769490923 : bool check_term_OpId(const Term& t)
    1808             : {
    1809   769490923 :   utilities::mcrl2_unused(t);
    1810             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1811             :   // check the type of the term
    1812   769490923 :   const atermpp::aterm& term(t);
    1813   769490923 :   if (!term.type_is_appl())
    1814             :   {
    1815           0 :     return false;
    1816             :   }
    1817   769490923 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1818   769490923 :   if (a.function() != core::detail::function_symbols::OpId)
    1819             :   {
    1820   228797632 :     return false;
    1821             :   }
    1822             : 
    1823             :   // check the children
    1824   540693291 :   if (a.size() != 3)
    1825             :   {
    1826           0 :     return false;
    1827             :   }
    1828             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1829   540693291 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    1830             :   {
    1831           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    1832           0 :     return false;
    1833             :   }
    1834   540693291 :   if (!check_term_argument(a[1], check_rule_SortExpr<atermpp::aterm>))
    1835             :   {
    1836           0 :     mCRL2log(log::debug) << "check_rule_SortExpr" << std::endl;
    1837           0 :     return false;
    1838             :   }
    1839   540693291 :   if (!check_term_argument(a[2], check_rule_Number<atermpp::aterm>))
    1840             :   {
    1841           0 :     mCRL2log(log::debug) << "check_rule_Number" << std::endl;
    1842           0 :     return false;
    1843             :   }
    1844             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1845             : 
    1846             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1847   540693291 :   return true;
    1848             : }
    1849             : 
    1850             : // UntypedDataParameter(String, DataExpr*)
    1851             : template <typename Term>
    1852      156134 : bool check_term_UntypedDataParameter(const Term& t)
    1853             : {
    1854      156134 :   utilities::mcrl2_unused(t);
    1855             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1856             :   // check the type of the term
    1857      156134 :   const atermpp::aterm& term(t);
    1858      156134 :   if (!term.type_is_appl())
    1859             :   {
    1860           0 :     return false;
    1861             :   }
    1862      156134 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1863      156134 :   if (a.function() != core::detail::function_symbols::UntypedDataParameter)
    1864             :   {
    1865        7508 :     return false;
    1866             :   }
    1867             : 
    1868             :   // check the children
    1869      148626 :   if (a.size() != 2)
    1870             :   {
    1871           0 :     return false;
    1872             :   }
    1873             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1874      148626 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    1875             :   {
    1876           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    1877           0 :     return false;
    1878             :   }
    1879      148626 :   if (!check_list_argument(a[1], check_rule_DataExpr<atermpp::aterm>, 0))
    1880             :   {
    1881           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    1882           0 :     return false;
    1883             :   }
    1884             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    1885             : 
    1886             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1887      148626 :   return true;
    1888             : }
    1889             : 
    1890             : // Forall()
    1891             : template <typename Term>
    1892      602253 : bool check_term_Forall(const Term& t)
    1893             : {
    1894      602253 :   utilities::mcrl2_unused(t);
    1895             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1896             :   // check the type of the term
    1897      602253 :   const atermpp::aterm& term(t);
    1898      602253 :   if (!term.type_is_appl())
    1899             :   {
    1900           0 :     return false;
    1901             :   }
    1902      602253 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1903      602253 :   if (a.function() != core::detail::function_symbols::Forall)
    1904             :   {
    1905      301030 :     return false;
    1906             :   }
    1907             : 
    1908             :   // check the children
    1909      301223 :   if (a.size() != 0)
    1910             :   {
    1911           0 :     return false;
    1912             :   }
    1913             : 
    1914             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1915      301223 :   return true;
    1916             : }
    1917             : 
    1918             : // Exists()
    1919             : template <typename Term>
    1920      301030 : bool check_term_Exists(const Term& t)
    1921             : {
    1922      301030 :   utilities::mcrl2_unused(t);
    1923             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1924             :   // check the type of the term
    1925      301030 :   const atermpp::aterm& term(t);
    1926      301030 :   if (!term.type_is_appl())
    1927             :   {
    1928           0 :     return false;
    1929             :   }
    1930      301030 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1931      301030 :   if (a.function() != core::detail::function_symbols::Exists)
    1932             :   {
    1933      294612 :     return false;
    1934             :   }
    1935             : 
    1936             :   // check the children
    1937        6418 :   if (a.size() != 0)
    1938             :   {
    1939           0 :     return false;
    1940             :   }
    1941             : 
    1942             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1943        6418 :   return true;
    1944             : }
    1945             : 
    1946             : // SetComp()
    1947             : template <typename Term>
    1948      294612 : bool check_term_SetComp(const Term& t)
    1949             : {
    1950      294612 :   utilities::mcrl2_unused(t);
    1951             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1952             :   // check the type of the term
    1953      294612 :   const atermpp::aterm& term(t);
    1954      294612 :   if (!term.type_is_appl())
    1955             :   {
    1956           0 :     return false;
    1957             :   }
    1958      294612 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1959      294612 :   if (a.function() != core::detail::function_symbols::SetComp)
    1960             :   {
    1961      294177 :     return false;
    1962             :   }
    1963             : 
    1964             :   // check the children
    1965         435 :   if (a.size() != 0)
    1966             :   {
    1967           0 :     return false;
    1968             :   }
    1969             : 
    1970             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1971         435 :   return true;
    1972             : }
    1973             : 
    1974             : // BagComp()
    1975             : template <typename Term>
    1976      294177 : bool check_term_BagComp(const Term& t)
    1977             : {
    1978      294177 :   utilities::mcrl2_unused(t);
    1979             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    1980             :   // check the type of the term
    1981      294177 :   const atermpp::aterm& term(t);
    1982      294177 :   if (!term.type_is_appl())
    1983             :   {
    1984           0 :     return false;
    1985             :   }
    1986      294177 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    1987      294177 :   if (a.function() != core::detail::function_symbols::BagComp)
    1988             :   {
    1989      293999 :     return false;
    1990             :   }
    1991             : 
    1992             :   // check the children
    1993         178 :   if (a.size() != 0)
    1994             :   {
    1995           0 :     return false;
    1996             :   }
    1997             : 
    1998             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    1999         178 :   return true;
    2000             : }
    2001             : 
    2002             : // Lambda()
    2003             : template <typename Term>
    2004      293999 : bool check_term_Lambda(const Term& t)
    2005             : {
    2006      293999 :   utilities::mcrl2_unused(t);
    2007             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2008             :   // check the type of the term
    2009      293999 :   const atermpp::aterm& term(t);
    2010      293999 :   if (!term.type_is_appl())
    2011             :   {
    2012           0 :     return false;
    2013             :   }
    2014      293999 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2015      293999 :   if (a.function() != core::detail::function_symbols::Lambda)
    2016             :   {
    2017         580 :     return false;
    2018             :   }
    2019             : 
    2020             :   // check the children
    2021      293419 :   if (a.size() != 0)
    2022             :   {
    2023           0 :     return false;
    2024             :   }
    2025             : 
    2026             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2027      293419 :   return true;
    2028             : }
    2029             : 
    2030             : // UntypedSetBagComp()
    2031             : template <typename Term>
    2032         580 : bool check_term_UntypedSetBagComp(const Term& t)
    2033             : {
    2034         580 :   utilities::mcrl2_unused(t);
    2035             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2036             :   // check the type of the term
    2037         580 :   const atermpp::aterm& term(t);
    2038         580 :   if (!term.type_is_appl())
    2039             :   {
    2040           0 :     return false;
    2041             :   }
    2042         580 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2043         580 :   if (a.function() != core::detail::function_symbols::UntypedSetBagComp)
    2044             :   {
    2045           0 :     return false;
    2046             :   }
    2047             : 
    2048             :   // check the children
    2049         580 :   if (a.size() != 0)
    2050             :   {
    2051           0 :     return false;
    2052             :   }
    2053             : 
    2054             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2055         580 :   return true;
    2056             : }
    2057             : 
    2058             : // DataVarIdInit(DataVarId, DataExpr)
    2059             : template <typename Term>
    2060     1094154 : bool check_term_DataVarIdInit(const Term& t)
    2061             : {
    2062     1094154 :   utilities::mcrl2_unused(t);
    2063             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2064             :   // check the type of the term
    2065     1094154 :   const atermpp::aterm& term(t);
    2066     1094154 :   if (!term.type_is_appl())
    2067             :   {
    2068           0 :     return false;
    2069             :   }
    2070     1094154 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2071     1094154 :   if (a.function() != core::detail::function_symbols::DataVarIdInit)
    2072             :   {
    2073        1884 :     return false;
    2074             :   }
    2075             : 
    2076             :   // check the children
    2077     1092270 :   if (a.size() != 2)
    2078             :   {
    2079           0 :     return false;
    2080             :   }
    2081             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2082     1092270 :   if (!check_term_argument(a[0], check_rule_DataVarId<atermpp::aterm>))
    2083             :   {
    2084           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    2085           0 :     return false;
    2086             :   }
    2087     1092270 :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    2088             :   {
    2089           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    2090           0 :     return false;
    2091             :   }
    2092             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2093             : 
    2094             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2095     1092270 :   return true;
    2096             : }
    2097             : 
    2098             : // UntypedIdentifierAssignment(String, DataExpr)
    2099             : template <typename Term>
    2100       65729 : bool check_term_UntypedIdentifierAssignment(const Term& t)
    2101             : {
    2102       65729 :   utilities::mcrl2_unused(t);
    2103             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2104             :   // check the type of the term
    2105       65729 :   const atermpp::aterm& term(t);
    2106       65729 :   if (!term.type_is_appl())
    2107             :   {
    2108           0 :     return false;
    2109             :   }
    2110       65729 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2111       65729 :   if (a.function() != core::detail::function_symbols::UntypedIdentifierAssignment)
    2112             :   {
    2113           0 :     return false;
    2114             :   }
    2115             : 
    2116             :   // check the children
    2117       65729 :   if (a.size() != 2)
    2118             :   {
    2119           0 :     return false;
    2120             :   }
    2121             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2122       65729 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    2123             :   {
    2124           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    2125           0 :     return false;
    2126             :   }
    2127       65729 :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    2128             :   {
    2129           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    2130           0 :     return false;
    2131             :   }
    2132             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2133             : 
    2134             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2135       65729 :   return true;
    2136             : }
    2137             : 
    2138             : // DataSpec(SortSpec, ConsSpec, MapSpec, DataEqnSpec)
    2139             : template <typename Term>
    2140         187 : bool check_term_DataSpec(const Term& t)
    2141             : {
    2142         187 :   utilities::mcrl2_unused(t);
    2143             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2144             :   // check the type of the term
    2145         187 :   const atermpp::aterm& term(t);
    2146         187 :   if (!term.type_is_appl())
    2147             :   {
    2148           0 :     return false;
    2149             :   }
    2150         187 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2151         187 :   if (a.function() != core::detail::function_symbols::DataSpec)
    2152             :   {
    2153           0 :     return false;
    2154             :   }
    2155             : 
    2156             :   // check the children
    2157         187 :   if (a.size() != 4)
    2158             :   {
    2159           0 :     return false;
    2160             :   }
    2161             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2162         187 :   if (!check_term_argument(a[0], check_rule_SortSpec<atermpp::aterm>))
    2163             :   {
    2164           0 :     mCRL2log(log::debug) << "check_rule_SortSpec" << std::endl;
    2165           0 :     return false;
    2166             :   }
    2167         187 :   if (!check_term_argument(a[1], check_rule_ConsSpec<atermpp::aterm>))
    2168             :   {
    2169           0 :     mCRL2log(log::debug) << "check_rule_ConsSpec" << std::endl;
    2170           0 :     return false;
    2171             :   }
    2172         187 :   if (!check_term_argument(a[2], check_rule_MapSpec<atermpp::aterm>))
    2173             :   {
    2174           0 :     mCRL2log(log::debug) << "check_rule_MapSpec" << std::endl;
    2175           0 :     return false;
    2176             :   }
    2177         187 :   if (!check_term_argument(a[3], check_rule_DataEqnSpec<atermpp::aterm>))
    2178             :   {
    2179           0 :     mCRL2log(log::debug) << "check_rule_DataEqnSpec" << std::endl;
    2180           0 :     return false;
    2181             :   }
    2182             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2183             : 
    2184             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2185         187 :   return true;
    2186             : }
    2187             : 
    2188             : // SortSpec(SortDecl*)
    2189             : template <typename Term>
    2190         187 : bool check_term_SortSpec(const Term& t)
    2191             : {
    2192         187 :   utilities::mcrl2_unused(t);
    2193             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2194             :   // check the type of the term
    2195         187 :   const atermpp::aterm& term(t);
    2196         187 :   if (!term.type_is_appl())
    2197             :   {
    2198           0 :     return false;
    2199             :   }
    2200         187 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2201         187 :   if (a.function() != core::detail::function_symbols::SortSpec)
    2202             :   {
    2203           0 :     return false;
    2204             :   }
    2205             : 
    2206             :   // check the children
    2207         187 :   if (a.size() != 1)
    2208             :   {
    2209           0 :     return false;
    2210             :   }
    2211             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2212         187 :   if (!check_list_argument(a[0], check_rule_SortDecl<atermpp::aterm>, 0))
    2213             :   {
    2214           0 :     mCRL2log(log::debug) << "check_rule_SortDecl" << std::endl;
    2215           0 :     return false;
    2216             :   }
    2217             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2218             : 
    2219             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2220         187 :   return true;
    2221             : }
    2222             : 
    2223             : // ConsSpec(OpId*)
    2224             : template <typename Term>
    2225         187 : bool check_term_ConsSpec(const Term& t)
    2226             : {
    2227         187 :   utilities::mcrl2_unused(t);
    2228             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2229             :   // check the type of the term
    2230         187 :   const atermpp::aterm& term(t);
    2231         187 :   if (!term.type_is_appl())
    2232             :   {
    2233           0 :     return false;
    2234             :   }
    2235         187 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2236         187 :   if (a.function() != core::detail::function_symbols::ConsSpec)
    2237             :   {
    2238           0 :     return false;
    2239             :   }
    2240             : 
    2241             :   // check the children
    2242         187 :   if (a.size() != 1)
    2243             :   {
    2244           0 :     return false;
    2245             :   }
    2246             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2247         187 :   if (!check_list_argument(a[0], check_rule_OpId<atermpp::aterm>, 0))
    2248             :   {
    2249           0 :     mCRL2log(log::debug) << "check_rule_OpId" << std::endl;
    2250           0 :     return false;
    2251             :   }
    2252             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2253             : 
    2254             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2255         187 :   return true;
    2256             : }
    2257             : 
    2258             : // MapSpec(OpId*)
    2259             : template <typename Term>
    2260         187 : bool check_term_MapSpec(const Term& t)
    2261             : {
    2262         187 :   utilities::mcrl2_unused(t);
    2263             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2264             :   // check the type of the term
    2265         187 :   const atermpp::aterm& term(t);
    2266         187 :   if (!term.type_is_appl())
    2267             :   {
    2268           0 :     return false;
    2269             :   }
    2270         187 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2271         187 :   if (a.function() != core::detail::function_symbols::MapSpec)
    2272             :   {
    2273           0 :     return false;
    2274             :   }
    2275             : 
    2276             :   // check the children
    2277         187 :   if (a.size() != 1)
    2278             :   {
    2279           0 :     return false;
    2280             :   }
    2281             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2282         187 :   if (!check_list_argument(a[0], check_rule_OpId<atermpp::aterm>, 0))
    2283             :   {
    2284           0 :     mCRL2log(log::debug) << "check_rule_OpId" << std::endl;
    2285           0 :     return false;
    2286             :   }
    2287             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2288             : 
    2289             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2290         187 :   return true;
    2291             : }
    2292             : 
    2293             : // DataEqnSpec(DataEqn*)
    2294             : template <typename Term>
    2295         187 : bool check_term_DataEqnSpec(const Term& t)
    2296             : {
    2297         187 :   utilities::mcrl2_unused(t);
    2298             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2299             :   // check the type of the term
    2300         187 :   const atermpp::aterm& term(t);
    2301         187 :   if (!term.type_is_appl())
    2302             :   {
    2303           0 :     return false;
    2304             :   }
    2305         187 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2306         187 :   if (a.function() != core::detail::function_symbols::DataEqnSpec)
    2307             :   {
    2308           0 :     return false;
    2309             :   }
    2310             : 
    2311             :   // check the children
    2312         187 :   if (a.size() != 1)
    2313             :   {
    2314           0 :     return false;
    2315             :   }
    2316             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2317         187 :   if (!check_list_argument(a[0], check_rule_DataEqn<atermpp::aterm>, 0))
    2318             :   {
    2319           0 :     mCRL2log(log::debug) << "check_rule_DataEqn" << std::endl;
    2320           0 :     return false;
    2321             :   }
    2322             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2323             : 
    2324             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2325         187 :   return true;
    2326             : }
    2327             : 
    2328             : // SortRef(SortId, SortExpr)
    2329             : template <typename Term>
    2330         646 : bool check_term_SortRef(const Term& t)
    2331             : {
    2332         646 :   utilities::mcrl2_unused(t);
    2333             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2334             :   // check the type of the term
    2335         646 :   const atermpp::aterm& term(t);
    2336         646 :   if (!term.type_is_appl())
    2337             :   {
    2338           0 :     return false;
    2339             :   }
    2340         646 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2341         646 :   if (a.function() != core::detail::function_symbols::SortRef)
    2342             :   {
    2343           0 :     return false;
    2344             :   }
    2345             : 
    2346             :   // check the children
    2347         646 :   if (a.size() != 2)
    2348             :   {
    2349           0 :     return false;
    2350             :   }
    2351             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2352         646 :   if (!check_term_argument(a[0], check_rule_SortId<atermpp::aterm>))
    2353             :   {
    2354           0 :     mCRL2log(log::debug) << "check_rule_SortId" << std::endl;
    2355           0 :     return false;
    2356             :   }
    2357         646 :   if (!check_term_argument(a[1], check_rule_SortExpr<atermpp::aterm>))
    2358             :   {
    2359           0 :     mCRL2log(log::debug) << "check_rule_SortExpr" << std::endl;
    2360           0 :     return false;
    2361             :   }
    2362             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2363             : 
    2364             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2365         646 :   return true;
    2366             : }
    2367             : 
    2368             : // DataEqn(DataVarId*, DataExpr, DataExpr, DataExpr)
    2369             : template <typename Term>
    2370          94 : bool check_term_DataEqn(const Term& t)
    2371             : {
    2372          94 :   utilities::mcrl2_unused(t);
    2373             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2374             :   // check the type of the term
    2375          94 :   const atermpp::aterm& term(t);
    2376          94 :   if (!term.type_is_appl())
    2377             :   {
    2378           0 :     return false;
    2379             :   }
    2380          94 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2381          94 :   if (a.function() != core::detail::function_symbols::DataEqn)
    2382             :   {
    2383           0 :     return false;
    2384             :   }
    2385             : 
    2386             :   // check the children
    2387          94 :   if (a.size() != 4)
    2388             :   {
    2389           0 :     return false;
    2390             :   }
    2391             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2392          94 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 0))
    2393             :   {
    2394           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    2395           0 :     return false;
    2396             :   }
    2397          94 :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    2398             :   {
    2399           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    2400           0 :     return false;
    2401             :   }
    2402          94 :   if (!check_term_argument(a[2], check_rule_DataExpr<atermpp::aterm>))
    2403             :   {
    2404           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    2405           0 :     return false;
    2406             :   }
    2407          94 :   if (!check_term_argument(a[3], check_rule_DataExpr<atermpp::aterm>))
    2408             :   {
    2409           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    2410           0 :     return false;
    2411             :   }
    2412             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2413             : 
    2414             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2415          94 :   return true;
    2416             : }
    2417             : 
    2418             : // MultAct(Action*)
    2419             : template <typename Term>
    2420             : bool check_term_MultAct(const Term& t)
    2421             : {
    2422             :   utilities::mcrl2_unused(t);
    2423             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2424             :   // check the type of the term
    2425             :   const atermpp::aterm& term(t);
    2426             :   if (!term.type_is_appl())
    2427             :   {
    2428             :     return false;
    2429             :   }
    2430             :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2431             :   if (a.function() != core::detail::function_symbols::MultAct)
    2432             :   {
    2433             :     return false;
    2434             :   }
    2435             : 
    2436             :   // check the children
    2437             :   if (a.size() != 1)
    2438             :   {
    2439             :     return false;
    2440             :   }
    2441             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2442             :   if (!check_list_argument(a[0], check_rule_Action<atermpp::aterm>, 0))
    2443             :   {
    2444             :     mCRL2log(log::debug) << "check_rule_Action" << std::endl;
    2445             :     return false;
    2446             :   }
    2447             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2448             : 
    2449             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2450             :   return true;
    2451             : }
    2452             : 
    2453             : // TimedMultAct(Action*, DataExpr)
    2454             : template <typename Term>
    2455           4 : bool check_term_TimedMultAct(const Term& t)
    2456             : {
    2457           4 :   utilities::mcrl2_unused(t);
    2458             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2459             :   // check the type of the term
    2460           4 :   const atermpp::aterm& term(t);
    2461           4 :   if (!term.type_is_appl())
    2462             :   {
    2463           0 :     return false;
    2464             :   }
    2465           4 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2466           4 :   if (a.function() != core::detail::function_symbols::TimedMultAct)
    2467             :   {
    2468           0 :     return false;
    2469             :   }
    2470             : 
    2471             :   // check the children
    2472           4 :   if (a.size() != 2)
    2473             :   {
    2474           0 :     return false;
    2475             :   }
    2476             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2477           4 :   if (!check_list_argument(a[0], check_rule_Action<atermpp::aterm>, 0))
    2478             :   {
    2479           0 :     mCRL2log(log::debug) << "check_rule_Action" << std::endl;
    2480           0 :     return false;
    2481             :   }
    2482           4 :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    2483             :   {
    2484           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    2485           0 :     return false;
    2486             :   }
    2487             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2488             : 
    2489             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2490           4 :   return true;
    2491             : }
    2492             : 
    2493             : // UntypedMultiAction(UntypedDataParameter*)
    2494             : template <typename Term>
    2495        7869 : bool check_term_UntypedMultiAction(const Term& t)
    2496             : {
    2497        7869 :   utilities::mcrl2_unused(t);
    2498             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2499             :   // check the type of the term
    2500        7869 :   const atermpp::aterm& term(t);
    2501        7869 :   if (!term.type_is_appl())
    2502             :   {
    2503           0 :     return false;
    2504             :   }
    2505        7869 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2506        7869 :   if (a.function() != core::detail::function_symbols::UntypedMultiAction)
    2507             :   {
    2508        1835 :     return false;
    2509             :   }
    2510             : 
    2511             :   // check the children
    2512        6034 :   if (a.size() != 1)
    2513             :   {
    2514           0 :     return false;
    2515             :   }
    2516             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2517        6034 :   if (!check_list_argument(a[0], check_rule_UntypedDataParameter<atermpp::aterm>, 0))
    2518             :   {
    2519           0 :     mCRL2log(log::debug) << "check_rule_UntypedDataParameter" << std::endl;
    2520           0 :     return false;
    2521             :   }
    2522             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2523             : 
    2524             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2525        6034 :   return true;
    2526             : }
    2527             : 
    2528             : // Action(ActId, DataExpr*)
    2529             : template <typename Term>
    2530     4361987 : bool check_term_Action(const Term& t)
    2531             : {
    2532     4361987 :   utilities::mcrl2_unused(t);
    2533             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2534             :   // check the type of the term
    2535     4361987 :   const atermpp::aterm& term(t);
    2536     4361987 :   if (!term.type_is_appl())
    2537             :   {
    2538           0 :     return false;
    2539             :   }
    2540     4361987 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2541     4361987 :   if (a.function() != core::detail::function_symbols::Action)
    2542             :   {
    2543     3069542 :     return false;
    2544             :   }
    2545             : 
    2546             :   // check the children
    2547     1292445 :   if (a.size() != 2)
    2548             :   {
    2549           0 :     return false;
    2550             :   }
    2551             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2552     1292445 :   if (!check_term_argument(a[0], check_rule_ActId<atermpp::aterm>))
    2553             :   {
    2554           0 :     mCRL2log(log::debug) << "check_rule_ActId" << std::endl;
    2555           0 :     return false;
    2556             :   }
    2557     1292445 :   if (!check_list_argument(a[1], check_rule_DataExpr<atermpp::aterm>, 0))
    2558             :   {
    2559           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    2560           0 :     return false;
    2561             :   }
    2562             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2563             : 
    2564             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2565     1292445 :   return true;
    2566             : }
    2567             : 
    2568             : // ActId(String, SortExpr*)
    2569             : template <typename Term>
    2570     1740918 : bool check_term_ActId(const Term& t)
    2571             : {
    2572     1740918 :   utilities::mcrl2_unused(t);
    2573             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2574             :   // check the type of the term
    2575     1740918 :   const atermpp::aterm& term(t);
    2576     1740918 :   if (!term.type_is_appl())
    2577             :   {
    2578           0 :     return false;
    2579             :   }
    2580     1740918 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2581     1740918 :   if (a.function() != core::detail::function_symbols::ActId)
    2582             :   {
    2583           0 :     return false;
    2584             :   }
    2585             : 
    2586             :   // check the children
    2587     1740918 :   if (a.size() != 2)
    2588             :   {
    2589           0 :     return false;
    2590             :   }
    2591             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2592     1740918 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    2593             :   {
    2594           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    2595           0 :     return false;
    2596             :   }
    2597     1740918 :   if (!check_list_argument(a[1], check_rule_SortExpr<atermpp::aterm>, 0))
    2598             :   {
    2599           0 :     mCRL2log(log::debug) << "check_rule_SortExpr" << std::endl;
    2600           0 :     return false;
    2601             :   }
    2602             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2603             : 
    2604             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2605     1740918 :   return true;
    2606             : }
    2607             : 
    2608             : // Process(ProcVarId, DataExpr*)
    2609             : template <typename Term>
    2610     3079092 : bool check_term_Process(const Term& t)
    2611             : {
    2612     3079092 :   utilities::mcrl2_unused(t);
    2613             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2614             :   // check the type of the term
    2615     3079092 :   const atermpp::aterm& term(t);
    2616     3079092 :   if (!term.type_is_appl())
    2617             :   {
    2618           0 :     return false;
    2619             :   }
    2620     3079092 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2621     3079092 :   if (a.function() != core::detail::function_symbols::Process)
    2622             :   {
    2623     2996017 :     return false;
    2624             :   }
    2625             : 
    2626             :   // check the children
    2627       83075 :   if (a.size() != 2)
    2628             :   {
    2629           0 :     return false;
    2630             :   }
    2631             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2632       83075 :   if (!check_term_argument(a[0], check_rule_ProcVarId<atermpp::aterm>))
    2633             :   {
    2634           0 :     mCRL2log(log::debug) << "check_rule_ProcVarId" << std::endl;
    2635           0 :     return false;
    2636             :   }
    2637       83075 :   if (!check_list_argument(a[1], check_rule_DataExpr<atermpp::aterm>, 0))
    2638             :   {
    2639           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    2640           0 :     return false;
    2641             :   }
    2642             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2643             : 
    2644             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2645       83075 :   return true;
    2646             : }
    2647             : 
    2648             : // ProcessAssignment(ProcVarId, DataVarIdInit*)
    2649             : template <typename Term>
    2650     3061209 : bool check_term_ProcessAssignment(const Term& t)
    2651             : {
    2652     3061209 :   utilities::mcrl2_unused(t);
    2653             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2654             :   // check the type of the term
    2655     3061209 :   const atermpp::aterm& term(t);
    2656     3061209 :   if (!term.type_is_appl())
    2657             :   {
    2658           0 :     return false;
    2659             :   }
    2660     3061209 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2661     3061209 :   if (a.function() != core::detail::function_symbols::ProcessAssignment)
    2662             :   {
    2663     2150439 :     return false;
    2664             :   }
    2665             : 
    2666             :   // check the children
    2667      910770 :   if (a.size() != 2)
    2668             :   {
    2669           0 :     return false;
    2670             :   }
    2671             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2672      910770 :   if (!check_term_argument(a[0], check_rule_ProcVarId<atermpp::aterm>))
    2673             :   {
    2674           0 :     mCRL2log(log::debug) << "check_rule_ProcVarId" << std::endl;
    2675           0 :     return false;
    2676             :   }
    2677      910770 :   if (!check_list_argument(a[1], check_rule_DataVarIdInit<atermpp::aterm>, 0))
    2678             :   {
    2679           0 :     mCRL2log(log::debug) << "check_rule_DataVarIdInit" << std::endl;
    2680           0 :     return false;
    2681             :   }
    2682             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2683             : 
    2684             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2685      910770 :   return true;
    2686             : }
    2687             : 
    2688             : // Delta()
    2689             : template <typename Term>
    2690     2152929 : bool check_term_Delta(const Term& t)
    2691             : {
    2692     2152929 :   utilities::mcrl2_unused(t);
    2693             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2694             :   // check the type of the term
    2695     2152929 :   const atermpp::aterm& term(t);
    2696     2152929 :   if (!term.type_is_appl())
    2697             :   {
    2698           0 :     return false;
    2699             :   }
    2700     2152929 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2701     2152929 :   if (a.function() != core::detail::function_symbols::Delta)
    2702             :   {
    2703     2016816 :     return false;
    2704             :   }
    2705             : 
    2706             :   // check the children
    2707      136113 :   if (a.size() != 0)
    2708             :   {
    2709           0 :     return false;
    2710             :   }
    2711             : 
    2712             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2713      136113 :   return true;
    2714             : }
    2715             : 
    2716             : // Tau()
    2717             : template <typename Term>
    2718     2017600 : bool check_term_Tau(const Term& t)
    2719             : {
    2720     2017600 :   utilities::mcrl2_unused(t);
    2721             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2722             :   // check the type of the term
    2723     2017600 :   const atermpp::aterm& term(t);
    2724     2017600 :   if (!term.type_is_appl())
    2725             :   {
    2726           0 :     return false;
    2727             :   }
    2728     2017600 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2729     2017600 :   if (a.function() != core::detail::function_symbols::Tau)
    2730             :   {
    2731     1982332 :     return false;
    2732             :   }
    2733             : 
    2734             :   // check the children
    2735       35268 :   if (a.size() != 0)
    2736             :   {
    2737           0 :     return false;
    2738             :   }
    2739             : 
    2740             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2741       35268 :   return true;
    2742             : }
    2743             : 
    2744             : // Sum(DataVarId+, ProcExpr)
    2745             : template <typename Term>
    2746     1999136 : bool check_term_Sum(const Term& t)
    2747             : {
    2748     1999136 :   utilities::mcrl2_unused(t);
    2749             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2750             :   // check the type of the term
    2751     1999136 :   const atermpp::aterm& term(t);
    2752     1999136 :   if (!term.type_is_appl())
    2753             :   {
    2754           0 :     return false;
    2755             :   }
    2756     1999136 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2757     1999136 :   if (a.function() != core::detail::function_symbols::Sum)
    2758             :   {
    2759     1892641 :     return false;
    2760             :   }
    2761             : 
    2762             :   // check the children
    2763      106495 :   if (a.size() != 2)
    2764             :   {
    2765           0 :     return false;
    2766             :   }
    2767             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2768      106495 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    2769             :   {
    2770           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    2771           0 :     return false;
    2772             :   }
    2773      106495 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    2774             :   {
    2775           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    2776           0 :     return false;
    2777             :   }
    2778             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2779             : 
    2780             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2781      106495 :   return true;
    2782             : }
    2783             : 
    2784             : // Block(String*, ProcExpr)
    2785             : template <typename Term>
    2786     1892641 : bool check_term_Block(const Term& t)
    2787             : {
    2788     1892641 :   utilities::mcrl2_unused(t);
    2789             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2790             :   // check the type of the term
    2791     1892641 :   const atermpp::aterm& term(t);
    2792     1892641 :   if (!term.type_is_appl())
    2793             :   {
    2794           0 :     return false;
    2795             :   }
    2796     1892641 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2797     1892641 :   if (a.function() != core::detail::function_symbols::Block)
    2798             :   {
    2799     1892641 :     return false;
    2800             :   }
    2801             : 
    2802             :   // check the children
    2803           0 :   if (a.size() != 2)
    2804             :   {
    2805           0 :     return false;
    2806             :   }
    2807             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2808           0 :   if (!check_list_argument(a[0], check_rule_String<atermpp::aterm>, 0))
    2809             :   {
    2810           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    2811           0 :     return false;
    2812             :   }
    2813           0 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    2814             :   {
    2815           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    2816           0 :     return false;
    2817             :   }
    2818             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2819             : 
    2820             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2821           0 :   return true;
    2822             : }
    2823             : 
    2824             : // Hide(String*, ProcExpr)
    2825             : template <typename Term>
    2826     1893085 : bool check_term_Hide(const Term& t)
    2827             : {
    2828     1893085 :   utilities::mcrl2_unused(t);
    2829             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2830             :   // check the type of the term
    2831     1893085 :   const atermpp::aterm& term(t);
    2832     1893085 :   if (!term.type_is_appl())
    2833             :   {
    2834           0 :     return false;
    2835             :   }
    2836     1893085 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2837     1893085 :   if (a.function() != core::detail::function_symbols::Hide)
    2838             :   {
    2839     1891741 :     return false;
    2840             :   }
    2841             : 
    2842             :   // check the children
    2843        1344 :   if (a.size() != 2)
    2844             :   {
    2845           0 :     return false;
    2846             :   }
    2847             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2848        1344 :   if (!check_list_argument(a[0], check_rule_String<atermpp::aterm>, 0))
    2849             :   {
    2850           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    2851           0 :     return false;
    2852             :   }
    2853        1344 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    2854             :   {
    2855           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    2856           0 :     return false;
    2857             :   }
    2858             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2859             : 
    2860             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2861        1344 :   return true;
    2862             : }
    2863             : 
    2864             : // Rename(RenameExpr*, ProcExpr)
    2865             : template <typename Term>
    2866     1891741 : bool check_term_Rename(const Term& t)
    2867             : {
    2868     1891741 :   utilities::mcrl2_unused(t);
    2869             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2870             :   // check the type of the term
    2871     1891741 :   const atermpp::aterm& term(t);
    2872     1891741 :   if (!term.type_is_appl())
    2873             :   {
    2874           0 :     return false;
    2875             :   }
    2876     1891741 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2877     1891741 :   if (a.function() != core::detail::function_symbols::Rename)
    2878             :   {
    2879     1891741 :     return false;
    2880             :   }
    2881             : 
    2882             :   // check the children
    2883           0 :   if (a.size() != 2)
    2884             :   {
    2885           0 :     return false;
    2886             :   }
    2887             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2888           0 :   if (!check_list_argument(a[0], check_rule_RenameExpr<atermpp::aterm>, 0))
    2889             :   {
    2890           0 :     mCRL2log(log::debug) << "check_rule_RenameExpr" << std::endl;
    2891           0 :     return false;
    2892             :   }
    2893           0 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    2894             :   {
    2895           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    2896           0 :     return false;
    2897             :   }
    2898             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2899             : 
    2900             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2901           0 :   return true;
    2902             : }
    2903             : 
    2904             : // Comm(CommExpr*, ProcExpr)
    2905             : template <typename Term>
    2906     1893948 : bool check_term_Comm(const Term& t)
    2907             : {
    2908     1893948 :   utilities::mcrl2_unused(t);
    2909             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2910             :   // check the type of the term
    2911     1893948 :   const atermpp::aterm& term(t);
    2912     1893948 :   if (!term.type_is_appl())
    2913             :   {
    2914           0 :     return false;
    2915             :   }
    2916     1893948 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2917     1893948 :   if (a.function() != core::detail::function_symbols::Comm)
    2918             :   {
    2919     1886652 :     return false;
    2920             :   }
    2921             : 
    2922             :   // check the children
    2923        7296 :   if (a.size() != 2)
    2924             :   {
    2925           0 :     return false;
    2926             :   }
    2927             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2928        7296 :   if (!check_list_argument(a[0], check_rule_CommExpr<atermpp::aterm>, 0))
    2929             :   {
    2930           0 :     mCRL2log(log::debug) << "check_rule_CommExpr" << std::endl;
    2931           0 :     return false;
    2932             :   }
    2933        7296 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    2934             :   {
    2935           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    2936           0 :     return false;
    2937             :   }
    2938             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2939             : 
    2940             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2941        7296 :   return true;
    2942             : }
    2943             : 
    2944             : // Allow(MultActName*, ProcExpr)
    2945             : template <typename Term>
    2946     1887908 : bool check_term_Allow(const Term& t)
    2947             : {
    2948     1887908 :   utilities::mcrl2_unused(t);
    2949             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2950             :   // check the type of the term
    2951     1887908 :   const atermpp::aterm& term(t);
    2952     1887908 :   if (!term.type_is_appl())
    2953             :   {
    2954           0 :     return false;
    2955             :   }
    2956     1887908 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2957     1887908 :   if (a.function() != core::detail::function_symbols::Allow)
    2958             :   {
    2959     1885051 :     return false;
    2960             :   }
    2961             : 
    2962             :   // check the children
    2963        2857 :   if (a.size() != 2)
    2964             :   {
    2965           0 :     return false;
    2966             :   }
    2967             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2968        2857 :   if (!check_list_argument(a[0], check_rule_MultActName<atermpp::aterm>, 0))
    2969             :   {
    2970           0 :     mCRL2log(log::debug) << "check_rule_MultActName" << std::endl;
    2971           0 :     return false;
    2972             :   }
    2973        2857 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    2974             :   {
    2975           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    2976           0 :     return false;
    2977             :   }
    2978             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    2979             : 
    2980             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    2981        2857 :   return true;
    2982             : }
    2983             : 
    2984             : // Sync(ProcExpr, ProcExpr)
    2985             : template <typename Term>
    2986     1896924 : bool check_term_Sync(const Term& t)
    2987             : {
    2988     1896924 :   utilities::mcrl2_unused(t);
    2989             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    2990             :   // check the type of the term
    2991     1896924 :   const atermpp::aterm& term(t);
    2992     1896924 :   if (!term.type_is_appl())
    2993             :   {
    2994           0 :     return false;
    2995             :   }
    2996     1896924 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    2997     1896924 :   if (a.function() != core::detail::function_symbols::Sync)
    2998             :   {
    2999     1762400 :     return false;
    3000             :   }
    3001             : 
    3002             :   // check the children
    3003      134524 :   if (a.size() != 2)
    3004             :   {
    3005           0 :     return false;
    3006             :   }
    3007             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3008      134524 :   if (!check_term_argument(a[0], check_rule_ProcExpr<atermpp::aterm>))
    3009             :   {
    3010           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3011           0 :     return false;
    3012             :   }
    3013      134524 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    3014             :   {
    3015           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3016           0 :     return false;
    3017             :   }
    3018             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3019             : 
    3020             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3021      134524 :   return true;
    3022             : }
    3023             : 
    3024             : // AtTime(ProcExpr, DataExpr)
    3025             : template <typename Term>
    3026     1771564 : bool check_term_AtTime(const Term& t)
    3027             : {
    3028     1771564 :   utilities::mcrl2_unused(t);
    3029             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3030             :   // check the type of the term
    3031     1771564 :   const atermpp::aterm& term(t);
    3032     1771564 :   if (!term.type_is_appl())
    3033             :   {
    3034           0 :     return false;
    3035             :   }
    3036     1771564 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3037     1771564 :   if (a.function() != core::detail::function_symbols::AtTime)
    3038             :   {
    3039     1670440 :     return false;
    3040             :   }
    3041             : 
    3042             :   // check the children
    3043      101124 :   if (a.size() != 2)
    3044             :   {
    3045           0 :     return false;
    3046             :   }
    3047             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3048      101124 :   if (!check_term_argument(a[0], check_rule_ProcExpr<atermpp::aterm>))
    3049             :   {
    3050           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3051           0 :     return false;
    3052             :   }
    3053      101124 :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    3054             :   {
    3055           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    3056           0 :     return false;
    3057             :   }
    3058             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3059             : 
    3060             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3061      101124 :   return true;
    3062             : }
    3063             : 
    3064             : // Seq(ProcExpr, ProcExpr)
    3065             : template <typename Term>
    3066     1773841 : bool check_term_Seq(const Term& t)
    3067             : {
    3068     1773841 :   utilities::mcrl2_unused(t);
    3069             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3070             :   // check the type of the term
    3071     1773841 :   const atermpp::aterm& term(t);
    3072     1773841 :   if (!term.type_is_appl())
    3073             :   {
    3074           0 :     return false;
    3075             :   }
    3076     1773841 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3077     1773841 :   if (a.function() != core::detail::function_symbols::Seq)
    3078             :   {
    3079      935341 :     return false;
    3080             :   }
    3081             : 
    3082             :   // check the children
    3083      838500 :   if (a.size() != 2)
    3084             :   {
    3085           0 :     return false;
    3086             :   }
    3087             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3088      838500 :   if (!check_term_argument(a[0], check_rule_ProcExpr<atermpp::aterm>))
    3089             :   {
    3090           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3091           0 :     return false;
    3092             :   }
    3093      838500 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    3094             :   {
    3095           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3096           0 :     return false;
    3097             :   }
    3098             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3099             : 
    3100             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3101      838500 :   return true;
    3102             : }
    3103             : 
    3104             : // IfThen(DataExpr, ProcExpr)
    3105             : template <typename Term>
    3106      962040 : bool check_term_IfThen(const Term& t)
    3107             : {
    3108      962040 :   utilities::mcrl2_unused(t);
    3109             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3110             :   // check the type of the term
    3111      962040 :   const atermpp::aterm& term(t);
    3112      962040 :   if (!term.type_is_appl())
    3113             :   {
    3114           0 :     return false;
    3115             :   }
    3116      962040 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3117      962040 :   if (a.function() != core::detail::function_symbols::IfThen)
    3118             :   {
    3119      571129 :     return false;
    3120             :   }
    3121             : 
    3122             :   // check the children
    3123      390911 :   if (a.size() != 2)
    3124             :   {
    3125           0 :     return false;
    3126             :   }
    3127             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3128      390911 :   if (!check_term_argument(a[0], check_rule_DataExpr<atermpp::aterm>))
    3129             :   {
    3130           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    3131           0 :     return false;
    3132             :   }
    3133      390911 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    3134             :   {
    3135           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3136           0 :     return false;
    3137             :   }
    3138             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3139             : 
    3140             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3141      390911 :   return true;
    3142             : }
    3143             : 
    3144             : // IfThenElse(DataExpr, ProcExpr, ProcExpr)
    3145             : template <typename Term>
    3146      575002 : bool check_term_IfThenElse(const Term& t)
    3147             : {
    3148      575002 :   utilities::mcrl2_unused(t);
    3149             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3150             :   // check the type of the term
    3151      575002 :   const atermpp::aterm& term(t);
    3152      575002 :   if (!term.type_is_appl())
    3153             :   {
    3154           0 :     return false;
    3155             :   }
    3156      575002 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3157      575002 :   if (a.function() != core::detail::function_symbols::IfThenElse)
    3158             :   {
    3159      537262 :     return false;
    3160             :   }
    3161             : 
    3162             :   // check the children
    3163       37740 :   if (a.size() != 3)
    3164             :   {
    3165           0 :     return false;
    3166             :   }
    3167             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3168       37740 :   if (!check_term_argument(a[0], check_rule_DataExpr<atermpp::aterm>))
    3169             :   {
    3170           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    3171           0 :     return false;
    3172             :   }
    3173       37740 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    3174             :   {
    3175           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3176           0 :     return false;
    3177             :   }
    3178       37740 :   if (!check_term_argument(a[2], check_rule_ProcExpr<atermpp::aterm>))
    3179             :   {
    3180           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3181           0 :     return false;
    3182             :   }
    3183             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3184             : 
    3185             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3186       37740 :   return true;
    3187             : }
    3188             : 
    3189             : // BInit(ProcExpr, ProcExpr)
    3190             : template <typename Term>
    3191      537262 : bool check_term_BInit(const Term& t)
    3192             : {
    3193      537262 :   utilities::mcrl2_unused(t);
    3194             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3195             :   // check the type of the term
    3196      537262 :   const atermpp::aterm& term(t);
    3197      537262 :   if (!term.type_is_appl())
    3198             :   {
    3199           0 :     return false;
    3200             :   }
    3201      537262 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3202      537262 :   if (a.function() != core::detail::function_symbols::BInit)
    3203             :   {
    3204      537262 :     return false;
    3205             :   }
    3206             : 
    3207             :   // check the children
    3208           0 :   if (a.size() != 2)
    3209             :   {
    3210           0 :     return false;
    3211             :   }
    3212             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3213           0 :   if (!check_term_argument(a[0], check_rule_ProcExpr<atermpp::aterm>))
    3214             :   {
    3215           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3216           0 :     return false;
    3217             :   }
    3218           0 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    3219             :   {
    3220           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3221           0 :     return false;
    3222             :   }
    3223             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3224             : 
    3225             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3226           0 :   return true;
    3227             : }
    3228             : 
    3229             : // Merge(ProcExpr, ProcExpr)
    3230             : template <typename Term>
    3231      544894 : bool check_term_Merge(const Term& t)
    3232             : {
    3233      544894 :   utilities::mcrl2_unused(t);
    3234             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3235             :   // check the type of the term
    3236      544894 :   const atermpp::aterm& term(t);
    3237      544894 :   if (!term.type_is_appl())
    3238             :   {
    3239           0 :     return false;
    3240             :   }
    3241      544894 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3242      544894 :   if (a.function() != core::detail::function_symbols::Merge)
    3243             :   {
    3244      504163 :     return false;
    3245             :   }
    3246             : 
    3247             :   // check the children
    3248       40731 :   if (a.size() != 2)
    3249             :   {
    3250           0 :     return false;
    3251             :   }
    3252             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3253       40731 :   if (!check_term_argument(a[0], check_rule_ProcExpr<atermpp::aterm>))
    3254             :   {
    3255           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3256           0 :     return false;
    3257             :   }
    3258       40731 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    3259             :   {
    3260           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3261           0 :     return false;
    3262             :   }
    3263             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3264             : 
    3265             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3266       40731 :   return true;
    3267             : }
    3268             : 
    3269             : // LMerge(ProcExpr, ProcExpr)
    3270             : template <typename Term>
    3271      504163 : bool check_term_LMerge(const Term& t)
    3272             : {
    3273      504163 :   utilities::mcrl2_unused(t);
    3274             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3275             :   // check the type of the term
    3276      504163 :   const atermpp::aterm& term(t);
    3277      504163 :   if (!term.type_is_appl())
    3278             :   {
    3279           0 :     return false;
    3280             :   }
    3281      504163 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3282      504163 :   if (a.function() != core::detail::function_symbols::LMerge)
    3283             :   {
    3284      504163 :     return false;
    3285             :   }
    3286             : 
    3287             :   // check the children
    3288           0 :   if (a.size() != 2)
    3289             :   {
    3290           0 :     return false;
    3291             :   }
    3292             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3293           0 :   if (!check_term_argument(a[0], check_rule_ProcExpr<atermpp::aterm>))
    3294             :   {
    3295           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3296           0 :     return false;
    3297             :   }
    3298           0 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    3299             :   {
    3300           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3301           0 :     return false;
    3302             :   }
    3303             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3304             : 
    3305             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3306           0 :   return true;
    3307             : }
    3308             : 
    3309             : // Choice(ProcExpr, ProcExpr)
    3310             : template <typename Term>
    3311      544044 : bool check_term_Choice(const Term& t)
    3312             : {
    3313      544044 :   utilities::mcrl2_unused(t);
    3314             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3315             :   // check the type of the term
    3316      544044 :   const atermpp::aterm& term(t);
    3317      544044 :   if (!term.type_is_appl())
    3318             :   {
    3319           0 :     return false;
    3320             :   }
    3321      544044 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3322      544044 :   if (a.function() != core::detail::function_symbols::Choice)
    3323             :   {
    3324      183516 :     return false;
    3325             :   }
    3326             : 
    3327             :   // check the children
    3328      360528 :   if (a.size() != 2)
    3329             :   {
    3330           0 :     return false;
    3331             :   }
    3332             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3333      360528 :   if (!check_term_argument(a[0], check_rule_ProcExpr<atermpp::aterm>))
    3334             :   {
    3335           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3336           0 :     return false;
    3337             :   }
    3338      360528 :   if (!check_term_argument(a[1], check_rule_ProcExpr<atermpp::aterm>))
    3339             :   {
    3340           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3341           0 :     return false;
    3342             :   }
    3343             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3344             : 
    3345             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3346      360528 :   return true;
    3347             : }
    3348             : 
    3349             : // StochasticOperator(DataVarId+, DataExpr, ProcExpr)
    3350             : template <typename Term>
    3351      187030 : bool check_term_StochasticOperator(const Term& t)
    3352             : {
    3353      187030 :   utilities::mcrl2_unused(t);
    3354             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3355             :   // check the type of the term
    3356      187030 :   const atermpp::aterm& term(t);
    3357      187030 :   if (!term.type_is_appl())
    3358             :   {
    3359           0 :     return false;
    3360             :   }
    3361      187030 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3362      187030 :   if (a.function() != core::detail::function_symbols::StochasticOperator)
    3363             :   {
    3364      136288 :     return false;
    3365             :   }
    3366             : 
    3367             :   // check the children
    3368       50742 :   if (a.size() != 3)
    3369             :   {
    3370           0 :     return false;
    3371             :   }
    3372             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3373       50742 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    3374             :   {
    3375           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    3376           0 :     return false;
    3377             :   }
    3378       50742 :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    3379             :   {
    3380           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    3381           0 :     return false;
    3382             :   }
    3383       50742 :   if (!check_term_argument(a[2], check_rule_ProcExpr<atermpp::aterm>))
    3384             :   {
    3385           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3386           0 :     return false;
    3387             :   }
    3388             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3389             : 
    3390             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3391       50742 :   return true;
    3392             : }
    3393             : 
    3394             : // UntypedProcessAssignment(String, UntypedIdentifierAssignment*)
    3395             : template <typename Term>
    3396      137170 : bool check_term_UntypedProcessAssignment(const Term& t)
    3397             : {
    3398      137170 :   utilities::mcrl2_unused(t);
    3399             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3400             :   // check the type of the term
    3401      137170 :   const atermpp::aterm& term(t);
    3402      137170 :   if (!term.type_is_appl())
    3403             :   {
    3404           0 :     return false;
    3405             :   }
    3406      137170 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3407      137170 :   if (a.function() != core::detail::function_symbols::UntypedProcessAssignment)
    3408             :   {
    3409      114216 :     return false;
    3410             :   }
    3411             : 
    3412             :   // check the children
    3413       22954 :   if (a.size() != 2)
    3414             :   {
    3415           0 :     return false;
    3416             :   }
    3417             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3418       22954 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    3419             :   {
    3420           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    3421           0 :     return false;
    3422             :   }
    3423       22954 :   if (!check_list_argument(a[1], check_rule_UntypedIdentifierAssignment<atermpp::aterm>, 0))
    3424             :   {
    3425           0 :     mCRL2log(log::debug) << "check_rule_UntypedIdentifierAssignment" << std::endl;
    3426           0 :     return false;
    3427             :   }
    3428             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3429             : 
    3430             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3431       22954 :   return true;
    3432             : }
    3433             : 
    3434             : // ProcVarId(String, DataVarId*)
    3435             : template <typename Term>
    3436     1092936 : bool check_term_ProcVarId(const Term& t)
    3437             : {
    3438     1092936 :   utilities::mcrl2_unused(t);
    3439             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3440             :   // check the type of the term
    3441     1092936 :   const atermpp::aterm& term(t);
    3442     1092936 :   if (!term.type_is_appl())
    3443             :   {
    3444           0 :     return false;
    3445             :   }
    3446     1092936 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3447     1092936 :   if (a.function() != core::detail::function_symbols::ProcVarId)
    3448             :   {
    3449           0 :     return false;
    3450             :   }
    3451             : 
    3452             :   // check the children
    3453     1092936 :   if (a.size() != 2)
    3454             :   {
    3455           0 :     return false;
    3456             :   }
    3457             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3458     1092936 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    3459             :   {
    3460           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    3461           0 :     return false;
    3462             :   }
    3463     1092936 :   if (!check_list_argument(a[1], check_rule_DataVarId<atermpp::aterm>, 0))
    3464             :   {
    3465           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    3466           0 :     return false;
    3467             :   }
    3468             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3469             : 
    3470             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3471     1092936 :   return true;
    3472             : }
    3473             : 
    3474             : // MultActName(String+)
    3475             : template <typename Term>
    3476       68496 : bool check_term_MultActName(const Term& t)
    3477             : {
    3478       68496 :   utilities::mcrl2_unused(t);
    3479             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3480             :   // check the type of the term
    3481       68496 :   const atermpp::aterm& term(t);
    3482       68496 :   if (!term.type_is_appl())
    3483             :   {
    3484           0 :     return false;
    3485             :   }
    3486       68496 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3487       68496 :   if (a.function() != core::detail::function_symbols::MultActName)
    3488             :   {
    3489           0 :     return false;
    3490             :   }
    3491             : 
    3492             :   // check the children
    3493       68496 :   if (a.size() != 1)
    3494             :   {
    3495           0 :     return false;
    3496             :   }
    3497             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3498       68496 :   if (!check_list_argument(a[0], check_rule_String<atermpp::aterm>, 1))
    3499             :   {
    3500           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    3501           0 :     return false;
    3502             :   }
    3503             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3504             : 
    3505             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3506       68496 :   return true;
    3507             : }
    3508             : 
    3509             : // RenameExpr(String, String)
    3510             : template <typename Term>
    3511           0 : bool check_term_RenameExpr(const Term& t)
    3512             : {
    3513           0 :   utilities::mcrl2_unused(t);
    3514             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3515             :   // check the type of the term
    3516           0 :   const atermpp::aterm& term(t);
    3517           0 :   if (!term.type_is_appl())
    3518             :   {
    3519           0 :     return false;
    3520             :   }
    3521           0 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3522           0 :   if (a.function() != core::detail::function_symbols::RenameExpr)
    3523             :   {
    3524           0 :     return false;
    3525             :   }
    3526             : 
    3527             :   // check the children
    3528           0 :   if (a.size() != 2)
    3529             :   {
    3530           0 :     return false;
    3531             :   }
    3532             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3533           0 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    3534             :   {
    3535           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    3536           0 :     return false;
    3537             :   }
    3538           0 :   if (!check_term_argument(a[1], check_rule_String<atermpp::aterm>))
    3539             :   {
    3540           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    3541           0 :     return false;
    3542             :   }
    3543             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3544             : 
    3545             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3546           0 :   return true;
    3547             : }
    3548             : 
    3549             : // CommExpr(MultActName, String)
    3550             : template <typename Term>
    3551       14913 : bool check_term_CommExpr(const Term& t)
    3552             : {
    3553       14913 :   utilities::mcrl2_unused(t);
    3554             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3555             :   // check the type of the term
    3556       14913 :   const atermpp::aterm& term(t);
    3557       14913 :   if (!term.type_is_appl())
    3558             :   {
    3559           0 :     return false;
    3560             :   }
    3561       14913 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3562       14913 :   if (a.function() != core::detail::function_symbols::CommExpr)
    3563             :   {
    3564           0 :     return false;
    3565             :   }
    3566             : 
    3567             :   // check the children
    3568       14913 :   if (a.size() != 2)
    3569             :   {
    3570           0 :     return false;
    3571             :   }
    3572             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3573       14913 :   if (!check_term_argument(a[0], check_rule_MultActName<atermpp::aterm>))
    3574             :   {
    3575           0 :     mCRL2log(log::debug) << "check_rule_MultActName" << std::endl;
    3576           0 :     return false;
    3577             :   }
    3578       14913 :   if (!check_term_argument(a[1], check_rule_String<atermpp::aterm>))
    3579             :   {
    3580           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    3581           0 :     return false;
    3582             :   }
    3583             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3584             : 
    3585             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3586       14913 :   return true;
    3587             : }
    3588             : 
    3589             : // ProcSpec(DataSpec, ActSpec, GlobVarSpec, ProcEqnSpec, ProcInit)
    3590             : template <typename Term>
    3591           0 : bool check_term_ProcSpec(const Term& t)
    3592             : {
    3593           0 :   utilities::mcrl2_unused(t);
    3594             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3595             :   // check the type of the term
    3596           0 :   const atermpp::aterm& term(t);
    3597           0 :   if (!term.type_is_appl())
    3598             :   {
    3599           0 :     return false;
    3600             :   }
    3601           0 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3602           0 :   if (a.function() != core::detail::function_symbols::ProcSpec)
    3603             :   {
    3604           0 :     return false;
    3605             :   }
    3606             : 
    3607             :   // check the children
    3608           0 :   if (a.size() != 5)
    3609             :   {
    3610           0 :     return false;
    3611             :   }
    3612             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3613           0 :   if (!check_term_argument(a[0], check_rule_DataSpec<atermpp::aterm>))
    3614             :   {
    3615           0 :     mCRL2log(log::debug) << "check_rule_DataSpec" << std::endl;
    3616           0 :     return false;
    3617             :   }
    3618           0 :   if (!check_term_argument(a[1], check_rule_ActSpec<atermpp::aterm>))
    3619             :   {
    3620           0 :     mCRL2log(log::debug) << "check_rule_ActSpec" << std::endl;
    3621           0 :     return false;
    3622             :   }
    3623           0 :   if (!check_term_argument(a[2], check_rule_GlobVarSpec<atermpp::aterm>))
    3624             :   {
    3625           0 :     mCRL2log(log::debug) << "check_rule_GlobVarSpec" << std::endl;
    3626           0 :     return false;
    3627             :   }
    3628           0 :   if (!check_term_argument(a[3], check_rule_ProcEqnSpec<atermpp::aterm>))
    3629             :   {
    3630           0 :     mCRL2log(log::debug) << "check_rule_ProcEqnSpec" << std::endl;
    3631           0 :     return false;
    3632             :   }
    3633           0 :   if (!check_term_argument(a[4], check_rule_ProcInit<atermpp::aterm>))
    3634             :   {
    3635           0 :     mCRL2log(log::debug) << "check_rule_ProcInit" << std::endl;
    3636           0 :     return false;
    3637             :   }
    3638             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3639             : 
    3640             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3641           0 :   return true;
    3642             : }
    3643             : 
    3644             : // ActSpec(ActId*)
    3645             : template <typename Term>
    3646           0 : bool check_term_ActSpec(const Term& t)
    3647             : {
    3648           0 :   utilities::mcrl2_unused(t);
    3649             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3650             :   // check the type of the term
    3651           0 :   const atermpp::aterm& term(t);
    3652           0 :   if (!term.type_is_appl())
    3653             :   {
    3654           0 :     return false;
    3655             :   }
    3656           0 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3657           0 :   if (a.function() != core::detail::function_symbols::ActSpec)
    3658             :   {
    3659           0 :     return false;
    3660             :   }
    3661             : 
    3662             :   // check the children
    3663           0 :   if (a.size() != 1)
    3664             :   {
    3665           0 :     return false;
    3666             :   }
    3667             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3668           0 :   if (!check_list_argument(a[0], check_rule_ActId<atermpp::aterm>, 0))
    3669             :   {
    3670           0 :     mCRL2log(log::debug) << "check_rule_ActId" << std::endl;
    3671           0 :     return false;
    3672             :   }
    3673             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3674             : 
    3675             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3676           0 :   return true;
    3677             : }
    3678             : 
    3679             : // GlobVarSpec(DataVarId*)
    3680             : template <typename Term>
    3681         184 : bool check_term_GlobVarSpec(const Term& t)
    3682             : {
    3683         184 :   utilities::mcrl2_unused(t);
    3684             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3685             :   // check the type of the term
    3686         184 :   const atermpp::aterm& term(t);
    3687         184 :   if (!term.type_is_appl())
    3688             :   {
    3689           0 :     return false;
    3690             :   }
    3691         184 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3692         184 :   if (a.function() != core::detail::function_symbols::GlobVarSpec)
    3693             :   {
    3694           0 :     return false;
    3695             :   }
    3696             : 
    3697             :   // check the children
    3698         184 :   if (a.size() != 1)
    3699             :   {
    3700           0 :     return false;
    3701             :   }
    3702             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3703         184 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 0))
    3704             :   {
    3705           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    3706           0 :     return false;
    3707             :   }
    3708             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3709             : 
    3710             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3711         184 :   return true;
    3712             : }
    3713             : 
    3714             : // ProcEqnSpec(ProcEqn*)
    3715             : template <typename Term>
    3716           0 : bool check_term_ProcEqnSpec(const Term& t)
    3717             : {
    3718           0 :   utilities::mcrl2_unused(t);
    3719             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3720             :   // check the type of the term
    3721           0 :   const atermpp::aterm& term(t);
    3722           0 :   if (!term.type_is_appl())
    3723             :   {
    3724           0 :     return false;
    3725             :   }
    3726           0 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3727           0 :   if (a.function() != core::detail::function_symbols::ProcEqnSpec)
    3728             :   {
    3729           0 :     return false;
    3730             :   }
    3731             : 
    3732             :   // check the children
    3733           0 :   if (a.size() != 1)
    3734             :   {
    3735           0 :     return false;
    3736             :   }
    3737             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3738           0 :   if (!check_list_argument(a[0], check_rule_ProcEqn<atermpp::aterm>, 0))
    3739             :   {
    3740           0 :     mCRL2log(log::debug) << "check_rule_ProcEqn" << std::endl;
    3741           0 :     return false;
    3742             :   }
    3743             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3744             : 
    3745             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3746           0 :   return true;
    3747             : }
    3748             : 
    3749             : // ProcEqn(ProcVarId, DataVarId*, ProcExpr)
    3750             : template <typename Term>
    3751           0 : bool check_term_ProcEqn(const Term& t)
    3752             : {
    3753           0 :   utilities::mcrl2_unused(t);
    3754             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3755             :   // check the type of the term
    3756           0 :   const atermpp::aterm& term(t);
    3757           0 :   if (!term.type_is_appl())
    3758             :   {
    3759           0 :     return false;
    3760             :   }
    3761           0 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3762           0 :   if (a.function() != core::detail::function_symbols::ProcEqn)
    3763             :   {
    3764           0 :     return false;
    3765             :   }
    3766             : 
    3767             :   // check the children
    3768           0 :   if (a.size() != 3)
    3769             :   {
    3770           0 :     return false;
    3771             :   }
    3772             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3773           0 :   if (!check_term_argument(a[0], check_rule_ProcVarId<atermpp::aterm>))
    3774             :   {
    3775           0 :     mCRL2log(log::debug) << "check_rule_ProcVarId" << std::endl;
    3776           0 :     return false;
    3777             :   }
    3778           0 :   if (!check_list_argument(a[1], check_rule_DataVarId<atermpp::aterm>, 0))
    3779             :   {
    3780           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    3781           0 :     return false;
    3782             :   }
    3783           0 :   if (!check_term_argument(a[2], check_rule_ProcExpr<atermpp::aterm>))
    3784             :   {
    3785           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3786           0 :     return false;
    3787             :   }
    3788             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3789             : 
    3790             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3791           0 :   return true;
    3792             : }
    3793             : 
    3794             : // ProcessInit(ProcExpr)
    3795             : template <typename Term>
    3796           0 : bool check_term_ProcessInit(const Term& t)
    3797             : {
    3798           0 :   utilities::mcrl2_unused(t);
    3799             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3800             :   // check the type of the term
    3801           0 :   const atermpp::aterm& term(t);
    3802           0 :   if (!term.type_is_appl())
    3803             :   {
    3804           0 :     return false;
    3805             :   }
    3806           0 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3807           0 :   if (a.function() != core::detail::function_symbols::ProcessInit)
    3808             :   {
    3809           0 :     return false;
    3810             :   }
    3811             : 
    3812             :   // check the children
    3813           0 :   if (a.size() != 1)
    3814             :   {
    3815           0 :     return false;
    3816             :   }
    3817             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3818           0 :   if (!check_term_argument(a[0], check_rule_ProcExpr<atermpp::aterm>))
    3819             :   {
    3820           0 :     mCRL2log(log::debug) << "check_rule_ProcExpr" << std::endl;
    3821           0 :     return false;
    3822             :   }
    3823             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3824             : 
    3825             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3826           0 :   return true;
    3827             : }
    3828             : 
    3829             : // Distribution(DataVarId*, DataExpr)
    3830             : template <typename Term>
    3831       44560 : bool check_term_Distribution(const Term& t)
    3832             : {
    3833       44560 :   utilities::mcrl2_unused(t);
    3834             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3835             :   // check the type of the term
    3836       44560 :   const atermpp::aterm& term(t);
    3837       44560 :   if (!term.type_is_appl())
    3838             :   {
    3839           0 :     return false;
    3840             :   }
    3841       44560 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3842       44560 :   if (a.function() != core::detail::function_symbols::Distribution)
    3843             :   {
    3844           0 :     return false;
    3845             :   }
    3846             : 
    3847             :   // check the children
    3848       44560 :   if (a.size() != 2)
    3849             :   {
    3850           0 :     return false;
    3851             :   }
    3852             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3853       44560 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 0))
    3854             :   {
    3855           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    3856           0 :     return false;
    3857             :   }
    3858       44560 :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    3859             :   {
    3860           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    3861           0 :     return false;
    3862             :   }
    3863             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3864             : 
    3865             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3866       44560 :   return true;
    3867             : }
    3868             : 
    3869             : // LinProcSpec(DataSpec, ActSpec, GlobVarSpec, LinearProcess, LinearProcessInit)
    3870             : template <typename Term>
    3871             : bool check_term_LinProcSpec(const Term& t)
    3872             : {
    3873             :   utilities::mcrl2_unused(t);
    3874             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3875             :   // check the type of the term
    3876             :   const atermpp::aterm& term(t);
    3877             :   if (!term.type_is_appl())
    3878             :   {
    3879             :     return false;
    3880             :   }
    3881             :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3882             :   if (a.function() != core::detail::function_symbols::LinProcSpec)
    3883             :   {
    3884             :     return false;
    3885             :   }
    3886             : 
    3887             :   // check the children
    3888             :   if (a.size() != 5)
    3889             :   {
    3890             :     return false;
    3891             :   }
    3892             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3893             :   if (!check_term_argument(a[0], check_rule_DataSpec<atermpp::aterm>))
    3894             :   {
    3895             :     mCRL2log(log::debug) << "check_rule_DataSpec" << std::endl;
    3896             :     return false;
    3897             :   }
    3898             :   if (!check_term_argument(a[1], check_rule_ActSpec<atermpp::aterm>))
    3899             :   {
    3900             :     mCRL2log(log::debug) << "check_rule_ActSpec" << std::endl;
    3901             :     return false;
    3902             :   }
    3903             :   if (!check_term_argument(a[2], check_rule_GlobVarSpec<atermpp::aterm>))
    3904             :   {
    3905             :     mCRL2log(log::debug) << "check_rule_GlobVarSpec" << std::endl;
    3906             :     return false;
    3907             :   }
    3908             :   if (!check_term_argument(a[3], check_rule_LinearProcess<atermpp::aterm>))
    3909             :   {
    3910             :     mCRL2log(log::debug) << "check_rule_LinearProcess" << std::endl;
    3911             :     return false;
    3912             :   }
    3913             :   if (!check_term_argument(a[4], check_rule_LinearProcessInit<atermpp::aterm>))
    3914             :   {
    3915             :     mCRL2log(log::debug) << "check_rule_LinearProcessInit" << std::endl;
    3916             :     return false;
    3917             :   }
    3918             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3919             : 
    3920             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3921             :   return true;
    3922             : }
    3923             : 
    3924             : // LinearProcess(DataVarId*, LinearProcessSummand*)
    3925             : template <typename Term>
    3926             : bool check_term_LinearProcess(const Term& t)
    3927             : {
    3928             :   utilities::mcrl2_unused(t);
    3929             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3930             :   // check the type of the term
    3931             :   const atermpp::aterm& term(t);
    3932             :   if (!term.type_is_appl())
    3933             :   {
    3934             :     return false;
    3935             :   }
    3936             :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3937             :   if (a.function() != core::detail::function_symbols::LinearProcess)
    3938             :   {
    3939             :     return false;
    3940             :   }
    3941             : 
    3942             :   // check the children
    3943             :   if (a.size() != 2)
    3944             :   {
    3945             :     return false;
    3946             :   }
    3947             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3948             :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 0))
    3949             :   {
    3950             :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    3951             :     return false;
    3952             :   }
    3953             :   if (!check_list_argument(a[1], check_rule_LinearProcessSummand<atermpp::aterm>, 0))
    3954             :   {
    3955             :     mCRL2log(log::debug) << "check_rule_LinearProcessSummand" << std::endl;
    3956             :     return false;
    3957             :   }
    3958             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3959             : 
    3960             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    3961             :   return true;
    3962             : }
    3963             : 
    3964             : // LinearProcessSummand(DataVarId*, DataExpr, MultActOrDelta, DataExpr, DataVarIdInit*, Distribution)
    3965             : template <typename Term>
    3966             : bool check_term_LinearProcessSummand(const Term& t)
    3967             : {
    3968             :   utilities::mcrl2_unused(t);
    3969             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    3970             :   // check the type of the term
    3971             :   const atermpp::aterm& term(t);
    3972             :   if (!term.type_is_appl())
    3973             :   {
    3974             :     return false;
    3975             :   }
    3976             :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    3977             :   if (a.function() != core::detail::function_symbols::LinearProcessSummand)
    3978             :   {
    3979             :     return false;
    3980             :   }
    3981             : 
    3982             :   // check the children
    3983             :   if (a.size() != 6)
    3984             :   {
    3985             :     return false;
    3986             :   }
    3987             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    3988             :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 0))
    3989             :   {
    3990             :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    3991             :     return false;
    3992             :   }
    3993             :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    3994             :   {
    3995             :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    3996             :     return false;
    3997             :   }
    3998             :   if (!check_term_argument(a[2], check_rule_MultActOrDelta<atermpp::aterm>))
    3999             :   {
    4000             :     mCRL2log(log::debug) << "check_rule_MultActOrDelta" << std::endl;
    4001             :     return false;
    4002             :   }
    4003             :   if (!check_term_argument(a[3], check_rule_DataExpr<atermpp::aterm>))
    4004             :   {
    4005             :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    4006             :     return false;
    4007             :   }
    4008             :   if (!check_list_argument(a[4], check_rule_DataVarIdInit<atermpp::aterm>, 0))
    4009             :   {
    4010             :     mCRL2log(log::debug) << "check_rule_DataVarIdInit" << std::endl;
    4011             :     return false;
    4012             :   }
    4013             :   if (!check_term_argument(a[5], check_rule_Distribution<atermpp::aterm>))
    4014             :   {
    4015             :     mCRL2log(log::debug) << "check_rule_Distribution" << std::endl;
    4016             :     return false;
    4017             :   }
    4018             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4019             : 
    4020             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4021             :   return true;
    4022             : }
    4023             : 
    4024             : // LinearProcessInit(DataExpr*, Distribution)
    4025             : template <typename Term>
    4026       18855 : bool check_term_LinearProcessInit(const Term& t)
    4027             : {
    4028       18855 :   utilities::mcrl2_unused(t);
    4029             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4030             :   // check the type of the term
    4031       18855 :   const atermpp::aterm& term(t);
    4032       18855 :   if (!term.type_is_appl())
    4033             :   {
    4034           0 :     return false;
    4035             :   }
    4036       18855 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4037       18855 :   if (a.function() != core::detail::function_symbols::LinearProcessInit)
    4038             :   {
    4039           0 :     return false;
    4040             :   }
    4041             : 
    4042             :   // check the children
    4043       18855 :   if (a.size() != 2)
    4044             :   {
    4045           0 :     return false;
    4046             :   }
    4047             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4048       18855 :   if (!check_list_argument(a[0], check_rule_DataExpr<atermpp::aterm>, 0))
    4049             :   {
    4050           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    4051           0 :     return false;
    4052             :   }
    4053       18855 :   if (!check_term_argument(a[1], check_rule_Distribution<atermpp::aterm>))
    4054             :   {
    4055           0 :     mCRL2log(log::debug) << "check_rule_Distribution" << std::endl;
    4056           0 :     return false;
    4057             :   }
    4058             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4059             : 
    4060             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4061       18855 :   return true;
    4062             : }
    4063             : 
    4064             : // StateTrue()
    4065             : template <typename Term>
    4066      482618 : bool check_term_StateTrue(const Term& t)
    4067             : {
    4068      482618 :   utilities::mcrl2_unused(t);
    4069             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4070             :   // check the type of the term
    4071      482618 :   const atermpp::aterm& term(t);
    4072      482618 :   if (!term.type_is_appl())
    4073             :   {
    4074           0 :     return false;
    4075             :   }
    4076      482618 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4077      482618 :   if (a.function() != core::detail::function_symbols::StateTrue)
    4078             :   {
    4079      449121 :     return false;
    4080             :   }
    4081             : 
    4082             :   // check the children
    4083       33497 :   if (a.size() != 0)
    4084             :   {
    4085           0 :     return false;
    4086             :   }
    4087             : 
    4088             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4089       33497 :   return true;
    4090             : }
    4091             : 
    4092             : // StateFalse()
    4093             : template <typename Term>
    4094      451085 : bool check_term_StateFalse(const Term& t)
    4095             : {
    4096      451085 :   utilities::mcrl2_unused(t);
    4097             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4098             :   // check the type of the term
    4099      451085 :   const atermpp::aterm& term(t);
    4100      451085 :   if (!term.type_is_appl())
    4101             :   {
    4102           0 :     return false;
    4103             :   }
    4104      451085 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4105      451085 :   if (a.function() != core::detail::function_symbols::StateFalse)
    4106             :   {
    4107      402672 :     return false;
    4108             :   }
    4109             : 
    4110             :   // check the children
    4111       48413 :   if (a.size() != 0)
    4112             :   {
    4113           0 :     return false;
    4114             :   }
    4115             : 
    4116             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4117       48413 :   return true;
    4118             : }
    4119             : 
    4120             : // StateNot(StateFrm)
    4121             : template <typename Term>
    4122      403695 : bool check_term_StateNot(const Term& t)
    4123             : {
    4124      403695 :   utilities::mcrl2_unused(t);
    4125             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4126             :   // check the type of the term
    4127      403695 :   const atermpp::aterm& term(t);
    4128      403695 :   if (!term.type_is_appl())
    4129             :   {
    4130           0 :     return false;
    4131             :   }
    4132      403695 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4133      403695 :   if (a.function() != core::detail::function_symbols::StateNot)
    4134             :   {
    4135      396419 :     return false;
    4136             :   }
    4137             : 
    4138             :   // check the children
    4139        7276 :   if (a.size() != 1)
    4140             :   {
    4141           0 :     return false;
    4142             :   }
    4143             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4144        7276 :   if (!check_term_argument(a[0], check_rule_StateFrm<atermpp::aterm>))
    4145             :   {
    4146           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4147           0 :     return false;
    4148             :   }
    4149             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4150             : 
    4151             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4152        7276 :   return true;
    4153             : }
    4154             : 
    4155             : // StateMinus(StateFrm)
    4156             : template <typename Term>
    4157      396419 : bool check_term_StateMinus(const Term& t)
    4158             : {
    4159      396419 :   utilities::mcrl2_unused(t);
    4160             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4161             :   // check the type of the term
    4162      396419 :   const atermpp::aterm& term(t);
    4163      396419 :   if (!term.type_is_appl())
    4164             :   {
    4165           0 :     return false;
    4166             :   }
    4167      396419 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4168      396419 :   if (a.function() != core::detail::function_symbols::StateMinus)
    4169             :   {
    4170      396419 :     return false;
    4171             :   }
    4172             : 
    4173             :   // check the children
    4174           0 :   if (a.size() != 1)
    4175             :   {
    4176           0 :     return false;
    4177             :   }
    4178             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4179           0 :   if (!check_term_argument(a[0], check_rule_StateFrm<atermpp::aterm>))
    4180             :   {
    4181           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4182           0 :     return false;
    4183             :   }
    4184             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4185             : 
    4186             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4187           0 :   return true;
    4188             : }
    4189             : 
    4190             : // StateAnd(StateFrm, StateFrm)
    4191             : template <typename Term>
    4192      400011 : bool check_term_StateAnd(const Term& t)
    4193             : {
    4194      400011 :   utilities::mcrl2_unused(t);
    4195             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4196             :   // check the type of the term
    4197      400011 :   const atermpp::aterm& term(t);
    4198      400011 :   if (!term.type_is_appl())
    4199             :   {
    4200           0 :     return false;
    4201             :   }
    4202      400011 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4203      400011 :   if (a.function() != core::detail::function_symbols::StateAnd)
    4204             :   {
    4205      335164 :     return false;
    4206             :   }
    4207             : 
    4208             :   // check the children
    4209       64847 :   if (a.size() != 2)
    4210             :   {
    4211           0 :     return false;
    4212             :   }
    4213             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4214       64847 :   if (!check_term_argument(a[0], check_rule_StateFrm<atermpp::aterm>))
    4215             :   {
    4216           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4217           0 :     return false;
    4218             :   }
    4219       64847 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4220             :   {
    4221           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4222           0 :     return false;
    4223             :   }
    4224             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4225             : 
    4226             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4227       64847 :   return true;
    4228             : }
    4229             : 
    4230             : // StateOr(StateFrm, StateFrm)
    4231             : template <typename Term>
    4232      337446 : bool check_term_StateOr(const Term& t)
    4233             : {
    4234      337446 :   utilities::mcrl2_unused(t);
    4235             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4236             :   // check the type of the term
    4237      337446 :   const atermpp::aterm& term(t);
    4238      337446 :   if (!term.type_is_appl())
    4239             :   {
    4240           0 :     return false;
    4241             :   }
    4242      337446 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4243      337446 :   if (a.function() != core::detail::function_symbols::StateOr)
    4244             :   {
    4245      307736 :     return false;
    4246             :   }
    4247             : 
    4248             :   // check the children
    4249       29710 :   if (a.size() != 2)
    4250             :   {
    4251           0 :     return false;
    4252             :   }
    4253             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4254       29710 :   if (!check_term_argument(a[0], check_rule_StateFrm<atermpp::aterm>))
    4255             :   {
    4256           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4257           0 :     return false;
    4258             :   }
    4259       29710 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4260             :   {
    4261           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4262           0 :     return false;
    4263             :   }
    4264             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4265             : 
    4266             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4267       29710 :   return true;
    4268             : }
    4269             : 
    4270             : // StateImp(StateFrm, StateFrm)
    4271             : template <typename Term>
    4272      308088 : bool check_term_StateImp(const Term& t)
    4273             : {
    4274      308088 :   utilities::mcrl2_unused(t);
    4275             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4276             :   // check the type of the term
    4277      308088 :   const atermpp::aterm& term(t);
    4278      308088 :   if (!term.type_is_appl())
    4279             :   {
    4280           0 :     return false;
    4281             :   }
    4282      308088 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4283      308088 :   if (a.function() != core::detail::function_symbols::StateImp)
    4284             :   {
    4285      302599 :     return false;
    4286             :   }
    4287             : 
    4288             :   // check the children
    4289        5489 :   if (a.size() != 2)
    4290             :   {
    4291           0 :     return false;
    4292             :   }
    4293             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4294        5489 :   if (!check_term_argument(a[0], check_rule_StateFrm<atermpp::aterm>))
    4295             :   {
    4296           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4297           0 :     return false;
    4298             :   }
    4299        5489 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4300             :   {
    4301           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4302           0 :     return false;
    4303             :   }
    4304             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4305             : 
    4306             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4307        5489 :   return true;
    4308             : }
    4309             : 
    4310             : // StatePlus(StateFrm, StateFrm)
    4311             : template <typename Term>
    4312      302599 : bool check_term_StatePlus(const Term& t)
    4313             : {
    4314      302599 :   utilities::mcrl2_unused(t);
    4315             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4316             :   // check the type of the term
    4317      302599 :   const atermpp::aterm& term(t);
    4318      302599 :   if (!term.type_is_appl())
    4319             :   {
    4320           0 :     return false;
    4321             :   }
    4322      302599 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4323      302599 :   if (a.function() != core::detail::function_symbols::StatePlus)
    4324             :   {
    4325      302599 :     return false;
    4326             :   }
    4327             : 
    4328             :   // check the children
    4329           0 :   if (a.size() != 2)
    4330             :   {
    4331           0 :     return false;
    4332             :   }
    4333             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4334           0 :   if (!check_term_argument(a[0], check_rule_StateFrm<atermpp::aterm>))
    4335             :   {
    4336           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4337           0 :     return false;
    4338             :   }
    4339           0 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4340             :   {
    4341           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4342           0 :     return false;
    4343             :   }
    4344             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4345             : 
    4346             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4347           0 :   return true;
    4348             : }
    4349             : 
    4350             : // StateConstantMultiply(DataExpr, StateFrm)
    4351             : template <typename Term>
    4352      302610 : bool check_term_StateConstantMultiply(const Term& t)
    4353             : {
    4354      302610 :   utilities::mcrl2_unused(t);
    4355             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4356             :   // check the type of the term
    4357      302610 :   const atermpp::aterm& term(t);
    4358      302610 :   if (!term.type_is_appl())
    4359             :   {
    4360           0 :     return false;
    4361             :   }
    4362      302610 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4363      302610 :   if (a.function() != core::detail::function_symbols::StateConstantMultiply)
    4364             :   {
    4365      302550 :     return false;
    4366             :   }
    4367             : 
    4368             :   // check the children
    4369          60 :   if (a.size() != 2)
    4370             :   {
    4371           0 :     return false;
    4372             :   }
    4373             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4374          60 :   if (!check_term_argument(a[0], check_rule_DataExpr<atermpp::aterm>))
    4375             :   {
    4376           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    4377           0 :     return false;
    4378             :   }
    4379          60 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4380             :   {
    4381           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4382           0 :     return false;
    4383             :   }
    4384             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4385             : 
    4386             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4387          60 :   return true;
    4388             : }
    4389             : 
    4390             : // StateConstantMultiplyAlt(StateFrm, DataExpr)
    4391             : template <typename Term>
    4392      302561 : bool check_term_StateConstantMultiplyAlt(const Term& t)
    4393             : {
    4394      302561 :   utilities::mcrl2_unused(t);
    4395             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4396             :   // check the type of the term
    4397      302561 :   const atermpp::aterm& term(t);
    4398      302561 :   if (!term.type_is_appl())
    4399             :   {
    4400           0 :     return false;
    4401             :   }
    4402      302561 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4403      302561 :   if (a.function() != core::detail::function_symbols::StateConstantMultiplyAlt)
    4404             :   {
    4405      302536 :     return false;
    4406             :   }
    4407             : 
    4408             :   // check the children
    4409          25 :   if (a.size() != 2)
    4410             :   {
    4411           0 :     return false;
    4412             :   }
    4413             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4414          25 :   if (!check_term_argument(a[0], check_rule_StateFrm<atermpp::aterm>))
    4415             :   {
    4416           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4417           0 :     return false;
    4418             :   }
    4419          25 :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    4420             :   {
    4421           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    4422           0 :     return false;
    4423             :   }
    4424             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4425             : 
    4426             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4427          25 :   return true;
    4428             : }
    4429             : 
    4430             : // StateForall(DataVarId+, StateFrm)
    4431             : template <typename Term>
    4432      302860 : bool check_term_StateForall(const Term& t)
    4433             : {
    4434      302860 :   utilities::mcrl2_unused(t);
    4435             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4436             :   // check the type of the term
    4437      302860 :   const atermpp::aterm& term(t);
    4438      302860 :   if (!term.type_is_appl())
    4439             :   {
    4440           0 :     return false;
    4441             :   }
    4442      302860 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4443      302860 :   if (a.function() != core::detail::function_symbols::StateForall)
    4444             :   {
    4445      300685 :     return false;
    4446             :   }
    4447             : 
    4448             :   // check the children
    4449        2175 :   if (a.size() != 2)
    4450             :   {
    4451           0 :     return false;
    4452             :   }
    4453             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4454        2175 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    4455             :   {
    4456           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    4457           0 :     return false;
    4458             :   }
    4459        2175 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4460             :   {
    4461           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4462           0 :     return false;
    4463             :   }
    4464             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4465             : 
    4466             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4467        2175 :   return true;
    4468             : }
    4469             : 
    4470             : // StateExists(DataVarId+, StateFrm)
    4471             : template <typename Term>
    4472      300830 : bool check_term_StateExists(const Term& t)
    4473             : {
    4474      300830 :   utilities::mcrl2_unused(t);
    4475             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4476             :   // check the type of the term
    4477      300830 :   const atermpp::aterm& term(t);
    4478      300830 :   if (!term.type_is_appl())
    4479             :   {
    4480           0 :     return false;
    4481             :   }
    4482      300830 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4483      300830 :   if (a.function() != core::detail::function_symbols::StateExists)
    4484             :   {
    4485      300070 :     return false;
    4486             :   }
    4487             : 
    4488             :   // check the children
    4489         760 :   if (a.size() != 2)
    4490             :   {
    4491           0 :     return false;
    4492             :   }
    4493             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4494         760 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    4495             :   {
    4496           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    4497           0 :     return false;
    4498             :   }
    4499         760 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4500             :   {
    4501           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4502           0 :     return false;
    4503             :   }
    4504             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4505             : 
    4506             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4507         760 :   return true;
    4508             : }
    4509             : 
    4510             : // StateInfimum(DataVarId+, StateFrm)
    4511             : template <typename Term>
    4512      300092 : bool check_term_StateInfimum(const Term& t)
    4513             : {
    4514      300092 :   utilities::mcrl2_unused(t);
    4515             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4516             :   // check the type of the term
    4517      300092 :   const atermpp::aterm& term(t);
    4518      300092 :   if (!term.type_is_appl())
    4519             :   {
    4520           0 :     return false;
    4521             :   }
    4522      300092 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4523      300092 :   if (a.function() != core::detail::function_symbols::StateInfimum)
    4524             :   {
    4525      300006 :     return false;
    4526             :   }
    4527             : 
    4528             :   // check the children
    4529          86 :   if (a.size() != 2)
    4530             :   {
    4531           0 :     return false;
    4532             :   }
    4533             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4534          86 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    4535             :   {
    4536           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    4537           0 :     return false;
    4538             :   }
    4539          86 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4540             :   {
    4541           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4542           0 :     return false;
    4543             :   }
    4544             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4545             : 
    4546             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4547          86 :   return true;
    4548             : }
    4549             : 
    4550             : // StateSupremum(DataVarId+, StateFrm)
    4551             : template <typename Term>
    4552      300017 : bool check_term_StateSupremum(const Term& t)
    4553             : {
    4554      300017 :   utilities::mcrl2_unused(t);
    4555             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4556             :   // check the type of the term
    4557      300017 :   const atermpp::aterm& term(t);
    4558      300017 :   if (!term.type_is_appl())
    4559             :   {
    4560           0 :     return false;
    4561             :   }
    4562      300017 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4563      300017 :   if (a.function() != core::detail::function_symbols::StateSupremum)
    4564             :   {
    4565      299991 :     return false;
    4566             :   }
    4567             : 
    4568             :   // check the children
    4569          26 :   if (a.size() != 2)
    4570             :   {
    4571           0 :     return false;
    4572             :   }
    4573             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4574          26 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    4575             :   {
    4576           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    4577           0 :     return false;
    4578             :   }
    4579          26 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4580             :   {
    4581           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4582           0 :     return false;
    4583             :   }
    4584             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4585             : 
    4586             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4587          26 :   return true;
    4588             : }
    4589             : 
    4590             : // StateSum(DataVarId+, StateFrm)
    4591             : template <typename Term>
    4592      300002 : bool check_term_StateSum(const Term& t)
    4593             : {
    4594      300002 :   utilities::mcrl2_unused(t);
    4595             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4596             :   // check the type of the term
    4597      300002 :   const atermpp::aterm& term(t);
    4598      300002 :   if (!term.type_is_appl())
    4599             :   {
    4600           0 :     return false;
    4601             :   }
    4602      300002 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4603      300002 :   if (a.function() != core::detail::function_symbols::StateSum)
    4604             :   {
    4605      299976 :     return false;
    4606             :   }
    4607             : 
    4608             :   // check the children
    4609          26 :   if (a.size() != 2)
    4610             :   {
    4611           0 :     return false;
    4612             :   }
    4613             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4614          26 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    4615             :   {
    4616           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    4617           0 :     return false;
    4618             :   }
    4619          26 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4620             :   {
    4621           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4622           0 :     return false;
    4623             :   }
    4624             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4625             : 
    4626             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4627          26 :   return true;
    4628             : }
    4629             : 
    4630             : // StateMust(RegFrm, StateFrm)
    4631             : template <typename Term>
    4632      304942 : bool check_term_StateMust(const Term& t)
    4633             : {
    4634      304942 :   utilities::mcrl2_unused(t);
    4635             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4636             :   // check the type of the term
    4637      304942 :   const atermpp::aterm& term(t);
    4638      304942 :   if (!term.type_is_appl())
    4639             :   {
    4640           0 :     return false;
    4641             :   }
    4642      304942 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4643      304942 :   if (a.function() != core::detail::function_symbols::StateMust)
    4644             :   {
    4645      206270 :     return false;
    4646             :   }
    4647             : 
    4648             :   // check the children
    4649       98672 :   if (a.size() != 2)
    4650             :   {
    4651           0 :     return false;
    4652             :   }
    4653             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4654       98672 :   if (!check_term_argument(a[0], check_rule_RegFrm<atermpp::aterm>))
    4655             :   {
    4656           0 :     mCRL2log(log::debug) << "check_rule_RegFrm" << std::endl;
    4657           0 :     return false;
    4658             :   }
    4659       98672 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4660             :   {
    4661           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4662           0 :     return false;
    4663             :   }
    4664             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4665             : 
    4666             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4667       98672 :   return true;
    4668             : }
    4669             : 
    4670             : // StateMay(RegFrm, StateFrm)
    4671             : template <typename Term>
    4672      210341 : bool check_term_StateMay(const Term& t)
    4673             : {
    4674      210341 :   utilities::mcrl2_unused(t);
    4675             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4676             :   // check the type of the term
    4677      210341 :   const atermpp::aterm& term(t);
    4678      210341 :   if (!term.type_is_appl())
    4679             :   {
    4680           0 :     return false;
    4681             :   }
    4682      210341 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4683      210341 :   if (a.function() != core::detail::function_symbols::StateMay)
    4684             :   {
    4685      153653 :     return false;
    4686             :   }
    4687             : 
    4688             :   // check the children
    4689       56688 :   if (a.size() != 2)
    4690             :   {
    4691           0 :     return false;
    4692             :   }
    4693             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4694       56688 :   if (!check_term_argument(a[0], check_rule_RegFrm<atermpp::aterm>))
    4695             :   {
    4696           0 :     mCRL2log(log::debug) << "check_rule_RegFrm" << std::endl;
    4697           0 :     return false;
    4698             :   }
    4699       56688 :   if (!check_term_argument(a[1], check_rule_StateFrm<atermpp::aterm>))
    4700             :   {
    4701           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4702           0 :     return false;
    4703             :   }
    4704             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4705             : 
    4706             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4707       56688 :   return true;
    4708             : }
    4709             : 
    4710             : // StateYaled()
    4711             : template <typename Term>
    4712      153653 : bool check_term_StateYaled(const Term& t)
    4713             : {
    4714      153653 :   utilities::mcrl2_unused(t);
    4715             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4716             :   // check the type of the term
    4717      153653 :   const atermpp::aterm& term(t);
    4718      153653 :   if (!term.type_is_appl())
    4719             :   {
    4720           0 :     return false;
    4721             :   }
    4722      153653 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4723      153653 :   if (a.function() != core::detail::function_symbols::StateYaled)
    4724             :   {
    4725      153653 :     return false;
    4726             :   }
    4727             : 
    4728             :   // check the children
    4729           0 :   if (a.size() != 0)
    4730             :   {
    4731           0 :     return false;
    4732             :   }
    4733             : 
    4734             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4735           0 :   return true;
    4736             : }
    4737             : 
    4738             : // StateYaledTimed(DataExpr)
    4739             : template <typename Term>
    4740      153689 : bool check_term_StateYaledTimed(const Term& t)
    4741             : {
    4742      153689 :   utilities::mcrl2_unused(t);
    4743             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4744             :   // check the type of the term
    4745      153689 :   const atermpp::aterm& term(t);
    4746      153689 :   if (!term.type_is_appl())
    4747             :   {
    4748           0 :     return false;
    4749             :   }
    4750      153689 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4751      153689 :   if (a.function() != core::detail::function_symbols::StateYaledTimed)
    4752             :   {
    4753      153541 :     return false;
    4754             :   }
    4755             : 
    4756             :   // check the children
    4757         148 :   if (a.size() != 1)
    4758             :   {
    4759           0 :     return false;
    4760             :   }
    4761             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4762         148 :   if (!check_term_argument(a[0], check_rule_DataExpr<atermpp::aterm>))
    4763             :   {
    4764           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    4765           0 :     return false;
    4766             :   }
    4767             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4768             : 
    4769             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4770         148 :   return true;
    4771             : }
    4772             : 
    4773             : // StateDelay()
    4774             : template <typename Term>
    4775      153541 : bool check_term_StateDelay(const Term& t)
    4776             : {
    4777      153541 :   utilities::mcrl2_unused(t);
    4778             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4779             :   // check the type of the term
    4780      153541 :   const atermpp::aterm& term(t);
    4781      153541 :   if (!term.type_is_appl())
    4782             :   {
    4783           0 :     return false;
    4784             :   }
    4785      153541 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4786      153541 :   if (a.function() != core::detail::function_symbols::StateDelay)
    4787             :   {
    4788      153541 :     return false;
    4789             :   }
    4790             : 
    4791             :   // check the children
    4792           0 :   if (a.size() != 0)
    4793             :   {
    4794           0 :     return false;
    4795             :   }
    4796             : 
    4797             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4798           0 :   return true;
    4799             : }
    4800             : 
    4801             : // StateDelayTimed(DataExpr)
    4802             : template <typename Term>
    4803      153587 : bool check_term_StateDelayTimed(const Term& t)
    4804             : {
    4805      153587 :   utilities::mcrl2_unused(t);
    4806             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4807             :   // check the type of the term
    4808      153587 :   const atermpp::aterm& term(t);
    4809      153587 :   if (!term.type_is_appl())
    4810             :   {
    4811           0 :     return false;
    4812             :   }
    4813      153587 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4814      153587 :   if (a.function() != core::detail::function_symbols::StateDelayTimed)
    4815             :   {
    4816      153417 :     return false;
    4817             :   }
    4818             : 
    4819             :   // check the children
    4820         170 :   if (a.size() != 1)
    4821             :   {
    4822           0 :     return false;
    4823             :   }
    4824             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4825         170 :   if (!check_term_argument(a[0], check_rule_DataExpr<atermpp::aterm>))
    4826             :   {
    4827           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    4828           0 :     return false;
    4829             :   }
    4830             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4831             : 
    4832             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4833         170 :   return true;
    4834             : }
    4835             : 
    4836             : // StateVar(String, DataExpr*)
    4837             : template <typename Term>
    4838      157759 : bool check_term_StateVar(const Term& t)
    4839             : {
    4840      157759 :   utilities::mcrl2_unused(t);
    4841             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4842             :   // check the type of the term
    4843      157759 :   const atermpp::aterm& term(t);
    4844      157759 :   if (!term.type_is_appl())
    4845             :   {
    4846           0 :     return false;
    4847             :   }
    4848      157759 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4849      157759 :   if (a.function() != core::detail::function_symbols::StateVar)
    4850             :   {
    4851       60820 :     return false;
    4852             :   }
    4853             : 
    4854             :   // check the children
    4855       96939 :   if (a.size() != 2)
    4856             :   {
    4857           0 :     return false;
    4858             :   }
    4859             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4860       96939 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    4861             :   {
    4862           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    4863           0 :     return false;
    4864             :   }
    4865       96939 :   if (!check_list_argument(a[1], check_rule_DataExpr<atermpp::aterm>, 0))
    4866             :   {
    4867           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    4868           0 :     return false;
    4869             :   }
    4870             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4871             : 
    4872             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4873       96939 :   return true;
    4874             : }
    4875             : 
    4876             : // StateNu(String, DataVarIdInit*, StateFrm)
    4877             : template <typename Term>
    4878       64502 : bool check_term_StateNu(const Term& t)
    4879             : {
    4880       64502 :   utilities::mcrl2_unused(t);
    4881             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4882             :   // check the type of the term
    4883       64502 :   const atermpp::aterm& term(t);
    4884       64502 :   if (!term.type_is_appl())
    4885             :   {
    4886           0 :     return false;
    4887             :   }
    4888       64502 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4889       64502 :   if (a.function() != core::detail::function_symbols::StateNu)
    4890             :   {
    4891       26416 :     return false;
    4892             :   }
    4893             : 
    4894             :   // check the children
    4895       38086 :   if (a.size() != 3)
    4896             :   {
    4897           0 :     return false;
    4898             :   }
    4899             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4900       38086 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    4901             :   {
    4902           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    4903           0 :     return false;
    4904             :   }
    4905       38086 :   if (!check_list_argument(a[1], check_rule_DataVarIdInit<atermpp::aterm>, 0))
    4906             :   {
    4907           0 :     mCRL2log(log::debug) << "check_rule_DataVarIdInit" << std::endl;
    4908           0 :     return false;
    4909             :   }
    4910       38086 :   if (!check_term_argument(a[2], check_rule_StateFrm<atermpp::aterm>))
    4911             :   {
    4912           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4913           0 :     return false;
    4914             :   }
    4915             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4916             : 
    4917             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4918       38086 :   return true;
    4919             : }
    4920             : 
    4921             : // StateMu(String, DataVarIdInit*, StateFrm)
    4922             : template <typename Term>
    4923       29527 : bool check_term_StateMu(const Term& t)
    4924             : {
    4925       29527 :   utilities::mcrl2_unused(t);
    4926             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4927             :   // check the type of the term
    4928       29527 :   const atermpp::aterm& term(t);
    4929       29527 :   if (!term.type_is_appl())
    4930             :   {
    4931           0 :     return false;
    4932             :   }
    4933       29527 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4934       29527 :   if (a.function() != core::detail::function_symbols::StateMu)
    4935             :   {
    4936        4052 :     return false;
    4937             :   }
    4938             : 
    4939             :   // check the children
    4940       25475 :   if (a.size() != 3)
    4941             :   {
    4942           0 :     return false;
    4943             :   }
    4944             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4945       25475 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    4946             :   {
    4947           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    4948           0 :     return false;
    4949             :   }
    4950       25475 :   if (!check_list_argument(a[1], check_rule_DataVarIdInit<atermpp::aterm>, 0))
    4951             :   {
    4952           0 :     mCRL2log(log::debug) << "check_rule_DataVarIdInit" << std::endl;
    4953           0 :     return false;
    4954             :   }
    4955       25475 :   if (!check_term_argument(a[2], check_rule_StateFrm<atermpp::aterm>))
    4956             :   {
    4957           0 :     mCRL2log(log::debug) << "check_rule_StateFrm" << std::endl;
    4958           0 :     return false;
    4959             :   }
    4960             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    4961             : 
    4962             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4963       25475 :   return true;
    4964             : }
    4965             : 
    4966             : // RegNil()
    4967             : template <typename Term>
    4968        1835 : bool check_term_RegNil(const Term& t)
    4969             : {
    4970        1835 :   utilities::mcrl2_unused(t);
    4971             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    4972             :   // check the type of the term
    4973        1835 :   const atermpp::aterm& term(t);
    4974        1835 :   if (!term.type_is_appl())
    4975             :   {
    4976           0 :     return false;
    4977             :   }
    4978        1835 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    4979        1835 :   if (a.function() != core::detail::function_symbols::RegNil)
    4980             :   {
    4981        1835 :     return false;
    4982             :   }
    4983             : 
    4984             :   // check the children
    4985           0 :   if (a.size() != 0)
    4986             :   {
    4987           0 :     return false;
    4988             :   }
    4989             : 
    4990             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    4991           0 :   return true;
    4992             : }
    4993             : 
    4994             : // RegSeq(RegFrm, RegFrm)
    4995             : template <typename Term>
    4996        1847 : bool check_term_RegSeq(const Term& t)
    4997             : {
    4998        1847 :   utilities::mcrl2_unused(t);
    4999             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5000             :   // check the type of the term
    5001        1847 :   const atermpp::aterm& term(t);
    5002        1847 :   if (!term.type_is_appl())
    5003             :   {
    5004           0 :     return false;
    5005             :   }
    5006        1847 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5007        1847 :   if (a.function() != core::detail::function_symbols::RegSeq)
    5008             :   {
    5009        1787 :     return false;
    5010             :   }
    5011             : 
    5012             :   // check the children
    5013          60 :   if (a.size() != 2)
    5014             :   {
    5015           0 :     return false;
    5016             :   }
    5017             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5018          60 :   if (!check_term_argument(a[0], check_rule_RegFrm<atermpp::aterm>))
    5019             :   {
    5020           0 :     mCRL2log(log::debug) << "check_rule_RegFrm" << std::endl;
    5021           0 :     return false;
    5022             :   }
    5023          60 :   if (!check_term_argument(a[1], check_rule_RegFrm<atermpp::aterm>))
    5024             :   {
    5025           0 :     mCRL2log(log::debug) << "check_rule_RegFrm" << std::endl;
    5026           0 :     return false;
    5027             :   }
    5028             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5029             : 
    5030             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5031          60 :   return true;
    5032             : }
    5033             : 
    5034             : // RegAlt(RegFrm, RegFrm)
    5035             : template <typename Term>
    5036        1797 : bool check_term_RegAlt(const Term& t)
    5037             : {
    5038        1797 :   utilities::mcrl2_unused(t);
    5039             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5040             :   // check the type of the term
    5041        1797 :   const atermpp::aterm& term(t);
    5042        1797 :   if (!term.type_is_appl())
    5043             :   {
    5044           0 :     return false;
    5045             :   }
    5046        1797 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5047        1797 :   if (a.function() != core::detail::function_symbols::RegAlt)
    5048             :   {
    5049        1692 :     return false;
    5050             :   }
    5051             : 
    5052             :   // check the children
    5053         105 :   if (a.size() != 2)
    5054             :   {
    5055           0 :     return false;
    5056             :   }
    5057             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5058         105 :   if (!check_term_argument(a[0], check_rule_RegFrm<atermpp::aterm>))
    5059             :   {
    5060           0 :     mCRL2log(log::debug) << "check_rule_RegFrm" << std::endl;
    5061           0 :     return false;
    5062             :   }
    5063         105 :   if (!check_term_argument(a[1], check_rule_RegFrm<atermpp::aterm>))
    5064             :   {
    5065           0 :     mCRL2log(log::debug) << "check_rule_RegFrm" << std::endl;
    5066           0 :     return false;
    5067             :   }
    5068             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5069             : 
    5070             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5071         105 :   return true;
    5072             : }
    5073             : 
    5074             : // RegTrans(RegFrm)
    5075             : template <typename Term>
    5076        1692 : bool check_term_RegTrans(const Term& t)
    5077             : {
    5078        1692 :   utilities::mcrl2_unused(t);
    5079             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5080             :   // check the type of the term
    5081        1692 :   const atermpp::aterm& term(t);
    5082        1692 :   if (!term.type_is_appl())
    5083             :   {
    5084           0 :     return false;
    5085             :   }
    5086        1692 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5087        1692 :   if (a.function() != core::detail::function_symbols::RegTrans)
    5088             :   {
    5089        1692 :     return false;
    5090             :   }
    5091             : 
    5092             :   // check the children
    5093           0 :   if (a.size() != 1)
    5094             :   {
    5095           0 :     return false;
    5096             :   }
    5097             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5098           0 :   if (!check_term_argument(a[0], check_rule_RegFrm<atermpp::aterm>))
    5099             :   {
    5100           0 :     mCRL2log(log::debug) << "check_rule_RegFrm" << std::endl;
    5101           0 :     return false;
    5102             :   }
    5103             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5104             : 
    5105             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5106           0 :   return true;
    5107             : }
    5108             : 
    5109             : // RegTransOrNil(RegFrm)
    5110             : template <typename Term>
    5111        1868 : bool check_term_RegTransOrNil(const Term& t)
    5112             : {
    5113        1868 :   utilities::mcrl2_unused(t);
    5114             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5115             :   // check the type of the term
    5116        1868 :   const atermpp::aterm& term(t);
    5117        1868 :   if (!term.type_is_appl())
    5118             :   {
    5119           0 :     return false;
    5120             :   }
    5121        1868 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5122        1868 :   if (a.function() != core::detail::function_symbols::RegTransOrNil)
    5123             :   {
    5124          71 :     return false;
    5125             :   }
    5126             : 
    5127             :   // check the children
    5128        1797 :   if (a.size() != 1)
    5129             :   {
    5130           0 :     return false;
    5131             :   }
    5132             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5133        1797 :   if (!check_term_argument(a[0], check_rule_RegFrm<atermpp::aterm>))
    5134             :   {
    5135           0 :     mCRL2log(log::debug) << "check_rule_RegFrm" << std::endl;
    5136           0 :     return false;
    5137             :   }
    5138             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5139             : 
    5140             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5141        1797 :   return true;
    5142             : }
    5143             : 
    5144             : // UntypedRegFrm(String, RegFrm, RegFrm)
    5145             : template <typename Term>
    5146          81 : bool check_term_UntypedRegFrm(const Term& t)
    5147             : {
    5148          81 :   utilities::mcrl2_unused(t);
    5149             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5150             :   // check the type of the term
    5151          81 :   const atermpp::aterm& term(t);
    5152          81 :   if (!term.type_is_appl())
    5153             :   {
    5154           0 :     return false;
    5155             :   }
    5156          81 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5157          81 :   if (a.function() != core::detail::function_symbols::UntypedRegFrm)
    5158             :   {
    5159           0 :     return false;
    5160             :   }
    5161             : 
    5162             :   // check the children
    5163          81 :   if (a.size() != 3)
    5164             :   {
    5165           0 :     return false;
    5166             :   }
    5167             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5168          81 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    5169             :   {
    5170           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    5171           0 :     return false;
    5172             :   }
    5173          81 :   if (!check_term_argument(a[1], check_rule_RegFrm<atermpp::aterm>))
    5174             :   {
    5175           0 :     mCRL2log(log::debug) << "check_rule_RegFrm" << std::endl;
    5176           0 :     return false;
    5177             :   }
    5178          81 :   if (!check_term_argument(a[2], check_rule_RegFrm<atermpp::aterm>))
    5179             :   {
    5180           0 :     mCRL2log(log::debug) << "check_rule_RegFrm" << std::endl;
    5181           0 :     return false;
    5182             :   }
    5183             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5184             : 
    5185             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5186          81 :   return true;
    5187             : }
    5188             : 
    5189             : // ActTrue()
    5190             : template <typename Term>
    5191      190743 : bool check_term_ActTrue(const Term& t)
    5192             : {
    5193      190743 :   utilities::mcrl2_unused(t);
    5194             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5195             :   // check the type of the term
    5196      190743 :   const atermpp::aterm& term(t);
    5197      190743 :   if (!term.type_is_appl())
    5198             :   {
    5199           0 :     return false;
    5200             :   }
    5201      190743 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5202      190743 :   if (a.function() != core::detail::function_symbols::ActTrue)
    5203             :   {
    5204      176804 :     return false;
    5205             :   }
    5206             : 
    5207             :   // check the children
    5208       13939 :   if (a.size() != 0)
    5209             :   {
    5210           0 :     return false;
    5211             :   }
    5212             : 
    5213             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5214       13939 :   return true;
    5215             : }
    5216             : 
    5217             : // ActFalse()
    5218             : template <typename Term>
    5219      176853 : bool check_term_ActFalse(const Term& t)
    5220             : {
    5221      176853 :   utilities::mcrl2_unused(t);
    5222             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5223             :   // check the type of the term
    5224      176853 :   const atermpp::aterm& term(t);
    5225      176853 :   if (!term.type_is_appl())
    5226             :   {
    5227           0 :     return false;
    5228             :   }
    5229      176853 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5230      176853 :   if (a.function() != core::detail::function_symbols::ActFalse)
    5231             :   {
    5232      168716 :     return false;
    5233             :   }
    5234             : 
    5235             :   // check the children
    5236        8137 :   if (a.size() != 0)
    5237             :   {
    5238           0 :     return false;
    5239             :   }
    5240             : 
    5241             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5242        8137 :   return true;
    5243             : }
    5244             : 
    5245             : // ActNot(ActFrm)
    5246             : template <typename Term>
    5247      169172 : bool check_term_ActNot(const Term& t)
    5248             : {
    5249      169172 :   utilities::mcrl2_unused(t);
    5250             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5251             :   // check the type of the term
    5252      169172 :   const atermpp::aterm& term(t);
    5253      169172 :   if (!term.type_is_appl())
    5254             :   {
    5255           0 :     return false;
    5256             :   }
    5257      169172 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5258      169172 :   if (a.function() != core::detail::function_symbols::ActNot)
    5259             :   {
    5260      156343 :     return false;
    5261             :   }
    5262             : 
    5263             :   // check the children
    5264       12829 :   if (a.size() != 1)
    5265             :   {
    5266           0 :     return false;
    5267             :   }
    5268             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5269       12829 :   if (!check_term_argument(a[0], check_rule_ActFrm<atermpp::aterm>))
    5270             :   {
    5271           0 :     mCRL2log(log::debug) << "check_rule_ActFrm" << std::endl;
    5272           0 :     return false;
    5273             :   }
    5274             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5275             : 
    5276             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5277       12829 :   return true;
    5278             : }
    5279             : 
    5280             : // ActAnd(ActFrm, ActFrm)
    5281             : template <typename Term>
    5282      156491 : bool check_term_ActAnd(const Term& t)
    5283             : {
    5284      156491 :   utilities::mcrl2_unused(t);
    5285             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5286             :   // check the type of the term
    5287      156491 :   const atermpp::aterm& term(t);
    5288      156491 :   if (!term.type_is_appl())
    5289             :   {
    5290           0 :     return false;
    5291             :   }
    5292      156491 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5293      156491 :   if (a.function() != core::detail::function_symbols::ActAnd)
    5294             :   {
    5295      154130 :     return false;
    5296             :   }
    5297             : 
    5298             :   // check the children
    5299        2361 :   if (a.size() != 2)
    5300             :   {
    5301           0 :     return false;
    5302             :   }
    5303             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5304        2361 :   if (!check_term_argument(a[0], check_rule_ActFrm<atermpp::aterm>))
    5305             :   {
    5306           0 :     mCRL2log(log::debug) << "check_rule_ActFrm" << std::endl;
    5307           0 :     return false;
    5308             :   }
    5309        2361 :   if (!check_term_argument(a[1], check_rule_ActFrm<atermpp::aterm>))
    5310             :   {
    5311           0 :     mCRL2log(log::debug) << "check_rule_ActFrm" << std::endl;
    5312           0 :     return false;
    5313             :   }
    5314             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5315             : 
    5316             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5317        2361 :   return true;
    5318             : }
    5319             : 
    5320             : // ActOr(ActFrm, ActFrm)
    5321             : template <typename Term>
    5322      154187 : bool check_term_ActOr(const Term& t)
    5323             : {
    5324      154187 :   utilities::mcrl2_unused(t);
    5325             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5326             :   // check the type of the term
    5327      154187 :   const atermpp::aterm& term(t);
    5328      154187 :   if (!term.type_is_appl())
    5329             :   {
    5330           0 :     return false;
    5331             :   }
    5332      154187 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5333      154187 :   if (a.function() != core::detail::function_symbols::ActOr)
    5334             :   {
    5335      153457 :     return false;
    5336             :   }
    5337             : 
    5338             :   // check the children
    5339         730 :   if (a.size() != 2)
    5340             :   {
    5341           0 :     return false;
    5342             :   }
    5343             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5344         730 :   if (!check_term_argument(a[0], check_rule_ActFrm<atermpp::aterm>))
    5345             :   {
    5346           0 :     mCRL2log(log::debug) << "check_rule_ActFrm" << std::endl;
    5347           0 :     return false;
    5348             :   }
    5349         730 :   if (!check_term_argument(a[1], check_rule_ActFrm<atermpp::aterm>))
    5350             :   {
    5351           0 :     mCRL2log(log::debug) << "check_rule_ActFrm" << std::endl;
    5352           0 :     return false;
    5353             :   }
    5354             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5355             : 
    5356             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5357         730 :   return true;
    5358             : }
    5359             : 
    5360             : // ActImp(ActFrm, ActFrm)
    5361             : template <typename Term>
    5362      153457 : bool check_term_ActImp(const Term& t)
    5363             : {
    5364      153457 :   utilities::mcrl2_unused(t);
    5365             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5366             :   // check the type of the term
    5367      153457 :   const atermpp::aterm& term(t);
    5368      153457 :   if (!term.type_is_appl())
    5369             :   {
    5370           0 :     return false;
    5371             :   }
    5372      153457 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5373      153457 :   if (a.function() != core::detail::function_symbols::ActImp)
    5374             :   {
    5375      153457 :     return false;
    5376             :   }
    5377             : 
    5378             :   // check the children
    5379           0 :   if (a.size() != 2)
    5380             :   {
    5381           0 :     return false;
    5382             :   }
    5383             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5384           0 :   if (!check_term_argument(a[0], check_rule_ActFrm<atermpp::aterm>))
    5385             :   {
    5386           0 :     mCRL2log(log::debug) << "check_rule_ActFrm" << std::endl;
    5387           0 :     return false;
    5388             :   }
    5389           0 :   if (!check_term_argument(a[1], check_rule_ActFrm<atermpp::aterm>))
    5390             :   {
    5391           0 :     mCRL2log(log::debug) << "check_rule_ActFrm" << std::endl;
    5392           0 :     return false;
    5393             :   }
    5394             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5395             : 
    5396             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5397           0 :   return true;
    5398             : }
    5399             : 
    5400             : // ActForall(DataVarId+, ActFrm)
    5401             : template <typename Term>
    5402      153504 : bool check_term_ActForall(const Term& t)
    5403             : {
    5404      153504 :   utilities::mcrl2_unused(t);
    5405             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5406             :   // check the type of the term
    5407      153504 :   const atermpp::aterm& term(t);
    5408      153504 :   if (!term.type_is_appl())
    5409             :   {
    5410           0 :     return false;
    5411             :   }
    5412      153504 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5413      153504 :   if (a.function() != core::detail::function_symbols::ActForall)
    5414             :   {
    5415      152693 :     return false;
    5416             :   }
    5417             : 
    5418             :   // check the children
    5419         811 :   if (a.size() != 2)
    5420             :   {
    5421           0 :     return false;
    5422             :   }
    5423             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5424         811 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    5425             :   {
    5426           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    5427           0 :     return false;
    5428             :   }
    5429         811 :   if (!check_term_argument(a[1], check_rule_ActFrm<atermpp::aterm>))
    5430             :   {
    5431           0 :     mCRL2log(log::debug) << "check_rule_ActFrm" << std::endl;
    5432           0 :     return false;
    5433             :   }
    5434             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5435             : 
    5436             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5437         811 :   return true;
    5438             : }
    5439             : 
    5440             : // ActExists(DataVarId+, ActFrm)
    5441             : template <typename Term>
    5442      152721 : bool check_term_ActExists(const Term& t)
    5443             : {
    5444      152721 :   utilities::mcrl2_unused(t);
    5445             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5446             :   // check the type of the term
    5447      152721 :   const atermpp::aterm& term(t);
    5448      152721 :   if (!term.type_is_appl())
    5449             :   {
    5450           0 :     return false;
    5451             :   }
    5452      152721 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5453      152721 :   if (a.function() != core::detail::function_symbols::ActExists)
    5454             :   {
    5455      152350 :     return false;
    5456             :   }
    5457             : 
    5458             :   // check the children
    5459         371 :   if (a.size() != 2)
    5460             :   {
    5461           0 :     return false;
    5462             :   }
    5463             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5464         371 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    5465             :   {
    5466           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    5467           0 :     return false;
    5468             :   }
    5469         371 :   if (!check_term_argument(a[1], check_rule_ActFrm<atermpp::aterm>))
    5470             :   {
    5471           0 :     mCRL2log(log::debug) << "check_rule_ActFrm" << std::endl;
    5472           0 :     return false;
    5473             :   }
    5474             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5475             : 
    5476             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5477         371 :   return true;
    5478             : }
    5479             : 
    5480             : // ActAt(ActFrm, DataExpr)
    5481             : template <typename Term>
    5482      152350 : bool check_term_ActAt(const Term& t)
    5483             : {
    5484      152350 :   utilities::mcrl2_unused(t);
    5485             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5486             :   // check the type of the term
    5487      152350 :   const atermpp::aterm& term(t);
    5488      152350 :   if (!term.type_is_appl())
    5489             :   {
    5490           0 :     return false;
    5491             :   }
    5492      152350 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5493      152350 :   if (a.function() != core::detail::function_symbols::ActAt)
    5494             :   {
    5495      152350 :     return false;
    5496             :   }
    5497             : 
    5498             :   // check the children
    5499           0 :   if (a.size() != 2)
    5500             :   {
    5501           0 :     return false;
    5502             :   }
    5503             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5504           0 :   if (!check_term_argument(a[0], check_rule_ActFrm<atermpp::aterm>))
    5505             :   {
    5506           0 :     mCRL2log(log::debug) << "check_rule_ActFrm" << std::endl;
    5507           0 :     return false;
    5508             :   }
    5509           0 :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    5510             :   {
    5511           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    5512           0 :     return false;
    5513             :   }
    5514             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5515             : 
    5516             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5517           0 :   return true;
    5518             : }
    5519             : 
    5520             : // ActMultAct(Action*)
    5521             : template <typename Term>
    5522      154726 : bool check_term_ActMultAct(const Term& t)
    5523             : {
    5524      154726 :   utilities::mcrl2_unused(t);
    5525             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5526             :   // check the type of the term
    5527      154726 :   const atermpp::aterm& term(t);
    5528      154726 :   if (!term.type_is_appl())
    5529             :   {
    5530           0 :     return false;
    5531             :   }
    5532      154726 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5533      154726 :   if (a.function() != core::detail::function_symbols::ActMultAct)
    5534             :   {
    5535        7508 :     return false;
    5536             :   }
    5537             : 
    5538             :   // check the children
    5539      147218 :   if (a.size() != 1)
    5540             :   {
    5541           0 :     return false;
    5542             :   }
    5543             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5544      147218 :   if (!check_list_argument(a[0], check_rule_Action<atermpp::aterm>, 0))
    5545             :   {
    5546           0 :     mCRL2log(log::debug) << "check_rule_Action" << std::endl;
    5547           0 :     return false;
    5548             :   }
    5549             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5550             : 
    5551             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5552      147218 :   return true;
    5553             : }
    5554             : 
    5555             : // ActionRenameRules(ActionRenameRule*)
    5556             : template <typename Term>
    5557             : bool check_term_ActionRenameRules(const Term& t)
    5558             : {
    5559             :   utilities::mcrl2_unused(t);
    5560             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5561             :   // check the type of the term
    5562             :   const atermpp::aterm& term(t);
    5563             :   if (!term.type_is_appl())
    5564             :   {
    5565             :     return false;
    5566             :   }
    5567             :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5568             :   if (a.function() != core::detail::function_symbols::ActionRenameRules)
    5569             :   {
    5570             :     return false;
    5571             :   }
    5572             : 
    5573             :   // check the children
    5574             :   if (a.size() != 1)
    5575             :   {
    5576             :     return false;
    5577             :   }
    5578             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5579             :   if (!check_list_argument(a[0], check_rule_ActionRenameRule<atermpp::aterm>, 0))
    5580             :   {
    5581             :     mCRL2log(log::debug) << "check_rule_ActionRenameRule" << std::endl;
    5582             :     return false;
    5583             :   }
    5584             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5585             : 
    5586             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5587             :   return true;
    5588             : }
    5589             : 
    5590             : // ActionRenameRule(DataVarId*, DataExpr, ParamIdOrAction, ActionRenameRuleRHS)
    5591             : template <typename Term>
    5592             : bool check_term_ActionRenameRule(const Term& t)
    5593             : {
    5594             :   utilities::mcrl2_unused(t);
    5595             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5596             :   // check the type of the term
    5597             :   const atermpp::aterm& term(t);
    5598             :   if (!term.type_is_appl())
    5599             :   {
    5600             :     return false;
    5601             :   }
    5602             :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5603             :   if (a.function() != core::detail::function_symbols::ActionRenameRule)
    5604             :   {
    5605             :     return false;
    5606             :   }
    5607             : 
    5608             :   // check the children
    5609             :   if (a.size() != 4)
    5610             :   {
    5611             :     return false;
    5612             :   }
    5613             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5614             :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 0))
    5615             :   {
    5616             :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    5617             :     return false;
    5618             :   }
    5619             :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    5620             :   {
    5621             :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    5622             :     return false;
    5623             :   }
    5624             :   if (!check_term_argument(a[2], check_rule_ParamIdOrAction<atermpp::aterm>))
    5625             :   {
    5626             :     mCRL2log(log::debug) << "check_rule_ParamIdOrAction" << std::endl;
    5627             :     return false;
    5628             :   }
    5629             :   if (!check_term_argument(a[3], check_rule_ActionRenameRuleRHS<atermpp::aterm>))
    5630             :   {
    5631             :     mCRL2log(log::debug) << "check_rule_ActionRenameRuleRHS" << std::endl;
    5632             :     return false;
    5633             :   }
    5634             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5635             : 
    5636             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5637             :   return true;
    5638             : }
    5639             : 
    5640             : // ActionRenameSpec(DataSpec, ActSpec, ActionRenameRules)
    5641             : template <typename Term>
    5642             : bool check_term_ActionRenameSpec(const Term& t)
    5643             : {
    5644             :   utilities::mcrl2_unused(t);
    5645             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5646             :   // check the type of the term
    5647             :   const atermpp::aterm& term(t);
    5648             :   if (!term.type_is_appl())
    5649             :   {
    5650             :     return false;
    5651             :   }
    5652             :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5653             :   if (a.function() != core::detail::function_symbols::ActionRenameSpec)
    5654             :   {
    5655             :     return false;
    5656             :   }
    5657             : 
    5658             :   // check the children
    5659             :   if (a.size() != 3)
    5660             :   {
    5661             :     return false;
    5662             :   }
    5663             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5664             :   if (!check_term_argument(a[0], check_rule_DataSpec<atermpp::aterm>))
    5665             :   {
    5666             :     mCRL2log(log::debug) << "check_rule_DataSpec" << std::endl;
    5667             :     return false;
    5668             :   }
    5669             :   if (!check_term_argument(a[1], check_rule_ActSpec<atermpp::aterm>))
    5670             :   {
    5671             :     mCRL2log(log::debug) << "check_rule_ActSpec" << std::endl;
    5672             :     return false;
    5673             :   }
    5674             :   if (!check_term_argument(a[2], check_rule_ActionRenameRules<atermpp::aterm>))
    5675             :   {
    5676             :     mCRL2log(log::debug) << "check_rule_ActionRenameRules" << std::endl;
    5677             :     return false;
    5678             :   }
    5679             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5680             : 
    5681             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5682             :   return true;
    5683             : }
    5684             : 
    5685             : // PBES(DataSpec, GlobVarSpec, PBEqnSpec, PBInit)
    5686             : template <typename Term>
    5687         183 : bool check_term_PBES(const Term& t)
    5688             : {
    5689         183 :   utilities::mcrl2_unused(t);
    5690             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5691             :   // check the type of the term
    5692         183 :   const atermpp::aterm& term(t);
    5693         183 :   if (!term.type_is_appl())
    5694             :   {
    5695           0 :     return false;
    5696             :   }
    5697         183 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5698         183 :   if (a.function() != core::detail::function_symbols::PBES)
    5699             :   {
    5700           0 :     return false;
    5701             :   }
    5702             : 
    5703             :   // check the children
    5704         183 :   if (a.size() != 4)
    5705             :   {
    5706           0 :     return false;
    5707             :   }
    5708             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5709         183 :   if (!check_term_argument(a[0], check_rule_DataSpec<atermpp::aterm>))
    5710             :   {
    5711           0 :     mCRL2log(log::debug) << "check_rule_DataSpec" << std::endl;
    5712           0 :     return false;
    5713             :   }
    5714         183 :   if (!check_term_argument(a[1], check_rule_GlobVarSpec<atermpp::aterm>))
    5715             :   {
    5716           0 :     mCRL2log(log::debug) << "check_rule_GlobVarSpec" << std::endl;
    5717           0 :     return false;
    5718             :   }
    5719         183 :   if (!check_term_argument(a[2], check_rule_PBEqnSpec<atermpp::aterm>))
    5720             :   {
    5721           0 :     mCRL2log(log::debug) << "check_rule_PBEqnSpec" << std::endl;
    5722           0 :     return false;
    5723             :   }
    5724         183 :   if (!check_term_argument(a[3], check_rule_PBInit<atermpp::aterm>))
    5725             :   {
    5726           0 :     mCRL2log(log::debug) << "check_rule_PBInit" << std::endl;
    5727           0 :     return false;
    5728             :   }
    5729             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5730             : 
    5731             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5732         183 :   return true;
    5733             : }
    5734             : 
    5735             : // PBEqnSpec(PBEqn*)
    5736             : template <typename Term>
    5737         183 : bool check_term_PBEqnSpec(const Term& t)
    5738             : {
    5739         183 :   utilities::mcrl2_unused(t);
    5740             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5741             :   // check the type of the term
    5742         183 :   const atermpp::aterm& term(t);
    5743         183 :   if (!term.type_is_appl())
    5744             :   {
    5745           0 :     return false;
    5746             :   }
    5747         183 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5748         183 :   if (a.function() != core::detail::function_symbols::PBEqnSpec)
    5749             :   {
    5750           0 :     return false;
    5751             :   }
    5752             : 
    5753             :   // check the children
    5754         183 :   if (a.size() != 1)
    5755             :   {
    5756           0 :     return false;
    5757             :   }
    5758             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5759         183 :   if (!check_list_argument(a[0], check_rule_PBEqn<atermpp::aterm>, 0))
    5760             :   {
    5761           0 :     mCRL2log(log::debug) << "check_rule_PBEqn" << std::endl;
    5762           0 :     return false;
    5763             :   }
    5764             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5765             : 
    5766             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5767         183 :   return true;
    5768             : }
    5769             : 
    5770             : // PBInit(PropVarInst)
    5771             : template <typename Term>
    5772         183 : bool check_term_PBInit(const Term& t)
    5773             : {
    5774         183 :   utilities::mcrl2_unused(t);
    5775             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5776             :   // check the type of the term
    5777         183 :   const atermpp::aterm& term(t);
    5778         183 :   if (!term.type_is_appl())
    5779             :   {
    5780           0 :     return false;
    5781             :   }
    5782         183 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5783         183 :   if (a.function() != core::detail::function_symbols::PBInit)
    5784             :   {
    5785           0 :     return false;
    5786             :   }
    5787             : 
    5788             :   // check the children
    5789         183 :   if (a.size() != 1)
    5790             :   {
    5791           0 :     return false;
    5792             :   }
    5793             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5794         183 :   if (!check_term_argument(a[0], check_rule_PropVarInst<atermpp::aterm>))
    5795             :   {
    5796           0 :     mCRL2log(log::debug) << "check_rule_PropVarInst" << std::endl;
    5797           0 :     return false;
    5798             :   }
    5799             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5800             : 
    5801             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5802         183 :   return true;
    5803             : }
    5804             : 
    5805             : // PBEqn(FixPoint, PropVarDecl, PBExpr)
    5806             : template <typename Term>
    5807         667 : bool check_term_PBEqn(const Term& t)
    5808             : {
    5809         667 :   utilities::mcrl2_unused(t);
    5810             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5811             :   // check the type of the term
    5812         667 :   const atermpp::aterm& term(t);
    5813         667 :   if (!term.type_is_appl())
    5814             :   {
    5815           0 :     return false;
    5816             :   }
    5817         667 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5818         667 :   if (a.function() != core::detail::function_symbols::PBEqn)
    5819             :   {
    5820           0 :     return false;
    5821             :   }
    5822             : 
    5823             :   // check the children
    5824         667 :   if (a.size() != 3)
    5825             :   {
    5826           0 :     return false;
    5827             :   }
    5828             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5829         667 :   if (!check_term_argument(a[0], check_rule_FixPoint<atermpp::aterm>))
    5830             :   {
    5831           0 :     mCRL2log(log::debug) << "check_rule_FixPoint" << std::endl;
    5832           0 :     return false;
    5833             :   }
    5834         667 :   if (!check_term_argument(a[1], check_rule_PropVarDecl<atermpp::aterm>))
    5835             :   {
    5836           0 :     mCRL2log(log::debug) << "check_rule_PropVarDecl" << std::endl;
    5837           0 :     return false;
    5838             :   }
    5839         667 :   if (!check_term_argument(a[2], check_rule_PBExpr<atermpp::aterm>))
    5840             :   {
    5841           0 :     mCRL2log(log::debug) << "check_rule_PBExpr" << std::endl;
    5842           0 :     return false;
    5843             :   }
    5844             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5845             : 
    5846             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5847         667 :   return true;
    5848             : }
    5849             : 
    5850             : // Mu()
    5851             : template <typename Term>
    5852        4427 : bool check_term_Mu(const Term& t)
    5853             : {
    5854        4427 :   utilities::mcrl2_unused(t);
    5855             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5856             :   // check the type of the term
    5857        4427 :   const atermpp::aterm& term(t);
    5858        4427 :   if (!term.type_is_appl())
    5859             :   {
    5860           0 :     return false;
    5861             :   }
    5862        4427 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5863        4427 :   if (a.function() != core::detail::function_symbols::Mu)
    5864             :   {
    5865         912 :     return false;
    5866             :   }
    5867             : 
    5868             :   // check the children
    5869        3515 :   if (a.size() != 0)
    5870             :   {
    5871           0 :     return false;
    5872             :   }
    5873             : 
    5874             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5875        3515 :   return true;
    5876             : }
    5877             : 
    5878             : // Nu()
    5879             : template <typename Term>
    5880         912 : bool check_term_Nu(const Term& t)
    5881             : {
    5882         912 :   utilities::mcrl2_unused(t);
    5883             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5884             :   // check the type of the term
    5885         912 :   const atermpp::aterm& term(t);
    5886         912 :   if (!term.type_is_appl())
    5887             :   {
    5888           0 :     return false;
    5889             :   }
    5890         912 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5891         912 :   if (a.function() != core::detail::function_symbols::Nu)
    5892             :   {
    5893           0 :     return false;
    5894             :   }
    5895             : 
    5896             :   // check the children
    5897         912 :   if (a.size() != 0)
    5898             :   {
    5899           0 :     return false;
    5900             :   }
    5901             : 
    5902             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5903         912 :   return true;
    5904             : }
    5905             : 
    5906             : // PropVarDecl(String, DataVarId*)
    5907             : template <typename Term>
    5908         668 : bool check_term_PropVarDecl(const Term& t)
    5909             : {
    5910         668 :   utilities::mcrl2_unused(t);
    5911             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5912             :   // check the type of the term
    5913         668 :   const atermpp::aterm& term(t);
    5914         668 :   if (!term.type_is_appl())
    5915             :   {
    5916           0 :     return false;
    5917             :   }
    5918         668 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5919         668 :   if (a.function() != core::detail::function_symbols::PropVarDecl)
    5920             :   {
    5921           0 :     return false;
    5922             :   }
    5923             : 
    5924             :   // check the children
    5925         668 :   if (a.size() != 2)
    5926             :   {
    5927           0 :     return false;
    5928             :   }
    5929             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5930         668 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    5931             :   {
    5932           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    5933           0 :     return false;
    5934             :   }
    5935         668 :   if (!check_list_argument(a[1], check_rule_DataVarId<atermpp::aterm>, 0))
    5936             :   {
    5937           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    5938           0 :     return false;
    5939             :   }
    5940             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    5941             : 
    5942             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5943         668 :   return true;
    5944             : }
    5945             : 
    5946             : // PBESTrue()
    5947             : template <typename Term>
    5948     3037261 : bool check_term_PBESTrue(const Term& t)
    5949             : {
    5950     3037261 :   utilities::mcrl2_unused(t);
    5951             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5952             :   // check the type of the term
    5953     3037261 :   const atermpp::aterm& term(t);
    5954     3037261 :   if (!term.type_is_appl())
    5955             :   {
    5956           0 :     return false;
    5957             :   }
    5958     3037261 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5959     3037261 :   if (a.function() != core::detail::function_symbols::PBESTrue)
    5960             :   {
    5961     3037261 :     return false;
    5962             :   }
    5963             : 
    5964             :   // check the children
    5965           0 :   if (a.size() != 0)
    5966             :   {
    5967           0 :     return false;
    5968             :   }
    5969             : 
    5970             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5971           0 :   return true;
    5972             : }
    5973             : 
    5974             : // PBESFalse()
    5975             : template <typename Term>
    5976     3037261 : bool check_term_PBESFalse(const Term& t)
    5977             : {
    5978     3037261 :   utilities::mcrl2_unused(t);
    5979             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    5980             :   // check the type of the term
    5981     3037261 :   const atermpp::aterm& term(t);
    5982     3037261 :   if (!term.type_is_appl())
    5983             :   {
    5984           0 :     return false;
    5985             :   }
    5986     3037261 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    5987     3037261 :   if (a.function() != core::detail::function_symbols::PBESFalse)
    5988             :   {
    5989     3037261 :     return false;
    5990             :   }
    5991             : 
    5992             :   // check the children
    5993           0 :   if (a.size() != 0)
    5994             :   {
    5995           0 :     return false;
    5996             :   }
    5997             : 
    5998             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    5999           0 :   return true;
    6000             : }
    6001             : 
    6002             : // PBESNot(PBExpr)
    6003             : template <typename Term>
    6004     3038929 : bool check_term_PBESNot(const Term& t)
    6005             : {
    6006     3038929 :   utilities::mcrl2_unused(t);
    6007             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6008             :   // check the type of the term
    6009     3038929 :   const atermpp::aterm& term(t);
    6010     3038929 :   if (!term.type_is_appl())
    6011             :   {
    6012           0 :     return false;
    6013             :   }
    6014     3038929 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6015     3038929 :   if (a.function() != core::detail::function_symbols::PBESNot)
    6016             :   {
    6017     3019673 :     return false;
    6018             :   }
    6019             : 
    6020             :   // check the children
    6021       19256 :   if (a.size() != 1)
    6022             :   {
    6023           0 :     return false;
    6024             :   }
    6025             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6026       19256 :   if (!check_term_argument(a[0], check_rule_PBExpr<atermpp::aterm>))
    6027             :   {
    6028           0 :     mCRL2log(log::debug) << "check_rule_PBExpr" << std::endl;
    6029           0 :     return false;
    6030             :   }
    6031             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6032             : 
    6033             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6034       19256 :   return true;
    6035             : }
    6036             : 
    6037             : // PBESAnd(PBExpr, PBExpr)
    6038             : template <typename Term>
    6039     3075960 : bool check_term_PBESAnd(const Term& t)
    6040             : {
    6041     3075960 :   utilities::mcrl2_unused(t);
    6042             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6043             :   // check the type of the term
    6044     3075960 :   const atermpp::aterm& term(t);
    6045     3075960 :   if (!term.type_is_appl())
    6046             :   {
    6047           0 :     return false;
    6048             :   }
    6049     3075960 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6050     3075960 :   if (a.function() != core::detail::function_symbols::PBESAnd)
    6051             :   {
    6052     2134517 :     return false;
    6053             :   }
    6054             : 
    6055             :   // check the children
    6056      941443 :   if (a.size() != 2)
    6057             :   {
    6058           0 :     return false;
    6059             :   }
    6060             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6061      941443 :   if (!check_term_argument(a[0], check_rule_PBExpr<atermpp::aterm>))
    6062             :   {
    6063           0 :     mCRL2log(log::debug) << "check_rule_PBExpr" << std::endl;
    6064           0 :     return false;
    6065             :   }
    6066      941443 :   if (!check_term_argument(a[1], check_rule_PBExpr<atermpp::aterm>))
    6067             :   {
    6068           0 :     mCRL2log(log::debug) << "check_rule_PBExpr" << std::endl;
    6069           0 :     return false;
    6070             :   }
    6071             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6072             : 
    6073             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6074      941443 :   return true;
    6075             : }
    6076             : 
    6077             : // PBESOr(PBExpr, PBExpr)
    6078             : template <typename Term>
    6079     2184795 : bool check_term_PBESOr(const Term& t)
    6080             : {
    6081     2184795 :   utilities::mcrl2_unused(t);
    6082             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6083             :   // check the type of the term
    6084     2184795 :   const atermpp::aterm& term(t);
    6085     2184795 :   if (!term.type_is_appl())
    6086             :   {
    6087           0 :     return false;
    6088             :   }
    6089     2184795 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6090     2184795 :   if (a.function() != core::detail::function_symbols::PBESOr)
    6091             :   {
    6092     1331068 :     return false;
    6093             :   }
    6094             : 
    6095             :   // check the children
    6096      853727 :   if (a.size() != 2)
    6097             :   {
    6098           0 :     return false;
    6099             :   }
    6100             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6101      853727 :   if (!check_term_argument(a[0], check_rule_PBExpr<atermpp::aterm>))
    6102             :   {
    6103           0 :     mCRL2log(log::debug) << "check_rule_PBExpr" << std::endl;
    6104           0 :     return false;
    6105             :   }
    6106      853727 :   if (!check_term_argument(a[1], check_rule_PBExpr<atermpp::aterm>))
    6107             :   {
    6108           0 :     mCRL2log(log::debug) << "check_rule_PBExpr" << std::endl;
    6109           0 :     return false;
    6110             :   }
    6111             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6112             : 
    6113             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6114      853727 :   return true;
    6115             : }
    6116             : 
    6117             : // PBESImp(PBExpr, PBExpr)
    6118             : template <typename Term>
    6119     1336262 : bool check_term_PBESImp(const Term& t)
    6120             : {
    6121     1336262 :   utilities::mcrl2_unused(t);
    6122             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6123             :   // check the type of the term
    6124     1336262 :   const atermpp::aterm& term(t);
    6125     1336262 :   if (!term.type_is_appl())
    6126             :   {
    6127           0 :     return false;
    6128             :   }
    6129     1336262 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6130     1336262 :   if (a.function() != core::detail::function_symbols::PBESImp)
    6131             :   {
    6132     1251368 :     return false;
    6133             :   }
    6134             : 
    6135             :   // check the children
    6136       84894 :   if (a.size() != 2)
    6137             :   {
    6138           0 :     return false;
    6139             :   }
    6140             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6141       84894 :   if (!check_term_argument(a[0], check_rule_PBExpr<atermpp::aterm>))
    6142             :   {
    6143           0 :     mCRL2log(log::debug) << "check_rule_PBExpr" << std::endl;
    6144           0 :     return false;
    6145             :   }
    6146       84894 :   if (!check_term_argument(a[1], check_rule_PBExpr<atermpp::aterm>))
    6147             :   {
    6148           0 :     mCRL2log(log::debug) << "check_rule_PBExpr" << std::endl;
    6149           0 :     return false;
    6150             :   }
    6151             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6152             : 
    6153             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6154       84894 :   return true;
    6155             : }
    6156             : 
    6157             : // PBESForall(DataVarId+, PBExpr)
    6158             : template <typename Term>
    6159     1257658 : bool check_term_PBESForall(const Term& t)
    6160             : {
    6161     1257658 :   utilities::mcrl2_unused(t);
    6162             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6163             :   // check the type of the term
    6164     1257658 :   const atermpp::aterm& term(t);
    6165     1257658 :   if (!term.type_is_appl())
    6166             :   {
    6167           0 :     return false;
    6168             :   }
    6169     1257658 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6170     1257658 :   if (a.function() != core::detail::function_symbols::PBESForall)
    6171             :   {
    6172     1136426 :     return false;
    6173             :   }
    6174             : 
    6175             :   // check the children
    6176      121232 :   if (a.size() != 2)
    6177             :   {
    6178           0 :     return false;
    6179             :   }
    6180             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6181      121232 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    6182             :   {
    6183           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    6184           0 :     return false;
    6185             :   }
    6186      121232 :   if (!check_term_argument(a[1], check_rule_PBExpr<atermpp::aterm>))
    6187             :   {
    6188           0 :     mCRL2log(log::debug) << "check_rule_PBExpr" << std::endl;
    6189           0 :     return false;
    6190             :   }
    6191             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6192             : 
    6193             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6194      121232 :   return true;
    6195             : }
    6196             : 
    6197             : // PBESExists(DataVarId+, PBExpr)
    6198             : template <typename Term>
    6199     1141255 : bool check_term_PBESExists(const Term& t)
    6200             : {
    6201     1141255 :   utilities::mcrl2_unused(t);
    6202             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6203             :   // check the type of the term
    6204     1141255 :   const atermpp::aterm& term(t);
    6205     1141255 :   if (!term.type_is_appl())
    6206             :   {
    6207           0 :     return false;
    6208             :   }
    6209     1141255 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6210     1141255 :   if (a.function() != core::detail::function_symbols::PBESExists)
    6211             :   {
    6212     1075584 :     return false;
    6213             :   }
    6214             : 
    6215             :   // check the children
    6216       65671 :   if (a.size() != 2)
    6217             :   {
    6218           0 :     return false;
    6219             :   }
    6220             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6221       65671 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    6222             :   {
    6223           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    6224           0 :     return false;
    6225             :   }
    6226       65671 :   if (!check_term_argument(a[1], check_rule_PBExpr<atermpp::aterm>))
    6227             :   {
    6228           0 :     mCRL2log(log::debug) << "check_rule_PBExpr" << std::endl;
    6229           0 :     return false;
    6230             :   }
    6231             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6232             : 
    6233             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6234       65671 :   return true;
    6235             : }
    6236             : 
    6237             : // PropVarInst(String, DataExpr*)
    6238             : template <typename Term>
    6239     1156187 : bool check_term_PropVarInst(const Term& t)
    6240             : {
    6241     1156187 :   utilities::mcrl2_unused(t);
    6242             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6243             :   // check the type of the term
    6244     1156187 :   const atermpp::aterm& term(t);
    6245     1156187 :   if (!term.type_is_appl())
    6246             :   {
    6247           0 :     return false;
    6248             :   }
    6249     1156187 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6250     1156187 :   if (a.function() != core::detail::function_symbols::PropVarInst)
    6251             :   {
    6252       12663 :     return false;
    6253             :   }
    6254             : 
    6255             :   // check the children
    6256     1143524 :   if (a.size() != 2)
    6257             :   {
    6258           0 :     return false;
    6259             :   }
    6260             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6261     1143524 :   if (!check_term_argument(a[0], check_rule_String<atermpp::aterm>))
    6262             :   {
    6263           0 :     mCRL2log(log::debug) << "check_rule_String" << std::endl;
    6264           0 :     return false;
    6265             :   }
    6266     1143524 :   if (!check_list_argument(a[1], check_rule_DataExpr<atermpp::aterm>, 0))
    6267             :   {
    6268           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    6269           0 :     return false;
    6270             :   }
    6271             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6272             : 
    6273             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6274     1143524 :   return true;
    6275             : }
    6276             : 
    6277             : // PRES(DataSpec, GlobVarSpec, PREqnSpec, PRInit)
    6278             : template <typename Term>
    6279           1 : bool check_term_PRES(const Term& t)
    6280             : {
    6281           1 :   utilities::mcrl2_unused(t);
    6282             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6283             :   // check the type of the term
    6284           1 :   const atermpp::aterm& term(t);
    6285           1 :   if (!term.type_is_appl())
    6286             :   {
    6287           0 :     return false;
    6288             :   }
    6289           1 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6290           1 :   if (a.function() != core::detail::function_symbols::PRES)
    6291             :   {
    6292           0 :     return false;
    6293             :   }
    6294             : 
    6295             :   // check the children
    6296           1 :   if (a.size() != 4)
    6297             :   {
    6298           0 :     return false;
    6299             :   }
    6300             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6301           1 :   if (!check_term_argument(a[0], check_rule_DataSpec<atermpp::aterm>))
    6302             :   {
    6303           0 :     mCRL2log(log::debug) << "check_rule_DataSpec" << std::endl;
    6304           0 :     return false;
    6305             :   }
    6306           1 :   if (!check_term_argument(a[1], check_rule_GlobVarSpec<atermpp::aterm>))
    6307             :   {
    6308           0 :     mCRL2log(log::debug) << "check_rule_GlobVarSpec" << std::endl;
    6309           0 :     return false;
    6310             :   }
    6311           1 :   if (!check_term_argument(a[2], check_rule_PREqnSpec<atermpp::aterm>))
    6312             :   {
    6313           0 :     mCRL2log(log::debug) << "check_rule_PREqnSpec" << std::endl;
    6314           0 :     return false;
    6315             :   }
    6316           1 :   if (!check_term_argument(a[3], check_rule_PRInit<atermpp::aterm>))
    6317             :   {
    6318           0 :     mCRL2log(log::debug) << "check_rule_PRInit" << std::endl;
    6319           0 :     return false;
    6320             :   }
    6321             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6322             : 
    6323             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6324           1 :   return true;
    6325             : }
    6326             : 
    6327             : // PREqnSpec(PREqn*)
    6328             : template <typename Term>
    6329           1 : bool check_term_PREqnSpec(const Term& t)
    6330             : {
    6331           1 :   utilities::mcrl2_unused(t);
    6332             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6333             :   // check the type of the term
    6334           1 :   const atermpp::aterm& term(t);
    6335           1 :   if (!term.type_is_appl())
    6336             :   {
    6337           0 :     return false;
    6338             :   }
    6339           1 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6340           1 :   if (a.function() != core::detail::function_symbols::PREqnSpec)
    6341             :   {
    6342           0 :     return false;
    6343             :   }
    6344             : 
    6345             :   // check the children
    6346           1 :   if (a.size() != 1)
    6347             :   {
    6348           0 :     return false;
    6349             :   }
    6350             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6351           1 :   if (!check_list_argument(a[0], check_rule_PREqn<atermpp::aterm>, 0))
    6352             :   {
    6353           0 :     mCRL2log(log::debug) << "check_rule_PREqn" << std::endl;
    6354           0 :     return false;
    6355             :   }
    6356             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6357             : 
    6358             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6359           1 :   return true;
    6360             : }
    6361             : 
    6362             : // PRInit(PropVarInst)
    6363             : template <typename Term>
    6364           1 : bool check_term_PRInit(const Term& t)
    6365             : {
    6366           1 :   utilities::mcrl2_unused(t);
    6367             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6368             :   // check the type of the term
    6369           1 :   const atermpp::aterm& term(t);
    6370           1 :   if (!term.type_is_appl())
    6371             :   {
    6372           0 :     return false;
    6373             :   }
    6374           1 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6375           1 :   if (a.function() != core::detail::function_symbols::PRInit)
    6376             :   {
    6377           0 :     return false;
    6378             :   }
    6379             : 
    6380             :   // check the children
    6381           1 :   if (a.size() != 1)
    6382             :   {
    6383           0 :     return false;
    6384             :   }
    6385             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6386           1 :   if (!check_term_argument(a[0], check_rule_PropVarInst<atermpp::aterm>))
    6387             :   {
    6388           0 :     mCRL2log(log::debug) << "check_rule_PropVarInst" << std::endl;
    6389           0 :     return false;
    6390             :   }
    6391             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6392             : 
    6393             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6394           1 :   return true;
    6395             : }
    6396             : 
    6397             : // PREqn(FixPoint, PropVarDecl, PRExpr)
    6398             : template <typename Term>
    6399           1 : bool check_term_PREqn(const Term& t)
    6400             : {
    6401           1 :   utilities::mcrl2_unused(t);
    6402             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6403             :   // check the type of the term
    6404           1 :   const atermpp::aterm& term(t);
    6405           1 :   if (!term.type_is_appl())
    6406             :   {
    6407           0 :     return false;
    6408             :   }
    6409           1 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6410           1 :   if (a.function() != core::detail::function_symbols::PREqn)
    6411             :   {
    6412           0 :     return false;
    6413             :   }
    6414             : 
    6415             :   // check the children
    6416           1 :   if (a.size() != 3)
    6417             :   {
    6418           0 :     return false;
    6419             :   }
    6420             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6421           1 :   if (!check_term_argument(a[0], check_rule_FixPoint<atermpp::aterm>))
    6422             :   {
    6423           0 :     mCRL2log(log::debug) << "check_rule_FixPoint" << std::endl;
    6424           0 :     return false;
    6425             :   }
    6426           1 :   if (!check_term_argument(a[1], check_rule_PropVarDecl<atermpp::aterm>))
    6427             :   {
    6428           0 :     mCRL2log(log::debug) << "check_rule_PropVarDecl" << std::endl;
    6429           0 :     return false;
    6430             :   }
    6431           1 :   if (!check_term_argument(a[2], check_rule_PRExpr<atermpp::aterm>))
    6432             :   {
    6433           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6434           0 :     return false;
    6435             :   }
    6436             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6437             : 
    6438             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6439           1 :   return true;
    6440             : }
    6441             : 
    6442             : // PRESTrue()
    6443             : template <typename Term>
    6444       38695 : bool check_term_PRESTrue(const Term& t)
    6445             : {
    6446       38695 :   utilities::mcrl2_unused(t);
    6447             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6448             :   // check the type of the term
    6449       38695 :   const atermpp::aterm& term(t);
    6450       38695 :   if (!term.type_is_appl())
    6451             :   {
    6452           0 :     return false;
    6453             :   }
    6454       38695 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6455       38695 :   if (a.function() != core::detail::function_symbols::PRESTrue)
    6456             :   {
    6457       38695 :     return false;
    6458             :   }
    6459             : 
    6460             :   // check the children
    6461           0 :   if (a.size() != 0)
    6462             :   {
    6463           0 :     return false;
    6464             :   }
    6465             : 
    6466             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6467           0 :   return true;
    6468             : }
    6469             : 
    6470             : // PRESFalse()
    6471             : template <typename Term>
    6472       38695 : bool check_term_PRESFalse(const Term& t)
    6473             : {
    6474       38695 :   utilities::mcrl2_unused(t);
    6475             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6476             :   // check the type of the term
    6477       38695 :   const atermpp::aterm& term(t);
    6478       38695 :   if (!term.type_is_appl())
    6479             :   {
    6480           0 :     return false;
    6481             :   }
    6482       38695 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6483       38695 :   if (a.function() != core::detail::function_symbols::PRESFalse)
    6484             :   {
    6485       38695 :     return false;
    6486             :   }
    6487             : 
    6488             :   // check the children
    6489           0 :   if (a.size() != 0)
    6490             :   {
    6491           0 :     return false;
    6492             :   }
    6493             : 
    6494             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6495           0 :   return true;
    6496             : }
    6497             : 
    6498             : // PRESMinus(PRExpr)
    6499             : template <typename Term>
    6500       38737 : bool check_term_PRESMinus(const Term& t)
    6501             : {
    6502       38737 :   utilities::mcrl2_unused(t);
    6503             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6504             :   // check the type of the term
    6505       38737 :   const atermpp::aterm& term(t);
    6506       38737 :   if (!term.type_is_appl())
    6507             :   {
    6508           0 :     return false;
    6509             :   }
    6510       38737 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6511       38737 :   if (a.function() != core::detail::function_symbols::PRESMinus)
    6512             :   {
    6513       38604 :     return false;
    6514             :   }
    6515             : 
    6516             :   // check the children
    6517         133 :   if (a.size() != 1)
    6518             :   {
    6519           0 :     return false;
    6520             :   }
    6521             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6522         133 :   if (!check_term_argument(a[0], check_rule_PRExpr<atermpp::aterm>))
    6523             :   {
    6524           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6525           0 :     return false;
    6526             :   }
    6527             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6528             : 
    6529             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6530         133 :   return true;
    6531             : }
    6532             : 
    6533             : // PRESAnd(PRExpr, PRExpr)
    6534             : template <typename Term>
    6535       39126 : bool check_term_PRESAnd(const Term& t)
    6536             : {
    6537       39126 :   utilities::mcrl2_unused(t);
    6538             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6539             :   // check the type of the term
    6540       39126 :   const atermpp::aterm& term(t);
    6541       39126 :   if (!term.type_is_appl())
    6542             :   {
    6543           0 :     return false;
    6544             :   }
    6545       39126 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6546       39126 :   if (a.function() != core::detail::function_symbols::PRESAnd)
    6547             :   {
    6548       28131 :     return false;
    6549             :   }
    6550             : 
    6551             :   // check the children
    6552       10995 :   if (a.size() != 2)
    6553             :   {
    6554           0 :     return false;
    6555             :   }
    6556             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6557       10995 :   if (!check_term_argument(a[0], check_rule_PRExpr<atermpp::aterm>))
    6558             :   {
    6559           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6560           0 :     return false;
    6561             :   }
    6562       10995 :   if (!check_term_argument(a[1], check_rule_PRExpr<atermpp::aterm>))
    6563             :   {
    6564           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6565           0 :     return false;
    6566             :   }
    6567             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6568             : 
    6569             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6570       10995 :   return true;
    6571             : }
    6572             : 
    6573             : // PRESOr(PRExpr, PRExpr)
    6574             : template <typename Term>
    6575       28663 : bool check_term_PRESOr(const Term& t)
    6576             : {
    6577       28663 :   utilities::mcrl2_unused(t);
    6578             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6579             :   // check the type of the term
    6580       28663 :   const atermpp::aterm& term(t);
    6581       28663 :   if (!term.type_is_appl())
    6582             :   {
    6583           0 :     return false;
    6584             :   }
    6585       28663 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6586       28663 :   if (a.function() != core::detail::function_symbols::PRESOr)
    6587             :   {
    6588       20728 :     return false;
    6589             :   }
    6590             : 
    6591             :   // check the children
    6592        7935 :   if (a.size() != 2)
    6593             :   {
    6594           0 :     return false;
    6595             :   }
    6596             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6597        7935 :   if (!check_term_argument(a[0], check_rule_PRExpr<atermpp::aterm>))
    6598             :   {
    6599           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6600           0 :     return false;
    6601             :   }
    6602        7935 :   if (!check_term_argument(a[1], check_rule_PRExpr<atermpp::aterm>))
    6603             :   {
    6604           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6605           0 :     return false;
    6606             :   }
    6607             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6608             : 
    6609             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6610        7935 :   return true;
    6611             : }
    6612             : 
    6613             : // PRESImp(PRExpr, PRExpr)
    6614             : template <typename Term>
    6615       20792 : bool check_term_PRESImp(const Term& t)
    6616             : {
    6617       20792 :   utilities::mcrl2_unused(t);
    6618             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6619             :   // check the type of the term
    6620       20792 :   const atermpp::aterm& term(t);
    6621       20792 :   if (!term.type_is_appl())
    6622             :   {
    6623           0 :     return false;
    6624             :   }
    6625       20792 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6626       20792 :   if (a.function() != core::detail::function_symbols::PRESImp)
    6627             :   {
    6628       19393 :     return false;
    6629             :   }
    6630             : 
    6631             :   // check the children
    6632        1399 :   if (a.size() != 2)
    6633             :   {
    6634           0 :     return false;
    6635             :   }
    6636             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6637        1399 :   if (!check_term_argument(a[0], check_rule_PRExpr<atermpp::aterm>))
    6638             :   {
    6639           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6640           0 :     return false;
    6641             :   }
    6642        1399 :   if (!check_term_argument(a[1], check_rule_PRExpr<atermpp::aterm>))
    6643             :   {
    6644           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6645           0 :     return false;
    6646             :   }
    6647             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6648             : 
    6649             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6650        1399 :   return true;
    6651             : }
    6652             : 
    6653             : // PRESPlus(PRExpr, PRExpr)
    6654             : template <typename Term>
    6655       19457 : bool check_term_PRESPlus(const Term& t)
    6656             : {
    6657       19457 :   utilities::mcrl2_unused(t);
    6658             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6659             :   // check the type of the term
    6660       19457 :   const atermpp::aterm& term(t);
    6661       19457 :   if (!term.type_is_appl())
    6662             :   {
    6663           0 :     return false;
    6664             :   }
    6665       19457 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6666       19457 :   if (a.function() != core::detail::function_symbols::PRESPlus)
    6667             :   {
    6668       18986 :     return false;
    6669             :   }
    6670             : 
    6671             :   // check the children
    6672         471 :   if (a.size() != 2)
    6673             :   {
    6674           0 :     return false;
    6675             :   }
    6676             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6677         471 :   if (!check_term_argument(a[0], check_rule_PRExpr<atermpp::aterm>))
    6678             :   {
    6679           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6680           0 :     return false;
    6681             :   }
    6682         471 :   if (!check_term_argument(a[1], check_rule_PRExpr<atermpp::aterm>))
    6683             :   {
    6684           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6685           0 :     return false;
    6686             :   }
    6687             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6688             : 
    6689             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6690         471 :   return true;
    6691             : }
    6692             : 
    6693             : // PRESConstantMultiply(DataExpr, PRExpr)
    6694             : template <typename Term>
    6695       19279 : bool check_term_PRESConstantMultiply(const Term& t)
    6696             : {
    6697       19279 :   utilities::mcrl2_unused(t);
    6698             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6699             :   // check the type of the term
    6700       19279 :   const atermpp::aterm& term(t);
    6701       19279 :   if (!term.type_is_appl())
    6702             :   {
    6703           0 :     return false;
    6704             :   }
    6705       19279 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6706       19279 :   if (a.function() != core::detail::function_symbols::PRESConstantMultiply)
    6707             :   {
    6708       12084 :     return false;
    6709             :   }
    6710             : 
    6711             :   // check the children
    6712        7195 :   if (a.size() != 2)
    6713             :   {
    6714           0 :     return false;
    6715             :   }
    6716             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6717        7195 :   if (!check_term_argument(a[0], check_rule_DataExpr<atermpp::aterm>))
    6718             :   {
    6719           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    6720           0 :     return false;
    6721             :   }
    6722        7195 :   if (!check_term_argument(a[1], check_rule_PRExpr<atermpp::aterm>))
    6723             :   {
    6724           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6725           0 :     return false;
    6726             :   }
    6727             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6728             : 
    6729             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6730        7195 :   return true;
    6731             : }
    6732             : 
    6733             : // PRESConstantMultiplyAlt(PRExpr, DataExpr)
    6734             : template <typename Term>
    6735       12084 : bool check_term_PRESConstantMultiplyAlt(const Term& t)
    6736             : {
    6737       12084 :   utilities::mcrl2_unused(t);
    6738             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6739             :   // check the type of the term
    6740       12084 :   const atermpp::aterm& term(t);
    6741       12084 :   if (!term.type_is_appl())
    6742             :   {
    6743           0 :     return false;
    6744             :   }
    6745       12084 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6746       12084 :   if (a.function() != core::detail::function_symbols::PRESConstantMultiplyAlt)
    6747             :   {
    6748       12084 :     return false;
    6749             :   }
    6750             : 
    6751             :   // check the children
    6752           0 :   if (a.size() != 2)
    6753             :   {
    6754           0 :     return false;
    6755             :   }
    6756             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6757           0 :   if (!check_term_argument(a[0], check_rule_PRExpr<atermpp::aterm>))
    6758             :   {
    6759           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6760           0 :     return false;
    6761             :   }
    6762           0 :   if (!check_term_argument(a[1], check_rule_DataExpr<atermpp::aterm>))
    6763             :   {
    6764           0 :     mCRL2log(log::debug) << "check_rule_DataExpr" << std::endl;
    6765           0 :     return false;
    6766             :   }
    6767             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6768             : 
    6769             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6770           0 :   return true;
    6771             : }
    6772             : 
    6773             : // PRESInfimum(DataVarId+, PRExpr)
    6774             : template <typename Term>
    6775       12160 : bool check_term_PRESInfimum(const Term& t)
    6776             : {
    6777       12160 :   utilities::mcrl2_unused(t);
    6778             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6779             :   // check the type of the term
    6780       12160 :   const atermpp::aterm& term(t);
    6781       12160 :   if (!term.type_is_appl())
    6782             :   {
    6783           0 :     return false;
    6784             :   }
    6785       12160 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6786       12160 :   if (a.function() != core::detail::function_symbols::PRESInfimum)
    6787             :   {
    6788       10309 :     return false;
    6789             :   }
    6790             : 
    6791             :   // check the children
    6792        1851 :   if (a.size() != 2)
    6793             :   {
    6794           0 :     return false;
    6795             :   }
    6796             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6797        1851 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    6798             :   {
    6799           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    6800           0 :     return false;
    6801             :   }
    6802        1851 :   if (!check_term_argument(a[1], check_rule_PRExpr<atermpp::aterm>))
    6803             :   {
    6804           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6805           0 :     return false;
    6806             :   }
    6807             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6808             : 
    6809             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6810        1851 :   return true;
    6811             : }
    6812             : 
    6813             : // PRESSupremum(DataVarId+, PRExpr)
    6814             : template <typename Term>
    6815       10391 : bool check_term_PRESSupremum(const Term& t)
    6816             : {
    6817       10391 :   utilities::mcrl2_unused(t);
    6818             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6819             :   // check the type of the term
    6820       10391 :   const atermpp::aterm& term(t);
    6821       10391 :   if (!term.type_is_appl())
    6822             :   {
    6823           0 :     return false;
    6824             :   }
    6825       10391 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6826       10391 :   if (a.function() != core::detail::function_symbols::PRESSupremum)
    6827             :   {
    6828        8525 :     return false;
    6829             :   }
    6830             : 
    6831             :   // check the children
    6832        1866 :   if (a.size() != 2)
    6833             :   {
    6834           0 :     return false;
    6835             :   }
    6836             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6837        1866 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    6838             :   {
    6839           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    6840           0 :     return false;
    6841             :   }
    6842        1866 :   if (!check_term_argument(a[1], check_rule_PRExpr<atermpp::aterm>))
    6843             :   {
    6844           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6845           0 :     return false;
    6846             :   }
    6847             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6848             : 
    6849             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6850        1866 :   return true;
    6851             : }
    6852             : 
    6853             : // PRESSum(DataVarId+, PRExpr)
    6854             : template <typename Term>
    6855        8525 : bool check_term_PRESSum(const Term& t)
    6856             : {
    6857        8525 :   utilities::mcrl2_unused(t);
    6858             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6859             :   // check the type of the term
    6860        8525 :   const atermpp::aterm& term(t);
    6861        8525 :   if (!term.type_is_appl())
    6862             :   {
    6863           0 :     return false;
    6864             :   }
    6865        8525 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6866        8525 :   if (a.function() != core::detail::function_symbols::PRESSum)
    6867             :   {
    6868        8525 :     return false;
    6869             :   }
    6870             : 
    6871             :   // check the children
    6872           0 :   if (a.size() != 2)
    6873             :   {
    6874           0 :     return false;
    6875             :   }
    6876             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6877           0 :   if (!check_list_argument(a[0], check_rule_DataVarId<atermpp::aterm>, 1))
    6878             :   {
    6879           0 :     mCRL2log(log::debug) << "check_rule_DataVarId" << std::endl;
    6880           0 :     return false;
    6881             :   }
    6882           0 :   if (!check_term_argument(a[1], check_rule_PRExpr<atermpp::aterm>))
    6883             :   {
    6884           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6885           0 :     return false;
    6886             :   }
    6887             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6888             : 
    6889             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6890           0 :   return true;
    6891             : }
    6892             : 
    6893             : // PRESEqInf(PRExpr)
    6894             : template <typename Term>
    6895        8539 : bool check_term_PRESEqInf(const Term& t)
    6896             : {
    6897        8539 :   utilities::mcrl2_unused(t);
    6898             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6899             :   // check the type of the term
    6900        8539 :   const atermpp::aterm& term(t);
    6901        8539 :   if (!term.type_is_appl())
    6902             :   {
    6903           0 :     return false;
    6904             :   }
    6905        8539 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6906        8539 :   if (a.function() != core::detail::function_symbols::PRESEqInf)
    6907             :   {
    6908        8390 :     return false;
    6909             :   }
    6910             : 
    6911             :   // check the children
    6912         149 :   if (a.size() != 1)
    6913             :   {
    6914           0 :     return false;
    6915             :   }
    6916             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6917         149 :   if (!check_term_argument(a[0], check_rule_PRExpr<atermpp::aterm>))
    6918             :   {
    6919           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6920           0 :     return false;
    6921             :   }
    6922             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6923             : 
    6924             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6925         149 :   return true;
    6926             : }
    6927             : 
    6928             : // PRESEqNInf(PRExpr)
    6929             : template <typename Term>
    6930        8417 : bool check_term_PRESEqNInf(const Term& t)
    6931             : {
    6932        8417 :   utilities::mcrl2_unused(t);
    6933             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6934             :   // check the type of the term
    6935        8417 :   const atermpp::aterm& term(t);
    6936        8417 :   if (!term.type_is_appl())
    6937             :   {
    6938           0 :     return false;
    6939             :   }
    6940        8417 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6941        8417 :   if (a.function() != core::detail::function_symbols::PRESEqNInf)
    6942             :   {
    6943        8147 :     return false;
    6944             :   }
    6945             : 
    6946             :   // check the children
    6947         270 :   if (a.size() != 1)
    6948             :   {
    6949           0 :     return false;
    6950             :   }
    6951             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6952         270 :   if (!check_term_argument(a[0], check_rule_PRExpr<atermpp::aterm>))
    6953             :   {
    6954           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6955           0 :     return false;
    6956             :   }
    6957             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6958             : 
    6959             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    6960         270 :   return true;
    6961             : }
    6962             : 
    6963             : // PRESCondSm(PRExpr, PRExpr, PRExpr)
    6964             : template <typename Term>
    6965        8148 : bool check_term_PRESCondSm(const Term& t)
    6966             : {
    6967        8148 :   utilities::mcrl2_unused(t);
    6968             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    6969             :   // check the type of the term
    6970        8148 :   const atermpp::aterm& term(t);
    6971        8148 :   if (!term.type_is_appl())
    6972             :   {
    6973           0 :     return false;
    6974             :   }
    6975        8148 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    6976        8148 :   if (a.function() != core::detail::function_symbols::PRESCondSm)
    6977             :   {
    6978        8143 :     return false;
    6979             :   }
    6980             : 
    6981             :   // check the children
    6982           5 :   if (a.size() != 3)
    6983             :   {
    6984           0 :     return false;
    6985             :   }
    6986             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    6987           5 :   if (!check_term_argument(a[0], check_rule_PRExpr<atermpp::aterm>))
    6988             :   {
    6989           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6990           0 :     return false;
    6991             :   }
    6992           5 :   if (!check_term_argument(a[1], check_rule_PRExpr<atermpp::aterm>))
    6993             :   {
    6994           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    6995           0 :     return false;
    6996             :   }
    6997           5 :   if (!check_term_argument(a[2], check_rule_PRExpr<atermpp::aterm>))
    6998             :   {
    6999           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    7000           0 :     return false;
    7001             :   }
    7002             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    7003             : 
    7004             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    7005           5 :   return true;
    7006             : }
    7007             : 
    7008             : // PRESCondEq(PRExpr, PRExpr, PRExpr)
    7009             : template <typename Term>
    7010        8220 : bool check_term_PRESCondEq(const Term& t)
    7011             : {
    7012        8220 :   utilities::mcrl2_unused(t);
    7013             : #ifndef MCRL2_NO_SOUNDNESS_CHECKS
    7014             :   // check the type of the term
    7015        8220 :   const atermpp::aterm& term(t);
    7016        8220 :   if (!term.type_is_appl())
    7017             :   {
    7018           0 :     return false;
    7019             :   }
    7020        8220 :   const atermpp::aterm_appl& a = atermpp::down_cast<atermpp::aterm_appl>(term);
    7021        8220 :   if (a.function() != core::detail::function_symbols::PRESCondEq)
    7022             :   {
    7023        7871 :     return false;
    7024             :   }
    7025             : 
    7026             :   // check the children
    7027         349 :   if (a.size() != 3)
    7028             :   {
    7029           0 :     return false;
    7030             :   }
    7031             : #ifndef MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    7032         349 :   if (!check_term_argument(a[0], check_rule_PRExpr<atermpp::aterm>))
    7033             :   {
    7034           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    7035           0 :     return false;
    7036             :   }
    7037         349 :   if (!check_term_argument(a[1], check_rule_PRExpr<atermpp::aterm>))
    7038             :   {
    7039           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    7040           0 :     return false;
    7041             :   }
    7042         349 :   if (!check_term_argument(a[2], check_rule_PRExpr<atermpp::aterm>))
    7043             :   {
    7044           0 :     mCRL2log(log::debug) << "check_rule_PRExpr" << std::endl;
    7045           0 :     return false;
    7046             :   }
    7047             : #endif // MCRL2_NO_RECURSIVE_SOUNDNESS_CHECKS
    7048             : 
    7049             : #endif // MCRL2_NO_SOUNDNESS_CHECKS
    7050         349 :   return true;
    7051             : }
    7052             : //--- end generated code ---//
    7053             : 
    7054             : } // namespace detail
    7055             : 
    7056             : } // namespace core
    7057             : 
    7058             : } // namespace mcrl2
    7059             : #endif // MCRL2_CORE_DETAIL_SOUNDNESS_CHECKS_H

Generated by: LCOV version 1.14