Changed model names to match magics naming structure

SIZE.NEGATION.ORDER.DESIGNATED.IMPLICATION
This commit is contained in:
Brandon Rozek 2024-06-23 19:49:14 -07:00
parent d14ad52798
commit a6ca7ff7a3
No known key found for this signature in database
GPG key ID: 26E457DA82C9F480

View file

@ -27,31 +27,40 @@ def parse_matrices(infile: TextIO) -> List[Tuple[Model, Dict]]:
carrier_set = carrier_set_from_size(size) carrier_set = carrier_set_from_size(size)
num_negation = 0
while True: while True:
mnegation = parse_negation(infile, size) mnegation = parse_negation(infile, size)
if mnegation is None: if mnegation is None:
break break
num_negation += 1
num_order = 0
while True: while True:
result = parse_order(infile, size) result = parse_order(infile, size)
if result is None: if result is None:
break break
mconjunction, mdisjunction = result mconjunction, mdisjunction = result
num_order += 1
num_designated = 0
while True: while True:
designated_values = parse_designated(infile, size) designated_values = parse_designated(infile, size)
if designated_values is None: if designated_values is None:
break break
num_designated += 1
results = parse_implication(infile, size) results = parse_implication(infile, size)
if result is None: if result is None:
break break
num_implication = 0
for mimplication in results: for mimplication in results:
logical_operations = { logical_operations = {
mnegation, mimplication mnegation, mimplication
} }
model = Model(carrier_set, logical_operations, designated_values, name=str(len(solutions))) num_implication += 1
model_name = f"{size}.{num_negation}.{num_order}.{num_designated}.{num_implication}"
model = Model(carrier_set, logical_operations, designated_values, name=model_name)
interpretation = { interpretation = {
Negation: mnegation, Negation: mnegation,
Implication: mimplication Implication: mimplication