220 likes | 395 Views
Constructing a Bidirectional Transformation between BPMN and BPEL with a Functional Logic Programming Language. S. Mazanek and M. Hanus Journal of Visual Languages & Computing, Volume 22, Issue 1 , pages 66-89, 2011 報告人 : P0256962 劉民樟. Outlines. Introduction BPMN and BPEL
E N D
Constructing a Bidirectional Transformation between BPMN and BPEL with a Functional Logic Programming Language S. Mazanek and M. Hanus Journal of Visual Languages & Computing, Volume 22, Issue 1, pages 66-89, 2011 報告人: P0256962 劉民樟
Outlines • Introduction • BPMN and BPEL • Hypergraph Models • Functional Logic Programming and Parser Combinators • Graph Parser Combinators • BPMN and BPEL Transformation • Comments
Introduction • BPMN and BPEL are practically relevant • Why the transformation between BPMN and BPEL is needed • BPMN and BPEL belong to two fundamentally different languages • BPMN is graph-oriented and is used as an abstract representation • BPEL is block-structured • Most approaches hardly met two important criteria • Readability • Reversibility
What is proposed in this paper? • The GRAPPA framework which is proposed by the same author is used to construct graph parsers in a flexible manner • Assumption • A process is well-structured • Single-Entry Single-Exit (SESE) • Pre-required • A process is prec-onstructed as a tree
BPMN and BPEL A BPMN Example The corresponded BPEL
Transformation Challenges • Control Links in BPEL • Four Criteria for The Evaluation of Transformation • Completeness • Correctness • Readability • Reversibility Decide On Shipper must be later than Complete Price Calculation
Hypergraph Models • A hypergraph • Consists of edges and nodes • An edge visits exact two nodes • BPMN and hypergraph • An activity and gateway can be drawn as an edge • An activity has one incoming and one outgoing tentacle • A gateway has four tentacles
Functional Logic Programming • A functional programming • Treats computation as the evaluation of mathematical functions and avoids state and mutable data • Produces results that depend only on their inputs and not on the program state • Iteration (looping) in functional languages is usually accomplished via recursion • Higher-order functions are functions that can either take other functions as arguments or return them as results • The form twice(f, 7) = f(f(7)) = (7 + 3) + 3 def f(x): return x + 3 deftwice(function, x): returnfunction(function(x)) print(twice(f, 7))
Curry • Curry is a declarative multi-paradigm language combining features from both functional and logic programming • A Curry program consists of the definition of data types and operations on these types • In a Curry program, operations are defined by conditional equations with constraints in the conditions • Example • not '(not False)' → 'not True' → False • dataList a = [] | a : List a • [] ++ ys = ys • (x:xs) ++ ys = x : xs++ys • last l |xs++[e] =:= l = e wherexs,e free
Parser Combinators • A parser is a function accepting strings as input and returning some structure as output • In functional programming, a parser combinator is a higher-order function which accepts several parsers as input and returns a new parser as its output • Parser combinator and context-free grammar | Where *> is a sequence and <|> is a choice (or alternative)
Graph Parser Combinator: GRAPPA type Node = Int type Edge t = (t, [Node]) type Graph t = [Edge t] Where t is a type for the edge label type Grappa t res = Graph t (res, Graph t) Where t is a type for the edge label, res is a semantic value associated to graphs
Some discussions in this Paper • Identification and Dangling Edge Condition • Graph completion • Keep a process graph completely with correct connection between edges
Performance for Parsing Activities Chains Since a process is constructed as a tree, the parsing time should be exponential
Drawback in the transformation • Non-context-free concepts can not be covered, such as • Message flow • Loop
Comments • The transformation of a process between BPMN and BPEL must be well-structured • The hypergraph models has a limitation. • The transformation proposed in this paper • Focuses on the structure of process • Static analysis and transformation • What about the transformation for execution between BPMN and BPEL? • Imperative vs. functional
Comments (cont.) • The completion only care about the process structure, not the transformation result between BPMN and BPEL • Can not find any discussion about • Correctness • Readability