<commit_before>package hdm.pk070.jscheme.environment;

import hdm.pk070.jscheme.obj.SchemeObject;
import hdm.pk070.jscheme.obj.type.SchemeSymbol;

import java.util.Objects;

/**
 * This class defines the JScheme global environment. The global environment's job is to store bindings between
 * {@link SchemeSymbol}s like 'abc' and their values (of type string, number, ...).
 */
public class GlobalEnvironment {

    private static GlobalEnvironment globalEnvironment = null;

    public static GlobalEnvironment getInstance() {
        if (Objects.isNull(globalEnvironment)) {
            globalEnvironment = new GlobalEnvironment();
        }
        return globalEnvironment;
    }


    private GlobalEnvironment() {
    }

    public SchemeObject get(SchemeSymbol expression) {
        return null;
    }

    public void put(SchemeSymbol envKey, SchemeObject envValue) {
        return;
    }
}<commit_msg>Added 'roadmap' in the form of comments and TODOs<commit_after>package hdm.pk070.jscheme.environment;

import hdm.pk070.jscheme.obj.SchemeObject;
import hdm.pk070.jscheme.obj.type.SchemeSymbol;

import java.util.Objects;

/**
 * This class defines the JScheme global environment. The global environment's job is to store bindings between
 * {@link SchemeSymbol}s like 'abc' and their values (of type string, number, ...).
 */
public class GlobalEnvironment {

    private static final int INITIAL_GLOBAL_ENV_SIZE = 511;

    private static GlobalEnvironment globalEnvironment = null;
    private static int currentGlobalEnvSize = INITIAL_GLOBAL_ENV_SIZE;

    public static GlobalEnvironment getInstance() {
        if (Objects.isNull(globalEnvironment)) {
            globalEnvironment = new GlobalEnvironment();
        }
        return globalEnvironment;
    }


    private GlobalEnvironment() {
    }

    public SchemeObject get(SchemeSymbol expression) {
        // TODO: implementation
        return null;
    }

    public void put(SchemeSymbol envKey, SchemeObject envValue) {
        // 1. Create numeric key based on envKey (maybe hashcode?)
        // 2. Compute startIndex = key (step 1) % current size of global env
        // 3. Before searching the next free slot, set nextIndex = startIndex (see step 2)
        return;
    }
}
{'fraction_non_alphanumeric': 0.08196721311475409, 'fraction_numerical': 0.011519716437749225, 'mean_word_length': 3.2284644194756553, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7391958', 'n_tokens_mistral': 630, 'n_tokens_neox': 579, 'n_words': 192}