/// <summary>
        /// Prints the function's memory.
        /// Called by <see cref="QuadrupleManager.ExitFunction"/>.
        /// </summary>
        /// <param name="id"></param>
        public void PrintMemory(string id)
        {
            Debug.WriteLine("--- START LOCAL MEMORY [" + id + "] --- ");
            Debug.WriteLine("\t>--- GLOBAL ---< ");
            foreach (KeyValuePair <int, object> kvp in memoryGlobal)
            {
                Debug.WriteLine("\t" + kvp.Key + "[" + SemanticCubeUtilities.GetDataTypeFromType(kvp.Value.GetType()).ToString() + "]" + " -> " + kvp.Value.ToString());
            }

            Debug.WriteLine("\n\t>--- TEMPORARY ---< ");
            foreach (KeyValuePair <int, object> kvp in memoryTemporary)
            {
                Debug.WriteLine("\t" + kvp.Key + "[" + SemanticCubeUtilities.GetDataTypeFromType(kvp.Value.GetType()).ToString() + "]" + " -> " + kvp.Value.ToString());
            }
            Debug.WriteLine("--- END LOCAL MEMORY [" + id + "] --- \n");
        }
        /// <summary>
        /// Prints the memory addresses allocated in main memory.
        /// Called by <see cref="CodeView"/> before execution and by
        /// <see cref="CanvasView"/> after execution.
        /// </summary>
        public static void PrintMemory()
        {
            Debug.WriteLine("--- START GLOBAL MEMORY ---");

            Debug.WriteLine("\n");
            Debug.WriteLine(">--- GLOBAL ASSETS---< ");
            foreach (KeyValuePair <int, object> kvp in memoryGlobalAssets)
            {
                Debug.WriteLine(kvp.Key + "[" + SemanticCubeUtilities.GetDataTypeFromType(kvp.Value.GetType()).ToString() + "]" + " -> " + kvp.Value.ToString());
            }

            Debug.WriteLine("\n");
            Debug.WriteLine(">--- GLOBAL VARIABLES---< ");
            foreach (KeyValuePair <int, object> kvp in memoryGlobal)
            {
                Debug.WriteLine(kvp.Key + "[" + SemanticCubeUtilities.GetDataTypeFromType(kvp.Value.GetType()).ToString() + "]" + " -> " + kvp.Value.ToString());
            }

            Debug.WriteLine("\n");
            Debug.WriteLine(">--- LOCAL ---< ");
            foreach (KeyValuePair <int, object> kvp in memoryLocal)
            {
                if (kvp.Value == null)
                {
                    Debug.WriteLine(kvp.Key + "[" + "NULL" + "]" + " -> " + "NULL");
                }
                else
                {
                    Debug.WriteLine(kvp.Key + "[" + SemanticCubeUtilities.GetDataTypeFromType(kvp.Value.GetType()).ToString() + "]" + " -> " + kvp.Value.ToString());
                }
            }

            Debug.WriteLine("\n");
            Debug.WriteLine(">--- TEMPORARY ---< ");
            foreach (KeyValuePair <int, object> kvp in memoryTemporary)
            {
                Debug.WriteLine(kvp.Key + "[" + SemanticCubeUtilities.GetDataTypeFromType(kvp.Value.GetType()).ToString() + "]" + " -> " + kvp.Value.ToString());
            }

            Debug.WriteLine("\n");
            Debug.WriteLine(">--- CONSTANT ---< ");
            foreach (KeyValuePair <int, object> kvp in memoryConstant)
            {
                Debug.WriteLine(kvp.Key + "[" + SemanticCubeUtilities.GetDataTypeFromType(kvp.Value.GetType()).ToString() + "]" + " -> " + kvp.Value.ToString());
            }
            Debug.WriteLine("--- END GLOBAL MEMORY ---");
        }