package de.dhbwstuttgart.typeinference.unify.interfaces;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
import de.dhbwstuttgart.typeinference.unify.model.Unifier;
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;

/**
 * Match
 * @author Martin Pluemicke
 * abgeleitet aus IUnify.java
 */
public interface IMatch {
	
	/**
	 * Finds the most general matcher sigma of the set {t1 =. t1',...,tn =. tn'} so that
	 * sigma(t1) = t1' , ... sigma(tn) = tn'. 
	 * @param terms The set of terms to be matched
	 * @return An optional of the most general matcher if it exists or an empty optional if there is no matcher.
	 */
	public Optional<Unifier> match(ArrayList<UnifyPair> termsList);
	

}
