From 7073405c85f3d37d2649905e1687b803ca4148c5 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Wed, 5 Jan 2022 15:50:59 +0000 Subject: [PATCH] conflict matrix added --- test.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/test.py b/test.py index cebab13..6be73fe 100644 --- a/test.py +++ b/test.py @@ -61,6 +61,29 @@ search_patterns = { } } +conflict_matrix = { + 'tokensystem-C':{ + # Check for send, check for create, if both are there noise, else conflict resolved + 'tokentransfer', + 'tokencreation' + }, + 'smart-contract-creation-C':{ + # Check contract-conditions for userchoice, if present then userchoice contract, else time based contract + 'creation-one-time-event-userchoice', + 'creation-one-time-event-timebased' + }, + 'smart-contract-participation-deposit-C':{ + # Check *-word, its either one-time-event or a continuos-event + 'participation-one-time-event-userchoice', + 'deposit-continuos-event-tokenswap' + }, + 'smart-contract-participation-ote-ce-C':{ + # Check *-word, its either one-time-event or a continuos-event + 'participation-one-time-event-timebased', + 'participation-continuos-event-tokenswap' + } +} + def extract_specialcharacter_words(rawstring, special_characters): wordList = [] for word in rawstring.strip().split(' '): @@ -101,7 +124,10 @@ def sort_specialcharacter_wordlist(inputlist): def classify_rawstring(rawstring): specialcharacter_wordlist = extract_specialcharacter_words(rawstring,['@','*','$','#',':']) print(specialcharacter_wordlist) - return find_first_classification(specialcharacter_wordlist, search_patterns) + first_classication = find_first_classification(specialcharacter_wordlist, search_patterns) + + if first_classication == + def checkSearchPattern(parsed_list, searchpattern):