An executable UML model has a detailed behavioural specification that enables it to run as a program. The detailed specification enables to test and validate the model independent of any implementation platform. The foundational UML (fUML) specification adopted in 2008 provided the first operational base semantics of activity modelling. Since the fUML specification did not provide any new concrete syntax, in order to execute the model one had to draw a very detailed activity diagram. This led to the development of a textual representation to specify the computations which led to the development of action language for foundational UML known as Alf. The UML behaviour specified using textual notation in Alf can be attached to a UML model at any place. Syntactically, Alf looks like C, C++ or Java and semantically it maps to the fUML subset. Alf provides an additional layer of abstraction. In this paper we demonstrate how Java can be used in place of Alf to specify detailed behaviour. Java is a popular high level language among developers and useful to the industry. Specifying UML behaviour with Javaavoids the extra burden of developers studying an unfamiliar new abstraction termed Alf.
George, R., & Samuel, P. (2015). Foundational UML behavioral specification with Java. In Procedia Computer Science (Vol. 46, pp. 941–948). Elsevier B.V. https://doi.org/10.1016/j.procs.2015.01.003