PROLOG / All paths in a directed graph with loops
I've got the following diagram given:

[Diagram here](http://homepages-nw.uni-regensburg.de/~yae11275/unii/Simple_Model2.pdf)

The first gateway/connector is an OR-gateway/connector (it has a circle in it). The gateway/connector with a 'x' in it is a XOR-gateway/connector. 

An OR-gateway specifies that one or more of the available paths will be taken. 
An XOR-gateway represents a decision to take exactly one path in the flow.

I need to transform this diagram to PROLOG in order to get all possible paths from node 1 to node 8 but I have problems to code the OR-gateway and to find all possible paths. 

How can I transform this diagram easily to Prolog and how can i find all possible paths respecting the gateways between two nodes? 

Thank you for answers in advance. 
PROLOG / All paths in a directed graph with loops
===

I've got the following diagram given:

[Diagram here](http://homepages-nw.uni-regensburg.de/~yae11275/unii/Simple_Model2.pdf)

The first gateway/connector is an OR-gateway/connector (it has a circle in it). The gateway/connector with a 'x' in it is a XOR-gateway/connector. 

An OR-gateway specifies that one or more of the available paths will be taken. 
An XOR-gateway represents a decision to take exactly one path in the flow.

I need to transform this diagram to PROLOG in order to get all possible paths from node 1 to node 8 but I have problems to code the OR-gateway and to find all possible paths. 

How can I transform this diagram easily to Prolog and how can i find all possible paths respecting the gateways between two nodes? 

Thank you for answers in advance. 