mirror of
				https://github.com/Brandon-Rozek/matmod.git
				synced 2025-10-30 03:01:12 +00:00 
			
		
		
		
	Fixed mis-usage of model constructor
This commit is contained in:
		
							parent
							
								
									ec451e007c
								
							
						
					
					
						commit
						47128b5c9e
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		
							
								
								
									
										11
									
								
								R.py
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								R.py
									
										
									
									
									
								
							|  | @ -106,7 +106,7 @@ designated_values = {a1} | ||||||
| logical_operations = { | logical_operations = { | ||||||
|     mnegation, mimplication, mconjunction, mdisjunction |     mnegation, mimplication, mconjunction, mdisjunction | ||||||
| } | } | ||||||
| R_model_2 = Model(carrier_set, logical_operations, designated_values, "R2") | R_model_2 = Model(carrier_set, logical_operations, designated_values, None, "R2") | ||||||
| 
 | 
 | ||||||
| interpretation = { | interpretation = { | ||||||
|     Negation: mnegation, |     Negation: mnegation, | ||||||
|  | @ -132,8 +132,8 @@ solutions = generate_model(R_logic, model_size, print_model=False) | ||||||
| 
 | 
 | ||||||
| print(f"Found {len(solutions)} satisfiable models") | print(f"Found {len(solutions)} satisfiable models") | ||||||
| 
 | 
 | ||||||
| for model, interpretation in solutions: | # for model, interpretation in solutions: | ||||||
|     print(has_vsp(model, interpretation)) | #     print(has_vsp(model, mimplication, True)) | ||||||
| 
 | 
 | ||||||
| print("*" * 30) | print("*" * 30) | ||||||
| 
 | 
 | ||||||
|  | @ -301,7 +301,7 @@ mdisjunction = ModelFunction(2, { | ||||||
| logical_operations = { | logical_operations = { | ||||||
|     mnegation, mimplication, mconjunction, mdisjunction |     mnegation, mimplication, mconjunction, mdisjunction | ||||||
| } | } | ||||||
| R_model_6 = Model(carrier_set, logical_operations, designated_values, "R6") | R_model_6 = Model(carrier_set, logical_operations, designated_values, None, "R6") | ||||||
| 
 | 
 | ||||||
| interpretation = { | interpretation = { | ||||||
|     Negation: mnegation, |     Negation: mnegation, | ||||||
|  | @ -312,4 +312,5 @@ interpretation = { | ||||||
| 
 | 
 | ||||||
| print(R_model_6) | print(R_model_6) | ||||||
| print(f"Model {R_model_6.name} satisfies logic {R_logic.name}?", satisfiable(R_logic, R_model_6, interpretation)) | print(f"Model {R_model_6.name} satisfies logic {R_logic.name}?", satisfiable(R_logic, R_model_6, interpretation)) | ||||||
| print(has_vsp(R_model_6, interpretation)) | # print(has_vsp(R_model_6, mimplication, True)) | ||||||
|  | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue