コード例 #1
0
ファイル: formula.py プロジェクト: mit-dig/air-reasoner
 def __init__(self, store, uri=None):
     AnonymousNode.__init__(self, store, uri)
     self.canonical = None # Set to self if this has been canonicalized
     self.statements = []
     self._existentialVariables = Set()
     self._universalVariables = Set()
     self.stayOpen = 0   # If set, works as a knowledegbase, never canonicalized.
     self._redirections = {}  # Used for equalities
コード例 #2
0
 def __init__(self, store, uri=None):
     AnonymousNode.__init__(self, store, uri)
     self.canonical = None  # Set to self if this has been canonicalized
     self.statements = []
     self._existentialVariables = Set()
     self._universalVariables = Set()
     self.stayOpen = 0  # If set, works as a knowledegbase, never canonicalized.
     self._redirections = {}  # Used for equalities
コード例 #3
0
ファイル: formulaUnion.py プロジェクト: weyls/swap
    def __init__(self, store, uri=None):
        AnonymousNode.__init__(self, store, uri)
        self.canonical = None  # Set to self if this has been canonicalized
        self.components = components
        self.statements = []
        self.universals = []
        self.existentials = []
        for f in components:
            if f.canonical == None:
                raise RuntimeError("cannot form union of open formula %s" % f)
            self.statements += f.statements
            self._universalVariables += f.universals()
            self._existentialVariables += f.existentials()

        for list in self.existentials, self.universals:
            list.sort()
            i = 1
            while i < len(list) - 1:
                if list[i] is list[i - 1]: del list[i:i + 1]
                else: i += 1
コード例 #4
0
ファイル: formulaUnion.py プロジェクト: AwelEshetu/cwm
    def __init__(self, store, uri=None):
        AnonymousNode.__init__(self, store, uri)
        self.canonical = None # Set to self if this has been canonicalized
	self.components = components
	self.statements = []
	self.universals = []
	self.existentials = []
	for f in components:
	    if f.canonical == None:
		raise RuntimeError("cannot form union of open formula %s" % f)
	    self.statements += f.statements
	    self._universalVariables += f.universals()
	    self._existentialVariables += f.existentials()

	for list in self.existentials, self.universals:
	    list.sort()
	    i = 1
	    while i  <  len(list)-1:
		if list[i] is list[i-1]: del list[i:i+1]
		else: i+=1