Viable set computation for hybrid systems