def create(name, type_, dynamic=False): if name.startswith(LogicalConstant.DYNAMIC_MARKER): name = name[len(LogicalConstant.DYNAMIC_MARKER):] dynamic = True from spf.mr.lambda_.logic_language_services import LogicLanguageServices ontology = LogicLanguageServices.get_ontology() if ontology is None: return LogicalConstant(name, type_) else: return ontology.get_or_add(LogicalConstant(name, type_), dynamic)
def equals(self, other, mapping=None): from spf.mr.lambda_.logic_language_services import LogicLanguageServices if LogicLanguageServices.get_ontology() is None: return isinstance(other, LogicalConstant) and self.do_equals(other) else: return id(self) == id(other)