A hierarchical approach for designing dependable system