// ** This file was generated with DemFGen (vers:12/15/2010)

package csp;

import edu.neu.ccs.demeterf.lib.*;
import edu.neu.ccs.demeterf.lib.*;
import java.lang.reflect.*;
import scg.*;





/** Representation of CSPInstance */
public class CSPInstance implements InstanceI{
    protected List<Var> vars;
    protected Cons<Clause> clauses;

    /** Construct a(n) CSPInstance Instance */
    public CSPInstance(List<Var> vars, Cons<Clause> clauses){
        this.vars = vars;
        this.clauses = clauses;
    }
    /** Is the given object Equal to this CSPInstance? */
    public boolean equals(Object o){
        if(!(o instanceof CSPInstance))return false;
        if(o == this)return true;
        CSPInstance oo = (CSPInstance)o;
        return (((Object)vars).equals(oo.vars))&&(((Object)clauses).equals(oo.clauses));
    }
    /** Parse an instance of CSPInstance from the given String */
    public static CSPInstance parse(String inpt) throws csp.ParseException{
        return new csp.TheParser(new java.io.StringReader(inpt)).parse_CSPInstance();
    }
    /** Parse an instance of CSPInstance from the given Stream */
    public static CSPInstance parse(java.io.InputStream inpt) throws csp.ParseException{
        return new csp.TheParser(inpt).parse_CSPInstance();
    }
    /** Parse an instance of CSPInstance from the given Reader */
    public static CSPInstance parse(java.io.Reader inpt) throws csp.ParseException{
        return new csp.TheParser(inpt).parse_CSPInstance();
    }

    /** Field Class for CSPInstance.vars */
    public static class vars extends edu.neu.ccs.demeterf.Fields.any{}
    /** Field Class for CSPInstance.clauses */
    public static class clauses extends edu.neu.ccs.demeterf.Fields.any{}
 
	public double valid(Solution solution){
		return 0;
	}
	public double quality(Solution solution){
		return 0;
	}

    /** DGP method from Class Print */
    public String print(){ return csp.Print.PrintM(this); }
    /** Setter for field CSPInstance.vars */
    public void setVars(List<Var> _vars){ vars = _vars; }
    /** Setter for field CSPInstance.clauses */
    public void setClauses(Cons<Clause> _clauses){ clauses = _clauses; }
    /** Getter for field CSPInstance.vars */
    public List<Var> getVars(){ return vars; }
    /** Getter for field CSPInstance.clauses */
    public Cons<Clause> getClauses(){ return clauses; }

}


