Skip to content

Measures for inline function definitions don't work #56

@nickbattle

Description

@nickbattle

Consider the following:

	f: nat -> nat
	f(x) ==
		let g: nat -> nat
			g(a) ==
				if a = 0 then 0 else a + g(a-1)
			pre a > 0
			measure a
		in
			g(x);

> p f(1)
Error 4034: Name 'measure_g' not in scope in 'DEFAULT' (test.vdm) at line 8:21

The problem is that the FunctionValue created by g does not include a measure function (though it does include a pre_g).

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions