This document is in the process of being written, so expect missing and incomplete parts.
Below is a pseudocode representation of Ligature's data model.
LanguageTag(string)
TypeTag(string)
Individual(string)
Role(string)
ConceptName(string)
Filler =
| Individual of Individual
| String of String
| LangString of String, LanguageTag
| TypedString of String, TypeTag
| Float of f64
| Integer of bigint
Assertion =
| Triple(Individual, Role, Filler)
| Instance(Individual, ConceptName)
ConceptExpression =
| ConceptName of ConceptName
| Top
| Bottom
| And(List<ConceptExpression>)
| Exists(Role, Option<ConceptExpression>)
Definition =
| Implies(ConceptExpression, ConceptExpression)
| Equivalent(ConceptExpression, ConceptExpression)
PatternPart =
| TriplePattern of Individual | Slot, Role | Slot, Filler | Slot
| InstancePattern of Individual | Slot, ConceptName
Pattern = Set<PatternPart>
Rule = Pattern, Pattern
KnowledgeBase(Set<Definition>, Set<Rule>, Set<Assertion>)
An individual element of a domain that is being described. You can describe an element by making assertions involving the element. Below each type of assertion is explained.
Individuals can belong to sets known as concepts. We'll explain concepts further below. Below we are stating that a potato is a Vegetable.
instance(potato Vegetable)
Triples use a role to connect two elements. Triples are directed from one element to another.
For example we can use the knows role to connect alice and betty.
alice knows betty
or expressed in our pseudocode above
Triple(Individual("alice") Role("knows") Individual("betty"))
in Wander
triple(^alice ^knows ^betty)
Concepts are sets of Individuals. Examples could be the species of an animal or a tag used in a blog. As shown above you can say that Individuals are instances of concepts.
Ligature allows you to represent complex concepts with concept expresssions. Below I will explain each type of concept expression and how they can be combined.
There are two concepts built into Ligature, the top and bottom concepts. The top concept represents all elements in a system and the bottom concept is empty.
Using logical operators you can define complex concepts like this.
In slightly more formal notation
CarnivorousPlant ≡ Carnivore ⊓ Plant
betty : CarnivorousPlant
translated into pseudo-code
Equivalent(
AtomicConcept("CarnivorousPlant"),
AndConcept([
AtomicConcept("Carnivore"),
AtomicConcept("Plant")]))
Element(
Element("betty", None, None),
AtomicConcept("CarnivorousPlant"))
in Wander
equivalent(CarnivorousPlant and(Carnivore Plant))
Here we are saying the concept CarnivorousPlant is equivalent to the combination of being a Carnivore and being a Plant.
We then say that betty is a CarnivorousPlant.