diff --git a/RASP_support/DrawCompFlow.py b/RASP_support/DrawCompFlow.py index 0935380..af62732 100644 --- a/RASP_support/DrawCompFlow.py +++ b/RASP_support/DrawCompFlow.py @@ -464,11 +464,12 @@ def __init__(self, depth, d_heads, d_ffs, add_tokens_on_ff=False): ff_parents += ff.get_nonminor_parent_sequences() ff_parents = list(set(ff_parents)) ff_parents = [p for p in ff_parents if not guarded_contains(d_ffs, p)] - # in the trivial case (no parents and only one ff), the ff is marked as - # constant and should be labelled as 'X' + # in the trivial case (no parents and only one ff), the ff is + # temporarily marked as constant and should be labelled as 'X' for x in [ff for ff in d_ffs if ff.is_constant()]: d_ffs.remove(x) ff_parents.append(x) + x._constant = False rows_by_type = {RES: d_ffs, VVAR: ff_parents} rowtype_order = [VVAR, RES] if add_tokens_on_ff and not contains_tokens(ff_parents): diff --git a/RASP_support/analyse.py b/RASP_support/analyse.py index 42c93a9..f7183a9 100644 --- a/RASP_support/analyse.py +++ b/RASP_support/analyse.py @@ -186,7 +186,7 @@ def __init__(self, select, sequences, comp_depth): # filter out non-ffs in the non-trivial case all_ffs = [m for m in all_ffs if m.from_zipmap] else: - # mark the sequence as constant in the case of trivial indices or tokens + # temporarily mark the sequence as constant in the trivial case for ff in all_ffs: ff.mark_as_constant() if remove_minors: