Apple keeps frameworks in /System/Library/Frameworks/ and /System/Library/PrivateFrameworks/. Inside these directories are *.framework files, which are themselves a directory of computing resources (binary executables, dynamically linked libaries, headers, etc.).
How can I list which frameworks are being currently used by the system, e.g. have a component loaded in kernel memory or are being executed? Is there a way to understand what frameworks are required for a given program, such as a daemon or app, to run properly? If possible I'd like to generate a framework dependency tree for an arbitrarily chosen system program.
I have tried to gather this information from top
but this doesn't tell me about dynamically loaded libraries, nor does it explicitly tie an executable to the framework directory from which it comes.