Contents:
Search: |
ObjectWhat is an object?An object is a non-empty set of monads. In addition: An object has: Furthermore: An object belongs to an object type. It is the object type of an object which determines which features it has. What was an object again?An object is a non-empty set of monads. This means that the fabric out of which an object is made is the monads. Since the set is non-empty, it means that you cannot have an object that is not tied to at least one monad. What about the set of monads?First, it has to be non-empty. There must be at least one monad in it. Second, it is quite arbitrary otherwise: You can have both singletons, contiguous objects, and discontiguous objects. What monads you assign to a given object depends on the meaning with respect to the textual flow and the other objects around it. What about the ID?It's an integer that's unique in the database, identifying this particular object uniquely. It's like a ROWID or a PRIMARY KEY ID in a relational database, except that it's globally unique, not just unique to the object type. Well, the uniqueness is only guaranteed if you let Emdros assign the ID at object creation time. You can also specify it yourself when you issue the CREATE OBJECT or CREATE OBJECTS WITH OBJECT TYPE statement, but in that case, you are on your own with respect to uniqueness. Technically, it's called an id_d. Why is the ID called an id_d?For historical reasons, it's actually called an id_d (ID in the database). It's to distinguish it from an id_m, which was something in the original MdF model on which the EMdF model is based. For full details of the MdF model, see the paper "The Standard MdF model" in the Emdros documentation. So is an id_d a monad?No!. An id_d is separate from the monads. You could say that the monads are the stuff out of which an object is made, but the id_d identifies the object uniquely. The id_d is akin to a person's "name" (say, "Fred Olington"), while the monads are his/her body. What about object type and feature?We'll get to those in a moment. OK, OK, but I'd like an example first!As you please: // Create the sentence "Fred was a genius." CREATE OBJECT FROM MONADS = {1} [Word surface := "Fred"; psp := proper_noun; ] GO CREATE OBJECT FROM MONADS = {2} [Word surface := "was"; psp := verb; ] GO CREATE OBJECT FROM MONADS = {3} [Word surface := "a"; psp = indefinite_article; ] GO CREATE OBJECT FROM MONADS = {4} [Word surface := "genius."; psp = noun; ] GO // Querying. Finds "a genius" in the above. SELECT ALL OBJECTS WHERE [Word psp=indefinite_article] [Word psp=noun] GO |