{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "c54c43ba", "metadata": {}, "outputs": [], "source": [ "import spot, buddy\n", "spot.setup()" ] }, { "cell_type": "markdown", "id": "0576f64a", "metadata": {}, "source": [ "Additional testing for synthesis" ] }, { "cell_type": "markdown", "id": "e25b7989", "metadata": {}, "source": [ "Testing the different methods to solve" ] }, { "cell_type": "code", "execution_count": 2, "id": "007107a6", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "si = spot.synthesis_info()\n", "si.s = spot.synthesis_info.algo_LAR # Use LAR algorithm\n", "game = spot.ltl_to_game(\"G((F(i0) && F(i1))->(G(i1<->(X(o0)))))\", [\"o0\"], si)\n", "spot.solve_game(game)" ] }, { "cell_type": "code", "execution_count": 3, "id": "a7859f19", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "HOA: v1\n", "States: 21\n", "Start: 0\n", "AP: 3 \"i1\" \"i0\" \"o0\"\n", "acc-name: all\n", "Acceptance: 0 t\n", "properties: trans-labels explicit-labels state-acc deterministic\n", "spot-state-player: 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1\n", "controllable-AP: 2\n", "--BODY--\n", "State: 0\n", "[!0&!1] 2\n", "[!0&1] 4\n", "[0&!1] 6\n", "[0&1] 8\n", "State: 1\n", "[0&1] 13\n", "[0&!1] 18\n", "[!0&1] 19\n", "[!0&!1] 20\n", "State: 2\n", "[t] 1\n", "State: 3\n", "[0] 13\n", "[!0] 19\n", "State: 4\n", "[t] 3\n", "State: 5\n", "[!0&1] 10\n", "[0&1] 11\n", "[!0&!1] 15\n", "[0&!1] 16\n", "State: 6\n", "[t] 5\n", "State: 7\n", "[!0] 10\n", "[0] 11\n", "State: 8\n", "[t] 7\n", "State: 9\n", "[!0] 12\n", "[0] 13\n", "State: 10\n", "[2] 9\n", "State: 11\n", "[2] 7\n", "State: 12\n", "[!2] 9\n", "State: 13\n", "[!2] 7\n", "State: 14\n", "[!0&1] 12\n", "[0&1] 13\n", "[!0&!1] 17\n", "[0&!1] 18\n", "State: 15\n", "[2] 14\n", "State: 16\n", "[2] 5\n", "State: 17\n", "[!2] 14\n", "State: 18\n", "[!2] 5\n", "State: 19\n", "[!2] 3\n", "State: 20\n", "[!2] 1\n", "--END--\n", "HOA: v1\n", "States: 7\n", "Start: 0\n", "AP: 3 \"i1\" \"i0\" \"o0\"\n", "acc-name: all\n", "Acceptance: 0 t\n", "properties: trans-labels explicit-labels state-acc deterministic\n", "controllable-AP: 2\n", "--BODY--\n", "State: 0\n", "[!0&!1] 1\n", "[!0&1] 2\n", "[0&!1] 3\n", "[0&1] 4\n", "State: 1\n", "[0&1&!2] 4\n", "[0&!1&!2] 3\n", "[!0&1&!2] 2\n", "[!0&!1&!2] 1\n", "State: 2\n", "[0&!2] 4\n", "[!0&!2] 2\n", "State: 3\n", "[!0&1&2] 5\n", "[0&1&2] 4\n", "[!0&!1&2] 6\n", "[0&!1&2] 3\n", "State: 4\n", "[!0&2] 5\n", "[0&2] 4\n", "State: 5\n", "[!0&!2] 5\n", "[0&!2] 4\n", "State: 6\n", "[!0&1&!2] 5\n", "[0&1&!2] 4\n", "[!0&!1&!2] 6\n", "[0&!1&!2] 3\n", "--END--\n", "HOA: v1\n", "States: 21\n", "Start: 0\n", "AP: 3 \"i1\" \"i0\" \"o0\"\n", "acc-name: all\n", "Acceptance: 0 t\n", "properties: trans-labels explicit-labels state-acc deterministic\n", "spot-state-player: 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1\n", "controllable-AP: 2\n", "--BODY--\n", "State: 0\n", "[!0&!1] 2\n", "[!0&1] 4\n", "[0&!1] 6\n", "[0&1] 8\n", "State: 1\n", "[0&1] 13\n", "[0&!1] 18\n", "[!0&1] 19\n", "[!0&!1] 20\n", "State: 2\n", "[t] 1\n", "State: 3\n", "[0] 13\n", "[!0] 19\n", "State: 4\n", "[t] 3\n", "State: 5\n", "[!0&1] 10\n", "[0&1] 11\n", "[!0&!1] 15\n", "[0&!1] 16\n", "State: 6\n", "[t] 5\n", "State: 7\n", "[!0] 10\n", "[0] 11\n", "State: 8\n", "[t] 7\n", "State: 9\n", "[!0] 12\n", "[0] 13\n", "State: 10\n", "[2] 9\n", "State: 11\n", "[2] 7\n", "State: 12\n", "[!2] 9\n", "State: 13\n", "[!2] 7\n", "State: 14\n", "[!0&1] 12\n", "[0&1] 13\n", "[!0&!1] 17\n", "[0&!1] 18\n", "State: 15\n", "[2] 14\n", "State: 16\n", "[2] 5\n", "State: 17\n", "[!2] 14\n", "State: 18\n", "[!2] 5\n", "State: 19\n", "[!2] 3\n", "State: 20\n", "[!2] 1\n", "--END--\n", "HOA: v1\n", "States: 21\n", "Start: 0\n", "AP: 3 \"i1\" \"i0\" \"o0\"\n", "acc-name: all\n", "Acceptance: 0 t\n", "properties: trans-labels explicit-labels state-acc deterministic\n", "spot-state-player: 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1\n", "controllable-AP: 2\n", "--BODY--\n", "State: 0\n", "[!0&!1] 2\n", "[!0&1] 4\n", "[0&!1] 6\n", "[0&1] 8\n", "State: 1\n", "[0&1] 13\n", "[0&!1] 18\n", "[!0&1] 19\n", "[!0&!1] 20\n", "State: 2\n", "[t] 1\n", "State: 3\n", "[0] 13\n", "[!0] 19\n", "State: 4\n", "[t] 3\n", "State: 5\n", "[!0&1] 10\n", "[0&1] 11\n", "[!0&!1] 15\n", "[0&!1] 16\n", "State: 6\n", "[t] 5\n", "State: 7\n", "[!0] 10\n", "[0] 11\n", "State: 8\n", "[t] 7\n", "State: 9\n", "[!0] 12\n", "[0] 13\n", "State: 10\n", "[2] 9\n", "State: 11\n", "[2] 7\n", "State: 12\n", "[!2] 9\n", "State: 13\n", "[!2] 7\n", "State: 14\n", "[!0&1] 12\n", "[0&1] 13\n", "[!0&!1] 17\n", "[0&!1] 18\n", "State: 15\n", "[2] 14\n", "State: 16\n", "[2] 5\n", "State: 17\n", "[!2] 14\n", "State: 18\n", "[!2] 5\n", "State: 19\n", "[!2] 3\n", "State: 20\n", "[!2] 1\n", "--END--\n", "HOA: v1\n", "States: 7\n", "Start: 0\n", "AP: 3 \"i1\" \"i0\" \"o0\"\n", "acc-name: all\n", "Acceptance: 0 t\n", "properties: trans-labels explicit-labels state-acc deterministic\n", "controllable-AP: 2\n", "--BODY--\n", "State: 0\n", "[!0&!1] 1\n", "[!0&1] 2\n", "[0&!1] 3\n", "[0&1] 4\n", "State: 1\n", "[0&1&!2] 4\n", "[0&!1&!2] 3\n", "[!0&1&!2] 2\n", "[!0&!1&!2] 1\n", "State: 2\n", "[0&!2] 4\n", "[!0&!2] 2\n", "State: 3\n", "[!0&1&2] 5\n", "[0&1&2] 4\n", "[!0&!1&2] 6\n", "[0&!1&2] 3\n", "State: 4\n", "[!0&2] 5\n", "[0&2] 4\n", "State: 5\n", "[!0&!2] 5\n", "[0&!2] 4\n", "State: 6\n", "[!0&1&!2] 5\n", "[0&1&!2] 4\n", "[!0&!1&!2] 6\n", "[0&!1&!2] 3\n", "--END--\n", "HOA: v1\n", "States: 21\n", "Start: 0\n", "AP: 3 \"i1\" \"i0\" \"o0\"\n", "acc-name: all\n", "Acceptance: 0 t\n", "properties: trans-labels explicit-labels state-acc deterministic\n", "spot-state-player: 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1\n", "controllable-AP: 2\n", "--BODY--\n", "State: 0\n", "[!0&!1] 2\n", "[!0&1] 4\n", "[0&!1] 6\n", "[0&1] 8\n", "State: 1\n", "[0&1] 13\n", "[0&!1] 18\n", "[!0&1] 19\n", "[!0&!1] 20\n", "State: 2\n", "[t] 1\n", "State: 3\n", "[0] 13\n", "[!0] 19\n", "State: 4\n", "[t] 3\n", "State: 5\n", "[!0&1] 10\n", "[0&1] 11\n", "[!0&!1] 15\n", "[0&!1] 16\n", "State: 6\n", "[t] 5\n", "State: 7\n", "[!0] 10\n", "[0] 11\n", "State: 8\n", "[t] 7\n", "State: 9\n", "[!0] 12\n", "[0] 13\n", "State: 10\n", "[2] 9\n", "State: 11\n", "[2] 7\n", "State: 12\n", "[!2] 9\n", "State: 13\n", "[!2] 7\n", "State: 14\n", "[!0&1] 12\n", "[0&1] 13\n", "[!0&!1] 17\n", "[0&!1] 18\n", "State: 15\n", "[2] 14\n", "State: 16\n", "[2] 5\n", "State: 17\n", "[!2] 14\n", "State: 18\n", "[!2] 5\n", "State: 19\n", "[!2] 3\n", "State: 20\n", "[!2] 1\n", "--END--\n", "HOA: v1\n", "States: 21\n", "Start: 0\n", "AP: 3 \"i1\" \"i0\" \"o0\"\n", "acc-name: all\n", "Acceptance: 0 t\n", "properties: trans-labels explicit-labels state-acc deterministic\n", "spot-state-player: 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1\n", "controllable-AP: 2\n", "--BODY--\n", "State: 0\n", "[!0&!1] 2\n", "[!0&1] 4\n", "[0&!1] 6\n", "[0&1] 8\n", "State: 1\n", "[0&1] 13\n", "[0&!1] 18\n", "[!0&1] 19\n", "[!0&!1] 20\n", "State: 2\n", "[t] 1\n", "State: 3\n", "[0] 13\n", "[!0] 19\n", "State: 4\n", "[t] 3\n", "State: 5\n", "[!0&1] 10\n", "[0&1] 11\n", "[!0&!1] 15\n", "[0&!1] 16\n", "State: 6\n", "[t] 5\n", "State: 7\n", "[!0] 10\n", "[0] 11\n", "State: 8\n", "[t] 7\n", "State: 9\n", "[!0] 12\n", "[0] 13\n", "State: 10\n", "[2] 9\n", "State: 11\n", "[2] 7\n", "State: 12\n", "[!2] 9\n", "State: 13\n", "[!2] 7\n", "State: 14\n", "[!0&1] 12\n", "[0&1] 13\n", "[!0&!1] 17\n", "[0&!1] 18\n", "State: 15\n", "[2] 14\n", "State: 16\n", "[2] 5\n", "State: 17\n", "[!2] 14\n", "State: 18\n", "[!2] 5\n", "State: 19\n", "[!2] 3\n", "State: 20\n", "[!2] 1\n", "--END--\n", "HOA: v1\n", "States: 7\n", "Start: 0\n", "AP: 3 \"i1\" \"i0\" \"o0\"\n", "acc-name: all\n", "Acceptance: 0 t\n", "properties: trans-labels explicit-labels state-acc deterministic\n", "controllable-AP: 2\n", "--BODY--\n", "State: 0\n", "[!0&!1] 1\n", "[!0&1] 2\n", "[0&!1] 3\n", "[0&1] 4\n", "State: 1\n", "[0&1&!2] 4\n", "[0&!1&!2] 3\n", "[!0&1&!2] 2\n", "[!0&!1&!2] 1\n", "State: 2\n", "[0&!2] 4\n", "[!0&!2] 2\n", "State: 3\n", "[!0&1&2] 5\n", "[0&1&2] 4\n", "[!0&!1&2] 6\n", "[0&!1&2] 3\n", "State: 4\n", "[!0&2] 5\n", "[0&2] 4\n", "State: 5\n", "[!0&!2] 5\n", "[0&!2] 4\n", "State: 6\n", "[!0&1&!2] 5\n", "[0&1&!2] 4\n", "[!0&!1&!2] 6\n", "[0&!1&!2] 3\n", "--END--\n", "HOA: v1\n", "States: 21\n", "Start: 0\n", "AP: 3 \"i1\" \"i0\" \"o0\"\n", "acc-name: all\n", "Acceptance: 0 t\n", "properties: trans-labels explicit-labels state-acc deterministic\n", "spot-state-player: 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1\n", "controllable-AP: 2\n", "--BODY--\n", "State: 0\n", "[!0&!1] 2\n", "[!0&1] 4\n", "[0&!1] 6\n", "[0&1] 8\n", "State: 1\n", "[0&1] 13\n", "[0&!1] 18\n", "[!0&1] 19\n", "[!0&!1] 20\n", "State: 2\n", "[t] 1\n", "State: 3\n", "[0] 13\n", "[!0] 19\n", "State: 4\n", "[t] 3\n", "State: 5\n", "[!0&1] 10\n", "[0&1] 11\n", "[!0&!1] 15\n", "[0&!1] 16\n", "State: 6\n", "[t] 5\n", "State: 7\n", "[!0] 10\n", "[0] 11\n", "State: 8\n", "[t] 7\n", "State: 9\n", "[!0] 12\n", "[0] 13\n", "State: 10\n", "[2] 9\n", "State: 11\n", "[2] 7\n", "State: 12\n", "[!2] 9\n", "State: 13\n", "[!2] 7\n", "State: 14\n", "[!0&1] 12\n", "[0&1] 13\n", "[!0&!1] 17\n", "[0&!1] 18\n", "State: 15\n", "[2] 14\n", "State: 16\n", "[2] 5\n", "State: 17\n", "[!2] 14\n", "State: 18\n", "[!2] 5\n", "State: 19\n", "[!2] 3\n", "State: 20\n", "[!2] 1\n", "--END--\n" ] } ], "source": [ "si.minimize_lvl = 0\n", "mm0 = spot.solved_game_to_mealy(game, si)\n", "msep0 = spot.solved_game_to_separated_mealy(game, si)\n", "msplit0 = spot.solved_game_to_split_mealy(game, si)\n", "assert(spot.is_mealy(mm0))\n", "assert(spot.is_separated_mealy(msep0))\n", "assert(spot.is_split_mealy(msplit0))\n", "print(mm0.to_str(\"hoa\"))\n", "print(msep0.to_str(\"hoa\"))\n", "print(msplit0.to_str(\"hoa\"))\n", "si.minimize_lvl = 2\n", "mm2 = spot.solved_game_to_mealy(game, si)\n", "msep2 = spot.solved_game_to_separated_mealy(game, si)\n", "msplit2 = spot.solved_game_to_split_mealy(game, si)\n", "assert(spot.is_mealy(mm2))\n", "assert(spot.is_separated_mealy(msep2))\n", "assert(spot.is_split_mealy(msplit2))\n", "print(mm2.to_str(\"hoa\"))\n", "print(msep2.to_str(\"hoa\"))\n", "print(msplit2.to_str(\"hoa\"))\n", "si.minimize_lvl = 3\n", "mm3 = spot.solved_game_to_mealy(game, si)\n", "msep3 = spot.solved_game_to_separated_mealy(game, si)\n", "msplit3 = spot.solved_game_to_split_mealy(game, si)\n", "assert(spot.is_mealy(mm3))\n", "assert(spot.is_separated_mealy(msep3))\n", "assert(spot.is_split_mealy(msplit3))\n", "print(mm3.to_str(\"hoa\"))\n", "print(msep3.to_str(\"hoa\"))\n", "print(msplit3.to_str(\"hoa\"))" ] }, { "cell_type": "code", "execution_count": 4, "id": "fb57ac53", "metadata": {}, "outputs": [], "source": [ "mus0 = spot.unsplit_mealy(msplit0)\n", "mus2 = spot.unsplit_mealy(msplit2)\n", "mus3 = spot.unsplit_mealy(msplit3)" ] }, { "cell_type": "code", "execution_count": 5, "id": "40fc65b5", "metadata": {}, "outputs": [], "source": [ "assert(mus0.equivalent_to(msep0))" ] }, { "cell_type": "code", "execution_count": 6, "id": "f6d8b29c", "metadata": {}, "outputs": [], "source": [ "assert(mus2.equivalent_to(msep2))" ] }, { "cell_type": "code", "execution_count": 7, "id": "db8d47f2", "metadata": {}, "outputs": [], "source": [ "assert(mus3.equivalent_to(msep3))" ] }, { "cell_type": "markdown", "id": "c19beeb0", "metadata": {}, "source": [ "Testing related to #495" ] }, { "cell_type": "code", "execution_count": 8, "id": "3736cd1b", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(0, t)\n" ] }, { "data": { "image/svg+xml": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "t\n", "[all]\n", "\n", "\n", "\n", "1\n", "\n", "1\n", "\n", "\n", "\n", "I->1\n", "\n", "\n", "\n", "\n", "\n", "0\n", "\n", "0\n", "\n", "\n", "\n", "1->0\n", "\n", "\n", "(!i & !o) | (i & o)\n", "\n", "\n", "\n", "0->0\n", "\n", "\n", "1\n", "\n", "\n", "\n" ], "text/plain": [ " *' at 0x7f7458055570> >" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a = spot.translate(\"i<->o\", \"parity\")\n", "print(a.acc())\n", "a" ] }, { "cell_type": "code", "execution_count": 9, "id": "da6a7802", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "1\n", "\n", "1\n", "\n", "\n", "\n", "I->1\n", "\n", "\n", "\n", "\n", "\n", "0\n", "\n", "0\n", "\n", "\n", "\n", "1->0\n", "\n", "\n", "\n", "!i\n", "/\n", "\n", "!o\n", "\n", "i\n", "/\n", "\n", "o\n", "\n", "\n", "\n", "0->0\n", "\n", "\n", "\n", "1\n", "/\n", "\n", "1\n", "\n", "\n", "\n" ], "text/plain": [ " *' at 0x7f7458055570> >" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "spot.set_synthesis_outputs(a, buddy.bdd_ithvar(a.register_ap(\"o\")))\n", "a" ] }, { "cell_type": "code", "execution_count": 10, "id": "987219a4", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(0, t)\n" ] }, { "data": { "image/svg+xml": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "t\n", "[all]\n", "\n", "\n", "\n", "1\n", "\n", "1\n", "\n", "\n", "\n", "I->1\n", "\n", "\n", "\n", "\n", "\n", "3\n", "\n", "3\n", "\n", "\n", "\n", "1->3\n", "\n", "\n", "!i\n", "\n", "\n", "\n", "4\n", "\n", "4\n", "\n", "\n", "\n", "1->4\n", "\n", "\n", "i\n", "\n", "\n", "\n", "0\n", "\n", "0\n", "\n", "\n", "\n", "2\n", "\n", "2\n", "\n", "\n", "\n", "0->2\n", "\n", "\n", "1\n", "\n", "\n", "\n", "2->0\n", "\n", "\n", "1\n", "\n", "\n", "\n", "3->0\n", "\n", "\n", "!o\n", "\n", "\n", "\n", "4->0\n", "\n", "\n", "o\n", "\n", "\n", "\n" ], "text/plain": [ " *' at 0x7f74580553c0> >" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a_s = spot.split_2step(a, True)\n", "print(a.acc())\n", "a_s" ] }, { "cell_type": "code", "execution_count": 11, "id": "958d81f2", "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "0\n", "\n", "0\n", "\n", "\n", "\n", "I->0\n", "\n", "\n", "\n", "\n", "\n", "1\n", "\n", "1\n", "\n", "\n", "\n", "0->1\n", "\n", "\n", "\n", "i0\n", "/\n", "\n", "o\n", "\n", "\n", "\n", "\n", "1->0\n", "\n", "\n", "\n", "i1\n", "/\n", "\n", "1\n", "\n", "\n", "\n", "\n", "2\n", "\n", "2\n", "\n", "\n", "\n", "1->2\n", "\n", "\n", "\n", "i0\n", "/\n", "\n", "!o\n", "\n", "\n", "\n", "\n" ], "text/plain": [ " *' at 0x7f743a5ca6c0> >" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a = spot.make_twa_graph()\n", "a.acc().set_acceptance(spot.acc_code.t())\n", "i0 = buddy.bdd_ithvar(a.register_ap('i0'))\n", "i1 = buddy.bdd_ithvar(a.register_ap('i1'))\n", "o = buddy.bdd_ithvar(a.register_ap('o'))\n", "tt = buddy.bddtrue\n", "a0 = spot.mark_t([0])\n", "a.new_states(3)\n", "a.new_edge(0,1,i0&o,a0)\n", "a.new_edge(1,0,i1,a0)\n", "a.new_edge(1,2,i0&(buddy.bdd_not(o)),a0)\n", "spot.set_synthesis_outputs(a, o)\n", "a" ] }, { "cell_type": "code", "execution_count": 12, "id": "078bb43e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(0, t)\n" ] }, { "data": { "image/svg+xml": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "t\n", "[all]\n", "\n", "\n", "\n", "0\n", "\n", "0\n", "\n", "\n", "\n", "I->0\n", "\n", "\n", "\n", "\n", "\n", "3\n", "\n", "3\n", "\n", "\n", "\n", "0->3\n", "\n", "\n", "i0\n", "\n", "\n", "\n", "1\n", "\n", "1\n", "\n", "\n", "\n", "3->1\n", "\n", "\n", "o\n", "\n", "\n", "\n", "4\n", "\n", "4\n", "\n", "\n", "\n", "1->4\n", "\n", "\n", "!i0 & i1\n", "\n", "\n", "\n", "5\n", "\n", "5\n", "\n", "\n", "\n", "1->5\n", "\n", "\n", "i0 & !i1\n", "\n", "\n", "\n", "6\n", "\n", "6\n", "\n", "\n", "\n", "1->6\n", "\n", "\n", "i0 & i1\n", "\n", "\n", "\n", "4->0\n", "\n", "\n", "1\n", "\n", "\n", "\n", "2\n", "\n", "2\n", "\n", "\n", "\n", "5->2\n", "\n", "\n", "!o\n", "\n", "\n", "\n", "6->0\n", "\n", "\n", "1\n", "\n", "\n", "\n", "6->2\n", "\n", "\n", "!o\n", "\n", "\n", "\n" ], "text/plain": [ " *' at 0x7f7458059f90> >" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a_snc = spot.split_2step(a, False)\n", "print(a_snc.acc())\n", "a_snc" ] }, { "cell_type": "code", "execution_count": 13, "id": "05b4a138", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(1, Fin(0))\n" ] }, { "data": { "image/svg+xml": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "Fin(\n", "\n", ")\n", "[co-Büchi]\n", "\n", "\n", "\n", "0\n", "\n", "0\n", "\n", "\n", "\n", "I->0\n", "\n", "\n", "\n", "\n", "\n", "3\n", "\n", "3\n", "\n", "\n", "\n", "0->3\n", "\n", "\n", "!i0\n", "\n", "\n", "\n", "5\n", "\n", "5\n", "\n", "\n", "\n", "0->5\n", "\n", "\n", "i0\n", "\n", "\n", "\n", "4\n", "\n", "4\n", "\n", "\n", "\n", "3->4\n", "\n", "\n", "1\n", "\n", "\n", "\n", "\n", "1\n", "\n", "1\n", "\n", "\n", "\n", "5->1\n", "\n", "\n", "o\n", "\n", "\n", "\n", "1->3\n", "\n", "\n", "!i0 & !i1\n", "\n", "\n", "\n", "6\n", "\n", "6\n", "\n", "\n", "\n", "1->6\n", "\n", "\n", "!i0 & i1\n", "\n", "\n", "\n", "7\n", "\n", "7\n", "\n", "\n", "\n", "1->7\n", "\n", "\n", "i0 & !i1\n", "\n", "\n", "\n", "8\n", "\n", "8\n", "\n", "\n", "\n", "1->8\n", "\n", "\n", "i0 & i1\n", "\n", "\n", "\n", "6->0\n", "\n", "\n", "1\n", "\n", "\n", "\n", "2\n", "\n", "2\n", "\n", "\n", "\n", "7->2\n", "\n", "\n", "!o\n", "\n", "\n", "\n", "8->0\n", "\n", "\n", "1\n", "\n", "\n", "\n", "8->2\n", "\n", "\n", "!o\n", "\n", "\n", "\n", "2->3\n", "\n", "\n", "1\n", "\n", "\n", "\n", "4->3\n", "\n", "\n", "1\n", "\n", "\n", "\n", "\n" ], "text/plain": [ " *' at 0x7f7458055870> >" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a_s = spot.split_2step(a, True)\n", "print(a_s.acc())\n", "a_s" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, "nbformat_minor": 5 }