Models Syntax

Legal class and tag names are strings starting with a letter or digit, followed by additional letters, digits or underscores. The use of other characters should be avoided even if they "work". Names cannot include spaces. Special characters such as '?' or '#', when used as the first character of a name, will be recognized as a class or constructed type respectively. (Constructed types are discussed elsewhere in the tutorial).

These rules do not apply to object names, which can have spaces and other non-alphanumeric characters.

Models can violate syntactical rules in many other ways. Improper alignment signals a serious error and will abort reinitialization immediately. A wide variety of errors are "tolerated" in that ACEDB reports them before exiting (still without accepting the models). Tace, the command line version of ACEDB, is very convenient for screening a models file for structural errors. It parses the models in one fell swoop and writes the errors it finds to the screen and to log file in the database subdirectory. Unfortunately some errors cause ACEDB to exit immediately, so several passes may be required to detect every error.

For example, consider the following model:

 
?Person Age Int
        Height Float Weight Float
        Sex UNIQUE
        Friend #Friend Text
        Pet ?Pet XREF Owner

?Pet Species UNIQUE Cat
                    Dog
Reinitialization with these models results in the following report:

 Database directory: /rusty/dbs/testdb
The file /rusty/dbs/testdb/database/ACEDB.wrm does not exist, 
indicating that the database is empty.
  Should I re-initialise the system? (y or n) y
//!! Model error: tag Weight outside rooted subtree in model ?Person
//!! Model error: UNIQUE in model ?Person with nothing to the right
//!! Model error: something right of subtype ?Friend in model ?Person
//!! Model error: no model for subtype ?Friend in model ?Person
//!! Model error: In model ?Person, tag Pet XREF's to tag Owner in class ?Pet
             can't find tag Owner in model ?Pet
//!! Errors in model file
>
Here is a more complete list of possible errors:

DOWN from UNIQUE in model "M"
UNIQUE in model "M" with nothing to the right
something right of REPEAT in model "M"
something down from REPEAT in model "M"
something down from COORD in model "M"
COORD not preceeded by Int or Float in model "M"
something right of attach query "Q" in model "M"
something down from attach query "Q" in model "M"
ANY with something DOWN in model "M"
something right of subtype "S" in model "M"
something down from subtype "S" in model "M"
no model for subtype "S" in model "M"
empty model for subtype "S" in model "M"
tag "T" outside rooted subtree in model "M"
duplicate tag "T" in model "M"
XREF from "X" not a class in model "M"
DOWN from XREF "X" in model "M"
no tag after XREF from "X" in model "M"
down from tag after XREF from "X" in model "M"
non-tag "N" in column in model "M"
In model "M" tag "T1" XREF's to tag "T2" in class "C"
  can't find tag "T2" in model "C"
In model "M" tag "T1" XREF's to tag "T2" in class "C"
  can't find model "C"