Skip to content
Snippets Groups Projects
Commit 1118ddbf authored by George Marchment's avatar George Marchment
Browse files

update

parent bdde5807
No related branches found
No related tags found
No related merge requests found
Pipeline #14041 passed with stage
in 2 minutes and 12 seconds
......@@ -563,22 +563,16 @@ def relev_user_view_builder(dico, relevant_modules):
U = set(U).union(M)
#Step 2
NRC = []
order = list(set(N) - set(R))
order.sort()
for n in order:
for n in set(N) - set(R):
if(marked_statues[n] == 'unmarked'):
print(get_name_from_id(dico, n))
def condition_line_13(NRC, n, dico, R, inputs, outputs):
def check_same_elements(list1, list2):
return set(list1)==set(list2)
#Ms = generate_subsets(NRC)
for i in range(len(NRC)):
M = NRC[i]
print("M", get_names_tab(dico, M), "-> rPredM", get_names_tab(dico, rPredM(M, dico, R, ["input"])))
print('n', get_name_from_id(dico, n), '-> rPred', get_names_tab(dico, rPred(n, dico, R, ['input'])))
print("M", get_names_tab(dico, M), "-> rSuccM", get_names_tab(dico, rSuccM(M, dico, R, ["output"])))
print('n', get_name_from_id(dico, n), '-> rSucc', get_names_tab(dico, rSucc(n, dico, R, ['output'])))
print()
if(rPredM(M, dico, R, ["input"])==rPred(n, dico, R, ["input"]) and
rSuccM(M, dico, R, ['output'])==rSucc(n , dico, R, ['output'])):
if(check_same_elements(rPredM(M, dico, R, ["input"]), rPred(n, dico, R, ["input"])) and
check_same_elements(rSuccM(M, dico, R, ['output']), rSucc(n , dico, R, ['output']))):
return True, i
return False, -1
......@@ -587,7 +581,6 @@ def relev_user_view_builder(dico, relevant_modules):
check, index = condition_line_13(NRC, n, dico, R, ["input"], ['output'])
if(check):
NRC[index].append(n)
print("here")
else:
M = [n]
NRC.append(M)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment