{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import spot\n", "from spot.jupyter import display_inline\n", "spot.setup(show_default='.bav')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Support for alternating automata" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The following automata are what we will use as examples." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "aut1, aut2, aut3, aut4, aut5 = spot.automata('''\n", "HOA: v1 tool: \"ltl3ba\" \"1.1.3\" name: \"VWAA for FGa && GFb\" States: 6\n", "Start: 0 acc-name: co-Buchi Acceptance: 1 Fin(0) AP: 2 \"a\" \"b\" properties:\n", "trans-labels explicit-labels state-acc univ-branch very-weak --BODY--\n", "State: 0 \"(FG(a) && GF(b))\" [t] 3&1 State: 1 \"GF(b)\" [(1)] 1 [(!1)]\n", "2&1 State: 2 \"F(b)\" {0} [(1)] 5 [(!1)] 2 State: 3 \"FG(a)\" {0} [(0)] 4\n", "[t] 3 State: 4 \"G(a)\" [(0)] 4 State: 5 \"t\" [t] 5 --END--\n", "/* Example from ADL's PSL2TGBA talk. */\n", "HOA: v1 States: 3 Start: 0 acc-name: co-Buchi Acceptance: 1 Fin(0) AP:\n", "3 \"a\" \"b\" \"p\" --BODY-- State: 0 \"(a;a*;b)*\" {0} [0] 1 [!0] 2 State: 1\n", "\"a*;b;(a;a*;b)*\" {0} [0&1&2] 0&1 [!1&2] 1 [!0&!1] 2 [!0&1&2] 0 State:\n", "2 [t] 2 --END--\n", "HOA: v1 States: 5 Start: 3 acc-name: co-Buchi Acceptance: 1 Fin(0) AP:\n", "3 \"a\" \"b\" \"p\" --BODY-- State: 0 \"(a;a*;b)*\" {0} [0] 1 [!0] 2 State: 1\n", "\"a*;b;(a;a*;b)*\" {0} [0&1&2] 0&1 [!1&2] 1 [!0&!1] 2 [!0&1&2] 0 State:\n", "2 [t] 2 State: 3 [0] 4&0 State: 4 [t] 3 --END--\n", "HOA: v1 States: 3 Start: 0 acc-name: co-Buchi Acceptance: 1 Fin(0) AP:\n", "3 \"a\" \"b\" \"p\" --BODY-- State: 0 \"(a;a*;b)*\" {0} [0] 1 [!0] 2 State: 1\n", "\"a*;b;(a;a*;b)*\" {0} [0&1&2] 0&1 [!1&2] 1 [!0&!1] 2 [!0&1&2] 0 State:\n", "2 [t] 2 --END--\n", "HOA: v1 tool: \"ltl3dra\" \"0.2.2\" name: \"VWAA for GFa\" States: 3 Start: 0\n", "acc-name: co-Buchi Acceptance: 1 Fin(0) AP: 1 \"a\" properties: trans-labels\n", "explicit-labels state-acc univ-branch very-weak --BODY-- State: 0 \"GF(a)\"\n", "[t] 1&0 State: 1 \"F(a)\" {0} [(0)] 2 [t] 1 State: 2 \"t\" [t] 2 --END--\n", "''')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Various display options" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here is the default output, using the `bav` options as set by default in the first cell. " ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "