Interaction between microcracks and a main crack in a semi-infinite medium