Structuring logic programs: a modal approach