예제 #1
0
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D = DirectedAcyclicGraphHelper.obtain_graph(args)
        B = BipartiteGraphHelper.obtain_graph(args, suffix="_mapping")
        return SparseStoneFormula(D, B)
예제 #2
0
    def build_cnf(args):
        """Build a Graph PHP formula according to the arguments

        Arguments:
        - `args`: command line options
        """
        G = BipartiteGraphHelper.obtain_graph(args) 
        return GraphPigeonholePrinciple(G,
                                        functional=args.functional,
                                        onto=args.onto)
예제 #3
0
    def build_cnf(args):
        """Build a Graph PHP formula according to the arguments

        Arguments:
        - `args`: command line options
        """
        G = BipartiteGraphHelper.obtain_graph(args)
        return GraphPigeonholePrinciple(G,
                                        functional=args.functional,
                                        onto=args.onto)
예제 #4
0
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D = DirectedAcyclicGraphHelper.obtain_graph(args)
        B = BipartiteGraphHelper.obtain_graph(args, suffix="_mapping")
        try:
            return SparseStoneFormula(D, B)
        except ValueError as e:
            print("\nError: {}".format(e), file=sys.stderr)
            sys.exit(-1)
예제 #5
0
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D= DirectedAcyclicGraphHelper.obtain_graph(args)
        B= BipartiteGraphHelper.obtain_graph(args,suffix="_mapping")
        try:
            return SparseStoneFormula(D,B)
        except ValueError,e:
            print("\nError: {}".format(e),file=sys.stderr)
            sys.exit(-1)
예제 #6
0
 def build_cnf(args):
     B = BipartiteGraphHelper.obtain_graph(args)
     return SubsetCardinalityFormula(B,args.equal)
예제 #7
0
 def build_cnf(args):
     B = BipartiteGraphHelper.obtain_graph(args)
     return SubsetCardinalityFormula(B, args.equal)