mirror of
https://github.com/Brandon-Rozek/matmod.git
synced 2025-07-29 20:52:01 +00:00
Fixed misusage of Model constructor
This commit is contained in:
parent
bd0d836204
commit
94a01dd3da
1 changed files with 6 additions and 6 deletions
12
R.py
12
R.py
|
@ -12,7 +12,7 @@ from logic import (
|
|||
)
|
||||
from model import Model, ModelFunction, ModelValue, satisfiable
|
||||
from generate_model import generate_model
|
||||
from vsp import has_vsp
|
||||
# from vsp import has_vsp
|
||||
|
||||
|
||||
# ===================================================
|
||||
|
@ -106,7 +106,7 @@ designated_values = {a1}
|
|||
logical_operations = {
|
||||
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 = {
|
||||
Negation: mnegation,
|
||||
|
@ -132,8 +132,8 @@ solutions = generate_model(R_logic, model_size, print_model=False)
|
|||
|
||||
print(f"Found {len(solutions)} satisfiable models")
|
||||
|
||||
for model, interpretation in solutions:
|
||||
print(has_vsp(model, interpretation))
|
||||
# for model, interpretation in solutions:
|
||||
# print(has_vsp(model, interpretation))
|
||||
|
||||
print("*" * 30)
|
||||
|
||||
|
@ -301,7 +301,7 @@ mdisjunction = ModelFunction(2, {
|
|||
logical_operations = {
|
||||
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 = {
|
||||
Negation: mnegation,
|
||||
|
@ -312,4 +312,4 @@ interpretation = {
|
|||
|
||||
print(R_model_6)
|
||||
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, interpretation))
|
||||
|
|
Loading…
Add table
Reference in a new issue