private BehavioralAnalyzer(DesignContext context)
        {
            _context = context;
            context.InvalidateUniverse();
            foreach (Component component in context.Components)
            {
                component.Descriptor.Package = GetPackageDescriptor(component.GetType());
                FactUniverse.Instance.AddType(component.GetType());
            }

            IList<Process> processes = context.Processes;
            foreach (Process process in processes)
            {
                if (process.Owner.Descriptor.HasForeignImplementation ||
                    process.IsDoNotAnalyze)
                    continue;

                //if (process.InitialAction.IsAsync())
                //    FactUniverse.Instance.AddMethod(process.InitialAction.Method);
                //var entryPoint = process.InitialAction.UnwrapEntryPoint();
                FactUniverse.Instance.AddMethod(process.InitialAction.Method);
                FactUniverse.Instance.GetFacts(process.InitialAction.Method).
                    RegisterThisCandidate(new ConstObjectSource(process.InitialAction.Target));
#if false
                TransactingComponent.TATarget[] coFSMs = process.GetCoFSMs();
                if (coFSMs != null)
                {
                    foreach (TransactingComponent.TATarget coFSM in coFSMs)
                    {
                        foreach (TAVerb verb in coFSM.NeutralTA)
                        {
                            FactUniverse.Instance.AddMethod(verb.Op.Method);
                        }
                    }
                }
#endif
            }
            FactUniverse.Instance.Complete();
            
            foreach (Process process in processes)
            {
                if (process.Owner.Descriptor.HasForeignImplementation ||
                    process.IsDoNotAnalyze)
                    continue;
                if (process.AnalysisGeneration < context.CurrentRefinementCycle)
                    continue;
                AnalyzeProcess(process);
            }

            ProcessMethodWorkSet();
            PostProcess();

            //SubprogramsDontDriveSignals sdds = new SubprogramsDontDriveSignals();
            //sdds.ApplyTo(context);
        }
        private BehavioralAnalyzer(DesignContext context)
        {
            _context = context;
            context.InvalidateUniverse();
            foreach (Component component in context.Components)
            {
                component.Descriptor.Package = GetPackageDescriptor(component.GetType());
                FactUniverse.Instance.AddType(component.GetType());
            }

            IList <Process> processes = context.Processes;

            foreach (Process process in processes)
            {
                if (process.Owner.Descriptor.HasForeignImplementation ||
                    process.IsDoNotAnalyze)
                {
                    continue;
                }

                //if (process.InitialAction.IsAsync())
                //    FactUniverse.Instance.AddMethod(process.InitialAction.Method);
                //var entryPoint = process.InitialAction.UnwrapEntryPoint();
                FactUniverse.Instance.AddMethod(process.InitialAction.Method);
                FactUniverse.Instance.GetFacts(process.InitialAction.Method).
                RegisterThisCandidate(new ConstObjectSource(process.InitialAction.Target));
#if false
                TransactingComponent.TATarget[] coFSMs = process.GetCoFSMs();
                if (coFSMs != null)
                {
                    foreach (TransactingComponent.TATarget coFSM in coFSMs)
                    {
                        foreach (TAVerb verb in coFSM.NeutralTA)
                        {
                            FactUniverse.Instance.AddMethod(verb.Op.Method);
                        }
                    }
                }
#endif
            }
            FactUniverse.Instance.Complete();

            foreach (Process process in processes)
            {
                if (process.Owner.Descriptor.HasForeignImplementation ||
                    process.IsDoNotAnalyze)
                {
                    continue;
                }
                if (process.AnalysisGeneration < context.CurrentRefinementCycle)
                {
                    continue;
                }
                AnalyzeProcess(process);
            }

            ProcessMethodWorkSet();
            PostProcess();

            //SubprogramsDontDriveSignals sdds = new SubprogramsDontDriveSignals();
            //sdds.ApplyTo(context);
        }