module Mult1

	use int.Int
	use ref.Ref

	let b [@bddinfer] [@infer](_:int) : int
	ensures { result = 18 }
	=
		let i = ref 0 in
		while !i < 10 do
			variant { 10 - !i  }
			i := 2 * !i;
		done;
		!i

	let b2 [@bddinfer] [@infer:oct](_:int) : int
	ensures { result = 18 }
	=
		let i = ref 0 in
		while !i < 10 do
			variant { 10 - !i  }
			i := 2 * !i;
		done;
		!i

	let b3 [@bddinfer] [@infer:box](_:int) : int
	ensures { result = 18 }
	=
		let i = ref 0 in
		while !i < 10 do
			variant { 10 - !i  }
			i := 2 * !i;
		done;
		!i

end
