[Tex/LaTex] Tikz/PGF package to generate flow diagrams

tikz-pgf

I'm looking for something able to generate the following type of diagrams:

enter image description here

Thoughts?

Addendum: Maybe I was not clear. I'm looking for a package that, with minimal effort, is able to produce block&arrows diagrams, such as the above. Of course I could generate the "exact" above diagram with some effort, but that is not the point, sorry 🙂

Best Answer

Although it was not requested, this is a short example with »pgf/tikZ«.

\documentclass[11pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{fit,positioning}
\usepackage{mathtools}

\DeclareMathOperator{\arr}{arr}

\begin{document}
  \begin{tikzpicture}[
    >=stealth,
    thick,
    border/.style={
      draw=orange,
      rounded corners=2pt
    }
  ]
    \coordinate (o) at (0,0);
    \node[border,minimum width=3em] (f) at (2,0.5) {$f$\strut};
    \node[border,rounded corners=2pt,minimum width=3em] (g) at (2,-0.5) {$g$\strut};
    \node[draw,circle,minimum size=2em] (plus) at (4.5,0) {$+$};
    \coordinate[above right=0.5 and 0.5 of o] (c1);
    \coordinate[right=1 of f] (c2);
    \coordinate[below right=0.5 and 0.5 of o] (c3);
    \coordinate[right=1 of g] (c4);
    \node (text) at (2.5,1.5) {$f\&\&\&g >\!\!>\!\!> \arr(\lambda(z,y)\to y+z)$};
    \node[border,fit=(o) (f) (g)]{};
    \node[border,minimum height=57.4pt,fit=(c2) (c4) (plus)]{};
    \draw (o) -- +(-1,0) node[above,midway] (x) {$x$};
    \draw[->] (o) -- (c1) -- (f);
    \draw[->] (f) -- node[above,midway] (y) {$y$} (c2)  -- (plus);
    \draw[->] (o) -- (c3) -- (g);
    \draw[->] (g) -- node[above,midway] (z) {$z$} (c4)  -- (plus);
    \draw[->] (plus) -- +(1.5,0) node[above,midway] (nil) {~~};
    \node[draw=orange,rounded corners=2pt,minimum height=92pt,fit=(x) (g) (nil) (text)]{};
  \end{tikzpicture}
\end{document}

Perhaps improvable at one place or another (i.e. by layers).


enter image description here