(in-package :penman)



;;;added by katerina 16/5/2000
(defun Conjunctive-Q-Code (initiating continuing)
  "If type of continuing is SET, or the pair are elements of a set, then conjunctive.
   Also, if INITIATING & CONTINUING are related by CONJUNCTION."
  (if (or (term-type-p continuing 'um-set)
	  (term-type-p initiating 'conjunction)
	  (dolist (graph *plan-graphs*)
	    (if (and (term-type-p graph 'um-set)
		     (not (term-type-p graph 'disjunctive-set)) ;; 2.0
		     (consp (term-graph-symbol (symbol-value graph)))
		     (member continuing (term-graph-symbol (symbol-value graph))))
		(return 't))
	    (if (and (term-type-p graph 'conjunction)
		     (term-eq-p initiating (fetch-subc-feature 'domain graph))
		     (term-eq-p continuing (fetch-subc-feature 'range graph)))
		(return 't))))
      'required 
      'notrequired))

;;;expressvocative added by katerina 26/5/2000
(defun Express-Hearer-Q-Code (hearer onus)
  "Depends on the speech-act type of ONUS."
  (declare (ignore hearer))
  (if (term-type-p (fetch-feature 'speech-act onus) 'question)
      'expresshearer
     (or 'withholdhearer
	'expressvocative)))




