Index: /reasoner/reasoner.tex
===================================================================
--- /reasoner/reasoner.tex	(revision 21)
+++ /reasoner/reasoner.tex	(revision 22)
@@ -227,7 +227,7 @@
            }
       }
-      $c_c \assng c_c \cup collectionCompoundConstraints(d, v, \undef)$\;
+      $c_c \assng c_c \cup translateCollectionCompoundConstraints(d, v, \undef)$\;
       \If{$isContainer(t) \wedge isDerived(contained(t))$}{
-          $translateCollectionDerivedDatatypeConstraints(d, \undef)$
+          $translateCollectionDerivedDatatypeConstraints(d, \undef)$\;
       }
       \If{$ deflt \neq \undef $}{
@@ -302,7 +302,6 @@
 \end{algorithm}
 
-C
-
-
+If $d$ is a container, we must translate and apply all constraints of compounds within that collection \TBD{nested collections follow?} to $d$. As Algorithm \ref{algTranslateCollectionCompoundConstraints} is used within different algorithms, we return the collected constraints here.
+The relevant types to be considered includes the contained type of $d$ and the types of all elements. If the respective type is a compound, we perform the actual translation (cf. Algorithm \ref{algTranslateCollectionCompoundConstraints2}).
 
 \begin{algorithm}[H]
@@ -311,14 +310,13 @@
   \KwOut{resulting constraints $c$}
 
-  $c \assng \set$\;
-  \If{$isContainer(type(d))$}{
+  \If{$isCollection(type(d)$ \TBD{check: move up}} { 
+      $c \assng \set$\;
       $tc \assng contained(type(d))$\;
-      \ForAll{$t \iterAssng \set{tc} \cup \setWith{type(value(e))}{e\in elements(v)} \backslash\set{\undef}$}{
+      \ForAll{$t \iterAssng \set{tc} \cup \setWith{type(value(e))}{e\in elements(v)}$}{
           \If{$isCompound(t)$}{
-          \TBD{$c \assng c \cup translateCollectionCompoundConstraints(t, tc, d, ca)$}
+              $c \assng c \cup translateCollectionCompoundConstraints(t, tc, d, ca)$\;
           }
       }
-  }
-
+   }
  \caption{Translating compound constraints from a collection (\IVML{translateCollectionCompoundConstraints}).}\label{algTranslateCollectionCompoundConstraints}
 \end{algorithm}
@@ -331,5 +329,5 @@
 \end{align*}
 
-The second function $allCompoundConstraints(t, b)$ collect all constraints defined a compound type $t$. This includes the directly defined constraints, the constraints stemming from inherited constraint variables, the refined compound constraints and all constraints in (nested) assignment environments. Parameter $b$ is just used to indicate whether the function is called recursively, i.e., to collect constraint variables only directly for $t$.
+The second function $allCompoundConstraints(t, b)$ collect all constraints defined a compound type $t$. This includes the directly defined constraints, the constraints stemming from inherited constraint variables, the refined compound constraints and all constraints in (nested) assignment environments. Parameter $b$ is just used to indicate whether the function is called recursively, i.e., to collect constraint variables only directly for $t$. \TBD{Why not constraint variables via refines?}
 
 \begin{align*}
@@ -357,5 +355,5 @@
   }
 
- \caption{Translating compound constraints from a collection (\IVML{translateCollectionCompoundConstraints}).}\label{algTranslateCollectionCompoundConstraints}
+ \caption{Translating compound constraints from a collection (\IVML{translateCollectionCompoundConstraints}).}\label{algTranslateCollectionCompoundConstraints2}
 \end{algorithm}
 
