All Packages Class Hierarchy This Package Previous Next Index
Every Telos KB contains the following built-in Omega level individual classes:
Proposition
Class
Individual
IndividualClass
OmegaClass
Every Telos KB contains the following built-in Omega level attribute classes:
Attribute
AttributeClass
Every Telos KB contains the following built-in "level" classes:
Token
SClass
M1Class
M2Class
M3Class
Every Telos KB contains the following built-in "primitive" classes:
Integer
String
Real
All of the above mentioned classes are referred to as "builtin"
propositions in this API. They are called "builtin" since all instances of a
KB necessarily define and contain them. The associations that must be made
between builtins and between the builtins and propositions defined by users
of a KB are specified in the Telos formalization. The associations required
for the Omega classes are summerized in the documentation accompanying the
interfaces OmegaClass,
OmegaIndividualClass,
OmegaAttributeClass and
PrimitiveType. All implementations of this
interface must contain unique references to Proposition objects
representing each of the above builtin propositions. These Proposition
references to the builtin propositions would be obtainable through the
querying methods individual()
and attribute()
provided in this interface.
Some implementations of KB may in addition contain the following
"builtins": The Omega level attribute classes Single
and
Necessary
as well as the classes M4Class
,
M5Class
, M6Class
, etc.
This interface contains methods to add and remove propositions from a KB. Note that none of the built-in propositions can be removed from a KB.
telosName
in the KB.
untellInputFileName
of definitions and then TELLs into the KB
the contents the file tellInputFileName
of definitions.
tellInputFileName
of Telos definitions.
untellInputFileName
of Telos definitions.
identifier
in the
KB.
declarer
, categories categorie
, label
label
and target target
.
identifier
at the level level
.
untellInput
and then TELLs into the KB the string of
definitions in tellInput
.
public abstract String name()
public abstract int size()
public abstract boolean containsOnlyBuiltIns()
public abstract boolean isEmpty()
public abstract Attribute[] attributes()
public abstract Individual[] individuals()
public abstract Proposition[] builtIns()
public abstract Attribute attribute(String telosName)
telosName
in the KB. If the method finds an attribute with
telosName telosName
in the KB, it returns it;
otherwise, it throws an AttributeNotInKBException exception. See the
method telosName()
in the interface NamedObject
for a description of the naming conventions for attributes.
telosName
.
public abstract Individual individual(String identifier)
identifier
in the
KB. If the method finds an individual with the given information in the KB,
it returns it; otherwise, it throws an IndividualNotInKBException exception.
identifier
.
public abstract Attribute newAttribute(Proposition declarer, String categories[], String label, PropositionOrPrimitive target)
declarer
, categories categorie
, label
label
and target target
. Note that the passed
information to this method maps, via the procedure outlined in
NamedObject
, to a unique attribute telosName
;
conversely, an attribute telosName
uniquely specifies the
declarer, categories, label and target of an attribute.
As in newIndividual()
, if there is an attribute with the
same telosName already in the KB, the already created attribute is returned.
Otherwise an attribute with the passed declarer, categories, label and
target is created and added into the KB. In an implementation with semantic
checking, the attribute should only be created and installed after ensuring
that no semantic errors would result by taking such actions.
public abstract Individual newIndividual(String identifier, int level)
identifier
at the level level
. As in
newAttribute(...)
, if there is an individual with the same
identifier
already in the KB, the already created individual
is returned. Otherwise an individual with the passed identifier and level
is created and added to the KB. An implementation with semantic checking
should only create and add the individual to the KB if no semantic errors
would occur by taking such actions.
public abstract void removeAndDeleteProposition(Proposition prop)
public abstract void load(String fileName)
public abstract void save()
public abstract void closeKB()
public abstract void wipe()
public abstract void RETELL(String untellInput, String tellInput)
untellInput
and then TELLs into the KB the string of
definitions in tellInput
. Note that semantic checking is done
only after both the UNTELL and the TELL has been done, i.e., not once
after the UNTELL and again after the TELL. This is the difference between
using UNTELL and then TELL instead of RETELL.
The definitions in untellInput
and tellInput
can be in either s-expression format or in "text" format (but not in
both!). In an implementation that does syntactic and semantic checking,
syntactic and semantic errors should be reported by throwing a
RetellException
.
public abstract void fileRETELL(String untellInputFileName, String tellInputFileName)
untellInputFileName
of definitions and then TELLs into the KB
the contents the file tellInputFileName
of definitions. Note
that semantic checking is done only after both the UNTELL and the TELL have
been done, i.e., not once after the UNTELL and again after the TELL. This
is the difference between using UNTELL and then TELL instead of RETELL.
The definitions in untellInputFileName
and
tellInputFileName
can be in either s-expression format or in
"text" format (but not in both!). In an implementation that does syntactic
and semantic checking, syntactic and semantic errors should be reported by
throwing a RetellException.
public abstract void TELL(String tellInput)
TellException
.
public abstract void fileTELL(String tellInputFileName)
tellInputFileName
of Telos definitions. These definitions can be in either s-expression
format or in "text" format (but not both!). In an implementation that does
syntactic and semantic checking, syntactic and semantic errors should be
reported by throwing a TellException.
public abstract void UNTELL(String untellInput)
UntellException
.
public abstract void fileUNTELL(String untellInputFileName)
untellInputFileName
of Telos definitions. These definitions
can be in either s-expression format or in "text" format (but not both!).
In an implementation that does syntactic and semantic checking, syntactic
and semantic errors should be reported by throwing an UntellException.
All Packages Class Hierarchy This Package Previous Next Index