Commit f298e894 authored by Michele Volpato's avatar Michele Volpato

added more info in some errors and warnings

parent 237e9a6c
......@@ -196,7 +196,7 @@ class Table:
def addOneLetterExtension(self, trace, label):
if trace not in self._entries.keys():
self._logger.warning("Add one letter extension: trace is not in the table.")
self._logger.warning("Add one letter extension: "+ str(trace) +" is not in the table.")
else:
newRow = th.flatten(trace + (label,), self._quiescence)
rows = set()
......@@ -268,7 +268,7 @@ class Table:
# to preserve suffix closedness
suffix = column[1:]
if (suffix and suffix not in self._columns):
self._logger.error("Trying to add a column to the table breaking" +
self._logger.error("Trying to add "+ str(column) +" to the table breaking"
" suffix closedness")
return False
else:
......@@ -522,11 +522,11 @@ class Table:
if (entry1 not in self._entries and
entry2 not in self._entries):
# for some reason both entry do not exist.
self._logger.warning("Checking relation between rows in Consistency check: some entries are not defined.")
self._logger.warning("Checking relation between "+str(entry1)+ " and "+str(entry2)+" in Consistency check: some entries are not defined.")
continue
elif (entry1 not in self._entries or
entry2 not in self._entries):
self._logger.warning("Checking relation between rows in Consistency check: one entry is not defined.")
self._logger.warning("Checking relation between "+str(entry1)+ " and "+str(entry2)+" in Consistency check: one entry is not defined.")
newColumns.add((label,) + column)
break
......@@ -582,7 +582,7 @@ class Table:
# is the entry final? If False, we can still observe some outputs
def _isFinal(self, entry):
if entry not in self._entries.keys():
self._logger.warning("Checking if entry is final: entry is not in the table.")
self._logger.warning("Checking if "+str(entry)+ " is final: entry is not in the table.")
return False
return self._entries[entry][0] == self._entries[entry][1]
......@@ -644,7 +644,7 @@ class Table:
# entry for the proper prefix [VT15]
if len(row) > 0 and row[-1] == self._quiescence:
if row[:-1] not in self._entries.keys():
self._logger.warning("Checking delta loops: shorter trace is not in the table.")
self._logger.warning("Checking delta loops: shorter trace "+str(row[:-1])+" is not in the table.")
else:
(outputs, observed) = self._entries[row[:-1]]
if self._isFinal(row[:-1]) and outputs == set((self._quiescence,)):
......@@ -726,7 +726,7 @@ class Table:
# entry1 ⊑ entry2 => entry2.first is subset of entry1.first and entry1.second is subset of entry2.second
def _moreSpecificEntry(self, entry1, entry2, plus):
if (entry1 not in self._entries.values() or entry2 not in self._entries.values()):
self._logger.warning("Checking relation between entries: one or both are not in the table.")
self._logger.warning("Checking relation between "+str(entry1)+ " and "+str(entry2)+": one or both are not in the table.")
if not plus:
return entry1[0] == entry2[0] # equality
#return entry2[0].issubset(entry1[0]) # inclusion
......@@ -753,10 +753,10 @@ class Table:
entry2 = th.flatten(row2 + column, self._quiescence)
if entry1 not in self._entries and entry2 not in self._entries:
# for some reason both entries do not exist.
self._logger.warning("Checking relation between rows: both entries are not defined.")
self._logger.warning("Checking relation between "+str(entry1)+ " and "+str(entry2)+": both entries are not defined.")
continue
elif entry1 not in self._entries or entry2 not in self._entries:
self._logger.warning("Checking relation between rows: one entry is not defined.")
self._logger.warning("Checking relation between "+str(entry1)+ " and "+str(entry2)+": one entry is not defined.")
return False
if not self._moreSpecificEntry(self._entries[entry1],
self._entries[entry2], plus):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment