mirror of
https://github.com/Brandon-Rozek/matmod.git
synced 2026-01-18 07:10:23 +00:00
Check VSP for non-MaGICal models via SMT
This commit is contained in:
parent
84f1c1fd36
commit
25bd83f032
4 changed files with 140 additions and 6 deletions
11
model.py
11
model.py
|
|
@ -187,17 +187,24 @@ class Model:
|
|||
logical_operations: Set[ModelFunction],
|
||||
designated_values: Set[ModelValue],
|
||||
ordering: Optional[OrderTable] = None,
|
||||
name: Optional[str] = None
|
||||
name: Optional[str] = None,
|
||||
is_magical: Optional[bool] = False
|
||||
):
|
||||
assert designated_values <= carrier_set
|
||||
self.carrier_set = carrier_set
|
||||
self.logical_operations = logical_operations
|
||||
self.designated_values = designated_values
|
||||
self.ordering = ordering
|
||||
# NOTE: is_magical denotes that the model
|
||||
# comes from the software MaGIC which
|
||||
# means we can assume several things about
|
||||
# it's structure. See vsp.py for it's usage.
|
||||
self.is_magical = is_magical
|
||||
self.name = str(abs(hash((
|
||||
frozenset(carrier_set),
|
||||
frozenset(logical_operations),
|
||||
frozenset(designated_values)
|
||||
frozenset(designated_values),
|
||||
is_magical
|
||||
))))[:5] if name is None else name
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue