You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							21 lines
						
					
					
						
							912 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							21 lines
						
					
					
						
							912 B
						
					
					
				| #include "src/logic/VariableSubstitutionVisitor.h" | |
|  | |
| #include "src/logic/Formulas.h" | |
|  | |
| namespace storm { | |
|     namespace logic { | |
|          | |
|         VariableSubstitutionVisitor::VariableSubstitutionVisitor(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) : substitution(substitution) { | |
|             // Intentionally left empty. | |
|         } | |
|          | |
|         std::shared_ptr<Formula> VariableSubstitutionVisitor::substitute(Formula const& f) const { | |
|             boost::any result = f.accept(*this, boost::any()); | |
|             return boost::any_cast<std::shared_ptr<Formula>>(result); | |
|         } | |
|          | |
|         boost::any VariableSubstitutionVisitor::visit(AtomicExpressionFormula const& f, boost::any const& data) const { | |
|             return std::static_pointer_cast<Formula>(std::make_shared<AtomicExpressionFormula>(f.getExpression().substitute(substitution))); | |
|         } | |
|     } | |
| }
 |