I want to build a toy "theorem prover" piece of software. I have some familiarity with a large commercial product of this sort, written in Java, and used for terminology construction. A terminology is set of "concepts" that relate to each other either through "Is_a" relationships ("a red_dictionary is_a book") or through attribute relationships ("a red_dictionary has_color red")

The software detects equivalence ("red car has_brand chevy" <==>"car has_color red, has_brand chevy") The notation for this usually uses logic symbols, but I don't want to clutter this post right now.

The software does something else too (calculates subsumed children), but understanding how to do just the first piece would satisfy me for now.

The terminology would require a few disjoint hierarchies; one for the relationship types (is_a, has_color, has_brand), one for the objects (vehicle perhaps), and one or for the values of the attributes (red, blue, chevy, ford) The attributes in this example would be in two hierarchies: Colors and Brands.

My big questiojn is how do I make a data structure to do this? I am nearly sure it si not done though tradition OO clases, as I don't think that could scale to the level of the commercial product (hundreds of thousands of concepts, over a million relationships talking into a big oracle database.

I just can't get my mind around the first steps of how to model this on a tiny scale in perl. I'd like to output to a set of tables because I am most familiar with that; the commercial product outputs XML that is then converted to tables though.


In reply to toy subsumption classifier by jjohhn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.