| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -511,7 +511,6 @@ namespace storm { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                stateVector.push_back(state); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // Start creating the Lattice
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            storm::analysis::Lattice *lattice = new storm::analysis::Lattice(topStates, bottomStates, numberOfStates); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            storm::storage::BitVector oldStates(numberOfStates); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -530,19 +529,13 @@ namespace storm { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        && seenStates[currentState->successor1] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        && seenStates[currentState->successor2]) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        // Check if the current state number has not been added, but its successors have been added.
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        if (currentState->successor1 == currentState->successor2) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            // If there is only one successor, the state should be added to the same Node as its successor
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            lattice->addToNode(currentState->stateNumber, lattice->getNode(currentState->successor1)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            // Add stateNumber to the set with seen states.
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            seenStates.set(currentState->stateNumber); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        // Otherwise, check how the two states compare, and add if the comparison is possible.
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        uint_fast64_t successor1 = currentState->successor1; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        uint_fast64_t successor2 = currentState->successor2; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        int compareResult = lattice->compare(successor1, successor2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        if (compareResult == 1 || compareResult == 2) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            // getNode will not return nullptr, as compare already checked this
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            if (compareResult == 2) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                // swap
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                auto temp = successor1; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -552,6 +545,7 @@ namespace storm { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            // Additional check, if states have the same probability of reaching a given next state,
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            // then they should be at the same node
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            // TODO: can this be removed, e.g. adding a step to preprocessing, making this superfluous
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            // TODO: 1 prob. and same probs to same states should be removed from matrix
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            storm::analysis::Lattice::Node *above = lattice->getNode(successor1); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            storm::analysis::Lattice::Node *below = lattice->getNode(successor2); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            std::vector<storm::analysis::Lattice::Node *> states1 = above->below; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -588,7 +582,7 @@ namespace storm { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            // TODO: what to do?
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            STORM_LOG_DEBUG("Failed to add" << currentState->stateNumber << "\n"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  | 
				
			
			
		
	
										
									
								
							 
xxxxxxxxxx