Beispiel #1
0
        private bool IsHiddenStatement(string methodName, ArmadaStatement stmt)
        {
            if (stmt is ArmadaUpdateStatement aus)
            {
                var us = (UpdateStmt)aus.Stmt;
                return(us.Lhss.All(lhs => IsVariableHidden(methodName, AH.GetLValueRootVariable(lhs))));
            }
            else if (stmt is ArmadaSomehowStatement ashs)
            {
                var shs = (SomehowStmt)ashs.Stmt;
                return(shs.Mod.Expressions.Any() &&
                       shs.Mod.Expressions.All(lhs => IsVariableHidden(methodName, AH.GetLValueRootVariable(lhs))));
            }
            else if (stmt is ArmadaVarDeclStatement avds)
            {
                var vds = (VarDeclStmt)avds.Stmt;
                return(vds.Locals.All(v => IsVariableHidden(methodName, v.Name)));
            }

            return(false);
        }