ltl2tgba.html: Add option to output LBT format.

Suggested by Joachim Klein.

* wrap/python/ajax/ltl2tgba.html: New option.
* wrap/python/ajax/protocol.txt, NEWS: Document it.
* wrap/python/ajax/spot.in: Implement it.
* wrap/python/spot.i: Export src/ltlvisit/lbt.hh.
This commit is contained in:
Alexandre Duret-Lutz 2014-08-21 15:18:43 +02:00
parent d9d9837e55
commit 85beeec2e4
5 changed files with 15 additions and 2 deletions

View file

@ -447,7 +447,7 @@ if dored:
# Formula manipulation only.
if output_type == 'f':
formula_format = form.getfirst('ff', 'o')
# o = Spot, i = Spin, g = GraphViz, p = properties
# o = Spot, i = Spin, l = LBT, g = GraphViz, p = properties
if formula_format == 'o':
unbufprint(format_formula(f))
elif formula_format == 'i':
@ -458,6 +458,11 @@ if output_type == 'f':
if simpopt.reduce_size_strictly:
s = '<br><b>Try enabling larger formula rewritings.</b>'
unbufprint('<div class="error">The above formula contains PSL operators that Spin will not understand.%s</div>' % s)
elif formula_format == 'l':
if not f.is_ltl_formula():
unbufprint('<div class="error">PSL formulas cannot be expressed in this format.</div>')
else:
unbufprint('<div class="formula lbt-format">' + spot.to_lbt_string(f) + '</div>')
elif formula_format == 'g':
render_formula(f)
elif formula_format == 'p':