mirror of
https://github.com/Brandon-Rozek/matmod.git
synced 2025-08-26 22:31:59 +00:00
Compare commits
No commits in common. "bdc1f1e64d665a7d405643c4e0a73088124b7879" and "6317dc054f3ff80bb66a1d83923d5c23bbaed797" have entirely different histories.
bdc1f1e64d
...
6317dc054f
1 changed files with 4 additions and 12 deletions
16
vsp.py
16
vsp.py
|
@ -48,13 +48,9 @@ def find_top(algebra: Set[ModelValue], mconjunction: Optional[ModelFunction], md
|
|||
return None
|
||||
|
||||
for x in algebra:
|
||||
is_top = True
|
||||
for y in algebra:
|
||||
if mdisjunction(x, y) != x or mconjunction(x, y) != y:
|
||||
is_top = False
|
||||
break
|
||||
if is_top:
|
||||
return x
|
||||
if mdisjunction(x, y) == x and mconjunction(x, y) == y:
|
||||
return x
|
||||
|
||||
print("[Warning] Failed to find the top of the lattice")
|
||||
return None
|
||||
|
@ -68,13 +64,9 @@ def find_bottom(algebra: Set[ModelValue], mconjunction: Optional[ModelFunction],
|
|||
return None
|
||||
|
||||
for x in algebra:
|
||||
is_bottom = True
|
||||
for y in algebra:
|
||||
if mdisjunction(x, y) != y or mconjunction(x, y) != x:
|
||||
is_bottom = False
|
||||
break
|
||||
if is_bottom:
|
||||
return x
|
||||
if mdisjunction(x, y) == y and mconjunction(x, y) == x:
|
||||
return x
|
||||
|
||||
print("[Warning] Failed to find the bottom of the lattice")
|
||||
return None
|
||||
|
|
Loading…
Add table
Reference in a new issue