Generation of program synchronization skeletons using declarative descriptions of interaction protocols