// Path: core/Benchmarx/src/org/benchmarx/Configurator.java
// public class Configurator<D> {
// 
// 	private Map<D, Boolean> decisions = new HashMap<>();
// 
// 	/**
// 	 * Invoked to register b for decision d as part of a setup.
// 	 * 
// 	 * @param d
// 	 *            The decision to be registered.
// 	 * @param b
// 	 *            The value to be returned if this decision is requested.
// 	 * @return
// 	 */
// 	public Configurator<D> makeDecision(D d, boolean b) {
// 		decisions.put(d, b);
// 		return this;
// 	}
// 	
// 	/**
// 	 * Invoked by a {@link BXTool} during propagation to retrieve a yes or no
// 	 * for the passed decision.
// 	 * 
// 	 * @param decision
// 	 *            The decision for which a yes or no is requested.
// 	 * @return Returns a yes or no for the decision based on previously
// 	 *         registered values in {@link #makeDecision(Object, boolean)}.
// 	 * @throws IllegalArgumentException
// 	 *             A runtime exception if there is no registered value for the
// 	 *             requested decision. This can either indicate a faulty update
// 	 *             policy or an expected decision request from the
// 	 *             {@link BXTool} under test.
// 	 */
// 	public boolean decide(D decision) {
// 		if (decisions.containsKey(decision))
// 			return decisions.get(decision);
// 		else
// 			throw new IllegalArgumentException("I don't know how to handle: " + decision);
// 	}
// }
// 
// Path: core/Benchmarx/src/org/benchmarx/emf/BXToolForEMF.java
// public abstract class BXToolForEMF<S, T, D> implements BXTool<S, T, D> {
// 	
// 	private Comparator<S> src;
// 	private Comparator<T> trg;
// 	
// 	/**
// 	 * Requires a {@link Comparator} for each metamodel, which is used for
// 	 * asserting pre- and postconditions.
// 	 * 
// 	 * @param src
// 	 *            A {@link Comparator} for source models
// 	 * @param trg
// 	 *            A {@link Comparator} for target models
// 	 */
// 	public BXToolForEMF(Comparator<S> src, Comparator<T> trg){
// 		this.src = src;
// 		this.trg = trg;
// 	}
// 	
// 	/**
// 	 * Return the internally stored source model of the {@link BXTool}
// 	 * 
// 	 * @return An EMF-based source model
// 	 */
// 	public abstract S getSourceModel();
// 	
// 	/**
// 	 * See {@link #getSourceModel()}
// 	 */
// 	public abstract T getTargetModel();
// 	
// 	/**
// 	 * Prompt the tool to save the current state of all its models for debugging
// 	 * purposes. The tool decides what to save and where to save it.
// 	 * 
// 	 * @param name
// 	 *            A label that can be used to form the names of the models (for
// 	 *            easy identification).
// 	 */
// 	public abstract void saveModels(String name);
// 	
// 	private void assertModels(S source, T target) {
// 		src.assertEquals(source, getSourceModel());
// 		trg.assertEquals(target, getTargetModel());		
// 	}
// 	
// 	@Override
// 	public void assertPostcondition(S source, T target){
// 		assertModels(source, target);
// 	}
// 
// 	@Override
// 	public void assertPrecondition(S source, T target){
// 		assertModels(source, target);
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return getName();
// 	}
// }
// 
// Path: examples/familiestopersons/BenchmarxFamiliesToPersons/src/org/benchmarx/examples/familiestopersons/testsuite/Decisions.java
// public enum Decisions {
// 	PREFER_CREATING_PARENT_TO_CHILD,
// 	PREFER_EXISTING_FAMILY_TO_NEW
// }


import java.io.IOException;
import java.util.function.Consumer;
import org.benchmarx.Configurator;
import org.benchmarx.emf.BXToolForEMF;
import org.benchmarx.examples.familiestopersons.testsuite.Decisions;
import org.benchmarx.families.core.FamiliesComparator;
import org.benchmarx.persons.core.PersonsComparator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
import Families.FamiliesFactory;
import Families.FamilyRegister;
import Persons.PersonRegister;
import bitrafo.eval.familyperson.rules.decisions.ConfigurableTargetToSourceDecision;
import bitrafo.eval.familyperson.rules.Family2PersonTransformation;

package org.benchmarx.examples.familiestopersons.implementations.bxtend;



public class UbtXtendFamiliesToPersons extends BXToolForEMF<FamilyRegister, PersonRegister, Decisions> {
	
	private ResourceSet set = new ResourceSetImpl();
	private Resource source;
	private Resource target;
	private Resource corr;
	private Family2PersonTransformation f2pt;

// Path: core/Benchmarx/src/org/benchmarx/Configurator.java
// public class Configurator<D> {
// 
// 	private Map<D, Boolean> decisions = new HashMap<>();
// 
// 	/**
// 	 * Invoked to register b for decision d as part of a setup.
// 	 * 
// 	 * @param d
// 	 *            The decision to be registered.
// 	 * @param b
// 	 *            The value to be returned if this decision is requested.
// 	 * @return
// 	 */
// 	public Configurator<D> makeDecision(D d, boolean b) {
// 		decisions.put(d, b);
// 		return this;
// 	}
// 	
// 	/**
// 	 * Invoked by a {@link BXTool} during propagation to retrieve a yes or no
// 	 * for the passed decision.
// 	 * 
// 	 * @param decision
// 	 *            The decision for which a yes or no is requested.
// 	 * @return Returns a yes or no for the decision based on previously
// 	 *         registered values in {@link #makeDecision(Object, boolean)}.
// 	 * @throws IllegalArgumentException
// 	 *             A runtime exception if there is no registered value for the
// 	 *             requested decision. This can either indicate a faulty update
// 	 *             policy or an expected decision request from the
// 	 *             {@link BXTool} under test.
// 	 */
// 	public boolean decide(D decision) {
// 		if (decisions.containsKey(decision))
// 			return decisions.get(decision);
// 		else
// 			throw new IllegalArgumentException("I don't know how to handle: " + decision);
// 	}
// }
// 
// Path: core/Benchmarx/src/org/benchmarx/emf/BXToolForEMF.java
// public abstract class BXToolForEMF<S, T, D> implements BXTool<S, T, D> {
// 	
// 	private Comparator<S> src;
// 	private Comparator<T> trg;
// 	
// 	/**
// 	 * Requires a {@link Comparator} for each metamodel, which is used for
// 	 * asserting pre- and postconditions.
// 	 * 
// 	 * @param src
// 	 *            A {@link Comparator} for source models
// 	 * @param trg
// 	 *            A {@link Comparator} for target models
// 	 */
// 	public BXToolForEMF(Comparator<S> src, Comparator<T> trg){
// 		this.src = src;
// 		this.trg = trg;
// 	}
// 	
// 	/**
// 	 * Return the internally stored source model of the {@link BXTool}
// 	 * 
// 	 * @return An EMF-based source model
// 	 */
// 	public abstract S getSourceModel();
// 	
// 	/**
// 	 * See {@link #getSourceModel()}
// 	 */
// 	public abstract T getTargetModel();
// 	
// 	/**
// 	 * Prompt the tool to save the current state of all its models for debugging
// 	 * purposes. The tool decides what to save and where to save it.
// 	 * 
// 	 * @param name
// 	 *            A label that can be used to form the names of the models (for
// 	 *            easy identification).
// 	 */
// 	public abstract void saveModels(String name);
// 	
// 	private void assertModels(S source, T target) {
// 		src.assertEquals(source, getSourceModel());
// 		trg.assertEquals(target, getTargetModel());		
// 	}
// 	
// 	@Override
// 	public void assertPostcondition(S source, T target){
// 		assertModels(source, target);
// 	}
// 
// 	@Override
// 	public void assertPrecondition(S source, T target){
// 		assertModels(source, target);
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return getName();
// 	}
// }
// 
// Path: examples/familiestopersons/BenchmarxFamiliesToPersons/src/org/benchmarx/examples/familiestopersons/testsuite/Decisions.java
// public enum Decisions {
// 	PREFER_CREATING_PARENT_TO_CHILD,
// 	PREFER_EXISTING_FAMILY_TO_NEW
// }


// Path: examples/familiestopersons/BenchmarxFamiliesToPersons/src/org/benchmarx/examples/familiestopersons/implementations/bxtend/UbtXtendFamiliesToPersons.java
import java.io.IOException;
import java.util.function.Consumer;
import org.benchmarx.Configurator;
import org.benchmarx.emf.BXToolForEMF;
import org.benchmarx.examples.familiestopersons.testsuite.Decisions;
import org.benchmarx.families.core.FamiliesComparator;
import org.benchmarx.persons.core.PersonsComparator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
import Families.FamiliesFactory;
import Families.FamilyRegister;
import Persons.PersonRegister;
import bitrafo.eval.familyperson.rules.decisions.ConfigurableTargetToSourceDecision;
import bitrafo.eval.familyperson.rules.Family2PersonTransformation;

package org.benchmarx.examples.familiestopersons.implementations.bxtend;



public class UbtXtendFamiliesToPersons extends BXToolForEMF<FamilyRegister, PersonRegister, Decisions> {
	
	private ResourceSet set = new ResourceSetImpl();
	private Resource source;
	private Resource target;
	private Resource corr;
	private Family2PersonTransformation f2pt;

	private Configurator<Decisions> conf;
