{'fraction_non_alphanumeric': 0.025095471903982543, 'fraction_numerical': 0.0, 'mean_word_length': 4.878205128205129, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Binary Relational Algebra Applied to Software Architecture

The architecture of a piece of software refers to its structure as given by its components and their interconnections. An architectural style is a set of commonalities among the structures of a number of software systems. We are concerned with architectures that are characterized by directed graphs. The graphs we are interested in contain edges that are "typed" or "colored", which means that there are a finite number of different kinds of edges. The nodes in the graphs represent entities such as procedures, modules and subsystems. The edges in the graphs represent relations among these entities, such as "calls", "accesses", "imports", "includes", and "uses". This paper shows how binary relational algebra, as defined by Tarski and refined by Schmidt and others, can be used to formalize this type of architectural style. We show how this algebraic approach can be used to give constraints among the relations in an architecture. For example, we can use a relational inequality to formalize the rule that: items within a object can be used from outside the object only if they have been exported from the object. We have developed a prototype "relational calculator", which reads data bases that represent sets of relations, and which allows us to compute new relations and sets. We have used this calculator in a reverse engineering project to determine the clients of a given subsystem, based on relations for containment and usage. We formalize the concept of an architectural style in terms of rules that limit the use of relations. We propose a form for rules in which each rule is written as a relational inequality. We show that such rules are monotonic, which implies that adding new edges can allow more edges, but cannot disallow previously allowed edges.