A model of higher-order concurrent programs based on graph rewriting