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

Method execute

src/main/java/wyc/task/QuickCheck.java:188–207  ·  view source on GitHub ↗
(WyilFile context, QualifiedName name, Type.Callable signature, CallStack frame, RValue... args)

Source from the content-addressed store, hash-verified

186 }
187
188 private boolean execute(WyilFile context, QualifiedName name, Type.Callable signature, CallStack frame, RValue... args) throws IOException {
189 // FIXME: approach for constructing stack frame inefficient!
190 //
191 try {
192 interpreter.execute(name, signature, frame, args);
193 //
194 return true;
195 } catch (Interpreter.RuntimeError e) {
196 // FIXME: there is a known problem here because the stack frame will produce the
197 // current values for the parameters, not their actual values on entry. The
198 // easiest way to fix this is to prevent assignments to parameters!!
199 //
200 // Extract stack frame information
201 StackFrame[] errorframe = e.getFrame().toStackFrame();
202 // Add appropriate syntax error to the syntactic item where the error arose.
203 ErrorMessages.syntaxError(e.getElement(), e.getErrorCode(), errorframe);
204 // Done
205 return false;
206 }
207 }
208
209 private boolean check(Decl.Type t, ExtendedContext context) {
210 Runtime runtime = Runtime.getRuntime();

Callers 2

checkMethod · 0.95
generateValidInputsMethod · 0.95

Calls 10

syntaxErrorMethod · 0.95
toStackFrameMethod · 0.80
executeExpressionMethod · 0.80
boolValueMethod · 0.80
sizeMethod · 0.65
getMethod · 0.65
executeMethod · 0.45
getFrameMethod · 0.45
getElementMethod · 0.45
getErrorCodeMethod · 0.45

Tested by

no test coverage detected