Create DrasilConcept typeclass that directs to a chunk that defines the meaning of the instantiated class' name.#4271
Create DrasilConcept typeclass that directs to a chunk that defines the meaning of the instantiated class' name.#4271
DrasilConcept typeclass that directs to a chunk that defines the meaning of the instantiated class' name.#4271Conversation
… defines the meaning of the instantiated class' name.
|
The alternative design mentioned in (2) has one pro over the existing code in the PR: we can have two instances for any chunk. For example, one that directs to a ConceptChunk and one that directs to a CI (assuming we add a definition to the CI type as well). The major con is that it's no longer giving a -- | What does this chunk type encode?
--
-- All chunk types in Drasil should instantiate this class.
class Concept cd => DrasilConcept c cd where
-- | Provide the 'UID' to a chunk (of type 'cd') that explains what 'c' is.
metaConcept :: Getter c (TUID cd) |
|
Examples that might help us: Theories: -- | These are internal-to-Drasil common ideas, and need to be defined at the
-- same time as theories.
dataDefn, genDefn, inModel, thModel :: CI
-- | Data definition.
dataDefn = commonIdeaWithDict "dataDefn" (cn' "data definition") "DD" [softEng]
-- | General definition.
genDefn = commonIdeaWithDict "genDefn" (cn' "general definition") "GD" [softEng]
-- | Instance model.
inModel = commonIdeaWithDict "inModel" (cn' "instance model") "IM" [softEng]
-- | Theoretical model.
thModel = commonIdeaWithDict "thModel" (cn' "theoretical model") "TM" [softEng]^ We would want to "point" to these. What about the various "atoms" we have? For example, |
|
Personally, I would be happy with or even The data-structure we use is unimportant. The main thing that makes
|
Contributes to #3314
I'm a little bit confused now by what
DrasilConceptshould be doing, and I think we need to clarify the terminology. This PR should most likely not be merged as-is.Braindump
The 'Concept' typeclass provides information about the specific thing that an instance of a chunk (of type 'c') embodies. So, when I went to build
DrasilConcept, I figured that it should point to the relatedConceptChunkthat explains what 'c' means (e.g., aConceptChunkthat defines whatTheory Modelmeans). And that's how I ended up with this implementation:Now three questions immediately arose:
1. Why point to another chunk?
1.1. Why to another chunk?
Well, that's just working on an assumption: that we want to capture "metadata" chunks as well, and keep them in close proximity to our "data" chunks, capturing information about their relationships.
1.2. Why only point?
Because the other chunk should exist already, and duplicating the type class fields with "meta" versions is unnecessary.
2. Why point to a
ConceptChunkspecifically?In my head, this was just the most obvious thing to point to because we need to be able to point to something that defines our Drasil terminology, and using our current
ChunkDB, we need to be able to resolve references to a single type.ConceptChunkis the most appropriate because it is the infimum of all chunks that instantiateConcept. But it might not be the right thing. As @JacquesCarette mentioned in #3314 (comment):So, an alternative design might look like the following, where it points towards another chunk that must have the necessary "conceptual" information:
Or, there could be yet another alternative version that recreates the 5 requirements of
Concept(i.e., term, maybe abbreviation, concept domain, definition,UID) a bit more 'directly' (immediately returning the values), perhaps without theUID.3. Hold on. Where do mandatory abbreviations fit in?
Recall: @JacquesCarette mentioned
DrasilConceptin #3314 (comment):The context is
CI, which is essentially anIdeaDict(recall: vocabulary: noun + maybe abbreviation) with the requirement that the abbreviation must exist. Now, aCIcould not fulfill the requirements of aConceptbecause it has no definition of the noun it declares.3.1. Should
CIalso carry a definition?If some concepts so common/required to have an abbreviation, shouldn't they also be required to have a (prose) definition as well?
Additional Notes
In the future, when we have typed
UIDreferences, theUIDreferences should also be typed. This might be something good to consider in current design.