Skip to content

Commit 4b8a9d4

Browse files
committed
Making nondet calls have a single null parameter
1 parent 093a20a commit 4b8a9d4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

env-model-generator/src/createEntryPoint.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as fs from "fs-extra";
22
import { ConfigParseError } from "./configParseError";
33
import { Argument, EntryPoint, EntryPointConfig } from "./entryPointConfig";
4-
import { Cast, Class, Declaration, Expression, FnCall, FnStatement, Method, Statement, StringConstant } from "./javaCode";
4+
import { Cast, Class, Declaration, Expression, FnCall, FnStatement, Method, Null, Statement, StringConstant } from "./javaCode";
55
import { Repository } from "./model";
66
import { makeIdentifier } from "./utils";
77

@@ -52,7 +52,7 @@ function createEntryPoint(entryPoint: EntryPoint): Method {
5252
function getClassConstructionCall(className: string, isContextRequired: boolean): [ Expression, boolean ] {
5353
const classBeanId = Repository.tryGetIdByClass(className);
5454
if (classBeanId === undefined) {
55-
return [ new FnCall("org.cprover.CProver.nondetWithoutNull", []), isContextRequired ];
55+
return [ new FnCall("org.cprover.CProver.nondetWithoutNull", [new Null()]), isContextRequired ];
5656
} else {
5757
const classBean = Repository.tryGet(classBeanId);
5858
if (classBean === undefined)

env-model-generator/src/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export class UndefinedBean implements IBean {
240240
new Method(
241241
`public ${this.typeName} ${this.getter}()`,
242242
[
243-
new Return(new FnCall("org.cprover.CProver.nondetWithNull", [])),
243+
new Return(new FnCall("org.cprover.CProver.nondetWithNull", [new Null()])),
244244
],
245245
[]),
246246
new BlankLine(),

0 commit comments

Comments
 (0)