Documentation Center

  • Trial Software
  • Product Updates

Dom::BaseDomain

Root of the domain hierarchy

Description

Dom::BaseDomain is the root of the domain hierarchy as defined by the Dom package. Every domain of the package inherits from it.

The only purpose of Dom::BaseDomain is to supply all domains of the package with some basic methods like "hasProp". Elements of Dom::BaseDomain cannot be created.

Unlike other super-domains this domain does not impose any restrictions on the representation of the elements of its sub-domains. Thus it may be a super-domain for any domain created by a domain constructor.

Entries

"create_dom"

This domain entry is used to revive the domain when it is read from a binary MCode stream.

If this entry is present it is written to the MCode stream instead of the contents of the domain. When the stream is read it is used to create the domain.

If this entry does not exist all entries of the domain are written to the stream and read in later to create the domain.

Dom::BaseDomain defines "create_dom" to have the same value as the key of the domain, as stored in the entry "key". All domains of the Dom package inherit this entry, thus they must be created by the reader of the MCode stream by evaluating the expression stored in the key.

Methods

expand all

Mathematical Methods

equal — Test for mathematical equality

equal(x, y)

If this domain has the axiom Ax::canonicalRep, which implies that two domain elements are mathematically equal if and only if they are structurally equal, the kernel function _equal is used to decide the equality. In this case UNKNOWN is never returned.

If the axiom Ax::canonicalRep does not hold the method will return TRUE if x and y are structurally equal (in the sense of the function _equal) and UNKNOWN otherwise.

Conversion Methods

convert_to — Convert element

convert_to(x, T)

The implementation provided here can convert x to an element of this domain (the trivial case) or to an element of Dom::Expression (by using the method "expr", see Cat::BaseCategory).

TeX — Generate TeX output

TeX(x)

The default implementation provided here converts x into an expression using the method "expr" and then uses the function generate::TeX to convert the expression.

Access Methods

allSuperDomains — Return all super-domains

allSuperDomains()

The last, most general, super-domain of all domains of the Dom package is Dom::BaseDomain.

hasProp — Test for a certain property

hasProp(d)

hasProp(dc)

hasProp(a)

hasProp(ac)

hasProp(c)

hasProp(cc)

hasProp(dc) tests if this domain or a super-domain of it was defined by the domain constructor dc.

hasProp(a) tests if this domain has the axiom a.

hasProp(ac) tests if an axiom of this domain was defined by the axiom constructor ac.

hasProp(c) tests if this domain has the category c.

hasProp(cc) tests if a category of this domain was defined by the category constructor cc.

info — Print short information about this domain

info()

It prints out the super-domains, categories, axioms and entry names of this domain.

If an entry "info_str", which must be a string, is defined for this domain it is used to print the header line.

printMethods — Print out methods

printMethods(<sort>, <Table>)

printMethods(<sort>, Tree)

If no sorting function is given, sort is used as default.

Similar as above, using Tree provides only that the names of the entries are inserted into a tree, an element of the domain adt::Tree. The tree is both printed out and returned by the method.

Using neither Table nor Tree the function does the same as dom::printMethods(sort, Table).

subs — Avoid substitution

subs(x, , …)

Sub-domains should provide a new implementation of this method with sensible semantics if possible.

subsex — Avoid extended substitution

subsex(x, , …)

Sub-domains should provide a new implementation of this method with sensible semantics if possible.

undefinedEntries — Return missing entries

undefinedEntries()

An entry is missing if it should have a definition according to a category of the domain, but the definition is not present.

whichEntry — Return the domain or category implementing an entry

whichEntry(e)

FAIL is returned if no entry with the given name is defined for this domain.

Was this topic helpful?