def test_event_and_entity_property(self): coq_type = 'Parameter base : Event -> (Entity -> Prop).' nltk_type = convert_coq_to_nltk_type(coq_type) expected_nltk_type = {'base': read_type('<v,<e,t>>')} self.assertEqual(expected_nltk_type, nltk_type)
def test_entity_property_and_property_entity(self): coq_type = 'Parameter base : (Entity -> Prop) -> (Prop -> Entity).' nltk_type = convert_coq_to_nltk_type(coq_type) expected_nltk_type = {'base': read_type('<<e,t>,<t,e>>')} self.assertEqual(expected_nltk_type, nltk_type)
def test_entity_property_property(self): coq_type = 'Parameter base : Entity -> Prop -> Prop.' nltk_type = convert_coq_to_nltk_type(coq_type) expected_nltk_type = {'base': read_type('<e,<t,t>>')} self.assertEqual(expected_nltk_type, nltk_type)
def test_event(self): coq_type = 'Parameter base : Event.' nltk_type = convert_coq_to_nltk_type(coq_type) expected_nltk_type = {'base': read_type('v')} self.assertEqual(expected_nltk_type, nltk_type)
def test_property(self): coq_type = 'Parameter base : Prop.' nltk_type = convert_coq_to_nltk_type(coq_type) expected_nltk_type = {'base': read_type('t')} self.assertEqual(expected_nltk_type, nltk_type)
def test_entity(self): coq_sig = ['Parameter base1 : Entity.', 'Parameter base2 : Prop.'] nltk_sig = convert_coq_signatures_to_nltk(coq_sig) expected_nltk_sig = {'base1': read_type('e'), 'base2': read_type('t')} self.assertEqual(expected_nltk_sig, nltk_sig)