<commit_before>﻿using HCEngine.Default;

namespace HCEngine
{
    /// <summary>
    /// Interface for the entry point of the HC Engine.
    /// </summary>
    public class Engine
    {
        /// <summary>
        /// Constructor without using the default factory
        /// </summary>
        /// <param name="factory">Factory to build the default scope</param>
        public Engine(IScopeFactory factory)
        {
            Reader = new SourceReader();
            Structure = new DefaultLanguageStructure();
            DefaultScope = factory.MakeScope();
        }

        /// <summary>
        /// Default constructor
        /// </summary>
        public Engine()
            :this(new ScopeFactory())
        { }

        /// <summary>
        /// The <see cref="ISourceReader" /> used for reading sources.
        /// </summary>
        public ISourceReader Reader
        {
            get;
            set;
        }

        /// <summary>
        /// Structure of the script language to interpret.
        /// </summary>
        public IScriptStructureDefinition Structure
        {
            get;
            set;
        }

        /// <summary>
        /// The default scope for script executions.
        /// </summary>
        public IExecutionScope DefaultScope
        {
            get;
            private set;
        }

        /// <summary>
        /// Reads a script source and builds the corresponding <see cref="IScript"/> object;
        /// </summary>
        /// <param name="source">Text of the script</param>
        /// <returns>The corresponding <see cref="IScript"/></returns>
        IScript LoadScript(string source)
        {
            throw new System.NotImplementedException();
        }
    }
}
<commit_msg>Sealed engine class (devs should change components, not the implementation)<commit_after>﻿using HCEngine.Default;

namespace HCEngine
{
    /// <summary>
    /// Interface for the entry point of the HC Engine.
    /// </summary>
    public sealed class Engine
    {
        /// <summary>
        /// Constructor without using the default factory
        /// </summary>
        /// <param name="factory">Factory to build the default scope</param>
        public Engine(IScopeFactory factory)
        {
            Reader = new SourceReader();
            Structure = new DefaultLanguageStructure();
            DefaultScope = factory.MakeScope();
        }

        /// <summary>
        /// Default constructor
        /// </summary>
        public Engine()
            :this(new ScopeFactory())
        { }

        /// <summary>
        /// The <see cref="ISourceReader" /> used for reading sources.
        /// </summary>
        public ISourceReader Reader
        {
            get;
            set;
        }

        /// <summary>
        /// Structure of the script language to interpret.
        /// </summary>
        public IScriptStructureDefinition Structure
        {
            get;
            set;
        }

        /// <summary>
        /// The default scope for script executions.
        /// </summary>
        public IExecutionScope DefaultScope
        {
            get;
            private set;
        }

        /// <summary>
        /// Reads a script source and builds the corresponding <see cref="IScript"/> object;
        /// </summary>
        /// <param name="source">Text of the script</param>
        /// <returns>The corresponding <see cref="IScript"/></returns>
        IScript LoadScript(string source)
        {
            throw new System.NotImplementedException();
        }
    }
}

{'fraction_non_alphanumeric': 0.11631799163179916, 'fraction_numerical': 0.0, 'mean_word_length': 1.4578478409869773, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6314692', 'n_tokens_mistral': 880, 'n_tokens_neox': 856, 'n_words': 254}