Domain XML reference¶
Baseline: Tala 31.0.1 (tala/ddd/schemas/domain.xsd, the XML compiler, and the DDD tests). A domain describes goals and their plans, plus the queries, question parameters, iterators, validators, default questions, and dependencies used by those plans.
Root and top-level structure¶
domain is the document root. name is required; is_super_domain is an optional Boolean. The root can contain:
| Element | Purpose |
|---|---|
goal | A perform-action or resolve-question goal and its plan metadata. |
parameters | Question-specific response, search, and realization settings. |
query | Domain answers by implication, random selection, or enumeration. |
iterator | A named enumeration consumed by an iterate plan item. |
validator | Valid parameter configurations. |
default_question | A question considered by default. |
dependency | A dependency between questions. |
<domain name="RoomBooking" is_super_domain="true">
<goal type="perform" action="book_room">
<plan>
<findout type="wh_question" predicate="room_date"/>
<invoke_service_action name="BookRoom"/>
</plan>
<downdate_condition>
<in_beliefs_or_commitments>
<service_action_terminated name="BookRoom"/>
</in_beliefs_or_commitments>
</downdate_condition>
</goal>
</domain>
The example assumes that book_room is an ontology action, room_date is an ontology predicate, and BookRoom is declared in the service interface.
Goals and questions¶
The compiler requires goal/@type: perform or resolve. A perform goal names an ontology action. A resolve goal names a question. The schema's question types are goal, wh_question, kpq, alt_question, and yn_question; the question's predicate/proposition must be compatible with the ontology.
The schema permits goal children for plan, postcond, explicit downdate_condition, postplan, proposition, preferred, and superaction. Use explicit downdate_condition elements for current plan-completion semantics; the XML compiler does not process postcond.
Plans and plan items¶
Plan items are interpreted in document order. The Tala 31.0.1 XML schema recognizes:
forget, forget_shared, forget_all, log, greet, invoke_service_query, invoke_domain_query, findout, raise, bind, invoke_service_action, get_done, assume_issue, assume_shared, assume_system_belief, inform, if, once, jumpto, signal_action_completion, signal_action_failure, end_turn, reset_domain_query, iterate, and change_ddd.
if contains one condition and optional then/else plans. once contains plan items and supports an optional id. findout, raise, service/domain queries, and several other items refer to the question language above; their individual XML attributes are defined in domain.xsd and compiled by tala/ddd/ddd_xml_compiler.py.
Conditions and downdating¶
Condition expressions include and, or, not, has_value, has_shared_value, has_private_value, in_shared_commitments, in_private_beliefs, in_beliefs_or_commitments, and has_more_items. and/or contain one or more child conditions; not contains exactly one.
The in_* forms accept either predicate/value attributes or one child proposition. Child forms include predicate propositions, perform/resolve goals, service-action started/terminated propositions, action/question status, resolvedness, and knowledge-precondition propositions. For example:
<in_beliefs_or_commitments>
<service_action_terminated name="BookRoom"/>
</in_beliefs_or_commitments>
service_action_terminated means the service call has terminated; it does not indicate success. TDM stores the proposition in shared commitments or private beliefs depending on postconfirmation, which is why in_beliefs_or_commitments can be useful in a downdate condition.
Compatibility detail: domain.xsd declares invoke_service_action/@downdate_plan with an XSD default of true, but Tala 31.0.1's XML compiler defaults a missing attribute to false, and the DDD model no longer derives implicit downdate conditions from it. Do not use this attribute to end a plan; specify an explicit downdate_condition. Tala tests cover the no-implicit-downdate rule.
Queries and question parameters¶
A domain query declares a predicate and one of three forms: one or more implications, select_at_random, or enumerate. An iterator wraps an enumeration and can set randomize and limit. has_more_items checks either a predicate-backed query or a named iterator.
Question parameters configure options including source, incremental, verbalize, always_ground, allow_goal_accommodation, hit limits, zero-hit/too-many-hit actions, service queries, alternatives, ask-features, hints, and always-relevant behavior. The complete field/child contract is in domain.xsd. <background> is not part of the Tala 31.0.1 domain schema; do not use it in new DDDs.
Executable sources¶
- XML structure:
tala/ddd/schemas/domain.xsd - XML compiler and semantic checks:
tala/ddd/ddd_xml_compiler.py - Focused tests:
tala/ddd/test/test_ddd_xml_compiler.py
Find a domain construct¶
- Domain declarations: goals, plans, question parameters, queries, iterators, validators, and defaults/dependencies.
- Plan items: direct links to every supported plan item.
- Conditions and downdate conditions.
Use this Tala 31.0.1 reference and the executable schema/compiler contract when checking supported syntax.