private static void PrintNuSMV(SMVModel nuSMV, KpMetaModel kpMetaModel, Experiment kpx, string outFileName)
        {
            //instantiate output file, otherwise to console
            Writer.FileName = outFileName;
            Writer.CleanFile(outFileName);
            bool firstModule = true;

            foreach (var module in nuSMV.Modules)
            {
                if (!firstModule)
                {
                    TUtil.AddDashedComment(module.Type.ToUpper());
                }
                WriteModule(module);
                WriteVariables(module);
                WriteINVAR(module);
                WriteInit(module);
                if (!module.HasDivisionRule && module.HasDissolutionRule)
                {
                    WriteStatusNext(module);
                }

                WriteNext(module);

                firstModule = false;
            }
            WriteMain(nuSMV);
            WriteStatusAndCommuncationNext(nuSMV);
            WriteProperties(kpx, kpMetaModel);
        }
        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);
        }