public static Component findHashComponent(IDictionary <string, int> actualParametersTop, AbstractComponentFunctorApplication acfaRef)
        {
            Console.WriteLine("FIND HASH COMPONENT: " + acfaRef.Id_functor_app + " === " + acfaRef.Id_abstract);
            IList <SupplyParameter> spdao_list = BackEnd.spdao.list(acfaRef.Id_functor_app);

            foreach (SupplyParameter par in spdao_list)
            {
                if (par is SupplyParameterComponent)
                {
                    Console.WriteLine("PAR-C " + ((SupplyParameterComponent)par).Id_functor_app_actual);
                }
                else
                {
                    Console.WriteLine("PAR-P " + ((SupplyParameterParameter)par).Id_parameter);
                }
            }

            Component c;

            if (acfaRef.ParametersList.Count == 0)
            {
                if (cache.TryGetValue(acfaRef.Id_functor_app, out c))
                {
                    return(c);
                }
            }

            TreeNode root = GenerateTree.generate(actualParametersTop, acfaRef);

            Resolution.sort(root);

            TreeNode tn = root;

            while (tn != null)
            {
                Trace.Write(tn.Functor_app.Id_abstract + "@" + tn.GetHashCode() + "->");
                tn = tn.Next;
            }

            writeTreeNode(root);

            Console.WriteLine("AFTER Resolution.sort(root)");

            c = Resolution.tryGeneralize(root, root);

            Console.WriteLine("AFTER Resolution.tryGeneralize(root, root) --- " + (c == null));

            if (acfaRef.ParametersList.Count == 0)
            {
                cache.Add(acfaRef.Id_functor_app, c);
            }

            Console.WriteLine("FINISH - FIND HASH COMPONENT");

            return(BackEnd.cdao.retrieve_libraryPath(c.Library_path));;             // if c is null, there is not an implementation ....
        }
        public static Component[] findHashComponentAll(AbstractComponentFunctorApplication acfaRef)
        {
            try
            {
                Connector.openConnection();

                Console.WriteLine("FIND HASH COMPONENT ALL: " + acfaRef.Id_functor_app);

                Component[] cAll;

                TreeNode root = GenerateTree.generate(new Dictionary <string, int>(), acfaRef);

                Resolution.sort(root);

                TreeNode tn = root;
                while (tn != null)
                {
                    Trace.Write(tn.Functor_app.Id_abstract + "@" + tn.GetHashCode() + "->");
                    tn = tn.Next;
                }

                writeTreeNode(root);

                Console.WriteLine("AFTER Resolution.sort(root) - ALL");

                cAll = Resolution.tryGeneralizeAll(root, root);

                Console.WriteLine("AFTER Resolution.tryGeneralize(root, root) - ALL");

                return(cAll);        // if c is null, there is not an implementation ....
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                Connector.closeConnection();
            }
        }