MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / isSimple

Method isSimple

src/main/java/wyil/util/WyilUtils.java:137–149  ·  view source on GitHub ↗

Check whether a given assignment is "simple" or not. That is, assigns only a single location on the left-hand side. @param stmt @return

(Stmt.Assign stmt)

Source from the content-addressed store, hash-verified

135 * @return
136 */
137 public static boolean isSimple(Stmt.Assign stmt) {
138 Tuple<LVal> lhs = stmt.getLeftHandSide();
139
140 for (int i = 0; i != lhs.size(); ++i) {
141 if (i > 0) {
142 return false;
143 } else if (lhs.get(i).getType().shape() > 1) {
144 return false;
145 }
146 }
147
148 return true;
149 }
150
151 /**
152 * Check whether a given assignment "has interference" or not. That is, where

Callers

nothing calls this directly

Calls 5

getLeftHandSideMethod · 0.80
sizeMethod · 0.65
shapeMethod · 0.65
getTypeMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected