package br.uem.din.architectureEvolution.caseStudy;

import java.io.BufferedReader;
import java.io.InputStreamReader;

import br.uem.din.architectureEvolution.representation.Architecture;

public class Main {
		
	public static void main(String[] args) throws Exception {
		BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
		MetricsMeasurer measurer = new MetricsMeasurer();
		
		System.out.println("Enter the path of the xmi file: ");
		String xmiFilePath = buffer.readLine();
				
		Architecture originalArchitecture = new Architecture(xmiFilePath);
		measurer.evalArchitecture(originalArchitecture, 0);
		
		Architecture architecture1 = new PLAPersistenceMutation1(originalArchitecture.deepClone()).execute();
		Architecture architecture2 =  new PLAPersistenceMutation2(originalArchitecture).execute();
		
		Architecture sequence1 =  new PLAExceptionHandlingMutation1(architecture1.deepClone()).execute();
		measurer.evalArchitecture(sequence1, 1);
		Architecture sequence2 =  new PLAExceptionHandlingMutation2(architecture1).execute();
		measurer.evalArchitecture(sequence2, 2);
		
		Architecture sequence3 =  new PLAExceptionHandlingMutation1(architecture2.deepClone()).execute();
		measurer.evalArchitecture(sequence3, 3);
		Architecture sequence4 =  new PLAExceptionHandlingMutation2(architecture2).execute();
		measurer.evalArchitecture(sequence4, 4);
	}
}
