Hierarchical Modeling and Architecture Optimization: Review and Unified Framework