コード例 #1
0
ファイル: ivy_graph_ui.py プロジェクト: simudream/ivy
 def diagram(self):
     if self.parent != None and self.g.parent_state != None:
         self.checkpoint()
         g = self.g
         ##            print "g.constraints: %s" % g.constraints
         if hasattr(g, 'reverse_result'):
             #                "print reverse diagram"
             dgm = ivy_interp.diagram(self.g.parent_state,
                                      self.g.reverse_result[1],
                                      extra_axioms=self.g.reverse_result[0])
         else:
             dgm = ivy_interp.diagram(self.g.parent_state, self.g.state)
         if dgm != None:
             goal = lu.reskolemize_clauses(
                 dgm, self.g.parent_state.domain.skolemizer())
             g.constraints = goal
             g.set_state(goal)
             self.update()
         else:
             dlg = Toplevel(self)
             Label(dlg, text="The current state is vacuous.").pack()
             b = Button(dlg, text="OK", command=dlg.destroy)
             b.pack(padx=5, side=TOP)
             uu.center_window_on_window(dlg, self.root)
             self.tk.wait_window(dlg)
コード例 #2
0
ファイル: ivy_graph_ui.py プロジェクト: xornand/ivy
 def diagram(self):
     if self.parent != None and self.g.parent_state != None:
         self.checkpoint()
         g = self.g
         if hasattr(g, "reverse_result"):
             dgm = ivy_interp.diagram(
                 self.g.parent_state, self.g.reverse_result[1], extra_axioms=self.g.reverse_result[0]
             )
         else:
             dgm = ivy_interp.diagram(self.g.parent_state, self.g.state)
         if dgm != None:
             goal = lu.reskolemize_clauses(dgm, self.g.parent_state.domain.skolemizer())
             g.constraints = goal
             g.set_state(goal)
             self.update()
         else:
             self.ui_parent.ok_dialog("The current state is vacuous.")
コード例 #3
0
 def diagram(self):
     if self.parent != None and self.g.parent_state != None:
         self.checkpoint()
         g = self.g
         if hasattr(g,'reverse_result'):
             dgm = ivy_interp.diagram(self.g.parent_state,
                                      self.g.reverse_result[1],
                                      extra_axioms = self.g.reverse_result[0])
         else:
             dgm = ivy_interp.diagram(self.g.parent_state,self.g.state)
         if dgm != None:
             goal = lu.reskolemize_clauses(dgm,self.g.parent_state.domain.skolemizer())
             g.constraints = goal
             g.set_state(goal)
             self.update()
         else:
             self.ui_parent.ok_dialog("The current state is vacuous.")
コード例 #4
0
ファイル: ivy_graph_ui.py プロジェクト: ZZHGit/ivy
    def diagram(self):
        if self.parent != None and self.g.parent_state != None:
            self.checkpoint()
            g = self.g
##            print "g.constraints: %s" % g.constraints
            if hasattr(g,'reverse_result'):
#                "print reverse diagram"
                dgm = ivy_interp.diagram(self.g.parent_state,self.g.reverse_result[1],extra_axioms = self.g.reverse_result[0])
            else:
                dgm = ivy_interp.diagram(self.g.parent_state,self.g.state)
            if dgm != None:
                goal = lu.reskolemize_clauses(dgm,self.g.parent_state.domain.skolemizer())
                g.constraints = goal
                g.set_state(goal)
                self.update()
            else:
                dlg = Toplevel(self)
                Label(dlg, text="The current state is vacuous.").pack()
                b = Button(dlg, text="OK", command=dlg.destroy)
                b.pack(padx=5,side=TOP)
                uu.center_window_on_window(dlg,self.root)
                self.tk.wait_window(dlg)