Index: /reasoner/consTranslation.tex
===================================================================
--- /reasoner/consTranslation.tex	(revision 198)
+++ /reasoner/consTranslation.tex	(revision 199)
@@ -41,14 +41,16 @@
 
       \If{$e_d \neq \undef \wedge \neg(isAttribute(d) \wedge isAnnotationAssng(parent(d)))$}{ \label{algTranslateDeclarationDefaultStart}
-          $e_f \assng compound(ca)$\; \label{algTranslateDeclarationTranslateInCompound}
+          %$e_f \assng compound(ca)$\; \label{algTranslateDeclarationTranslateInCompound}
           \uIf{$isConstraint(type(d))$}{ \label{algTranslateDeclarationTranslateConstraintDefaultStart}
-              $createConstraintVariableConstraint(e_d, e_f, v)$\; \label{algTranslateDeclarationConstraintVariableConstraint}
+              $createConstraintVariableConstraint(e_d, f, v)$\; \label{algTranslateDeclarationConstraintVariableConstraint}
           }\label{algTranslateDeclarationTranslateConstraintDefaultEnd}
           \uIf{$isAnnotation(v)$}{\label{algTranslateDeclarationCreateACStart}
-               $ac\assng \closedCases{\IVMLMeta{acc}(d,a), & \text{if } ca = \undef \\ \IVMLMeta{acc}(ca,a), &\text{else}}$\;\label{algTranslateDeclarationTranslateAnnotationAccess}
+               %$ac\assng \closedCases{\IVMLMeta{acc}(d,a), & \text{if } ca = \undef \\ \IVMLMeta{acc}(ca,a), &\text{else}}$\;\label{algTranslateDeclarationTranslateAnnotationAccess}
+               $ac\assng \IVMLMeta{acc}(ca,a)$\;\label{algTranslateDeclarationTranslateAnnotationAccess}
            }\uElse{
-              $ac \assng \closedCases{ca, & \text{if } e_f \neq \undef \\ d, &\text{else}}$\; \label{algTranslateDeclarationTranslateUsualAccess} \label{algTranslateDeclarationTranslateSelf2}
+              $ac \assng \closedCases{ca, & \text{if } f \neq \undef \\ d, &\text{else}}$\; \label{algTranslateDeclarationTranslateUsualAccess} \label{algTranslateDeclarationTranslateSelf2}
            }\label{algTranslateDeclarationCreateACEnd}
-          \leIf{$\IVMLself{} \in var(e_d) \vee isOverridenSlot(d)$}{$c_{e_d} \assng \deferredDefaultConstraints$}{$c_{e_d} \assng \defaultConstraints$} \label{algTranslateDeclarationTranslateSelf3}
+          %\leIf{$\IVMLself{} \in var(e_d) \vee isOverridenSlot(d)$}{$c_{e_d} \assng \deferredDefaultConstraints$}{$c_{e_d} \assng \defaultConstraints$} \label{algTranslateDeclarationTranslateSelf3}
+          $c_{e_d} \assng \closedCases{\deferredDefaultConstraints, & \text{if } var(e_d) \vee isOverridenSlot(d)\\ \defaultConstraints, &\text{else}}$\;\label{algTranslateDeclarationTranslateSelf3}
           $add(c_{e_d}, \createDefaultConstraint{\varSubstitutionSelfVarMapping{\IVML{assign}(ac, e_d)}{f}}, true, v)$\; \label{algTranslateDeclarationTranslateDefault}
       }\label{algTranslateDeclarationDefaultEnd}
@@ -68,8 +70,8 @@
 In the first part, Algorithm \ref{algTranslateDeclaration} declares some local variables in line \ref{algTranslateDeclarationDecl}, including the default value expression $e_d$ (ignored in incremental mode), the actual value of \IVMLself{} called here $f$ (for compounds only) and the compound translation mode $c_m$ (initially $NONE$). In line \ref{algTranslateDeclarationRefinedType}, the actual type of $v$ is determined, either based on the value of $v$, the default value expression (as an approximation) or $d$. If $t$ is a compound type, we set in line \ref{algTranslateDeclarationTranslateSelf1} the value of \IVMLself{} to the actual variable declaration $d$ and create the variable mapping for all slots in line \ref{algTranslateDeclarationRegisterCompound} by calling Algorithm \ref{algTranslateCompoundDeclaration}. Typically, this creates a new context frame in the variable mapping $\variableMapping$, which must be correctly cleaned up at the end of Algorithm \ref{algTranslateDeclaration} (controlled by the compound mode $c_m$). 
 
-A remaining default value expression $e_d$ is turned into an assignment constraint if $d$ is not an attribute used within an assignment block (this may otherwise collide with default values defined by the assignment block). If the $v$ variable is a constraint variable, we also have to add $e_d$ to the constraint base. This is done by calling Algorithm \ref{algCreateConstraintVariableConstraint} (cf. Section \ref{sectConstraintVariables}). Then, we turn the default value expression into an assignment expression. However, the creation of the sub-expression $ac$ representing the variable $v$ technically depends on whether $d$ is a (nested) annotation or 'ordinary' variable (lines \ref{algTranslateDeclarationCreateACStart}-\ref{algTranslateDeclarationCreateACEnd}). Further, we must determine the constraint set for adding the assignment constraint (line \ref{algTranslateDeclarationTranslateSelf3}): We add the constraint to $\deferredDefaultConstraints$ if the assignment may override a previous value assignment through a complex value. This is (potentially) the case if \IVMLself{} is used in $e_d$ or if $d$ is an overridden slot that may be overriden accidentally by a complex compound value. Else, we add the constraint to the set of default constraints $\defaultConstraints$. Ultimately, we create an expression assigning $e_d$ to $ac$, substitute \IVMLself{} and the actual variable mapping in this assignment expression, turn the result into a default constraint and add it to the respective constraint set in line \ref{algTranslateDeclarationTranslateDefault}. 
-
-Akin to default value expressions, orthogonal annotation declarations are only translated in full (non-incremental) reasoning mode in line \ref{algTranslateDeclarationAnnotationDefault} using Algorithm \ref{algTranslateAnnotationDeclarations}. 
-Finally, we translate constraints induced by the actual type of $v$. This can happen through derived, compound or container types. If $t$ is a derived data type, type-defined constraints are translated by Algorithm \ref{algTranslateDerivedDatatypeConstraints} in line \ref{algTranslateDeclarationDerivedDatatype}. If $t$ is a compound type, we call Algorithm \ref{algTranslateCompoundDeclaration} with the actual compound mode $c_m$ in line \ref{algTranslateDeclarationTranslateCompound}. If $t$ is a container type, we call Algorithm \ref{algTranslateContainerDeclaration} in line \ref{algTranslateDeclarationTranslateContainer}.
+In the second part, a default value expression $e_d$ is turned into an assignment constraint if $d$ is not an attribute used within an assignment block (line \ref{algTranslateDeclarationDefaultStart}, this may otherwise collide with default values defined by the assignment block). If $d$ declares a constraint variable (lines \ref{algTranslateDeclarationTranslateConstraintDefaultStart}-\ref{algTranslateDeclarationTranslateConstraintDefaultEnd}), we have turn $e_d$ into a constraint and add it to the constraint base. For creating a default value assignment constraint (also required for constraint variables), we first have to create the accessor expression, i.e., to realise $access(e)$ from the translation patterns. The accessor expression depends on whether $d$ is an annotation or an 'ordinary' variable. As annotations are always used with their underlying variable, i.e., Algorithm \ref{algTranslateDeclaration} is called with an appropriate $ca$, we just qualify annotations by $ca$ (lines \ref{algTranslateDeclarationCreateACStart}-\ref{algTranslateDeclarationCreateACEnd}). For 'ordinary' variables, we use $ca$ when we are processing a compound, else just $d$. Next we determine the target constraint sequence (line \ref{algTranslateDeclarationTranslateSelf3}): We defer the constraint (add it to $\deferredDefaultConstraints$) if the assignment may override a previous assignment through a complex value. This may happen if  \IVMLself{} is used in $e_d$ or if $d$ is a refined slot. Otherwise, we consider the constraint as an usual default assignment and add it to $\defaultConstraints$. Then, in line \ref{algTranslateDeclarationTranslateDefault}, we create an expression that assigns $e_d$ to $ac$, substitute \IVMLself{} and the actual variable mapping, turn the result into a default constraint and add it to the respective constraint set. 
+
+Finally, in the third part, we consider complex types. Akin to default value expressions, orthogonal annotation declarations are only translated in full (non-incremental) reasoning mode using Algorithm \ref{algTranslateAnnotationDeclarations} (line \ref{algTranslateDeclarationAnnotationDefault}). 
+Finally, we translate constraints induced by the actual type of $v$, i.e., by derived, compound or container types. If $t$ is a derived data type, we continue in line \ref{algTranslateDeclarationDerivedDatatype} with Algorithm \ref{algTranslateDerivedDatatypeConstraints}. If $t$ is a compound type, we call in line \ref{algTranslateDeclarationTranslateCompound} Algorithm \ref{algTranslateCompoundDeclaration} with the actual compound mode $c_m$. If $t$ is a container type, we call Algorithm \ref{algTranslateContainerDeclaration} in line \ref{algTranslateDeclarationTranslateContainer}.
 
 
