Index: /reasoner/reasoner.tex
===================================================================
--- /reasoner/reasoner.tex	(revision 114)
+++ /reasoner/reasoner.tex	(revision 115)
@@ -116,5 +116,5 @@
 \subsection{General notation}\label{sectGeneralNotation}
 
-As usual, we denote a \emph{set} of elements by $s=\set{1, 2, ...}$ with no duplicates allowed (and \setEmpty as the empty set). We write the derivation of a set based on another set by $s_1=\setWith{i+1}{i\in s}$, i.e., $s_1$ is derived from $s$ by iterating over all elements $i$ in $s$ and deriving new values for each $i$ through $i+1$. We use the part after the \setSepText  to indicate the set to take the elements from (possibly including conditions), while the part before the \setSepText indicates how to derive new set elements from the existing ones. $s_2 = s \cup s_1$ denotes the union of the two sets $s$ and $s_1$, i.e., $s_2$ contains all elements from $s_1$ and $s_2$ without duplicates (and the sequence of elements does not matter).
+As usual, we denote a \emph{set} of elements by $s=\set{1, 2, ...}$ with no duplicates allowed (and \setEmpty as the empty set). We write the derivation of a set based on another set by $s_1=\setWith{i+1}{i\in s}$, i.e., $s_1$ is derived from $s$ by iterating over all elements $i$ in $s$ and deriving new values for each $i$ through $i+1$. We use the part after the \setSepText  to indicate the set to take the elements from (possibly including conditions), while the part before the \setSepText indicates how to derive new set elements from the existing ones. $s_2 = s \cup s_1$ denotes the union of the two sets $s$ and $s_1$, i.e., $s_2$ contains all elements from $s_1$ and $s_2$ without duplicates (and the sequence of elements does not matter). For convenience, we assume for a set $s_3$, $s_3 \cup \undef = s_3$.
 
 For some parts of the reasoning algorithm, in particular to prioritize constraint types, we need \emph{sequences}, i.e., structures that contain elements in the order given by inserting the elements and potentially containing duplicates. We denote a sequence by $q=\seq{2, 1, ...}$ and \seqEmpty{} as the empty sequence. Akin to sets, the derivation of a sequence from another sequence preserving the order of elements in the originating sequence by $q_1=\seqWith{i+1}{i \in q}$. Accessing the $i$-th element in sequence $q$ is expressed by $q[i]$. We denote adding an element to an existing sequence / the sequence concatenation as $q_2=q \addSeq q_1$, i.e., $q_2$ contains all elements in $q$ and $q_1$ including duplicates with the elements of $q$ preceding the elements of $q_1$ in the original sequences as given in $q$ and $q_1$. Moreover, we use $q_3=q \addSeqNoDupl q_d$ as a sequence concatenation that omits duplicates.
@@ -402,5 +402,5 @@
   \SetAlgoLined
   \KwIn{configuration $cfg$}
-  \KwData{problem records $\problemRecords$, scope assignments $\scopeAssignments$, expression evaluator $e$, reasoning start time $startTime$, flags $hasTimeout$ and $stop$, $resue$ instance flag, $projects$ sequence, constraint base copy $base_c$}
+  \KwData{problem records $\problemRecords$, scope assignments $\scopeAssignments$, expression evaluator $e$, reasoning start time $startTime$, flags $hasTimeout$ and $stop$, $resue$ instance flag, $projects$ sequence, relevant constraints $\relevantConstraints$}, constraint base copy $base_c$ and $base_{\relevantConstraints}$ 
   \KwResult{Reasoning result $r$}
   
@@ -413,4 +413,5 @@
     \If{$reuse$}{
          $base_c = \seqEmpty{}$\; %sequence?
+         $base_{\relevantConstraints} = \setEmpty{}$\; %map?
      }
     $projects \assng discoverImports(cfg)$\; \label{algMainLoopDiscover}
@@ -421,4 +422,5 @@
     } \label{algMainLoopEnd}\label{algMainLoopFullEnd}
   }\Else {\label{algMainLoopIncStart}
+    $\relevantConstraints \assng base_{\relevantConstraints}$\;
     \ForAll{$i \in \set{0, \ldots, |base_c|} \wedge \neg hasTimeout \wedge \neg stop$}{
        $base \assng base_c[i]$\; 
@@ -1122,10 +1124,13 @@
   \SetAlgoLined
   \KwIn{variable $v$, constraint expression $c$}
-  \KwData{other constraints $\otherConstraints$, relevant constraints $\relevantConstraints$}
+  \KwData{other constraints $\otherConstraints$, relevant constraints $\relevantConstraints$}, relevant constraints copy $base_{\relevantConstraints}$
  
   \If{$v \neq \undef$}{
-       \MISSING{map v to c for dynamic value type change}\;
        $\relevantConstraints \assng \relevantConstraints \addMap \mapEntry{c}{v}$\;
-       \MISSING{copied state}\;
+       $\relevantConstraints[v] \assng \relevantConstraints[v] \cup \set{c}$\;
+       \If{$base_{\relevantConstraints} \neq \undef$} {
+           $base_{\relevantConstraints} \assng base_{\relevantConstraints} \addMap \mapEntry{c}{v}$\;
+           $base_{\relevantConstraints}[v] \assng base_{\relevantConstraints}[v] \cup \set{c}$\;
+       }
    } 
 
