Collects (recursively) the set of variables that participate in data atoms
(either in this atom directly or in nested ones, excluding those on the
right-hand side of left joins.

@param vars
@param atom
@return
509481
private void collectVariableReferencesWithLeftJoin(Set<Variable> vars, Function atom) {
		if (atom.isDataFunction()) {
			TermUtils.addReferencedVariablesTo(vars, atom);
		}
		else if (atom.isAlgebraFunction()) {
			Predicate functionSymbol = atom.getFunctionSymbol();
			if (functionSymbol.equals(datalogFactory.getSparqlJoinPredicate())) {
				// if it's a join, we need to collect all the variables of each nested atom
				convert(atom.getTerms()).stream()
						.filter(f -> !f.isOperation())
						.forEach(f -> collectVariableReferencesWithLeftJoin(vars, f));
			}
			else if (functionSymbol.equals(datalogFactory.getSparqlLeftJoinPredicate())) {
				// if it's a left join, only of the first data/algebra atom (the left atom)
				collectVariableReferencesWithLeftJoin(vars, (Function) atom.getTerm(0));
			}
		}
	}
1258225
def variables(self):
        ''''''
        return sorted(list(self.mapping.vars.keys()),
                      key = lambda v : self.mapping.vars[v].index)
1184408
@Override
    @SuppressWarnings("unchecked")
    public <T> Variable<T> getVariable(final String variableName) {
        final String[] subTokens = getSubVariableTokens(variableName);
        if (subTokens != null) {
            final Variable<T> sub = getSubVariable(subTokens[0], subTokens[1]);
            if (sub != null) {
                return sub;
            }
        }
        final Variable<T> v;
        synchronized (variables) {
            v = variables.get(variableName);
        }
        return v;
    }
1365662
public static Point3d[] atomsToPoints(Atom[] atoms) {
		Point3d[] points = new Point3d[atoms.length];
		for(int i = 0; i< atoms.length;i++) {
			points[i] = atoms[i].getCoordsAsPoint3d();
		}
		return points;
	}
949431
function varMatchingAny(varnameAtom) {
  return sl.list(sl.atom("::", {token: varnameAtom}), varnameAtom, sl.str("any"));
}
865615
public static List<Global> getVariableList( final List<String> variableCells ){
        final List<Global> variableList = new ArrayList<Global>();
        if ( variableCells == null ) return variableList;

        for( String variableCell: variableCells ){
            final StringTokenizer tokens = new StringTokenizer( variableCell, "," );
            while ( tokens.hasMoreTokens() ) {
                final String token = tokens.nextToken();
                final Global vars = new Global();
                final StringTokenizer paramTokens = new StringTokenizer( token, " " );
                vars.setClassName( paramTokens.nextToken() );
                if ( !paramTokens.hasMoreTokens() ) {
                    throw new DecisionTableParseException( "The format for global variables is incorrect. " + "It should be: [Class name, Class otherName]. But it was: [" + variableCell + "]" );
                }
                vars.setIdentifier( paramTokens.nextToken() );
                variableList.add( vars );
            }
        }
        return variableList;
    }
627242
@Override
    public void makeBuildVariables(AbstractBuild build, Map<String, String> variables) {
        // global var/password pairs
        MaskPasswordsConfig config = MaskPasswordsConfig.getInstance();
        List<VarPasswordPair> globalVarPasswordPairs = config.getGlobalVarPasswordPairs();
        // we can't use variables.putAll() since passwords are ciphered when in varPasswordPairs
        for(VarPasswordPair globalVarPasswordPair: globalVarPasswordPairs) {
            variables.put(globalVarPasswordPair.getVar(), globalVarPasswordPair.getPassword());
        }

        // job's var/password pairs
        if(varPasswordPairs != null) {
            // cf. comment above
            for(VarPasswordPair varPasswordPair: varPasswordPairs) {
                if(StringUtils.isNotBlank(varPasswordPair.getVar())) {
                    variables.put(varPasswordPair.getVar(), varPasswordPair.getPassword());
                }
            }
        }
    }
570985
public void setSharedVars(Map<String, Object> vars)
	{
		if(this.sharedVars!=null) {
			this.sharedVars.putAll(vars);
		}else {
			this.sharedVars = vars;
		}
		
	}
1245583
public BDD forall(final Collection<Variable> variables) {
    final BDD resBDD = this.factory.build(this.factory.getF().and(variables));
    return new BDD(this.factory.underlyingKernel().forAll(index(), resBDD.index()), this.factory);
  }
1337789
public static List<Variable> getVariablesByRegex(
      final Collection<Variable> variables, final String regex) {
    final List<Variable> shortlistedVariables = new ArrayList<>();
    if (variables != null && regex != null) {
      for (final Variable var : variables) {
        if (var.getTitle().matches(regex)) {
          shortlistedVariables.add(var);
        }
      }
    }
    return shortlistedVariables;
  }
996935
@SuppressWarnings("unchecked")
    public void setVars(final Map<String, ? extends Object> vars) {
        this.vars = (Map<String, Object>)vars;
    }
610405
public java.util.Map<String, String> getVariables() {
        if (variables == null) {
            variables = new com.amazonaws.internal.SdkInternalMap<String, String>();
        }
        return variables;
    }
1270862
public void setComponent(String component, Variable ... vars) {
		for (Variable var : vars) {
			if (var.getComponent() != null && !var.getComponent().equals(component)) {
				components.get(var.getComponent()).remove(var);
			}
		}
		if (!components.containsKey(component)) components.put(component, new ArrayList<Variable>());
		for (Variable var : vars) components.get(component).add(var);
	}

	/**
	 * Create a batch of new {@link Variable}s for this {@link ConstraintSolver}.
	 * @param num The number of variables to create.
	 * @return A batch of new {@link Variable}s.
	 */
	public final Variable[] createVariables(int num) {
		return this.createVariables(num, null);
	}

	/**
	 * Create a batch of new {@link Variable}s for this {@link ConstraintSolver}.
	 * @param num The number of variables to create.
	 * @param component The component tag to associate to these new variables.
	 * @return A batch of new {@link Variable}s.
	 */
	public final Variable[] createVariables(int num, String component) {
		Variable[] ret = createVariablesSub(num, component);
		if (ret == null) return null;
		//need to add all to network so if sth goes wrong I can delete all of them concurrently
		for (Variable v : ret) this.theNetwork.addVariable(v);
		if (!skipPropagation && autoprop && checkDomainsInstantiated() && !noPropOnVarCreation) this.propagate();
		logger.finest("Created variables " + Arrays.toString(ret));
		return ret;
	}
155010
public VarSetBuilder varSetAtPath( String[] path)
    {
    VarSet varSet = null;
    if( path != null && path.length > 0)
      {
      varSet = new VarSet( path[0]);
      functionInputDef_.addVarDef( varSet);

      for( int i = 1; i < path.length; i++)
        {
        VarSet child = new VarSet( path[i]);
        varSet.addMember( child);
        varSet = child;
        }
      }

    return
      varSet == null
      ? null
      : new VarSetBuilder( varSet);
    }
706427
public void setVariables(Map<String, String> variables)
    {
        if (this.variables != null)
        {
            this.variables.putAll(variables);
        }
        else
        {
            this.variables = variables;
        }
    }
1063224
public VarConfig getIntersection(Iterable<Var> otherVars) {
        VarConfig subset = new VarConfig();
        for (Var v : otherVars) {
            Integer state = config.get(v);
            if (state != null) {
                subset.put(v, state);
            }
        }
        return subset;
    }
507709
public VarSetBuilder members( IVarDef... members)
    {
    for( IVarDef member : members)
      {
      varSet_.addMember( member);
      }
    return this;
    }