<commit_before>/**
 * @author <NAME>
 * @author <NAME>
 */

import java.util.HashMap;

class Table {
    int arity;
    int[][] matrix;

    public Table(int arity) {
        this.arity = arity;
        this.matrix = new int[(int) Math.pow(2, arity)][arity+1];
    }
}

public class Evaluator {

    public static void main(String[] args) {
        Arquivo io = new Arquivo("input.txt", "output.txt");

        int N, arity, expressions;
        char operator;
        String[] exprDB;
        HashMap<Character, Table> tableSet = new HashMap<Character, Table>();
        Table table;

        N = io.readInt();
        System.out.println("Operators = " + N + "\n");

        while (N > 0) {
            operator = io.readString().charAt(0);
            arity = io.readInt();

            System.out.println("Operator = " + operator);
            System.out.println("Arity = " + arity);

            table = new Table(arity);

            tableSet.put(operator, table);

            for (int i = 0; i < (int) Math.pow(2, arity); i++) {
                for (int j = 0; j < (arity + 1); j++) {
                    int num = io.readInt();
                    System.out.print(num + " ");

                    table.matrix[i][j] = num;
                }

                System.out.println();
            }

            System.out.println();
            N--;
        }

        expressions = io.readInt();

        exprDB = new String[expressions];

        for (int i = 0; i < exprDB.length; i++) {
            String expr = io.readString();

            System.out.println("Expression = " + expr);
            exprDB[i] = expr;
        }
    }

}
<commit_msg>Adding isWFF function.<commit_after>/**
 * @author <NAME>
 * @author <NAME>
 */

import java.util.HashMap;

class Table {
    int arity;
    int[][] matrix;

    public Table(int arity) {
        this.arity = arity;
        this.matrix = new int[(int) Math.pow(2, arity)][arity+1];
    }
}

public class Evaluator {

    /**
     * Returns true if the expression is well-formed. Returns false otherwise.
     */
    public static boolean isWFF(String expr) {
        return true;
    }

    public static void main(String[] args) {
        Arquivo io = new Arquivo("input.txt", "output.txt");

        int N, arity, expressions;
        char operator;
        String[] exprDB;
        HashMap<Character, Table> tableSet = new HashMap<Character, Table>();
        Table table;

        N = io.readInt();
        System.out.println("Operators = " + N + "\n");

        while (N > 0) {
            operator = io.readString().charAt(0);
            arity = io.readInt();

            System.out.println("Operator = " + operator);
            System.out.println("Arity = " + arity);

            table = new Table(arity);

            tableSet.put(operator, table);

            for (int i = 0; i < (int) Math.pow(2, arity); i++) {
                for (int j = 0; j < (arity + 1); j++) {
                    int num = io.readInt();
                    System.out.print(num + " ");

                    table.matrix[i][j] = num;
                }

                System.out.println();
            }

            System.out.println();
            N--;
        }

        expressions = io.readInt();

        exprDB = new String[expressions];

        for (int i = 0; i < exprDB.length; i++) {
            String expr = io.readString();

            System.out.println("Expression = " + expr);
            exprDB[i] = expr;
        }
    }

}

{'fraction_non_alphanumeric': 0.1462925851703407, 'fraction_numerical': 0.005153163469796736, 'mean_word_length': 1.56158357771261, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 13, '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': '465488', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1030, 'n_words': 255}