                            expressions
                            (take do-this-many expressions)))))))))
 
+(deftest roundtrip-small-grammar
+  (let [do-this-many 1000]
+    (is (empty?
+         (filter #(not (nil? %))
+                 (let [expressions
+                       (generate-all {:synsem {:cat :verb
+                                               :sem {:tense :present}
+                                               :subcat '()}}
+                                     small)]
+                   (pmap (fn [expr] 
+                           (if (empty? (parse (fo expr) small))
+                             (do
+                               (log/error (str "failed to parse: " (fo expr)))
+                             {:fo (fo expr)
+                              :expr (get-in expr [:synsem :sem])
+                              :sem (get-in (first (parse (fo expr) small))
+                                           [:synsem :sem])})
+                             (log/info (str "parse OK:" (fo expr)))))
+                         (if (= do-this-many :all)
+                           expressions
+                           (take do-this-many expressions)))))))))
+
   


        
(deftest round-trip-1
  (let [expr (generate {:synsem {:sem {:spec {:def :def} 
                                       :mod {:pred :difficile}
                                       :number :sing
                                     :pred :donna}}} 
                       np-grammar)]
    (is (= (fo expr) "la donna difficile"))
    (is (not (empty? (parse (fo expr) np-grammar))))))


                 :expr (get-in expr [:synsem :sem])
                 :sem (get-in (first (parse (fo expr) np-grammar))
                              [:synsem :sem])})))))
(deftest roundtrip-np-grammar
  (let [do-this-many 100]
    (is (empty?
         (filter #(not (nil? %))
