public Value execute(File file) throws Exception
	{
		BufferedReader br = new BufferedReader(new FileReader(file));
		StringBuilder sb = new StringBuilder();

		String line = br.readLine();

		while (line != null)
		{
			sb.append(line);
			line = br.readLine();
		}

		br.close();

		Value result = execute(sb.toString(), null);

		BasicSchedulableThread.terminateAll(); // NB not a session (used for tests)
		return result;
	}
public Value execute ( File file ) throws Exception { BufferedReader br = new BufferedReader ( new FileReader ( file ) ) ; StringBuilder sb = new StringBuilder ( ) ; String line = br . readLine ( ) ; while ( line != null ) { sb . append ( line ) ; line = br . readLine ( ) ; } br . close ( ) ; Value result = execute ( sb . toString ( ) , null ) ; BasicSchedulableThread . terminateAll ( ) ; return result ; }
Parse the content of the file passed, type check it and evaluate it as an expression in the initial context.

@param file
A file containing a VDM expression.
@return The value of the expression.
@throws Exception
Parser, type checking or runtime errors.