it segments error at line 13
typedef struct rl{
    Rule *rule;
    struct rl *next_node;
    int visited;
} RuleLL;

// ==================== Helper Functions ====================

// Check if the rule is already in the rule linked list
int is_in_ruleLL(RuleLL *head, Rule *rule) {
    RuleLL *curr = head;
    while (curr != NULL) {
        if (curr->rule == rule) {
            return 1;
        }
        curr = curr->next_node;
    }
    return 0;
}
