Property Provider
03/2024
Abstract: This article describes the development of a semantic tool for mapping and relating objects to properties. The user can rank objects based on their properties, discover new objects, and identify gaps in property sets. The tool is designed to be minimal, open-source, cross-platform, and flexible, allowing for various interpretations of property meanings. It could be useful in discussions involving many concepts, aiding in onboarding, identifying edge cases, qualifying concepts, and maintaining structure in documentation. The implementation is in C# 11 and released under the AGPL-3.0.
In the last articles, I had written in the theme of Mathematical topics examined from a computational light, and I've taken them for revision. I don't think I'll put them up again, in revised form, any soon, but one of the topics discussed were combinations of properties of certain abstract structures, considered physical structures in programming and completely abstract structures in Mathematics: for example, sets, tuples, lists, and so on. Upon further consideration, this topic provoked an advancement where I actually mapped a complete small set of combinations of properties of collections, and in the process, I observed I could now objectively rank them according to said set of properties, and discover new objects.
This means a relation is established relating objects to properties, and we implement scoring algorithms ordering the objects with respect to a single object and supply a 'distance' measure between any two objects. We now know the most similar and dissimilar objects with respect to an object. We can, given a set of objects related to properties, check for holes and define missing combinations of properties as new, previously unknown, objects.
In the program presented in this article, these facets are implemented minimally in a convenient and self-contained form that contains concise and robust code, can be compiled easily using an open source compiler, run cross-platform, and carry no external dependencies, while providing functional usability. This is the beginning of a set of tools which progressively expand on the operations available while following the same minimal and canonical focus. More tools with specific applications in mind will also be implemented as needed, to give different forms to access the same functionality, or test applied concepts.
In this approach, the meaning of properties themselves is left for interpretation; the tool is mostly concerned with semantics and knowledge mapping. Variations of property sets or the meaning of properties can be stipulated; each combination is a project. The tool might be useful in occasions where a sizeable number of concepts are in discourse, and, while the subject matter is open for interpretation, a semantic tool helps onboarding, finding edge cases, or qualifying concepts in a measured, controlled way; or keeping structure for documentation of complexity.
The following technical display should give a more precise illustration.
Given the following input file:
Collections, Multiset Collections, Tuple Collections, Struct Collections, ElementNamedTuple Collections, Set Collections, Track Collections, Array Collections, String Collections, Column Properties, NaturalOrdering Properties, ElementNaming Properties, Uniqueness Properties, Typing Properties, Naming // Multiset has no properties Collections.Tuple , Properties.NaturalOrdering Collections.Struct, Properties.ElementNaming Collections.Set , Properties.Uniqueness Collections.Track , Properties.Typing Collections.String, Properties.Naming Collections.ElementNamedTuple, Properties.ElementNaming Collections.ElementNamedTuple, Properties.NaturalOrdering Collections.Array , Properties.NaturalOrdering Collections.Array , Properties.Typing Collections.Column , Properties.Naming Collections.Column , Properties.NaturalOrdering Collections.Column , Properties.Typing
The following results could follow:
PropertyProvider v0.1 PP> load D:\PropertyProviderConsoleSample.txt 2 classes constructed 14 class elements added 2 relations defined 24 relation elements defined PP> help exit, outfile, classes, relations, [className], [className] v [className] [className] v [className] (!|!!|?|??) [classElement] PP> classes Collections, Properties PP> relations (Collections, Properties), (Properties, Collections) PP> Collections Collections.Multiset, Collections.Tuple, Collections.Struct, Collections.ElementNamedTuple, Collections.Set, Collections.Track, Collections.Array, Collections.String, Collections.Column PP> Properties Properties.NaturalOrdering, Properties.ElementNaming, Properties.Uniqueness, Properties.Typing, Properties.Naming PP> Collections v Properties > +---------------------------+-----------------+ | (Collections, Properties) | 1/5 | +---------------------------+-----------------+ | Multiset | | | Tuple | | | Struct | ElementNaming | | ElementNamedTuple | ElementNaming | | Set | | | Track | | | Array | | | String | | | Column | | +---------------------------+-----------------+ < > > help b|break, c|clear, pp, pn, pf, pl, p[pageNumber] > pn +---------------------------+-----------------+ | (Collections, Properties) | 2/5 | +---------------------------+-----------------+ | Multiset | | | Tuple | | | Struct | | | ElementNamedTuple | | | Set | | | Track | | | Array | | | String | Naming | | Column | Naming | +---------------------------+-----------------+ < > PP> Properties v Collections > +---------------------------+-------------------+ | (Properties, Collections) | 1/9 | +---------------------------+-------------------+ | NaturalOrdering | Array | | ElementNaming | | | Uniqueness | | | Typing | Array | | Naming | | +---------------------------+-------------------+ < > PP> Properties v Collections > pn +---------------------------+-------------------+ | (Properties, Collections) | 2/9 | +---------------------------+-------------------+ | NaturalOrdering | Column | | ElementNaming | | | Uniqueness | | | Typing | Column | | Naming | Column | +---------------------------+-------------------+ < > PP> Collections v Properties ! Set > s +---------------------------+-----------------+ | (Collections, Properties) | 1/5 | +---------------------------+-----------------+ | (5) Set | ElementNaming | | (4) Multiset | ElementNaming | | (3) Tuple | ElementNaming | | (3) Struct | | | (3) Track | ElementNaming | | (3) String | ElementNaming | | (2) ElementNamedTuple | | | (2) Array | ElementNaming | | (1) Column | ElementNaming | +---------------------------+-----------------+ < > > pn +---------------------------+-----------------+ | (Collections, Properties) | 2/5 | +---------------------------+-----------------+ | (5) Set | Naming | | (4) Multiset | Naming | | (3) Tuple | Naming | | (3) Struct | Naming | | (3) Track | Naming | | (3) String | | | (2) ElementNamedTuple | Naming | | (2) Array | Naming | | (1) Column | | +---------------------------+-----------------+ < > PP> Properties v Collections !! Uniqueness > s +---------------------------+-------------------+ | (Properties, Collections) | 1/9 | +---------------------------+-------------------+ | (9) Uniqueness | | | (6) ElementNaming | | | (6) Naming | | | (5) Typing | Array | | (4) NaturalOrdering | Array | +---------------------------+-------------------+ < > PP> Properties v Collections ! Uniqueness > s +---------------------------+-------------------+ | (Properties, Collections) | 1/9 | +---------------------------+-------------------+ | (9) Uniqueness | Array | | (6) ElementNaming | Array | | (6) Naming | Array | | (5) Typing | | | (4) NaturalOrdering | | +---------------------------+-------------------+ < > PP> Collections v Properties ? Array > s +---------------------------+-----------------+ | (Collections, Properties) | 1/5 | +---------------------------+-----------------+ | (3) Struct | | | (3) Set | ElementNaming | | (3) String | ElementNaming | | (2) Multiset | ElementNaming | | (2) ElementNamedTuple | | | (1) Tuple | ElementNaming | | (1) Track | ElementNaming | | (1) Column | ElementNaming | | (0) Array | ElementNaming | +---------------------------+-----------------+ < > > save %LOCALAPPDATA%\PropertyProvider\PropertyProviderOut.txt +---------------------------+-----------------+-----------------+-----------------+-----------------+-----------------+ | (Collections, Properties) | 1/5 | 2/5 | 3/5 | 4/5 | 5/5 | +---------------------------+-----------------+-----------------+-----------------+-----------------+-----------------+ | (3) Struct | | Naming | | | Uniqueness | | (3) Set | ElementNaming | Naming | | | | | (3) String | ElementNaming | | | | Uniqueness | | (2) Multiset | ElementNaming | Naming | | | Uniqueness | | (2) ElementNamedTuple | | Naming | NaturalOrdering | | Uniqueness | | (1) Tuple | ElementNaming | Naming | NaturalOrdering | | Uniqueness | | (1) Track | ElementNaming | Naming | | Typing | Uniqueness | | (1) Column | ElementNaming | | NaturalOrdering | Typing | Uniqueness | | (0) Array | ElementNaming | Naming | NaturalOrdering | Typing | Uniqueness | +---------------------------+-----------------+-----------------+-----------------+-----------------+-----------------+
Observations
- A project can contain any number of classes and relations. The "Properties" classes is not hardcoded and is just a "default" class name for properties of objects. Any classes of objects could be related
- Tables are paged to allow a constant width for inspection. Full tables can be printed to files with
save
- Reverse relations are automatically created from any relation
- The
A v B ! C
syntax, whereA
is the "key" class andB
is the "value" class, performs similarity scoring (non-unique) in the relation with respect to elementC
of the key class. The descending similarity score is shown in parenthesis on the key cell - Dissimilarity scoring is also available with the
?
operator - The double operators
!!
and??
for scoring shows true or false values (which we call "characteristics"), as opposed to equal or distinct values (for similarity or dissimilarity respectively), for each key class - The project abstracts class element names as Symbols, which allows to:
- Enforce uniqueness of Symbols on a class
- Implement integer encoding of Symbols, as 1) combination of elements on a Set is expressible as a sum, 2) powers-of-two sums are unique, and 3) classes are Sets. Thus, element combinations (or Objects) are encoded as unique integers in a way such that, from an integer, the combination (or Object) is recoverable.
Implementation
The operations have been implemented in a command line program written in C# 11 and released under the AGPL-3.0.