public FiniteAutomataEvaluationDTO(IFiniteAutomataStructure structure)
 {
     this.DFA                  = structure.IsDFA ? null : new FiniteAutomataStructureDto(structure.DFA);
     this.Original             = new FiniteAutomataStructureDto(structure.States);
     this.DFAInstructions      = structure.DFAInstructions;
     this.OriginalInstructions = structure.OriginalInstructions;
 }
示例#2
0
 public FiniteAutomataEvaluationDTO EvaluateFromInstructions(IConfiguration configuration, InstructionsInput input)
 {
     this.structure = new FiniteAutomataStructure(input);
     this.structure.GenerateOriginalInstructions(configuration);
     if (!structure.IsDFA)
     {
         structure.BuildDFA();
         structure.GenerateDFAInstructions(configuration);
     }
     return(new FiniteAutomataEvaluationDTO(this.structure));
 }