ScEpTIC package

Subpackages

Submodules

ScEpTIC.exceptions module

exception ScEpTIC.exceptions.AnomalyException(message)

Bases: Exception

exception ScEpTIC.exceptions.ConfigurationException(message)

Bases: Exception

exception ScEpTIC.exceptions.InitializationException(message)

Bases: Exception

exception ScEpTIC.exceptions.LLVMSyntaxErrorException(message)

Bases: Exception

exception ScEpTIC.exceptions.MemoryException(message)

Bases: Exception

exception ScEpTIC.exceptions.NotImplementedException(message)

Bases: Exception

exception ScEpTIC.exceptions.ParsingException(message)

Bases: Exception

exception ScEpTIC.exceptions.RegAllocException(message)

Bases: Exception

exception ScEpTIC.exceptions.RegisterFileException(message)

Bases: Exception

exception ScEpTIC.exceptions.RegisterNotFoundException(message)

Bases: Exception

exception ScEpTIC.exceptions.RuntimeException(message)

Bases: Exception

exception ScEpTIC.exceptions.StopAnomalyFoundException

Bases: Exception

exception ScEpTIC.exceptions.StopException(message)

Bases: Exception

ScEpTIC.tools module

ScEpTIC.tools.atoi(text)
ScEpTIC.tools.build_input_lookup_data(input_name, checkpoint_id)

Creates input lookup data given the input name and the checkpoint id.

ScEpTIC.tools.fancy_dict_keys_to_str(lst)

Returns a string composed by only the keys of a given dictionary

ScEpTIC.tools.fancy_dict_to_str(lst, line_padding=0, expand=False, max_line_length=140)

Converts a dict to a string in a fancy way.

ScEpTIC.tools.fancy_list_to_str(lst, line_padding='', expand_dict=False, max_line_length=140)

Converts a list to a string with the line number in front of each line and inserts a new line separator every max_line_length characters.

ScEpTIC.tools.flat_list(lst)

Flatterns a list of lists into a list

ScEpTIC.tools.get_index_in_context(lst, index, start_tokens=['(', '[', '{', '<'], end_tokens=[')', ']', '}', '>'])

Return the index of the element “index” inside list lst. Elements between start_token and end_token are not considered as valid indexes. (Usefule to split / find subgroups [a, b] , [c, d])

ScEpTIC.tools.get_index_of_closed_par(lst, start_token, end_token)

Returns the index of a closed parentheses pair, considering the context as before.

ScEpTIC.tools.get_indexes_of_matching_tokens(lst, start_token, end_token)
ScEpTIC.tools.get_list_apex_boundaries(lst)

Returns the start and end delimiters for getting all the elements between “” or ‘’

ScEpTIC.tools.get_list_boundaries(lst, start_token, end_token=None, right_most_end_token=False)

Return the start and end index to get all the element in a list that are between start_token and end_token (start/end tokens excluded)

ScEpTIC.tools.inf_depth_lst_flat(lst, flat_values=None)

Converts a very depth list of lists to a flat one and appends each element to flat_values

ScEpTIC.tools.instert_new_line_every(line, max_line_length=140, new_line_padding='')

Inserts a new line every max_line_length characters. To every new line is appendend new_line_padding

ScEpTIC.tools.list_concat_elements(lst, element)

Concatenates the adjacent cell with the one containing only element. e.g. list_concat_elements([‘a’,’+’,’b’,’c’], ‘+’) produces [‘a+b’, ‘c’]

ScEpTIC.tools.list_join(lst, elem='')

Joins a list

ScEpTIC.tools.list_rebuild(lst, separator)

Joins the list into a single string and splits it using separator.

ScEpTIC.tools.list_remove_sequence(lst, elements)

Removes a sequence of elements from a list. e.g. list_remove_sequence([‘a’, ‘b’, ‘c’, ‘d’], [‘b’,’c’]) produces [‘a’, ‘d’]

ScEpTIC.tools.list_replace_element(lst, source, target)

Replace all the occurrences of source in lst with target

ScEpTIC.tools.list_rindex(lst, element)

Returns the right index of element in list lst.

ScEpTIC.tools.list_sanitize(lst, element)

Removes all the occurrences of element from the list

ScEpTIC.tools.list_sanitize_from_list(lst, elements)

Removes all the occurrences of any element in elements from the list

ScEpTIC.tools.list_to_string(lst, replace_elements={})

Converts a list to a string, replacing all the replace_elements. replace_elements must be a dictionary {‘source’: ‘target’, …}

ScEpTIC.tools.list_to_string_using_boundaries(lst, start_token, end_token=None, continue_on_exception=False, replace_elements={})

Returns the string representing the sublist between the boundaries start_token and end_token.

ScEpTIC.tools.merge_input_lookup_data(lookup, other)

Merges two input lookup data into a single one.

ScEpTIC.tools.natural_keys(text)

https://nedbatchelder.com/blog/200712/human_sorting.html human sorting algoritm

ScEpTIC.tools.split_context_into_sublist(lst, separator, start_tokens=['(', '[', '{', '<'], end_tokens=[')', ']', '}', '>'])

Split the list into sublists. Elements between start_token and end_token are not splitted. e.g. split_context_into_sublist(, ‘,’, [‘{‘], [‘}’]) [‘line’, ‘:’, ‘18’, ‘,’, ‘test’, ‘:’, ‘!’, ‘{‘, ‘!’, ‘3’, ‘,’, ‘!’, ‘5’, ‘,’, ‘!’, ‘6’, ‘}’] returns [[‘line’, ‘:’, ‘18’], [‘test’, ‘:’, ‘!’, ‘{‘, ‘!’, ‘3’, ‘,’, ‘!’, ‘5’, ‘,’, ‘!’, ‘6’, ‘}’]]

ScEpTIC.tools.split_into_sublist(lst, separator)

Splits the list into sublists. separator will be used as split element and won’t be present in the sublists.

ScEpTIC.tools.split_parantheses_groups(lst, lpar='[', rpar=']')

Splits a list into different parentheses groups.

ScEpTIC.tools.split_parantheses_groups_with_context(lst, lpar='[', rpar=']', start_token='(', end_token=')')

Splits a list into different parentheses groups, but only if it is not inside a pair start_token - end_token.

Module contents

ScEpTIC.init(config)

Initializes ScEpTIC environment