Hierarchical modeling and analysis of embedded systems