@Override public SExpIR caseAAndBooleanBinaryExp(AAndBooleanBinaryExp node, IRInfo question) throws AnalysisException { return question.getExpAssistant().handleBinaryExp(node, new AAndBoolBinaryExpIR(), question); }
/** * Creates a deep clone of this {@link AAndBoolBinaryExpIR} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link AAndBoolBinaryExpIR} node */ public AAndBoolBinaryExpIR clone(Map<INode,INode> oldToNewMap) { AAndBoolBinaryExpIR node = new AAndBoolBinaryExpIR( _sourceNode, _tag, _metaData, cloneNode(_type, oldToNewMap), cloneNode(_left, oldToNewMap), cloneNode(_right, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link AAndBoolBinaryExpIR} node. * @return a deep clone of this {@link AAndBoolBinaryExpIR} node */ public AAndBoolBinaryExpIR clone() { return new AAndBoolBinaryExpIR( _sourceNode, _tag, _metaData, cloneNode(_type), cloneNode(_left), cloneNode(_right) ); }
public SExpIR consAndExp(SExpIR left, SExpIR right) { AAndBoolBinaryExpIR andExp = new AAndBoolBinaryExpIR(); andExp.setType(new ABoolBasicTypeIR()); andExp.setLeft(left); andExp.setRight(right); return andExp; }
public AAndBoolBinaryExpIR extendAndExp(ARecordDeclIR record, AFieldDeclIR field, SExpIR previous, String paramName) throws AnalysisException { // By recursively calling this method an "and chain" of field // comparisons can be constructed: fieldComp1 && fieldComp2 && fieldComp3 .... AAndBoolBinaryExpIR nextAnd = new AAndBoolBinaryExpIR(); nextAnd.setType(new ABoolBasicTypeIR()); nextAnd.setLeft(previous); nextAnd.setRight(consFieldComparison(record, field, paramName)); return nextAnd; }
AAndBoolBinaryExpIR andExpTopCg = new AAndBoolBinaryExpIR(); andExpTopCg.setType(new ABoolBasicTypeIR()); andExpTopCg.setLeft(exps.get(0).apply(question.getExpVisitor(), question)); AAndBoolBinaryExpIR nextAndExpCg = new AAndBoolBinaryExpIR(); nextAndExpCg.setType(new ABoolBasicTypeIR()); nextAndExpCg.setLeft(nextExpCg);
AAndBoolBinaryExpIR newpred = new AAndBoolBinaryExpIR(); newpred.setLeft(node.getPerSyncs().get(foundplace).getPred().clone()); newpred.setRight(guard); AAndBoolBinaryExpIR newpred = new AAndBoolBinaryExpIR(); newpred.setLeft(node.getPerSyncs().get(foundplace).getPred().clone()); newpred.setRight(equalzero);