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

        Arguments:
        - `args`: command line options
        """
        D = DirectedAcyclicGraphHelper.obtain_graph(args)
        return StoneFormula(D, args.s)
Example #2
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)
Example #3
0
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D = DirectedAcyclicGraphHelper.obtain_graph(args)
        try:
            return StoneFormula(D, args.s)
        except ValueError as e:
            print("\nError: {}".format(e), file=sys.stderr)
            sys.exit(-1)
Example #4
0
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D= DirectedAcyclicGraphHelper.obtain_graph(args)
        try:
            return StoneFormula(D,args.s)
        except ValueError,e :
            print("\nError: {}".format(e),file=sys.stderr)
            sys.exit(-1)
Example #5
0
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D= DirectedAcyclicGraphHelper.obtain_graph(args)
        try:
            return StoneFormula(D,args.s)
        except ValueError:
            print("\nError: Input graph must be a DAG, and a non negative # of stones.",file=sys.stderr)
            sys.exit(-1)
Example #6
0
    def build_cnf(args):
        """Build the pebbling formula

        Arguments:
        - `args`: command line options
        """
        D= DirectedAcyclicGraphHelper.obtain_graph(args)
        try:
            return PebblingFormula(D)
        except ValueError:
            print("\nError: input graph must be directed and acyclic.",file=sys.stderr)
            sys.exit(-1)
Example #7
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)