The createm macro creates a new instance, and then calls the Loom instance classifier to compute the type of the instance (and of any other instances currently on the classify queues).
The concept argument is the concept, or the name of the concept, to be used as the creation type of the new instance. When no concept is supplied, the creation type is Thing.
The kb argument is the knowledge base in which the new instance will be interned. This defaults to the current knowledge base.
If the add-suffix-p argument is t, identifier is suffixed with a unique integer. If identifier is nil, this is a no-op.
If the clos-instance-p argument is t, or if the global feature :prefer-clos-instances is set, a CLOS instance (see make-object) is created instead of a Loom instance. If there is no existing CLOS class corresponding to concept, Loom attempts to create the needed class. If this attempt fails, or if concept is nil, a standard Loom instance is created, and a warning is issued unless the value of clos-instance-p is :no-warning.
If identifier is the same as the identifier of an existing instance, Loom asks whether the user wants to clobber the old instance (and possibly compromise the integrity of the database) or ignore the request for a new instance.
The creation type of an instance can never be retracted.
(createm 'Joe 'A) ==> |I|JOE (create 'Fred nil) ==> |I|FRED (createm nil (fc A) :kb (find-kb "USER-KB")) ==> |I|A-13 (create 'Sue 'A :clos-instance-p t) ==> |i|SUE (create nil 'A :clos-instance-p t) ==> #<A #X20FDDFE> (createm 'Fred nil :add-suffix-p t) ==> |I|FRED-14 (create nil nil :clos-instance-p t) ==> |I|THING-15