def test_conflict_free_trivially(self):
     baba = ExampleFrameworks.valid_BABA_framework()
     self.assertTrue(Semantics.conflict_free(baba, []))
     self.assertTrue(Semantics.conflict_free(baba, [a]))
     self.assertTrue(Semantics.conflict_free(baba, [a, b, c]))
     self.assertFalse(Semantics.conflict_free(baba, [b, d]))
     self.assertFalse(Semantics.conflict_free(baba, [a, b, c, d, e]))
 def test_derivable_trivially(self):
     baba = ExampleFrameworks.valid_BABA_framework()
     self.assertTrue(Semantics.derivable(baba, b, [b]))
     self.assertTrue(Semantics.derivable(baba, c, [c]))
     self.assertFalse(Semantics.derivable(baba, b, []))
     self.assertFalse(Semantics.derivable(baba, c, []))
 def test_contraries(self):
     baba = ExampleFrameworks.valid_BABA_framework()
     contraries = Semantics.contraries(baba, [b, c])
     self.assertIn(d, contraries)
     self.assertIn(e, contraries)
     self.assertEqual(2, len(contraries))
 def test_BABA_framework_is_flat(self):
     ExampleFrameworks.valid_BABA_framework()
     self.assertRaises(Semantics.InvalidBABAException,
                       ExampleFrameworks.invalid_non_flat_framework)
 def test_BABA_language_covers_all_sentences(self):
     ExampleFrameworks.valid_BABA_framework()
     self.assertRaises(Semantics.InvalidBABAException,
                       ExampleFrameworks.invalid_BABA_framework)
 def test_admissible_simple_framework(self):
     baba = ExampleFrameworks.valid_BABA_framework()
     self.assertTrue(Semantics.is_admissible(baba, [b, c]))