Backward subsumes from clauses in the occurrence list of a given literal.
@param lit the literal
503379
private void backward(final int lit) {
        assert this.level == 0;
        assert this.dense;
        assert this.tostrengthen.empty();
        final CLOccs os = occs(lit);
        for (final CLClause c : os) {
            assert !c.redundant();
            this.stats.steps++;
            if (c.dumped()) { continue; }
            if (c.size() >= this.config.bwclslim) { continue; }
            if (satisfied(c)) { continue; }
            backward(c, lit);
        }
        while (!this.tostrengthen.empty()) {
            final Pair<CLClause, Integer> cplp = this.tostrengthen.back();
            this.tostrengthen.pop();
            strengthen(cplp.first(), cplp.second());
        }
    }
264799
public final void booleanLiteral() throws RecognitionException {
		int booleanLiteral_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 63) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:602:5: ( 'true' | 'false' )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:
			{
			if ( input.LA(1)==82||input.LA(1)==115 ) {
				input.consume();
				state.errorRecovery=false;
				state.failed=false;
			}
			else {
				if (state.backtracking>0) {state.failed=true; return;}
				MismatchedSetException mse = new MismatchedSetException(null,input);
				throw mse;
			}
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 63, booleanLiteral_StartIndex); }

		}
	}
586317
public final void ruleXCollectionLiteral() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:721:2: ( ( ( rule__XCollectionLiteral__Alternatives ) ) )
            // InternalXbase.g:722:2: ( ( rule__XCollectionLiteral__Alternatives ) )
            {
            // InternalXbase.g:722:2: ( ( rule__XCollectionLiteral__Alternatives ) )
            // InternalXbase.g:723:3: ( rule__XCollectionLiteral__Alternatives )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXCollectionLiteralAccess().getAlternatives()); 
            }
            // InternalXbase.g:724:3: ( rule__XCollectionLiteral__Alternatives )
            // InternalXbase.g:724:4: rule__XCollectionLiteral__Alternatives
            {
            pushFollow(FOLLOW_2);
            rule__XCollectionLiteral__Alternatives();

            state._fsp--;
            if (state.failed) return ;

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getXCollectionLiteralAccess().getAlternatives()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
1271034
public static <T extends StatementTree> Matcher<T> previousStatement(
      Matcher<StatementTree> matcher) {
    return (T statement, VisitorState state) -> {
      BlockTree block = state.findEnclosing(BlockTree.class);
      if (block == null) {
        return false;
      }
      List<? extends StatementTree> statements = block.getStatements();
      int idx = statements.indexOf(statement);
      if (idx <= 0) {
        // The block wrapping us doesn't contain this statement, or doesn't contain a previous
        // statement.
        return false;
      }
      return matcher.matches(statements.get(idx - 1), state);
    };
  }
1003600
public final void entryRuleLiteralCondition() throws RecognitionException {
        try {
            // InternalXtext.g:596:1: ( ruleLiteralCondition EOF )
            // InternalXtext.g:597:1: ruleLiteralCondition EOF
            {
             before(grammarAccess.getLiteralConditionRule()); 
            pushFollow(FollowSets000.FOLLOW_1);
            ruleLiteralCondition();

            state._fsp--;

             after(grammarAccess.getLiteralConditionRule()); 
            match(input,EOF,FollowSets000.FOLLOW_2); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
1369441
@Override
    public void backward() {
        VarTensor tmp = new VarTensor(yAdj); // copy
        tmp.elemMultiply(y);
        tmp = tmp.copyAndConvertAlgebra(RealAlgebra.getInstance());
        VarTensor xAdj = modInX.getOutputAdj();
        xAdj.elemAdd(tmp);
    }
1124630
protected boolean pullLit(final int lit) {
        if (val(lit) == VALUE_TRUE) { return false; }
        if (marked(lit) != 0) { return false; }
        mark(lit);
        bumpLit(lit);
        if (var(lit).level() == this.level) { return true; }
        markFrame(lit);
        this.addedlits.push(lit);
        return false;
    }
8904
protected void importLit(final int lit) {
        final int idx = Math.abs(lit);
        assert lit != 0;
        int newIdx;
        while (idx >= (newIdx = this.vars.size())) {
            this.vars.push(new CLVar());
            this.vals.push((byte) 0);
            this.phases.push((byte) 1);
            this.watches.push(new LNGVector<CLWatch>());
            this.watches.push(new LNGVector<CLWatch>());
            if (newIdx == 0) { continue; }
            this.decisions.push(newIdx);
        }
    }
572289
private static MtasSpanQuery createSubQueryFromGroupHit(List<String>[] subHit,
      boolean reverse, String field) {
    MtasSpanQuery query = null;
    if (subHit != null && subHit.length > 0) {
      List<MtasSpanSequenceItem> items = new ArrayList<>();
      List<String> subHitItem;
      for (int i = 0; i < subHit.length; i++) {
        MtasSpanQuery item = null;
        if (reverse) {
          subHitItem = subHit[(subHit.length - i - 1)];
        } else {
          subHitItem = subHit[i];
        }
        if (subHitItem.isEmpty()) {
          item = new MtasSpanMatchAllQuery(field);
        } else if (subHitItem.size() == 1) {
          Term term = new Term(field, subHitItem.get(0));
          item = new MtasSpanTermQuery(term);
        } else {
          MtasSpanQuery[] subList = new MtasSpanQuery[subHitItem.size()];
          for (int j = 0; j < subHitItem.size(); j++) {
            Term term = new Term(field, subHitItem.get(j));
            subList[j] = new MtasSpanTermQuery(term);
          }
          item = new MtasSpanAndQuery(subList);
        }
        items.add(new MtasSpanSequenceItem(item, false));
      }
      query = new MtasSpanSequenceQuery(items, null, null);
    }
    return query;
  }
70525
private static Variable[] litsAsVars(final Literal[] lits) {
    final Variable[] vars = new Variable[lits.length];
    for (int i = 0; i < vars.length; i++)
      vars[i] = lits[i].variable();
    return vars;
  }
1141819
public final void entryRuleXListLiteral() throws RecognitionException {
        try {
            // InternalXbase.g:759:1: ( ruleXListLiteral EOF )
            // InternalXbase.g:760:1: ruleXListLiteral EOF
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXListLiteralRule()); 
            }
            pushFollow(FOLLOW_1);
            ruleXListLiteral();

            state._fsp--;
            if (state.failed) return ;
            if ( state.backtracking==0 ) {
               after(grammarAccess.getXListLiteralRule()); 
            }
            match(input,EOF,FOLLOW_2); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
1316566
private static IntNaryTree readSubtreeInPtbFormat(IntObjectBimap<String> lexAlphabet, IntObjectBimap<String> ntAlphabet, Reader reader) throws IOException {
        ReaderState state = ReaderState.START;
        StringBuilder symbolSb = new StringBuilder();
        ArrayList<IntNaryTree> children = null;
        boolean isLexical = false;

        char[] cbuf = new char[1];
        while (reader.read(cbuf) != -1) {
        //for (int i=0; i<treeStr.length(); i++) {
            //char c = treeStr.charAt(i);
            char c = cbuf[0];
            if (state == ReaderState.START) {
                if (c == '(') {
                    state = ReaderState.NONTERMINAL;
                } else if (c == ')') {
                    // This was the tail end of a tree.
                    break;
                } else if (!isWhitespace(c)) {
                    symbolSb.append(c);
                    state = ReaderState.LEXICAL;
                    isLexical = true;
                }
            } else if (state == ReaderState.LEXICAL) {
                if (isWhitespace(c) || c == ')') {
                    state = ReaderState.DONE;
                    break;
                } else {
                    symbolSb.append(c);
                }
            } else if (state == ReaderState.NONTERMINAL) {
                if (isWhitespace(c)) {
                    state = ReaderState.CHILDREN;
                    children = readTreesInPtbFormat(lexAlphabet, ntAlphabet, reader);
                    state = ReaderState.DONE;
                    break;
                } else {
                    symbolSb.append(c);
                }
            } else {
                throw new IllegalStateException("Invalid state: " + state);
            }
        }
        if (state != ReaderState.DONE) {
            // This reader did not start with a valid PTB style tree.
            return null;
        }
        
        int start = NOT_INITIALIZED;
        int end = NOT_INITIALIZED;
        IntObjectBimap<String> alphabet = (isLexical ? lexAlphabet : ntAlphabet);
        String symbolStr = symbolSb.toString();
        String l = isLexical ? symbolStr : symbolStr;
        int symbol = alphabet.lookupIndex(l);
        if (symbol == -1) {
            throw new IllegalStateException("Unknown "
                    + (isLexical ? "word" : "nonterminal") + ": "
                    + symbolSb.toString());
        }
        IntNaryTree root = new IntNaryTree(symbol, start, end, children, isLexical, alphabet);
        return root;
    }
830397
protected byte val(final int lit) {
        byte res = this.vals.get(Math.abs(lit));
        if (lit < 0) { res = (byte) -res; }
        return res;
    }
483819
@SafeVarargs
    public static <T, U, R> BiFunction<T, U, Optional<R>> maybeFirstMatch(BinaryClause<T, U, R>... clauses) {
        final List<Clause<Pair<T, U>, R>> unaryClauses = Sequences.of(clauses).map(BinaryClause::tupled).toList();
        return Pairs.untupled(new MaybeFirstMatchStrategy<>(unaryClauses));
    }
272691
def visitLexerAtom(self, ctx: jsgParser.LexerAtomContext):
        
        if ctx.LEXER_CHAR_SET() or ctx.ANY():
            self._rulePattern += str(ctx.getText())
        else:
            self.visitChildren(ctx)
1250552
protected boolean markFrame(final int lit) {
        final int currentlevel = var(lit).level();
        final CLFrame frame = this.control.get(currentlevel);
        if (frame.mark()) { return false; }
        frame.setMark(true);
        this.frames.push(currentlevel);
        return true;
    }
979997
private static boolean consumesDanglingElse(Node n) {
    while (true) {
      switch (n.getToken()) {
        case IF:
          if (n.getChildCount() < 3) {
            return true;
          }
          // This IF node has no else clause.
          n = n.getLastChild();
          continue;
        case BLOCK:
          if (!n.hasOneChild()) {
            return false;
          }
          // This BLOCK has no curly braces.
          n = n.getLastChild();
          continue;
        case WITH:
        case WHILE:
        case FOR:
        case FOR_IN:
          n = n.getLastChild();
          continue;
        default:
          return false;
      }
    }
  }