# Integrating ISA and Part-of Domain Knowledge into Process Model Discovery
## 5 Knowledge-Based Abstraction Operations
### Main Issues  
_Abstraction_, according to the terminology we specified in the Introduction (Section 1), allows one to \"move upwards\", and thus obtain a higher-level view of a process model, where details are ignored. In the case of ISA relationships (e.g., _\"r-TPA Proc\"_ ISA _\"Treatment\"_), a specific activity (or class of activities) can be replaced by the class of activities containing it (e.g., _\"r-TPA Proc\"_ can be abstracted into _\"Treatment\"_). In the case of part-of relationships (e.g., _\"r-TPA Pre\"_, _\"r-TPA\"_) part-of _\"r-TPA Proc\"_), a set of activities (or classes of activities) can be replaced by the class of activities they constitute (e.g., _\"r-TPA Pre\"_ and _\"r-TPA\"_ can be replaced by _\"r-TPA Proc\"_). Informally, in a process model _PM_ (which is represented, in our approach, by a graph), an abstraction step considering an ISA relationship \(A_{\textbf{1}}\)**ISA \(A\) consists of:  
(ISA_1) the retrieval in _PM_ of all the occurrences of \(A_{\textbf{1}}\);  
(ISA_2) the replacement of such occurrences with \(A\). While an abstraction step considering a part-of relationship \(\{A_{\textbf{1}},\ldots,A_{\textbf{k}}\}\)**part-of**_A_ consists of:(POF_1) the retrieval in \(PM\) of all the occurrences of paths containing all and only the nodes \(A_{1}\),..., \(A_{k}\) (all the possible orderings of \(A_{1}\),..., \(A_{k}\) are admitted);  
(POF_2) the replacement of such occurrences with \(A\). Notably, the definition of step POF_2 above involves the treatment of two critical issues: (i1) how to manage \"intersecting paths\", and  
(i2) how to deal with \"conflicts\". **Definition 1**. : _Given a path \(p=<\)\(A_{1}\to A_{2}\rightarrow\ldots\to A_{k}\)? in graph \(G\), we call the intersecting paths all those paths in \(G\) that \"cross\" P, i.e., that have an \"entering\" arc \(I\to A_{i}\) (\(1\leq i\leq k\), and \(I\
otin P\)) and an \"exiting\" arc \(A_{j}\to O\) (\(1\leq j\leq k\), and \(O\
otin P\)), except paths where, simultaneously, \(i=1\) and \(j=k\) (i.e., paths fully including \(P\) are excluded)._  
For example, given the graph in Figure 5A, paths... \(I_{1}\to A_{1}\to A_{2}\to O_{1}\ldots\) and... \(I_{2}\to A_{2}\to O_{1}\ldots\) are, among many others, intersecting paths of \(p=<\)\(A_{1}\to A_{2}\rightarrow\ldots\to A_{k}\)?. The easiest (and, probably, most natural) way of executing the replacement of a path \(P\) with a single node \(A\) involves the substitution of the whole path \(P\) with \(A\), the re-addressing of all the arcs entering any node in \(P\) as arcs entering \(A\), and the re-addressing of all the arcs exiting any node in \(P\) as arcs exiting \(A\). The result of the application of such a form of replacement to path \(p=<\)\(A_{1}\to A_{2}\rightarrow\ldots\to A_{k}\)? in the example in Figure 5A is shown in Figure 5B. Notably, however, while moving from the process model in Figure 5A to the one in Figure 5B, one obtains a more compact and abstract model, but loses the information provided by the intersecting paths. For instance, the new model does not contain the path... \(I_{2}\to A_{2}\to O_{1}\ldots\) anymore. In some cases, domain experts may recognize that one or more intersecting paths are very important. In our interactive approach, we want to provide experts with the possibility of performing the abstraction, while preserving the \"relevant\" intersecting paths. For example, Figure 5B shows the result of the abstraction operation preserving the path... \(I_{2}\to A_{2}\to O_{1}\ldots\)  
The problem of \"_conflicts_\" arises whenever the paths to be abstracted intersect with each other. Consider, e.g., the abstraction {\(A_{1}\), \(A_{2}\), \(A_{3}\)} part-of \(A\) in the process model \(PM\) in Figure 6A. There are three occurrences of paths consisting of the {\(A_{1}\), \(A_{2}\), \(A_{3}\)} nodes. However, such paths intersect with each other, so that there is a \"conflict\": not all of the three abstractions can be performed.