private static void WriteNext(Module module)
        {
            string op = "";

            //write turn
            op += TVariables.VariableNext(module.Turn);
            //if there is arb, seq or max strategy
            if (module.HasArbitraryStrategy || module.HasSequenceStrategy || module.HasMaxStrategy)
            {
                op += TVariables.VariableNext(module.Count);
            }
            //execution strategy variables, e.g. choice
            foreach (var strategy in module.ExecutionStrategies)
            {
                foreach (var variable in strategy.CustomVars)
                {
                    op += TVariables.VariableNext(variable);
                }
            }
            // model variables
            foreach (var variable in module.Variables)
            {
                if (variable.Behaviour == VariableBehaviour.REWRITING)
                {
                    op += TVariables.VariableNext(variable);
                }
            }
            Writer.WriteLine(op);
        }
        private static void WriteStatusNext(Module module)
        {
            string op = "";

            if (!module.HasDivisionRule)
            {
                op += TVariables.VariableNext(module.Status);
            }
            Writer.WriteLine(op);
        }
        private static void WriteMain(SMVModel nuSMV)
        {
            TUtil.AddDashedComment("MAIN");
            string op = SMVKeys.MODULE + " " + SMVKeys.MAIN + "\n";

            op += SMVKeys.VAR + "\n";
            //write synch,and PStep vars at first.
            op += TVariables.VariableDefinition(nuSMV.MainModule.Synch);
            op += TVariables.VariableDefinition(nuSMV.MainModule.PStep);

            //write instances
            foreach (var module in nuSMV.Modules)
            {
                //parent instance
                op += TVariables.Instances(module.Instance);
                //if exists, then child instances
                if (module.HasDivisionRule)
                {
                    foreach (var childInstance in module.ChildInstances)
                    {
                        op += TVariables.Instances(childInstance);
                    }
                }
            }
            op += SMVKeys.ASSIGN + "\n";

            //write init of synch and PStep vars
            op += TVariables.InitVariable(nuSMV.MainModule.Synch);
            op += TVariables.InitVariable(nuSMV.MainModule.PStep);

            //write next of synch and PStep vars
            op += TVariables.VariableNext(nuSMV.MainModule.Synch);
            op += TVariables.VariableNext(nuSMV.MainModule.PStep);

            Writer.WriteLine(op);
        }