The latest version (with support for this Java subset) of the ITP
downloadable from the course web site has an extension of the list of
commands of the ITP specifically designed to support Hoare logic
reasoning in our programming language.

The way this extension works is as follows:

- start the appropriate version of Maude compatible with this tool (2.1.1 currently)

- load into Maude the functional module defining the semantics of
  our language, java-es-flat.maude, (for speed reason we use
  the flattened version).

- [done for the final already]
  define a program (BlockStatements) foo in a module foo.maude importing
  java-es-flat.maude by declaring a constant foo and giving an equation
  defining the constant as the corresponding program text. Also declare
  a constant foo-init which contains all declarations necessary for your
  program and make sure there are no ("Java") declarations in your
  program foo. The module foo.maude should also contain all auxiliary
  functions needed in a proof of correctness of program foo. (Note that
  this has already been done for you, in the file maxnml.maude.)

- load maxnml.maude 

- then load the included version of itp-tool.maude

- then, to prove a Hoare triple {P} foo {Q} you give a javax command, or
  a javax-inv command which also needs an invariant.

In the final this command has already been spelled out for you in
"maxnml.itp", where javax is used as there is no loop in the
program. Then you can interact with the ITP tool to discharge the
created first-order goal given.

Note that you can write your solution (i.e. the commands you used to
discharge a goal) directly below the javax command and then in one shot
load the module which will create the goal and discharge it.
