package prolog.model;

import java.io.*;
import prolog.util.ParameterMatchingError;

/**
 * <p>IStatement is the base interface for a constraint,
 * a interface to query facts. The extension of the spuerinterface IFact
 * is used to store the parameters in the relation and providing a name</p>
 */
public interface IStatement
	extends IFact
{
	/**
	 * Querries the statement for all Facts matching the given fact.
	 * For this purpose, the factdatabase and the statementmap is required.
	 * @param f is the fact pattern to search for
	 * @param l is the fact database
	 * @param constraints is the map containing statements to resolve external symbols
	 * @return a collection of facts matching the given fact
	 * @throws ParameterMatchingError
	 */
	public IFactList query( IFact f, IFactDb l, IStatementMap constraints )
		throws ParameterMatchingError;
}
