Foundational and Practical Aspects of Resource Analysis