% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % File: clogic.dtr % % Purpose: define logic for working with constraints % % Author: Lionel Moser, December 1991 % % Email: moser@bnr.ca % % Documentation: Cognitive Science Research Paper CSRP 216, Univ. Sussex % % Related Files: arglogic.dtr, arglists.dtr, clogic.dtr, sets.dtr % % Version: 7.01 % % % % Copyright (c) University of Sussex 1991. All rights reserved. % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % # load 'arglists.dtr'. # load 'arglogic.dtr'. % Moser, Lionel, "Lexical constraints in DATR," Cognitive Science % Research Paper CSRP 216, University of Sussex, Brighton, % 1992. % % DATR contains no special features to support testing of % equality, negation, disjunction, or multiple inheritance. % Nevertheless, given an appropriate interpretation it is % possible, within DATR's existing syntax and semantics, to % represent these operations. In this paper we review the % technique known as `negative path extension', and show how % it can be used to reconstruct negation, disjunction, and % equality testing. We then show how these operations can be % used to define what are essentially meta-level constraints % on DATR lexical derivation. % Variable $terminal must be defined elsewhere if loading this file from some % other file. % # vars $terminal: alpha beta gamma 1 2 3 undef. % Polyadic AND % And: == % true - if all bools are true; % false - if any bools are false. And: <> == '**** ERROR: (And) Invalid argument' <;> == true == <> == false. % Polyadic OR % Or: == % true - if any bool is true; % false - if no bool is true. Or: <> == '**** ERROR: (Or) Invalid argument' <;> == '**** ERROR: (Or) Nil bool list' == true == false == true. % Negation Not: <> == '**** ERROR: (Not) Invalid argument' == false == true. % Implication Implies: <> == true == false. % We assume a default value of 'undef' for any path lacking a value % within the descriptive domain of the theory. % A path is defined if it does not extend 'undef'. Is_defined: == false <> == true. % Safe: % A path is `safe' if it satisfies its constraints when evaluated with % respect to the global context. If the path is safe, then return this % value; if it is not safe, return a message. Safe: <> == ">> == "<>" == 'constraint violation'. % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % The next line is the Revision Control System Archive Id: do not delete it. % $Id: archive.dtr,v 1.1 1997/04/09 20:40:33 root Exp $