A method for configuring a network comprising: receiving, by a processor, a plurality of network policy graphs in response to corresponding input from a plurality of users, wherein each of the network policy graphs comprises two or more endpoint group nodes, EPGs, the EPGs corresponding to one or more addressable endpoints in the network that can perform a common logical role or share a common property, connected by directed edges, the directed edges corresponding to directed paths in the network, wherein the directed paths are defined between a source EPG and a sink EPG, and wherein a directed path starts from the source EPG traversing one or more policy boxes and ending at the sink EPG, wherein each of the network policy graphs specifies policies, requirements and service logic and wherein the network policy graphs are defined using a policy graph abstraction, PGA, as an intuitive graph model to specify policies, requirements and service logic and wherein each network policy graph describes a local topology between the EPGs and policy boxes, the policy boxes referring to network functionality that can be chained together, wherein the network policy graphs are to be combined to generate a composite network policy graph; converting the plurality of network policy graphs into corresponding statements in a network programming language; generating, by the processor, composite endpoint groups by analyzing the overlaps between the endpoint group nodes; generating, by the processor, composite paths based on the relationships between the endpoints and the network policy graphs; generating, by the processor, the composite network policy graph based on the composite endpoint groups and the composite paths; and analyzing, by the processor, the composite network policy graph or the network policy graphs to determine conflicts or errors and generating an error message to correct the policy graph if conflicts or errors are detected; wherein generating the composite endpoint groups comprises splitting a union of two or more of the EPGs when the EPGs overlap. receiving, by a processor, a plurality of network policy graphs in response to corresponding input from a plurality of users, wherein each of the network policy graphs comprises two or more endpoint group nodes, EPGs, the EPGs corresponding to one or more addressable endpoints in the network that can perform a common logical role or share a common property, connected by directed edges, the directed edges corresponding to directed paths in the network, wherein the directed paths are defined between a source EPG and a sink EPG, and wherein a directed path starts from the source EPG traversing one or more policy boxes and ending at the sink EPG, wherein each of the network policy graphs specifies policies, requirements and service logic and wherein the network policy graphs are defined using a policy graph abstraction, PGA, as an intuitive graph model to specify policies, requirements and service logic and wherein each network policy graph describes a local topology between the EPGs and policy boxes, the policy boxes referring to network functionality that can be chained together, wherein the network policy graphs are to be combined to generate a composite network policy graph; converting the plurality of network policy graphs into corresponding statements in a network programming language; generating, by the processor, composite endpoint groups by analyzing the overlaps between the endpoint group nodes; generating, by the processor, composite paths based on the relationships between the endpoints and the network policy graphs; generating, by the processor, the composite network policy graph based on the composite endpoint groups and the composite paths; and analyzing, by the processor, the composite network policy graph or the network policy graphs to determine conflicts or errors and generating an error message to correct the policy graph if conflicts or errors are detected; wherein generating the composite endpoint groups comprises splitting a union of two or more of the EPGs when the EPGs overlap.