basic forward analysis and backward analysis