Introduction
In 1987, Paul McKevitt and Yorick Wilks introduced Transfer Semantics (TS), a knowledge representation framework designed for an "Operating System Consultant" (OSCON). The goal was to bridge the gap between a novice user's natural language intent and the rigid syntax of operating systems like UNIX and TOPS-20. By formalizing how commands transfer objects from one state to another, OSCON provided an intelligent help system that understood the underlying goals of user queries.
The Problem: Bridging the Semantic Gap
Novice users often struggle with command-line interfaces because they think in terms of goals (e.g., "I want to see what's in this file") rather than specific syntax (e.g., cat filename). Furthermore, users frequently carry over mental models from one operating system to another, using terminology that doesn't exist in their current environment. OSCON was designed to parse these natural language requests, understand the intent of "object transfer," and provide the correct command sequence.
Methodology: Transfer Semantics (TS)
The core of the TS approach lies in its use of hierarchical frames and preference-based logic.
Object Frames
System entities such as files, directories, and passwords are represented in a hierarchical network of object frames. These frames use semantic relations like type-of and part-of to define the properties and inheritance of system objects.
As shown in the hierarchy above, a plain-file inherits properties from a non-directory-file, which in turn inherits from the general file object. This structure allows the system to generalize or specialize concepts during the inference process, helping it understand that a command applicable to a generic "file" might also apply to a "plain-file."
Action Frames
Action frames describe the "transfer" of objects between states. Each frame consists of preconditions (the state before the command), postconditions (the state after), and the specific actions or commands that facilitate the transition.
By mapping multiple commands (like cat, more, or lpr) to a single semantic intent, the system can suggest the most appropriate tool based on the user's specific goals and the current state of the object.
Key Innovation: Preference Semantics
Unlike traditional logic systems that require all conditions to be met, TS utilizes Preference Semantics. The system identifies "preferred" conditions—those that usually occur—rather than an exhaustive list of requirements. This flexibility allows OSCON to select the "best fit" frame for a user's query by matching the highest ratio of predicates, even if the user's description is slightly imprecise or uses non-standard terminology.
Inference Rules
To handle complex queries, the system employs two primary inference rules:
- Rule of Consequence: This allows the system to "strengthen" or "weaken" conditions. If a user asks to print a "device file," the system can traverse the object hierarchy to determine if the general "print file" action frame is still applicable.
- Rule of Composition: This handles "embedded queries" where one action is nested within another (e.g., "How do I print a listing of my directory?"). The system treats these as a stack of actions where the postcondition of the first (listing the directory) becomes the precondition for the second (printing).
Implementation and Results
Implemented in Common Lisp, OSCON demonstrated a robust ability to translate natural language queries into formal state-change representations. Qualitative results showed that the system could successfully handle:
- Dynamic Queries: Mapping actions like "How do I print a file with pages?" to the correct formal query.
- Concept Description Queries: Explaining terms like "read protection" by traversing the object hierarchy.
- Cross-OS Translation: Recognizing that a TOPS-20 user's query about "permanent storage limits" corresponds to UNIX "disk quotas."
Conclusion
The Transfer Semantics framework represented a significant step forward in building intelligent user interfaces. By focusing on the semantics of object transfer rather than keyword matching, McKevitt and Wilks created a system that prioritized user intent. While the manual engineering of knowledge bases remains a challenge, the principles of TS continue to influence how we think about natural language interfaces and semantic mapping today.
Summary updated