| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -28,14 +28,8 @@ class TestModelChecking: | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        assert result.result_for_all_states | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        reference = [0.16666666666666663, 0.3333333333333333, 0, 0.6666666666666666, 0, 0, 0, 1, 0, 0, 0, 0, 0] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        assert all(map(math.isclose, result.get_values(), reference)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    def test_parametric_state_elimination(self): | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        #TODO decide whether we have CLN or GMP based on some flag in stormpy. | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        import pycarl | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        import pycarl.cln | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        import pycarl.gmp | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        import pycarl.cln.formula | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        import pycarl.gmp.formula | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        program = stormpy.parse_prism_program(get_example_path("pdtmc", "brp16_2.pm")) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        prop = "P=? [F s=5]" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        formulas = stormpy.parse_properties_for_prism_program(prop, program) | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -48,7 +42,7 @@ class TestModelChecking: | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        assert initial_state == 0 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        result = stormpy.model_checking(model, formulas[0]) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        func = result.at(initial_state) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        one = pycarl.cln.FactorizedPolynomial(pycarl.cln.Rational(1)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        one = stormpy.FactorizedPolynomial(stormpy.RationalRF(1)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        assert func.denominator == one | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        #constraints_well_formed = result.constraints_well_formed | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        # for constraint in constraints_well_formed: | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |