modify to let WITH-SHARED-MEMORY statement to take expressions as its dimensions, not only int literals