;;; File: no-when-or-while.lisp
;;; this file will allow -ing clausess to be attached
;;; Susan Williams, July, 1995 (at FAW)

;;; Last saved in emacs: Time-stamp: <95/07/10 17:43:03 williams>

(in-package :penman)

(system
 :name TEMPORAL-NONPRECEDENCE-DEPENDENT-TYPE
 :inputs TEMPORAL-NONPRECEDENCE
 :outputs ((0.4 GENERAL-NONPRECEDENCE
		(LEXIFY SUBORDINATOR WHENRELATIVE))
	   (0.4 INCLUSION-NONPRECEDENCE
		(LEXIFY SUBORDINATOR WHILE))
	   ;; I added this feature:
	   (0.1 no-subordinator-nonprecedence
		(lexify subordinator zero)))
 :chooser TEMPORAL-NONPRECEDENCE-DEPENDENT-TYPE-CHOOSER
 :selector CHOICE-MASTER
 :region DEPENDENCY
 :metafunction LOGICAL)

(chooser
 :name TEMPORAL-NONPRECEDENCE-DEPENDENT-TYPE-CHOOSER 
 :definition ((ask (time-subordinator-q subordinator)
		   (nosubordinator (choose no-subordinator-nonprecedence))
		   (subordinator (ASK (TIME-INCLUSION-Q SUBORDINATOR)
				      (INCLUDED (CHOOSE INCLUSION-NONPRECEDENCE))
				      (NOTINCLUDED (CHOOSE GENERAL-NONPRECEDENCE)))
				 (* LP " 6-Nov-86 10:29:12"))))
 :comments ""
 :editor "WW"
 :date "July 10, 1995, at FAW"
)

(askoperator 
 :name TIME-subordinator-Q
 :domain TP
 :mode IMPLEMENTED
 :parameters (RELATION1)
 :english ("Do you want a subordinator (such as when or while) with " relation1 "?")
 :operatorcode TRIVIALDEFAULTCODE
 :parameterassociationtypes (MODIFICATIONSET)
 :answerset (subordinator nosubordinator)
 :trivialdefault subordinator)

(set-grammar-keyword-types)

;;; Sample spl:
(defvar no-subordinator-sample-spl 
  '(rst / temporal-noninclusive
	:domain (rub / nondirected-action 
		     :lex rub
		     :actor (bones / object
				   :lex bone
				   :number plural
				   :determiner the)
		     :manner (tog / quality
				  :lex together))
	:range (become / property-ascription
		       :lex become-ascriptive
		       :domain bones   
		       :time-subordinator-q nosubordinator
		       :range (rough / quality
				     :lex rough))))

;;; Note: I have used the upper model concept "temporal-noninclusive."
;;; We would really be better off with a new upper model concept at
;;; the same level.  I am open to suggestions for names.  Once we have
;;; a new upper model concept, I can write a function for the
;;; time-subordinator-q, to give it the right answer automatically.
