Files
why3/src/trywhy3/help_python.html
2024-01-19 22:17:03 +01:00

51 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Verify Python Code using Why3</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="trywhy3_help.css" />
</head>
<body>
<h1>Online version of Why3, with Python input format</h1>
This version of Why3 is intended for teaching purposes.
Its input format is a tiny subset of Python, called "micro-Python"
and described <a href="https://www.why3.org/doc/input_formats.html#micro-python">here</a>.
<p>
Note: the command-line version of Why3 is also supporting this
input format, for files with suffix <tt>.py</tt>.
<h2>Verifying a program</h2>
<p>
Click on the gears button to launch the verification.
Verification conditions (VCs) then appear in the right panel, in
the Task List tab, and
Alt-Ergo is run on each of them with a default time limit (that
can be set in the Settings menu).
</p>
<p>
When a VC is not proved, there are several options:
<ul>
<li> use the contextual menu to rerun Alt-Ergo with a larger
time limit (e.g. 1000 or 5000 steps instead of 100);
<li> use the contextual menu to split the VC and rerun Alt-Ergo
on each sub-VC (split and prove);
<li> use the Task View tab to investigate the problematic VC,
for wrong or missing elements of specification (precondition,
postcondition, invariant);
<li> add intermediate assertions in the code, using <tt>#@
assert ...;</tt>.
</ul>
</p>
<br>
</body>
</html>