Skip to content
Browse files

Add mark not-possible-sought to test-var variables.

Use when getting list of possible answer variables.
  • Loading branch information...
1 parent 89aee47 commit 22df72a2a3439d4866636ec369586fc85fd271eb @bvds committed Jul 2, 2012
Showing with 12 additions and 7 deletions.
  1. +9 −5 Help/Entry-API.cl
  2. +3 −2 KB/Ontology.cl
View
14 Help/Entry-API.cl
@@ -201,14 +201,18 @@
(match:best-model-matches
student
;; Sought quantities can be any scalar, including ones
- ;; that are only defined as side-effects.
+ ;; that are only defined as side-effects.
+ ;; But any test-var is excluded; see (def-qexp test-var ...).
(if all-scalars
(mapcar #'(lambda (x)
- (cons (expand-vars (new-english-find x))
- (list nil x)))
- (mapcar #'qvar-exp (problem-varindex *cp*)))
+ (cons (expand-vars (new-english-find (qvar-exp x)))
+ (list nil (qvar-exp x))))
+ (remove-if
+ #'(lambda (qvar) (member 'not-possible-sought
+ (qvar-marks qvar)))
+ (problem-varindex *cp*)))
(format-props *sg-entries*
- :allowed-tools (list tool-prop)))
+ :allowed-tools (list tool-prop)))
:cutoff initial-cutoff))
;; The value of the best correct match or the initial cutoff.
;; This is used to determine cutoffs for wrong quantity searches.
View
5 KB/Ontology.cl
@@ -362,10 +362,11 @@
(property ?vector)))
;; this is only used by implicit-eqns, so it should never be visible
-;; to the user
+;; to the user.
(def-qexp test-var (test-var . ?angle)
:units nil
- :restrictions nonnegative)
+ ;; See match-student-phrase0 where it is excluded from possible soughts
+ :restrictions (nonnegative not-possible-sought))
;; Special axis terms entered into the symbol table. These are not
;; used as quantities, but may need to be Englished.

0 comments on commit 22df72a

Please sign in to comment.
Something went wrong with that request. Please try again.