@Override
    public Object visitLogical_absent_stateful_source(SiddhiQLParser.Logical_absent_stateful_sourceContext ctx) {
//    logical_absent_stateful_source
//    : '(' logical_absent_stateful_source ')'
//    | standard_stateful_source AND NOT basic_source
//    | NOT basic_source AND standard_stateful_source
//    | standard_stateful_source AND basic_absent_pattern_source
//    | basic_absent_pattern_source AND standard_stateful_source
//    | basic_absent_pattern_source AND basic_absent_pattern_source
//    | standard_stateful_source OR basic_absent_pattern_source
//    | basic_absent_pattern_source OR standard_stateful_source
//    | basic_absent_pattern_source OR basic_absent_pattern_source
//    ;
        if (ctx.logical_absent_stateful_source() != null) {
            return visit(ctx.logical_absent_stateful_source());
        } else if (ctx.AND() != null) {
            if (ctx.basic_absent_pattern_source().size() == 2) {
                StateElement stateElement = State.logicalNotAnd(
                        (AbsentStreamStateElement) visit(ctx.basic_absent_pattern_source(0)),
                        (AbsentStreamStateElement) visit(ctx.basic_absent_pattern_source(1)));
                populateQueryContext(stateElement, ctx);
                return stateElement;
            } else {
                StreamStateElement presentStreamState = (StreamStateElement) visit(ctx.standard_stateful_source());
                AbsentStreamStateElement absentStreamState;
                if (!ctx.basic_absent_pattern_source().isEmpty()) {
                    absentStreamState = (AbsentStreamStateElement) visit(ctx.basic_absent_pattern_source(0));
                } else {
                    absentStreamState = State.logicalNot(new StreamStateElement((BasicSingleInputStream) visit(ctx
                            .basic_source())), null);
                }
                StateElement stateElement = State.logicalNotAnd(absentStreamState, presentStreamState);
                populateQueryContext(stateElement, ctx);
                return stateElement;
            }
        } else if (ctx.OR() != null) {
            if (ctx.basic_absent_pattern_source().size() == 2) {
                return State.logicalOr((AbsentStreamStateElement) visit(ctx.basic_absent_pattern_source(0)),
                        (AbsentStreamStateElement) visit(ctx.basic_absent_pattern_source(1)));
            } else {
                StreamStateElement streamStateElement1 = (StreamStateElement) visit(ctx.standard_stateful_source());
                AbsentStreamStateElement streamStateElement2 = (AbsentStreamStateElement) visit(ctx
                        .basic_absent_pattern_source(0));
                StateElement stateElement = State.logicalOr(streamStateElement2, streamStateElement1);
                populateQueryContext(stateElement, ctx);
                return stateElement;
            }
        } else {
            throw newSiddhiParserException(ctx);
        }
    }
{@inheritDoc}
<p>The default implementation returns the result of calling
{@link #visitChildren} on {@code ctx}.</p>

@param ctx
modules/siddhi-query-compiler/src/main/java/io/siddhi/query/compiler/internal/SiddhiQLBaseVisitorImpl.java