Skip to content

Commit

Permalink
Merge branch '185-process-tree-model-description-for-llm-purposes' in…
Browse files Browse the repository at this point in the history
…to 'integration'

[Priority 2] Process tree model description (for LLM purposes)

Closes #185

See merge request process-mining/pm4py/pm4py-core!1178
  • Loading branch information
fit-alessandro-berti committed Dec 14, 2023
2 parents 9ec7578 + 048e1f9 commit efff639
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pm4py/objects/process_tree/obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,21 @@ def __str__(self):
"""
return self.__repr__()

@staticmethod
def model_description() -> str:
descr = """A process tree is a hierarchical process model.
The following operators are defined for process trees:
-> ( A, B ) tells that the process tree A should be executed before the process tree B
X ( A, B ) tells that there is an exclusive choice between executing the process tree A or the process tree B
+ ( A, B ) tells that A and B are executed in true concurrency.
* ( A, B ) is a loop. So the process tree A is executed, then either you exit the loop, or you execute B and then A again (this can happen several times until the loop is exited).
the leafs of a process tree are either activities (denoted by 'X' where X is the name of the activity) or silent steps (indicated by tau).
An example process tree follows:
+ ( 'A', -> ( 'B', 'C' ) )
tells that you should execute B before executing C. In true concurrency, you can execute A. So the possible traces are A->B->C, B->A->C, B->C->A.
"""
return descr

def _get_root(self):
root = self
while root._get_parent() is not None:
Expand Down

0 comments on commit efff639

Please sign in to comment.