INSERT { ?arc rdf:type wse:Arc. ?i1 rdf:type wse:Vertex. ?i2 rdf:type wse:Vertex. ?arc wse:tail ?i1. ?arc wse:head ?i2. ?arc wse:hasOperation ?s1. } WHERE{ ?s1 rdf:type wse:AtomicProcess. ?s1 wse:hasInput ?i1. ?s1 wse:hasOutput ?o1. ?s2 rdf:type wse:AtomicProcess. ?s2 wse:hasInput ?i2. ?s2 wse:hasOutput ?o2. ?m rdf:type wse:SemanticMatching. ?m wse:sourceParameter ?o1. ?m wse:targetParameter ?i2. BIND(IRI(CONCAT(STRBEFORE(STR(?s1),“#”),“#”, STRAFTER(STR(?i1),“#”),“-”, STRAFTER(STR(?i2),“#”))) AS? arc). } | For all atomic processes (?s), the input (?i) and output (?o) of ?sis expressed by triples, (?s, wse:hasInput, ?i) and (?s, wse:hasOutput, ?o), respectively. Let ?i1 and ?o1 refer to the input and output parameters of atomic process ?s1, and let ?i2 and ?o2 refer to the input and output parameters of atomic process ?s2. If there exists matching instance ?m that maps parameters from ?o1 to ?i2, then ?arc is created as the arc of WS dependency graph. ?i1 and ?i2 are expressed as vertices of a graph via triples (?i1, rdf:type, wse:Vertex) and (?i2, rdf:type, wse:Vertex) and are constructed as the tail and head of ?arc via triples (?arc, wse:tail, ?i1) and (?arc, wse:head, ?i2). Finally, atomic process ?s1 is added into the redundant operation set of ?arc via a triple (?arc, wse:hasOperation ?s1). |