diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml new file mode 100644 index 00000000..dcafa5dc --- /dev/null +++ b/.github/workflows/build_docs.yml @@ -0,0 +1,34 @@ +name: Build and Deploy Docs + +on: + push: + branches: + - dev + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + shell: bash + + - name: Build documentation + run: | + chmod +x ./build_docs.sh + ./build_docs.sh + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs + publish_branch: gh-pages diff --git a/.gitignore b/.gitignore index b5c98168..dcf5a04a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ build/ *.uplc *.cbor *.plutus +docs/opshin +docs/index.js +docs/doc-search.html # Created by https://www.toptal.com/developers/gitignore/api/python,pycharm+all # Edit at https://www.toptal.com/developers/gitignore?templates=python,pycharm+all diff --git a/docs/doc-search.html b/docs/doc-search.html deleted file mode 100644 index ff3beb0c..00000000 --- a/docs/doc-search.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Search - - - - - - - -
-

- -
- - - - - - \ No newline at end of file diff --git a/docs/index.js b/docs/index.js deleted file mode 100644 index e4a24f6a..00000000 --- a/docs/index.js +++ /dev/null @@ -1 +0,0 @@ -INDEX={"version":"2.3.9","fields":["name","ref","doc"],"fieldVectors":[["name/0",[0,50.454]],["ref/0",[0,25.252]],["doc/0",[0,2.231,null,0.963,null,0.8,null,0.39,null,0.084,null,1.185,null,2.037,null,0.843,null,0.177,null,0.377,null,0.177,null,0.7,null,1.708,null,0.657,null,0.191,null,0.736,null,0.91,null,1.553,null,0.377,null,0.559,null,0.559,null,0.135,null,0.156,null,0.255,null,0.831,null,0.191,null,0.518,null,0.191,null,0.191,null,0.124,null,0.647,null,0.191,null,0.1,null,0.191,null,0.191,null,0.91,null,0.168,null,0.116,null,0.191,null,0.227,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.192,null,0.191,null,0.168,null,0.35,null,0.177,null,0.134,null,0.177,null,0.177,null,0.278,null,0.191,null,0.559,null,0.552,null,0.91,null,0.377,null,0.377,null,0.559,null,0.471,null,0.318,null,0.191,null,0.191,null,0.35,null,0.559,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.1,null,0.092,null,0.98,null,0.127,null,0.147,null,0.332,null,0.083,null,0.168,null,0.177,null,0.191,null,0.354,null,0.174,null,0.191,null,0.191,null,0.191,null,0.147,null,0.736,null,0.741,null,0.91,null,0.484,null,0.377,null,0.377,null,0.377,null,0.471,null,0.191,null,0.191,null,0.168,null,0.377,null,0.083,null,0.191,null,0.471,null,0.124,null,0.284,null,0.191,null,0.191,null,0.377,null,0.177,null,0.567,null,0.191,null,0.191,null,0.151,null,0.191,null,0.107,null,0.255,null,0.191,null,0.141,null,0.559,null,0.191,null,0.191,null,0.377,null,0.191,null,0.647,null,0.144,null,0.177,null,0.161,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.077,null,0.147,null,0.109,null,0.161,null,0.191,null,0.191,null,0.332,null,0.191,null,0.191,null,0.124,null,0.35,null,0.191,null,0.191,null,0.151,null,0.491,null,0.29,null,0.327,null,0.177,null,0.131,null,0.318,null,0.377,null,0.135,null,0.191,null,0.377,null,0.377,null,0.177,null,0.191,null,0.191,null,0.177,null,0.191,null,0.191,null,0.156,null,0.104,null,0.127,null,0.161,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.177,null,0.191,null,0.191,null,0.191,null,0.191,null,0.559,null,0.559,null,0.377,null,0.191,null,0.191,null,0.191,null,0.191,null,0.307,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.377,null,0.131,null,0.138,null,0.168,null,0.191,null,0.191,null,0.559,null,0.191,null,0.191,null,0.191,null,0.191,null,0.91,null,0.168,null,0.191,null,0.191,null,0.168,null,0.191,null,0.191,null,0.116,null,0.91,null,0.332,null,0.377,null,0.377,null,0.191,null,0.191,null,0.138,null,0.191,null,0.191,null,0.161,null,0.191,null,0.377,null,0.191,null,0.161,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.213,null,0.177,null,0.377,null,0.191,null,0.191,null,0.191,null,0.377,null,0.191,null,0.126,null,0.141,null,0.191,null,0.377,null,0.191,null,0.377,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.559,null,0.191,null,0.191,null,0.191,null,0.377,null,0.377,null,0.191,null,0.191,null,0.168,null,0.191,null,0.191,null,0.151,null,0.161,null,0.191,null,0.191,null,0.191,null,0.161,null,0.191,null,0.191,null,0.161,null,0.377,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.191,null,0.135,null,0.191,null,0.105,null,0.191,null,0.191,null,0.151,null,0.191,null,0.191,null,0.091,null,0.191,null,0.191]],["name/1",[309,69.894]],["ref/1",[310,34.982]],["doc/1",[]],["name/2",[311,64.791]],["ref/2",[312,32.428]],["doc/2",[1,3.964,313,4.823,null,4.471,null,4.471,null,5.98,null,4.471,null,4.823,null,4.471,null,4.471,null,2.502]],["name/3",[322,69.894]],["ref/3",[323,34.982]],["doc/3",[]],["name/4",[315,64.791]],["ref/4",[324,34.982]],["doc/4",[]],["name/5",[317,64.791]],["ref/5",[325,34.982]],["doc/5",[]],["name/6",[319,64.791]],["ref/6",[326,34.982]],["doc/6",[]],["name/7",[327,36.487]],["ref/7",[328,34.982]],["doc/7",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/8",[335,43.295]],["ref/8",[336,34.982]],["doc/8",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/9",[349,43.295]],["ref/9",[350,34.982]],["doc/9",[52,3.14,351,3.916,null,3.112]],["name/10",[353,43.295]],["ref/10",[354,34.982]],["doc/10",[351,4.274,null,3.397]],["name/11",[355,43.295]],["ref/11",[356,34.982]],["doc/11",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/12",[339,28.504]],["ref/12",[358,34.982]],["doc/12",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/13",[362,43.295]],["ref/13",[363,34.982]],["doc/13",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/14",[371,43.295]],["ref/14",[372,34.982]],["doc/14",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/15",[376,43.295]],["ref/15",[377,34.982]],["doc/15",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/16",[378,43.295]],["ref/16",[379,34.982]],["doc/16",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/17",[381,43.295]],["ref/17",[382,34.982]],["doc/17",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/18",[383,43.295]],["ref/18",[384,34.982]],["doc/18",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/19",[387,69.894]],["ref/19",[388,34.982]],["doc/19",[389,7.449,null,7.449]],["name/20",[52,24.757]],["ref/20",[316,28.485]],["doc/20",[]],["name/21",[349,43.295]],["ref/21",[391,34.982]],["doc/21",[52,3.14,351,3.916,null,3.112]],["name/22",[353,43.295]],["ref/22",[392,34.982]],["doc/22",[351,4.274,null,3.397]],["name/23",[355,43.295]],["ref/23",[393,34.982]],["doc/23",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/24",[339,28.504]],["ref/24",[394,34.982]],["doc/24",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/25",[362,43.295]],["ref/25",[395,34.982]],["doc/25",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/26",[327,36.487]],["ref/26",[396,34.982]],["doc/26",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/27",[335,43.295]],["ref/27",[397,34.982]],["doc/27",[47,3.607,83,3.089,329,2.25,337,4.342,339,2.889,398,6.225]],["name/28",[371,43.295]],["ref/28",[399,34.982]],["doc/28",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/29",[376,43.295]],["ref/29",[400,34.982]],["doc/29",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/30",[378,43.295]],["ref/30",[401,34.982]],["doc/30",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/31",[381,43.295]],["ref/31",[402,34.982]],["doc/31",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/32",[383,43.295]],["ref/32",[403,34.982]],["doc/32",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/33",[346,43.295]],["ref/33",[404,32.428]],["doc/33",[1,2.365,96,3.488,316,4.321,351,2.345,405,5.307,null,7.316,null,4.664,null,4.473,null,5.307,null,5.307]],["name/34",[357,29.74]],["ref/34",[411,34.982]],["doc/34",[]],["name/35",[407,61.429]],["ref/35",[412,34.982]],["doc/35",[]],["name/36",[351,30.88]],["ref/36",[413,34.982]],["doc/36",[]],["name/37",[408,58.919]],["ref/37",[414,34.982]],["doc/37",[]],["name/38",[415,64.791]],["ref/38",[416,32.428]],["doc/38",[415,9.871]],["name/39",[335,43.295]],["ref/39",[417,34.982]],["doc/39",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/40",[349,43.295]],["ref/40",[418,34.982]],["doc/40",[52,3.14,351,3.916,null,3.112]],["name/41",[353,43.295]],["ref/41",[419,34.982]],["doc/41",[351,4.274,null,3.397]],["name/42",[355,43.295]],["ref/42",[420,34.982]],["doc/42",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/43",[339,28.504]],["ref/43",[421,34.982]],["doc/43",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/44",[362,43.295]],["ref/44",[422,34.982]],["doc/44",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/45",[327,36.487]],["ref/45",[423,34.982]],["doc/45",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/46",[371,43.295]],["ref/46",[424,34.982]],["doc/46",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/47",[376,43.295]],["ref/47",[425,34.982]],["doc/47",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/48",[378,43.295]],["ref/48",[426,34.982]],["doc/48",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/49",[381,43.295]],["ref/49",[427,34.982]],["doc/49",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/50",[383,43.295]],["ref/50",[428,34.982]],["doc/50",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/51",[429,69.894]],["ref/51",[430,34.982]],["doc/51",[52,2.089,311,5.468,345,3.736,364,3.416,431,5.468,null,5.468,null,5.898,null,4.542,null,5.898]],["name/52",[383,43.295]],["ref/52",[436,34.982]],["doc/52",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/53",[355,43.295]],["ref/53",[437,34.982]],["doc/53",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/54",[339,28.504]],["ref/54",[438,34.982]],["doc/54",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/55",[362,43.295]],["ref/55",[439,34.982]],["doc/55",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/56",[327,36.487]],["ref/56",[440,34.982]],["doc/56",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/57",[335,43.295]],["ref/57",[441,34.982]],["doc/57",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/58",[349,43.295]],["ref/58",[442,34.982]],["doc/58",[52,3.14,351,3.916,null,3.112]],["name/59",[353,43.295]],["ref/59",[443,34.982]],["doc/59",[351,4.274,null,3.397]],["name/60",[371,43.295]],["ref/60",[444,34.982]],["doc/60",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/61",[376,43.295]],["ref/61",[445,34.982]],["doc/61",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/62",[378,43.295]],["ref/62",[446,34.982]],["doc/62",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/63",[381,43.295]],["ref/63",[447,34.982]],["doc/63",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/64",[448,64.791]],["ref/64",[449,34.982]],["doc/64",[448,9.871]],["name/65",[335,43.295]],["ref/65",[450,34.982]],["doc/65",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/66",[349,43.295]],["ref/66",[451,34.982]],["doc/66",[52,3.14,351,3.916,null,3.112]],["name/67",[353,43.295]],["ref/67",[452,34.982]],["doc/67",[351,4.274,null,3.397]],["name/68",[355,43.295]],["ref/68",[453,34.982]],["doc/68",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/69",[339,28.504]],["ref/69",[454,34.982]],["doc/69",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/70",[362,43.295]],["ref/70",[455,34.982]],["doc/70",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/71",[327,36.487]],["ref/71",[456,34.982]],["doc/71",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/72",[371,43.295]],["ref/72",[457,34.982]],["doc/72",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/73",[376,43.295]],["ref/73",[458,34.982]],["doc/73",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/74",[378,43.295]],["ref/74",[459,34.982]],["doc/74",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/75",[381,43.295]],["ref/75",[460,34.982]],["doc/75",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/76",[383,43.295]],["ref/76",[461,34.982]],["doc/76",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/77",[462,69.894]],["ref/77",[463,34.982]],["doc/77",[404,8.968,464,9.674]],["name/78",[346,43.295]],["ref/78",[465,34.982]],["doc/78",[]],["name/79",[383,43.295]],["ref/79",[466,34.982]],["doc/79",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/80",[349,43.295]],["ref/80",[467,34.982]],["doc/80",[52,3.14,351,3.916,null,3.112]],["name/81",[353,43.295]],["ref/81",[468,34.982]],["doc/81",[351,4.274,null,3.397]],["name/82",[355,43.295]],["ref/82",[469,34.982]],["doc/82",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/83",[339,28.504]],["ref/83",[470,34.982]],["doc/83",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/84",[362,43.295]],["ref/84",[471,34.982]],["doc/84",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/85",[327,36.487]],["ref/85",[472,34.982]],["doc/85",[83,3.567,327,4.269,329,2.598,null,4.962]],["name/86",[335,43.295]],["ref/86",[473,34.982]],["doc/86",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/87",[371,43.295]],["ref/87",[474,34.982]],["doc/87",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/88",[376,43.295]],["ref/88",[475,34.982]],["doc/88",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/89",[378,43.295]],["ref/89",[476,34.982]],["doc/89",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/90",[381,43.295]],["ref/90",[477,34.982]],["doc/90",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/91",[478,69.894]],["ref/91",[479,34.982]],["doc/91",[480,9.674,null,9.674]],["name/92",[482,52.565]],["ref/92",[483,34.982]],["doc/92",[]],["name/93",[383,43.295]],["ref/93",[484,34.982]],["doc/93",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/94",[355,43.295]],["ref/94",[485,34.982]],["doc/94",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/95",[339,28.504]],["ref/95",[486,34.982]],["doc/95",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/96",[362,43.295]],["ref/96",[487,34.982]],["doc/96",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/97",[327,36.487]],["ref/97",[488,34.982]],["doc/97",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/98",[335,43.295]],["ref/98",[489,34.982]],["doc/98",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/99",[349,43.295]],["ref/99",[490,34.982]],["doc/99",[52,3.14,351,3.916,null,3.112]],["name/100",[353,43.295]],["ref/100",[491,34.982]],["doc/100",[351,4.274,null,3.397]],["name/101",[371,43.295]],["ref/101",[492,34.982]],["doc/101",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/102",[376,43.295]],["ref/102",[493,34.982]],["doc/102",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/103",[378,43.295]],["ref/103",[494,34.982]],["doc/103",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/104",[381,43.295]],["ref/104",[495,34.982]],["doc/104",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/105",[496,69.894]],["ref/105",[497,34.982]],["doc/105",[314,8.968,498,9.674]],["name/106",[482,52.565]],["ref/106",[499,34.982]],["doc/106",[]],["name/107",[327,36.487]],["ref/107",[500,34.982]],["doc/107",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/108",[335,43.295]],["ref/108",[501,34.982]],["doc/108",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/109",[349,43.295]],["ref/109",[502,34.982]],["doc/109",[52,3.14,351,3.916,null,3.112]],["name/110",[353,43.295]],["ref/110",[503,34.982]],["doc/110",[351,4.274,null,3.397]],["name/111",[355,43.295]],["ref/111",[504,34.982]],["doc/111",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/112",[339,28.504]],["ref/112",[505,34.982]],["doc/112",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/113",[362,43.295]],["ref/113",[506,34.982]],["doc/113",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/114",[371,43.295]],["ref/114",[507,34.982]],["doc/114",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/115",[376,43.295]],["ref/115",[508,34.982]],["doc/115",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/116",[378,43.295]],["ref/116",[509,34.982]],["doc/116",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/117",[381,43.295]],["ref/117",[510,34.982]],["doc/117",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/118",[383,43.295]],["ref/118",[511,34.982]],["doc/118",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/119",[512,69.894]],["ref/119",[513,34.982]],["doc/119",[52,2.509,109,5.327,269,6.225,514,7.083,null,7.083,null,5.971]],["name/120",[517,69.894]],["ref/120",[518,34.982]],["doc/120",[]],["name/121",[519,69.894]],["ref/121",[520,34.982]],["doc/121",[]],["name/122",[327,36.487]],["ref/122",[521,34.982]],["doc/122",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/123",[335,43.295]],["ref/123",[522,34.982]],["doc/123",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/124",[349,43.295]],["ref/124",[523,34.982]],["doc/124",[52,3.14,351,3.916,null,3.112]],["name/125",[353,43.295]],["ref/125",[524,34.982]],["doc/125",[351,4.274,null,3.397]],["name/126",[355,43.295]],["ref/126",[525,34.982]],["doc/126",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/127",[339,28.504]],["ref/127",[526,34.982]],["doc/127",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/128",[362,43.295]],["ref/128",[527,34.982]],["doc/128",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/129",[371,43.295]],["ref/129",[528,34.982]],["doc/129",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/130",[376,43.295]],["ref/130",[529,34.982]],["doc/130",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/131",[378,43.295]],["ref/131",[530,34.982]],["doc/131",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/132",[381,43.295]],["ref/132",[531,34.982]],["doc/132",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/133",[383,43.295]],["ref/133",[532,34.982]],["doc/133",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/134",[533,69.894]],["ref/134",[534,34.982]],["doc/134",[316,7.878,535,9.674]],["name/135",[482,52.565]],["ref/135",[536,34.982]],["doc/135",[]],["name/136",[383,43.295]],["ref/136",[537,34.982]],["doc/136",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/137",[355,43.295]],["ref/137",[538,34.982]],["doc/137",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/138",[339,28.504]],["ref/138",[539,34.982]],["doc/138",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/139",[327,36.487]],["ref/139",[540,34.982]],["doc/139",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/140",[335,43.295]],["ref/140",[541,34.982]],["doc/140",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/141",[349,43.295]],["ref/141",[542,34.982]],["doc/141",[52,3.14,351,3.916,null,3.112]],["name/142",[353,43.295]],["ref/142",[543,34.982]],["doc/142",[351,4.274,null,3.397]],["name/143",[362,43.295]],["ref/143",[544,34.982]],["doc/143",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/144",[371,43.295]],["ref/144",[545,34.982]],["doc/144",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/145",[376,43.295]],["ref/145",[546,34.982]],["doc/145",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/146",[378,43.295]],["ref/146",[547,34.982]],["doc/146",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/147",[381,43.295]],["ref/147",[548,34.982]],["doc/147",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/148",[549,69.894]],["ref/148",[550,34.982]],["doc/148",[316,8.698,551,8.179,null,7.581]],["name/149",[553,69.894]],["ref/149",[554,34.982]],["doc/149",[]],["name/150",[552,64.791]],["ref/150",[555,34.982]],["doc/150",[]],["name/151",[383,43.295]],["ref/151",[556,34.982]],["doc/151",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/152",[355,43.295]],["ref/152",[557,34.982]],["doc/152",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/153",[339,28.504]],["ref/153",[558,34.982]],["doc/153",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/154",[327,36.487]],["ref/154",[559,34.982]],["doc/154",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/155",[335,43.295]],["ref/155",[560,34.982]],["doc/155",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/156",[349,43.295]],["ref/156",[561,34.982]],["doc/156",[52,3.14,351,3.916,null,3.112]],["name/157",[353,43.295]],["ref/157",[562,34.982]],["doc/157",[351,4.274,null,3.397]],["name/158",[362,43.295]],["ref/158",[563,34.982]],["doc/158",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/159",[371,43.295]],["ref/159",[564,34.982]],["doc/159",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/160",[376,43.295]],["ref/160",[565,34.982]],["doc/160",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/161",[378,43.295]],["ref/161",[566,34.982]],["doc/161",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/162",[381,43.295]],["ref/162",[567,34.982]],["doc/162",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/163",[568,69.894]],["ref/163",[569,34.982]],["doc/163",[416,8.968,570,9.674]],["name/164",[482,52.565]],["ref/164",[571,34.982]],["doc/164",[]],["name/165",[383,43.295]],["ref/165",[572,34.982]],["doc/165",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/166",[349,43.295]],["ref/166",[573,34.982]],["doc/166",[52,3.14,351,3.916,null,3.112]],["name/167",[353,43.295]],["ref/167",[574,34.982]],["doc/167",[351,4.274,null,3.397]],["name/168",[355,43.295]],["ref/168",[575,34.982]],["doc/168",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/169",[339,28.504]],["ref/169",[576,34.982]],["doc/169",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/170",[362,43.295]],["ref/170",[577,34.982]],["doc/170",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/171",[327,36.487]],["ref/171",[578,34.982]],["doc/171",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/172",[335,43.295]],["ref/172",[579,34.982]],["doc/172",[47,3.607,83,3.089,329,2.25,337,4.342,339,2.889,398,6.225]],["name/173",[371,43.295]],["ref/173",[580,34.982]],["doc/173",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/174",[376,43.295]],["ref/174",[581,34.982]],["doc/174",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/175",[378,43.295]],["ref/175",[582,34.982]],["doc/175",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/176",[381,43.295]],["ref/176",[583,34.982]],["doc/176",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/177",[584,64.791]],["ref/177",[585,34.982]],["doc/177",[584,9.871]],["name/178",[383,43.295]],["ref/178",[586,34.982]],["doc/178",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/179",[349,43.295]],["ref/179",[587,34.982]],["doc/179",[52,3.14,351,3.916,null,3.112]],["name/180",[362,43.295]],["ref/180",[588,34.982]],["doc/180",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/181",[327,36.487]],["ref/181",[589,34.982]],["doc/181",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/182",[335,43.295]],["ref/182",[590,34.982]],["doc/182",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/183",[353,43.295]],["ref/183",[591,34.982]],["doc/183",[351,4.274,null,3.397]],["name/184",[355,43.295]],["ref/184",[592,34.982]],["doc/184",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/185",[339,28.504]],["ref/185",[593,34.982]],["doc/185",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/186",[371,43.295]],["ref/186",[594,34.982]],["doc/186",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/187",[376,43.295]],["ref/187",[595,34.982]],["doc/187",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/188",[378,43.295]],["ref/188",[596,34.982]],["doc/188",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/189",[381,43.295]],["ref/189",[597,34.982]],["doc/189",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/190",[598,64.791]],["ref/190",[599,34.982]],["doc/190",[598,9.871]],["name/191",[349,43.295]],["ref/191",[600,34.982]],["doc/191",[52,3.14,351,3.916,null,3.112]],["name/192",[355,43.295]],["ref/192",[601,34.982]],["doc/192",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/193",[339,28.504]],["ref/193",[602,34.982]],["doc/193",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/194",[362,43.295]],["ref/194",[603,34.982]],["doc/194",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/195",[327,36.487]],["ref/195",[604,34.982]],["doc/195",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/196",[335,43.295]],["ref/196",[605,34.982]],["doc/196",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/197",[353,43.295]],["ref/197",[606,34.982]],["doc/197",[351,4.274,null,3.397]],["name/198",[371,43.295]],["ref/198",[607,34.982]],["doc/198",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/199",[376,43.295]],["ref/199",[608,34.982]],["doc/199",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/200",[378,43.295]],["ref/200",[609,34.982]],["doc/200",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/201",[381,43.295]],["ref/201",[610,34.982]],["doc/201",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/202",[383,43.295]],["ref/202",[611,34.982]],["doc/202",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/203",[612,64.791]],["ref/203",[613,34.982]],["doc/203",[612,9.871]],["name/204",[383,43.295]],["ref/204",[614,34.982]],["doc/204",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/205",[349,43.295]],["ref/205",[615,34.982]],["doc/205",[52,3.14,351,3.916,null,3.112]],["name/206",[355,43.295]],["ref/206",[616,34.982]],["doc/206",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/207",[339,28.504]],["ref/207",[617,34.982]],["doc/207",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/208",[362,43.295]],["ref/208",[618,34.982]],["doc/208",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/209",[327,36.487]],["ref/209",[619,34.982]],["doc/209",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/210",[335,43.295]],["ref/210",[620,34.982]],["doc/210",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/211",[353,43.295]],["ref/211",[621,34.982]],["doc/211",[351,4.274,null,3.397]],["name/212",[371,43.295]],["ref/212",[622,34.982]],["doc/212",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/213",[376,43.295]],["ref/213",[623,34.982]],["doc/213",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/214",[378,43.295]],["ref/214",[624,34.982]],["doc/214",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/215",[381,43.295]],["ref/215",[625,34.982]],["doc/215",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/216",[626,64.791]],["ref/216",[627,34.982]],["doc/216",[626,9.871]],["name/217",[349,43.295]],["ref/217",[628,34.982]],["doc/217",[52,3.14,351,3.916,null,3.112]],["name/218",[362,43.295]],["ref/218",[629,34.982]],["doc/218",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/219",[327,36.487]],["ref/219",[630,34.982]],["doc/219",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/220",[335,43.295]],["ref/220",[631,34.982]],["doc/220",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/221",[353,43.295]],["ref/221",[632,34.982]],["doc/221",[351,4.274,null,3.397]],["name/222",[355,43.295]],["ref/222",[633,34.982]],["doc/222",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/223",[339,28.504]],["ref/223",[634,34.982]],["doc/223",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/224",[371,43.295]],["ref/224",[635,34.982]],["doc/224",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/225",[376,43.295]],["ref/225",[636,34.982]],["doc/225",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/226",[378,43.295]],["ref/226",[637,34.982]],["doc/226",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/227",[381,43.295]],["ref/227",[638,34.982]],["doc/227",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/228",[383,43.295]],["ref/228",[639,34.982]],["doc/228",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/229",[640,64.791]],["ref/229",[641,34.982]],["doc/229",[640,9.871]],["name/230",[362,43.295]],["ref/230",[642,34.982]],["doc/230",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/231",[327,36.487]],["ref/231",[643,34.982]],["doc/231",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/232",[335,43.295]],["ref/232",[644,34.982]],["doc/232",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/233",[349,43.295]],["ref/233",[645,34.982]],["doc/233",[52,3.14,351,3.916,null,3.112]],["name/234",[353,43.295]],["ref/234",[646,34.982]],["doc/234",[351,4.274,null,3.397]],["name/235",[355,43.295]],["ref/235",[647,34.982]],["doc/235",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/236",[339,28.504]],["ref/236",[648,34.982]],["doc/236",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/237",[371,43.295]],["ref/237",[649,34.982]],["doc/237",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/238",[376,43.295]],["ref/238",[650,34.982]],["doc/238",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/239",[378,43.295]],["ref/239",[651,34.982]],["doc/239",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/240",[381,43.295]],["ref/240",[652,34.982]],["doc/240",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/241",[383,43.295]],["ref/241",[653,34.982]],["doc/241",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/242",[654,69.894]],["ref/242",[655,34.982]],["doc/242",[47,4.164,52,2.897,656,8.179,null,8.179]],["name/243",[335,43.295]],["ref/243",[658,34.982]],["doc/243",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/244",[349,43.295]],["ref/244",[659,34.982]],["doc/244",[52,3.14,351,3.916,null,3.112]],["name/245",[353,43.295]],["ref/245",[660,34.982]],["doc/245",[351,4.274,null,3.397]],["name/246",[355,43.295]],["ref/246",[661,34.982]],["doc/246",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/247",[339,28.504]],["ref/247",[662,34.982]],["doc/247",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/248",[362,43.295]],["ref/248",[663,34.982]],["doc/248",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/249",[327,36.487]],["ref/249",[664,34.982]],["doc/249",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/250",[371,43.295]],["ref/250",[665,34.982]],["doc/250",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/251",[376,43.295]],["ref/251",[666,34.982]],["doc/251",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/252",[378,43.295]],["ref/252",[667,34.982]],["doc/252",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/253",[381,43.295]],["ref/253",[668,34.982]],["doc/253",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/254",[383,43.295]],["ref/254",[669,34.982]],["doc/254",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/255",[670,69.894]],["ref/255",[671,34.982]],["doc/255",[]],["name/256",[672,69.894]],["ref/256",[673,34.982]],["doc/256",[]],["name/257",[674,69.894]],["ref/257",[675,34.982]],["doc/257",[]],["name/258",[676,69.894]],["ref/258",[677,34.982]],["doc/258",[]],["name/259",[678,69.894]],["ref/259",[679,32.428]],["doc/259",[]],["name/260",[680,51.454]],["ref/260",[681,34.982]],["doc/260",[]],["name/261",[682,51.454]],["ref/261",[683,34.982]],["doc/261",[]],["name/262",[684,69.894]],["ref/262",[685,34.982]],["doc/262",[]],["name/263",[680,51.454]],["ref/263",[686,34.982]],["doc/263",[]],["name/264",[682,51.454]],["ref/264",[687,34.982]],["doc/264",[]],["name/265",[688,69.894]],["ref/265",[689,34.982]],["doc/265",[]],["name/266",[680,51.454]],["ref/266",[690,34.982]],["doc/266",[]],["name/267",[682,51.454]],["ref/267",[691,34.982]],["doc/267",[]],["name/268",[692,69.894]],["ref/268",[693,34.982]],["doc/268",[]],["name/269",[680,51.454]],["ref/269",[694,34.982]],["doc/269",[]],["name/270",[682,51.454]],["ref/270",[695,34.982]],["doc/270",[]],["name/271",[696,69.894]],["ref/271",[697,34.982]],["doc/271",[]],["name/272",[680,51.454]],["ref/272",[698,34.982]],["doc/272",[]],["name/273",[682,51.454]],["ref/273",[699,34.982]],["doc/273",[]],["name/274",[700,69.894]],["ref/274",[701,34.982]],["doc/274",[52,2.352,156,3.879,341,4.112,702,4.554,null,6.639,null,9.277]],["name/275",[705,61.429]],["ref/275",[706,34.982]],["doc/275",[]],["name/276",[335,43.295]],["ref/276",[707,34.982]],["doc/276",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/277",[349,43.295]],["ref/277",[708,34.982]],["doc/277",[52,3.14,351,3.916,null,3.112]],["name/278",[353,43.295]],["ref/278",[709,34.982]],["doc/278",[351,4.274,null,3.397]],["name/279",[355,43.295]],["ref/279",[710,34.982]],["doc/279",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/280",[339,28.504]],["ref/280",[711,34.982]],["doc/280",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/281",[362,43.295]],["ref/281",[712,34.982]],["doc/281",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/282",[327,36.487]],["ref/282",[713,34.982]],["doc/282",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/283",[371,43.295]],["ref/283",[714,34.982]],["doc/283",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/284",[376,43.295]],["ref/284",[715,34.982]],["doc/284",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/285",[378,43.295]],["ref/285",[716,34.982]],["doc/285",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/286",[381,43.295]],["ref/286",[717,34.982]],["doc/286",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/287",[383,43.295]],["ref/287",[718,34.982]],["doc/287",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/288",[719,69.894]],["ref/288",[720,34.982]],["doc/288",[312,7.581,679,7.581,705,7.188,721,8.179]],["name/289",[482,52.565]],["ref/289",[722,34.982]],["doc/289",[]],["name/290",[705,61.429]],["ref/290",[723,34.982]],["doc/290",[]],["name/291",[383,43.295]],["ref/291",[724,34.982]],["doc/291",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/292",[349,43.295]],["ref/292",[725,34.982]],["doc/292",[52,3.14,351,3.916,null,3.112]],["name/293",[353,43.295]],["ref/293",[726,34.982]],["doc/293",[351,4.274,null,3.397]],["name/294",[355,43.295]],["ref/294",[727,34.982]],["doc/294",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/295",[339,28.504]],["ref/295",[728,34.982]],["doc/295",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/296",[362,43.295]],["ref/296",[729,34.982]],["doc/296",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/297",[327,36.487]],["ref/297",[730,34.982]],["doc/297",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/298",[335,43.295]],["ref/298",[731,34.982]],["doc/298",[47,3.607,83,3.089,329,2.25,337,4.342,339,2.889,398,6.225]],["name/299",[371,43.295]],["ref/299",[732,34.982]],["doc/299",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/300",[376,43.295]],["ref/300",[733,34.982]],["doc/300",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/301",[378,43.295]],["ref/301",[734,34.982]],["doc/301",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/302",[381,43.295]],["ref/302",[735,34.982]],["doc/302",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/303",[736,69.894]],["ref/303",[737,34.982]],["doc/303",[]],["name/304",[738,69.894]],["ref/304",[739,34.982]],["doc/304",[]],["name/305",[740,69.894]],["ref/305",[741,34.982]],["doc/305",[]],["name/306",[742,39.479]],["ref/306",[743,34.982]],["doc/306",[]],["name/307",[744,69.894]],["ref/307",[745,34.982]],["doc/307",[]],["name/308",[746,69.894]],["ref/308",[747,34.982]],["doc/308",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/309",[793,37.218]],["ref/309",[794,34.982]],["doc/309",[]],["name/310",[795,53.815]],["ref/310",[796,34.982]],["doc/310",[]],["name/311",[797,28.504]],["ref/311",[798,34.982]],["doc/311",[140,3.916,797,3.945]],["name/312",[799,69.894]],["ref/312",[800,34.982]],["doc/312",[]],["name/313",[801,69.894]],["ref/313",[802,34.982]],["doc/313",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/314",[793,37.218]],["ref/314",[803,34.982]],["doc/314",[]],["name/315",[804,48.712]],["ref/315",[805,34.982]],["doc/315",[]],["name/316",[806,45.351]],["ref/316",[807,34.982]],["doc/316",[]],["name/317",[808,58.919]],["ref/317",[809,34.982]],["doc/317",[]],["name/318",[810,47.23]],["ref/318",[811,34.982]],["doc/318",[]],["name/319",[797,28.504]],["ref/319",[812,34.982]],["doc/319",[140,3.916,797,3.945]],["name/320",[813,69.894]],["ref/320",[814,34.982]],["doc/320",[]],["name/321",[815,69.894]],["ref/321",[816,34.982]],["doc/321",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/322",[793,37.218]],["ref/322",[817,34.982]],["doc/322",[]],["name/323",[818,69.894]],["ref/323",[819,34.982]],["doc/323",[]],["name/324",[820,50.454]],["ref/324",[821,34.982]],["doc/324",[]],["name/325",[806,45.351]],["ref/325",[822,34.982]],["doc/325",[]],["name/326",[797,28.504]],["ref/326",[823,34.982]],["doc/326",[140,3.916,797,3.945]],["name/327",[824,69.894]],["ref/327",[825,34.982]],["doc/327",[]],["name/328",[826,69.894]],["ref/328",[827,34.982]],["doc/328",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/329",[793,37.218]],["ref/329",[828,34.982]],["doc/329",[]],["name/330",[829,61.429]],["ref/330",[830,34.982]],["doc/330",[]],["name/331",[831,56.914]],["ref/331",[832,34.982]],["doc/331",[]],["name/332",[797,28.504]],["ref/332",[833,34.982]],["doc/332",[140,3.916,797,3.945]],["name/333",[834,69.894]],["ref/333",[835,34.982]],["doc/333",[]],["name/334",[836,69.894]],["ref/334",[837,34.982]],["doc/334",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/335",[793,37.218]],["ref/335",[838,34.982]],["doc/335",[]],["name/336",[839,69.894]],["ref/336",[840,34.982]],["doc/336",[]],["name/337",[820,50.454]],["ref/337",[841,34.982]],["doc/337",[]],["name/338",[806,45.351]],["ref/338",[842,34.982]],["doc/338",[]],["name/339",[797,28.504]],["ref/339",[843,34.982]],["doc/339",[140,3.916,797,3.945]],["name/340",[844,69.894]],["ref/340",[845,34.982]],["doc/340",[]],["name/341",[846,69.894]],["ref/341",[847,34.982]],["doc/341",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/342",[793,37.218]],["ref/342",[848,34.982]],["doc/342",[]],["name/343",[849,52.565]],["ref/343",[850,34.982]],["doc/343",[]],["name/344",[797,28.504]],["ref/344",[851,34.982]],["doc/344",[140,3.916,797,3.945]],["name/345",[852,69.894]],["ref/345",[853,34.982]],["doc/345",[]],["name/346",[854,69.894]],["ref/346",[855,34.982]],["doc/346",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/347",[793,37.218]],["ref/347",[856,34.982]],["doc/347",[]],["name/348",[857,69.894]],["ref/348",[858,34.982]],["doc/348",[]],["name/349",[820,50.454]],["ref/349",[859,34.982]],["doc/349",[]],["name/350",[806,45.351]],["ref/350",[860,34.982]],["doc/350",[]],["name/351",[797,28.504]],["ref/351",[861,34.982]],["doc/351",[140,3.916,797,3.945]],["name/352",[862,69.894]],["ref/352",[863,34.982]],["doc/352",[]],["name/353",[864,69.894]],["ref/353",[865,34.982]],["doc/353",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/354",[793,37.218]],["ref/354",[866,34.982]],["doc/354",[]],["name/355",[867,69.894]],["ref/355",[868,34.982]],["doc/355",[]],["name/356",[795,53.815]],["ref/356",[869,34.982]],["doc/356",[]],["name/357",[870,55.245]],["ref/357",[871,34.982]],["doc/357",[]],["name/358",[797,28.504]],["ref/358",[872,34.982]],["doc/358",[140,3.916,797,3.945]],["name/359",[873,69.894]],["ref/359",[874,34.982]],["doc/359",[]],["name/360",[875,64.791]],["ref/360",[876,34.982]],["doc/360",[1,2.097,3,0.868,29,1.495,32,0.654,39,0.748,47,2.396,88,1.066,140,2.376,155,0.646,161,0.883,298,0.883,306,0.596,321,0.646,329,0.732,332,1.453,342,0.9,352,1.129,357,0.53,702,0.854,748,0.654,null,1.173,null,0.659,null,0.659,null,0.659,null,0.65,null,0.659,null,0.654,757,2.988,785,0.634,797,1.312,877,0.899,null,0.899,null,0.854,null,0.883,null,0.798,null,0.899,null,0.899,null,0.899,null,0.899,null,1.495,null,0.819,null,0.899,null,0.899,null,0.899]],["name/361",[793,37.218]],["ref/361",[891,34.982]],["doc/361",[]],["name/362",[804,48.712]],["ref/362",[892,34.982]],["doc/362",[]],["name/363",[806,45.351]],["ref/363",[893,34.982]],["doc/363",[]],["name/364",[810,47.23]],["ref/364",[894,34.982]],["doc/364",[]],["name/365",[797,28.504]],["ref/365",[895,34.982]],["doc/365",[140,3.916,797,3.945]],["name/366",[896,69.894]],["ref/366",[897,34.982]],["doc/366",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/367",[898,69.894]],["ref/367",[899,34.982]],["doc/367",[]],["name/368",[900,56.914]],["ref/368",[901,34.982]],["doc/368",[]],["name/369",[793,37.218]],["ref/369",[902,34.982]],["doc/369",[]],["name/370",[903,69.894]],["ref/370",[904,34.982]],["doc/370",[67,6.154,172,3.61,900,5.406,905,6.154,null,5.247,null,5.406,null,6.639]],["name/371",[909,58.919]],["ref/371",[910,34.982]],["doc/371",[]],["name/372",[911,58.919]],["ref/372",[912,34.982]],["doc/372",[]],["name/373",[913,69.894]],["ref/373",[914,34.982]],["doc/373",[]],["name/374",[915,69.894]],["ref/374",[916,34.982]],["doc/374",[]],["name/375",[849,52.565]],["ref/375",[917,34.982]],["doc/375",[]],["name/376",[804,48.712]],["ref/376",[918,34.982]],["doc/376",[]],["name/377",[806,45.351]],["ref/377",[919,34.982]],["doc/377",[]],["name/378",[810,47.23]],["ref/378",[920,34.982]],["doc/378",[]],["name/379",[808,58.919]],["ref/379",[921,34.982]],["doc/379",[]],["name/380",[797,28.504]],["ref/380",[922,34.982]],["doc/380",[140,3.916,797,3.945]],["name/381",[923,69.894]],["ref/381",[924,34.982]],["doc/381",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/382",[900,56.914]],["ref/382",[925,34.982]],["doc/382",[]],["name/383",[806,45.351]],["ref/383",[926,34.982]],["doc/383",[]],["name/384",[927,53.815]],["ref/384",[928,34.982]],["doc/384",[]],["name/385",[929,69.894]],["ref/385",[930,34.982]],["doc/385",[]],["name/386",[931,69.894]],["ref/386",[932,34.982]],["doc/386",[4,3.883,158,6.08,933,8.864]],["name/387",[934,69.894]],["ref/387",[935,34.982]],["doc/387",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/388",[797,28.504]],["ref/388",[936,34.982]],["doc/388",[140,3.916,797,3.945]],["name/389",[937,69.894]],["ref/389",[938,34.982]],["doc/389",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/390",[793,37.218]],["ref/390",[939,34.982]],["doc/390",[]],["name/391",[820,50.454]],["ref/391",[940,34.982]],["doc/391",[]],["name/392",[797,28.504]],["ref/392",[941,34.982]],["doc/392",[140,3.916,797,3.945]],["name/393",[942,69.894]],["ref/393",[943,34.982]],["doc/393",[]],["name/394",[944,69.894]],["ref/394",[945,34.982]],["doc/394",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/395",[793,37.218]],["ref/395",[946,34.982]],["doc/395",[]],["name/396",[947,69.894]],["ref/396",[948,34.982]],["doc/396",[]],["name/397",[797,28.504]],["ref/397",[949,34.982]],["doc/397",[140,3.916,797,3.945]],["name/398",[950,69.894]],["ref/398",[951,34.982]],["doc/398",[]],["name/399",[952,69.894]],["ref/399",[953,34.982]],["doc/399",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/400",[793,37.218]],["ref/400",[954,34.982]],["doc/400",[]],["name/401",[955,61.429]],["ref/401",[956,34.982]],["doc/401",[]],["name/402",[797,28.504]],["ref/402",[957,34.982]],["doc/402",[140,3.916,797,3.945]],["name/403",[958,69.894]],["ref/403",[959,34.982]],["doc/403",[]],["name/404",[960,69.894]],["ref/404",[961,34.982]],["doc/404",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/405",[793,37.218]],["ref/405",[962,34.982]],["doc/405",[]],["name/406",[963,61.429]],["ref/406",[964,34.982]],["doc/406",[]],["name/407",[831,56.914]],["ref/407",[965,34.982]],["doc/407",[]],["name/408",[797,28.504]],["ref/408",[966,34.982]],["doc/408",[140,3.916,797,3.945]],["name/409",[967,69.894]],["ref/409",[968,34.982]],["doc/409",[]],["name/410",[969,69.894]],["ref/410",[970,34.982]],["doc/410",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/411",[793,37.218]],["ref/411",[971,34.982]],["doc/411",[]],["name/412",[972,69.894]],["ref/412",[973,34.982]],["doc/412",[]],["name/413",[797,28.504]],["ref/413",[974,34.982]],["doc/413",[140,3.916,797,3.945]],["name/414",[975,69.894]],["ref/414",[976,34.982]],["doc/414",[]],["name/415",[977,69.894]],["ref/415",[978,34.982]],["doc/415",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/416",[793,37.218]],["ref/416",[979,34.982]],["doc/416",[]],["name/417",[849,52.565]],["ref/417",[980,34.982]],["doc/417",[]],["name/418",[981,55.245]],["ref/418",[982,34.982]],["doc/418",[]],["name/419",[983,61.429]],["ref/419",[984,34.982]],["doc/419",[]],["name/420",[985,55.245]],["ref/420",[986,34.982]],["doc/420",[]],["name/421",[987,58.919]],["ref/421",[988,34.982]],["doc/421",[]],["name/422",[989,61.429]],["ref/422",[990,34.982]],["doc/422",[]],["name/423",[797,28.504]],["ref/423",[991,34.982]],["doc/423",[140,3.916,797,3.945]],["name/424",[992,69.894]],["ref/424",[993,34.982]],["doc/424",[]],["name/425",[994,69.894]],["ref/425",[995,34.982]],["doc/425",[12,4.662,47,3.003,142,3.359,306,2.824,352,2.071,996,5.898,null,4.342,null,4.258,null,5.898]],["name/426",[355,43.295]],["ref/426",[1000,34.982]],["doc/426",[52,2.897,339,3.335,352,2.872,357,3.48]],["name/427",[339,28.504]],["ref/427",[1001,34.982]],["doc/427",[78,2.839,83,2.573,105,2.573,142,3.359,339,2.405,352,2.071,359,3.06,null,3.022,null,2.968]],["name/428",[335,43.295]],["ref/428",[1002,34.982]],["doc/428",[47,1.928,52,3.087,58,2.298,329,1.203,337,2.321,null,2.427,null,1.544,null,2.003,null,2.346,null,1.48,null,2.372,null,2.427,null,2.399,null,2.346,null,2.427,null,2.427]],["name/429",[349,43.295]],["ref/429",[1003,34.982]],["doc/429",[52,3.14,351,3.916,null,3.112]],["name/430",[353,43.295]],["ref/430",[1004,34.982]],["doc/430",[351,4.274,null,3.397]],["name/431",[362,43.295]],["ref/431",[1005,34.982]],["doc/431",[4,1.787,52,2.284,78,1.963,83,1.779,105,1.779,329,1.296,359,2.116,null,2.09,null,2.052,364,2.362,null,2.527,null,2.527,null,1.412,null,2.268,null,2.405,null,2.527]],["name/432",[327,36.487]],["ref/432",[1006,34.982]],["doc/432",[83,2.104,156,2.818,216,2.926,300,2.661,327,2.518,329,1.532,null,2.926,null,4.599,null,2.179,null,4.502,null,3.02]],["name/433",[371,43.295]],["ref/433",[1007,34.982]],["doc/433",[52,2.689,367,2.628,373,3.963,null,3.889,null,3.217]],["name/434",[376,43.295]],["ref/434",[1008,34.982]],["doc/434",[4,3.325,367,2.628,373,3.963,null,3.889,null,3.217]],["name/435",[378,43.295]],["ref/435",[1009,34.982]],["doc/435",[52,2.897,367,2.831,375,3.466,380,4.269]],["name/436",[381,43.295]],["ref/436",[1010,34.982]],["doc/436",[4,3.582,367,2.831,375,3.466,380,4.269]],["name/437",[383,43.295]],["ref/437",[1011,34.982]],["doc/437",[172,3.852,329,2.25,340,3.747,351,3.129,385,4.298,null,4.388]],["name/438",[1012,69.894]],["ref/438",[1013,34.982]],["doc/438",[1,4.463,21,1.137,null,1.306,63,1.352,null,1.352,77,0.843,143,1.352,192,1.306,226,1.352,230,2.45,248,1.055,332,0.725,339,1.185,342,0.627,352,0.563,357,0.683,516,1.352,768,1.616,787,0.892,879,1.101,1014,1.41,null,3.501,null,1.41,null,1.41,null,1.41,null,1.41,null,2.45,null,2.366,null,1.41,null,1.41,null,1.41,null,1.158,null,1.101,null,1.41,null,1.41]],["name/439",[1029,69.894]],["ref/439",[1030,34.982]],["doc/439",[]],["name/440",[1031,64.791]],["ref/440",[1032,34.982]],["doc/440",[]],["name/441",[1033,64.791]],["ref/441",[1034,34.982]],["doc/441",[]],["name/442",[1035,69.894]],["ref/442",[1036,34.982]],["doc/442",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/443",[793,37.218]],["ref/443",[1037,34.982]],["doc/443",[]],["name/444",[1038,69.894]],["ref/444",[1039,34.982]],["doc/444",[]],["name/445",[820,50.454]],["ref/445",[1040,34.982]],["doc/445",[]],["name/446",[797,28.504]],["ref/446",[1041,34.982]],["doc/446",[140,3.916,797,3.945]],["name/447",[1042,69.894]],["ref/447",[1043,34.982]],["doc/447",[]],["name/448",[1044,69.894]],["ref/448",[1045,34.982]],["doc/448",[]],["name/449",[680,51.454]],["ref/449",[1046,34.982]],["doc/449",[]],["name/450",[682,51.454]],["ref/450",[1047,34.982]],["doc/450",[]],["name/451",[1048,69.894]],["ref/451",[1049,34.982]],["doc/451",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/452",[793,37.218]],["ref/452",[1050,34.982]],["doc/452",[]],["name/453",[820,50.454]],["ref/453",[1051,34.982]],["doc/453",[]],["name/454",[797,28.504]],["ref/454",[1052,34.982]],["doc/454",[140,3.916,797,3.945]],["name/455",[1053,69.894]],["ref/455",[1054,34.982]],["doc/455",[]],["name/456",[1055,69.894]],["ref/456",[1056,34.982]],["doc/456",[52,2.689,78,3.654,342,2.966,1057,7.592,null,7.037]],["name/457",[1059,69.894]],["ref/457",[1060,34.982]],["doc/457",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/458",[793,37.218]],["ref/458",[1061,34.982]],["doc/458",[]],["name/459",[804,48.712]],["ref/459",[1062,34.982]],["doc/459",[]],["name/460",[797,28.504]],["ref/460",[1063,34.982]],["doc/460",[140,3.916,797,3.945]],["name/461",[1064,69.894]],["ref/461",[1065,34.982]],["doc/461",[]],["name/462",[1066,69.894]],["ref/462",[1067,34.982]],["doc/462",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/463",[793,37.218]],["ref/463",[1068,34.982]],["doc/463",[]],["name/464",[849,52.565]],["ref/464",[1069,34.982]],["doc/464",[]],["name/465",[797,28.504]],["ref/465",[1070,34.982]],["doc/465",[140,3.916,797,3.945]],["name/466",[1071,69.894]],["ref/466",[1072,34.982]],["doc/466",[]],["name/467",[1073,69.894]],["ref/467",[1074,34.982]],["doc/467",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/468",[793,37.218]],["ref/468",[1075,34.982]],["doc/468",[]],["name/469",[1076,69.894]],["ref/469",[1077,34.982]],["doc/469",[]],["name/470",[820,50.454]],["ref/470",[1078,34.982]],["doc/470",[]],["name/471",[810,47.23]],["ref/471",[1079,34.982]],["doc/471",[]],["name/472",[797,28.504]],["ref/472",[1080,34.982]],["doc/472",[140,3.916,797,3.945]],["name/473",[1081,69.894]],["ref/473",[1082,34.982]],["doc/473",[]],["name/474",[1083,69.894]],["ref/474",[1084,34.982]],["doc/474",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/475",[793,37.218]],["ref/475",[1085,34.982]],["doc/475",[]],["name/476",[1086,58.919]],["ref/476",[1087,34.982]],["doc/476",[]],["name/477",[810,47.23]],["ref/477",[1088,34.982]],["doc/477",[]],["name/478",[797,28.504]],["ref/478",[1089,34.982]],["doc/478",[140,3.916,797,3.945]],["name/479",[1090,64.791]],["ref/479",[1091,34.982]],["doc/479",[0,2.186,null,1.35,7,2.807,79,2.11,81,2.332,null,2.661,88,1.4,107,2.553,140,1.226,158,2.077,352,1.063,905,2.807,907,2.466,1092,2.661,null,3.028,null,3.028,null,3.028,null,3.028,null,2.553,null,2.807,null,3.028,null,2.807,null,3.028,null,3.028,null,2.807,null,2.807]],["name/480",[1103,64.791]],["ref/480",[1104,32.428]],["doc/480",[80,3.93,140,2.388,150,5.468,213,5.184,352,2.071,907,4.803,1090,5.468,1105,5.898,null,4.972]],["name/481",[1107,69.894]],["ref/481",[1108,34.982]],["doc/481",[77,2.424,149,5.614,172,2.508,306,2.209,342,1.802,998,5.124,1109,4.613,null,3.551,null,3.551,null,2.889,null,4.613]],["name/482",[1114,69.894]],["ref/482",[1115,34.982]],["doc/482",[]],["name/483",[1116,35.805]],["ref/483",[1117,34.982]],["doc/483",[]],["name/484",[1118,64.791]],["ref/484",[1119,34.982]],["doc/484",[4,2.112,77,2.534,88,2.23,109,3.627,342,1.884,null,3.02,1097,4.066,1106,4.066,1118,4.471,1120,3.259,null,4.502,null,4.471]],["name/485",[1116,35.805]],["ref/485",[1123,34.982]],["doc/485",[]],["name/486",[1124,64.791]],["ref/486",[1125,34.982]],["doc/486",[4,2.112,77,2.534,88,2.23,109,3.627,342,1.884,null,3.02,1097,4.066,1106,4.066,1120,3.259,1122,4.471,1124,4.471,1126,6.808]],["name/487",[1116,35.805]],["ref/487",[1127,34.982]],["doc/487",[]],["name/488",[1128,69.894]],["ref/488",[1129,34.982]],["doc/488",[1,3.157,23,4.786,149,4.596,1130,5.971,null,7.083,null,6.566]],["name/489",[172,38.007]],["ref/489",[1133,34.982]],["doc/489",[]],["name/490",[1134,69.894]],["ref/490",[1135,34.982]],["doc/490",[]],["name/491",[1116,35.805]],["ref/491",[1136,34.982]],["doc/491",[]],["name/492",[1137,69.894]],["ref/492",[1138,34.982]],["doc/492",[77,3.099,173,3.93,342,2.305,786,3.141,998,4.258,1139,5.468,null,5.898,null,4.342,null,5.898]],["name/493",[1143,64.791]],["ref/493",[1144,34.982]],["doc/493",[]],["name/494",[1116,35.805]],["ref/494",[1145,34.982]],["doc/494",[]],["name/495",[1146,69.894]],["ref/495",[1147,34.982]],["doc/495",[5,5.266,77,3.282,173,4.162,342,2.441,786,3.326,1139,5.791,1148,6.247,null,6.247]],["name/496",[1143,64.791]],["ref/496",[1150,34.982]],["doc/496",[]],["name/497",[1116,35.805]],["ref/497",[1151,34.982]],["doc/497",[]],["name/498",[1152,69.894]],["ref/498",[1153,34.982]],["doc/498",[108,4.596,173,4.719,272,5.599,1154,6.225,null,5.215,null,5.971]],["name/499",[342,27.31]],["ref/499",[1157,34.982]],["doc/499",[]],["name/500",[1116,35.805]],["ref/500",[1158,34.982]],["doc/500",[]],["name/501",[1159,69.894]],["ref/501",[1160,28.485]],["doc/501",[26,5.188,83,1.492,108,2.219,159,2.883,173,3.728,272,4.423,1020,2.883,1130,2.883,1141,2.517,1154,3.006,null,2.517,1161,5.596,null,5.596,null,3.42,null,3.42,null,2.785,null,3.42]],["name/502",[1167,69.894]],["ref/502",[1168,34.982]],["doc/502",[]],["name/503",[1169,69.894]],["ref/503",[1170,34.982]],["doc/503",[]],["name/504",[1171,69.894]],["ref/504",[1172,34.982]],["doc/504",[]],["name/505",[1116,35.805]],["ref/505",[1173,34.982]],["doc/505",[]],["name/506",[1174,69.894]],["ref/506",[1175,34.982]],["doc/506",[108,4.596,173,4.719,201,6.225,272,5.599,null,5.971,1156,5.971]],["name/507",[1116,35.805]],["ref/507",[1176,34.982]],["doc/507",[]],["name/508",[1177,69.894]],["ref/508",[1178,34.982]],["doc/508",[108,4.053,173,4.162,201,5.49,272,4.938,null,5.266,1156,7.491,1179,5.49]],["name/509",[1180,61.429]],["ref/509",[1181,34.982]],["doc/509",[]],["name/510",[1116,35.805]],["ref/510",[1182,34.982]],["doc/510",[]],["name/511",[173,46.563]],["ref/511",[1183,34.982]],["doc/511",[173,4.719,272,5.599,1156,5.971,1184,7.083,null,6.225,null,7.083]],["name/512",[1187,69.894]],["ref/512",[1188,34.982]],["doc/512",[]],["name/513",[1180,61.429]],["ref/513",[1189,34.982]],["doc/513",[]],["name/514",[1116,35.805]],["ref/514",[1190,34.982]],["doc/514",[]],["name/515",[1191,69.894]],["ref/515",[1192,34.982]],["doc/515",[23,4.786,108,4.596,998,5.113,1120,4.786,1155,5.215,1193,4.436]],["name/516",[1194,64.791]],["ref/516",[1195,34.982]],["doc/516",[]],["name/517",[1116,35.805]],["ref/517",[1196,34.982]],["doc/517",[]],["name/518",[1197,69.894]],["ref/518",[1198,34.982]],["doc/518",[23,4.786,79,4.937,108,4.596,998,5.113,1155,5.215,1193,4.436]],["name/519",[1199,64.791]],["ref/519",[1200,34.982]],["doc/519",[]],["name/520",[1116,35.805]],["ref/520",[1201,34.982]],["doc/520",[]],["name/521",[1202,64.791]],["ref/521",[1203,34.982]],["doc/521",[23,5.527,108,5.307,1120,5.527,1155,6.021]],["name/522",[1116,35.805]],["ref/522",[1204,34.982]],["doc/522",[]],["name/523",[1205,69.894]],["ref/523",[1206,34.982]],["doc/523",[23,4.786,108,4.596,998,5.113,1120,4.786,1155,5.215,1207,5.971]],["name/524",[1194,64.791]],["ref/524",[1208,34.982]],["doc/524",[]],["name/525",[1116,35.805]],["ref/525",[1209,34.982]],["doc/525",[]],["name/526",[1210,64.791]],["ref/526",[1211,34.982]],["doc/526",[23,4.221,108,4.053,1120,6.005,1155,4.599,1207,5.266,1212,5.49,null,5.49]],["name/527",[1120,47.23]],["ref/527",[1214,34.982]],["doc/527",[]],["name/528",[1116,35.805]],["ref/528",[1215,34.982]],["doc/528",[]],["name/529",[1216,69.894]],["ref/529",[1217,34.982]],["doc/529",[23,5.527,79,5.7,108,5.307,1155,6.021]],["name/530",[1116,35.805]],["ref/530",[1218,34.982]],["doc/530",[]],["name/531",[1219,69.894]],["ref/531",[1220,34.982]],["doc/531",[23,6.117,79,2.383,81,2.633,149,2.219,173,3.728,342,1.336,1120,3.781,1130,2.883,1155,5.229,1185,3.006,1221,3.006,null,3.17,null,2.633,null,3.17]],["name/532",[173,46.563]],["ref/532",[1225,34.982]],["doc/532",[]],["name/533",[342,27.31]],["ref/533",[1226,34.982]],["doc/533",[]],["name/534",[1120,47.23]],["ref/534",[1227,34.982]],["doc/534",[]],["name/535",[1224,64.791]],["ref/535",[1228,34.982]],["doc/535",[]],["name/536",[1116,35.805]],["ref/536",[1229,34.982]],["doc/536",[]],["name/537",[1230,69.894]],["ref/537",[1231,34.982]],["doc/537",[23,4.786,81,5.454,149,6.295,1221,6.225,1232,7.083]],["name/538",[1233,69.894]],["ref/538",[1234,34.982]],["doc/538",[]],["name/539",[1235,64.791]],["ref/539",[1236,34.982]],["doc/539",[]],["name/540",[1116,35.805]],["ref/540",[1237,34.982]],["doc/540",[]],["name/541",[1238,69.894]],["ref/541",[1239,34.982]],["doc/541",[1160,7.218,1240,8.864,null,7.472]],["name/542",[342,27.31]],["ref/542",[1242,34.982]],["doc/542",[]],["name/543",[1116,35.805]],["ref/543",[1243,34.982]],["doc/543",[]],["name/544",[1244,69.894]],["ref/544",[1245,32.428]],["doc/544",[1160,7.218,1241,7.472,1246,8.864]],["name/545",[342,27.31]],["ref/545",[1247,34.982]],["doc/545",[]],["name/546",[1116,35.805]],["ref/546",[1248,34.982]],["doc/546",[]],["name/547",[1249,69.894]],["ref/547",[1250,32.428]],["doc/547",[1110,5.845,1160,6.182,1241,6.4,1251,7.592,null,7.037]],["name/548",[273,58.919]],["ref/548",[1253,34.982]],["doc/548",[]],["name/549",[1252,64.791]],["ref/549",[1254,34.982]],["doc/549",[]],["name/550",[1116,35.805]],["ref/550",[1255,34.982]],["doc/550",[]],["name/551",[1256,69.894]],["ref/551",[1257,32.428]],["doc/551",[1110,8.224,1258,8.179,null,7.581]],["name/552",[1260,69.894]],["ref/552",[1261,34.982]],["doc/552",[]],["name/553",[1259,64.791]],["ref/553",[1262,34.982]],["doc/553",[]],["name/554",[1116,35.805]],["ref/554",[1263,34.982]],["doc/554",[]],["name/555",[1264,69.894]],["ref/555",[1265,32.428]],["doc/555",[96,5.375,1110,6.297,1266,8.179,null,7.581]],["name/556",[1268,69.894]],["ref/556",[1269,34.982]],["doc/556",[]],["name/557",[1267,64.791]],["ref/557",[1270,34.982]],["doc/557",[]],["name/558",[1116,35.805]],["ref/558",[1271,34.982]],["doc/558",[]],["name/559",[1272,64.791]],["ref/559",[1273,32.428]],["doc/559",[1272,9.871]],["name/560",[1116,35.805]],["ref/560",[1274,34.982]],["doc/560",[]],["name/561",[1275,64.791]],["ref/561",[1276,32.428]],["doc/561",[1275,9.871]],["name/562",[1116,35.805]],["ref/562",[1277,34.982]],["doc/562",[]],["name/563",[1278,69.894]],["ref/563",[1279,34.982]],["doc/563",[88,2.583,108,3.625,120,3.775,149,3.625,1280,4.91,null,5.179,null,4.91,null,4.202,null,4.416,null,4.113]],["name/564",[1116,35.805]],["ref/564",[1286,34.982]],["doc/564",[]],["name/565",[1287,69.894]],["ref/565",[1288,34.982]],["doc/565",[88,2.583,108,3.625,120,3.775,149,3.625,1282,4.91,null,4.202,null,4.416,null,4.113,1289,5.587,null,4.416]],["name/566",[1283,52.565]],["ref/566",[1291,34.982]],["doc/566",[]],["name/567",[1116,35.805]],["ref/567",[1292,34.982]],["doc/567",[]],["name/568",[1293,69.894]],["ref/568",[1294,34.982]],["doc/568",[88,2.727,108,3.827,120,3.986,149,3.827,1281,5.468,null,5.184,null,4.436,1285,4.342,1290,4.662]],["name/569",[1116,35.805]],["ref/569",[1295,34.982]],["doc/569",[]],["name/570",[1296,69.894]],["ref/570",[1297,34.982]],["doc/570",[120,5.527,149,5.307,1285,6.021,1290,6.464]],["name/571",[1298,64.791]],["ref/571",[1299,34.982]],["doc/571",[]],["name/572",[1300,64.791]],["ref/572",[1301,34.982]],["doc/572",[]],["name/573",[1116,35.805]],["ref/573",[1302,34.982]],["doc/573",[]],["name/574",[1303,69.894]],["ref/574",[1304,34.982]],["doc/574",[120,5.527,149,5.307,1284,6.464,null,6.021]],["name/575",[1298,64.791]],["ref/575",[1305,34.982]],["doc/575",[]],["name/576",[1300,64.791]],["ref/576",[1306,34.982]],["doc/576",[]],["name/577",[1116,35.805]],["ref/577",[1307,34.982]],["doc/577",[]],["name/578",[1308,69.894]],["ref/578",[1309,34.982]],["doc/578",[120,5.527,149,5.307,1283,6.151,1310,7.581]],["name/579",[1311,61.429]],["ref/579",[1312,34.982]],["doc/579",[]],["name/580",[1313,61.429]],["ref/580",[1314,34.982]],["doc/580",[]],["name/581",[1116,35.805]],["ref/581",[1315,34.982]],["doc/581",[]],["name/582",[117,55.245]],["ref/582",[1316,34.982]],["doc/582",[79,4.111,108,3.827,114,4.542,117,4.662,171,4.803,null,3.208,1193,3.694,1317,5.468,null,5.898]],["name/583",[1319,61.429]],["ref/583",[1320,34.982]],["doc/583",[]],["name/584",[1116,35.805]],["ref/584",[1321,34.982]],["doc/584",[]],["name/585",[94,56.914]],["ref/585",[1322,34.982]],["doc/585",[6,3.991,23,3.586,79,3.698,108,3.443,114,4.086,149,3.443,333,3.253,1193,3.323,1222,4.919,1317,4.919,1323,4.919]],["name/586",[1324,69.894]],["ref/586",[1325,34.982]],["doc/586",[]],["name/587",[1116,35.805]],["ref/587",[1326,34.982]],["doc/587",[]],["name/588",[210,61.429]],["ref/588",[1327,34.982]],["doc/588",[1160,7.218,1241,7.472,1328,8.864]],["name/589",[1180,61.429]],["ref/589",[1329,34.982]],["doc/589",[]],["name/590",[1116,35.805]],["ref/590",[1330,34.982]],["doc/590",[]],["name/591",[1331,64.791]],["ref/591",[1332,34.982]],["doc/591",[1245,5.791,1250,5.791,1257,5.791,1265,5.791,1273,5.791,1276,5.791,1333,6.247,null,6.247]],["name/592",[1335,69.894]],["ref/592",[1336,34.982]],["doc/592",[]],["name/593",[1116,35.805]],["ref/593",[1337,34.982]],["doc/593",[]],["name/594",[1338,69.894]],["ref/594",[1339,34.982]],["doc/594",[79,5.714,120,3.775,149,3.625,333,3.424,1340,5.179,null,5.587,null,5.179,null,5.587,null,5.587]],["name/595",[1345,64.791]],["ref/595",[1346,34.982]],["doc/595",[]],["name/596",[1347,69.894]],["ref/596",[1348,34.982]],["doc/596",[]],["name/597",[23,47.23]],["ref/597",[1349,34.982]],["doc/597",[]],["name/598",[1350,69.894]],["ref/598",[1351,34.982]],["doc/598",[]],["name/599",[117,55.245]],["ref/599",[1352,34.982]],["doc/599",[]],["name/600",[1353,69.894]],["ref/600",[1354,34.982]],["doc/600",[]],["name/601",[1355,69.894]],["ref/601",[1356,34.982]],["doc/601",[]],["name/602",[1357,69.894]],["ref/602",[1358,34.982]],["doc/602",[]],["name/603",[1359,69.894]],["ref/603",[1360,34.982]],["doc/603",[]],["name/604",[1361,69.894]],["ref/604",[1362,34.982]],["doc/604",[]],["name/605",[82,61.429]],["ref/605",[1363,34.982]],["doc/605",[]],["name/606",[172,38.007]],["ref/606",[1364,34.982]],["doc/606",[]],["name/607",[1116,35.805]],["ref/607",[1365,34.982]],["doc/607",[]],["name/608",[1106,58.919]],["ref/608",[1366,34.982]],["doc/608",[79,4.627,149,4.308,216,4.028,306,3.179,1367,6.639,null,6.639,null,6.639]],["name/609",[1370,69.894]],["ref/609",[1371,34.982]],["doc/609",[]],["name/610",[114,53.815]],["ref/610",[1372,34.982]],["doc/610",[]],["name/611",[1116,35.805]],["ref/611",[1373,34.982]],["doc/611",[]],["name/612",[1374,55.245]],["ref/612",[1375,34.982]],["doc/612",[131,6.894,1374,6.464,1376,8.179,null,8.179]],["name/613",[364,40.479]],["ref/613",[1378,34.982]],["doc/613",[]],["name/614",[1379,69.894]],["ref/614",[1380,34.982]],["doc/614",[]],["name/615",[1381,69.894]],["ref/615",[1382,34.982]],["doc/615",[]],["name/616",[1383,69.894]],["ref/616",[1384,34.982]],["doc/616",[]],["name/617",[1385,69.894]],["ref/617",[1386,34.982]],["doc/617",[]],["name/618",[1387,69.894]],["ref/618",[1388,34.982]],["doc/618",[]],["name/619",[159,58.919]],["ref/619",[1389,34.982]],["doc/619",[1,2.959,159,5.596,329,2.109,1100,6.154,1121,4.069,1374,5.247,1390,4.554]],["name/620",[1391,69.894]],["ref/620",[1392,34.982]],["doc/620",[1,2.15,200,3.481,248,3.17,1193,5.57,1283,5.524,1285,3.55,1311,4.239,1313,4.239,1374,3.812,1393,3.55]],["name/621",[1394,69.894]],["ref/621",[1395,34.982]],["doc/621",[200,3.831,248,3.488,1193,4.943,1283,5.936,1285,3.907,1311,4.664,1374,4.194,1393,3.907,1396,4.473]],["name/622",[1397,69.894]],["ref/622",[1398,34.982]],["doc/622",[1,2.252,200,3.648,248,3.321,1193,4.765,1280,4.441,1283,3.8,1285,3.72,1313,4.441,1374,3.994,1393,3.72,1396,4.26]],["name/623",[17,53.815]],["ref/623",[1399,34.982]],["doc/623",[]],["name/624",[1400,69.894]],["ref/624",[1401,34.982]],["doc/624",[]],["name/625",[1402,69.894]],["ref/625",[1403,34.982]],["doc/625",[]],["name/626",[1404,69.894]],["ref/626",[1405,34.982]],["doc/626",[11,3.024,47,3.187,79,2.737,null,2.617,117,3.104,122,4.607,156,2.295,218,3.452,765,2.201,907,3.198,1026,2.694,1406,3.928,null,3.928,null,3.928,null,3.928,null,3.641]],["name/627",[1411,69.894]],["ref/627",[1412,34.982]],["doc/627",[55,5.589,329,2.412,360,3.889,1413,7.037,null,7.592]],["name/628",[793,37.218]],["ref/628",[1415,34.982]],["doc/628",[]],["name/629",[1416,61.429]],["ref/629",[1417,34.982]],["doc/629",[]],["name/630",[1418,64.791]],["ref/630",[1419,34.982]],["doc/630",[]],["name/631",[987,58.919]],["ref/631",[1420,34.982]],["doc/631",[]],["name/632",[1421,61.429]],["ref/632",[1422,34.982]],["doc/632",[]],["name/633",[955,61.429]],["ref/633",[1423,34.982]],["doc/633",[]],["name/634",[849,52.565]],["ref/634",[1424,34.982]],["doc/634",[]],["name/635",[831,56.914]],["ref/635",[1425,34.982]],["doc/635",[]],["name/636",[808,58.919]],["ref/636",[1426,34.982]],["doc/636",[]],["name/637",[795,53.815]],["ref/637",[1427,34.982]],["doc/637",[]],["name/638",[927,53.815]],["ref/638",[1428,34.982]],["doc/638",[]],["name/639",[804,48.712]],["ref/639",[1429,34.982]],["doc/639",[]],["name/640",[1430,58.919]],["ref/640",[1431,34.982]],["doc/640",[]],["name/641",[1432,61.429]],["ref/641",[1433,34.982]],["doc/641",[]],["name/642",[810,47.23]],["ref/642",[1434,34.982]],["doc/642",[]],["name/643",[985,55.245]],["ref/643",[1435,34.982]],["doc/643",[]],["name/644",[870,55.245]],["ref/644",[1436,34.982]],["doc/644",[]],["name/645",[981,55.245]],["ref/645",[1437,34.982]],["doc/645",[]],["name/646",[1086,58.919]],["ref/646",[1438,34.982]],["doc/646",[]],["name/647",[1439,58.919]],["ref/647",[1440,34.982]],["doc/647",[]],["name/648",[1441,64.791]],["ref/648",[1442,34.982]],["doc/648",[]],["name/649",[1443,64.791]],["ref/649",[1444,34.982]],["doc/649",[]],["name/650",[806,45.351]],["ref/650",[1445,34.982]],["doc/650",[]],["name/651",[1446,64.791]],["ref/651",[1447,34.982]],["doc/651",[]],["name/652",[989,61.429]],["ref/652",[1448,34.982]],["doc/652",[]],["name/653",[1449,61.429]],["ref/653",[1450,34.982]],["doc/653",[]],["name/654",[963,61.429]],["ref/654",[1451,34.982]],["doc/654",[]],["name/655",[829,61.429]],["ref/655",[1452,34.982]],["doc/655",[]],["name/656",[983,61.429]],["ref/656",[1453,34.982]],["doc/656",[]],["name/657",[1454,64.791]],["ref/657",[1455,34.982]],["doc/657",[]],["name/658",[1456,64.791]],["ref/658",[1457,34.982]],["doc/658",[]],["name/659",[1458,64.791]],["ref/659",[1459,34.982]],["doc/659",[]],["name/660",[1460,64.791]],["ref/660",[1461,34.982]],["doc/660",[]],["name/661",[785,35.588]],["ref/661",[1462,34.982]],["doc/661",[29,4.596,47,3.607,140,2.867,306,3.392,757,3.607,1463,4.937]],["name/662",[797,28.504]],["ref/662",[1464,34.982]],["doc/662",[140,3.916,797,3.945]],["name/663",[17,53.815]],["ref/663",[1465,34.982]],["doc/663",[]],["name/664",[54,64.791]],["ref/664",[1466,34.982]],["doc/664",[]],["name/665",[1467,69.894]],["ref/665",[1468,34.982]],["doc/665",[]],["name/666",[1469,69.894]],["ref/666",[1470,34.982]],["doc/666",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/667",[793,37.218]],["ref/667",[1471,34.982]],["doc/667",[]],["name/668",[1439,58.919]],["ref/668",[1472,34.982]],["doc/668",[]],["name/669",[797,28.504]],["ref/669",[1473,34.982]],["doc/669",[140,3.916,797,3.945]],["name/670",[1474,69.894]],["ref/670",[1475,34.982]],["doc/670",[]],["name/671",[1476,69.894]],["ref/671",[1477,34.982]],["doc/671",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/672",[793,37.218]],["ref/672",[1478,34.982]],["doc/672",[]],["name/673",[1430,58.919]],["ref/673",[1479,34.982]],["doc/673",[]],["name/674",[797,28.504]],["ref/674",[1480,34.982]],["doc/674",[140,3.916,797,3.945]],["name/675",[1481,69.894]],["ref/675",[1482,34.982]],["doc/675",[]],["name/676",[1483,69.894]],["ref/676",[1484,34.982]],["doc/676",[1,2.097,3,0.868,29,1.495,32,0.654,39,0.748,47,2.396,88,1.066,140,2.376,155,0.646,161,0.883,298,0.883,306,0.596,321,0.646,329,0.732,332,1.453,342,0.9,352,1.129,357,0.53,702,0.854,748,0.654,null,1.173,null,0.659,null,0.659,null,0.659,null,0.65,null,0.659,null,0.654,757,2.988,785,0.634,797,1.312,877,0.899,null,0.899,null,0.854,null,0.883,null,0.798,null,0.899,null,0.899,null,0.899,null,0.899,null,1.495,null,0.819,null,0.899,null,0.899,null,0.899]],["name/677",[793,37.218]],["ref/677",[1485,34.982]],["doc/677",[]],["name/678",[804,48.712]],["ref/678",[1486,34.982]],["doc/678",[]],["name/679",[806,45.351]],["ref/679",[1487,34.982]],["doc/679",[]],["name/680",[810,47.23]],["ref/680",[1488,34.982]],["doc/680",[]],["name/681",[797,28.504]],["ref/681",[1489,34.982]],["doc/681",[140,3.916,797,3.945]],["name/682",[1490,69.894]],["ref/682",[1491,34.982]],["doc/682",[1,2.097,3,0.868,29,1.495,32,0.654,39,0.748,47,2.396,88,1.066,140,2.376,155,0.646,161,0.883,298,0.883,306,0.596,321,0.646,329,0.732,332,1.453,342,0.9,352,1.129,357,0.53,702,0.854,748,0.654,null,1.173,null,0.659,null,0.659,null,0.659,null,0.65,null,0.659,null,0.654,757,2.988,785,0.634,797,1.312,877,0.899,null,0.899,null,0.854,null,0.883,null,0.798,null,0.899,null,0.899,null,0.899,null,0.899,null,1.495,null,0.819,null,0.899,null,0.899,null,0.899]],["name/683",[793,37.218]],["ref/683",[1492,34.982]],["doc/683",[]],["name/684",[785,35.588]],["ref/684",[1493,34.982]],["doc/684",[29,4.596,47,3.607,140,2.867,306,3.392,757,3.607,1463,4.937]],["name/685",[1494,69.894]],["ref/685",[1495,34.982]],["doc/685",[]],["name/686",[831,56.914]],["ref/686",[1496,34.982]],["doc/686",[]],["name/687",[1449,61.429]],["ref/687",[1497,34.982]],["doc/687",[]],["name/688",[804,48.712]],["ref/688",[1498,34.982]],["doc/688",[]],["name/689",[797,28.504]],["ref/689",[1499,34.982]],["doc/689",[140,3.916,797,3.945]],["name/690",[1500,69.894]],["ref/690",[1501,34.982]],["doc/690",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/691",[793,37.218]],["ref/691",[1502,34.982]],["doc/691",[]],["name/692",[1503,69.894]],["ref/692",[1504,34.982]],["doc/692",[]],["name/693",[1505,69.894]],["ref/693",[1506,34.982]],["doc/693",[]],["name/694",[1507,69.894]],["ref/694",[1508,34.982]],["doc/694",[]],["name/695",[909,58.919]],["ref/695",[1509,34.982]],["doc/695",[]],["name/696",[911,58.919]],["ref/696",[1510,34.982]],["doc/696",[]],["name/697",[1511,69.894]],["ref/697",[1512,34.982]],["doc/697",[]],["name/698",[849,52.565]],["ref/698",[1513,34.982]],["doc/698",[]],["name/699",[981,55.245]],["ref/699",[1514,34.982]],["doc/699",[]],["name/700",[985,55.245]],["ref/700",[1515,34.982]],["doc/700",[]],["name/701",[870,55.245]],["ref/701",[1516,34.982]],["doc/701",[]],["name/702",[795,53.815]],["ref/702",[1517,34.982]],["doc/702",[]],["name/703",[927,53.815]],["ref/703",[1518,34.982]],["doc/703",[]],["name/704",[806,45.351]],["ref/704",[1519,34.982]],["doc/704",[]],["name/705",[810,47.23]],["ref/705",[1520,34.982]],["doc/705",[]],["name/706",[797,28.504]],["ref/706",[1521,34.982]],["doc/706",[140,3.916,797,3.945]],["name/707",[1522,69.894]],["ref/707",[1523,34.982]],["doc/707",[]],["name/708",[875,64.791]],["ref/708",[1524,34.982]],["doc/708",[1,2.097,3,0.868,29,1.495,32,0.654,39,0.748,47,2.396,88,1.066,140,2.376,155,0.646,161,0.883,298,0.883,306,0.596,321,0.646,329,0.732,332,1.453,342,0.9,352,1.129,357,0.53,702,0.854,748,0.654,null,1.173,null,0.659,null,0.659,null,0.659,null,0.65,null,0.659,null,0.654,757,2.988,785,0.634,797,1.312,877,0.899,null,0.899,null,0.854,null,0.883,null,0.798,null,0.899,null,0.899,null,0.899,null,0.899,null,1.495,null,0.819,null,0.899,null,0.899,null,0.899]],["name/709",[793,37.218]],["ref/709",[1525,34.982]],["doc/709",[]],["name/710",[804,48.712]],["ref/710",[1526,34.982]],["doc/710",[]],["name/711",[806,45.351]],["ref/711",[1527,34.982]],["doc/711",[]],["name/712",[810,47.23]],["ref/712",[1528,34.982]],["doc/712",[]],["name/713",[797,28.504]],["ref/713",[1529,34.982]],["doc/713",[140,3.916,797,3.945]],["name/714",[1530,69.894]],["ref/714",[1531,34.982]],["doc/714",[1,2.097,3,0.868,29,1.495,32,0.654,39,0.748,47,2.396,88,1.066,140,2.376,155,0.646,161,0.883,298,0.883,306,0.596,321,0.646,329,0.732,332,1.453,342,0.9,352,1.129,357,0.53,702,0.854,748,0.654,null,1.173,null,0.659,null,0.659,null,0.659,null,0.65,null,0.659,null,0.654,757,2.988,785,0.634,797,1.312,877,0.899,null,0.899,null,0.854,null,0.883,null,0.798,null,0.899,null,0.899,null,0.899,null,0.899,null,1.495,null,0.819,null,0.899,null,0.899,null,0.899]],["name/715",[793,37.218]],["ref/715",[1532,34.982]],["doc/715",[]],["name/716",[870,55.245]],["ref/716",[1533,34.982]],["doc/716",[]],["name/717",[985,55.245]],["ref/717",[1534,34.982]],["doc/717",[]],["name/718",[981,55.245]],["ref/718",[1535,34.982]],["doc/718",[]],["name/719",[804,48.712]],["ref/719",[1536,34.982]],["doc/719",[]],["name/720",[806,45.351]],["ref/720",[1537,34.982]],["doc/720",[]],["name/721",[810,47.23]],["ref/721",[1538,34.982]],["doc/721",[]],["name/722",[1539,64.791]],["ref/722",[1540,34.982]],["doc/722",[]],["name/723",[820,50.454]],["ref/723",[1541,34.982]],["doc/723",[]],["name/724",[797,28.504]],["ref/724",[1542,34.982]],["doc/724",[140,3.916,797,3.945]],["name/725",[1543,69.894]],["ref/725",[1544,34.982]],["doc/725",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/726",[793,37.218]],["ref/726",[1545,34.982]],["doc/726",[]],["name/727",[909,58.919]],["ref/727",[1546,34.982]],["doc/727",[]],["name/728",[1547,69.894]],["ref/728",[1548,34.982]],["doc/728",[]],["name/729",[1549,69.894]],["ref/729",[1550,34.982]],["doc/729",[]],["name/730",[1551,69.894]],["ref/730",[1552,34.982]],["doc/730",[]],["name/731",[1553,69.894]],["ref/731",[1554,34.982]],["doc/731",[]],["name/732",[911,58.919]],["ref/732",[1555,34.982]],["doc/732",[]],["name/733",[1556,69.894]],["ref/733",[1557,34.982]],["doc/733",[]],["name/734",[849,52.565]],["ref/734",[1558,34.982]],["doc/734",[]],["name/735",[810,47.23]],["ref/735",[1559,34.982]],["doc/735",[]],["name/736",[806,45.351]],["ref/736",[1560,34.982]],["doc/736",[]],["name/737",[820,50.454]],["ref/737",[1561,34.982]],["doc/737",[]],["name/738",[1539,64.791]],["ref/738",[1562,34.982]],["doc/738",[]],["name/739",[795,53.815]],["ref/739",[1563,34.982]],["doc/739",[]],["name/740",[927,53.815]],["ref/740",[1564,34.982]],["doc/740",[]],["name/741",[785,35.588]],["ref/741",[1565,34.982]],["doc/741",[29,4.596,47,3.607,140,2.867,306,3.392,757,3.607,1463,4.937]],["name/742",[797,28.504]],["ref/742",[1566,34.982]],["doc/742",[140,3.916,797,3.945]],["name/743",[1567,61.429]],["ref/743",[1568,34.982]],["doc/743",[]],["name/744",[1569,69.894]],["ref/744",[1570,34.982]],["doc/744",[140,1.046,142,1.472,216,3.521,218,2.271,352,0.907,357,1.883,748,1.358,753,2.31,755,1.358,null,1.46,1571,5.38,null,2.584,null,2.584,null,2.396,null,2.584,null,2.584,null,2.584,null,2.584,null,4.426,null,2.584,null,2.584,null,2.584,null,4.426,null,1.801]],["name/745",[1585,69.894]],["ref/745",[1586,34.982]],["doc/745",[]],["name/746",[140,28.295]],["ref/746",[1587,34.982]],["doc/746",[]],["name/747",[1571,64.791]],["ref/747",[1588,34.982]],["doc/747",[329,1.404,346,5.217,762,2.477,766,2.386,1121,2.709,1126,4.097,1574,6.366,1584,3.08,1589,3.403,null,3.403,null,4.42,null,4.42]],["name/748",[1593,64.791]],["ref/748",[1594,34.982]],["doc/748",[329,2.109,432,6.154,789,3.75,1121,4.069,1185,5.835,1593,6.154,1595,6.639]],["name/749",[1596,69.894]],["ref/749",[1597,34.982]],["doc/749",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/750",[797,28.504]],["ref/750",[1598,34.982]],["doc/750",[140,3.916,797,3.945]],["name/751",[1599,69.894]],["ref/751",[1600,34.982]],["doc/751",[1,2.097,3,0.868,29,1.495,32,0.654,39,0.748,47,2.396,88,1.066,140,2.376,155,0.646,161,0.883,298,0.883,306,0.596,321,0.646,329,0.732,332,1.453,342,0.9,352,1.129,357,0.53,702,0.854,748,0.654,null,1.173,null,0.659,null,0.659,null,0.659,null,0.65,null,0.659,null,0.654,757,2.988,785,0.634,797,1.312,877,0.899,null,0.899,null,0.854,null,0.883,null,0.798,null,0.899,null,0.899,null,0.899,null,0.899,null,1.495,null,0.819,null,0.899,null,0.899,null,0.899]],["name/752",[797,28.504]],["ref/752",[1601,34.982]],["doc/752",[140,3.916,797,3.945]],["name/753",[1602,69.894]],["ref/753",[1603,34.982]],["doc/753",[39,4.255,130,6.566,249,5.215,280,5.971,352,2.487,1604,7.083]],["name/754",[1605,69.894]],["ref/754",[1606,34.982]],["doc/754",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/755",[793,37.218]],["ref/755",[1607,34.982]],["doc/755",[]],["name/756",[797,28.504]],["ref/756",[1608,34.982]],["doc/756",[140,3.916,797,3.945]],["name/757",[1609,69.894]],["ref/757",[1610,34.982]],["doc/757",[17,5.454,119,3.969,140,2.867,886,4.596,1611,7.083,null,7.083]],["name/758",[797,28.504]],["ref/758",[1613,34.982]],["doc/758",[140,3.916,797,3.945]],["name/759",[1614,69.894]],["ref/759",[1615,34.982]],["doc/759",[1,2.097,3,0.868,29,1.495,32,0.654,39,0.748,47,2.396,88,1.066,140,2.376,155,0.646,161,0.883,298,0.883,306,0.596,321,0.646,329,0.732,332,1.453,342,0.9,352,1.129,357,0.53,702,0.854,748,0.654,null,1.173,null,0.659,null,0.659,null,0.659,null,0.65,null,0.659,null,0.654,757,2.988,785,0.634,797,1.312,877,0.899,null,0.899,null,0.854,null,0.883,null,0.798,null,0.899,null,0.899,null,0.899,null,0.899,null,1.495,null,0.819,null,0.899,null,0.899,null,0.899]],["name/760",[793,37.218]],["ref/760",[1616,34.982]],["doc/760",[]],["name/761",[797,28.504]],["ref/761",[1617,34.982]],["doc/761",[140,3.916,797,3.945]],["name/762",[1618,69.894]],["ref/762",[1619,34.982]],["doc/762",[]],["name/763",[1620,69.894]],["ref/763",[1621,34.982]],["doc/763",[]],["name/764",[1622,69.894]],["ref/764",[1623,34.982]],["doc/764",[]],["name/765",[1624,69.894]],["ref/765",[1625,34.982]],["doc/765",[1342,7.037,1626,7.037,null,7.592,null,7.592,null,7.592]],["name/766",[1630,69.894]],["ref/766",[1631,34.982]],["doc/766",[88,2.583,248,3.672,306,2.675,359,2.898,1193,3.499,1632,5.587,null,5.179,null,5.587,null,5.587,null,5.587]],["name/767",[1633,64.791]],["ref/767",[1637,34.982]],["doc/767",[]],["name/768",[1638,69.894]],["ref/768",[1639,34.982]],["doc/768",[]],["name/769",[1640,69.894]],["ref/769",[1641,34.982]],["doc/769",[1,2.097,3,0.868,29,1.495,32,0.654,39,0.748,47,2.396,88,1.066,140,2.376,155,0.646,161,0.883,298,0.883,306,0.596,321,0.646,329,0.732,332,1.453,342,0.9,352,1.129,357,0.53,702,0.854,748,0.654,null,1.173,null,0.659,null,0.659,null,0.659,null,0.65,null,0.659,null,0.654,757,2.988,785,0.634,797,1.312,877,0.899,null,0.899,null,0.854,null,0.883,null,0.798,null,0.899,null,0.899,null,0.899,null,0.899,null,1.495,null,0.819,null,0.899,null,0.899,null,0.899]],["name/770",[793,37.218]],["ref/770",[1642,34.982]],["doc/770",[]],["name/771",[804,48.712]],["ref/771",[1643,34.982]],["doc/771",[]],["name/772",[806,45.351]],["ref/772",[1644,34.982]],["doc/772",[]],["name/773",[810,47.23]],["ref/773",[1645,34.982]],["doc/773",[]],["name/774",[797,28.504]],["ref/774",[1646,34.982]],["doc/774",[140,3.916,797,3.945]],["name/775",[1647,69.894]],["ref/775",[1648,34.982]],["doc/775",[8,7.037,140,3.073,329,2.412,357,3.23,906,6.001]],["name/776",[1649,69.894]],["ref/776",[1650,34.982]],["doc/776",[1,2.097,3,0.868,29,1.495,32,0.654,39,0.748,47,2.396,88,1.066,140,2.376,155,0.646,161,0.883,298,0.883,306,0.596,321,0.646,329,0.732,332,1.453,342,0.9,352,1.129,357,0.53,702,0.854,748,0.654,null,1.173,null,0.659,null,0.659,null,0.659,null,0.65,null,0.659,null,0.654,757,2.988,785,0.634,797,1.312,877,0.899,null,0.899,null,0.854,null,0.883,null,0.798,null,0.899,null,0.899,null,0.899,null,0.899,null,1.495,null,0.819,null,0.899,null,0.899,null,0.899]],["name/777",[793,37.218]],["ref/777",[1651,34.982]],["doc/777",[]],["name/778",[927,53.815]],["ref/778",[1652,34.982]],["doc/778",[]],["name/779",[810,47.23]],["ref/779",[1653,34.982]],["doc/779",[]],["name/780",[804,48.712]],["ref/780",[1654,34.982]],["doc/780",[]],["name/781",[806,45.351]],["ref/781",[1655,34.982]],["doc/781",[]],["name/782",[797,28.504]],["ref/782",[1656,34.982]],["doc/782",[140,3.916,797,3.945]],["name/783",[1657,69.894]],["ref/783",[1658,34.982]],["doc/783",[140,3.073,329,2.412,357,3.23,906,6.001,1659,7.592]],["name/784",[1660,69.894]],["ref/784",[1661,34.982]],["doc/784",[]],["name/785",[1662,69.894]],["ref/785",[1663,34.982]],["doc/785",[900,6.182,906,6.001,1285,5.589,1664,7.592,null,7.592]],["name/786",[1666,69.894]],["ref/786",[1667,34.982]],["doc/786",[]],["name/787",[1668,69.894]],["ref/787",[1669,34.982]],["doc/787",[]],["name/788",[1670,69.894]],["ref/788",[1671,34.982]],["doc/788",[]],["name/789",[1672,69.894]],["ref/789",[1673,34.982]],["doc/789",[]],["name/790",[1674,69.894]],["ref/790",[1675,34.982]],["doc/790",[]],["name/791",[1676,69.894]],["ref/791",[1677,34.982]],["doc/791",[]],["name/792",[1678,69.894]],["ref/792",[1679,34.982]],["doc/792",[]],["name/793",[1680,69.894]],["ref/793",[1681,34.982]],["doc/793",[]],["name/794",[1682,69.894]],["ref/794",[1683,34.982]],["doc/794",[1,4.222,321,4.914,1684,2.864,null,9.473,null,2.864,null,2.864,null,2.655,null,2.655,null,2.655,null,2.655]],["name/795",[1688,64.791]],["ref/795",[1692,34.982]],["doc/795",[]],["name/796",[1689,64.791]],["ref/796",[1693,34.982]],["doc/796",[]],["name/797",[1690,64.791]],["ref/797",[1694,34.982]],["doc/797",[]],["name/798",[1691,64.791]],["ref/798",[1695,34.982]],["doc/798",[]],["name/799",[1696,64.791]],["ref/799",[1697,34.982]],["doc/799",[]],["name/800",[1413,64.791]],["ref/800",[1698,34.982]],["doc/800",[]],["name/801",[482,52.565]],["ref/801",[1699,34.982]],["doc/801",[]],["name/802",[1700,64.791]],["ref/802",[1701,32.428]],["doc/802",[1,3.839,13,1.76,37,0.42,96,0.455,172,0.376,342,2.283,364,0.401,367,0.239,null,1.356,793,0.368,1112,0.829,1141,0.975,1165,0.563,1284,0.547,1290,0.547,1702,3.897,null,0.583,null,0.608,null,0.467,null,0.583,null,1.019,null,0.563,null,0.583,null,0.563,null,0.608,null,0.859,null,0.608,null,0.467,null,0.583,null,0.608,null,2.609,null,0.583,null,1.985,null,0.608,null,0.583,null,0.608,null,0.608,null,0.608,null,0.608,null,0.583,null,0.583,null,0.583,null,0.563,null,0.975,null,0.583,null,0.563,null,0.563,null,0.583,null,0.583,null,0.482,null,0.583,null,0.583,null,0.583,null,2.549,null,2.549,null,0.583,null,0.563,null,0.608,null,0.583,null,0.583,null,0.583,null,0.608]],["name/803",[1749,38.007]],["ref/803",[1750,34.982]],["doc/803",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/804",[1753,69.894]],["ref/804",[1754,34.982]],["doc/804",[1,3.511,37,0.974,39,0.346,78,0.534,80,0.383,96,0.729,153,0.455,329,0.352,342,0.978,357,1.399,367,0.199,null,0.32,764,0.304,1025,0.8,1112,2.884,1702,3.195,1705,1.965,1712,0.719,1714,1.965,1730,0.816,1736,2.292,1755,4.661,null,0.468,null,1.269,null,2.473,null,0.485,null,0.468,null,0.468,null,0.485,null,0.468,null,0.485,null,0.468,null,0.443,null,0.468,null,0.485,null,0.468,null,0.468,null,0.485,null,0.935,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.935,null,0.935,null,0.935,null,0.485,null,0.468,null,0.455,null,0.485,null,0.485,null,0.455,null,0.485,null,0.485,null,0.485,null,0.485,null,0.468,null,0.485,null,0.485]],["name/805",[482,52.565]],["ref/805",[1797,34.982]],["doc/805",[]],["name/806",[1798,69.894]],["ref/806",[1799,34.982]],["doc/806",[1702,4.176,1712,4.596,1736,4.937,1758,5.327,1766,5.454,1800,7.083]],["name/807",[1801,69.894]],["ref/807",[1802,34.982]],["doc/807",[881,2.956,1702,4.185,1712,6.806,1803,4.613,null,4.613,null,4.276,null,4.276,null,4.276,null,4.054]],["name/808",[1712,45.351]],["ref/808",[1809,34.982]],["doc/808",[]],["name/809",[1805,64.791]],["ref/809",[1810,34.982]],["doc/809",[]],["name/810",[1806,64.791]],["ref/810",[1811,34.982]],["doc/810",[]],["name/811",[1807,64.791]],["ref/811",[1812,34.982]],["doc/811",[]],["name/812",[1808,61.429]],["ref/812",[1813,34.982]],["doc/812",[]],["name/813",[881,44.796]],["ref/813",[1814,34.982]],["doc/813",[]],["name/814",[1815,69.894]],["ref/814",[1816,34.982]],["doc/814",[1,3.511,37,0.974,39,0.346,78,0.534,80,0.383,96,0.729,153,0.455,329,0.352,342,0.978,357,1.399,367,0.199,null,0.32,764,0.304,1025,0.8,1112,2.884,1702,3.195,1705,1.965,1712,0.719,1714,1.965,1730,0.816,1736,2.292,1755,4.661,null,0.468,null,1.269,null,2.473,null,0.485,null,0.468,null,0.468,null,0.485,null,0.468,null,0.485,null,0.468,null,0.443,null,0.468,null,0.485,null,0.468,null,0.468,null,0.485,null,0.935,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.935,null,0.935,null,0.935,null,0.485,null,0.468,null,0.455,null,0.485,null,0.485,null,0.455,null,0.485,null,0.485,null,0.485,null,0.485,null,0.468,null,0.485,null,0.485]],["name/815",[1112,43.77]],["ref/815",[1817,34.982]],["doc/815",[]],["name/816",[1818,69.894]],["ref/816",[1819,34.982]],["doc/816",[78,2.432,329,1.605,357,2.15,1112,3.165,1702,4.486,1712,3.279,1736,3.522,1755,3.72,null,4.115,null,3.994,null,3.8]],["name/817",[1112,43.77]],["ref/817",[1820,34.982]],["doc/817",[]],["name/818",[1712,45.351]],["ref/818",[1821,34.982]],["doc/818",[]],["name/819",[1822,69.894]],["ref/819",[1823,34.982]],["doc/819",[37,4.298,1112,4.436,1714,4.786,1755,7.142,1770,5.768]],["name/820",[37,42.406]],["ref/820",[1824,34.982]],["doc/820",[]],["name/821",[1112,43.77]],["ref/821",[1825,34.982]],["doc/821",[]],["name/822",[1714,47.23]],["ref/822",[1826,34.982]],["doc/822",[]],["name/823",[1827,69.894]],["ref/823",[1828,34.982]],["doc/823",[342,3.78,1761,7.878]],["name/824",[342,27.31]],["ref/824",[1829,34.982]],["doc/824",[]],["name/825",[1830,69.894]],["ref/825",[1831,34.982]],["doc/825",[1,3.511,37,0.974,39,0.346,78,0.534,80,0.383,96,0.729,153,0.455,329,0.352,342,0.978,357,1.399,367,0.199,null,0.32,764,0.304,1025,0.8,1112,2.884,1702,3.195,1705,1.965,1712,0.719,1714,1.965,1730,0.816,1736,2.292,1755,4.661,null,0.468,null,1.269,null,2.473,null,0.485,null,0.468,null,0.468,null,0.485,null,0.468,null,0.485,null,0.468,null,0.443,null,0.468,null,0.485,null,0.468,null,0.468,null,0.485,null,0.935,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.935,null,0.935,null,0.935,null,0.485,null,0.468,null,0.455,null,0.485,null,0.485,null,0.455,null,0.485,null,0.485,null,0.485,null,0.485,null,0.468,null,0.485,null,0.485]],["name/826",[1112,43.77]],["ref/826",[1832,34.982]],["doc/826",[]],["name/827",[1833,69.894]],["ref/827",[1834,34.982]],["doc/827",[1702,4.176,1712,4.596,1728,5.971,null,5.768,null,7.142]],["name/828",[1729,56.914]],["ref/828",[1835,34.982]],["doc/828",[]],["name/829",[1712,45.351]],["ref/829",[1836,34.982]],["doc/829",[]],["name/830",[1749,38.007]],["ref/830",[1837,34.982]],["doc/830",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/831",[1700,64.791]],["ref/831",[1701,32.428]],["doc/831",[342,3.78,1794,7.878]],["name/832",[342,27.31]],["ref/832",[1838,34.982]],["doc/832",[]],["name/833",[1839,69.894]],["ref/833",[1840,34.982]],["doc/833",[342,2.768,1702,4.176,1705,4.786,1736,4.937,1758,5.327,1763,5.768]],["name/834",[1705,47.23]],["ref/834",[1841,34.982]],["doc/834",[]],["name/835",[342,27.31]],["ref/835",[1842,34.982]],["doc/835",[]],["name/836",[1843,69.894]],["ref/836",[1844,34.982]],["doc/836",[39,3.356,357,2.377,1112,3.499,1702,4.833,1730,6.035,1755,4.113,1757,4.416,1760,4.549]],["name/837",[1845,69.894]],["ref/837",[1846,34.982]],["doc/837",[]],["name/838",[1847,69.894]],["ref/838",[1848,34.982]],["doc/838",[96,4.106,153,4.938,342,2.441,1702,5.239,1705,4.221,1765,5.087,null,4.81]],["name/839",[1705,47.23]],["ref/839",[1849,34.982]],["doc/839",[]],["name/840",[1766,53.815]],["ref/840",[1850,34.982]],["doc/840",[]],["name/841",[342,27.31]],["ref/841",[1851,34.982]],["doc/841",[]],["name/842",[1852,69.894]],["ref/842",[1853,34.982]],["doc/842",[37,4.298,1112,4.436,1714,4.786,1755,7.142,1769,5.768]],["name/843",[37,42.406]],["ref/843",[1854,34.982]],["doc/843",[]],["name/844",[1112,43.77]],["ref/844",[1855,34.982]],["doc/844",[]],["name/845",[1714,47.23]],["ref/845",[1856,34.982]],["doc/845",[]],["name/846",[1857,69.894]],["ref/846",[1858,34.982]],["doc/846",[1025,4.033,1112,3.499,1702,3.294,1705,3.775,1714,3.775,1736,3.894,1755,6.035,1758,4.202,1767,4.549]],["name/847",[1705,47.23]],["ref/847",[1859,34.982]],["doc/847",[]],["name/848",[1025,50.454]],["ref/848",[1860,34.982]],["doc/848",[]],["name/849",[1112,43.77]],["ref/849",[1861,34.982]],["doc/849",[]],["name/850",[1714,47.23]],["ref/850",[1862,34.982]],["doc/850",[]],["name/851",[1863,69.894]],["ref/851",[1864,34.982]],["doc/851",[80,7.094]],["name/852",[1865,69.894]],["ref/852",[1866,34.982]],["doc/852",[172,4.447,1740,6.151,null,6.151,1745,6.894]],["name/853",[1749,38.007]],["ref/853",[1867,34.982]],["doc/853",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/854",[1868,69.894]],["ref/854",[1869,34.982]],["doc/854",[342,3.196,1702,4.822,1712,5.307,1870,8.179]],["name/855",[1712,45.351]],["ref/855",[1871,34.982]],["doc/855",[]],["name/856",[342,27.31]],["ref/856",[1872,34.982]],["doc/856",[]],["name/857",[1873,69.894]],["ref/857",[1874,34.982]],["doc/857",[342,3.196,1735,6.894,null,5.7,null,6.894]],["name/858",[1875,69.894]],["ref/858",[1876,34.982]],["doc/858",[1717,6.297,1740,6.151,null,6.151,1747,6.894]],["name/859",[1749,38.007]],["ref/859",[1877,34.982]],["doc/859",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/860",[1878,69.894]],["ref/860",[1879,34.982]],["doc/860",[1717,6.297,1740,6.151,null,6.151,1746,6.894]],["name/861",[1749,38.007]],["ref/861",[1880,34.982]],["doc/861",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/862",[1881,69.894]],["ref/862",[1882,34.982]],["doc/862",[1,3.839,13,1.76,37,0.42,96,0.455,172,0.376,342,2.283,364,0.401,367,0.239,null,1.356,793,0.368,1112,0.829,1141,0.975,1165,0.563,1284,0.547,1290,0.547,1702,3.897,null,0.583,null,0.608,null,0.467,null,0.583,null,1.019,null,0.563,null,0.583,null,0.563,null,0.608,null,0.859,null,0.608,null,0.467,null,0.583,null,0.608,null,2.609,null,0.583,null,1.985,null,0.608,null,0.583,null,0.608,null,0.608,null,0.608,null,0.608,null,0.583,null,0.583,null,0.583,null,0.563,null,0.975,null,0.583,null,0.563,null,0.563,null,0.583,null,0.583,null,0.482,null,0.583,null,0.583,null,0.583,null,2.549,null,2.549,null,0.583,null,0.563,null,0.608,null,0.583,null,0.583,null,0.583,null,0.608]],["name/863",[1705,47.23]],["ref/863",[1883,34.982]],["doc/863",[]],["name/864",[1025,50.454]],["ref/864",[1884,34.982]],["doc/864",[]],["name/865",[1885,69.894]],["ref/865",[1886,34.982]],["doc/865",[]],["name/866",[1749,38.007]],["ref/866",[1887,34.982]],["doc/866",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/867",[1888,69.894]],["ref/867",[1889,34.982]],["doc/867",[13,5.904,1717,6.297,null,6.894,null,6.66]],["name/868",[1717,53.815]],["ref/868",[1890,34.982]],["doc/868",[]],["name/869",[13,50.454]],["ref/869",[1891,34.982]],["doc/869",[]],["name/870",[1749,38.007]],["ref/870",[1892,34.982]],["doc/870",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/871",[1893,69.894]],["ref/871",[1894,34.982]],["doc/871",[13,5.113,342,2.768,1141,5.215,1702,4.176,1719,5.768,1721,5.971]],["name/872",[1141,51.454]],["ref/872",[1895,34.982]],["doc/872",[]],["name/873",[342,27.31]],["ref/873",[1896,34.982]],["doc/873",[]],["name/874",[13,50.454]],["ref/874",[1897,34.982]],["doc/874",[]],["name/875",[1749,38.007]],["ref/875",[1898,34.982]],["doc/875",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/876",[1899,69.894]],["ref/876",[1900,34.982]],["doc/876",[96,4.656,342,2.768,1702,4.176,1731,5.971,null,5.768,null,5.768]],["name/877",[342,27.31]],["ref/877",[1901,34.982]],["doc/877",[]],["name/878",[1732,56.914]],["ref/878",[1902,34.982]],["doc/878",[]],["name/879",[1733,56.914]],["ref/879",[1903,34.982]],["doc/879",[]],["name/880",[1749,38.007]],["ref/880",[1904,34.982]],["doc/880",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/881",[1905,69.894]],["ref/881",[1906,34.982]],["doc/881",[342,3.78,1734,8.155]],["name/882",[342,27.31]],["ref/882",[1907,34.982]],["doc/882",[]],["name/883",[1749,38.007]],["ref/883",[1908,34.982]],["doc/883",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/884",[1909,69.894]],["ref/884",[1910,34.982]],["doc/884",[342,3.196,1141,6.021,1702,4.822,1715,6.894]],["name/885",[1749,38.007]],["ref/885",[1911,34.982]],["doc/885",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/886",[1912,69.894]],["ref/886",[1913,34.982]],["doc/886",[1,3.511,37,0.974,39,0.346,78,0.534,80,0.383,96,0.729,153,0.455,329,0.352,342,0.978,357,1.399,367,0.199,null,0.32,764,0.304,1025,0.8,1112,2.884,1702,3.195,1705,1.965,1712,0.719,1714,1.965,1730,0.816,1736,2.292,1755,4.661,null,0.468,null,1.269,null,2.473,null,0.485,null,0.468,null,0.468,null,0.485,null,0.468,null,0.485,null,0.468,null,0.443,null,0.468,null,0.485,null,0.468,null,0.468,null,0.485,null,0.935,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.485,null,0.935,null,0.935,null,0.935,null,0.485,null,0.468,null,0.455,null,0.485,null,0.485,null,0.455,null,0.485,null,0.485,null,0.485,null,0.485,null,0.468,null,0.485,null,0.485]],["name/887",[37,42.406]],["ref/887",[1914,34.982]],["doc/887",[]],["name/888",[1112,43.77]],["ref/888",[1915,34.982]],["doc/888",[]],["name/889",[1714,47.23]],["ref/889",[1916,34.982]],["doc/889",[]],["name/890",[1917,69.894]],["ref/890",[1918,34.982]],["doc/890",[364,4.102,368,3.939,1702,4.176,1707,5.454,1726,5.971,null,5.971]],["name/891",[1707,53.815]],["ref/891",[1919,34.982]],["doc/891",[]],["name/892",[368,38.864]],["ref/892",[1920,34.982]],["doc/892",[]],["name/893",[364,40.479]],["ref/893",[1921,34.982]],["doc/893",[]],["name/894",[1749,38.007]],["ref/894",[1922,34.982]],["doc/894",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/895",[1923,69.894]],["ref/895",[1924,34.982]],["doc/895",[367,2.452,null,3.939,1702,4.176,1706,5.971,null,5.454,null,5.768]],["name/896",[1707,53.815]],["ref/896",[1925,34.982]],["doc/896",[]],["name/897",[1708,56.914]],["ref/897",[1926,34.982]],["doc/897",[]],["name/898",[1749,38.007]],["ref/898",[1927,34.982]],["doc/898",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/899",[1928,69.894]],["ref/899",[1929,34.982]],["doc/899",[342,3.196,368,4.548,1702,4.822,null,6.894]],["name/900",[342,27.31]],["ref/900",[1930,34.982]],["doc/900",[]],["name/901",[1749,38.007]],["ref/901",[1931,34.982]],["doc/901",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/902",[1932,69.894]],["ref/902",[1933,34.982]],["doc/902",[368,4.548,1702,4.822,1709,6.894,null,6.66]],["name/903",[1710,56.914]],["ref/903",[1934,34.982]],["doc/903",[]],["name/904",[1749,38.007]],["ref/904",[1935,34.982]],["doc/904",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/905",[1936,69.894]],["ref/905",[1937,34.982]],["doc/905",[342,2.768,1702,4.176,1740,5.327,null,5.327,null,5.971,null,5.768]],["name/906",[342,27.31]],["ref/906",[1938,34.982]],["doc/906",[]],["name/907",[1749,38.007]],["ref/907",[1939,34.982]],["doc/907",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/908",[1940,69.894]],["ref/908",[1941,34.982]],["doc/908",[342,2.768,1165,5.768,1738,5.971,null,5.971,null,5.327,null,5.327]],["name/909",[342,27.31]],["ref/909",[1942,34.982]],["doc/909",[]],["name/910",[1943,69.894]],["ref/910",[1944,34.982]],["doc/910",[]],["name/911",[1749,38.007]],["ref/911",[1945,34.982]],["doc/911",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/912",[1946,69.894]],["ref/912",[1947,34.982]],["doc/912",[37,4.962,1702,4.822,1785,6.66,null,6.464]],["name/913",[37,42.406]],["ref/913",[1948,34.982]],["doc/913",[]],["name/914",[1786,55.245]],["ref/914",[1949,34.982]],["doc/914",[]],["name/915",[1950,69.894]],["ref/915",[1951,34.982]],["doc/915",[1,3.839,13,1.76,37,0.42,96,0.455,172,0.376,342,2.283,364,0.401,367,0.239,null,1.356,793,0.368,1112,0.829,1141,0.975,1165,0.563,1284,0.547,1290,0.547,1702,3.897,null,0.583,null,0.608,null,0.467,null,0.583,null,1.019,null,0.563,null,0.583,null,0.563,null,0.608,null,0.859,null,0.608,null,0.467,null,0.583,null,0.608,null,2.609,null,0.583,null,1.985,null,0.608,null,0.583,null,0.608,null,0.608,null,0.608,null,0.608,null,0.583,null,0.583,null,0.583,null,0.563,null,0.975,null,0.583,null,0.563,null,0.563,null,0.583,null,0.583,null,0.482,null,0.583,null,0.583,null,0.583,null,2.549,null,2.549,null,0.583,null,0.563,null,0.608,null,0.583,null,0.583,null,0.583,null,0.608]],["name/916",[482,52.565]],["ref/916",[1952,34.982]],["doc/916",[]],["name/917",[1702,41.206]],["ref/917",[1953,34.982]],["doc/917",[]],["name/918",[1749,38.007]],["ref/918",[1954,34.982]],["doc/918",[87,4.808,1121,4.653,1749,4.128,1751,4.866,null,4.808]],["name/919",[37,42.406]],["ref/919",[1955,34.982]],["doc/919",[]],["name/920",[1956,69.894]],["ref/920",[1957,34.982]],["doc/920",[]],["name/921",[1958,69.894]],["ref/921",[1959,34.982]],["doc/921",[4,0.301,24,0.529,37,2.974,39,0.413,55,0.506,78,0.331,80,0.458,83,0.3,88,1.121,92,0.529,120,0.889,129,0.517,141,0.529,null,0.391,158,0.471,199,0.903,null,0.496,223,1.366,248,0.865,null,0.969,300,0.379,306,0.329,332,2.628,339,0.537,351,0.304,null,0.851,357,1.032,361,0.346,389,1.457,null,1.013,434,0.529,749,1.234,764,0.696,766,0.371,786,0.366,790,0.374,881,0.44,886,0.446,null,0.865,1026,0.903,1111,0.529,1393,0.506,1463,0.479,1584,0.917,1589,1.013,null,0.529,1960,0.529,null,2.664,null,0.543,null,1.04,null,1.04,null,0.543,null,1.496,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.529,null,0.543,null,1.496,null,0.543,null,0.506,null,0.543,null,0.543,null,1.457,null,0.543,null,0.543,null,0.543,null,0.529,null,1.04,null,0.517,null,0.543,null,0.543,null,0.529,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543]],["name/922",[1997,69.894]],["ref/922",[1998,34.982]],["doc/922",[]],["name/923",[1999,69.894]],["ref/923",[2000,34.982]],["doc/923",[]],["name/924",[2001,69.894]],["ref/924",[2002,34.982]],["doc/924",[]],["name/925",[2003,69.894]],["ref/925",[2004,34.982]],["doc/925",[]],["name/926",[2005,69.894]],["ref/926",[2006,34.982]],["doc/926",[]],["name/927",[2007,69.894]],["ref/927",[2008,34.982]],["doc/927",[]],["name/928",[2009,69.894]],["ref/928",[2010,34.982]],["doc/928",[]],["name/929",[2011,69.894]],["ref/929",[2012,34.982]],["doc/929",[]],["name/930",[2013,69.894]],["ref/930",[2014,34.982]],["doc/930",[]],["name/931",[2015,69.894]],["ref/931",[2016,34.982]],["doc/931",[]],["name/932",[2017,69.894]],["ref/932",[2018,34.982]],["doc/932",[]],["name/933",[2019,69.894]],["ref/933",[2020,34.982]],["doc/933",[]],["name/934",[2021,69.894]],["ref/934",[2022,34.982]],["doc/934",[]],["name/935",[2023,69.894]],["ref/935",[2024,34.982]],["doc/935",[]],["name/936",[2025,69.894]],["ref/936",[2026,34.982]],["doc/936",[]],["name/937",[2027,69.894]],["ref/937",[2028,34.982]],["doc/937",[]],["name/938",[2029,69.894]],["ref/938",[2030,34.982]],["doc/938",[]],["name/939",[2031,69.894]],["ref/939",[2032,34.982]],["doc/939",[]],["name/940",[2033,69.894]],["ref/940",[2034,34.982]],["doc/940",[]],["name/941",[2035,69.894]],["ref/941",[2036,34.982]],["doc/941",[]],["name/942",[2037,69.894]],["ref/942",[2038,34.982]],["doc/942",[]],["name/943",[2039,69.894]],["ref/943",[2040,34.982]],["doc/943",[]],["name/944",[2041,69.894]],["ref/944",[2042,34.982]],["doc/944",[]],["name/945",[2043,64.791]],["ref/945",[2044,34.982]],["doc/945",[]],["name/946",[2045,69.894]],["ref/946",[2046,34.982]],["doc/946",[]],["name/947",[2047,69.894]],["ref/947",[2048,34.982]],["doc/947",[]],["name/948",[2049,69.894]],["ref/948",[2050,34.982]],["doc/948",[]],["name/949",[2051,69.894]],["ref/949",[2052,34.982]],["doc/949",[]],["name/950",[2053,69.894]],["ref/950",[2054,34.982]],["doc/950",[]],["name/951",[2055,69.894]],["ref/951",[2056,34.982]],["doc/951",[]],["name/952",[2057,69.894]],["ref/952",[2058,34.982]],["doc/952",[]],["name/953",[2059,69.894]],["ref/953",[2060,34.982]],["doc/953",[]],["name/954",[2061,69.894]],["ref/954",[2062,34.982]],["doc/954",[]],["name/955",[2063,69.894]],["ref/955",[2064,34.982]],["doc/955",[]],["name/956",[2065,69.894]],["ref/956",[2066,34.982]],["doc/956",[]],["name/957",[2067,69.894]],["ref/957",[2068,34.982]],["doc/957",[4,0.301,24,0.529,37,2.974,39,0.413,55,0.506,78,0.331,80,0.458,83,0.3,88,1.121,92,0.529,120,0.889,129,0.517,141,0.529,null,0.391,158,0.471,199,0.903,null,0.496,223,1.366,248,0.865,null,0.969,300,0.379,306,0.329,332,2.628,339,0.537,351,0.304,null,0.851,357,1.032,361,0.346,389,1.457,null,1.013,434,0.529,749,1.234,764,0.696,766,0.371,786,0.366,790,0.374,881,0.44,886,0.446,null,0.865,1026,0.903,1111,0.529,1393,0.506,1463,0.479,1584,0.917,1589,1.013,null,0.529,1960,0.529,null,2.664,null,0.543,null,1.04,null,1.04,null,0.543,null,1.496,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.529,null,0.543,null,1.496,null,0.543,null,0.506,null,0.543,null,0.543,null,1.457,null,0.543,null,0.543,null,0.543,null,0.529,null,1.04,null,0.517,null,0.543,null,0.543,null,0.529,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543]],["name/958",[2069,69.894]],["ref/958",[2070,34.982]],["doc/958",[]],["name/959",[2071,69.894]],["ref/959",[2072,34.982]],["doc/959",[]],["name/960",[2073,69.894]],["ref/960",[2074,34.982]],["doc/960",[]],["name/961",[2075,69.894]],["ref/961",[2076,34.982]],["doc/961",[]],["name/962",[2077,69.894]],["ref/962",[2078,34.982]],["doc/962",[]],["name/963",[2079,69.894]],["ref/963",[2080,34.982]],["doc/963",[]],["name/964",[2081,69.894]],["ref/964",[2082,34.982]],["doc/964",[]],["name/965",[2083,69.894]],["ref/965",[2084,34.982]],["doc/965",[]],["name/966",[2085,69.894]],["ref/966",[2086,34.982]],["doc/966",[]],["name/967",[2087,69.894]],["ref/967",[2088,34.982]],["doc/967",[]],["name/968",[2089,69.894]],["ref/968",[2090,34.982]],["doc/968",[]],["name/969",[2091,69.894]],["ref/969",[2092,34.982]],["doc/969",[]],["name/970",[2093,69.894]],["ref/970",[2094,34.982]],["doc/970",[]],["name/971",[]],["ref/971",[2095,34.982]],["doc/971",[96,6.359,2096,9.674]],["name/972",[769,39.479]],["ref/972",[2097,34.982]],["doc/972",[]],["name/973",[1116,35.805]],["ref/973",[2098,34.982]],["doc/973",[]],["name/974",[1390,47.944]],["ref/974",[2099,34.982]],["doc/974",[96,7.021,2100,8.179,null,7.581]],["name/975",[2102,69.894]],["ref/975",[2103,34.982]],["doc/975",[]],["name/976",[2101,64.791]],["ref/976",[2104,34.982]],["doc/976",[]],["name/977",[1116,35.805]],["ref/977",[2105,34.982]],["doc/977",[]],["name/978",[2106,69.894]],["ref/978",[2107,34.982]],["doc/978",[4,0.301,24,0.529,37,2.974,39,0.413,55,0.506,78,0.331,80,0.458,83,0.3,88,1.121,92,0.529,120,0.889,129,0.517,141,0.529,null,0.391,158,0.471,199,0.903,null,0.496,223,1.366,248,0.865,null,0.969,300,0.379,306,0.329,332,2.628,339,0.537,351,0.304,null,0.851,357,1.032,361,0.346,389,1.457,null,1.013,434,0.529,749,1.234,764,0.696,766,0.371,786,0.366,790,0.374,881,0.44,886,0.446,null,0.865,1026,0.903,1111,0.529,1393,0.506,1463,0.479,1584,0.917,1589,1.013,null,0.529,1960,0.529,null,2.664,null,0.543,null,1.04,null,1.04,null,0.543,null,1.496,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.529,null,0.543,null,1.496,null,0.543,null,0.506,null,0.543,null,0.543,null,1.457,null,0.543,null,0.543,null,0.543,null,0.529,null,1.04,null,0.517,null,0.543,null,0.543,null,0.529,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543]],["name/979",[2108,69.894]],["ref/979",[2109,34.982]],["doc/979",[]],["name/980",[2110,69.894]],["ref/980",[2111,34.982]],["doc/980",[]],["name/981",[2112,69.894]],["ref/981",[2113,34.982]],["doc/981",[]],["name/982",[2114,69.894]],["ref/982",[2115,34.982]],["doc/982",[]],["name/983",[2116,69.894]],["ref/983",[2117,34.982]],["doc/983",[]],["name/984",[2043,64.791]],["ref/984",[2118,34.982]],["doc/984",[]],["name/985",[2119,69.894]],["ref/985",[2120,34.982]],["doc/985",[]],["name/986",[2121,69.894]],["ref/986",[2122,34.982]],["doc/986",[]],["name/987",[2123,69.894]],["ref/987",[2124,34.982]],["doc/987",[]],["name/988",[2125,69.894]],["ref/988",[2126,34.982]],["doc/988",[]],["name/989",[2127,69.894]],["ref/989",[2128,34.982]],["doc/989",[]],["name/990",[2129,69.894]],["ref/990",[2130,34.982]],["doc/990",[]],["name/991",[2131,69.894]],["ref/991",[2132,34.982]],["doc/991",[]],["name/992",[2133,69.894]],["ref/992",[2134,34.982]],["doc/992",[]],["name/993",[2135,69.894]],["ref/993",[2136,34.982]],["doc/993",[]],["name/994",[2137,69.894]],["ref/994",[2138,34.982]],["doc/994",[]],["name/995",[2139,69.894]],["ref/995",[2140,34.982]],["doc/995",[]],["name/996",[2141,69.894]],["ref/996",[2142,34.982]],["doc/996",[]],["name/997",[2143,69.894]],["ref/997",[2144,34.982]],["doc/997",[]],["name/998",[2145,69.894]],["ref/998",[2146,34.982]],["doc/998",[]],["name/999",[2147,69.894]],["ref/999",[2148,34.982]],["doc/999",[]],["name/1000",[2149,69.894]],["ref/1000",[2150,34.982]],["doc/1000",[]],["name/1001",[2151,69.894]],["ref/1001",[2152,34.982]],["doc/1001",[]],["name/1002",[2153,69.894]],["ref/1002",[2154,34.982]],["doc/1002",[]],["name/1003",[2155,69.894]],["ref/1003",[2156,34.982]],["doc/1003",[]],["name/1004",[2157,69.894]],["ref/1004",[2158,34.982]],["doc/1004",[]],["name/1005",[2159,69.894]],["ref/1005",[2160,34.982]],["doc/1005",[]],["name/1006",[2161,69.894]],["ref/1006",[2162,34.982]],["doc/1006",[]],["name/1007",[2163,69.894]],["ref/1007",[2164,34.982]],["doc/1007",[]],["name/1008",[2165,69.894]],["ref/1008",[2166,34.982]],["doc/1008",[]],["name/1009",[2167,69.894]],["ref/1009",[2168,34.982]],["doc/1009",[]],["name/1010",[2169,69.894]],["ref/1010",[2170,34.982]],["doc/1010",[]],["name/1011",[2171,69.894]],["ref/1011",[2172,34.982]],["doc/1011",[]],["name/1012",[2173,69.894]],["ref/1012",[2174,34.982]],["doc/1012",[]],["name/1013",[2175,69.894]],["ref/1013",[2176,34.982]],["doc/1013",[]],["name/1014",[2177,69.894]],["ref/1014",[2178,34.982]],["doc/1014",[]],["name/1015",[2179,69.894]],["ref/1015",[2180,34.982]],["doc/1015",[]],["name/1016",[2181,69.894]],["ref/1016",[2182,34.982]],["doc/1016",[]],["name/1017",[2183,69.894]],["ref/1017",[2184,34.982]],["doc/1017",[]],["name/1018",[2185,69.894]],["ref/1018",[2186,34.982]],["doc/1018",[]],["name/1019",[2187,69.894]],["ref/1019",[2188,34.982]],["doc/1019",[]],["name/1020",[2189,69.894]],["ref/1020",[2190,34.982]],["doc/1020",[]],["name/1021",[2191,69.894]],["ref/1021",[2192,34.982]],["doc/1021",[]],["name/1022",[2193,69.894]],["ref/1022",[2194,34.982]],["doc/1022",[]],["name/1023",[2195,69.894]],["ref/1023",[2196,34.982]],["doc/1023",[]],["name/1024",[2197,69.894]],["ref/1024",[2198,34.982]],["doc/1024",[]],["name/1025",[2199,69.894]],["ref/1025",[2200,34.982]],["doc/1025",[]],["name/1026",[2201,69.894]],["ref/1026",[2202,34.982]],["doc/1026",[]],["name/1027",[2203,69.894]],["ref/1027",[2204,34.982]],["doc/1027",[]],["name/1028",[2205,69.894]],["ref/1028",[2206,34.982]],["doc/1028",[]],["name/1029",[2207,69.894]],["ref/1029",[2208,34.982]],["doc/1029",[]],["name/1030",[2209,69.894]],["ref/1030",[2210,34.982]],["doc/1030",[]],["name/1031",[2211,69.894]],["ref/1031",[2212,34.982]],["doc/1031",[]],["name/1032",[2213,69.894]],["ref/1032",[2214,34.982]],["doc/1032",[]],["name/1033",[2215,69.894]],["ref/1033",[2216,34.982]],["doc/1033",[]],["name/1034",[2217,69.894]],["ref/1034",[2218,34.982]],["doc/1034",[]],["name/1035",[2219,69.894]],["ref/1035",[2220,34.982]],["doc/1035",[]],["name/1036",[2221,69.894]],["ref/1036",[2222,34.982]],["doc/1036",[]],["name/1037",[2223,69.894]],["ref/1037",[2224,34.982]],["doc/1037",[]],["name/1038",[2225,69.894]],["ref/1038",[2226,34.982]],["doc/1038",[]],["name/1039",[2227,69.894]],["ref/1039",[2228,34.982]],["doc/1039",[]],["name/1040",[2229,69.894]],["ref/1040",[2230,34.982]],["doc/1040",[]],["name/1041",[2231,69.894]],["ref/1041",[2232,34.982]],["doc/1041",[]],["name/1042",[2233,69.894]],["ref/1042",[2234,34.982]],["doc/1042",[]],["name/1043",[2235,69.894]],["ref/1043",[2236,34.982]],["doc/1043",[]],["name/1044",[2237,69.894]],["ref/1044",[2238,34.982]],["doc/1044",[]],["name/1045",[2239,69.894]],["ref/1045",[2240,34.982]],["doc/1045",[]],["name/1046",[2241,69.894]],["ref/1046",[2242,34.982]],["doc/1046",[]],["name/1047",[2243,69.894]],["ref/1047",[2244,34.982]],["doc/1047",[]],["name/1048",[2245,69.894]],["ref/1048",[2246,34.982]],["doc/1048",[]],["name/1049",[2247,69.894]],["ref/1049",[2248,34.982]],["doc/1049",[]],["name/1050",[2249,69.894]],["ref/1050",[2250,34.982]],["doc/1050",[]],["name/1051",[2251,69.894]],["ref/1051",[2252,34.982]],["doc/1051",[]],["name/1052",[2253,69.894]],["ref/1052",[2254,34.982]],["doc/1052",[]],["name/1053",[2255,69.894]],["ref/1053",[2256,34.982]],["doc/1053",[]],["name/1054",[2257,69.894]],["ref/1054",[2258,34.982]],["doc/1054",[]],["name/1055",[2259,69.894]],["ref/1055",[2260,34.982]],["doc/1055",[]],["name/1056",[2261,69.894]],["ref/1056",[2262,34.982]],["doc/1056",[]],["name/1057",[2263,69.894]],["ref/1057",[2264,34.982]],["doc/1057",[]],["name/1058",[2265,69.894]],["ref/1058",[2266,34.982]],["doc/1058",[]],["name/1059",[2267,69.894]],["ref/1059",[2268,34.982]],["doc/1059",[]],["name/1060",[2269,69.894]],["ref/1060",[2270,34.982]],["doc/1060",[]],["name/1061",[2271,69.894]],["ref/1061",[2272,34.982]],["doc/1061",[]],["name/1062",[2273,69.894]],["ref/1062",[2274,34.982]],["doc/1062",[]],["name/1063",[2275,69.894]],["ref/1063",[2276,34.982]],["doc/1063",[]],["name/1064",[2277,69.894]],["ref/1064",[2278,34.982]],["doc/1064",[]],["name/1065",[2279,69.894]],["ref/1065",[2280,34.982]],["doc/1065",[]],["name/1066",[2281,69.894]],["ref/1066",[2282,34.982]],["doc/1066",[]],["name/1067",[2283,69.894]],["ref/1067",[2284,34.982]],["doc/1067",[]],["name/1068",[2285,69.894]],["ref/1068",[2286,34.982]],["doc/1068",[]],["name/1069",[2287,69.894]],["ref/1069",[2288,34.982]],["doc/1069",[]],["name/1070",[2289,69.894]],["ref/1070",[2290,34.982]],["doc/1070",[]],["name/1071",[2291,69.894]],["ref/1071",[2292,34.982]],["doc/1071",[]],["name/1072",[2293,69.894]],["ref/1072",[2294,34.982]],["doc/1072",[]],["name/1073",[2295,69.894]],["ref/1073",[2296,34.982]],["doc/1073",[]],["name/1074",[2297,69.894]],["ref/1074",[2298,34.982]],["doc/1074",[]],["name/1075",[2299,69.894]],["ref/1075",[2300,34.982]],["doc/1075",[]],["name/1076",[2301,69.894]],["ref/1076",[2302,34.982]],["doc/1076",[]],["name/1077",[2303,69.894]],["ref/1077",[2304,34.982]],["doc/1077",[]],["name/1078",[2305,69.894]],["ref/1078",[2306,34.982]],["doc/1078",[]],["name/1079",[2307,69.894]],["ref/1079",[2308,34.982]],["doc/1079",[]],["name/1080",[2309,69.894]],["ref/1080",[2310,34.982]],["doc/1080",[]],["name/1081",[2311,69.894]],["ref/1081",[2312,34.982]],["doc/1081",[]],["name/1082",[2313,69.894]],["ref/1082",[2314,34.982]],["doc/1082",[]],["name/1083",[2315,69.894]],["ref/1083",[2316,34.982]],["doc/1083",[]],["name/1084",[2317,69.894]],["ref/1084",[2318,34.982]],["doc/1084",[]],["name/1085",[2319,69.894]],["ref/1085",[2320,34.982]],["doc/1085",[]],["name/1086",[2321,69.894]],["ref/1086",[2322,34.982]],["doc/1086",[]],["name/1087",[2323,69.894]],["ref/1087",[2324,34.982]],["doc/1087",[]],["name/1088",[2325,69.894]],["ref/1088",[2326,34.982]],["doc/1088",[]],["name/1089",[2327,69.894]],["ref/1089",[2328,34.982]],["doc/1089",[]],["name/1090",[2329,69.894]],["ref/1090",[2330,34.982]],["doc/1090",[]],["name/1091",[2331,69.894]],["ref/1091",[2332,34.982]],["doc/1091",[]],["name/1092",[2333,69.894]],["ref/1092",[2334,34.982]],["doc/1092",[]],["name/1093",[2335,69.894]],["ref/1093",[2336,34.982]],["doc/1093",[]],["name/1094",[2337,69.894]],["ref/1094",[2338,34.982]],["doc/1094",[]],["name/1095",[2339,69.894]],["ref/1095",[2340,34.982]],["doc/1095",[]],["name/1096",[2341,69.894]],["ref/1096",[2342,34.982]],["doc/1096",[]],["name/1097",[2343,69.894]],["ref/1097",[2344,34.982]],["doc/1097",[]],["name/1098",[2345,69.894]],["ref/1098",[2346,34.982]],["doc/1098",[]],["name/1099",[2347,69.894]],["ref/1099",[2348,34.982]],["doc/1099",[]],["name/1100",[2349,69.894]],["ref/1100",[2350,34.982]],["doc/1100",[]],["name/1101",[2351,69.894]],["ref/1101",[2352,34.982]],["doc/1101",[]],["name/1102",[2353,69.894]],["ref/1102",[2354,34.982]],["doc/1102",[]],["name/1103",[2355,69.894]],["ref/1103",[2356,34.982]],["doc/1103",[]],["name/1104",[2357,69.894]],["ref/1104",[2358,34.982]],["doc/1104",[]],["name/1105",[2359,69.894]],["ref/1105",[2360,34.982]],["doc/1105",[]],["name/1106",[2361,69.894]],["ref/1106",[2362,34.982]],["doc/1106",[]],["name/1107",[2363,69.894]],["ref/1107",[2364,34.982]],["doc/1107",[]],["name/1108",[2365,69.894]],["ref/1108",[2366,34.982]],["doc/1108",[]],["name/1109",[2367,69.894]],["ref/1109",[2368,34.982]],["doc/1109",[]],["name/1110",[2369,69.894]],["ref/1110",[2370,34.982]],["doc/1110",[]],["name/1111",[2371,69.894]],["ref/1111",[2372,34.982]],["doc/1111",[]],["name/1112",[2373,69.894]],["ref/1112",[2374,34.982]],["doc/1112",[]],["name/1113",[2375,69.894]],["ref/1113",[2376,34.982]],["doc/1113",[]],["name/1114",[2377,69.894]],["ref/1114",[2378,34.982]],["doc/1114",[]],["name/1115",[2379,69.894]],["ref/1115",[2380,34.982]],["doc/1115",[]],["name/1116",[2381,69.894]],["ref/1116",[2382,34.982]],["doc/1116",[]],["name/1117",[2383,69.894]],["ref/1117",[2384,34.982]],["doc/1117",[]],["name/1118",[2385,69.894]],["ref/1118",[2386,34.982]],["doc/1118",[]],["name/1119",[2387,69.894]],["ref/1119",[2388,34.982]],["doc/1119",[]],["name/1120",[2389,69.894]],["ref/1120",[2390,34.982]],["doc/1120",[]],["name/1121",[2391,69.894]],["ref/1121",[2392,34.982]],["doc/1121",[]],["name/1122",[2393,69.894]],["ref/1122",[2394,34.982]],["doc/1122",[]],["name/1123",[2395,69.894]],["ref/1123",[2396,34.982]],["doc/1123",[]],["name/1124",[2397,69.894]],["ref/1124",[2398,34.982]],["doc/1124",[]],["name/1125",[2399,69.894]],["ref/1125",[2400,34.982]],["doc/1125",[]],["name/1126",[2401,69.894]],["ref/1126",[2402,34.982]],["doc/1126",[]],["name/1127",[2403,69.894]],["ref/1127",[2404,34.982]],["doc/1127",[]],["name/1128",[2405,69.894]],["ref/1128",[2406,34.982]],["doc/1128",[]],["name/1129",[2407,69.894]],["ref/1129",[2408,34.982]],["doc/1129",[]],["name/1130",[2409,69.894]],["ref/1130",[2410,34.982]],["doc/1130",[]],["name/1131",[2411,69.894]],["ref/1131",[2412,34.982]],["doc/1131",[]],["name/1132",[2413,69.894]],["ref/1132",[2414,34.982]],["doc/1132",[]],["name/1133",[2415,69.894]],["ref/1133",[2416,34.982]],["doc/1133",[]],["name/1134",[2417,69.894]],["ref/1134",[2418,34.982]],["doc/1134",[]],["name/1135",[2419,69.894]],["ref/1135",[2420,34.982]],["doc/1135",[]],["name/1136",[2421,69.894]],["ref/1136",[2422,34.982]],["doc/1136",[]],["name/1137",[2423,69.894]],["ref/1137",[2424,34.982]],["doc/1137",[]],["name/1138",[2425,69.894]],["ref/1138",[2426,34.982]],["doc/1138",[]],["name/1139",[2427,69.894]],["ref/1139",[2428,34.982]],["doc/1139",[]],["name/1140",[2429,69.894]],["ref/1140",[2430,34.982]],["doc/1140",[]],["name/1141",[2431,69.894]],["ref/1141",[2432,34.982]],["doc/1141",[]],["name/1142",[2433,69.894]],["ref/1142",[2434,34.982]],["doc/1142",[]],["name/1143",[2435,69.894]],["ref/1143",[2436,34.982]],["doc/1143",[]],["name/1144",[2437,69.894]],["ref/1144",[2438,34.982]],["doc/1144",[]],["name/1145",[2439,69.894]],["ref/1145",[2440,34.982]],["doc/1145",[]],["name/1146",[2441,69.894]],["ref/1146",[2442,34.982]],["doc/1146",[]],["name/1147",[2443,69.894]],["ref/1147",[2444,34.982]],["doc/1147",[]],["name/1148",[2445,69.894]],["ref/1148",[2446,34.982]],["doc/1148",[]],["name/1149",[2447,69.894]],["ref/1149",[2448,34.982]],["doc/1149",[]],["name/1150",[2449,69.894]],["ref/1150",[2450,34.982]],["doc/1150",[]],["name/1151",[2451,69.894]],["ref/1151",[2452,34.982]],["doc/1151",[]],["name/1152",[2453,69.894]],["ref/1152",[2454,34.982]],["doc/1152",[]],["name/1153",[2455,69.894]],["ref/1153",[2456,34.982]],["doc/1153",[]],["name/1154",[2457,69.894]],["ref/1154",[2458,34.982]],["doc/1154",[]],["name/1155",[2459,69.894]],["ref/1155",[2460,34.982]],["doc/1155",[]],["name/1156",[2461,69.894]],["ref/1156",[2462,34.982]],["doc/1156",[]],["name/1157",[2463,69.894]],["ref/1157",[2464,34.982]],["doc/1157",[]],["name/1158",[2465,69.894]],["ref/1158",[2466,34.982]],["doc/1158",[]],["name/1159",[2467,69.894]],["ref/1159",[2468,34.982]],["doc/1159",[]],["name/1160",[2469,69.894]],["ref/1160",[2470,34.982]],["doc/1160",[]],["name/1161",[2471,69.894]],["ref/1161",[2472,34.982]],["doc/1161",[]],["name/1162",[2473,69.894]],["ref/1162",[2474,34.982]],["doc/1162",[]],["name/1163",[2475,69.894]],["ref/1163",[2476,34.982]],["doc/1163",[]],["name/1164",[2477,69.894]],["ref/1164",[2478,34.982]],["doc/1164",[]],["name/1165",[2479,69.894]],["ref/1165",[2480,34.982]],["doc/1165",[]],["name/1166",[2481,69.894]],["ref/1166",[2482,34.982]],["doc/1166",[]],["name/1167",[2483,69.894]],["ref/1167",[2484,34.982]],["doc/1167",[]],["name/1168",[2485,69.894]],["ref/1168",[2486,34.982]],["doc/1168",[]],["name/1169",[2487,69.894]],["ref/1169",[2488,34.982]],["doc/1169",[]],["name/1170",[2489,69.894]],["ref/1170",[2490,34.982]],["doc/1170",[]],["name/1171",[2491,69.894]],["ref/1171",[2492,34.982]],["doc/1171",[]],["name/1172",[2493,69.894]],["ref/1172",[2494,34.982]],["doc/1172",[]],["name/1173",[2495,69.894]],["ref/1173",[2496,34.982]],["doc/1173",[]],["name/1174",[2497,69.894]],["ref/1174",[2498,34.982]],["doc/1174",[]],["name/1175",[2499,69.894]],["ref/1175",[2500,34.982]],["doc/1175",[]],["name/1176",[2501,69.894]],["ref/1176",[2502,34.982]],["doc/1176",[]],["name/1177",[2503,69.894]],["ref/1177",[2504,34.982]],["doc/1177",[]],["name/1178",[2505,69.894]],["ref/1178",[2506,34.982]],["doc/1178",[]],["name/1179",[2507,69.894]],["ref/1179",[2508,34.982]],["doc/1179",[]],["name/1180",[2509,69.894]],["ref/1180",[2510,34.982]],["doc/1180",[]],["name/1181",[2511,69.894]],["ref/1181",[2512,34.982]],["doc/1181",[]],["name/1182",[2513,69.894]],["ref/1182",[2514,34.982]],["doc/1182",[]],["name/1183",[2515,69.894]],["ref/1183",[2516,34.982]],["doc/1183",[]],["name/1184",[2517,69.894]],["ref/1184",[2518,34.982]],["doc/1184",[]],["name/1185",[2519,69.894]],["ref/1185",[2520,34.982]],["doc/1185",[]],["name/1186",[2521,69.894]],["ref/1186",[2522,34.982]],["doc/1186",[]],["name/1187",[2523,69.894]],["ref/1187",[2524,34.982]],["doc/1187",[]],["name/1188",[2525,69.894]],["ref/1188",[2526,34.982]],["doc/1188",[]],["name/1189",[2527,69.894]],["ref/1189",[2528,34.982]],["doc/1189",[]],["name/1190",[2529,69.894]],["ref/1190",[2530,34.982]],["doc/1190",[]],["name/1191",[2531,69.894]],["ref/1191",[2532,34.982]],["doc/1191",[]],["name/1192",[2533,69.894]],["ref/1192",[2534,34.982]],["doc/1192",[]],["name/1193",[2535,69.894]],["ref/1193",[2536,34.982]],["doc/1193",[]],["name/1194",[2537,69.894]],["ref/1194",[2538,34.982]],["doc/1194",[]],["name/1195",[2539,69.894]],["ref/1195",[2540,34.982]],["doc/1195",[]],["name/1196",[2541,69.894]],["ref/1196",[2542,34.982]],["doc/1196",[]],["name/1197",[2543,69.894]],["ref/1197",[2544,34.982]],["doc/1197",[]],["name/1198",[2545,69.894]],["ref/1198",[2546,34.982]],["doc/1198",[]],["name/1199",[2547,69.894]],["ref/1199",[2548,34.982]],["doc/1199",[]],["name/1200",[2549,69.894]],["ref/1200",[2550,34.982]],["doc/1200",[4,0.301,24,0.529,37,2.974,39,0.413,55,0.506,78,0.331,80,0.458,83,0.3,88,1.121,92,0.529,120,0.889,129,0.517,141,0.529,null,0.391,158,0.471,199,0.903,null,0.496,223,1.366,248,0.865,null,0.969,300,0.379,306,0.329,332,2.628,339,0.537,351,0.304,null,0.851,357,1.032,361,0.346,389,1.457,null,1.013,434,0.529,749,1.234,764,0.696,766,0.371,786,0.366,790,0.374,881,0.44,886,0.446,null,0.865,1026,0.903,1111,0.529,1393,0.506,1463,0.479,1584,0.917,1589,1.013,null,0.529,1960,0.529,null,2.664,null,0.543,null,1.04,null,1.04,null,0.543,null,1.496,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.529,null,0.543,null,1.496,null,0.543,null,0.506,null,0.543,null,0.543,null,1.457,null,0.543,null,0.543,null,0.543,null,0.529,null,1.04,null,0.517,null,0.543,null,0.543,null,0.529,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543]],["name/1201",[2551,69.894]],["ref/1201",[2552,34.982]],["doc/1201",[]],["name/1202",[2553,69.894]],["ref/1202",[2554,34.982]],["doc/1202",[]],["name/1203",[2555,69.894]],["ref/1203",[2556,34.982]],["doc/1203",[]],["name/1204",[2557,69.894]],["ref/1204",[2558,34.982]],["doc/1204",[]],["name/1205",[2559,69.894]],["ref/1205",[2560,34.982]],["doc/1205",[]],["name/1206",[2561,69.894]],["ref/1206",[2562,34.982]],["doc/1206",[]],["name/1207",[2563,69.894]],["ref/1207",[2564,34.982]],["doc/1207",[]],["name/1208",[2565,69.894]],["ref/1208",[2566,34.982]],["doc/1208",[]],["name/1209",[2567,69.894]],["ref/1209",[2568,34.982]],["doc/1209",[]],["name/1210",[2569,69.894]],["ref/1210",[2570,34.982]],["doc/1210",[]],["name/1211",[2571,69.894]],["ref/1211",[2572,34.982]],["doc/1211",[]],["name/1212",[2573,69.894]],["ref/1212",[2574,34.982]],["doc/1212",[]],["name/1213",[2575,69.894]],["ref/1213",[2576,34.982]],["doc/1213",[]],["name/1214",[2577,69.894]],["ref/1214",[2578,34.982]],["doc/1214",[]],["name/1215",[2579,69.894]],["ref/1215",[2580,34.982]],["doc/1215",[]],["name/1216",[2581,69.894]],["ref/1216",[2582,34.982]],["doc/1216",[]],["name/1217",[2583,69.894]],["ref/1217",[2584,34.982]],["doc/1217",[]],["name/1218",[2585,69.894]],["ref/1218",[2586,34.982]],["doc/1218",[]],["name/1219",[2587,69.894]],["ref/1219",[2588,34.982]],["doc/1219",[]],["name/1220",[2589,69.894]],["ref/1220",[2590,34.982]],["doc/1220",[]],["name/1221",[2591,69.894]],["ref/1221",[2592,34.982]],["doc/1221",[]],["name/1222",[2593,69.894]],["ref/1222",[2594,34.982]],["doc/1222",[]],["name/1223",[2595,69.894]],["ref/1223",[2596,34.982]],["doc/1223",[]],["name/1224",[2597,69.894]],["ref/1224",[2598,34.982]],["doc/1224",[]],["name/1225",[2599,69.894]],["ref/1225",[2600,34.982]],["doc/1225",[]],["name/1226",[2601,69.894]],["ref/1226",[2602,34.982]],["doc/1226",[]],["name/1227",[2603,69.894]],["ref/1227",[2604,34.982]],["doc/1227",[]],["name/1228",[2605,69.894]],["ref/1228",[2606,34.982]],["doc/1228",[]],["name/1229",[2607,69.894]],["ref/1229",[2608,34.982]],["doc/1229",[]],["name/1230",[2609,69.894]],["ref/1230",[2610,34.982]],["doc/1230",[]],["name/1231",[2611,69.894]],["ref/1231",[2612,34.982]],["doc/1231",[]],["name/1232",[2613,69.894]],["ref/1232",[2614,34.982]],["doc/1232",[]],["name/1233",[2615,69.894]],["ref/1233",[2616,34.982]],["doc/1233",[]],["name/1234",[2617,69.894]],["ref/1234",[2618,34.982]],["doc/1234",[]],["name/1235",[2619,69.894]],["ref/1235",[2620,34.982]],["doc/1235",[]],["name/1236",[2621,69.894]],["ref/1236",[2622,34.982]],["doc/1236",[]],["name/1237",[2623,69.894]],["ref/1237",[2624,34.982]],["doc/1237",[]],["name/1238",[2625,69.894]],["ref/1238",[2626,34.982]],["doc/1238",[]],["name/1239",[2627,69.894]],["ref/1239",[2628,34.982]],["doc/1239",[]],["name/1240",[2629,69.894]],["ref/1240",[2630,34.982]],["doc/1240",[]],["name/1241",[2631,69.894]],["ref/1241",[2632,34.982]],["doc/1241",[]],["name/1242",[2633,69.894]],["ref/1242",[2634,34.982]],["doc/1242",[]],["name/1243",[2635,69.894]],["ref/1243",[2636,34.982]],["doc/1243",[]],["name/1244",[2637,69.894]],["ref/1244",[2638,34.982]],["doc/1244",[]],["name/1245",[2639,69.894]],["ref/1245",[2640,34.982]],["doc/1245",[]],["name/1246",[2641,69.894]],["ref/1246",[2642,34.982]],["doc/1246",[]],["name/1247",[2643,69.894]],["ref/1247",[2644,34.982]],["doc/1247",[]],["name/1248",[2645,69.894]],["ref/1248",[2646,34.982]],["doc/1248",[]],["name/1249",[2647,69.894]],["ref/1249",[2648,34.982]],["doc/1249",[]],["name/1250",[2649,69.894]],["ref/1250",[2650,34.982]],["doc/1250",[]],["name/1251",[2651,69.894]],["ref/1251",[2652,34.982]],["doc/1251",[]],["name/1252",[2653,69.894]],["ref/1252",[2654,34.982]],["doc/1252",[]],["name/1253",[2655,69.894]],["ref/1253",[2656,34.982]],["doc/1253",[]],["name/1254",[2657,69.894]],["ref/1254",[2658,34.982]],["doc/1254",[]],["name/1255",[2659,69.894]],["ref/1255",[2660,34.982]],["doc/1255",[]],["name/1256",[2661,69.894]],["ref/1256",[2662,34.982]],["doc/1256",[]],["name/1257",[2663,69.894]],["ref/1257",[2664,34.982]],["doc/1257",[]],["name/1258",[2665,64.791]],["ref/1258",[2666,34.982]],["doc/1258",[]],["name/1259",[2667,64.791]],["ref/1259",[2668,34.982]],["doc/1259",[]],["name/1260",[2669,64.791]],["ref/1260",[2670,34.982]],["doc/1260",[]],["name/1261",[2671,69.894]],["ref/1261",[2672,34.982]],["doc/1261",[]],["name/1262",[2673,69.894]],["ref/1262",[2674,34.982]],["doc/1262",[]],["name/1263",[2675,69.894]],["ref/1263",[2676,34.982]],["doc/1263",[]],["name/1264",[2677,69.894]],["ref/1264",[2678,34.982]],["doc/1264",[]],["name/1265",[2679,69.894]],["ref/1265",[2680,34.982]],["doc/1265",[]],["name/1266",[2681,69.894]],["ref/1266",[2682,34.982]],["doc/1266",[]],["name/1267",[2683,69.894]],["ref/1267",[2684,34.982]],["doc/1267",[]],["name/1268",[2685,69.894]],["ref/1268",[2686,34.982]],["doc/1268",[]],["name/1269",[2687,69.894]],["ref/1269",[2688,34.982]],["doc/1269",[]],["name/1270",[2689,69.894]],["ref/1270",[2690,34.982]],["doc/1270",[]],["name/1271",[2691,69.894]],["ref/1271",[2692,34.982]],["doc/1271",[]],["name/1272",[2693,69.894]],["ref/1272",[2694,34.982]],["doc/1272",[]],["name/1273",[2695,69.894]],["ref/1273",[2696,34.982]],["doc/1273",[]],["name/1274",[2697,69.894]],["ref/1274",[2698,34.982]],["doc/1274",[]],["name/1275",[2699,69.894]],["ref/1275",[2700,34.982]],["doc/1275",[]],["name/1276",[2701,69.894]],["ref/1276",[2702,34.982]],["doc/1276",[]],["name/1277",[2703,69.894]],["ref/1277",[2704,34.982]],["doc/1277",[]],["name/1278",[2705,69.894]],["ref/1278",[2706,34.982]],["doc/1278",[]],["name/1279",[2707,69.894]],["ref/1279",[2708,34.982]],["doc/1279",[]],["name/1280",[2709,69.894]],["ref/1280",[2710,34.982]],["doc/1280",[]],["name/1281",[2711,69.894]],["ref/1281",[2712,34.982]],["doc/1281",[]],["name/1282",[2713,69.894]],["ref/1282",[2714,34.982]],["doc/1282",[]],["name/1283",[2715,69.894]],["ref/1283",[2716,34.982]],["doc/1283",[]],["name/1284",[2717,69.894]],["ref/1284",[2718,34.982]],["doc/1284",[]],["name/1285",[2719,69.894]],["ref/1285",[2720,34.982]],["doc/1285",[]],["name/1286",[2721,69.894]],["ref/1286",[2722,34.982]],["doc/1286",[]],["name/1287",[2723,69.894]],["ref/1287",[2724,34.982]],["doc/1287",[]],["name/1288",[2725,69.894]],["ref/1288",[2726,34.982]],["doc/1288",[]],["name/1289",[2727,69.894]],["ref/1289",[2728,34.982]],["doc/1289",[]],["name/1290",[2729,69.894]],["ref/1290",[2730,34.982]],["doc/1290",[]],["name/1291",[2731,69.894]],["ref/1291",[2732,34.982]],["doc/1291",[]],["name/1292",[2667,64.791]],["ref/1292",[2733,34.982]],["doc/1292",[]],["name/1293",[2665,64.791]],["ref/1293",[2734,34.982]],["doc/1293",[]],["name/1294",[1567,61.429]],["ref/1294",[2735,34.982]],["doc/1294",[]],["name/1295",[36,61.429]],["ref/1295",[2736,34.982]],["doc/1295",[36,9.359]],["name/1296",[1116,35.805]],["ref/1296",[2737,34.982]],["doc/1296",[]],["name/1297",[180,64.791]],["ref/1297",[2738,34.982]],["doc/1297",[]],["name/1298",[2739,69.894]],["ref/1298",[2740,34.982]],["doc/1298",[]],["name/1299",[2741,69.894]],["ref/1299",[2742,34.982]],["doc/1299",[]],["name/1300",[2743,69.894]],["ref/1300",[2744,34.982]],["doc/1300",[]],["name/1301",[2745,69.894]],["ref/1301",[2746,34.982]],["doc/1301",[]],["name/1302",[2747,69.894]],["ref/1302",[2748,34.982]],["doc/1302",[4,0.301,24,0.529,37,2.974,39,0.413,55,0.506,78,0.331,80,0.458,83,0.3,88,1.121,92,0.529,120,0.889,129,0.517,141,0.529,null,0.391,158,0.471,199,0.903,null,0.496,223,1.366,248,0.865,null,0.969,300,0.379,306,0.329,332,2.628,339,0.537,351,0.304,null,0.851,357,1.032,361,0.346,389,1.457,null,1.013,434,0.529,749,1.234,764,0.696,766,0.371,786,0.366,790,0.374,881,0.44,886,0.446,null,0.865,1026,0.903,1111,0.529,1393,0.506,1463,0.479,1584,0.917,1589,1.013,null,0.529,1960,0.529,null,2.664,null,0.543,null,1.04,null,1.04,null,0.543,null,1.496,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.529,null,0.543,null,1.496,null,0.543,null,0.506,null,0.543,null,0.543,null,1.457,null,0.543,null,0.543,null,0.543,null,0.529,null,1.04,null,0.517,null,0.543,null,0.543,null,0.529,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543]],["name/1303",[2749,69.894]],["ref/1303",[2750,34.982]],["doc/1303",[]],["name/1304",[2751,69.894]],["ref/1304",[2752,34.982]],["doc/1304",[]],["name/1305",[2753,69.894]],["ref/1305",[2754,34.982]],["doc/1305",[]],["name/1306",[2755,69.894]],["ref/1306",[2756,34.982]],["doc/1306",[]],["name/1307",[2757,69.894]],["ref/1307",[2758,34.982]],["doc/1307",[]],["name/1308",[2759,69.894]],["ref/1308",[2760,34.982]],["doc/1308",[]],["name/1309",[2761,69.894]],["ref/1309",[2762,34.982]],["doc/1309",[]],["name/1310",[2763,69.894]],["ref/1310",[2764,34.982]],["doc/1310",[]],["name/1311",[2765,69.894]],["ref/1311",[2766,34.982]],["doc/1311",[]],["name/1312",[2767,69.894]],["ref/1312",[2768,34.982]],["doc/1312",[]],["name/1313",[2769,69.894]],["ref/1313",[2770,34.982]],["doc/1313",[]],["name/1314",[2771,69.894]],["ref/1314",[2772,34.982]],["doc/1314",[]],["name/1315",[2773,69.894]],["ref/1315",[2774,34.982]],["doc/1315",[]],["name/1316",[2775,69.894]],["ref/1316",[2776,34.982]],["doc/1316",[]],["name/1317",[2777,69.894]],["ref/1317",[2778,34.982]],["doc/1317",[]],["name/1318",[2779,69.894]],["ref/1318",[2780,34.982]],["doc/1318",[]],["name/1319",[2781,69.894]],["ref/1319",[2782,34.982]],["doc/1319",[]],["name/1320",[2783,69.894]],["ref/1320",[2784,34.982]],["doc/1320",[]],["name/1321",[2785,69.894]],["ref/1321",[2786,34.982]],["doc/1321",[]],["name/1322",[2787,69.894]],["ref/1322",[2788,34.982]],["doc/1322",[]],["name/1323",[2789,69.894]],["ref/1323",[2790,34.982]],["doc/1323",[]],["name/1324",[2791,69.894]],["ref/1324",[2792,34.982]],["doc/1324",[]],["name/1325",[2793,69.894]],["ref/1325",[2794,34.982]],["doc/1325",[]],["name/1326",[2795,69.894]],["ref/1326",[2796,34.982]],["doc/1326",[]],["name/1327",[2797,69.894]],["ref/1327",[2798,34.982]],["doc/1327",[]],["name/1328",[2799,69.894]],["ref/1328",[2800,34.982]],["doc/1328",[]],["name/1329",[2801,69.894]],["ref/1329",[2802,34.982]],["doc/1329",[]],["name/1330",[2803,69.894]],["ref/1330",[2804,34.982]],["doc/1330",[]],["name/1331",[2805,69.894]],["ref/1331",[2806,34.982]],["doc/1331",[]],["name/1332",[2807,69.894]],["ref/1332",[2808,34.982]],["doc/1332",[]],["name/1333",[2809,69.894]],["ref/1333",[2810,34.982]],["doc/1333",[]],["name/1334",[2811,69.894]],["ref/1334",[2812,34.982]],["doc/1334",[]],["name/1335",[2813,69.894]],["ref/1335",[2814,34.982]],["doc/1335",[]],["name/1336",[2815,69.894]],["ref/1336",[2816,34.982]],["doc/1336",[]],["name/1337",[2817,69.894]],["ref/1337",[2818,34.982]],["doc/1337",[]],["name/1338",[2819,69.894]],["ref/1338",[2820,34.982]],["doc/1338",[]],["name/1339",[2821,69.894]],["ref/1339",[2822,34.982]],["doc/1339",[]],["name/1340",[2823,69.894]],["ref/1340",[2824,34.982]],["doc/1340",[]],["name/1341",[2825,69.894]],["ref/1341",[2826,34.982]],["doc/1341",[]],["name/1342",[2827,69.894]],["ref/1342",[2828,34.982]],["doc/1342",[]],["name/1343",[2829,69.894]],["ref/1343",[2830,34.982]],["doc/1343",[]],["name/1344",[2831,69.894]],["ref/1344",[2832,34.982]],["doc/1344",[]],["name/1345",[2833,69.894]],["ref/1345",[2834,34.982]],["doc/1345",[]],["name/1346",[2835,69.894]],["ref/1346",[2836,34.982]],["doc/1346",[]],["name/1347",[2837,69.894]],["ref/1347",[2838,34.982]],["doc/1347",[]],["name/1348",[2839,69.894]],["ref/1348",[2840,34.982]],["doc/1348",[]],["name/1349",[2841,69.894]],["ref/1349",[2842,34.982]],["doc/1349",[]],["name/1350",[2843,69.894]],["ref/1350",[2844,34.982]],["doc/1350",[]],["name/1351",[2845,69.894]],["ref/1351",[2846,34.982]],["doc/1351",[]],["name/1352",[2847,69.894]],["ref/1352",[2848,34.982]],["doc/1352",[]],["name/1353",[2849,69.894]],["ref/1353",[2850,34.982]],["doc/1353",[]],["name/1354",[2851,69.894]],["ref/1354",[2852,34.982]],["doc/1354",[]],["name/1355",[2853,69.894]],["ref/1355",[2854,34.982]],["doc/1355",[]],["name/1356",[2855,69.894]],["ref/1356",[2856,34.982]],["doc/1356",[]],["name/1357",[2857,69.894]],["ref/1357",[2858,34.982]],["doc/1357",[]],["name/1358",[2859,69.894]],["ref/1358",[2860,34.982]],["doc/1358",[]],["name/1359",[2861,69.894]],["ref/1359",[2862,34.982]],["doc/1359",[]],["name/1360",[2863,69.894]],["ref/1360",[2864,34.982]],["doc/1360",[]],["name/1361",[2865,69.894]],["ref/1361",[2866,34.982]],["doc/1361",[]],["name/1362",[2867,69.894]],["ref/1362",[2868,34.982]],["doc/1362",[]],["name/1363",[2869,69.894]],["ref/1363",[2870,34.982]],["doc/1363",[]],["name/1364",[2871,69.894]],["ref/1364",[2872,34.982]],["doc/1364",[]],["name/1365",[2873,69.894]],["ref/1365",[2874,34.982]],["doc/1365",[]],["name/1366",[2875,69.894]],["ref/1366",[2876,34.982]],["doc/1366",[]],["name/1367",[2877,69.894]],["ref/1367",[2878,34.982]],["doc/1367",[]],["name/1368",[2879,69.894]],["ref/1368",[2880,34.982]],["doc/1368",[]],["name/1369",[2881,69.894]],["ref/1369",[2882,34.982]],["doc/1369",[]],["name/1370",[2883,69.894]],["ref/1370",[2884,34.982]],["doc/1370",[]],["name/1371",[2885,69.894]],["ref/1371",[2886,34.982]],["doc/1371",[]],["name/1372",[2887,69.894]],["ref/1372",[2888,34.982]],["doc/1372",[]],["name/1373",[2889,69.894]],["ref/1373",[2890,34.982]],["doc/1373",[4,0.301,24,0.529,37,2.974,39,0.413,55,0.506,78,0.331,80,0.458,83,0.3,88,1.121,92,0.529,120,0.889,129,0.517,141,0.529,null,0.391,158,0.471,199,0.903,null,0.496,223,1.366,248,0.865,null,0.969,300,0.379,306,0.329,332,2.628,339,0.537,351,0.304,null,0.851,357,1.032,361,0.346,389,1.457,null,1.013,434,0.529,749,1.234,764,0.696,766,0.371,786,0.366,790,0.374,881,0.44,886,0.446,null,0.865,1026,0.903,1111,0.529,1393,0.506,1463,0.479,1584,0.917,1589,1.013,null,0.529,1960,0.529,null,2.664,null,0.543,null,1.04,null,1.04,null,0.543,null,1.496,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.529,null,0.543,null,1.496,null,0.543,null,0.506,null,0.543,null,0.543,null,1.457,null,0.543,null,0.543,null,0.543,null,0.529,null,1.04,null,0.517,null,0.543,null,0.543,null,0.529,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543,null,0.543]],["name/1374",[2891,69.894]],["ref/1374",[2892,34.982]],["doc/1374",[]],["name/1375",[2893,69.894]],["ref/1375",[2894,34.982]],["doc/1375",[]],["name/1376",[2895,69.894]],["ref/1376",[2896,34.982]],["doc/1376",[]],["name/1377",[2897,69.894]],["ref/1377",[2898,34.982]],["doc/1377",[]],["name/1378",[2899,69.894]],["ref/1378",[2900,34.982]],["doc/1378",[]],["name/1379",[2901,69.894]],["ref/1379",[2902,34.982]],["doc/1379",[]],["name/1380",[2903,69.894]],["ref/1380",[2904,34.982]],["doc/1380",[]],["name/1381",[2905,69.894]],["ref/1381",[2906,34.982]],["doc/1381",[]],["name/1382",[2907,69.894]],["ref/1382",[2908,34.982]],["doc/1382",[]],["name/1383",[2909,69.894]],["ref/1383",[2910,34.982]],["doc/1383",[]],["name/1384",[2911,69.894]],["ref/1384",[2912,34.982]],["doc/1384",[]],["name/1385",[2913,69.894]],["ref/1385",[2914,34.982]],["doc/1385",[]],["name/1386",[2915,69.894]],["ref/1386",[2916,34.982]],["doc/1386",[]],["name/1387",[2917,69.894]],["ref/1387",[2918,34.982]],["doc/1387",[]],["name/1388",[2919,69.894]],["ref/1388",[2920,34.982]],["doc/1388",[]],["name/1389",[2921,69.894]],["ref/1389",[2922,34.982]],["doc/1389",[]],["name/1390",[2923,69.894]],["ref/1390",[2924,34.982]],["doc/1390",[]],["name/1391",[2925,69.894]],["ref/1391",[2926,34.982]],["doc/1391",[]],["name/1392",[2927,69.894]],["ref/1392",[2928,34.982]],["doc/1392",[]],["name/1393",[2929,69.894]],["ref/1393",[2930,34.982]],["doc/1393",[]],["name/1394",[2931,69.894]],["ref/1394",[2932,34.982]],["doc/1394",[]],["name/1395",[2933,69.894]],["ref/1395",[2934,34.982]],["doc/1395",[]],["name/1396",[2935,69.894]],["ref/1396",[2936,34.982]],["doc/1396",[]],["name/1397",[2937,69.894]],["ref/1397",[2938,34.982]],["doc/1397",[]],["name/1398",[2939,69.894]],["ref/1398",[2940,34.982]],["doc/1398",[]],["name/1399",[2941,69.894]],["ref/1399",[2942,34.982]],["doc/1399",[]],["name/1400",[2943,69.894]],["ref/1400",[2944,34.982]],["doc/1400",[]],["name/1401",[2945,69.894]],["ref/1401",[2946,34.982]],["doc/1401",[]],["name/1402",[2947,64.791]],["ref/1402",[2948,34.982]],["doc/1402",[0,5.48,30,6.672,100,6.4,374,3.889,2947,7.037]],["name/1403",[2949,69.894]],["ref/1403",[2950,34.982]],["doc/1403",[]],["name/1404",[2951,69.894]],["ref/1404",[2952,34.982]],["doc/1404",[]],["name/1405",[2953,69.894]],["ref/1405",[2954,34.982]],["doc/1405",[]],["name/1406",[2955,69.894]],["ref/1406",[2956,34.982]],["doc/1406",[4,0.892,null,1.717,null,1.532,10,1.888,12,2.844,21,2.55,39,1.224,47,1.037,50,1.888,null,1.888,null,2.066,null,3.335,58,2.183,88,0.942,100,1.717,146,1.79,213,1.79,367,0.705,753,1.878,906,1.61,1058,1.888,1235,1.888,1626,1.888,1987,1.532,2957,2.037,null,2.037,null,2.037,null,2.037,null,2.037,null,2.037,null,2.037,null,2.037,null,2.037,null,2.037,null,2.037]],["name/1407",[2968,69.894]],["ref/1407",[2969,34.982]],["doc/1407",[]],["name/1408",[2970,69.894]],["ref/1408",[2971,34.982]],["doc/1408",[]],["name/1409",[2972,69.894]],["ref/1409",[2973,34.982]],["doc/1409",[]],["name/1410",[2974,69.894]],["ref/1410",[2975,34.982]],["doc/1410",[]],["name/1411",[2976,69.894]],["ref/1411",[2977,34.982]],["doc/1411",[1,1.524,13,2.469,52,2.516,83,1.492,113,3.17,329,1.086,340,1.809,357,2.381,906,2.703,1752,3.545,1974,2.633,2978,3.42,null,3.42,null,3.17,null,3.42,null,3.006,null,3.42,null,3.42]],["name/1412",[785,35.588]],["ref/1412",[2985,34.982]],["doc/1412",[29,4.596,47,3.607,140,2.867,306,3.392,757,3.607,1463,4.937]],["name/1413",[1432,61.429]],["ref/1413",[2986,34.982]],["doc/1413",[]],["name/1414",[987,58.919]],["ref/1414",[2987,34.982]],["doc/1414",[]],["name/1415",[1421,61.429]],["ref/1415",[2988,34.982]],["doc/1415",[]],["name/1416",[797,28.504]],["ref/1416",[2989,34.982]],["doc/1416",[140,3.916,797,3.945]],["name/1417",[2990,69.894]],["ref/1417",[2991,34.982]],["doc/1417",[]],["name/1418",[2992,69.894]],["ref/1418",[2993,34.982]],["doc/1418",[1,1.934,32,0.497,77,0.497,88,0.823,105,0.412,119,1.415,140,2.979,155,0.49,240,0.534,306,0.453,321,0.49,329,1.378,332,1.141,342,1.247,352,0.625,357,0.402,367,0.327,742,0.534,748,0.497,null,0.481,null,0.942,null,0.5,null,0.5,null,0.493,null,0.5,null,0.497,null,0.534,null,1.286,null,1.438,null,1.014,null,0.538,null,0.538,null,0.53,null,0.538,null,0.5,null,0.53,null,0.51,null,0.538,null,0.526,null,0.534,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,0.538,null,1.014,null,0.538,null,0.538,null,0.481,null,0.503,null,0.526,null,1.006,null,0.534,null,0.514,null,0.538,null,0.538]],["name/1419",[793,37.218]],["ref/1419",[2994,34.982]],["doc/1419",[]],["name/1420",[2995,69.894]],["ref/1420",[2996,34.982]],["doc/1420",[]],["name/1421",[909,58.919]],["ref/1421",[2997,34.982]],["doc/1421",[]],["name/1422",[911,58.919]],["ref/1422",[2998,34.982]],["doc/1422",[]],["name/1423",[2999,69.894]],["ref/1423",[3000,34.982]],["doc/1423",[]],["name/1424",[3001,69.894]],["ref/1424",[3002,34.982]],["doc/1424",[]],["name/1425",[3003,69.894]],["ref/1425",[3004,34.982]],["doc/1425",[]],["name/1426",[3005,69.894]],["ref/1426",[3006,34.982]],["doc/1426",[]],["name/1427",[1416,61.429]],["ref/1427",[3007,34.982]],["doc/1427",[]],["name/1428",[806,45.351]],["ref/1428",[3008,34.982]],["doc/1428",[]],["name/1429",[831,56.914]],["ref/1429",[3009,34.982]],["doc/1429",[]],["name/1430",[808,58.919]],["ref/1430",[3010,34.982]],["doc/1430",[]],["name/1431",[1443,64.791]],["ref/1431",[3011,34.982]],["doc/1431",[]],["name/1432",[963,61.429]],["ref/1432",[3012,34.982]],["doc/1432",[]],["name/1433",[829,61.429]],["ref/1433",[3013,34.982]],["doc/1433",[]],["name/1434",[795,53.815]],["ref/1434",[3014,34.982]],["doc/1434",[]],["name/1435",[927,53.815]],["ref/1435",[3015,34.982]],["doc/1435",[]],["name/1436",[981,55.245]],["ref/1436",[3016,34.982]],["doc/1436",[]],["name/1437",[985,55.245]],["ref/1437",[3017,34.982]],["doc/1437",[]],["name/1438",[870,55.245]],["ref/1438",[3018,34.982]],["doc/1438",[]],["name/1439",[804,48.712]],["ref/1439",[3019,34.982]],["doc/1439",[]],["name/1440",[3020,69.894]],["ref/1440",[3021,34.982]],["doc/1440",[]],["name/1441",[955,61.429]],["ref/1441",[3022,34.982]],["doc/1441",[]],["name/1442",[3023,69.894]],["ref/1442",[3024,34.982]],["doc/1442",[]],["name/1443",[3025,69.894]],["ref/1443",[3026,34.982]],["doc/1443",[]],["name/1444",[810,47.23]],["ref/1444",[3027,34.982]],["doc/1444",[]],["name/1445",[849,52.565]],["ref/1445",[3028,34.982]],["doc/1445",[]],["name/1446",[1430,58.919]],["ref/1446",[3029,34.982]],["doc/1446",[]],["name/1447",[1418,64.791]],["ref/1447",[3030,34.982]],["doc/1447",[]],["name/1448",[987,58.919]],["ref/1448",[3031,34.982]],["doc/1448",[]],["name/1449",[1421,61.429]],["ref/1449",[3032,34.982]],["doc/1449",[]],["name/1450",[1441,64.791]],["ref/1450",[3033,34.982]],["doc/1450",[]],["name/1451",[1432,61.429]],["ref/1451",[3034,34.982]],["doc/1451",[]],["name/1452",[1439,58.919]],["ref/1452",[3035,34.982]],["doc/1452",[]],["name/1453",[1086,58.919]],["ref/1453",[3036,34.982]],["doc/1453",[]],["name/1454",[1446,64.791]],["ref/1454",[3037,34.982]],["doc/1454",[]],["name/1455",[989,61.429]],["ref/1455",[3038,34.982]],["doc/1455",[]],["name/1456",[1449,61.429]],["ref/1456",[3039,34.982]],["doc/1456",[]],["name/1457",[983,61.429]],["ref/1457",[3040,34.982]],["doc/1457",[]],["name/1458",[3041,69.894]],["ref/1458",[3042,34.982]],["doc/1458",[]],["name/1459",[1454,64.791]],["ref/1459",[3043,34.982]],["doc/1459",[]],["name/1460",[1456,64.791]],["ref/1460",[3044,34.982]],["doc/1460",[]],["name/1461",[1458,64.791]],["ref/1461",[3045,34.982]],["doc/1461",[]],["name/1462",[1460,64.791]],["ref/1462",[3046,34.982]],["doc/1462",[]],["name/1463",[820,50.454]],["ref/1463",[3047,34.982]],["doc/1463",[]],["name/1464",[785,35.588]],["ref/1464",[3048,34.982]],["doc/1464",[29,4.596,47,3.607,140,2.867,306,3.392,757,3.607,1463,4.937]],["name/1465",[797,28.504]],["ref/1465",[3049,34.982]],["doc/1465",[140,3.916,797,3.945]],["name/1466",[3050,69.894]],["ref/1466",[3051,34.982]],["doc/1466",[1,2.097,3,0.868,29,1.495,32,0.654,39,0.748,47,2.396,88,1.066,140,2.376,155,0.646,161,0.883,298,0.883,306,0.596,321,0.646,329,0.732,332,1.453,342,0.9,352,1.129,357,0.53,702,0.854,748,0.654,null,1.173,null,0.659,null,0.659,null,0.659,null,0.65,null,0.659,null,0.654,757,2.988,785,0.634,797,1.312,877,0.899,null,0.899,null,0.854,null,0.883,null,0.798,null,0.899,null,0.899,null,0.899,null,0.899,null,1.495,null,0.819,null,0.899,null,0.899,null,0.899]],["name/1467",[357,29.74]],["ref/1467",[3052,34.982]],["doc/1467",[]],["name/1468",[407,61.429]],["ref/1468",[3053,34.982]],["doc/1468",[]],["name/1469",[351,30.88]],["ref/1469",[3054,34.982]],["doc/1469",[]],["name/1470",[339,28.504]],["ref/1470",[3055,34.982]],["doc/1470",[]],["name/1471",[3056,69.894]],["ref/1471",[3057,34.982]],["doc/1471",[]],["name/1472",[927,53.815]],["ref/1472",[3058,34.982]],["doc/1472",[]],["name/1473",[806,45.351]],["ref/1473",[3059,34.982]],["doc/1473",[]],["name/1474",[1439,58.919]],["ref/1474",[3060,34.982]],["doc/1474",[]],["name/1475",[795,53.815]],["ref/1475",[3061,34.982]],["doc/1475",[]],["name/1476",[1430,58.919]],["ref/1476",[3062,34.982]],["doc/1476",[]],["name/1477",[785,35.588]],["ref/1477",[3063,34.982]],["doc/1477",[29,4.596,47,3.607,140,2.867,306,3.392,757,3.607,1463,4.937]],["name/1478",[1696,64.791]],["ref/1478",[3064,34.982]],["doc/1478",[]],["name/1479",[3065,69.894]],["ref/1479",[3066,34.982]],["doc/1479",[]],["name/1480",[3067,69.894]],["ref/1480",[3068,34.982]],["doc/1480",[52,1.79,58,3.066,168,7.053,300,2.789,329,2.417,788,2.854,1567,4.441,3069,4.684,null,5.053,null,5.053]],["name/1481",[1416,61.429]],["ref/1481",[3072,34.982]],["doc/1481",[]],["name/1482",[981,55.245]],["ref/1482",[3073,34.982]],["doc/1482",[]],["name/1483",[870,55.245]],["ref/1483",[3074,34.982]],["doc/1483",[]],["name/1484",[985,55.245]],["ref/1484",[3075,34.982]],["doc/1484",[]],["name/1485",[1086,58.919]],["ref/1485",[3076,34.982]],["doc/1485",[]],["name/1486",[3077,69.894]],["ref/1486",[3078,34.982]],["doc/1486",[]],["name/1487",[797,28.504]],["ref/1487",[3079,34.982]],["doc/1487",[140,3.916,797,3.945]],["name/1488",[3080,64.791]],["ref/1488",[3081,34.982]],["doc/1488",[0,3.481,158,5.038,1092,4.239,1789,5.805,3082,4.823,null,4.823,null,4.823,null,4.239,null,4.823,null,4.066,null,4.471]],["name/1489",[3089,64.791]],["ref/1489",[3090,32.428]],["doc/1489",[3,2.463,11,2.721,null,4.543,47,2.927,103,3.106,107,2.979,131,4.846,158,3.943,341,2.189,431,3.276,900,2.878,998,4.149,3080,3.276,3089,3.276,null,3.276,null,3.534]],["name/1490",[341,43.295]],["ref/1490",[3092,34.982]],["doc/1490",[11,3.267,55,3.123,100,3.576,129,3.191,269,5.846,337,2.6,702,2.91,786,2.259,1021,3.455,1179,3.729,3085,3.729,3093,3.933,null,4.243,null,6.652]],["name/1491",[3096,69.894]],["ref/1491",[3097,34.982]],["doc/1491",[103,6.672,303,6.001,329,2.412,997,5.589,3098,5.381]],["name/1492",[3099,69.894]],["ref/1492",[3100,34.982]],["doc/1492",[329,2.25,369,4.176,997,5.215,3098,5.021,3101,7.083,null,7.083]],["name/1493",[3103,69.894]],["ref/1493",[3104,34.982]],["doc/1493",[22,6.182,329,2.412,997,5.589,3098,5.381,3105,7.592]],["name/1494",[3106,69.894]],["ref/1494",[3107,34.982]],["doc/1494",[105,3.089,329,2.25,369,4.176,997,5.215,3098,5.021,3108,6.225]],["name/1495",[3109,69.894]],["ref/1495",[3110,34.982]],["doc/1495",[105,3.089,329,2.25,369,4.176,997,5.215,3098,5.021,3111,7.083]],["name/1496",[3112,69.894]],["ref/1496",[3113,34.982]],["doc/1496",[105,3.089,329,2.25,369,4.176,997,5.215,3098,5.021,3114,7.083]],["name/1497",[3115,69.894]],["ref/1497",[3116,34.982]],["doc/1497",[105,3.089,329,2.25,369,4.176,997,5.215,3098,5.021,3117,7.083]],["name/1498",[3118,69.894]],["ref/1498",[3119,34.982]],["doc/1498",[303,6.464,374,4.19,1213,7.188,3098,5.798]],["name/1499",[3120,69.894]],["ref/1499",[3121,34.982]],["doc/1499",[1,3.645,122,6.021,329,2.598,3122,6.297]],["name/1500",[3123,69.894]],["ref/1500",[3124,34.982]],["doc/1500",[1,3.645,122,6.021,329,2.598,3122,6.297]],["name/1501",[3125,69.894]],["ref/1501",[3126,34.982]],["doc/1501",[303,7.006,3127,8.217,null,6.399]],["name/1502",[3129,69.894]],["ref/1502",[3130,34.982]],["doc/1502",[109,4.993,1110,5.112,3098,4.706,3128,4.792,3131,6.639,null,6.639,null,6.639]],["name/1503",[3134,69.894]],["ref/1503",[3135,34.982]],["doc/1503",[88,2.454,108,3.443,997,3.907,1193,3.323,1743,4.321,3069,4.919,3128,5.697,3136,5.307,null,5.307,null,5.307]],["name/1504",[3139,69.894]],["ref/1504",[3140,34.982]],["doc/1504",[1990,7.449,3128,6.984]],["name/1505",[3141,69.894]],["ref/1505",[3142,34.982]],["doc/1505",[1110,6.297,1132,7.581,1193,5.122,3128,5.904]],["name/1506",[3143,69.894]],["ref/1506",[3144,34.982]],["doc/1506",[122,6.525,329,2.816,3122,6.825]],["name/1507",[3145,69.894]],["ref/1507",[3146,34.982]],["doc/1507",[1,3.645,122,6.021,329,2.598,3122,6.297]],["name/1508",[3147,69.894]],["ref/1508",[3148,34.982]],["doc/1508",[1,3.645,122,6.021,329,2.598,3122,6.297]],["name/1509",[3149,69.894]],["ref/1509",[3150,34.982]],["doc/1509",[88,3.51,998,5.48,3128,5.48,3151,7.592,null,6.672]],["name/1510",[1031,64.791]],["ref/1510",[3153,34.982]],["doc/1510",[88,3.51,998,5.48,3128,5.48,3152,6.672,3154,7.592]],["name/1511",[3155,69.894]],["ref/1511",[3156,34.982]],["doc/1511",[88,3.51,998,5.48,1033,7.037,3128,5.48,3152,6.672]],["name/1512",[3157,69.894]],["ref/1512",[3158,34.982]],["doc/1512",[223,4.792,1193,4.157,1978,6.829,3159,5.835,null,5.835,null,6.639]],["name/1513",[3162,69.894]],["ref/1513",[3163,34.982]],["doc/1513",[223,4.792,1193,4.157,1978,6.829,3159,5.835,null,5.835,3164,6.639]],["name/1514",[3165,69.894]],["ref/1514",[3166,34.982]],["doc/1514",[223,4.792,1193,4.157,1978,6.829,3159,5.835,null,5.835,3167,6.639]],["name/1515",[3168,69.894]],["ref/1515",[3169,34.982]],["doc/1515",[303,7.006,3127,8.217,3170,8.864]],["name/1516",[3171,69.894]],["ref/1516",[3172,34.982]],["doc/1516",[122,6.525,329,2.816,3122,6.825]],["name/1517",[3173,69.894]],["ref/1517",[3174,34.982]],["doc/1517",[88,3.51,1097,6.4,3175,7.037,null,7.037,null,7.037]],["name/1518",[3178,69.894]],["ref/1518",[3179,34.982]],["doc/1518",[88,3.51,3175,7.037,null,7.037,null,7.037,3180,7.592]],["name/1519",[3181,69.894]],["ref/1519",[3182,34.982]],["doc/1519",[122,4.887,172,3.61,248,4.363,351,2.933,408,5.596,1120,4.486,3122,5.112]],["name/1520",[3183,69.894]],["ref/1520",[3184,34.982]],["doc/1520",[303,6.001,352,2.666,374,3.889,1213,6.672,1340,7.037]],["name/1521",[3185,69.894]],["ref/1521",[3186,34.982]],["doc/1521",[1120,5.527,1221,7.188,3187,8.179,null,7.581]],["name/1522",[3087,58.919]],["ref/1522",[3088,32.428]],["doc/1522",[0,2.835,4,1.72,49,3.452,85,3.641,88,1.816,192,3.198,1154,3.452,1179,3.452,1410,3.641,3087,5.276,3189,3.928,null,3.641,null,3.641,null,3.641,null,3.928,null,3.928,null,3.641]],["name/1523",[3087,58.919]],["ref/1523",[3196,34.982]],["doc/1523",[96,7.021,3197,8.179,null,7.188]],["name/1524",[3199,69.894]],["ref/1524",[3200,34.982]],["doc/1524",[]],["name/1525",[3198,61.429]],["ref/1525",[3201,34.982]],["doc/1525",[]],["name/1526",[1116,35.805]],["ref/1526",[3202,34.982]],["doc/1526",[]],["name/1527",[3203,69.894]],["ref/1527",[3204,34.982]],["doc/1527",[1,3.951,329,2.816,1390,6.08]],["name/1528",[3205,69.894]],["ref/1528",[3206,34.982]],["doc/1528",[329,3.383]],["name/1529",[3207,69.894]],["ref/1529",[3208,34.982]],["doc/1529",[329,3.074,1390,6.636]],["name/1530",[3209,69.894]],["ref/1530",[3210,34.982]],["doc/1530",[329,3.074,1390,6.636]],["name/1531",[3211,69.894]],["ref/1531",[3212,34.982]],["doc/1531",[1,3.951,329,2.816,1390,6.08]],["name/1532",[3195,64.791]],["ref/1532",[3213,34.982]],["doc/1532",[1,2.629,3190,5.468,null,5.468,null,5.468,3198,7.496,3214,5.898,null,5.898,null,5.468]],["name/1533",[3217,69.894]],["ref/1533",[3218,34.982]],["doc/1533",[1,3.951,329,2.816,1390,6.08]],["name/1534",[3219,69.894]],["ref/1534",[3220,34.982]],["doc/1534",[1,3.951,329,2.816,1390,6.08]],["name/1535",[3221,69.894]],["ref/1535",[3222,34.982]],["doc/1535",[329,3.074,1390,6.636]],["name/1536",[3223,69.894]],["ref/1536",[3224,34.982]],["doc/1536",[1,3.951,329,2.816,1390,6.08]],["name/1537",[3225,69.894]],["ref/1537",[3226,34.982]],["doc/1537",[1,3.951,329,2.816,1390,6.08]],["name/1538",[3227,69.894]],["ref/1538",[3228,34.982]],["doc/1538",[]],["name/1539",[3229,69.894]],["ref/1539",[3230,34.982]],["doc/1539",[]],["name/1540",[3231,64.791]],["ref/1540",[3232,34.982]],["doc/1540",[0,5.904,4,3.582,367,2.831,3231,7.581]],["name/1541",[3233,69.894]],["ref/1541",[3234,34.982]],["doc/1541",[]],["name/1542",[3235,69.894]],["ref/1542",[3236,34.982]],["doc/1542",[]],["name/1543",[3237,69.894]],["ref/1543",[3238,34.982]],["doc/1543",[3098,4.706,3128,4.792,3239,5.596,null,5.835,null,6.154,null,6.154,null,6.154]],["name/1544",[3244,69.894]],["ref/1544",[3245,34.982]],["doc/1544",[3098,4.706,3128,4.792,3239,5.596,null,5.835,null,6.154,null,6.154,null,6.154]],["name/1545",[3246,69.894]],["ref/1545",[3247,34.982]],["doc/1545",[329,2.109,1390,4.554,1396,5.596,3108,5.835,3248,6.154,null,6.154,null,6.154]],["name/1546",[3251,69.894]],["ref/1546",[3252,34.982]],["doc/1546",[329,2.109,1280,5.835,1390,4.554,1396,5.596,3108,5.835,3248,6.154,null,6.154]],["name/1547",[3253,53.815]],["ref/1547",[3254,34.982]],["doc/1547",[21,2.891,30,3.585,49,3.585,131,3.438,165,3.781,342,1.594,880,2.891,1092,3.585,2980,3.781,3253,3.141,3255,4.079,null,4.079,null,4.079,null,4.079,null,4.079,null,2.944,null,4.079]],["name/1548",[3262,69.894]],["ref/1548",[3263,34.982]],["doc/1548",[248,4.99,3253,5.845,3260,5.48,3264,7.592,null,7.037]],["name/1549",[2669,64.791]],["ref/1549",[3266,34.982]],["doc/1549",[21,5.381,37,4.606,199,5.207,3250,7.037,3260,5.48]],["name/1550",[3267,69.894]],["ref/1550",[3268,34.982]],["doc/1550",[21,5.798,199,5.61,3253,6.297,3260,5.904]],["name/1551",[3269,69.894]],["ref/1551",[3270,34.982]],["doc/1551",[199,5.61,3216,7.581,3253,6.297,3260,5.904]],["name/1552",[3271,69.894]],["ref/1552",[3272,34.982]],["doc/1552",[3253,6.825,3260,6.399,3273,8.864]],["name/1553",[3274,69.894]],["ref/1553",[3275,34.982]],["doc/1553",[329,2.598,3253,6.297,3260,5.904,3265,7.581]],["name/1554",[3276,69.894]],["ref/1554",[3277,34.982]],["doc/1554",[21,5.381,199,5.207,300,4.189,329,2.412,3260,5.48]],["name/1555",[3278,69.894]],["ref/1555",[3279,34.982]],["doc/1555",[21,5.381,199,5.207,300,4.189,329,2.412,3260,5.48]],["name/1556",[3280,69.894]],["ref/1556",[3281,34.982]],["doc/1556",[21,5.381,199,5.207,300,4.189,329,2.412,3260,5.48]],["name/1557",[277,58.919]],["ref/1557",[3282,34.982]],["doc/1557",[47,3.003,58,3.579,83,2.573,277,4.972,702,4.046,1021,4.803,3085,5.184,3093,5.468,3283,5.468]],["name/1558",[3284,69.894]],["ref/1558",[3285,34.982]],["doc/1558",[12,2.539,52,2.408,58,3.225,83,2.318,172,2.89,277,2.708,351,1.419,408,4.48,765,1.8,907,2.616,1098,2.978,1584,2.239,1987,2.416,3283,2.978,3286,3.212,null,5.315,null,3.212]],["name/1559",[3289,69.894]],["ref/1559",[3290,34.982]],["doc/1559",[]],["name/1560",[3291,69.894]],["ref/1560",[3292,34.982]],["doc/1560",[]],["name/1561",[680,51.454]],["ref/1561",[3293,34.982]],["doc/1561",[]],["name/1562",[682,51.454]],["ref/1562",[3294,34.982]],["doc/1562",[]],["name/1563",[3295,69.894]],["ref/1563",[3296,34.982]],["doc/1563",[]],["name/1564",[680,51.454]],["ref/1564",[3297,34.982]],["doc/1564",[]],["name/1565",[682,51.454]],["ref/1565",[3298,34.982]],["doc/1565",[]],["name/1566",[3299,69.894]],["ref/1566",[3300,34.982]],["doc/1566",[]],["name/1567",[680,51.454]],["ref/1567",[3301,34.982]],["doc/1567",[]],["name/1568",[682,51.454]],["ref/1568",[3302,34.982]],["doc/1568",[]],["name/1569",[3303,69.894]],["ref/1569",[3304,34.982]],["doc/1569",[1,4.463,21,1.137,null,1.306,63,1.352,null,1.352,77,0.843,143,1.352,192,1.306,226,1.352,230,2.45,248,1.055,332,0.725,339,1.185,342,0.627,352,0.563,357,0.683,516,1.352,768,1.616,787,0.892,879,1.101,1014,1.41,null,3.501,null,1.41,null,1.41,null,1.41,null,1.41,null,2.45,null,2.366,null,1.41,null,1.41,null,1.41,null,1.158,null,1.101,null,1.41,null,1.41]],["name/1570",[]],["ref/1570",[3305,34.982]],["doc/1570",[]],["name/1571",[]],["ref/1571",[3306,34.982]],["doc/1571",[]],["name/1572",[3307,69.894]],["ref/1572",[3308,34.982]],["doc/1572",[]],["name/1573",[3309,69.894]],["ref/1573",[3310,34.982]],["doc/1573",[]],["name/1574",[3311,69.894]],["ref/1574",[3312,34.982]],["doc/1574",[]],["name/1575",[3313,69.894]],["ref/1575",[3314,34.982]],["doc/1575",[]],["name/1576",[3315,69.894]],["ref/1576",[3316,34.982]],["doc/1576",[]],["name/1577",[3317,69.894]],["ref/1577",[3318,34.982]],["doc/1577",[]],["name/1578",[3319,69.894]],["ref/1578",[3320,34.982]],["doc/1578",[]],["name/1579",[1985,53.815]],["ref/1579",[3321,34.982]],["doc/1579",[]],["name/1580",[3322,69.894]],["ref/1580",[3323,34.982]],["doc/1580",[]],["name/1581",[3324,69.894]],["ref/1581",[3325,34.982]],["doc/1581",[]],["name/1582",[1310,64.791]],["ref/1582",[3326,34.982]],["doc/1582",[]],["name/1583",[3327,69.894]],["ref/1583",[3328,34.982]],["doc/1583",[]],["name/1584",[3329,69.894]],["ref/1584",[3330,34.982]],["doc/1584",[]],["name/1585",[3331,69.894]],["ref/1585",[157,32.428]],["doc/1585",[]],["name/1586",[114,53.815]],["ref/1586",[3332,34.982]],["doc/1586",[1,4.463,21,1.137,null,1.306,63,1.352,null,1.352,77,0.843,143,1.352,192,1.306,226,1.352,230,2.45,248,1.055,332,0.725,339,1.185,342,0.627,352,0.563,357,0.683,516,1.352,768,1.616,787,0.892,879,1.101,1014,1.41,null,3.501,null,1.41,null,1.41,null,1.41,null,1.41,null,2.45,null,2.366,null,1.41,null,1.41,null,1.41,null,1.158,null,1.101,null,1.41,null,1.41]],["name/1587",[94,56.914]],["ref/1587",[3333,34.982]],["doc/1587",[]],["name/1588",[117,55.245]],["ref/1588",[3334,34.982]],["doc/1588",[]],["name/1589",[210,61.429]],["ref/1589",[3335,34.982]],["doc/1589",[]],["name/1590",[1331,64.791]],["ref/1590",[3336,34.982]],["doc/1590",[]],["name/1591",[]],["ref/1591",[3337,34.982]],["doc/1591",[]],["name/1592",[3338,69.894]],["ref/1592",[3339,34.982]],["doc/1592",[]],["name/1593",[3340,69.894]],["ref/1593",[3341,34.982]],["doc/1593",[0,1.124,null,3.795,5,1.313,null,1.171,11,1.199,96,2.554,114,1.199,320,3.602,null,2.015,330,0.945,385,0.945,406,1.443,1110,2.992,3342,1.557,null,1.557,null,1.443,null,2.828,null,3.885,null,3.602,null,3.885,null,3.885,null,3.885,null,1.443,null,1.443,null,1.557,null,1.557,null,1.557,null,1.443,null,1.557,null,1.443]],["name/1594",[6,52.565]],["ref/1594",[3359,34.982]],["doc/1594",[]],["name/1595",[3352,64.791]],["ref/1595",[3360,34.982]],["doc/1595",[]],["name/1596",[3344,64.791]],["ref/1596",[3361,34.982]],["doc/1596",[]],["name/1597",[3351,64.791]],["ref/1597",[3362,34.982]],["doc/1597",[]],["name/1598",[114,53.815]],["ref/1598",[3363,34.982]],["doc/1598",[]],["name/1599",[330,42.406]],["ref/1599",[3364,34.982]],["doc/1599",[]],["name/1600",[3356,64.791]],["ref/1600",[3365,34.982]],["doc/1600",[]],["name/1601",[385,42.406]],["ref/1601",[3366,34.982]],["doc/1601",[]],["name/1602",[3358,64.791]],["ref/1602",[3367,34.982]],["doc/1602",[]],["name/1603",[3188,64.791]],["ref/1603",[3368,34.982]],["doc/1603",[]],["name/1604",[3369,69.894]],["ref/1604",[3370,34.982]],["doc/1604",[]],["name/1605",[1199,64.791]],["ref/1605",[3371,34.982]],["doc/1605",[]],["name/1606",[1319,61.429]],["ref/1606",[3372,34.982]],["doc/1606",[]],["name/1607",[3373,69.894]],["ref/1607",[3374,34.982]],["doc/1607",[]],["name/1608",[3375,69.894]],["ref/1608",[3376,34.982]],["doc/1608",[]],["name/1609",[3377,69.894]],["ref/1609",[3378,34.982]],["doc/1609",[]],["name/1610",[174,58.919]],["ref/1610",[3379,34.982]],["doc/1610",[]],["name/1611",[3380,64.791]],["ref/1611",[3381,34.982]],["doc/1611",[0,5.113,6,5.327,155,3.674,null,4.138,329,2.25,3382,7.083]],["name/1612",[3383,69.894]],["ref/1612",[3384,34.982]],["doc/1612",[]],["name/1613",[17,53.815]],["ref/1613",[3385,34.982]],["doc/1613",[]],["name/1614",[2,61.429]],["ref/1614",[3386,34.982]],["doc/1614",[2,5.835,12,5.247,17,5.112,128,5.835,329,2.109,360,3.401,1789,5.247]],["name/1615",[3387,69.894]],["ref/1615",[3388,34.982]],["doc/1615",[78,1.308,80,1.81,null,2.092,84,2.388,109,3.474,146,2.388,174,2.29,241,2.519,329,0.863,352,0.954,1130,2.29,1141,2,1712,1.763,1808,2.388,2982,2.388,3239,2.29,3347,4.282,3389,4.282,null,2.519,null,2.519,null,2.519,null,2.717,null,2.717,null,2.717,null,2.717,null,2.717,null,2.717]],["name/1616",[3399,69.894]],["ref/1616",[3400,34.982]],["doc/1616",[81,4.302,84,4.91,109,4.202,174,4.71,2982,4.91,3239,4.71,3389,5.179,null,5.179,null,5.179,null,5.179]],["name/1617",[3380,64.791]],["ref/1617",[3401,34.982]],["doc/1617",[17,6.567,79,5.944,81,4.542,155,3.06,null,3.446,329,1.874,360,3.022]],["name/1618",[154,61.429]],["ref/1618",[3402,34.982]],["doc/1618",[6,5.327,13,5.113,107,5.971,128,6.225,154,6.225,3403,7.083]],["name/1619",[3404,69.894]],["ref/1619",[3405,34.982]],["doc/1619",[]],["name/1620",[3406,58.919]],["ref/1620",[3407,32.428]],["doc/1620",[47,2.845,77,2.936,88,2.583,156,3.264,158,3.832,280,4.71,342,2.183,3406,6.911,3408,5.179]],["name/1621",[1116,35.805]],["ref/1621",[3409,32.428]],["doc/1621",[]],["name/1622",[1223,53.815]],["ref/1622",[3410,34.982]],["doc/1622",[109,5.327,171,5.768,null,3.852,357,3.014,1223,7.47]],["name/1623",[1319,61.429]],["ref/1623",[3411,34.982]],["doc/1623",[]],["name/1624",[3412,69.894]],["ref/1624",[3413,34.982]],["doc/1624",[]],["name/1625",[1116,35.805]],["ref/1625",[3414,34.982]],["doc/1625",[]],["name/1626",[3406,58.919]],["ref/1626",[3407,32.428]],["doc/1626",[47,2.845,77,2.936,88,2.583,156,3.264,158,3.832,280,4.71,342,2.183,3406,6.911,3408,5.179]],["name/1627",[1116,35.805]],["ref/1627",[3409,32.428]],["doc/1627",[]],["name/1628",[3415,69.894]],["ref/1628",[3416,34.982]],["doc/1628",[52,2.213,173,4.162,329,1.985,1026,4.285,1193,3.912,1223,4.81,1584,4.354,3417,6.247]],["name/1629",[3418,69.894]],["ref/1629",[3419,34.982]],["doc/1629",[52,1.979,173,3.722,329,1.775,1026,3.832,1120,3.775,1193,3.499,1223,4.302,1584,5.714,3420,5.179]],["name/1630",[3421,69.894]],["ref/1630",[3422,34.982]],["doc/1630",[52,2.213,173,4.162,329,1.985,1026,4.285,1193,3.912,1223,4.81,1584,4.354,3420,5.791]],["name/1631",[3423,69.894]],["ref/1631",[3424,34.982]],["doc/1631",[11,5.845,94,6.182,329,2.412,1960,5.845,3425,7.592]],["name/1632",[3426,69.894]],["ref/1632",[3427,34.982]],["doc/1632",[23,3.117,149,2.993,249,3.396,300,2.545,329,1.465,1120,4.796,1193,2.889,1207,5.983,1212,4.054,1981,3.551,3428,4.276,null,4.276]],["name/1633",[3430,69.894]],["ref/1633",[3431,34.982]],["doc/1633",[23,2.867,149,2.753,300,2.341,329,2.113,762,2.377,1120,4.495,1193,2.657,1202,3.933,1207,5.607,1210,3.933,1212,3.729,3428,3.933,null,3.933]],["name/1634",[3432,69.894]],["ref/1634",[3433,34.982]],["doc/1634",[]],["name/1635",[3434,69.894]],["ref/1635",[3435,34.982]],["doc/1635",[6,5.327,11,5.454,171,5.768,null,3.852,3436,7.083,null,7.083]],["name/1636",[3438,69.894]],["ref/1636",[3439,34.982]],["doc/1636",[79,4.354,94,5.087,171,5.087,null,3.397,null,4.162,1193,3.912,3240,5.49,3440,6.247]],["name/1637",[3441,69.894]],["ref/1637",[3442,34.982]],["doc/1637",[149,4.053,300,3.447,329,1.985,1193,3.912,1223,4.81,1323,5.791,1345,5.791,3443,6.247]]],"invertedIndex":[["opshin",[0,{"position":[[0,6]]}],[1,{"position":[[0,6]]}],[2,{"position":[[4,6],[437,7],[884,7],[1145,6],[1194,7],[1601,6],[2662,6],[2833,6],[2921,7],[2949,6],[3013,6],[3176,6],[3565,6],[3773,6],[4771,6],[5852,6],[6098,7],[6546,6],[6717,6],[6925,7]]},1439,{"position":[[0,6]]},4208,{"position":[[32,6]]},4466,{"position":[[0,6]]},4568,{"position":[[34,6]]},4622,{"position":[[45,6]]},4781,{"position":[[807,7]]},4835,{"position":[[14,6]]}]],["",[],[],[2,{"position":[[29,1],[780,1],[1392,1],[2929,1],[3158,1],[4041,1],[4142,1],[4327,1],[4407,1],[4557,1],[4600,1],[7041,1],[7173,1]]},8,{"position":[[130,1],[133,1],[160,1]]},101,{"position":[[105,1]]},926,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},941,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},965,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},986,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1004,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1025,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1040,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1061,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1082,{"position":[[329,1],[419,1],[544,1],[708,1],[726,1]]},1100,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1145,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1163,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1169,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1184,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1199,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1214,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1232,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1247,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1316,{"position":[[62,3],[86,1],[92,1],[97,1],[104,1],[109,1],[117,1],[156,3],[187,3],[216,3],[306,3],[323,3],[339,1],[341,1],[344,1],[347,1]]},1328,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1355,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1373,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1388,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1403,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1424,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},1439,{"position":[[226,1]]},1466,{"position":[[45,1]]},1859,{"position":[[60,1]]},1862,{"position":[[88,1]]},1868,{"position":[[78,1]]},2000,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},2015,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},2030,{"position":[[329,1],[419,1],[544,1],[708,1],[726,1]]},2048,{"position":[[329,1],[419,1],[544,1],[708,1],[726,1]]},2072,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},2126,{"position":[[329,1],[419,1],[544,1],[708,1],[726,1]]},2144,{"position":[[329,1],[419,1],[544,1],[708,1],[726,1]]},2177,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},2249,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},2255,{"position":[[329,1],[419,1],[544,1],[708,1],[726,1]]},2264,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},2279,{"position":[[329,1],[419,1],[544,1],[708,1],[726,1]]},2309,{"position":[[329,1],[419,1],[544,1],[708,1],[726,1]]},2330,{"position":[[329,1],[419,1],[544,1],[708,1],[726,1]]},2384,{"position":[[52,1],[102,1],[153,1],[194,1],[244,1],[287,1],[328,1]]},2408,{"position":[[5,1],[38,1],[75,1],[119,1],[155,1],[191,1],[234,1],[265,1],[282,1],[329,1],[375,1],[434,1],[485,1],[505,1],[526,1],[550,1],[600,1],[647,1],[711,1],[736,1],[777,1],[836,1],[890,1],[930,1],[970,1],[1006,1],[1043,1]]},2414,{"position":[[5,1],[121,1],[242,1],[332,1],[354,1],[377,1],[434,1],[484,1],[551,1],[627,1],[708,1],[751,1],[791,1],[847,1],[908,1],[948,1],[980,1],[1050,1],[1124,1],[1155,1],[1177,1],[1235,1],[1262,1],[1291,1],[1310,1],[1317,1],[1325,1]]},2444,{"position":[[5,1],[121,1],[242,1],[332,1],[354,1],[377,1],[434,1],[484,1],[551,1],[627,1],[708,1],[751,1],[791,1],[847,1],[908,1],[948,1],[980,1],[1050,1],[1124,1],[1155,1],[1177,1],[1235,1],[1262,1],[1291,1],[1310,1],[1317,1],[1325,1]]},2477,{"position":[[5,1],[121,1],[242,1],[332,1],[354,1],[377,1],[434,1],[484,1],[551,1],[627,1],[708,1],[751,1],[791,1],[847,1],[908,1],[948,1],[980,1],[1050,1],[1124,1],[1155,1],[1177,1],[1235,1],[1262,1],[1291,1],[1310,1],[1317,1],[1325,1]]},2588,{"position":[[5,1],[38,1],[75,1],[119,1],[155,1],[191,1],[234,1],[265,1],[282,1],[329,1],[375,1],[434,1],[485,1],[505,1],[526,1],[550,1],[600,1],[647,1],[711,1],[736,1],[777,1],[836,1],[890,1],[930,1],[970,1],[1006,1],[1043,1]]},2660,{"position":[[5,1],[121,1],[242,1],[332,1],[354,1],[377,1],[434,1],[484,1],[551,1],[627,1],[708,1],[751,1],[791,1],[847,1],[908,1],[948,1],[980,1],[1050,1],[1124,1],[1155,1],[1177,1],[1235,1],[1262,1],[1291,1],[1310,1],[1317,1],[1325,1]]},2747,{"position":[[5,1],[38,1],[75,1],[119,1],[155,1],[191,1],[234,1],[265,1],[282,1],[329,1],[375,1],[434,1],[485,1],[505,1],[526,1],[550,1],[600,1],[647,1],[711,1],[736,1],[777,1],[836,1],[890,1],[930,1],[970,1],[1006,1],[1043,1]]},4235,{"position":[[127,1]]},4256,{"position":[[274,1],[529,1],[535,1],[668,1],[714,1],[1110,1]]},4400,{"position":[[329,1],[419,1],[544,1],[708,1],[726,1]]},4499,{"position":[[10,1]]},4502,{"position":[[10,2]]},4523,{"position":[[10,1]]},4526,{"position":[[10,2]]},4583,{"position":[[10,1]]},4595,{"position":[[10,1]]},4598,{"position":[[96,1]]},4601,{"position":[[10,2]]},4604,{"position":[[10,2]]},4610,{"position":[[10,1]]},4613,{"position":[[10,1]]},4709,{"position":[[62,3],[86,1],[92,1],[97,1],[104,1],[109,1],[117,1],[156,3],[187,3],[216,3],[306,3],[323,3],[339,1],[341,1],[344,1],[347,1]]},4760,{"position":[[62,3],[86,1],[92,1],[97,1],[104,1],[109,1],[117,1],[156,3],[187,3],[216,3],[306,3],[323,3],[339,1],[341,1],[344,1],[347,1]]},4781,{"position":[[253,1],[459,1],[663,1],[666,1],[710,1],[712,1],[714,3],[741,1],[763,1],[805,1],[862,1]]}]],["build",[4842,{"position":[[0,5]]}],[],[2,{"position":[[39,8],[76,5],[3572,5],[3748,5],[3953,5]]},4844,{"position":[[40,5]]}]],["want",[],[],[2,{"position":[[57,5],[91,5],[759,4]]},1082,{"position":[[624,4]]},2030,{"position":[[624,4]]},2048,{"position":[[624,4]]},2126,{"position":[[624,4]]},2144,{"position":[[624,4]]},2255,{"position":[[624,4]]},2279,{"position":[[624,4]]},2309,{"position":[[624,4]]},2330,{"position":[[624,4]]},4400,{"position":[[624,4]]},4469,{"position":[[100,4]]}]],["implement",[],[],[2,{"position":[[108,14]]},41,{"position":[[4,14]]},47,{"position":[[0,10]]},53,{"position":[[0,10]]},77,{"position":[[4,14]]},89,{"position":[[0,10]]},95,{"position":[[0,10]]},134,{"position":[[4,14]]},143,{"position":[[0,10]]},149,{"position":[[0,10]]},167,{"position":[[4,14]]},185,{"position":[[0,10]]},191,{"position":[[0,10]]},212,{"position":[[4,14]]},221,{"position":[[0,10]]},227,{"position":[[0,10]]},254,{"position":[[4,14]]},266,{"position":[[0,10]]},272,{"position":[[0,10]]},290,{"position":[[4,14]]},308,{"position":[[0,10]]},314,{"position":[[0,10]]},341,{"position":[[4,14]]},347,{"position":[[0,10]]},353,{"position":[[0,10]]},386,{"position":[[4,14]]},392,{"position":[[0,10]]},398,{"position":[[0,10]]},431,{"position":[[4,14]]},437,{"position":[[0,10]]},443,{"position":[[0,10]]},476,{"position":[[4,14]]},482,{"position":[[0,10]]},488,{"position":[[0,10]]},512,{"position":[[4,14]]},524,{"position":[[0,10]]},530,{"position":[[0,10]]},542,{"position":[[4,14]]},563,{"position":[[0,10]]},569,{"position":[[0,10]]},584,{"position":[[4,14]]},599,{"position":[[0,10]]},605,{"position":[[0,10]]},626,{"position":[[4,14]]},641,{"position":[[0,10]]},647,{"position":[[0,10]]},656,{"position":[[4,14]]},677,{"position":[[0,10]]},683,{"position":[[0,10]]},692,{"position":[[4,14]]},716,{"position":[[0,10]]},722,{"position":[[0,10]]},746,{"position":[[4,14]]},755,{"position":[[0,10]]},761,{"position":[[0,10]]},845,{"position":[[4,14]]},854,{"position":[[0,10]]},860,{"position":[[0,10]]},890,{"position":[[4,14]]},902,{"position":[[0,10]]},908,{"position":[[0,10]]},1160,{"position":[[15,14]]},1295,{"position":[[4,14]]},1304,{"position":[[0,10]]},1310,{"position":[[0,10]]},1454,{"position":[[40,16]]},1460,{"position":[[41,16]]},2765,{"position":[[496,11]]},2873,{"position":[[496,11]]},2936,{"position":[[496,11]]},3602,{"position":[[496,11]]},3908,{"position":[[496,11]]},4121,{"position":[[496,11]]},4220,{"position":[[338,10]]},4568,{"position":[[3,14]]},4622,{"position":[[3,14]]}]],["smart",[],[],[2,{"position":[[126,5],[980,5],[1165,5],[1290,5],[2638,5],[2840,5],[3800,5],[3905,5]]},1487,{"position":[[46,5]]},4220,{"position":[[390,5]]},4781,{"position":[[822,5]]}]],["contract",[4782,{"position":[[0,8]]}],[],[2,{"position":[[132,9],[986,10],[1171,8],[1296,10],[2644,8],[2846,9],[3556,8],[3780,10],[3806,9],[3911,10],[4032,8],[4105,8],[4133,8],[4297,8],[4318,8],[4389,8],[4398,8]]},1757,{"position":[[106,8]]},4220,{"position":[[396,8]]},4781,{"position":[[828,10]]},4835,{"position":[[21,8]]},4856,{"position":[[7,8]]},4907,{"position":[[36,8]]}]],["cardano",[],[],[2,{"position":[[146,7],[2630,7],[3431,8],[7417,7],[7790,7]]},1439,{"position":[[96,7]]}]],["written",[],[],[2,{"position":[[164,7]]},2327,{"position":[[27,7]]}]],["strict",[],[],[2,{"position":[[177,6],[820,6]]}]],["subset",[],[],[2,{"position":[[184,6]]},4220,{"position":[[79,6]]}]],["valid",[],[],[2,{"position":[[194,5],[338,5],[452,5],[3961,9],[4013,9]]},1880,{"position":[[10,9]]},4469,{"position":[[31,5]]},4472,{"position":[[66,5]]},4781,{"position":[[765,12]]},4895,{"position":[[42,9]]},4907,{"position":[[49,8]]}]],["python",[],[],[2,{"position":[[200,7],[344,6],[389,6],[458,7],[503,7],[703,7],[1080,6],[1340,7],[1534,6],[2787,6],[3069,6],[3820,6],[3985,6]]},1277,{"position":[[37,6]]},4220,{"position":[[95,6],[248,6]]},4469,{"position":[[69,6],[204,6]]},4676,{"position":[[272,7]]},4844,{"position":[[10,6]]}]],["gener",[2607,{"position":[[0,10]]},2622,{"position":[[0,10]]}],[],[2,{"position":[[212,7],[2903,7],[3253,9],[3511,8],[5977,10]]},2408,{"position":[[317,11],[363,11],[422,11],[473,11]]},2588,{"position":[[317,11],[363,11],[422,11],[473,11]]},2603,{"position":[[33,11]]},2615,{"position":[[45,11]]},2747,{"position":[[317,11],[363,11],[422,11],[473,11]]},4235,{"position":[[0,9]]},4856,{"position":[[45,8]]}]],["philosophi",[],[],[2,{"position":[[220,10]]}]],["project",[],[],[2,{"position":[[239,7],[6209,7],[6831,7],[7092,7]]}]],["write",[],[],[2,{"position":[[253,5],[972,7],[1155,7],[1282,7],[1318,5]]}]],["compil",[1869,{"position":[[0,8]]},1989,{"position":[[0,7]]},4839,{"position":[[0,7]]}],[],[2,{"position":[[261,8],[312,8],[1308,9],[2600,7],[2669,7],[3860,8],[4121,11],[4202,11],[4288,8],[4480,8],[4688,7],[5775,7]]},2273,{"position":[[19,9]]},4844,{"position":[[61,9]]},4853,{"position":[[24,10],[51,8]]}]],["ensur",[],[],[2,{"position":[[275,6],[812,7]]}]],["follow",[],[],[2,{"position":[[286,10],[1493,9],[2880,9]]}]],["program",[],[],[2,{"position":[[304,7],[351,7],[1329,7]]}]],["1",[],[],[2,{"position":[[327,2]]},1316,{"position":[[94,1]]},4220,{"position":[[57,4],[435,4]]},4643,{"position":[[133,2]]},4649,{"position":[[43,1]]},4652,{"position":[[28,1]]},4664,{"position":[[35,1]]},4667,{"position":[[37,1]]},4670,{"position":[[36,1]]},4709,{"position":[[94,1]]},4760,{"position":[[94,1]]}]],["2",[],[],[2,{"position":[[359,2]]},1316,{"position":[[106,1]]},4481,{"position":[[9,1]]},4709,{"position":[[106,1]]},4760,{"position":[[106,1]]}]],["output",[1791,{"position":[[0,7]]}],[],[2,{"position":[[366,6],[3469,6]]},1466,{"position":[[29,6]]},1547,{"position":[[53,7]]},1556,{"position":[[54,7]]},1565,{"position":[[52,6]]},1571,{"position":[[52,7]]},1580,{"position":[[52,7]]},1589,{"position":[[53,6]]},1595,{"position":[[44,7],[97,6],[141,6],[184,6],[249,6]]},1613,{"position":[[44,7]]},1757,{"position":[[53,6]]},4898,{"position":[[50,7]]},4901,{"position":[[71,7]]}]],["run",[],[],[2,{"position":[[373,7],[411,7],[1116,3],[1478,3],[3171,3],[4681,3]]},2765,{"position":[[870,4]]},2873,{"position":[[870,4]]},2936,{"position":[[870,4]]},3602,{"position":[[870,4]]},3908,{"position":[[870,4]]},4121,{"position":[[870,4]]}]],["same",[],[],[2,{"position":[[403,4]]}]],["chain",[],[],[2,{"position":[[425,6],[7587,5],[8110,7]]},1505,{"position":[[99,5],[138,5]]}]],["100",[],[],[2,{"position":[[447,4]]}]],["leverag",[],[],[2,{"position":[[466,8]]}]],["exist",[],[],[2,{"position":[[479,8]]},1082,{"position":[[506,6],[701,6]]},1985,{"position":[[39,6]]},2030,{"position":[[506,6],[701,6]]},2048,{"position":[[506,6],[701,6]]},2054,{"position":[[39,6]]},2126,{"position":[[506,6],[701,6]]},2144,{"position":[[506,6],[701,6]]},2225,{"position":[[39,6]]},2255,{"position":[[506,6],[701,6]]},2279,{"position":[[506,6],[701,6]]},2309,{"position":[[506,6],[701,6]]},2330,{"position":[[506,6],[701,6]]},4238,{"position":[[39,6]]},4394,{"position":[[39,6]]},4400,{"position":[[506,6],[701,6]]},4433,{"position":[[39,6]]}]],["tool",[],[],[2,{"position":[[488,4],[950,4],[1052,5],[1260,4]]},4208,{"position":[[9,5]]},4643,{"position":[[28,5]]}]],["stack",[],[],[2,{"position":[[493,5]]}]],["syntax",[],[],[2,{"position":[[511,6]]},926,{"position":[[55,6]]},941,{"position":[[55,6]]},965,{"position":[[55,6]]},986,{"position":[[55,6]]},1004,{"position":[[55,6]]},1025,{"position":[[55,6]]},1040,{"position":[[55,6]]},1061,{"position":[[55,6]]},1082,{"position":[[50,6]]},1100,{"position":[[55,6]]},1145,{"position":[[55,6]]},1163,{"position":[[55,6]]},1169,{"position":[[55,6]]},1184,{"position":[[55,6]]},1199,{"position":[[55,6]]},1214,{"position":[[55,6]]},1232,{"position":[[55,6]]},1247,{"position":[[55,6]]},1328,{"position":[[55,6]]},1355,{"position":[[55,6]]},1373,{"position":[[55,6]]},1388,{"position":[[55,6]]},1403,{"position":[[55,6]]},1424,{"position":[[55,6]]},2000,{"position":[[55,6]]},2015,{"position":[[55,6]]},2030,{"position":[[50,6]]},2048,{"position":[[50,6]]},2072,{"position":[[55,6]]},2126,{"position":[[50,6]]},2144,{"position":[[50,6]]},2177,{"position":[[55,6]]},2249,{"position":[[55,6]]},2255,{"position":[[50,6]]},2264,{"position":[[55,6]]},2279,{"position":[[50,6]]},2309,{"position":[[50,6]]},2330,{"position":[[50,6]]},4256,{"position":[[55,6]]},4400,{"position":[[50,6]]}]],["highlight",[],[],[2,{"position":[[518,13]]}]],["lint",[],[],[2,{"position":[[532,8]]}]],["debug",[],[],[2,{"position":[[541,10],[4624,9],[4648,9],[4751,9],[5832,9]]}]],["unit",[3885,{"position":[[0,4]]}],[],[2,{"position":[[552,4]]},3887,{"position":[[0,6]]}]],["test",[2460,{"position":[[0,4]]},2529,{"position":[[0,4]]},2661,{"position":[[0,4]]},2739,{"position":[[0,4]]},2757,{"position":[[0,5]]}],[],[2,{"position":[[557,8]]},2408,{"position":[[204,5]]},2414,{"position":[[721,5],[761,5],[1138,5]]},2444,{"position":[[721,5],[761,5],[1138,5]]},2459,{"position":[[8,5]]},2477,{"position":[[721,5],[761,5],[1138,5]]},2528,{"position":[[11,5]]},2588,{"position":[[204,5]]},2660,{"position":[[721,5],[761,5],[1138,5]]},2738,{"position":[[12,5]]},2747,{"position":[[204,5]]},2765,{"position":[[35,4],[63,4],[162,4],[189,4],[315,4],[360,4],[412,6],[1037,4],[1471,5],[1546,4]]},2873,{"position":[[35,4],[63,4],[162,4],[189,4],[315,4],[360,4],[412,6],[1037,4],[1471,5],[1546,4]]},2936,{"position":[[35,4],[63,4],[162,4],[189,4],[315,4],[360,4],[412,6],[1037,4],[1471,5],[1546,4]]},3602,{"position":[[35,4],[63,4],[162,4],[189,4],[315,4],[360,4],[412,6],[1037,4],[1471,5],[1546,4]]},3908,{"position":[[35,4],[63,4],[162,4],[189,4],[315,4],[360,4],[412,6],[1037,4],[1471,5],[1546,4]]},4121,{"position":[[35,4],[63,4],[162,4],[189,4],[315,4],[360,4],[412,6],[1037,4],[1471,5],[1546,4]]},4649,{"position":[[0,5]]}]],["properti",[],[],[2,{"position":[[566,9]]}]],["base",[],[],[2,{"position":[[576,5],[8005,6]]},1082,{"position":[[15,4]]},2030,{"position":[[15,4]]},2048,{"position":[[15,4]]},2126,{"position":[[15,4]]},2144,{"position":[[15,4]]},2255,{"position":[[15,4]]},2261,{"position":[[7,4]]},2279,{"position":[[15,4]]},2309,{"position":[[15,4]]},2330,{"position":[[15,4]]},2414,{"position":[[275,6]]},2444,{"position":[[275,6]]},2477,{"position":[[275,6]]},2510,{"position":[[31,6]]},2660,{"position":[[275,6]]},2765,{"position":[[627,4]]},2873,{"position":[[627,4]]},2936,{"position":[[627,4]]},3602,{"position":[[627,4]]},3908,{"position":[[627,4]]},4121,{"position":[[627,4]]},4220,{"position":[[29,5]]},4400,{"position":[[15,4]]}]],["testing](http",[],[],[2,{"position":[[582,15]]}]],["hypothesis.readthedocs.io",[],[],[2,{"position":[[598,28]]}]],["verification](http",[],[],[2,{"position":[[627,21]]}]],["github.com/marcoeilers/nagini",[],[],[2,{"position":[[649,30]]}]],["intuit",[],[],[2,{"position":[[682,10]]}]],["flexibl",[],[],[2,{"position":[[713,9]]}]],["imper",[],[],[2,{"position":[[723,11]]}]],["function",[],[],[2,{"position":[[735,11],[4023,8]]},26,{"position":[[190,9]]},83,{"position":[[8,8]]},119,{"position":[[190,9]]},173,{"position":[[190,9]]},197,{"position":[[190,9]]},260,{"position":[[190,9]]},296,{"position":[[190,9]]},326,{"position":[[190,9]]},371,{"position":[[190,9]]},422,{"position":[[190,9]]},467,{"position":[[190,9]]},518,{"position":[[8,8]]},548,{"position":[[190,9]]},590,{"position":[[190,9]]},632,{"position":[[190,9]]},662,{"position":[[190,9]]},698,{"position":[[190,9]]},728,{"position":[[36,8]]},731,{"position":[[190,9]]},830,{"position":[[190,9]]},896,{"position":[[8,8]]},1082,{"position":[[82,8],[118,8],[291,9],[383,8],[497,8]]},1277,{"position":[[49,9]]},1286,{"position":[[190,9]]},1880,{"position":[[20,8],[48,8]]},1985,{"position":[[30,8]]},2030,{"position":[[82,8],[118,8],[291,9],[383,8],[497,8]]},2048,{"position":[[82,8],[118,8],[291,9],[383,8],[497,8]]},2054,{"position":[[30,8]]},2126,{"position":[[82,8],[118,8],[291,9],[383,8],[497,8]]},2144,{"position":[[82,8],[118,8],[291,9],[383,8],[497,8]]},2225,{"position":[[30,8]]},2255,{"position":[[82,8],[118,8],[291,9],[383,8],[497,8]]},2279,{"position":[[82,8],[118,8],[291,9],[383,8],[497,8]]},2309,{"position":[[82,8],[118,8],[291,9],[383,8],[497,8]]},2330,{"position":[[82,8],[118,8],[291,9],[383,8],[497,8]]},4220,{"position":[[221,9]]},4238,{"position":[[30,8]]},4394,{"position":[[30,8]]},4400,{"position":[[82,8],[118,8],[291,9],[383,8],[497,8]]},4433,{"position":[[30,8]]},4469,{"position":[[42,9],[122,9]]},4673,{"position":[[40,8]]},4862,{"position":[[67,8]]},4880,{"position":[[67,8]]}]],["way",[],[],[2,{"position":[[751,3]]}]],["effici",[],[],[2,{"position":[[770,9]]},4568,{"position":[[118,10]]},4643,{"position":[[60,9]]}]],["secur",[],[],[2,{"position":[[782,7],[7705,9]]},4220,{"position":[[372,8]]}]],["static",[],[],[2,{"position":[[790,6]]},4220,{"position":[[172,11]]}]],["type",[60,{"position":[[0,4]]}],[],[2,{"position":[[797,4],[827,6]]},26,{"position":[[23,4],[110,5],[146,5],[162,6]]},29,{"position":[[4,4]]},35,{"position":[[4,5]]},41,{"position":[[37,4],[45,4]]},44,{"position":[[0,4]]},50,{"position":[[0,4]]},65,{"position":[[4,4]]},71,{"position":[[4,5]]},77,{"position":[[37,4],[45,4]]},86,{"position":[[0,4]]},92,{"position":[[0,4]]},119,{"position":[[23,4],[110,5],[146,5],[162,6]]},122,{"position":[[4,4]]},128,{"position":[[4,5]]},134,{"position":[[37,4],[45,4]]},140,{"position":[[0,4]]},146,{"position":[[0,4]]},155,{"position":[[40,5]]},161,{"position":[[4,5]]},167,{"position":[[37,4],[45,4]]},173,{"position":[[23,4],[110,5],[146,5],[162,6]]},176,{"position":[[4,4]]},182,{"position":[[0,4]]},188,{"position":[[0,4]]},197,{"position":[[23,4],[110,5],[146,5],[162,6]]},200,{"position":[[4,4]]},206,{"position":[[4,5]]},212,{"position":[[37,4],[45,4]]},218,{"position":[[0,4]]},224,{"position":[[0,4]]},242,{"position":[[4,4]]},248,{"position":[[4,5]]},254,{"position":[[37,4],[45,4]]},260,{"position":[[23,4],[110,5],[146,5],[162,6]]},263,{"position":[[0,4]]},269,{"position":[[0,4]]},284,{"position":[[4,5]]},290,{"position":[[37,4],[45,4]]},296,{"position":[[23,4],[110,5],[146,5],[162,6]]},299,{"position":[[4,4]]},305,{"position":[[0,4]]},311,{"position":[[0,4]]},326,{"position":[[23,4],[110,5],[146,5],[162,6]]},329,{"position":[[4,4]]},335,{"position":[[4,5]]},341,{"position":[[37,4],[45,4]]},344,{"position":[[0,4]]},350,{"position":[[0,4]]},359,{"position":[[12,4]]},371,{"position":[[23,4],[110,5],[146,5],[162,6]]},374,{"position":[[4,4]]},380,{"position":[[4,5]]},386,{"position":[[37,4],[45,4]]},389,{"position":[[0,4]]},395,{"position":[[0,4]]},413,{"position":[[4,5]]},422,{"position":[[23,4],[110,5],[146,5],[162,6]]},425,{"position":[[4,4]]},431,{"position":[[37,4],[45,4]]},434,{"position":[[0,4]]},440,{"position":[[0,4]]},458,{"position":[[4,5]]},467,{"position":[[23,4],[110,5],[146,5],[162,6]]},470,{"position":[[4,4]]},476,{"position":[[37,4],[45,4]]},479,{"position":[[0,4]]},485,{"position":[[0,4]]},500,{"position":[[4,4]]},506,{"position":[[4,5]]},512,{"position":[[37,4],[45,4]]},521,{"position":[[0,4]]},527,{"position":[[0,4]]},539,{"position":[[4,4]]},542,{"position":[[37,4],[45,4]]},548,{"position":[[23,4],[110,5],[146,5],[162,6]]},554,{"position":[[4,5]]},560,{"position":[[0,4]]},566,{"position":[[0,4]]},575,{"position":[[4,4]]},578,{"position":[[4,5]]},584,{"position":[[37,4],[45,4]]},590,{"position":[[23,4],[110,5],[146,5],[162,6]]},596,{"position":[[0,4]]},602,{"position":[[0,4]]},617,{"position":[[4,4]]},620,{"position":[[4,5]]},626,{"position":[[37,4],[45,4]]},632,{"position":[[23,4],[110,5],[146,5],[162,6]]},638,{"position":[[0,4]]},644,{"position":[[0,4]]},653,{"position":[[4,4]]},656,{"position":[[37,4],[45,4]]},662,{"position":[[23,4],[110,5],[146,5],[162,6]]},668,{"position":[[4,5]]},674,{"position":[[0,4]]},680,{"position":[[0,4]]},692,{"position":[[37,4],[45,4]]},698,{"position":[[23,4],[110,5],[146,5],[162,6]]},701,{"position":[[4,4]]},707,{"position":[[4,5]]},713,{"position":[[0,4]]},719,{"position":[[0,4]]},728,{"position":[[2,4]]},731,{"position":[[23,4],[110,5],[146,5],[162,6]]},734,{"position":[[4,4]]},740,{"position":[[4,5]]},746,{"position":[[37,4],[45,4]]},752,{"position":[[0,4]]},758,{"position":[[0,4]]},824,{"position":[[10,4]]},830,{"position":[[23,4],[110,5],[146,5],[162,6]]},833,{"position":[[4,4]]},839,{"position":[[4,5]]},845,{"position":[[37,4],[45,4]]},851,{"position":[[0,4]]},857,{"position":[[0,4]]},878,{"position":[[4,4]]},884,{"position":[[4,5]]},890,{"position":[[37,4],[45,4]]},899,{"position":[[0,4]]},905,{"position":[[0,4]]},1280,{"position":[[4,5]]},1286,{"position":[[23,4],[110,5],[146,5],[162,6]]},1289,{"position":[[4,4]]},1295,{"position":[[37,4],[45,4]]},1301,{"position":[[0,4]]},1307,{"position":[[0,4]]},1370,{"position":[[41,6]]},4220,{"position":[[14,4],[141,4],[291,4],[417,4]]},4235,{"position":[[14,5],[129,4],[197,4]]},4442,{"position":[[73,4]]},4676,{"position":[[87,4],[159,4],[194,4]]},4886,{"position":[[37,4]]},4889,{"position":[[37,4]]},4892,{"position":[[37,4]]}]],["infer",[],[],[2,{"position":[[802,9]]},4220,{"position":[[19,9],[131,5]]}]],["optim",[1992,{"position":[[0,8]]}],[],[2,{"position":[[838,9]]}]],["code",[],[],[2,{"position":[[848,4],[6013,4]]},1883,{"position":[[47,4]]},2765,{"position":[[68,4]]},2873,{"position":[[68,4]]},2936,{"position":[[68,4]]},3602,{"position":[[68,4]]},3908,{"position":[[68,4]]},4121,{"position":[[68,4]]},4472,{"position":[[72,4]]}]],["get",[],[],[2,{"position":[[854,7]]}]],["start",[],[],[2,{"position":[[862,7],[1356,5],[8073,7]]}]],["check",[],[],[2,{"position":[[870,5],[1180,5],[6106,5],[6400,5],[8132,5]]},26,{"position":[[94,8]]},119,{"position":[[94,8]]},173,{"position":[[94,8]]},197,{"position":[[94,8]]},260,{"position":[[94,8]]},296,{"position":[[94,8]]},326,{"position":[[94,8]]},371,{"position":[[94,8]]},422,{"position":[[94,8]]},467,{"position":[[94,8]]},548,{"position":[[94,8]]},590,{"position":[[94,8]]},632,{"position":[[94,8]]},662,{"position":[[94,8]]},698,{"position":[[94,8]]},731,{"position":[[94,8]]},830,{"position":[[94,8]]},1286,{"position":[[94,8]]},4220,{"position":[[296,9],[408,8]]},4442,{"position":[[11,5]]},4673,{"position":[[54,6]]},4676,{"position":[[0,6],[96,6]]}]],["out",[],[],[2,{"position":[[876,3],[1186,3],[6112,3],[6406,3],[8138,3]]}]],["book](http",[],[],[2,{"position":[[892,12],[1202,12]]}]],["book.opshin.dev",[],[],[2,{"position":[[905,16],[1215,16]]}]],["introduct",[],[],[2,{"position":[[929,12],[1239,12],[6424,12]]}]],["detail",[],[],[2,{"position":[[959,7],[1269,7],[6414,9]]},1316,{"position":[[456,8]]},4709,{"position":[[456,8]]},4760,{"position":[[456,8]]}]],["document",[],[],[2,{"position":[[1002,8],[5963,13]]},1316,{"position":[[438,13]]},4709,{"position":[[438,13]]},4760,{"position":[[438,13]]}]],["outlin",[],[],[2,{"position":[[1021,7]]}]],["basic",[],[],[2,{"position":[[1033,5]]}]],["usag",[],[],[2,{"position":[[1039,5],[3290,5]]},1112,{"position":[[75,6]]}]],["instal",[],[],[2,{"position":[[1059,12],[1072,7],[1137,7]]}]],["3.8",[],[],[2,{"position":[[1087,4]]}]],["3.9",[],[],[2,{"position":[[1092,4]]}]],["3.10",[],[],[2,{"position":[[1097,4]]}]],["3.11",[],[],[2,{"position":[[1105,5]]}]],["python3",[],[],[2,{"position":[[1122,7]]}]],["m",[],[],[2,{"position":[[1131,1]]}]],["pip",[],[],[2,{"position":[[1133,3]]}]],["content",[],[],[2,{"position":[[1371,7]]}]],["exampl",[],[],[2,{"position":[[1383,8]]},926,{"position":[[463,7]]},941,{"position":[[463,7]]},965,{"position":[[463,7]]},986,{"position":[[463,7]]},1004,{"position":[[463,7]]},1025,{"position":[[463,7]]},1040,{"position":[[463,7]]},1061,{"position":[[463,7]]},1100,{"position":[[463,7]]},1145,{"position":[[463,7]]},1163,{"position":[[463,7]]},1169,{"position":[[463,7]]},1184,{"position":[[463,7]]},1199,{"position":[[463,7]]},1214,{"position":[[463,7]]},1232,{"position":[[463,7]]},1247,{"position":[[463,7]]},1316,{"position":[[41,7]]},1328,{"position":[[463,7]]},1355,{"position":[[463,7]]},1373,{"position":[[463,7]]},1388,{"position":[[463,7]]},1403,{"position":[[463,7]]},1424,{"position":[[463,7]]},1445,{"position":[[95,7]]},1454,{"position":[[119,7]]},1460,{"position":[[121,7]]},1478,{"position":[[62,7]]},1487,{"position":[[61,7]]},2000,{"position":[[463,7]]},2015,{"position":[[463,7]]},2072,{"position":[[463,7]]},2177,{"position":[[463,7]]},2249,{"position":[[463,7]]},2264,{"position":[[463,7]]},4256,{"position":[[463,7]]},4709,{"position":[[41,7]]},4760,{"position":[[41,7]]},4862,{"position":[[76,7]]},4880,{"position":[[76,7]]}]],["argument",[],[],[2,{"position":[[1394,9]]},38,{"position":[[73,8]]},41,{"position":[[108,8]]},74,{"position":[[73,8]]},77,{"position":[[108,8]]},131,{"position":[[73,8]]},134,{"position":[[108,8]]},164,{"position":[[72,8]]},167,{"position":[[108,8]]},209,{"position":[[73,8]]},212,{"position":[[108,8]]},251,{"position":[[72,8]]},254,{"position":[[108,8]]},287,{"position":[[73,8]]},290,{"position":[[108,8]]},338,{"position":[[73,8]]},341,{"position":[[108,8]]},383,{"position":[[73,8]]},386,{"position":[[108,8]]},416,{"position":[[73,8]]},431,{"position":[[108,8]]},461,{"position":[[73,8]]},476,{"position":[[108,8]]},509,{"position":[[73,8]]},512,{"position":[[108,8]]},542,{"position":[[108,8]]},557,{"position":[[73,8]]},581,{"position":[[73,8]]},584,{"position":[[108,8]]},623,{"position":[[73,8]]},626,{"position":[[108,8]]},656,{"position":[[108,8]]},671,{"position":[[73,8]]},692,{"position":[[108,8]]},710,{"position":[[73,8]]},743,{"position":[[73,8]]},746,{"position":[[108,8]]},842,{"position":[[73,8]]},845,{"position":[[108,8]]},887,{"position":[[73,8]]},890,{"position":[[108,8]]},1283,{"position":[[73,8]]},1295,{"position":[[108,8]]},1370,{"position":[[14,8]]},2414,{"position":[[36,9],[157,9]]},2444,{"position":[[36,9],[157,9]]},2450,{"position":[[29,9]]},2477,{"position":[[36,9],[157,9]]},2660,{"position":[[36,9],[157,9]]},2765,{"position":[[289,9]]},2873,{"position":[[289,9]]},2936,{"position":[[289,9]]},3602,{"position":[[289,9]]},3908,{"position":[[289,9]]},4121,{"position":[[289,9]]},4847,{"position":[[202,9]]}]],["script",[],[],[2,{"position":[[1407,7],[1524,6],[2608,6],[3971,6],[4489,7],[4696,6],[4731,6],[5783,6]]},1439,{"position":[[177,6]]},1556,{"position":[[26,6]]},1589,{"position":[[27,6]]},1595,{"position":[[221,6]]},1748,{"position":[[0,6]]},1757,{"position":[[0,6]]},1784,{"position":[[80,7],[131,6]]},1826,{"position":[[84,7]]},1880,{"position":[[68,6]]},4853,{"position":[[17,6],[60,6]]},4910,{"position":[[22,6]]}]],["pass",[],[],[2,{"position":[[1419,6]]},1442,{"position":[[76,6]]},1880,{"position":[[152,6]]},2414,{"position":[[1312,4]]},2444,{"position":[[1312,4]]},2477,{"position":[[1312,4]]},2555,{"position":[[0,4]]},2660,{"position":[[1312,4]]},2765,{"position":[[1290,7]]},2873,{"position":[[1290,7]]},2936,{"position":[[1290,7]]},3602,{"position":[[1290,7]]},3908,{"position":[[1290,7]]},4121,{"position":[[1290,7]]},4847,{"position":[[218,6]]}]],["plutu",[],[],[2,{"position":[[1432,6]]},1439,{"position":[[196,6]]},1595,{"position":[[4,6]]},1613,{"position":[[4,6]]},4847,{"position":[[71,6]]},4850,{"position":[[73,6]]},4853,{"position":[[10,6]]}]],["data",[1815,{"position":[[0,4]]}],[],[2,{"position":[[1439,4],[7593,4]]},1439,{"position":[[119,5]]}]],["object",[],[],[2,{"position":[[1444,7]]},23,{"position":[[37,6]]},38,{"position":[[86,6]]},41,{"position":[[121,6]]},74,{"position":[[86,6]]},77,{"position":[[121,6]]},80,{"position":[[37,6]]},83,{"position":[[67,6]]},131,{"position":[[86,6]]},134,{"position":[[121,6]]},137,{"position":[[37,6]]},164,{"position":[[85,6]]},167,{"position":[[121,6]]},170,{"position":[[37,6]]},209,{"position":[[86,6]]},212,{"position":[[121,6]]},215,{"position":[[37,6]]},251,{"position":[[85,6]]},254,{"position":[[121,6]]},257,{"position":[[37,6]]},287,{"position":[[86,6]]},290,{"position":[[121,6]]},293,{"position":[[37,6]]},323,{"position":[[37,6]]},338,{"position":[[86,6]]},341,{"position":[[121,6]]},368,{"position":[[37,6]]},383,{"position":[[86,6]]},386,{"position":[[121,6]]},416,{"position":[[86,6]]},419,{"position":[[37,6]]},431,{"position":[[121,6]]},461,{"position":[[86,6]]},464,{"position":[[37,6]]},476,{"position":[[121,6]]},509,{"position":[[86,6]]},512,{"position":[[121,6]]},515,{"position":[[37,6]]},518,{"position":[[67,6]]},542,{"position":[[121,6]]},545,{"position":[[37,6]]},557,{"position":[[86,6]]},581,{"position":[[86,6]]},584,{"position":[[121,6]]},587,{"position":[[37,6]]},623,{"position":[[86,6]]},626,{"position":[[121,6]]},629,{"position":[[37,6]]},656,{"position":[[121,6]]},659,{"position":[[37,6]]},671,{"position":[[86,6]]},692,{"position":[[121,6]]},695,{"position":[[37,6]]},710,{"position":[[86,6]]},743,{"position":[[86,6]]},746,{"position":[[121,6]]},749,{"position":[[37,6]]},842,{"position":[[86,6]]},845,{"position":[[121,6]]},848,{"position":[[37,6]]},887,{"position":[[86,6]]},890,{"position":[[121,6]]},893,{"position":[[37,6]]},896,{"position":[[67,6]]},1283,{"position":[[86,6]]},1295,{"position":[[121,6]]},1298,{"position":[[37,6]]},1505,{"position":[[244,7]]},2765,{"position":[[1194,7]]},2873,{"position":[[1194,7]]},2936,{"position":[[1194,7]]},3602,{"position":[[1194,7]]},3908,{"position":[[1194,7]]},4121,{"position":[[1194,7]]},4235,{"position":[[29,7]]},4673,{"position":[[90,8]]},4676,{"position":[[38,7],[73,6]]}]],["json",[],[],[2,{"position":[[1455,4]]},4847,{"position":[[39,4]]},4850,{"position":[[41,4]]}]],["notat",[],[],[2,{"position":[[1460,9]]},4568,{"position":[[82,8]]}]],["command",[],[],[2,{"position":[[1503,8]]}]],["evalu",[],[],[2,{"position":[[1515,8],[3896,8],[4718,8]]},2411,{"position":[[41,9]]},2492,{"position":[[41,9]]},2561,{"position":[[41,9]]},2579,{"position":[[41,9]]},2585,{"position":[[41,9]]},2600,{"position":[[41,9]]},2612,{"position":[[41,9]]},2627,{"position":[[41,9]]},2642,{"position":[[41,9]]},2651,{"position":[[41,9]]},2657,{"position":[[41,9]]},2684,{"position":[[41,9]]},2696,{"position":[[41,9]]},2705,{"position":[[41,9]]},2714,{"position":[[41,9]]},2723,{"position":[[41,9]]},2735,{"position":[[41,9]]},2756,{"position":[[41,9]]}]],["us",[],[],[2,{"position":[[1555,4],[3545,5]]},926,{"position":[[144,3],[1075,3]]},941,{"position":[[144,3],[1075,3]]},965,{"position":[[144,3],[1075,3]]},986,{"position":[[144,3],[1075,3]]},1004,{"position":[[144,3],[1075,3]]},1025,{"position":[[144,3],[1075,3]]},1040,{"position":[[144,3],[1075,3]]},1061,{"position":[[144,3],[1075,3]]},1082,{"position":[[576,4],[596,3]]},1100,{"position":[[144,3],[1075,3]]},1145,{"position":[[144,3],[1075,3]]},1163,{"position":[[144,3],[1075,3]]},1169,{"position":[[144,3],[1075,3]]},1184,{"position":[[144,3],[1075,3]]},1199,{"position":[[144,3],[1075,3]]},1214,{"position":[[144,3],[1075,3]]},1232,{"position":[[144,3],[1075,3]]},1247,{"position":[[144,3],[1075,3]]},1328,{"position":[[144,3],[1075,3]]},1355,{"position":[[144,3],[1075,3]]},1373,{"position":[[144,3],[1075,3]]},1388,{"position":[[144,3],[1075,3]]},1403,{"position":[[144,3],[1075,3]]},1424,{"position":[[144,3],[1075,3]]},1439,{"position":[[84,4]]},1454,{"position":[[68,4]]},1460,{"position":[[69,4]]},1691,{"position":[[30,4]]},1697,{"position":[[19,4]]},1706,{"position":[[21,4]]},2000,{"position":[[144,3],[1075,3]]},2015,{"position":[[144,3],[1075,3]]},2030,{"position":[[576,4],[596,3]]},2048,{"position":[[576,4],[596,3]]},2072,{"position":[[144,3],[1075,3]]},2126,{"position":[[576,4],[596,3]]},2144,{"position":[[576,4],[596,3]]},2177,{"position":[[144,3],[1075,3]]},2249,{"position":[[144,3],[1075,3]]},2255,{"position":[[576,4],[596,3]]},2264,{"position":[[144,3],[1075,3]]},2279,{"position":[[576,4],[596,3]]},2300,{"position":[[72,4]]},2309,{"position":[[576,4],[596,3]]},2330,{"position":[[576,4],[596,3]]},2765,{"position":[[148,4],[1202,4],[1380,5],[1532,3]]},2873,{"position":[[148,4],[1202,4],[1380,5],[1532,3]]},2936,{"position":[[148,4],[1202,4],[1380,5],[1532,3]]},3602,{"position":[[148,4],[1202,4],[1380,5],[1532,3]]},3908,{"position":[[148,4],[1202,4],[1380,5],[1532,3]]},4121,{"position":[[148,4],[1202,4],[1380,5],[1532,3]]},4220,{"position":[[184,5]]},4256,{"position":[[144,3],[1075,3]]},4400,{"position":[[576,4],[596,3]]},4511,{"position":[[19,5]]},4529,{"position":[[18,5]]},4532,{"position":[[18,5]]},4535,{"position":[[18,5]]},4553,{"position":[[21,5]]},4556,{"position":[[21,5]]},4568,{"position":[[211,5]]},4862,{"position":[[16,4]]},4880,{"position":[[16,4]]}]],["make",[],[],[2,{"position":[[1563,4]]}]],["sure",[],[],[2,{"position":[[1568,4]]}]],["obviou",[],[],[2,{"position":[[1586,7]]}]],["error",[],[],[2,{"position":[[1594,6]]},2765,{"position":[[1117,10]]},2873,{"position":[[1117,10]]},2936,{"position":[[1117,10]]},3602,{"position":[[1117,10]]},3908,{"position":[[1117,10]]},4121,{"position":[[1117,10]]}]],["eval",[],[],[2,{"position":[[1608,4],[2956,4],[3020,4],[3183,4]]}]],["spend",[1755,{"position":[[0,8]]},4761,{"position":[[0,8]]}],[],[2,{"position":[[1613,8],[2677,8],[3578,8],[4788,8],[5873,8]]},4895,{"position":[[23,8]]},4910,{"position":[[13,8]]}]],["examples/smart_contracts/assert_sum.pi",[],[],[2,{"position":[[1622,38],[2686,38],[3587,38],[4797,38],[5882,38]]}]],["int",[],[],[2,{"position":[[1661,10],[1676,10],[4836,10],[4851,10]]},101,{"position":[[47,4]]},1667,{"position":[[54,4]]},2408,{"position":[[676,3]]},2414,{"position":[[539,3],[1223,4]]},2444,{"position":[[539,3],[1223,4]]},2477,{"position":[[539,3],[1223,4]]},2516,{"position":[[53,3]]},2588,{"position":[[676,3]]},2630,{"position":[[27,3]]},2660,{"position":[[539,3],[1223,4]]},2747,{"position":[[676,3]]},2915,{"position":[[7,4]]},2924,{"position":[[10,4],[20,4]]},4571,{"position":[[20,4],[38,4]]},4781,{"position":[[136,4],[342,4],[546,4]]}]],["4",[],[],[2,{"position":[[1672,3],[4847,3]]}]],["38",[],[],[2,{"position":[[1687,4],[4862,4]]}]],["d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[],[],[2,{"position":[[1692,906],[4867,906]]}]],["uplc",[],[],[2,{"position":[[2618,7],[4706,7],[4741,4]]},4208,{"position":[[23,4]]},4220,{"position":[[260,4]]},4472,{"position":[[45,4]]}]],["assembl",[],[],[2,{"position":[[2653,8]]}]],["furthermor",[],[],[2,{"position":[[2727,12]]}]],["add",[],[],[2,{"position":[[2748,3]]},4469,{"position":[[149,3]]},4475,{"position":[[0,4]]}]],["shebang",[],[],[2,{"position":[[2754,7],[2911,8]]}]],["first",[],[],[2,{"position":[[2769,5]]},38,{"position":[[67,5]]},41,{"position":[[102,5]]},74,{"position":[[67,5]]},77,{"position":[[102,5]]},131,{"position":[[67,5]]},134,{"position":[[102,5]]},164,{"position":[[66,5]]},167,{"position":[[102,5]]},209,{"position":[[67,5]]},212,{"position":[[102,5]]},251,{"position":[[66,5]]},254,{"position":[[102,5]]},287,{"position":[[67,5]]},290,{"position":[[102,5]]},338,{"position":[[67,5]]},341,{"position":[[102,5]]},383,{"position":[[67,5]]},386,{"position":[[102,5]]},416,{"position":[[67,5]]},431,{"position":[[102,5]]},461,{"position":[[67,5]]},476,{"position":[[102,5]]},509,{"position":[[67,5]]},512,{"position":[[102,5]]},542,{"position":[[102,5]]},557,{"position":[[67,5]]},581,{"position":[[67,5]]},584,{"position":[[102,5]]},623,{"position":[[67,5]]},626,{"position":[[102,5]]},656,{"position":[[102,5]]},671,{"position":[[67,5]]},692,{"position":[[102,5]]},710,{"position":[[67,5]]},743,{"position":[[67,5]]},746,{"position":[[102,5]]},842,{"position":[[67,5]]},845,{"position":[[102,5]]},887,{"position":[[67,5]]},890,{"position":[[102,5]]},926,{"position":[[886,6]]},941,{"position":[[886,6]]},965,{"position":[[886,6]]},986,{"position":[[886,6]]},1004,{"position":[[886,6]]},1025,{"position":[[886,6]]},1040,{"position":[[886,6]]},1061,{"position":[[886,6]]},1100,{"position":[[886,6]]},1145,{"position":[[886,6]]},1163,{"position":[[886,6]]},1169,{"position":[[886,6]]},1184,{"position":[[886,6]]},1199,{"position":[[886,6]]},1214,{"position":[[886,6]]},1232,{"position":[[886,6]]},1247,{"position":[[886,6]]},1283,{"position":[[67,5]]},1295,{"position":[[102,5]]},1328,{"position":[[886,6]]},1355,{"position":[[886,6]]},1373,{"position":[[886,6]]},1388,{"position":[[886,6]]},1403,{"position":[[886,6]]},1424,{"position":[[886,6]]},2000,{"position":[[886,6]]},2015,{"position":[[886,6]]},2072,{"position":[[886,6]]},2177,{"position":[[886,6]]},2249,{"position":[[886,6]]},2264,{"position":[[886,6]]},4256,{"position":[[886,6]]},4484,{"position":[[7,5]]},4487,{"position":[[12,5]]},4490,{"position":[[13,5]]},4493,{"position":[[11,5]]}]],["line",[],[],[2,{"position":[[2775,4]]}]],["file",[],[],[2,{"position":[[2794,4],[3076,4],[3992,4]]},1439,{"position":[[213,4]]},4469,{"position":[[211,5]]},4856,{"position":[[23,4]]}]],["indic",[],[],[2,{"position":[[2802,8]]},1496,{"position":[[0,9]]},1505,{"position":[[0,9]]},1520,{"position":[[0,9]]},1526,{"position":[[0,9]]},1547,{"position":[[0,9]]},1556,{"position":[[0,9]]},1565,{"position":[[0,9]]},1571,{"position":[[0,9]]},1580,{"position":[[0,9]]},1589,{"position":[[0,9]]},1691,{"position":[[38,8]]},1697,{"position":[[27,8]]},1706,{"position":[[29,8]]},1748,{"position":[[15,10]]},1757,{"position":[[15,10]]},4511,{"position":[[31,7]]}]],["repres",[],[],[2,{"position":[[2819,10],[2937,10]]},359,{"position":[[17,12]]},1454,{"position":[[13,10]]},1460,{"position":[[13,10]]},4508,{"position":[[16,11]]},4847,{"position":[[24,12],[264,12]]},4850,{"position":[[26,12]]},4868,{"position":[[9,11]]}]],["choos",[],[],[2,{"position":[[2864,6]]}]],["option",[],[],[2,{"position":[[2890,8]]}]],["more",[],[],[2,{"position":[[2972,4],[6481,4]]}]],["specif",[],[],[2,{"position":[[2977,8]]},4235,{"position":[[188,8]]}]],["purpos",[1830,{"position":[[0,7]]},4758,{"position":[[0,7]]},4794,{"position":[[0,7]]}],[],[2,{"position":[[2986,8],[4658,9],[4761,9],[5842,9]]},1748,{"position":[[7,7]]},1757,{"position":[[7,7]]},4781,{"position":[[668,8]]}]],["usr/bin/env",[],[],[2,{"position":[[2996,13]]}]],["s",[],[],[2,{"position":[[3011,1]]}]],["mint",[1746,{"position":[[0,7]]},1797,{"position":[[0,4]]},4764,{"position":[[0,7]]}],[],[2,{"position":[[3025,7]]},1748,{"position":[[60,6]]},1880,{"position":[[60,7]]}]],["do",[],[],[2,{"position":[[3036,5]]}]],["transform",[],[],[2,{"position":[[3054,9]]},926,{"position":[[471,11],[798,9],[1083,11]]},941,{"position":[[471,11],[798,9],[1083,11]]},965,{"position":[[471,11],[798,9],[1083,11]]},986,{"position":[[471,11],[798,9],[1083,11]]},1004,{"position":[[471,11],[798,9],[1083,11]]},1025,{"position":[[471,11],[798,9],[1083,11]]},1040,{"position":[[471,11],[798,9],[1083,11]]},1061,{"position":[[471,11],[798,9],[1083,11]]},1100,{"position":[[471,11],[798,9],[1083,11]]},1145,{"position":[[471,11],[798,9],[1083,11]]},1163,{"position":[[471,11],[798,9],[1083,11]]},1169,{"position":[[471,11],[798,9],[1083,11]]},1184,{"position":[[471,11],[798,9],[1083,11]]},1199,{"position":[[471,11],[798,9],[1083,11]]},1214,{"position":[[471,11],[798,9],[1083,11]]},1232,{"position":[[471,11],[798,9],[1083,11]]},1247,{"position":[[471,11],[798,9],[1083,11]]},1328,{"position":[[471,11],[798,9],[1083,11]]},1355,{"position":[[471,11],[798,9],[1083,11]]},1373,{"position":[[471,11],[798,9],[1083,11]]},1388,{"position":[[471,11],[798,9],[1083,11]]},1403,{"position":[[471,11],[798,9],[1083,11]]},1424,{"position":[[471,11],[798,9],[1083,11]]},2000,{"position":[[471,11],[798,9],[1083,11]]},2015,{"position":[[471,11],[798,9],[1083,11]]},2072,{"position":[[471,11],[798,9],[1083,11]]},2177,{"position":[[471,11],[798,9],[1083,11]]},2249,{"position":[[471,11],[798,9],[1083,11]]},2264,{"position":[[471,11],[798,9],[1083,11]]},2273,{"position":[[34,11]]},4256,{"position":[[471,11],[798,9],[1083,11]]}]],["execut",[],[],[2,{"position":[[3087,11],[3126,7]]},1691,{"position":[[84,9]]},1697,{"position":[[81,9]]},1706,{"position":[[75,9]]},1712,{"position":[[20,9]]},1724,{"position":[[20,9]]},1736,{"position":[[44,8]]},1784,{"position":[[71,8]]},2765,{"position":[[351,8],[1563,9]]},2873,{"position":[[351,8],[1563,9]]},2936,{"position":[[351,8],[1563,9]]},3602,{"position":[[351,8],[1563,9]]},3908,{"position":[[351,8],[1563,9]]},4121,{"position":[[351,8],[1563,9]]}]],["chmod",[],[],[2,{"position":[[3100,5]]}]],["x",[],[],[2,{"position":[[3106,2]]},1880,{"position":[[116,1],[170,1]]},4499,{"position":[[8,1]]},4502,{"position":[[8,1]]},4520,{"position":[[8,1]]},4523,{"position":[[8,1]]},4526,{"position":[[8,1]]},4550,{"position":[[8,1]]},4559,{"position":[[35,1]]}]],["your_file.pi",[],[],[2,{"position":[[3109,12],[3143,14],[3192,14]]}]],["under",[],[],[2,{"position":[[3207,5]]}]],["hood",[],[],[2,{"position":[[3217,5]]}]],["deploy",[],[],[2,{"position":[[3224,9],[3238,6]]}]],["process",[],[],[2,{"position":[[3245,7]]}]],["artifact",[],[],[2,{"position":[[3267,9],[3524,9],[4214,9],[4458,9]]},4844,{"position":[[46,9]]},4856,{"position":[[58,9]]}]],["requir",[],[],[2,{"position":[[3277,8]]},2765,{"position":[[1480,9]]},2873,{"position":[[1480,9]]},2936,{"position":[[1480,9]]},3602,{"position":[[1480,9]]},3908,{"position":[[1480,9]]},4121,{"position":[[1480,9]]},4472,{"position":[[132,8]]}]],["common",[],[],[2,{"position":[[3301,6]]},2261,{"position":[[0,6]]}]],["librari",[],[],[2,{"position":[[3308,9]]},1838,{"position":[[2,7]]},4469,{"position":[[6,7],[84,8]]},4643,{"position":[[11,7]]}]],["pycardano](http",[],[],[2,{"position":[[3323,18]]}]],["github.com/python",[],[],[2,{"position":[[3342,17]]}]],["cardano/pycardano",[],[],[2,{"position":[[3360,19]]}]],["lucid](http",[],[],[2,{"position":[[3380,14]]}]],["github.com/spacebudz/lucid",[],[],[2,{"position":[[3395,27]]}]],["cli](http",[],[],[2,{"position":[[3440,11]]}]],["github.com/input",[],[],[2,{"position":[[3452,16]]}]],["hk/cardano",[],[],[2,{"position":[[3476,10]]}]],["node",[2238,{"position":[[0,4]]}],[],[2,{"position":[[3487,6]]},926,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},935,{"position":[[8,5]]},941,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},959,{"position":[[8,5]]},965,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},980,{"position":[[8,5]]},986,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},998,{"position":[[8,5]]},1004,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1019,{"position":[[8,5]]},1025,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1034,{"position":[[8,5]]},1040,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1055,{"position":[[8,5]]},1061,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1076,{"position":[[8,5]]},1082,{"position":[[2,4],[101,4],[309,5],[349,5],[372,4],[519,4],[649,5]]},1097,{"position":[[8,5]]},1100,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1142,{"position":[[8,5]]},1145,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1163,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1166,{"position":[[8,5]]},1169,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1178,{"position":[[8,5]]},1184,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1193,{"position":[[8,5]]},1199,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1208,{"position":[[8,5]]},1214,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1226,{"position":[[8,5]]},1232,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1241,{"position":[[8,5]]},1247,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1271,{"position":[[8,5]]},1328,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1340,{"position":[[8,5]]},1355,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1364,{"position":[[8,5]]},1373,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1382,{"position":[[8,5]]},1388,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1397,{"position":[[8,5]]},1403,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1418,{"position":[[8,5]]},1424,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},1436,{"position":[[8,5]]},1439,{"position":[[104,4]]},1442,{"position":[[90,5]]},1985,{"position":[[52,5]]},1988,{"position":[[8,5]]},2000,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},2009,{"position":[[8,5]]},2015,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},2024,{"position":[[8,5]]},2030,{"position":[[2,4],[101,4],[309,5],[349,5],[372,4],[519,4],[649,5]]},2045,{"position":[[8,5]]},2048,{"position":[[2,4],[101,4],[309,5],[349,5],[372,4],[519,4],[649,5]]},2054,{"position":[[52,5]]},2069,{"position":[[8,5]]},2072,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},2120,{"position":[[8,5]]},2126,{"position":[[2,4],[101,4],[309,5],[349,5],[372,4],[519,4],[649,5]]},2141,{"position":[[8,5]]},2144,{"position":[[2,4],[101,4],[309,5],[349,5],[372,4],[519,4],[649,5]]},2174,{"position":[[8,5]]},2177,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},2225,{"position":[[52,5]]},2228,{"position":[[8,5]]},2234,{"position":[[121,5]]},2249,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},2252,{"position":[[8,5]]},2255,{"position":[[2,4],[101,4],[309,5],[349,5],[372,4],[519,4],[649,5]]},2258,{"position":[[8,5]]},2264,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},2270,{"position":[[8,5]]},2273,{"position":[[29,4]]},2276,{"position":[[8,5]]},2279,{"position":[[2,4],[101,4],[309,5],[349,5],[372,4],[519,4],[649,5]]},2285,{"position":[[8,5]]},2309,{"position":[[2,4],[101,4],[309,5],[349,5],[372,4],[519,4],[649,5]]},2324,{"position":[[8,5]]},2327,{"position":[[46,4]]},2330,{"position":[[2,4],[101,4],[309,5],[349,5],[372,4],[519,4],[649,5]]},2348,{"position":[[8,5]]},2351,{"position":[[43,4]]},4238,{"position":[[52,5]]},4250,{"position":[[8,5]]},4256,{"position":[[94,6],[217,5],[280,4],[405,4],[611,6],[741,4],[776,5],[818,5],[881,4],[897,5],[979,7],[1025,5],[1057,5],[1105,4]]},4394,{"position":[[52,5]]},4397,{"position":[[8,5]]},4400,{"position":[[2,4],[101,4],[309,5],[349,5],[372,4],[519,4],[649,5]]},4433,{"position":[[52,5]]},4463,{"position":[[8,5]]}]],["automat",[],[],[2,{"position":[[3497,13]]},2765,{"position":[[815,13]]},2873,{"position":[[815,13]]},2936,{"position":[[815,13]]},3602,{"position":[[815,13]]},3908,{"position":[[815,13]]},4121,{"position":[[815,13]]}]],["need",[],[],[2,{"position":[[3534,6]]},38,{"position":[[30,5]]},74,{"position":[[30,5]]},131,{"position":[[30,5]]},164,{"position":[[30,4]]},209,{"position":[[30,5]]},251,{"position":[[30,4]]},287,{"position":[[30,5]]},338,{"position":[[30,5]]},383,{"position":[[30,5]]},416,{"position":[[30,5]]},461,{"position":[[30,5]]},509,{"position":[[30,5]]},557,{"position":[[30,5]]},581,{"position":[[30,5]]},623,{"position":[[30,5]]},671,{"position":[[30,5]]},710,{"position":[[30,5]]},743,{"position":[[30,5]]},842,{"position":[[30,5]]},887,{"position":[[30,5]]},1277,{"position":[[64,4]]},1283,{"position":[[30,5]]},2234,{"position":[[143,5]]},2765,{"position":[[209,7]]},2873,{"position":[[209,7]]},2936,{"position":[[209,7]]},3602,{"position":[[209,7]]},3908,{"position":[[209,7]]},4121,{"position":[[209,7]]}]],["see",[],[],[2,{"position":[[3628,3]]},1316,{"position":[[430,3]]},4709,{"position":[[430,3]]},4760,{"position":[[430,3]]}]],["tutori",[],[],[2,{"position":[[3636,9]]}]],["pycardano",[],[],[2,{"position":[[3650,9]]}]],["http",[],[],[2,{"position":[[3660,8],[8148,6]]},4220,{"position":[[440,6]]},4847,{"position":[[121,6]]}]],["pycardano.readthedocs.io/en/latest/guides/plutus.html",[],[],[2,{"position":[[3669,54]]}]],["explan",[],[],[2,{"position":[[3728,12]]}]],["transact",[],[],[2,{"position":[[3754,12]]},1445,{"position":[[2,11],[46,11],[76,11]]},1466,{"position":[[17,11]]},1595,{"position":[[32,11]]},1613,{"position":[[32,11],[76,12]]},1691,{"position":[[102,11]]},1697,{"position":[[99,11]]},1706,{"position":[[93,11]]},1712,{"position":[[38,11]]},1724,{"position":[[38,11]]},1736,{"position":[[25,11]]},1757,{"position":[[41,11]]},1784,{"position":[[102,11]]},1826,{"position":[[32,11]]},4898,{"position":[[38,11]]},4901,{"position":[[59,11]]},4913,{"position":[[69,11]]}]],["api",[],[],[2,{"position":[[3792,3],[3853,3]]},1442,{"position":[[20,4]]}]],["interfac",[],[],[2,{"position":[[3827,9]]}]],["offer",[],[],[2,{"position":[[3837,6]]}]],["simpl",[],[],[2,{"position":[[3846,6]]},2414,{"position":[[543,7]]},2444,{"position":[[543,7]]},2477,{"position":[[543,7]]},2516,{"position":[[57,7]]},2660,{"position":[[543,7]]}]],["load",[4854,{"position":[[0,4]]}],[],[2,{"position":[[3869,5],[4281,4],[4379,7]]},4856,{"position":[[0,4]]}]],["appli",[],[],[2,{"position":[[3875,5],[4081,5],[4356,5]]},926,{"position":[[954,7]]},941,{"position":[[954,7]]},965,{"position":[[954,7]]},986,{"position":[[954,7]]},1004,{"position":[[954,7]]},1025,{"position":[[954,7]]},1040,{"position":[[954,7]]},1061,{"position":[[954,7]]},1082,{"position":[[632,5]]},1100,{"position":[[954,7]]},1145,{"position":[[954,7]]},1163,{"position":[[954,7]]},1169,{"position":[[954,7]]},1184,{"position":[[954,7]]},1199,{"position":[[954,7]]},1214,{"position":[[954,7]]},1232,{"position":[[954,7]]},1247,{"position":[[954,7]]},1328,{"position":[[954,7]]},1355,{"position":[[954,7]]},1373,{"position":[[954,7]]},1388,{"position":[[954,7]]},1403,{"position":[[954,7]]},1424,{"position":[[954,7]]},2000,{"position":[[954,7]]},2015,{"position":[[954,7]]},2030,{"position":[[632,5]]},2048,{"position":[[632,5]]},2072,{"position":[[954,7]]},2126,{"position":[[632,5]]},2144,{"position":[[632,5]]},2177,{"position":[[954,7]]},2249,{"position":[[954,7]]},2255,{"position":[[632,5]]},2264,{"position":[[954,7]]},2279,{"position":[[632,5]]},2309,{"position":[[632,5]]},2330,{"position":[[632,5]]},4256,{"position":[[954,7]]},4400,{"position":[[632,5]]},4835,{"position":[[39,7]]},4853,{"position":[[72,8]]}]],["paramet",[],[],[2,{"position":[[3881,10],[4087,10],[4362,10]]},23,{"position":[[58,9]]},80,{"position":[[58,9]]},137,{"position":[[58,9]]},170,{"position":[[58,9]]},215,{"position":[[58,9]]},293,{"position":[[58,9]]},323,{"position":[[58,9]]},368,{"position":[[58,9]]},419,{"position":[[58,9]]},464,{"position":[[58,9]]},515,{"position":[[58,9]]},545,{"position":[[58,9]]},587,{"position":[[58,9]]},629,{"position":[[58,9]]},659,{"position":[[58,9]]},695,{"position":[[58,9]]},749,{"position":[[58,9]]},824,{"position":[[64,10]]},848,{"position":[[58,9]]},893,{"position":[[58,9]]},1298,{"position":[[58,9]]},1880,{"position":[[105,10]]},4835,{"position":[[47,10]]},4853,{"position":[[81,10]]},4862,{"position":[[52,9]]},4880,{"position":[[52,9]]}]],["opshin.build",[],[4756,{"position":[[0,14]]}],[2,{"position":[[3929,14]]}]],["import",[],[],[2,{"position":[[3944,6]]},1160,{"position":[[33,7]]},1439,{"position":[[256,6]]},2765,{"position":[[683,9]]},2873,{"position":[[683,9]]},2936,{"position":[[683,9]]},3602,{"position":[[683,9]]},3908,{"position":[[683,9]]},4121,{"position":[[683,9]]},4466,{"position":[[63,6],[151,6]]},4469,{"position":[[19,7],[178,6]]},4862,{"position":[[36,10]]},4880,{"position":[[36,10]]}]],["contain",[1857,{"position":[[0,8]]}],[],[2,{"position":[[4002,8],[4468,7]]},1505,{"position":[[144,10]]},1859,{"position":[[44,9]]}]],["build(\"path/to/contract.pi",[],[],[2,{"position":[[4043,28],[4144,28]]}]],["dure",[],[],[2,{"position":[[4114,6]]},1082,{"position":[[655,6]]},2030,{"position":[[655,6]]},2048,{"position":[[655,6]]},2126,{"position":[[655,6]]},2144,{"position":[[655,6]]},2255,{"position":[[655,6]]},2279,{"position":[[655,6]]},2309,{"position":[[655,6]]},2330,{"position":[[655,6]]},4400,{"position":[[655,6]]}]],["arg1",[],[],[2,{"position":[[4173,5]]}]],["arg2",[],[],[2,{"position":[[4179,5],[4441,5]]}]],["arg3",[],[],[2,{"position":[[4185,5],[4447,5]]}]],["store",[],[],[2,{"position":[[4192,5]]},4643,{"position":[[89,6]]}]],["folder",[],[],[2,{"position":[[4229,6]]}]],["contract.dump(\"path/to/stor",[],[],[2,{"position":[[4236,30]]}]],["path",[],[],[2,{"position":[[4313,4]]},4442,{"position":[[26,5],[116,4]]}]],["load(\"path/to/stor",[],[],[2,{"position":[[4329,21]]}]],["contract.apply_parameters(arg1",[],[],[2,{"position":[[4409,31]]}]],["polici",[],[],[2,{"position":[[4501,6]]},1748,{"position":[[41,6]]},4868,{"position":[[24,6]]},4907,{"position":[[11,6]]},4910,{"position":[[64,6]]}]],["id",[1467,{"position":[[0,2]]},1818,{"position":[[0,2]]}],[],[2,{"position":[[4508,2]]},56,{"position":[[35,2]]},98,{"position":[[35,2]]},152,{"position":[[35,2]]},158,{"position":[[35,2]]},230,{"position":[[35,2]]},239,{"position":[[35,2]]},281,{"position":[[35,2]]},356,{"position":[[35,2]]},401,{"position":[[35,2]]},410,{"position":[[35,2]]},455,{"position":[[35,2]]},497,{"position":[[35,2]]},536,{"position":[[35,2]]},608,{"position":[[35,2]]},614,{"position":[[35,2]]},686,{"position":[[35,2]]},725,{"position":[[35,2]]},764,{"position":[[35,2]]},863,{"position":[[35,2]]},875,{"position":[[35,2]]},1112,{"position":[[9,2]]},1313,{"position":[[35,2]]},1445,{"position":[[14,3]]},1748,{"position":[[48,2]]},2408,{"position":[[948,3]]},2558,{"position":[[16,3]]},2588,{"position":[[948,3]]},2747,{"position":[[948,3]]},4559,{"position":[[32,2]]},4676,{"position":[[126,2],[141,2]]},4868,{"position":[[31,2]]},4907,{"position":[[18,2]]},4910,{"position":[[71,2]]}]],["address",[1533,{"position":[[0,7]]},1596,{"position":[[0,7]]}],[],[2,{"position":[[4519,9]]},1478,{"position":[[11,7]]},1487,{"position":[[11,7]]},1496,{"position":[[33,7]]},1505,{"position":[[33,7],[88,8]]},1520,{"position":[[20,7]]},1526,{"position":[[20,7]]},1535,{"position":[[10,8]]},1595,{"position":[[68,8],[77,7]]},4886,{"position":[[66,7]]},4889,{"position":[[67,7]]},4892,{"position":[[66,7]]},4910,{"position":[[29,7]]}]],["blueprint",[4830,{"position":[[0,9]]}],[],[2,{"position":[[4533,9]]},4847,{"position":[[78,9]]},4850,{"position":[[80,9]]}]],["contract_addr",[],[],[2,{"position":[[4543,13]]}]],["contract.mainnet_addr",[],[],[2,{"position":[[4559,21]]}]],["contract_blueprint",[],[],[2,{"position":[[4581,18]]}]],["contract.blueprint",[],[],[2,{"position":[[4602,18]]}]],["artefact",[],[],[2,{"position":[[4634,9]]}]],["eval_uplc",[3891,{"position":[[0,9]]}],[],[2,{"position":[[4778,9]]}]],["pluto",[],[],[2,{"position":[[5793,8]]}]],["intermedi",[],[],[2,{"position":[[5805,12]]}]],["languag",[],[],[2,{"position":[[5818,8]]}]],["compile_pluto",[],[],[2,{"position":[[5859,13]]}]],["contribut",[],[],[2,{"position":[[5924,12],[5992,13],[7772,10]]}]],["develop",[],[],[2,{"position":[[5938,10],[6531,11],[6812,10]]}]],["technic",[],[],[2,{"position":[[5953,9],[6121,9]]}]],["side",[],[],[2,{"position":[[6018,4]]}]],["veri",[],[],[2,{"position":[[6027,4]]}]],["welcom",[],[],[2,{"position":[[6032,8]]}]],["overview",[],[],[2,{"position":[[6051,8]]}]],["over",[],[],[2,{"position":[[6060,4],[7332,4]]},1316,{"position":[[263,5]]},4568,{"position":[[157,4]]},4709,{"position":[[263,5]]},4760,{"position":[[263,5]]}]],["architectur",[],[],[2,{"position":[[6069,12]]}]],["idea",[],[],[2,{"position":[[6086,4]]}]],["behind",[],[],[2,{"position":[[6091,6]]}]],["documentation](./architecture.md",[],[],[2,{"position":[[6131,34]]}]],["bug",[],[],[2,{"position":[[6168,3]]}]],["bounti",[],[],[2,{"position":[[6172,6],[6444,6]]}]],["set",[],[],[2,{"position":[[6188,3]]},2765,{"position":[[910,3],[1308,4]]},2873,{"position":[[910,3],[1308,4]]},2936,{"position":[[910,3],[1308,4]]},3602,{"position":[[910,3],[1308,4]]},3908,{"position":[[910,3],[1308,4]]},4121,{"position":[[910,3],[1308,4]]},4649,{"position":[[36,3]]},4652,{"position":[[0,4]]},4655,{"position":[[0,4]]},4664,{"position":[[28,3]]},4667,{"position":[[30,3]]},4670,{"position":[[29,3]]}]],["up",[],[],[2,{"position":[[6192,2]]},1862,{"position":[[59,2]]},1865,{"position":[[59,2]]},1868,{"position":[[49,2]]},2765,{"position":[[1408,2]]},2873,{"position":[[1408,2]]},2936,{"position":[[1408,2]]},3602,{"position":[[1408,2]]},3908,{"position":[[1408,2]]},4121,{"position":[[1408,2]]}]],["fund",[],[],[2,{"position":[[6199,6]]},1520,{"position":[[60,5]]},1526,{"position":[[57,5]]}]],["catalyst",[],[],[2,{"position":[[6217,9]]}]],["award",[],[],[2,{"position":[[6233,6]]}]],["github",[],[],[2,{"position":[[6240,7],[6561,6],[6793,6]]}]],["issue](http",[],[],[2,{"position":[[6248,13]]}]],["github.com/opshin/opshin/labels/bug%20bounti",[],[],[2,{"position":[[6262,45]]}]],["resolut",[],[],[2,{"position":[[6308,10]]}]],["wiht",[],[],[2,{"position":[[6319,4]]}]],["ada",[],[],[2,{"position":[[6324,3],[6395,4],[6627,4],[6884,3],[6900,3]]}]],["reward",[1764,{"position":[[0,9]]},4767,{"position":[[0,9]]}],[],[2,{"position":[[6328,8]]}]],["great",[],[],[2,{"position":[[6347,5]]}]],["opportun",[],[],[2,{"position":[[6353,11]]}]],["involv",[],[],[2,{"position":[[6372,8]]},1442,{"position":[[37,8]]},4220,{"position":[[153,8]]}]],["earn",[],[],[2,{"position":[[6385,4]]}]],["program](./bug_bounty.md",[],[],[2,{"position":[[6451,25]]}]],["inform",[],[],[2,{"position":[[6486,12]]},23,{"position":[[68,7]]},80,{"position":[[68,7]]},137,{"position":[[68,7]]},170,{"position":[[68,7]]},215,{"position":[[68,7]]},293,{"position":[[68,7]]},323,{"position":[[68,7]]},368,{"position":[[68,7]]},419,{"position":[[68,7]]},464,{"position":[[68,7]]},515,{"position":[[68,7]]},545,{"position":[[68,7]]},587,{"position":[[68,7]]},629,{"position":[[68,7]]},659,{"position":[[68,7]]},695,{"position":[[68,7]]},749,{"position":[[68,7]]},848,{"position":[[68,7]]},893,{"position":[[68,7]]},1298,{"position":[[68,7]]},1826,{"position":[[10,11]]},2234,{"position":[[42,11],[72,11],[131,11]]}]],["sponsor",[],[],[2,{"position":[[6500,10],[6519,7],[6800,7],[6858,9],[7076,7]]}]],["through",[],[],[2,{"position":[[6553,7],[6839,7]]},1880,{"position":[[159,7]]},2234,{"position":[[339,7]]}]],["patreon](http",[],[],[2,{"position":[[6571,16],[6727,16]]}]],["patreon.com/opshin",[],[],[2,{"position":[[6588,19],[6744,19]]}]],["send",[],[],[2,{"position":[[6619,7]]}]],["drop",[],[],[2,{"position":[[6632,4]]}]],["messag",[],[],[2,{"position":[[6642,7]]},2765,{"position":[[1166,8],[1282,7],[1353,8]]},2873,{"position":[[1166,8],[1282,7],[1353,8]]},2936,{"position":[[1166,8],[1282,7],[1353,8]]},3602,{"position":[[1166,8],[1282,7],[1353,8]]},3908,{"position":[[1166,8],[1282,7],[1353,8]]},4121,{"position":[[1166,8],[1282,7],[1353,8]]},4538,{"position":[[14,8]]},4541,{"position":[[14,8]]},4544,{"position":[[14,8]]}]],["social",[],[],[2,{"position":[[6653,6]]}]],["media",[],[],[2,{"position":[[6660,5]]}]],["know",[],[],[2,{"position":[[6677,4]]},1316,{"position":[[273,4]]},4709,{"position":[[273,4]]},4760,{"position":[[273,4]]}]],["patreon",[],[],[2,{"position":[[6701,7]]}]],["support",[],[],[2,{"position":[[6709,7],[7044,10]]}]],["enjoy",[],[],[2,{"position":[[6767,5]]}]],["member",[],[],[2,{"position":[[6773,6]]},1316,{"position":[[287,7],[391,7]]},4709,{"position":[[287,7],[391,7]]},4760,{"position":[[287,7],[391,7]]}]],["benefit",[],[],[2,{"position":[[6780,9]]}]],["button",[],[],[2,{"position":[[6851,6]]}]],["next",[],[],[2,{"position":[[6868,4]]}]],["donat",[],[],[2,{"position":[[6888,8]]}]],["submit",[],[],[2,{"position":[[6911,9]]}]],["addr1qyz3vgd5xxevjy2rvqevz9n7n7dney8n6hqggp23479fm6vwpj9clsvsf85cd4xc59zjztr5zwpummwckmzr2myjwjns74lhmr",[],[],[2,{"position":[[6937,103]]}]],["main",[],[],[2,{"position":[[7071,4]]}]],["inversion](http",[],[],[2,{"position":[[7103,18]]}]],["inversion.dev/cardano",[],[],[2,{"position":[[7122,24]]}]],["here",[],[],[2,{"position":[[7147,4],[8142,5]]},926,{"position":[[452,4]]},941,{"position":[[452,4]]},965,{"position":[[452,4]]},986,{"position":[[452,4]]},1004,{"position":[[452,4]]},1025,{"position":[[452,4]]},1040,{"position":[[452,4]]},1061,{"position":[[452,4]]},1100,{"position":[[452,4]]},1145,{"position":[[452,4]]},1163,{"position":[[452,4]]},1169,{"position":[[452,4]]},1184,{"position":[[452,4]]},1199,{"position":[[452,4]]},1214,{"position":[[452,4]]},1232,{"position":[[452,4]]},1247,{"position":[[452,4]]},1328,{"position":[[452,4]]},1355,{"position":[[452,4]]},1373,{"position":[[452,4]]},1388,{"position":[[452,4]]},1403,{"position":[[452,4]]},1424,{"position":[[452,4]]},2000,{"position":[[452,4]]},2015,{"position":[[452,4]]},2072,{"position":[[452,4]]},2177,{"position":[[452,4]]},2249,{"position":[[452,4]]},2264,{"position":[[452,4]]},4256,{"position":[[452,4]]}]],["word",[],[],[2,{"position":[[7157,4]]},4847,{"position":[[197,4]]}]],["invers",[],[],[2,{"position":[[7178,10],[7896,9]]}]],["pride",[],[],[2,{"position":[[7192,5]]}]],["ourselv",[],[],[2,{"position":[[7198,9]]}]],["passion",[],[],[2,{"position":[[7215,7]]}]],["life",[],[],[2,{"position":[[7227,4],[7499,5]]}]],["abil",[],[],[2,{"position":[[7240,7]]}]],["creat",[],[],[2,{"position":[[7251,6]]},1316,{"position":[[0,6]]},1862,{"position":[[0,6]]},1865,{"position":[[0,6]]},1868,{"position":[[0,6]]},2300,{"position":[[0,7]]},2765,{"position":[[174,6],[1490,6]]},2873,{"position":[[174,6],[1490,6]]},2936,{"position":[[174,6],[1490,6]]},3602,{"position":[[174,6],[1490,6]]},3908,{"position":[[174,6],[1490,6]]},4121,{"position":[[174,6],[1490,6]]},4559,{"position":[[0,6]]},4646,{"position":[[0,7]]},4709,{"position":[[0,6]]},4760,{"position":[[0,6]]}]],["except",[],[],[2,{"position":[[7258,11]]},2261,{"position":[[35,11]]},2765,{"position":[[968,9],[1063,9]]},2873,{"position":[[968,9],[1063,9]]},2936,{"position":[[968,9],[1063,9]]},3602,{"position":[[968,9],[1063,9]]},3908,{"position":[[968,9],[1063,9]]},4121,{"position":[[968,9],[1063,9]]},4898,{"position":[[119,9]]}]],["softwar",[],[],[2,{"position":[[7270,8]]}]],["solut",[],[],[2,{"position":[[7279,9],[7975,10]]}]],["client",[],[],[2,{"position":[[7297,8]]}]],["team",[],[],[2,{"position":[[7310,4],[7753,4]]}]],["expert",[],[],[2,{"position":[[7318,8]]}]],["centuri",[],[],[2,{"position":[[7339,7]]}]],["cumul",[],[],[2,{"position":[[7350,10]]}]],["experi",[],[],[2,{"position":[[7361,11]]}]],["dedic",[],[],[2,{"position":[[7376,9]]}]],["har",[],[],[2,{"position":[[7389,10]]}]],["power",[],[],[2,{"position":[[7404,5]]}]],["blockchain",[],[],[2,{"position":[[7425,10],[7669,10],[7994,10]]}]],["bring",[],[],[2,{"position":[[7439,5]]}]],["innov",[],[],[2,{"position":[[7445,10]]}]],["scalabl",[],[],[2,{"position":[[7460,8]]}]],["decentr",[],[],[2,{"position":[[7469,13],[7835,13]]}]],["applic",[],[],[2,{"position":[[7483,12],[7530,12]]}]],["we'v",[],[],[2,{"position":[[7505,5]]}]],["successfulli",[],[],[2,{"position":[[7511,12]]}]],["built",[],[],[2,{"position":[[7524,5]]},359,{"position":[[30,5]]},4472,{"position":[[50,5],[118,5]]}]],["nft",[],[],[2,{"position":[[7547,3]]}]],["manag",[],[],[2,{"position":[[7551,11]]}]],["stake",[],[],[2,{"position":[[7563,7]]},1496,{"position":[[19,5]]},1505,{"position":[[19,5],[157,5]]},1520,{"position":[[35,7]]},1526,{"position":[[32,7]]},1535,{"position":[[47,7]]}]],["deleg",[1644,{"position":[[0,9]]}],[],[2,{"position":[[7575,11]]},1520,{"position":[[77,10]]},1526,{"position":[[70,9]]}]],["monitor",[],[],[2,{"position":[[7598,11]]}]],["analyt",[],[],[2,{"position":[[7610,10]]}]],["web3",[],[],[2,{"position":[[7625,4]]}]],["integr",[4671,{"position":[[0,9]]}],[],[2,{"position":[[7630,13]]},4673,{"position":[[65,9]]},4676,{"position":[[11,9]]}]],["well",[],[],[2,{"position":[[7647,4]]}]],["countless",[],[],[2,{"position":[[7655,9]]}]],["non",[],[],[2,{"position":[[7665,3]]},2261,{"position":[[26,3]]},4862,{"position":[[32,3]]},4880,{"position":[[32,3]]}]],["system",[],[],[2,{"position":[[7680,8],[8024,8]]}]],["focu",[],[],[2,{"position":[[7696,5]]}]],["transpar",[],[],[2,{"position":[[7715,13]]}]],["sustain",[],[],[2,{"position":[[7733,15]]}]],["excit",[],[],[2,{"position":[[7761,7]]}]],["ecosystem",[],[],[2,{"position":[[7798,10]]}]],["push",[],[],[2,{"position":[[7809,7]]}]],["boundari",[],[],[2,{"position":[[7821,10]]}]],["technolog",[],[],[2,{"position":[[7849,12]]}]],["improv",[],[],[2,{"position":[[7865,7]]}]],["live",[],[],[2,{"position":[[7873,5]]}]],["worldwid",[],[],[2,{"position":[[7879,10]]}]],["trust",[],[],[2,{"position":[[7890,5]]}]],["go",[],[],[2,{"position":[[7917,2]]}]],["partner",[],[],[2,{"position":[[7923,7]]}]],["robust",[],[],[2,{"position":[[7935,7]]}]],["effect",[],[],[2,{"position":[[7943,10]]}]],["forward",[],[],[2,{"position":[[7958,7]]},1082,{"position":[[155,9]]},2030,{"position":[[155,9]]},2048,{"position":[[155,9]]},2126,{"position":[[155,9]]},2144,{"position":[[155,9]]},2255,{"position":[[155,9]]},2279,{"position":[[155,9]]},2309,{"position":[[155,9]]},2330,{"position":[[155,9]]},4400,{"position":[[155,9]]}]],["think",[],[],[2,{"position":[[7966,8]]}]],["whether",[],[],[2,{"position":[[7986,7]]},23,{"position":[[87,7]]},80,{"position":[[87,7]]},137,{"position":[[87,7]]},170,{"position":[[87,7]]},215,{"position":[[87,7]]},293,{"position":[[87,7]]},323,{"position":[[87,7]]},368,{"position":[[87,7]]},419,{"position":[[87,7]]},464,{"position":[[87,7]]},515,{"position":[[87,7]]},545,{"position":[[87,7]]},587,{"position":[[87,7]]},629,{"position":[[87,7]]},659,{"position":[[87,7]]},695,{"position":[[87,7]]},749,{"position":[[87,7]]},848,{"position":[[87,7]]},893,{"position":[[87,7]]},1298,{"position":[[87,7]]},2765,{"position":[[1153,7]]},2873,{"position":[[1153,7]]},2936,{"position":[[1153,7]]},3602,{"position":[[1153,7]]},3908,{"position":[[1153,7]]},4121,{"position":[[1153,7]]},4442,{"position":[[86,7]]},4664,{"position":[[8,7]]},4667,{"position":[[8,7]]},4670,{"position":[[8,7]]},4898,{"position":[[73,7]]},4901,{"position":[[94,7]]},4913,{"position":[[8,7]]}]],["tradit",[],[],[2,{"position":[[8012,11]]}]],["mix",[],[],[2,{"position":[[8038,3]]}]],["two",[],[],[2,{"position":[[8049,4]]},4475,{"position":[[5,3]]},4496,{"position":[[17,3]]},4505,{"position":[[12,3]]},4547,{"position":[[12,3]]},4562,{"position":[[17,3]]}]],["recent",[],[],[2,{"position":[[8064,8]]}]],["podcast",[],[],[2,{"position":[[8083,8]]}]],["call",[],[],[2,{"position":[[8092,6]]},926,{"position":[[836,4]]},941,{"position":[[836,4]]},965,{"position":[[836,4]]},986,{"position":[[836,4]]},1004,{"position":[[836,4]]},1025,{"position":[[836,4]]},1040,{"position":[[836,4]]},1061,{"position":[[836,4]]},1082,{"position":[[66,5]]},1100,{"position":[[836,4]]},1145,{"position":[[836,4]]},1163,{"position":[[836,4]]},1169,{"position":[[836,4]]},1184,{"position":[[836,4]]},1199,{"position":[[836,4]]},1214,{"position":[[836,4]]},1232,{"position":[[836,4]]},1247,{"position":[[836,4]]},1277,{"position":[[80,4]]},1328,{"position":[[836,4]]},1355,{"position":[[836,4]]},1373,{"position":[[836,4]]},1388,{"position":[[836,4]]},1403,{"position":[[836,4]]},1424,{"position":[[836,4]]},1445,{"position":[[69,6]]},1826,{"position":[[77,6]]},1985,{"position":[[0,6]]},2000,{"position":[[836,4]]},2015,{"position":[[836,4]]},2030,{"position":[[66,5]]},2048,{"position":[[66,5]]},2054,{"position":[[0,6]]},2072,{"position":[[836,4]]},2126,{"position":[[66,5]]},2144,{"position":[[66,5]]},2177,{"position":[[836,4]]},2225,{"position":[[0,6]]},2249,{"position":[[836,4]]},2255,{"position":[[66,5]]},2264,{"position":[[836,4]]},2279,{"position":[[66,5]]},2300,{"position":[[91,5]]},2309,{"position":[[66,5]]},2330,{"position":[[66,5]]},2765,{"position":[[669,7]]},2873,{"position":[[669,7]]},2936,{"position":[[669,7]]},3602,{"position":[[669,7]]},3908,{"position":[[669,7]]},4121,{"position":[[669,7]]},4238,{"position":[[0,6]]},4256,{"position":[[836,4]]},4394,{"position":[[0,6]]},4400,{"position":[[66,5]]},4433,{"position":[[0,6]]}]],["africa",[],[],[2,{"position":[[8099,7]]}]],["www.youtube.com/@africaonchain",[],[],[2,{"position":[[8155,30]]}]],["type_impl",[3,{"position":[[0,10]]}],[],[]],["opshin.type_impl",[],[4,{"position":[[0,17]]}],[]],["functiontyp",[6,{"position":[[0,12]]}],[],[155,{"position":[[57,14]]}]],["opshin.type_impls.functiontyp",[],[7,{"position":[[0,30]]}],[866,{"position":[[37,31]]}]],["functiontype(argtyp",[],[],[8,{"position":[[0,21]]}]],["list[opshin.type_impls.typ",[],[],[8,{"position":[[22,29]]},317,{"position":[[16,29]]}]],["rettyp",[12,{"position":[[0,6]]}],[],[8,{"position":[[52,7]]}]],["opshin.type_impls.typ",[],[61,{"position":[[0,22]]}],[8,{"position":[[60,23],[106,23]]},101,{"position":[[82,22]]},404,{"position":[[14,23]]},446,{"position":[[18,23],[53,23]]}]],["bound_var",[15,{"position":[[0,10]]}],[],[8,{"position":[[84,11]]}]],["dict[str",[],[],[8,{"position":[[96,9]]}]],["bind_self",[18,{"position":[[0,9]]}],[],[8,{"position":[[135,10]]}]],["optional[str",[],[],[8,{"position":[[146,13]]},4781,{"position":[[727,13],[791,13],[848,13]]}]],["none",[],[],[8,{"position":[[162,5]]},926,{"position":[[269,4]]},941,{"position":[[269,4]]},965,{"position":[[269,4]]},986,{"position":[[269,4]]},1004,{"position":[[269,4]]},1025,{"position":[[269,4]]},1040,{"position":[[269,4]]},1061,{"position":[[269,4]]},1082,{"position":[[539,4]]},1100,{"position":[[269,4]]},1145,{"position":[[269,4]]},1163,{"position":[[269,4]]},1169,{"position":[[269,4]]},1184,{"position":[[269,4]]},1199,{"position":[[269,4]]},1214,{"position":[[269,4]]},1232,{"position":[[269,4]]},1247,{"position":[[269,4]]},1328,{"position":[[269,4]]},1355,{"position":[[269,4]]},1373,{"position":[[269,4]]},1388,{"position":[[269,4]]},1403,{"position":[[269,4]]},1424,{"position":[[269,4]]},2000,{"position":[[269,4]]},2015,{"position":[[269,4]]},2030,{"position":[[539,4]]},2048,{"position":[[539,4]]},2072,{"position":[[269,4]]},2126,{"position":[[539,4]]},2144,{"position":[[539,4]]},2177,{"position":[[269,4]]},2249,{"position":[[269,4]]},2255,{"position":[[539,4]]},2264,{"position":[[269,4]]},2279,{"position":[[539,4]]},2309,{"position":[[539,4]]},2330,{"position":[[539,4]]},2384,{"position":[[54,5],[104,5],[155,5],[196,5],[246,5],[289,5],[330,5]]},4256,{"position":[[269,4]]},4400,{"position":[[539,4]]},4781,{"position":[[255,5],[461,5],[864,5]]}]],["argtyp",[9,{"position":[[0,7]]}],[],[]],["opshin.type_impls.functiontype.argtyp",[],[10,{"position":[[0,38]]}],[]],["opshin.type_impls.functiontype.rettyp",[],[13,{"position":[[0,37]]}],[]],["opshin.type_impls.functiontype.bound_var",[],[16,{"position":[[0,41]]}],[]],["opshin.type_impls.functiontype.bind_self",[],[19,{"position":[[0,40]]}],[]],["stringifi",[21,{"position":[[0,9]]},78,{"position":[[0,9]]},135,{"position":[[0,9]]},168,{"position":[[0,9]]},213,{"position":[[0,9]]},255,{"position":[[0,9]]},291,{"position":[[0,9]]},321,{"position":[[0,9]]},366,{"position":[[0,9]]},417,{"position":[[0,9]]},462,{"position":[[0,9]]},513,{"position":[[0,9]]},543,{"position":[[0,9]]},585,{"position":[[0,9]]},627,{"position":[[0,9]]},657,{"position":[[0,9]]},693,{"position":[[0,9]]},747,{"position":[[0,9]]},846,{"position":[[0,9]]},891,{"position":[[0,9]]},1296,{"position":[[0,9]]}],[],[23,{"position":[[10,11]]},80,{"position":[[10,11]]},137,{"position":[[10,11]]},170,{"position":[[10,11]]},215,{"position":[[10,11]]},257,{"position":[[10,11]]},293,{"position":[[10,11]]},323,{"position":[[10,11]]},368,{"position":[[10,11]]},419,{"position":[[10,11]]},464,{"position":[[10,11]]},515,{"position":[[10,11]]},545,{"position":[[10,11]]},587,{"position":[[10,11]]},629,{"position":[[10,11]]},659,{"position":[[10,11]]},695,{"position":[[10,11]]},749,{"position":[[10,11]]},848,{"position":[[10,11]]},893,{"position":[[10,11]]},1298,{"position":[[10,11]]}]],["opshin.type_impls.functiontype.stringifi",[],[22,{"position":[[0,40]]}],[]],["return",[],[],[23,{"position":[[0,7]]},26,{"position":[[0,7]]},41,{"position":[[69,7]]},56,{"position":[[0,7]]},77,{"position":[[69,7]]},80,{"position":[[0,7]]},83,{"position":[[22,7]]},98,{"position":[[0,7]]},119,{"position":[[0,7]]},134,{"position":[[69,7]]},137,{"position":[[0,7]]},152,{"position":[[0,7]]},158,{"position":[[0,7]]},167,{"position":[[69,7]]},170,{"position":[[0,7]]},173,{"position":[[0,7]]},197,{"position":[[0,7]]},212,{"position":[[69,7]]},215,{"position":[[0,7]]},230,{"position":[[0,7]]},239,{"position":[[0,7]]},254,{"position":[[69,7]]},257,{"position":[[0,7]]},260,{"position":[[0,7]]},281,{"position":[[0,7]]},290,{"position":[[69,7]]},293,{"position":[[0,7]]},296,{"position":[[0,7]]},323,{"position":[[0,7]]},326,{"position":[[0,7]]},341,{"position":[[69,7]]},356,{"position":[[0,7]]},368,{"position":[[0,7]]},371,{"position":[[0,7]]},386,{"position":[[69,7]]},401,{"position":[[0,7]]},410,{"position":[[0,7]]},419,{"position":[[0,7]]},422,{"position":[[0,7]]},431,{"position":[[69,7]]},455,{"position":[[0,7]]},464,{"position":[[0,7]]},467,{"position":[[0,7]]},476,{"position":[[69,7]]},497,{"position":[[0,7]]},512,{"position":[[69,7]]},515,{"position":[[0,7]]},518,{"position":[[22,7]]},536,{"position":[[0,7]]},542,{"position":[[69,7]]},545,{"position":[[0,7]]},548,{"position":[[0,7]]},584,{"position":[[69,7]]},587,{"position":[[0,7]]},590,{"position":[[0,7]]},608,{"position":[[0,7]]},614,{"position":[[0,7]]},626,{"position":[[69,7]]},629,{"position":[[0,7]]},632,{"position":[[0,7]]},656,{"position":[[69,7]]},659,{"position":[[0,7]]},662,{"position":[[0,7]]},686,{"position":[[0,7]]},692,{"position":[[69,7]]},695,{"position":[[0,7]]},698,{"position":[[0,7]]},725,{"position":[[0,7]]},731,{"position":[[0,7]]},746,{"position":[[69,7]]},749,{"position":[[0,7]]},764,{"position":[[0,7]]},830,{"position":[[0,7]]},845,{"position":[[69,7]]},848,{"position":[[0,7]]},863,{"position":[[0,7]]},875,{"position":[[0,7]]},890,{"position":[[69,7]]},893,{"position":[[0,7]]},896,{"position":[[22,7]]},926,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},941,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},965,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},986,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1004,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1025,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1040,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1061,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1082,{"position":[[131,6],[524,7]]},1100,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1145,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1163,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1169,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1184,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1199,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1214,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1232,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1247,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1286,{"position":[[0,7]]},1295,{"position":[[69,7]]},1298,{"position":[[0,7]]},1313,{"position":[[0,7]]},1328,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1355,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1373,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1388,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1403,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1424,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},1859,{"position":[[0,7]]},1883,{"position":[[23,7]]},2000,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},2015,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},2030,{"position":[[131,6],[524,7]]},2048,{"position":[[131,6],[524,7]]},2072,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},2126,{"position":[[131,6],[524,7]]},2144,{"position":[[131,6],[524,7]]},2177,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},2243,{"position":[[51,7]]},2246,{"position":[[0,7]]},2249,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},2255,{"position":[[131,6],[524,7]]},2264,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},2279,{"position":[[131,6],[524,7]]},2309,{"position":[[131,6],[524,7]]},2327,{"position":[[0,7]]},2330,{"position":[[131,6],[524,7]]},2351,{"position":[[0,7]]},2414,{"position":[[90,8],[211,8]]},2444,{"position":[[90,8],[211,8]]},2450,{"position":[[83,8]]},2477,{"position":[[90,8],[211,8]]},2660,{"position":[[90,8],[211,8]]},4235,{"position":[[77,7]]},4256,{"position":[[152,6],[230,6],[354,6],[372,6],[618,6],[1008,6]]},4400,{"position":[[131,6],[524,7]]},4442,{"position":[[39,6],[78,7]]},4475,{"position":[[22,7]]},4478,{"position":[[36,6]]},4481,{"position":[[24,6]]},4484,{"position":[[35,6]]},4487,{"position":[[40,6]]},4490,{"position":[[41,6]]},4493,{"position":[[39,6]]},4499,{"position":[[0,7]]},4502,{"position":[[0,7]]},4520,{"position":[[0,7]]},4523,{"position":[[0,7]]},4526,{"position":[[0,7]]},4550,{"position":[[0,7]]},4583,{"position":[[0,7]]},4586,{"position":[[0,7]]},4589,{"position":[[0,7]]},4592,{"position":[[0,7]]},4595,{"position":[[0,7]]},4601,{"position":[[0,7]]},4604,{"position":[[0,7]]},4607,{"position":[[0,7]]},4610,{"position":[[0,7]]},4613,{"position":[[0,7]]},4637,{"position":[[0,7]]},4640,{"position":[[0,7]]},4661,{"position":[[0,7]]},4664,{"position":[[0,7]]},4667,{"position":[[0,7]]},4670,{"position":[[0,7]]},4835,{"position":[[0,7]]},4844,{"position":[[28,7]]},4847,{"position":[[242,8]]},4853,{"position":[[39,7]]},4886,{"position":[[0,7]]},4889,{"position":[[0,7]]},4892,{"position":[[0,7]]},4895,{"position":[[0,7]]},4898,{"position":[[0,7]]},4901,{"position":[[0,7],[175,7]]},4913,{"position":[[0,7]]}]],["version",[4797,{"position":[[0,7]]}],[],[23,{"position":[[22,7]]},80,{"position":[[22,7]]},137,{"position":[[22,7]]},170,{"position":[[22,7]]},215,{"position":[[22,7]]},257,{"position":[[22,7]]},293,{"position":[[22,7]]},323,{"position":[[22,7]]},368,{"position":[[22,7]]},419,{"position":[[22,7]]},464,{"position":[[22,7]]},515,{"position":[[22,7]]},545,{"position":[[22,7]]},587,{"position":[[22,7]]},629,{"position":[[22,7]]},659,{"position":[[22,7]]},695,{"position":[[22,7]]},749,{"position":[[22,7]]},848,{"position":[[22,7]]},893,{"position":[[22,7]]},1298,{"position":[[22,7]]},4781,{"position":[[718,8]]}]],["recurs",[],[],[23,{"position":[[48,9],[110,11]]},80,{"position":[[48,9],[110,11]]},137,{"position":[[48,9],[110,11]]},170,{"position":[[48,9],[110,11]]},215,{"position":[[48,9],[110,11]]},293,{"position":[[48,9],[110,11]]},323,{"position":[[48,9],[110,11]]},368,{"position":[[48,9],[110,11]]},419,{"position":[[48,9],[110,11]]},464,{"position":[[48,9],[110,11]]},515,{"position":[[48,9],[110,11]]},545,{"position":[[48,9],[110,11]]},587,{"position":[[48,9],[110,11]]},629,{"position":[[48,9],[110,11]]},659,{"position":[[48,9],[110,11]]},695,{"position":[[48,9],[110,11]]},749,{"position":[[48,9],[110,11]]},848,{"position":[[48,9],[110,11]]},893,{"position":[[48,9],[110,11]]},1298,{"position":[[48,9],[110,11]]}]],["method",[],[],[23,{"position":[[80,6]]},80,{"position":[[80,6]]},137,{"position":[[80,6]]},170,{"position":[[80,6]]},215,{"position":[[80,6]]},293,{"position":[[80,6]]},323,{"position":[[80,6]]},368,{"position":[[80,6]]},419,{"position":[[80,6]]},464,{"position":[[80,6]]},515,{"position":[[80,6]]},545,{"position":[[80,6]]},587,{"position":[[80,6]]},629,{"position":[[80,6]]},659,{"position":[[80,6]]},695,{"position":[[80,6]]},749,{"position":[[80,6]]},848,{"position":[[80,6]]},893,{"position":[[80,6]]},926,{"position":[[180,7],[258,6],[866,6]]},941,{"position":[[180,7],[258,6],[866,6]]},965,{"position":[[180,7],[258,6],[866,6]]},986,{"position":[[180,7],[258,6],[866,6]]},1004,{"position":[[180,7],[258,6],[866,6]]},1025,{"position":[[180,7],[258,6],[866,6]]},1040,{"position":[[180,7],[258,6],[866,6]]},1061,{"position":[[180,7],[258,6],[866,6]]},1082,{"position":[[179,7],[258,8],[475,7]]},1100,{"position":[[180,7],[258,6],[866,6]]},1145,{"position":[[180,7],[258,6],[866,6]]},1163,{"position":[[180,7],[258,6],[866,6]]},1169,{"position":[[180,7],[258,6],[866,6]]},1184,{"position":[[180,7],[258,6],[866,6]]},1199,{"position":[[180,7],[258,6],[866,6]]},1214,{"position":[[180,7],[258,6],[866,6]]},1232,{"position":[[180,7],[258,6],[866,6]]},1247,{"position":[[180,7],[258,6],[866,6]]},1298,{"position":[[80,6]]},1316,{"position":[[349,7]]},1328,{"position":[[180,7],[258,6],[866,6]]},1355,{"position":[[180,7],[258,6],[866,6]]},1373,{"position":[[180,7],[258,6],[866,6]]},1388,{"position":[[180,7],[258,6],[866,6]]},1403,{"position":[[180,7],[258,6],[866,6]]},1424,{"position":[[180,7],[258,6],[866,6]]},2000,{"position":[[180,7],[258,6],[866,6]]},2015,{"position":[[180,7],[258,6],[866,6]]},2030,{"position":[[179,7],[258,8],[475,7]]},2048,{"position":[[179,7],[258,8],[475,7]]},2072,{"position":[[180,7],[258,6],[866,6]]},2126,{"position":[[179,7],[258,8],[475,7]]},2144,{"position":[[179,7],[258,8],[475,7]]},2177,{"position":[[180,7],[258,6],[866,6]]},2249,{"position":[[180,7],[258,6],[866,6]]},2255,{"position":[[179,7],[258,8],[475,7]]},2264,{"position":[[180,7],[258,6],[866,6]]},2279,{"position":[[179,7],[258,8],[475,7]]},2309,{"position":[[179,7],[258,8],[475,7]]},2330,{"position":[[179,7],[258,8],[475,7]]},2765,{"position":[[102,6],[194,7],[320,6],[549,7],[615,7],[647,6],[759,7],[1023,7],[1042,7],[1217,8],[1372,7],[1551,6],[1625,6]]},2873,{"position":[[102,6],[194,7],[320,6],[549,7],[615,7],[647,6],[759,7],[1023,7],[1042,7],[1217,8],[1372,7],[1551,6],[1625,6]]},2936,{"position":[[102,6],[194,7],[320,6],[549,7],[615,7],[647,6],[759,7],[1023,7],[1042,7],[1217,8],[1372,7],[1551,6],[1625,6]]},3602,{"position":[[102,6],[194,7],[320,6],[549,7],[615,7],[647,6],[759,7],[1023,7],[1042,7],[1217,8],[1372,7],[1551,6],[1625,6]]},3908,{"position":[[102,6],[194,7],[320,6],[549,7],[615,7],[647,6],[759,7],[1023,7],[1042,7],[1217,8],[1372,7],[1551,6],[1625,6]]},4121,{"position":[[102,6],[194,7],[320,6],[549,7],[615,7],[647,6],[759,7],[1023,7],[1042,7],[1217,8],[1372,7],[1551,6],[1625,6]]},4256,{"position":[[180,7],[258,6],[866,6]]},4400,{"position":[[179,7],[258,8],[475,7]]},4709,{"position":[[349,7]]},4760,{"position":[[349,7]]}]],["invok",[],[],[23,{"position":[[102,7],[135,10]]},80,{"position":[[102,7],[135,10]]},137,{"position":[[102,7],[135,10]]},170,{"position":[[102,7],[135,10]]},215,{"position":[[102,7],[135,10]]},293,{"position":[[102,7],[135,10]]},323,{"position":[[102,7],[135,10]]},368,{"position":[[102,7],[135,10]]},419,{"position":[[102,7],[135,10]]},464,{"position":[[102,7],[135,10]]},515,{"position":[[102,7],[135,10]]},545,{"position":[[102,7],[135,10]]},587,{"position":[[102,7],[135,10]]},629,{"position":[[102,7],[135,10]]},659,{"position":[[102,7],[135,10]]},695,{"position":[[102,7],[135,10]]},749,{"position":[[102,7],[135,10]]},848,{"position":[[102,7],[135,10]]},893,{"position":[[102,7],[135,10]]},1298,{"position":[[102,7],[135,10]]},1757,{"position":[[98,7]]},1784,{"position":[[119,7]]}]],["anoth",[],[],[23,{"position":[[127,7]]},80,{"position":[[127,7]]},137,{"position":[[127,7]]},170,{"position":[[127,7]]},215,{"position":[[127,7]]},293,{"position":[[127,7]]},323,{"position":[[127,7]]},368,{"position":[[127,7]]},419,{"position":[[127,7]]},464,{"position":[[127,7]]},515,{"position":[[127,7]]},545,{"position":[[127,7]]},587,{"position":[[127,7]]},629,{"position":[[127,7]]},659,{"position":[[127,7]]},695,{"position":[[127,7]]},749,{"position":[[127,7]]},848,{"position":[[127,7]]},893,{"position":[[127,7]]},1298,{"position":[[127,7]]}]],["copy_only_attribut",[24,{"position":[[0,20]]},81,{"position":[[0,20]]},117,{"position":[[0,20]]},171,{"position":[[0,20]]},195,{"position":[[0,20]]},258,{"position":[[0,20]]},294,{"position":[[0,20]]},324,{"position":[[0,20]]},369,{"position":[[0,20]]},420,{"position":[[0,20]]},465,{"position":[[0,20]]},516,{"position":[[0,20]]},546,{"position":[[0,20]]},588,{"position":[[0,20]]},630,{"position":[[0,20]]},660,{"position":[[0,20]]},696,{"position":[[0,20]]},729,{"position":[[0,20]]},828,{"position":[[0,20]]},894,{"position":[[0,20]]},1284,{"position":[[0,20]]}],[],[]],["opshin.type_impls.functiontype.copy_only_attribut",[],[25,{"position":[[0,51]]}],[]],["copi",[],[],[26,{"position":[[10,4]]},83,{"position":[[32,4]]},119,{"position":[[10,4]]},173,{"position":[[10,4]]},197,{"position":[[10,4]]},260,{"position":[[10,4]]},296,{"position":[[10,4]]},326,{"position":[[10,4]]},371,{"position":[[10,4]]},422,{"position":[[10,4]]},467,{"position":[[10,4]]},518,{"position":[[32,4]]},548,{"position":[[10,4]]},590,{"position":[[10,4]]},632,{"position":[[10,4]]},662,{"position":[[10,4]]},698,{"position":[[10,4]]},731,{"position":[[10,4]]},830,{"position":[[10,4]]},896,{"position":[[32,4]]},1286,{"position":[[10,4]]},4472,{"position":[[100,6]]}]],["declar",[],[],[26,{"position":[[42,8]]},119,{"position":[[42,8]]},173,{"position":[[42,8]]},197,{"position":[[42,8]]},260,{"position":[[42,8]]},296,{"position":[[42,8]]},326,{"position":[[42,8]]},371,{"position":[[42,8]]},422,{"position":[[42,8]]},467,{"position":[[42,8]]},548,{"position":[[42,8]]},590,{"position":[[42,8]]},632,{"position":[[42,8]]},662,{"position":[[42,8]]},698,{"position":[[42,8]]},731,{"position":[[42,8]]},830,{"position":[[42,8]]},1286,{"position":[[42,8]]}]],["attribut",[36,{"position":[[0,9]]},72,{"position":[[0,9]]},129,{"position":[[0,9]]},162,{"position":[[0,9]]},207,{"position":[[0,9]]},249,{"position":[[0,9]]},285,{"position":[[0,9]]},336,{"position":[[0,9]]},381,{"position":[[0,9]]},414,{"position":[[0,9]]},459,{"position":[[0,9]]},507,{"position":[[0,9]]},555,{"position":[[0,9]]},579,{"position":[[0,9]]},621,{"position":[[0,9]]},669,{"position":[[0,9]]},708,{"position":[[0,9]]},741,{"position":[[0,9]]},840,{"position":[[0,9]]},885,{"position":[[0,9]]},1281,{"position":[[0,9]]},4410,{"position":[[0,10]]}],[],[26,{"position":[[51,10]]},35,{"position":[[23,10]]},38,{"position":[[4,10]]},71,{"position":[[23,10]]},74,{"position":[[4,10]]},83,{"position":[[49,10]]},119,{"position":[[51,10]]},128,{"position":[[23,10]]},131,{"position":[[4,10]]},161,{"position":[[23,10]]},164,{"position":[[4,10]]},173,{"position":[[51,10]]},197,{"position":[[51,10]]},206,{"position":[[23,10]]},209,{"position":[[4,10]]},248,{"position":[[23,10]]},251,{"position":[[4,10]]},260,{"position":[[51,10]]},284,{"position":[[23,10]]},287,{"position":[[4,10]]},296,{"position":[[51,10]]},326,{"position":[[51,10]]},335,{"position":[[23,10]]},338,{"position":[[4,10]]},371,{"position":[[51,10]]},380,{"position":[[23,10]]},383,{"position":[[4,10]]},413,{"position":[[23,10]]},416,{"position":[[4,10]]},422,{"position":[[51,10]]},458,{"position":[[23,10]]},461,{"position":[[4,10]]},467,{"position":[[51,10]]},506,{"position":[[23,10]]},509,{"position":[[4,10]]},518,{"position":[[49,10]]},548,{"position":[[51,10]]},554,{"position":[[23,10]]},557,{"position":[[4,10]]},578,{"position":[[23,10]]},581,{"position":[[4,10]]},590,{"position":[[51,10]]},620,{"position":[[23,10]]},623,{"position":[[4,10]]},632,{"position":[[51,10]]},662,{"position":[[51,10]]},668,{"position":[[23,10]]},671,{"position":[[4,10]]},698,{"position":[[51,10]]},707,{"position":[[23,10]]},710,{"position":[[4,10]]},731,{"position":[[51,10]]},740,{"position":[[23,10]]},743,{"position":[[4,10]]},830,{"position":[[51,10]]},839,{"position":[[23,10]]},842,{"position":[[4,10]]},884,{"position":[[23,10]]},887,{"position":[[4,10]]},896,{"position":[[49,10]]},1280,{"position":[[23,10]]},1283,{"position":[[4,10]]},1286,{"position":[[51,10]]},1316,{"position":[[139,9],[418,10]]},2765,{"position":[[920,11],[1426,9]]},2873,{"position":[[920,11],[1426,9]]},2936,{"position":[[920,11],[1426,9]]},3602,{"position":[[920,11],[1426,9]]},3908,{"position":[[920,11],[1426,9]]},4121,{"position":[[920,11],[1426,9]]},4709,{"position":[[139,9],[418,10]]},4760,{"position":[[139,9],[418,10]]}]],["map",[],[],[26,{"position":[[62,7]]},56,{"position":[[10,3]]},98,{"position":[[10,3]]},119,{"position":[[62,7]]},152,{"position":[[10,3]]},158,{"position":[[10,3]]},173,{"position":[[62,7]]},197,{"position":[[62,7]]},230,{"position":[[10,3]]},239,{"position":[[10,3]]},260,{"position":[[62,7]]},281,{"position":[[10,3]]},296,{"position":[[62,7]]},326,{"position":[[62,7]]},356,{"position":[[10,3]]},371,{"position":[[62,7]]},401,{"position":[[10,3]]},410,{"position":[[10,3]]},422,{"position":[[62,7]]},455,{"position":[[10,3]]},467,{"position":[[62,7]]},497,{"position":[[10,3]]},536,{"position":[[10,3]]},548,{"position":[[62,7]]},590,{"position":[[62,7]]},608,{"position":[[10,3]]},614,{"position":[[10,3]]},632,{"position":[[62,7]]},662,{"position":[[62,7]]},686,{"position":[[10,3]]},698,{"position":[[62,7]]},725,{"position":[[10,3]]},731,{"position":[[62,7]]},764,{"position":[[10,3]]},830,{"position":[[62,7]]},863,{"position":[[10,3]]},875,{"position":[[10,3]]},1286,{"position":[[62,7]]},1313,{"position":[[10,3]]},4235,{"position":[[134,7]]}]],["builtin",[4470,{"position":[[0,8]]}],[],[26,{"position":[[73,7]]},119,{"position":[[73,7]]},173,{"position":[[73,7]]},197,{"position":[[73,7]]},260,{"position":[[73,7]]},296,{"position":[[73,7]]},326,{"position":[[73,7]]},371,{"position":[[73,7]]},422,{"position":[[73,7]]},467,{"position":[[73,7]]},548,{"position":[[73,7]]},590,{"position":[[73,7]]},632,{"position":[[73,7]]},662,{"position":[[73,7]]},698,{"position":[[73,7]]},731,{"position":[[73,7]]},824,{"position":[[18,7]]},830,{"position":[[73,7]]},1286,{"position":[[73,7]]},4469,{"position":[[61,7]]}]],["valu",[1497,{"position":[[0,5]]},1599,{"position":[[0,5]]},1626,{"position":[[0,5]]},1635,{"position":[[0,5]]},2472,{"position":[[0,5]]},2496,{"position":[[0,5]]},2505,{"position":[[0,5]]},2523,{"position":[[0,5]]},2568,{"position":[[0,5]]},2619,{"position":[[0,5]]},2631,{"position":[[0,5]]},2646,{"position":[[0,6]]},2700,{"position":[[0,6]]},2718,{"position":[[0,5]]},2727,{"position":[[0,5]]}],[],[26,{"position":[[81,7]]},119,{"position":[[81,7]]},173,{"position":[[81,7]]},197,{"position":[[81,7]]},260,{"position":[[81,7]]},296,{"position":[[81,7]]},326,{"position":[[81,7]]},371,{"position":[[81,7]]},422,{"position":[[81,7]]},467,{"position":[[81,7]]},548,{"position":[[81,7]]},590,{"position":[[81,7]]},632,{"position":[[81,7]]},662,{"position":[[81,7]]},698,{"position":[[81,7]]},731,{"position":[[81,7]]},830,{"position":[[81,7]]},926,{"position":[[159,5],[237,5],[361,6],[379,5]]},941,{"position":[[159,5],[237,5],[361,6],[379,5]]},965,{"position":[[159,5],[237,5],[361,6],[379,5]]},986,{"position":[[159,5],[237,5],[361,6],[379,5]]},1004,{"position":[[159,5],[237,5],[361,6],[379,5]]},1025,{"position":[[159,5],[237,5],[361,6],[379,5]]},1040,{"position":[[159,5],[237,5],[361,6],[379,5]]},1061,{"position":[[159,5],[237,5],[361,6],[379,5]]},1082,{"position":[[140,5],[532,5]]},1100,{"position":[[159,5],[237,5],[361,6],[379,5]]},1145,{"position":[[159,5],[237,5],[361,6],[379,5]]},1163,{"position":[[159,5],[237,5],[361,6],[379,5]]},1169,{"position":[[159,5],[237,5],[361,6],[379,5]]},1184,{"position":[[159,5],[237,5],[361,6],[379,5]]},1199,{"position":[[159,5],[237,5],[361,6],[379,5]]},1214,{"position":[[159,5],[237,5],[361,6],[379,5]]},1232,{"position":[[159,5],[237,5],[361,6],[379,5]]},1247,{"position":[[159,5],[237,5],[361,6],[379,5]]},1286,{"position":[[81,7]]},1316,{"position":[[173,5]]},1328,{"position":[[159,5],[237,5],[361,6],[379,5]]},1355,{"position":[[159,5],[237,5],[361,6],[379,5]]},1370,{"position":[[23,5]]},1373,{"position":[[159,5],[237,5],[361,6],[379,5]]},1388,{"position":[[159,5],[237,5],[361,6],[379,5]]},1403,{"position":[[159,5],[237,5],[361,6],[379,5]]},1424,{"position":[[159,5],[237,5],[361,6],[379,5]]},1445,{"position":[[103,6]]},1454,{"position":[[127,6]]},1460,{"position":[[129,6]]},1478,{"position":[[70,6]]},1487,{"position":[[69,6]]},1595,{"position":[[106,6]]},2000,{"position":[[159,5],[237,5],[361,6],[379,5]]},2015,{"position":[[159,5],[237,5],[361,6],[379,5]]},2030,{"position":[[140,5],[532,5]]},2048,{"position":[[140,5],[532,5]]},2072,{"position":[[159,5],[237,5],[361,6],[379,5]]},2126,{"position":[[140,5],[532,5]]},2144,{"position":[[140,5],[532,5]]},2177,{"position":[[159,5],[237,5],[361,6],[379,5]]},2249,{"position":[[159,5],[237,5],[361,6],[379,5]]},2255,{"position":[[140,5],[532,5]]},2264,{"position":[[159,5],[237,5],[361,6],[379,5]]},2279,{"position":[[140,5],[532,5]]},2309,{"position":[[140,5],[532,5]]},2330,{"position":[[140,5],[532,5]]},2408,{"position":[[30,7],[68,6],[257,7],[401,6],[498,6],[519,6],[543,6],[669,6],[728,7],[756,6],[794,6],[853,6],[905,6]]},2414,{"position":[[347,6],[405,6],[477,6],[532,6],[1303,6]]},2444,{"position":[[347,6],[405,6],[477,6],[532,6],[1303,6]]},2471,{"position":[[13,6]]},2477,{"position":[[347,6],[405,6],[477,6],[532,6],[1303,6]]},2495,{"position":[[10,6]]},2501,{"position":[[26,6]]},2516,{"position":[[46,6]]},2564,{"position":[[30,6]]},2573,{"position":[[18,6]]},2588,{"position":[[30,7],[68,6],[257,7],[401,6],[498,6],[519,6],[543,6],[669,6],[728,7],[756,6],[794,6],[853,6],[905,6]]},2615,{"position":[[24,6]]},2630,{"position":[[20,6]]},2645,{"position":[[15,7]]},2654,{"position":[[21,7]]},2660,{"position":[[347,6],[405,6],[477,6],[532,6],[1303,6]]},2699,{"position":[[23,7]]},2717,{"position":[[15,6]]},2726,{"position":[[15,6]]},2747,{"position":[[30,7],[68,6],[257,7],[401,6],[498,6],[519,6],[543,6],[669,6],[728,7],[756,6],[794,6],[853,6],[905,6]]},4256,{"position":[[159,5],[237,5],[361,6],[379,5]]},4400,{"position":[[140,5],[532,5]]},4643,{"position":[[104,6]]},4709,{"position":[[173,5]]},4760,{"position":[[173,5]]},4862,{"position":[[84,6]]},4880,{"position":[[84,6]]}]],["thu",[],[],[26,{"position":[[89,4]]},119,{"position":[[89,4]]},173,{"position":[[89,4]]},197,{"position":[[89,4]]},260,{"position":[[89,4]]},296,{"position":[[89,4]]},326,{"position":[[89,4]]},371,{"position":[[89,4]]},422,{"position":[[89,4]]},467,{"position":[[89,4]]},548,{"position":[[89,4]]},590,{"position":[[89,4]]},632,{"position":[[89,4]]},662,{"position":[[89,4]]},698,{"position":[[89,4]]},731,{"position":[[89,4]]},830,{"position":[[89,4]]},1286,{"position":[[89,4]]},1454,{"position":[[63,4]]},1460,{"position":[[64,4]]}]],["atom",[],[],[26,{"position":[[103,6]]},119,{"position":[[103,6]]},173,{"position":[[103,6]]},197,{"position":[[103,6]]},260,{"position":[[103,6]]},296,{"position":[[103,6]]},326,{"position":[[103,6]]},371,{"position":[[103,6]]},422,{"position":[[103,6]]},467,{"position":[[103,6]]},548,{"position":[[103,6]]},590,{"position":[[103,6]]},632,{"position":[[103,6]]},662,{"position":[[103,6]]},698,{"position":[[103,6]]},731,{"position":[[103,6]]},830,{"position":[[103,6]]},1286,{"position":[[103,6]]}]],["anyth",[],[],[26,{"position":[[126,8]]},119,{"position":[[126,8]]},155,{"position":[[96,9]]},173,{"position":[[126,8]]},197,{"position":[[126,8]]},260,{"position":[[126,8]]},296,{"position":[[126,8]]},326,{"position":[[126,8]]},371,{"position":[[126,8]]},422,{"position":[[126,8]]},467,{"position":[[126,8]]},548,{"position":[[126,8]]},590,{"position":[[126,8]]},632,{"position":[[126,8]]},662,{"position":[[126,8]]},698,{"position":[[126,8]]},731,{"position":[[126,8]]},830,{"position":[[126,8]]},1286,{"position":[[126,8]]}]],["record",[99,{"position":[[0,6]]},234,{"position":[[0,6]]}],[],[26,{"position":[[139,6]]},119,{"position":[[139,6]]},173,{"position":[[139,6]]},197,{"position":[[139,6]]},260,{"position":[[139,6]]},296,{"position":[[139,6]]},326,{"position":[[139,6]]},371,{"position":[[139,6]]},422,{"position":[[139,6]]},467,{"position":[[139,6]]},548,{"position":[[139,6]]},590,{"position":[[139,6]]},632,{"position":[[139,6]]},662,{"position":[[139,6]]},698,{"position":[[139,6]]},731,{"position":[[139,6]]},830,{"position":[[139,6]]},1286,{"position":[[139,6]]},2243,{"position":[[27,6],[71,6],[143,6]]}]],["union",[],[],[26,{"position":[[156,5]]},119,{"position":[[156,5]]},173,{"position":[[156,5]]},197,{"position":[[156,5]]},260,{"position":[[156,5]]},296,{"position":[[156,5]]},326,{"position":[[156,5]]},371,{"position":[[156,5]]},422,{"position":[[156,5]]},467,{"position":[[156,5]]},548,{"position":[[156,5]]},590,{"position":[[156,5]]},632,{"position":[[156,5]]},662,{"position":[[156,5]]},698,{"position":[[156,5]]},731,{"position":[[156,5]]},830,{"position":[[156,5]]},1286,{"position":[[156,5]]}]],["ident",[],[],[26,{"position":[[181,8]]},119,{"position":[[181,8]]},173,{"position":[[181,8]]},197,{"position":[[181,8]]},260,{"position":[[181,8]]},296,{"position":[[181,8]]},326,{"position":[[181,8]]},371,{"position":[[181,8]]},422,{"position":[[181,8]]},467,{"position":[[181,8]]},548,{"position":[[181,8]]},590,{"position":[[181,8]]},632,{"position":[[181,8]]},662,{"position":[[181,8]]},698,{"position":[[181,8]]},731,{"position":[[181,8]]},830,{"position":[[181,8]]},1286,{"position":[[181,8]]}]],["constr_typ",[27,{"position":[[0,11]]},63,{"position":[[0,11]]},120,{"position":[[0,11]]},174,{"position":[[0,11]]},198,{"position":[[0,11]]},240,{"position":[[0,11]]},297,{"position":[[0,11]]},327,{"position":[[0,11]]},372,{"position":[[0,11]]},423,{"position":[[0,11]]},468,{"position":[[0,11]]},498,{"position":[[0,11]]},537,{"position":[[0,11]]},573,{"position":[[0,11]]},615,{"position":[[0,11]]},651,{"position":[[0,11]]},699,{"position":[[0,11]]},732,{"position":[[0,11]]},831,{"position":[[0,11]]},876,{"position":[[0,11]]},1287,{"position":[[0,11]]}],[],[]],["opshin.type_impls.functiontype.constr_typ",[],[28,{"position":[[0,42]]}],[]],["constructor",[108,{"position":[[0,11]]},4407,{"position":[[0,11]]}],[],[29,{"position":[[16,11]]},32,{"position":[[4,11]]},56,{"position":[[23,11]]},65,{"position":[[16,11]]},68,{"position":[[4,11]]},98,{"position":[[23,11]]},101,{"position":[[34,12]]},122,{"position":[[16,11]]},125,{"position":[[4,11]]},152,{"position":[[23,11]]},158,{"position":[[23,11]]},176,{"position":[[16,11]]},179,{"position":[[4,11]]},200,{"position":[[16,11]]},203,{"position":[[4,11]]},230,{"position":[[23,11]]},239,{"position":[[23,11]]},242,{"position":[[16,11]]},245,{"position":[[4,11]]},281,{"position":[[23,11]]},299,{"position":[[16,11]]},302,{"position":[[4,11]]},329,{"position":[[16,11]]},332,{"position":[[4,11]]},356,{"position":[[23,11]]},374,{"position":[[16,11]]},377,{"position":[[4,11]]},401,{"position":[[23,11]]},410,{"position":[[23,11]]},425,{"position":[[16,11]]},428,{"position":[[4,11]]},455,{"position":[[23,11]]},470,{"position":[[16,11]]},473,{"position":[[4,11]]},497,{"position":[[23,11]]},500,{"position":[[16,11]]},503,{"position":[[4,11]]},536,{"position":[[23,11]]},539,{"position":[[16,11]]},551,{"position":[[4,11]]},575,{"position":[[16,11]]},593,{"position":[[4,11]]},608,{"position":[[23,11]]},614,{"position":[[23,11]]},617,{"position":[[16,11]]},635,{"position":[[4,11]]},653,{"position":[[16,11]]},665,{"position":[[4,11]]},686,{"position":[[23,11]]},701,{"position":[[16,11]]},704,{"position":[[4,11]]},725,{"position":[[23,11]]},734,{"position":[[16,11]]},737,{"position":[[4,11]]},764,{"position":[[23,11]]},833,{"position":[[16,11]]},836,{"position":[[4,11]]},863,{"position":[[23,11]]},875,{"position":[[23,11]]},878,{"position":[[16,11]]},881,{"position":[[4,11]]},1289,{"position":[[16,11]]},1292,{"position":[[4,11]]},1313,{"position":[[23,11]]},2765,{"position":[[277,11]]},2873,{"position":[[277,11]]},2936,{"position":[[277,11]]},3602,{"position":[[277,11]]},3908,{"position":[[277,11]]},4121,{"position":[[277,11]]},4559,{"position":[[20,11]]},4676,{"position":[[114,11]]}]],["class",[],[],[29,{"position":[[37,5]]},32,{"position":[[25,5]]},35,{"position":[[42,5]]},38,{"position":[[23,6]]},65,{"position":[[37,5]]},68,{"position":[[25,5]]},71,{"position":[[42,5]]},74,{"position":[[23,6]]},122,{"position":[[37,5]]},125,{"position":[[25,5]]},128,{"position":[[42,5]]},131,{"position":[[23,6]]},161,{"position":[[42,5]]},164,{"position":[[23,6]]},176,{"position":[[37,5]]},179,{"position":[[25,5]]},200,{"position":[[37,5]]},203,{"position":[[25,5]]},206,{"position":[[42,5]]},209,{"position":[[23,6]]},242,{"position":[[37,5]]},245,{"position":[[25,5]]},248,{"position":[[42,5]]},251,{"position":[[23,6]]},284,{"position":[[42,5]]},287,{"position":[[23,6]]},299,{"position":[[37,5]]},302,{"position":[[25,5]]},329,{"position":[[37,5]]},332,{"position":[[25,5]]},335,{"position":[[42,5]]},338,{"position":[[23,6]]},374,{"position":[[37,5]]},377,{"position":[[25,5]]},380,{"position":[[42,5]]},383,{"position":[[23,6]]},413,{"position":[[42,5]]},416,{"position":[[23,6]]},425,{"position":[[37,5]]},428,{"position":[[25,5]]},458,{"position":[[42,5]]},461,{"position":[[23,6]]},470,{"position":[[37,5]]},473,{"position":[[25,5]]},500,{"position":[[37,5]]},503,{"position":[[25,5]]},506,{"position":[[42,5]]},509,{"position":[[23,6]]},539,{"position":[[37,5]]},551,{"position":[[25,5]]},554,{"position":[[42,5]]},557,{"position":[[23,6]]},575,{"position":[[37,5]]},578,{"position":[[42,5]]},581,{"position":[[23,6]]},593,{"position":[[25,5]]},617,{"position":[[37,5]]},620,{"position":[[42,5]]},623,{"position":[[23,6]]},635,{"position":[[25,5]]},653,{"position":[[37,5]]},665,{"position":[[25,5]]},668,{"position":[[42,5]]},671,{"position":[[23,6]]},701,{"position":[[37,5]]},704,{"position":[[25,5]]},707,{"position":[[42,5]]},710,{"position":[[23,6]]},734,{"position":[[37,5]]},737,{"position":[[25,5]]},740,{"position":[[42,5]]},743,{"position":[[23,6]]},833,{"position":[[37,5]]},836,{"position":[[25,5]]},839,{"position":[[42,5]]},842,{"position":[[23,6]]},878,{"position":[[37,5]]},881,{"position":[[25,5]]},884,{"position":[[42,5]]},887,{"position":[[23,6]]},926,{"position":[[2,7],[554,5]]},941,{"position":[[2,7],[554,5]]},965,{"position":[[2,7],[554,5]]},986,{"position":[[2,7],[554,5]]},1004,{"position":[[2,7],[554,5]]},1025,{"position":[[2,7],[554,5]]},1040,{"position":[[2,7],[554,5]]},1061,{"position":[[2,7],[554,5]]},1082,{"position":[[20,5],[192,5],[331,5]]},1100,{"position":[[2,7],[554,5]]},1145,{"position":[[2,7],[554,5]]},1163,{"position":[[2,7],[554,5]]},1169,{"position":[[2,7],[554,5]]},1184,{"position":[[2,7],[554,5]]},1199,{"position":[[2,7],[554,5]]},1214,{"position":[[2,7],[554,5]]},1232,{"position":[[2,7],[554,5]]},1247,{"position":[[2,7],[554,5]]},1277,{"position":[[9,5]]},1280,{"position":[[42,5]]},1283,{"position":[[23,6]]},1289,{"position":[[37,5]]},1292,{"position":[[25,5]]},1316,{"position":[[66,5]]},1328,{"position":[[2,7],[554,5]]},1355,{"position":[[2,7],[554,5]]},1373,{"position":[[2,7],[554,5]]},1388,{"position":[[2,7],[554,5]]},1403,{"position":[[2,7],[554,5]]},1424,{"position":[[2,7],[554,5]]},1439,{"position":[[28,7]]},1442,{"position":[[29,7]]},2000,{"position":[[2,7],[554,5]]},2015,{"position":[[2,7],[554,5]]},2030,{"position":[[20,5],[192,5],[331,5]]},2048,{"position":[[20,5],[192,5],[331,5]]},2072,{"position":[[2,7],[554,5]]},2126,{"position":[[20,5],[192,5],[331,5]]},2144,{"position":[[20,5],[192,5],[331,5]]},2177,{"position":[[2,7],[554,5]]},2234,{"position":[[206,8]]},2249,{"position":[[2,7],[554,5]]},2255,{"position":[[20,5],[192,5],[331,5]]},2261,{"position":[[12,5]]},2264,{"position":[[2,7],[554,5]]},2279,{"position":[[20,5],[192,5],[331,5]]},2309,{"position":[[20,5],[192,5],[331,5]]},2330,{"position":[[20,5],[192,5],[331,5]]},2765,{"position":[[2,5],[632,5],[790,7],[1516,5]]},2873,{"position":[[2,5],[632,5],[790,7],[1516,5]]},2936,{"position":[[2,5],[632,5],[790,7],[1516,5]]},3602,{"position":[[2,5],[632,5],[790,7],[1516,5]]},3908,{"position":[[2,5],[632,5],[790,7],[1516,5]]},4121,{"position":[[2,5],[632,5],[790,7],[1516,5]]},4256,{"position":[[2,7],[554,5]]},4400,{"position":[[20,5],[192,5],[331,5]]},4562,{"position":[[29,8]]},4709,{"position":[[66,5]]},4760,{"position":[[66,5]]},4847,{"position":[[296,6]]}]],["constr",[30,{"position":[[0,6]]},66,{"position":[[0,6]]},123,{"position":[[0,6]]},177,{"position":[[0,6]]},201,{"position":[[0,6]]},243,{"position":[[0,6]]},300,{"position":[[0,6]]},330,{"position":[[0,6]]},375,{"position":[[0,6]]},426,{"position":[[0,6]]},471,{"position":[[0,6]]},501,{"position":[[0,6]]},549,{"position":[[0,6]]},591,{"position":[[0,6]]},633,{"position":[[0,6]]},663,{"position":[[0,6]]},702,{"position":[[0,6]]},735,{"position":[[0,6]]},834,{"position":[[0,6]]},879,{"position":[[0,6]]},1290,{"position":[[0,6]]}],[],[]],["opshin.type_impls.functiontype.constr",[],[31,{"position":[[0,37]]}],[]],["attribute_typ",[33,{"position":[[0,14]]},69,{"position":[[0,14]]},126,{"position":[[0,14]]},159,{"position":[[0,14]]},204,{"position":[[0,14]]},246,{"position":[[0,14]]},282,{"position":[[0,14]]},333,{"position":[[0,14]]},378,{"position":[[0,14]]},411,{"position":[[0,14]]},456,{"position":[[0,14]]},504,{"position":[[0,14]]},552,{"position":[[0,14]]},576,{"position":[[0,14]]},618,{"position":[[0,14]]},666,{"position":[[0,14]]},705,{"position":[[0,14]]},738,{"position":[[0,14]]},837,{"position":[[0,14]]},882,{"position":[[0,14]]},1278,{"position":[[0,14]]}],[],[]],["opshin.type_impls.functiontype.attribute_typ",[],[34,{"position":[[0,45]]}],[]],["name",[102,{"position":[[0,4]]},4401,{"position":[[0,4]]}],[],[35,{"position":[[17,5]]},71,{"position":[[17,5]]},128,{"position":[[17,5]]},161,{"position":[[17,5]]},206,{"position":[[17,5]]},248,{"position":[[17,5]]},284,{"position":[[17,5]]},335,{"position":[[17,5]]},380,{"position":[[17,5]]},413,{"position":[[17,5]]},458,{"position":[[17,5]]},506,{"position":[[17,5]]},554,{"position":[[17,5]]},578,{"position":[[17,5]]},620,{"position":[[17,5]]},668,{"position":[[17,5]]},707,{"position":[[17,5]]},740,{"position":[[17,5]]},839,{"position":[[17,5]]},884,{"position":[[17,5]]},926,{"position":[[516,4]]},941,{"position":[[516,4]]},965,{"position":[[516,4]]},986,{"position":[[516,4]]},1004,{"position":[[516,4]]},1025,{"position":[[516,4]]},1040,{"position":[[516,4]]},1061,{"position":[[516,4]]},1082,{"position":[[337,4]]},1100,{"position":[[516,4]]},1145,{"position":[[516,4]]},1163,{"position":[[516,4]]},1169,{"position":[[516,4]]},1184,{"position":[[516,4]]},1199,{"position":[[516,4]]},1214,{"position":[[516,4]]},1232,{"position":[[516,4]]},1247,{"position":[[516,4]]},1280,{"position":[[17,5]]},1316,{"position":[[203,4]]},1328,{"position":[[516,4]]},1355,{"position":[[516,4]]},1373,{"position":[[516,4]]},1388,{"position":[[516,4]]},1403,{"position":[[516,4]]},1424,{"position":[[516,4]]},2000,{"position":[[516,4]]},2015,{"position":[[516,4]]},2030,{"position":[[337,4]]},2048,{"position":[[337,4]]},2072,{"position":[[516,4]]},2126,{"position":[[337,4]]},2144,{"position":[[337,4]]},2177,{"position":[[516,4]]},2234,{"position":[[256,4],[365,4]]},2249,{"position":[[516,4]]},2255,{"position":[[337,4]]},2264,{"position":[[516,4]]},2279,{"position":[[337,4]]},2309,{"position":[[337,4]]},2327,{"position":[[21,5]]},2330,{"position":[[337,4]]},2351,{"position":[[21,5]]},2414,{"position":[[30,5],[151,5],[264,5],[1170,6],[1216,6],[1255,6],[1284,6]]},2444,{"position":[[30,5],[151,5],[264,5],[1170,6],[1216,6],[1255,6],[1284,6]]},2450,{"position":[[23,5]]},2477,{"position":[[30,5],[151,5],[264,5],[1170,6],[1216,6],[1255,6],[1284,6]]},2510,{"position":[[20,5]]},2660,{"position":[[30,5],[151,5],[264,5],[1170,6],[1216,6],[1255,6],[1284,6]]},2765,{"position":[[109,5],[303,4],[1540,5],[1651,5]]},2873,{"position":[[109,5],[303,4],[1540,5],[1651,5]]},2936,{"position":[[109,5],[303,4],[1540,5],[1651,5]]},3602,{"position":[[109,5],[303,4],[1540,5],[1651,5]]},3908,{"position":[[109,5],[303,4],[1540,5],[1651,5]]},4121,{"position":[[109,5],[303,4],[1540,5],[1651,5]]},4235,{"position":[[121,4],[155,5]]},4256,{"position":[[516,4]]},4400,{"position":[[337,4]]},4709,{"position":[[203,4]]},4760,{"position":[[203,4]]},4868,{"position":[[44,4]]}]],["opshin.type_impls.functiontype.attribut",[],[37,{"position":[[0,40]]}],[]],["lambda",[],[],[38,{"position":[[44,6]]},41,{"position":[[79,6]]},74,{"position":[[44,6]]},77,{"position":[[79,6]]},131,{"position":[[44,6]]},134,{"position":[[79,6]]},164,{"position":[[43,6]]},167,{"position":[[79,6]]},209,{"position":[[44,6]]},212,{"position":[[79,6]]},251,{"position":[[43,6]]},254,{"position":[[79,6]]},287,{"position":[[44,6]]},290,{"position":[[79,6]]},338,{"position":[[44,6]]},341,{"position":[[79,6]]},383,{"position":[[44,6]]},386,{"position":[[79,6]]},416,{"position":[[44,6]]},431,{"position":[[79,6]]},461,{"position":[[44,6]]},476,{"position":[[79,6]]},509,{"position":[[44,6]]},512,{"position":[[79,6]]},542,{"position":[[79,6]]},557,{"position":[[44,6]]},581,{"position":[[44,6]]},584,{"position":[[79,6]]},623,{"position":[[44,6]]},626,{"position":[[79,6]]},656,{"position":[[79,6]]},671,{"position":[[44,6]]},692,{"position":[[79,6]]},710,{"position":[[44,6]]},743,{"position":[[44,6]]},746,{"position":[[79,6]]},842,{"position":[[44,6]]},845,{"position":[[79,6]]},887,{"position":[[44,6]]},890,{"position":[[79,6]]},1283,{"position":[[44,6]]},1295,{"position":[[79,6]]},2300,{"position":[[40,7]]}]],["expect",[],[],[38,{"position":[[56,7]]},41,{"position":[[91,7]]},74,{"position":[[56,7]]},77,{"position":[[91,7]]},131,{"position":[[56,7]]},134,{"position":[[91,7]]},164,{"position":[[55,7]]},167,{"position":[[91,7]]},209,{"position":[[56,7]]},212,{"position":[[91,7]]},251,{"position":[[55,7]]},254,{"position":[[91,7]]},287,{"position":[[56,7]]},290,{"position":[[91,7]]},338,{"position":[[56,7]]},341,{"position":[[91,7]]},383,{"position":[[56,7]]},386,{"position":[[91,7]]},416,{"position":[[56,7]]},431,{"position":[[91,7]]},461,{"position":[[56,7]]},476,{"position":[[91,7]]},509,{"position":[[56,7]]},512,{"position":[[91,7]]},542,{"position":[[91,7]]},557,{"position":[[56,7]]},581,{"position":[[56,7]]},584,{"position":[[91,7]]},623,{"position":[[56,7]]},626,{"position":[[91,7]]},656,{"position":[[91,7]]},671,{"position":[[56,7]]},692,{"position":[[91,7]]},710,{"position":[[56,7]]},743,{"position":[[56,7]]},746,{"position":[[91,7]]},842,{"position":[[56,7]]},845,{"position":[[91,7]]},887,{"position":[[56,7]]},890,{"position":[[91,7]]},1283,{"position":[[56,7]]},1295,{"position":[[91,7]]},1883,{"position":[[0,7]]},4844,{"position":[[0,7]]},4853,{"position":[[0,7]]}]],["itself",[],[],[38,{"position":[[93,6]]},41,{"position":[[128,6]]},74,{"position":[[93,6]]},77,{"position":[[128,6]]},131,{"position":[[93,6]]},134,{"position":[[128,6]]},164,{"position":[[92,6]]},167,{"position":[[128,6]]},209,{"position":[[93,6]]},212,{"position":[[128,6]]},251,{"position":[[92,6]]},254,{"position":[[128,6]]},287,{"position":[[93,6]]},290,{"position":[[128,6]]},338,{"position":[[93,6]]},341,{"position":[[128,6]]},383,{"position":[[93,6]]},386,{"position":[[128,6]]},416,{"position":[[93,6]]},431,{"position":[[128,6]]},461,{"position":[[93,6]]},476,{"position":[[128,6]]},509,{"position":[[93,6]]},512,{"position":[[128,6]]},542,{"position":[[128,6]]},557,{"position":[[93,6]]},581,{"position":[[93,6]]},584,{"position":[[128,6]]},623,{"position":[[93,6]]},626,{"position":[[128,6]]},656,{"position":[[128,6]]},671,{"position":[[93,6]]},692,{"position":[[128,6]]},710,{"position":[[93,6]]},743,{"position":[[93,6]]},746,{"position":[[128,6]]},842,{"position":[[93,6]]},845,{"position":[[128,6]]},887,{"position":[[93,6]]},890,{"position":[[128,6]]},1283,{"position":[[93,6]]},1295,{"position":[[128,6]]},2765,{"position":[[73,6]]},2873,{"position":[[73,6]]},2936,{"position":[[73,6]]},3602,{"position":[[73,6]]},3908,{"position":[[73,6]]},4121,{"position":[[73,6]]}]],["cmp",[39,{"position":[[0,3]]},75,{"position":[[0,3]]},132,{"position":[[0,3]]},165,{"position":[[0,3]]},210,{"position":[[0,3]]},252,{"position":[[0,3]]},288,{"position":[[0,3]]},339,{"position":[[0,3]]},384,{"position":[[0,3]]},429,{"position":[[0,3]]},474,{"position":[[0,3]]},510,{"position":[[0,3]]},540,{"position":[[0,3]]},582,{"position":[[0,3]]},624,{"position":[[0,3]]},654,{"position":[[0,3]]},690,{"position":[[0,3]]},744,{"position":[[0,3]]},843,{"position":[[0,3]]},888,{"position":[[0,3]]},1293,{"position":[[0,3]]}],[],[]],["opshin.type_impls.functiontype.cmp",[],[40,{"position":[[0,34]]}],[]],["compar",[1839,{"position":[[0,7]]},2679,{"position":[[0,11]]}],[],[41,{"position":[[22,9]]},77,{"position":[[22,9]]},134,{"position":[[22,9]]},155,{"position":[[85,7]]},167,{"position":[[22,9]]},212,{"position":[[22,9]]},254,{"position":[[22,9]]},290,{"position":[[22,9]]},341,{"position":[[22,9]]},386,{"position":[[22,9]]},431,{"position":[[22,9]]},476,{"position":[[22,9]]},512,{"position":[[22,9]]},542,{"position":[[22,9]]},584,{"position":[[22,9]]},626,{"position":[[22,9]]},656,{"position":[[22,9]]},692,{"position":[[22,9]]},746,{"position":[[22,9]]},845,{"position":[[22,9]]},890,{"position":[[22,9]]},1295,{"position":[[22,9]]},2408,{"position":[[587,12]]},2588,{"position":[[587,12]]},2672,{"position":[[35,12]]},2747,{"position":[[587,12]]}]],["o",[],[],[41,{"position":[[50,1]]},77,{"position":[[50,1]]},134,{"position":[[50,1]]},167,{"position":[[50,1]]},212,{"position":[[50,1]]},254,{"position":[[50,1]]},290,{"position":[[50,1]]},341,{"position":[[50,1]]},386,{"position":[[50,1]]},431,{"position":[[50,1]]},476,{"position":[[50,1]]},512,{"position":[[50,1]]},542,{"position":[[50,1]]},584,{"position":[[50,1]]},626,{"position":[[50,1]]},656,{"position":[[50,1]]},692,{"position":[[50,1]]},746,{"position":[[50,1]]},845,{"position":[[50,1]]},890,{"position":[[50,1]]},1295,{"position":[[50,1]]}]],["via",[],[],[41,{"position":[[52,3]]},77,{"position":[[52,3]]},134,{"position":[[52,3]]},167,{"position":[[52,3]]},212,{"position":[[52,3]]},254,{"position":[[52,3]]},290,{"position":[[52,3]]},341,{"position":[[52,3]]},386,{"position":[[52,3]]},431,{"position":[[52,3]]},476,{"position":[[52,3]]},512,{"position":[[52,3]]},542,{"position":[[52,3]]},584,{"position":[[52,3]]},626,{"position":[[52,3]]},656,{"position":[[52,3]]},692,{"position":[[52,3]]},746,{"position":[[52,3]]},845,{"position":[[52,3]]},890,{"position":[[52,3]]},1295,{"position":[[52,3]]}]],["oper",[],[],[41,{"position":[[56,8]]},44,{"position":[[17,9]]},47,{"position":[[20,9]]},50,{"position":[[16,9]]},53,{"position":[[19,9]]},77,{"position":[[56,8]]},86,{"position":[[17,9]]},89,{"position":[[20,9]]},92,{"position":[[16,9]]},95,{"position":[[19,9]]},134,{"position":[[56,8]]},140,{"position":[[17,9]]},143,{"position":[[20,9]]},146,{"position":[[16,9]]},149,{"position":[[19,9]]},167,{"position":[[56,8]]},182,{"position":[[17,9]]},185,{"position":[[20,9]]},188,{"position":[[16,9]]},191,{"position":[[19,9]]},212,{"position":[[56,8]]},218,{"position":[[17,9]]},221,{"position":[[20,9]]},224,{"position":[[16,9]]},227,{"position":[[19,9]]},254,{"position":[[56,8]]},263,{"position":[[17,9]]},266,{"position":[[20,9]]},269,{"position":[[16,9]]},272,{"position":[[19,9]]},290,{"position":[[56,8]]},305,{"position":[[17,9]]},308,{"position":[[20,9]]},311,{"position":[[16,9]]},314,{"position":[[19,9]]},341,{"position":[[56,8]]},344,{"position":[[17,9]]},347,{"position":[[20,9]]},350,{"position":[[16,9]]},353,{"position":[[19,9]]},386,{"position":[[56,8]]},389,{"position":[[17,9]]},392,{"position":[[20,9]]},395,{"position":[[16,9]]},398,{"position":[[19,9]]},431,{"position":[[56,8]]},434,{"position":[[17,9]]},437,{"position":[[20,9]]},440,{"position":[[16,9]]},443,{"position":[[19,9]]},476,{"position":[[56,8]]},479,{"position":[[17,9]]},482,{"position":[[20,9]]},485,{"position":[[16,9]]},488,{"position":[[19,9]]},512,{"position":[[56,8]]},521,{"position":[[17,9]]},524,{"position":[[20,9]]},527,{"position":[[16,9]]},530,{"position":[[19,9]]},542,{"position":[[56,8]]},560,{"position":[[17,9]]},563,{"position":[[20,9]]},566,{"position":[[16,9]]},569,{"position":[[19,9]]},584,{"position":[[56,8]]},596,{"position":[[17,9]]},599,{"position":[[20,9]]},602,{"position":[[16,9]]},605,{"position":[[19,9]]},626,{"position":[[56,8]]},638,{"position":[[17,9]]},641,{"position":[[20,9]]},644,{"position":[[16,9]]},647,{"position":[[19,9]]},656,{"position":[[56,8]]},674,{"position":[[17,9]]},677,{"position":[[20,9]]},680,{"position":[[16,9]]},683,{"position":[[19,9]]},692,{"position":[[56,8]]},713,{"position":[[17,9]]},716,{"position":[[20,9]]},719,{"position":[[16,9]]},722,{"position":[[19,9]]},746,{"position":[[56,8]]},752,{"position":[[17,9]]},755,{"position":[[20,9]]},758,{"position":[[16,9]]},761,{"position":[[19,9]]},845,{"position":[[56,8]]},851,{"position":[[17,9]]},854,{"position":[[20,9]]},857,{"position":[[16,9]]},860,{"position":[[19,9]]},890,{"position":[[56,8]]},899,{"position":[[17,9]]},902,{"position":[[20,9]]},905,{"position":[[16,9]]},908,{"position":[[19,9]]},926,{"position":[[753,9]]},941,{"position":[[753,9]]},965,{"position":[[753,9]]},986,{"position":[[753,9]]},1004,{"position":[[753,9]]},1025,{"position":[[753,9]]},1040,{"position":[[753,9]]},1061,{"position":[[753,9]]},1100,{"position":[[753,9]]},1145,{"position":[[753,9]]},1163,{"position":[[753,9]]},1169,{"position":[[753,9]]},1184,{"position":[[753,9]]},1199,{"position":[[753,9]]},1214,{"position":[[753,9]]},1232,{"position":[[753,9]]},1247,{"position":[[753,9]]},1295,{"position":[[56,8]]},1301,{"position":[[17,9]]},1304,{"position":[[20,9]]},1307,{"position":[[16,9]]},1310,{"position":[[19,9]]},1328,{"position":[[753,9]]},1355,{"position":[[753,9]]},1373,{"position":[[753,9]]},1388,{"position":[[753,9]]},1403,{"position":[[753,9]]},1424,{"position":[[753,9]]},2000,{"position":[[753,9]]},2015,{"position":[[753,9]]},2072,{"position":[[753,9]]},2177,{"position":[[753,9]]},2249,{"position":[[753,9]]},2264,{"position":[[753,9]]},2408,{"position":[[94,8]]},2414,{"position":[[459,8]]},2444,{"position":[[459,8]]},2477,{"position":[[459,8]]},2588,{"position":[[94,8]]},2660,{"position":[[459,8]]},2687,{"position":[[17,8]]},2747,{"position":[[94,8]]},4220,{"position":[[102,10]]},4256,{"position":[[753,9]]},4622,{"position":[[31,10]]}]],["op",[2676,{"position":[[0,3]]}],[],[41,{"position":[[65,3]]},77,{"position":[[65,3]]},134,{"position":[[65,3]]},167,{"position":[[65,3]]},212,{"position":[[65,3]]},254,{"position":[[65,3]]},290,{"position":[[65,3]]},341,{"position":[[65,3]]},386,{"position":[[65,3]]},431,{"position":[[65,3]]},476,{"position":[[65,3]]},512,{"position":[[65,3]]},542,{"position":[[65,3]]},584,{"position":[[65,3]]},626,{"position":[[65,3]]},656,{"position":[[65,3]]},692,{"position":[[65,3]]},746,{"position":[[65,3]]},845,{"position":[[65,3]]},890,{"position":[[65,3]]},1295,{"position":[[65,3]]},2408,{"position":[[21,3],[103,3],[137,3],[577,4]]},2414,{"position":[[468,3]]},2444,{"position":[[468,3]]},2477,{"position":[[468,3]]},2588,{"position":[[21,3],[103,3],[137,3],[577,4]]},2660,{"position":[[468,3]]},2672,{"position":[[25,4]]},2687,{"position":[[26,3]]},2699,{"position":[[14,3]]},2708,{"position":[[16,3]]},2747,{"position":[[21,3],[103,3],[137,3],[577,4]]}]],["second",[],[],[41,{"position":[[142,6]]},77,{"position":[[142,6]]},134,{"position":[[142,6]]},167,{"position":[[142,6]]},212,{"position":[[142,6]]},254,{"position":[[142,6]]},290,{"position":[[142,6]]},341,{"position":[[142,6]]},386,{"position":[[142,6]]},431,{"position":[[142,6]]},476,{"position":[[142,6]]},512,{"position":[[142,6]]},542,{"position":[[142,6]]},584,{"position":[[142,6]]},626,{"position":[[142,6]]},656,{"position":[[142,6]]},692,{"position":[[142,6]]},746,{"position":[[142,6]]},845,{"position":[[142,6]]},890,{"position":[[142,6]]},1295,{"position":[[142,6]]},4478,{"position":[[25,6]]},4484,{"position":[[24,6]]},4487,{"position":[[29,6]]},4490,{"position":[[30,6]]},4493,{"position":[[28,6]]}]],["comparison",[],[],[41,{"position":[[153,11]]},77,{"position":[[153,11]]},134,{"position":[[153,11]]},167,{"position":[[153,11]]},212,{"position":[[153,11]]},254,{"position":[[153,11]]},290,{"position":[[153,11]]},341,{"position":[[153,11]]},386,{"position":[[153,11]]},431,{"position":[[153,11]]},476,{"position":[[153,11]]},512,{"position":[[153,11]]},542,{"position":[[153,11]]},584,{"position":[[153,11]]},626,{"position":[[153,11]]},656,{"position":[[153,11]]},692,{"position":[[153,11]]},746,{"position":[[153,11]]},845,{"position":[[153,11]]},890,{"position":[[153,11]]},1295,{"position":[[153,11]]}]],["binop_typ",[42,{"position":[[0,10]]},84,{"position":[[0,10]]},138,{"position":[[0,10]]},180,{"position":[[0,10]]},216,{"position":[[0,10]]},261,{"position":[[0,10]]},303,{"position":[[0,10]]},342,{"position":[[0,10]]},387,{"position":[[0,10]]},432,{"position":[[0,10]]},477,{"position":[[0,10]]},519,{"position":[[0,10]]},558,{"position":[[0,10]]},594,{"position":[[0,10]]},636,{"position":[[0,10]]},672,{"position":[[0,10]]},711,{"position":[[0,10]]},750,{"position":[[0,10]]},849,{"position":[[0,10]]},897,{"position":[[0,10]]},1299,{"position":[[0,10]]}],[],[]],["opshin.type_impls.functiontype.binop_typ",[],[43,{"position":[[0,41]]}],[]],["binari",[],[],[44,{"position":[[10,6]]},47,{"position":[[13,6]]},86,{"position":[[10,6]]},89,{"position":[[13,6]]},140,{"position":[[10,6]]},143,{"position":[[13,6]]},182,{"position":[[10,6]]},185,{"position":[[13,6]]},218,{"position":[[10,6]]},221,{"position":[[13,6]]},263,{"position":[[10,6]]},266,{"position":[[13,6]]},305,{"position":[[10,6]]},308,{"position":[[13,6]]},344,{"position":[[10,6]]},347,{"position":[[13,6]]},389,{"position":[[10,6]]},392,{"position":[[13,6]]},434,{"position":[[10,6]]},437,{"position":[[13,6]]},479,{"position":[[10,6]]},482,{"position":[[13,6]]},521,{"position":[[10,6]]},524,{"position":[[13,6]]},560,{"position":[[10,6]]},563,{"position":[[13,6]]},596,{"position":[[10,6]]},599,{"position":[[13,6]]},638,{"position":[[10,6]]},641,{"position":[[13,6]]},674,{"position":[[10,6]]},677,{"position":[[13,6]]},713,{"position":[[10,6]]},716,{"position":[[13,6]]},752,{"position":[[10,6]]},755,{"position":[[13,6]]},851,{"position":[[10,6]]},854,{"position":[[13,6]]},899,{"position":[[10,6]]},902,{"position":[[13,6]]},1301,{"position":[[10,6]]},1304,{"position":[[13,6]]}]],["between",[],[],[44,{"position":[[27,7]]},47,{"position":[[30,7]]},86,{"position":[[27,7]]},89,{"position":[[30,7]]},140,{"position":[[27,7]]},143,{"position":[[30,7]]},182,{"position":[[27,7]]},185,{"position":[[30,7]]},218,{"position":[[27,7]]},221,{"position":[[30,7]]},263,{"position":[[27,7]]},266,{"position":[[30,7]]},305,{"position":[[27,7]]},308,{"position":[[30,7]]},344,{"position":[[27,7]]},347,{"position":[[30,7]]},389,{"position":[[27,7]]},392,{"position":[[30,7]]},434,{"position":[[27,7]]},437,{"position":[[30,7]]},479,{"position":[[27,7]]},482,{"position":[[30,7]]},521,{"position":[[27,7]]},524,{"position":[[30,7]]},560,{"position":[[27,7]]},563,{"position":[[30,7]]},596,{"position":[[27,7]]},599,{"position":[[30,7]]},638,{"position":[[27,7]]},641,{"position":[[30,7]]},674,{"position":[[27,7]]},677,{"position":[[30,7]]},713,{"position":[[27,7]]},716,{"position":[[30,7]]},752,{"position":[[27,7]]},755,{"position":[[30,7]]},851,{"position":[[27,7]]},854,{"position":[[30,7]]},899,{"position":[[27,7]]},902,{"position":[[30,7]]},1301,{"position":[[27,7]]},1304,{"position":[[30,7]]},4208,{"position":[[15,7]]},4496,{"position":[[9,7]]},4562,{"position":[[9,7]]}]],["self",[],[],[44,{"position":[[35,4]]},47,{"position":[[38,4]]},50,{"position":[[29,5]]},53,{"position":[[32,4]]},86,{"position":[[35,4]]},89,{"position":[[38,4]]},92,{"position":[[29,5]]},95,{"position":[[32,4]]},140,{"position":[[35,4]]},143,{"position":[[38,4]]},146,{"position":[[29,5]]},149,{"position":[[32,4]]},182,{"position":[[35,4]]},185,{"position":[[38,4]]},188,{"position":[[29,5]]},191,{"position":[[32,4]]},218,{"position":[[35,4]]},221,{"position":[[38,4]]},224,{"position":[[29,5]]},227,{"position":[[32,4]]},263,{"position":[[35,4]]},266,{"position":[[38,4]]},269,{"position":[[29,5]]},272,{"position":[[32,4]]},305,{"position":[[35,4]]},308,{"position":[[38,4]]},311,{"position":[[29,5]]},314,{"position":[[32,4]]},344,{"position":[[35,4]]},347,{"position":[[38,4]]},350,{"position":[[29,5]]},353,{"position":[[32,4]]},389,{"position":[[35,4]]},392,{"position":[[38,4]]},395,{"position":[[29,5]]},398,{"position":[[32,4]]},434,{"position":[[35,4]]},437,{"position":[[38,4]]},440,{"position":[[29,5]]},443,{"position":[[32,4]]},479,{"position":[[35,4]]},482,{"position":[[38,4]]},485,{"position":[[29,5]]},488,{"position":[[32,4]]},521,{"position":[[35,4]]},524,{"position":[[38,4]]},527,{"position":[[29,5]]},530,{"position":[[32,4]]},560,{"position":[[35,4]]},563,{"position":[[38,4]]},566,{"position":[[29,5]]},569,{"position":[[32,4]]},596,{"position":[[35,4]]},599,{"position":[[38,4]]},602,{"position":[[29,5]]},605,{"position":[[32,4]]},638,{"position":[[35,4]]},641,{"position":[[38,4]]},644,{"position":[[29,5]]},647,{"position":[[32,4]]},674,{"position":[[35,4]]},677,{"position":[[38,4]]},680,{"position":[[29,5]]},683,{"position":[[32,4]]},713,{"position":[[35,4]]},716,{"position":[[38,4]]},719,{"position":[[29,5]]},722,{"position":[[32,4]]},752,{"position":[[35,4]]},755,{"position":[[38,4]]},758,{"position":[[29,5]]},761,{"position":[[32,4]]},851,{"position":[[35,4]]},854,{"position":[[38,4]]},857,{"position":[[29,5]]},860,{"position":[[32,4]]},899,{"position":[[35,4]]},902,{"position":[[38,4]]},905,{"position":[[29,5]]},908,{"position":[[32,4]]},1301,{"position":[[35,4]]},1304,{"position":[[38,4]]},1307,{"position":[[29,5]]},1310,{"position":[[32,4]]}]],["binop",[45,{"position":[[0,5]]},87,{"position":[[0,5]]},141,{"position":[[0,5]]},183,{"position":[[0,5]]},219,{"position":[[0,5]]},264,{"position":[[0,5]]},306,{"position":[[0,5]]},345,{"position":[[0,5]]},390,{"position":[[0,5]]},435,{"position":[[0,5]]},480,{"position":[[0,5]]},522,{"position":[[0,5]]},561,{"position":[[0,5]]},597,{"position":[[0,5]]},639,{"position":[[0,5]]},675,{"position":[[0,5]]},714,{"position":[[0,5]]},753,{"position":[[0,5]]},852,{"position":[[0,5]]},900,{"position":[[0,5]]},1302,{"position":[[0,5]]}],[],[]],["opshin.type_impls.functiontype.binop",[],[46,{"position":[[0,36]]}],[]],["unop_typ",[48,{"position":[[0,9]]},90,{"position":[[0,9]]},144,{"position":[[0,9]]},186,{"position":[[0,9]]},222,{"position":[[0,9]]},267,{"position":[[0,9]]},309,{"position":[[0,9]]},348,{"position":[[0,9]]},393,{"position":[[0,9]]},438,{"position":[[0,9]]},483,{"position":[[0,9]]},525,{"position":[[0,9]]},564,{"position":[[0,9]]},600,{"position":[[0,9]]},642,{"position":[[0,9]]},678,{"position":[[0,9]]},717,{"position":[[0,9]]},756,{"position":[[0,9]]},855,{"position":[[0,9]]},903,{"position":[[0,9]]},1305,{"position":[[0,9]]}],[],[]],["opshin.type_impls.functiontype.unop_typ",[],[49,{"position":[[0,40]]}],[]],["unari",[],[],[50,{"position":[[10,5]]},53,{"position":[[13,5]]},92,{"position":[[10,5]]},95,{"position":[[13,5]]},146,{"position":[[10,5]]},149,{"position":[[13,5]]},188,{"position":[[10,5]]},191,{"position":[[13,5]]},224,{"position":[[10,5]]},227,{"position":[[13,5]]},269,{"position":[[10,5]]},272,{"position":[[13,5]]},311,{"position":[[10,5]]},314,{"position":[[13,5]]},350,{"position":[[10,5]]},353,{"position":[[13,5]]},395,{"position":[[10,5]]},398,{"position":[[13,5]]},440,{"position":[[10,5]]},443,{"position":[[13,5]]},485,{"position":[[10,5]]},488,{"position":[[13,5]]},527,{"position":[[10,5]]},530,{"position":[[13,5]]},566,{"position":[[10,5]]},569,{"position":[[13,5]]},602,{"position":[[10,5]]},605,{"position":[[13,5]]},644,{"position":[[10,5]]},647,{"position":[[13,5]]},680,{"position":[[10,5]]},683,{"position":[[13,5]]},719,{"position":[[10,5]]},722,{"position":[[13,5]]},758,{"position":[[10,5]]},761,{"position":[[13,5]]},857,{"position":[[10,5]]},860,{"position":[[13,5]]},905,{"position":[[10,5]]},908,{"position":[[13,5]]},1307,{"position":[[10,5]]},1310,{"position":[[13,5]]}]],["unop",[51,{"position":[[0,4]]},93,{"position":[[0,4]]},147,{"position":[[0,4]]},189,{"position":[[0,4]]},225,{"position":[[0,4]]},270,{"position":[[0,4]]},312,{"position":[[0,4]]},351,{"position":[[0,4]]},396,{"position":[[0,4]]},441,{"position":[[0,4]]},486,{"position":[[0,4]]},528,{"position":[[0,4]]},567,{"position":[[0,4]]},603,{"position":[[0,4]]},645,{"position":[[0,4]]},681,{"position":[[0,4]]},720,{"position":[[0,4]]},759,{"position":[[0,4]]},858,{"position":[[0,4]]},906,{"position":[[0,4]]},1308,{"position":[[0,4]]}],[],[]],["opshin.type_impls.functiontype.unop",[],[52,{"position":[[0,35]]}],[]],["id_map",[54,{"position":[[0,6]]},96,{"position":[[0,6]]},150,{"position":[[0,6]]},156,{"position":[[0,6]]},228,{"position":[[0,6]]},237,{"position":[[0,6]]},279,{"position":[[0,6]]},354,{"position":[[0,6]]},399,{"position":[[0,6]]},408,{"position":[[0,6]]},453,{"position":[[0,6]]},495,{"position":[[0,6]]},534,{"position":[[0,6]]},606,{"position":[[0,6]]},612,{"position":[[0,6]]},684,{"position":[[0,6]]},723,{"position":[[0,6]]},762,{"position":[[0,6]]},861,{"position":[[0,6]]},873,{"position":[[0,6]]},1311,{"position":[[0,6]]}],[],[]],["opshin.type_impls.functiontype.id_map",[],[55,{"position":[[0,37]]}],[]],["descript",[4803,{"position":[[0,11]]}],[],[56,{"position":[[43,11]]},98,{"position":[[43,11]]},152,{"position":[[43,11]]},158,{"position":[[43,11]]},230,{"position":[[43,11]]},239,{"position":[[43,11]]},281,{"position":[[43,11]]},356,{"position":[[43,11]]},401,{"position":[[43,11]]},410,{"position":[[43,11]]},455,{"position":[[43,11]]},497,{"position":[[43,11]]},536,{"position":[[43,11]]},608,{"position":[[43,11]]},614,{"position":[[43,11]]},686,{"position":[[43,11]]},725,{"position":[[43,11]]},764,{"position":[[43,11]]},863,{"position":[[43,11]]},875,{"position":[[43,11]]},1313,{"position":[[43,11]]},4781,{"position":[[778,12]]}]],["typestr",[],[],[56,{"position":[[55,10]]},98,{"position":[[55,10]]},152,{"position":[[55,10]]},158,{"position":[[55,10]]},230,{"position":[[55,10]]},239,{"position":[[55,10]]},281,{"position":[[55,10]]},356,{"position":[[55,10]]},401,{"position":[[55,10]]},410,{"position":[[55,10]]},455,{"position":[[55,10]]},497,{"position":[[55,10]]},536,{"position":[[55,10]]},608,{"position":[[55,10]]},614,{"position":[[55,10]]},686,{"position":[[55,10]]},725,{"position":[[55,10]]},764,{"position":[[55,10]]},863,{"position":[[55,10]]},875,{"position":[[55,10]]},1313,{"position":[[55,10]]}]],["typeinferenceerror",[57,{"position":[[0,18]]}],[],[]],["opshin.type_impls.typeinferenceerror",[],[58,{"position":[[0,36]]}],[]],["assert",[],[],[59,{"position":[[0,9]]},2765,{"position":[[1013,9],[1210,6],[1365,6]]},2873,{"position":[[1013,9],[1210,6],[1365,6]]},2936,{"position":[[1013,9],[1210,6],[1365,6]]},3602,{"position":[[1013,9],[1210,6],[1365,6]]},3908,{"position":[[1013,9],[1210,6],[1365,6]]},4121,{"position":[[1013,9],[1210,6],[1365,6]]}]],["fail",[],[],[59,{"position":[[10,7]]},2765,{"position":[[1031,5],[1096,8]]},2873,{"position":[[1031,5],[1096,8]]},2936,{"position":[[1031,5],[1096,8]]},3602,{"position":[[1031,5],[1096,8]]},3908,{"position":[[1031,5],[1096,8]]},4121,{"position":[[1031,5],[1096,8]]}]],["opshin.type_impls.type.constr_typ",[],[64,{"position":[[0,34]]}],[]],["opshin.type_impls.type.constr",[],[67,{"position":[[0,29]]}],[]],["opshin.type_impls.type.attribute_typ",[],[70,{"position":[[0,37]]}],[]],["opshin.type_impls.type.attribut",[],[73,{"position":[[0,32]]}],[]],["opshin.type_impls.type.cmp",[],[76,{"position":[[0,26]]}],[]],["opshin.type_impls.type.stringifi",[],[79,{"position":[[0,32]]}],[]],["opshin.type_impls.type.copy_only_attribut",[],[82,{"position":[[0,43]]}],[]],["pluthon",[],[],[83,{"position":[[0,7]]},518,{"position":[[0,7]]},896,{"position":[[0,7]]}]],["opshin.type_impls.type.binop_typ",[],[85,{"position":[[0,33]]}],[]],["opshin.type_impls.type.binop",[],[88,{"position":[[0,28]]}],[]],["opshin.type_impls.type.unop_typ",[],[91,{"position":[[0,32]]}],[]],["opshin.type_impls.type.unop",[],[94,{"position":[[0,27]]}],[]],["opshin.type_impls.type.id_map",[],[97,{"position":[[0,29]]}],[]],["opshin.type_impls.record",[],[100,{"position":[[0,24]]}],[233,{"position":[[19,25]]}]],["record(nam",[],[],[101,{"position":[[0,12]]}]],["str",[],[],[101,{"position":[[13,4],[29,4]]},4781,{"position":[[759,3]]}]],["orig_nam",[105,{"position":[[0,9]]},4404,{"position":[[0,9]]}],[],[101,{"position":[[18,10]]}]],["field",[111,{"position":[[0,6]]}],[],[101,{"position":[[52,7]]},4559,{"position":[[41,6]]},4676,{"position":[[170,6],[227,6]]}]],["union[list[tuple[str",[],[],[101,{"position":[[60,21]]}]],["frozenlist2.frozenlist",[],[],[101,{"position":[[107,24]]}]],["opshin.type_impls.record.nam",[],[103,{"position":[[0,29]]}],[]],["opshin.type_impls.record.orig_nam",[],[106,{"position":[[0,34]]}],[]],["opshin.type_impls.record.constructor",[],[109,{"position":[[0,36]]}],[]],["opshin.type_impls.record.field",[],[112,{"position":[[0,31]]}],[]],["classtyp",[114,{"position":[[0,9]]}],[],[116,{"position":[[0,11]]}]],["opshin.type_impls.classtyp",[],[115,{"position":[[0,27]]}],[491,{"position":[[18,28]]}]],["opshin.type_impls.classtype.copy_only_attribut",[],[118,{"position":[[0,48]]}],[]],["opshin.type_impls.classtype.constr_typ",[],[121,{"position":[[0,39]]}],[]],["opshin.type_impls.classtype.constr",[],[124,{"position":[[0,34]]}],[]],["opshin.type_impls.classtype.attribute_typ",[],[127,{"position":[[0,42]]}],[]],["opshin.type_impls.classtype.attribut",[],[130,{"position":[[0,37]]}],[]],["opshin.type_impls.classtype.cmp",[],[133,{"position":[[0,31]]}],[]],["opshin.type_impls.classtype.stringifi",[],[136,{"position":[[0,37]]}],[]],["opshin.type_impls.classtype.binop_typ",[],[139,{"position":[[0,38]]}],[]],["opshin.type_impls.classtype.binop",[],[142,{"position":[[0,33]]}],[]],["opshin.type_impls.classtype.unop_typ",[],[145,{"position":[[0,37]]}],[]],["opshin.type_impls.classtype.unop",[],[148,{"position":[[0,32]]}],[]],["opshin.type_impls.classtype.id_map",[],[151,{"position":[[0,34]]}],[]],["anytyp",[153,{"position":[[0,7]]}],[],[]],["opshin.type_impls.anytyp",[],[154,{"position":[[0,25]]}],[]],["top",[],[],[155,{"position":[[4,3]]},4469,{"position":[[193,3]]}]],["element",[],[],[155,{"position":[[8,7]]},2246,{"position":[[47,8]]}]],["partial",[],[],[155,{"position":[[23,7]]}]],["order",[],[],[155,{"position":[[31,5]]},2765,{"position":[[858,5]]},2873,{"position":[[858,5]]},2936,{"position":[[858,5]]},3602,{"position":[[858,5]]},3908,{"position":[[858,5]]},4121,{"position":[[858,5]]}]],["exclud",[],[],[155,{"position":[[46,10]]}]],["opshin.type_impls.anytype.id_map",[],[157,{"position":[[0,32]]}],[]],["opshin.type_impls.anytype.attribute_typ",[],[160,{"position":[[0,40]]}],[]],["opshin.type_impls.anytype.attribut",[],[163,{"position":[[0,35]]}],[]],["opshin.type_impls.anytype.cmp",[],[166,{"position":[[0,29]]}],[]],["opshin.type_impls.anytype.stringifi",[],[169,{"position":[[0,35]]}],[]],["opshin.type_impls.anytype.copy_only_attribut",[],[172,{"position":[[0,46]]}],[]],["opshin.type_impls.anytype.constr_typ",[],[175,{"position":[[0,37]]}],[]],["opshin.type_impls.anytype.constr",[],[178,{"position":[[0,32]]}],[]],["opshin.type_impls.anytype.binop_typ",[],[181,{"position":[[0,36]]}],[]],["opshin.type_impls.anytype.binop",[],[184,{"position":[[0,31]]}],[]],["opshin.type_impls.anytype.unop_typ",[],[187,{"position":[[0,35]]}],[]],["opshin.type_impls.anytype.unop",[],[190,{"position":[[0,30]]}],[]],["atomictyp",[192,{"position":[[0,10]]}],[],[194,{"position":[[0,12]]}]],["opshin.type_impls.atomictyp",[],[193,{"position":[[0,28]]}],[]],["opshin.type_impls.atomictype.copy_only_attribut",[],[196,{"position":[[0,49]]}],[]],["opshin.type_impls.atomictype.constr_typ",[],[199,{"position":[[0,40]]}],[]],["opshin.type_impls.atomictype.constr",[],[202,{"position":[[0,35]]}],[]],["opshin.type_impls.atomictype.attribute_typ",[],[205,{"position":[[0,43]]}],[]],["opshin.type_impls.atomictype.attribut",[],[208,{"position":[[0,38]]}],[]],["opshin.type_impls.atomictype.cmp",[],[211,{"position":[[0,32]]}],[]],["opshin.type_impls.atomictype.stringifi",[],[214,{"position":[[0,38]]}],[]],["opshin.type_impls.atomictype.binop_typ",[],[217,{"position":[[0,39]]}],[]],["opshin.type_impls.atomictype.binop",[],[220,{"position":[[0,34]]}],[]],["opshin.type_impls.atomictype.unop_typ",[],[223,{"position":[[0,38]]}],[]],["opshin.type_impls.atomictype.unop",[],[226,{"position":[[0,33]]}],[]],["opshin.type_impls.atomictype.id_map",[],[229,{"position":[[0,35]]}],[]],["recordtyp",[231,{"position":[[0,10]]}],[],[]],["opshin.type_impls.recordtyp",[],[232,{"position":[[0,28]]}],[]],["recordtype(record",[],[],[233,{"position":[[0,18]]}]],["opshin.type_impls.recordtype.record",[],[235,{"position":[[0,35]]}],[]],["opshin.type_impls.recordtype.id_map",[],[238,{"position":[[0,35]]}],[]],["opshin.type_impls.recordtype.constr_typ",[],[241,{"position":[[0,40]]}],[]],["opshin.type_impls.recordtype.constr",[],[244,{"position":[[0,35]]}],[]],["opshin.type_impls.recordtype.attribute_typ",[],[247,{"position":[[0,43]]}],[]],["opshin.type_impls.recordtype.attribut",[],[250,{"position":[[0,38]]}],[]],["opshin.type_impls.recordtype.cmp",[],[253,{"position":[[0,32]]}],[]],["opshin.type_impls.recordtype.stringifi",[],[256,{"position":[[0,38]]}],[]],["opshin.type_impls.recordtype.copy_only_attribut",[],[259,{"position":[[0,49]]}],[]],["opshin.type_impls.recordtype.binop_typ",[],[262,{"position":[[0,39]]}],[]],["opshin.type_impls.recordtype.binop",[],[265,{"position":[[0,34]]}],[]],["opshin.type_impls.recordtype.unop_typ",[],[268,{"position":[[0,38]]}],[]],["opshin.type_impls.recordtype.unop",[],[271,{"position":[[0,33]]}],[]],["uniontyp",[273,{"position":[[0,9]]}],[],[]],["opshin.type_impls.uniontyp",[],[274,{"position":[[0,27]]}],[]],["uniontype(typ",[],[],[275,{"position":[[0,15]]}]],["list[opshin.type_impls.recordtyp",[],[],[275,{"position":[[16,35]]}]],["typ",[276,{"position":[[0,4]]},318,{"position":[[0,4]]},405,{"position":[[0,3]]},492,{"position":[[0,3]]},867,{"position":[[0,3]]},2403,{"position":[[0,3]]},2415,{"position":[[0,3]]},2748,{"position":[[0,3]]}],[],[]],["opshin.type_impls.uniontype.typ",[],[277,{"position":[[0,32]]}],[]],["opshin.type_impls.uniontype.id_map",[],[280,{"position":[[0,34]]}],[]],["opshin.type_impls.uniontype.attribute_typ",[],[283,{"position":[[0,42]]}],[]],["opshin.type_impls.uniontype.attribut",[],[286,{"position":[[0,37]]}],[]],["opshin.type_impls.uniontype.cmp",[],[289,{"position":[[0,31]]}],[]],["opshin.type_impls.uniontype.stringifi",[],[292,{"position":[[0,37]]}],[]],["opshin.type_impls.uniontype.copy_only_attribut",[],[295,{"position":[[0,48]]}],[]],["opshin.type_impls.uniontype.constr_typ",[],[298,{"position":[[0,39]]}],[]],["opshin.type_impls.uniontype.constr",[],[301,{"position":[[0,34]]}],[]],["opshin.type_impls.uniontype.binop_typ",[],[304,{"position":[[0,38]]}],[]],["opshin.type_impls.uniontype.binop",[],[307,{"position":[[0,33]]}],[]],["opshin.type_impls.uniontype.unop_typ",[],[310,{"position":[[0,37]]}],[]],["opshin.type_impls.uniontype.unop",[],[313,{"position":[[0,32]]}],[]],["tupletyp",[315,{"position":[[0,9]]}],[],[]],["opshin.type_impls.tupletyp",[],[316,{"position":[[0,27]]}],[]],["tupletype(typ",[],[],[317,{"position":[[0,15]]}]],["opshin.type_impls.tupletype.typ",[],[319,{"position":[[0,32]]}],[]],["opshin.type_impls.tupletype.stringifi",[],[322,{"position":[[0,37]]}],[]],["opshin.type_impls.tupletype.copy_only_attribut",[],[325,{"position":[[0,48]]}],[]],["opshin.type_impls.tupletype.constr_typ",[],[328,{"position":[[0,39]]}],[]],["opshin.type_impls.tupletype.constr",[],[331,{"position":[[0,34]]}],[]],["opshin.type_impls.tupletype.attribute_typ",[],[334,{"position":[[0,42]]}],[]],["opshin.type_impls.tupletype.attribut",[],[337,{"position":[[0,37]]}],[]],["opshin.type_impls.tupletype.cmp",[],[340,{"position":[[0,31]]}],[]],["opshin.type_impls.tupletype.binop_typ",[],[343,{"position":[[0,38]]}],[]],["opshin.type_impls.tupletype.binop",[],[346,{"position":[[0,33]]}],[]],["opshin.type_impls.tupletype.unop_typ",[],[349,{"position":[[0,37]]}],[]],["opshin.type_impls.tupletype.unop",[],[352,{"position":[[0,32]]}],[]],["opshin.type_impls.tupletype.id_map",[],[355,{"position":[[0,34]]}],[]],["pairtyp",[357,{"position":[[0,8]]}],[],[]],["opshin.type_impls.pairtyp",[],[358,{"position":[[0,26]]}],[]],["intern",[],[],[359,{"position":[[3,8]]}]],["plutusdata",[],[],[359,{"position":[[39,10]]}]],["pair",[],[],[359,{"position":[[50,5]]},1316,{"position":[[34,6]]},4709,{"position":[[34,6]]},4760,{"position":[[34,6]]}]],["l_typ",[360,{"position":[[0,5]]}],[],[]],["opshin.type_impls.pairtype.l_typ",[],[361,{"position":[[0,32]]}],[]],["r_typ",[363,{"position":[[0,5]]}],[],[]],["opshin.type_impls.pairtype.r_typ",[],[364,{"position":[[0,32]]}],[]],["opshin.type_impls.pairtype.stringifi",[],[367,{"position":[[0,36]]}],[]],["opshin.type_impls.pairtype.copy_only_attribut",[],[370,{"position":[[0,47]]}],[]],["opshin.type_impls.pairtype.constr_typ",[],[373,{"position":[[0,38]]}],[]],["opshin.type_impls.pairtype.constr",[],[376,{"position":[[0,33]]}],[]],["opshin.type_impls.pairtype.attribute_typ",[],[379,{"position":[[0,41]]}],[]],["opshin.type_impls.pairtype.attribut",[],[382,{"position":[[0,36]]}],[]],["opshin.type_impls.pairtype.cmp",[],[385,{"position":[[0,30]]}],[]],["opshin.type_impls.pairtype.binop_typ",[],[388,{"position":[[0,37]]}],[]],["opshin.type_impls.pairtype.binop",[],[391,{"position":[[0,32]]}],[]],["opshin.type_impls.pairtype.unop_typ",[],[394,{"position":[[0,36]]}],[]],["opshin.type_impls.pairtype.unop",[],[397,{"position":[[0,31]]}],[]],["opshin.type_impls.pairtype.id_map",[],[400,{"position":[[0,33]]}],[]],["listtyp",[402,{"position":[[0,8]]}],[],[]],["opshin.type_impls.listtyp",[],[403,{"position":[[0,26]]}],[]],["listtype(typ",[],[],[404,{"position":[[0,13]]}]],["opshin.type_impls.listtype.typ",[],[406,{"position":[[0,30]]}],[]],["opshin.type_impls.listtype.id_map",[],[409,{"position":[[0,33]]}],[]],["opshin.type_impls.listtype.attribute_typ",[],[412,{"position":[[0,41]]}],[]],["opshin.type_impls.listtype.attribut",[],[415,{"position":[[0,36]]}],[]],["opshin.type_impls.listtype.stringifi",[],[418,{"position":[[0,36]]}],[]],["opshin.type_impls.listtype.copy_only_attribut",[],[421,{"position":[[0,47]]}],[]],["opshin.type_impls.listtype.constr_typ",[],[424,{"position":[[0,38]]}],[]],["opshin.type_impls.listtype.constr",[],[427,{"position":[[0,33]]}],[]],["opshin.type_impls.listtype.cmp",[],[430,{"position":[[0,30]]}],[]],["opshin.type_impls.listtype.binop_typ",[],[433,{"position":[[0,37]]}],[]],["opshin.type_impls.listtype.binop",[],[436,{"position":[[0,32]]}],[]],["opshin.type_impls.listtype.unop_typ",[],[439,{"position":[[0,36]]}],[]],["opshin.type_impls.listtype.unop",[],[442,{"position":[[0,31]]}],[]],["dicttyp",[444,{"position":[[0,8]]}],[],[]],["opshin.type_impls.dicttyp",[],[445,{"position":[[0,26]]}],[]],["dicttype(key_typ",[],[],[446,{"position":[[0,17]]}]],["value_typ",[450,{"position":[[0,9]]}],[],[446,{"position":[[42,10]]}]],["key_typ",[447,{"position":[[0,7]]}],[],[]],["opshin.type_impls.dicttype.key_typ",[],[448,{"position":[[0,34]]}],[]],["opshin.type_impls.dicttype.value_typ",[],[451,{"position":[[0,36]]}],[]],["opshin.type_impls.dicttype.id_map",[],[454,{"position":[[0,33]]}],[]],["opshin.type_impls.dicttype.attribute_typ",[],[457,{"position":[[0,41]]}],[]],["opshin.type_impls.dicttype.attribut",[],[460,{"position":[[0,36]]}],[]],["opshin.type_impls.dicttype.stringifi",[],[463,{"position":[[0,36]]}],[]],["opshin.type_impls.dicttype.copy_only_attribut",[],[466,{"position":[[0,47]]}],[]],["opshin.type_impls.dicttype.constr_typ",[],[469,{"position":[[0,38]]}],[]],["opshin.type_impls.dicttype.constr",[],[472,{"position":[[0,33]]}],[]],["opshin.type_impls.dicttype.cmp",[],[475,{"position":[[0,30]]}],[]],["opshin.type_impls.dicttype.binop_typ",[],[478,{"position":[[0,37]]}],[]],["opshin.type_impls.dicttype.binop",[],[481,{"position":[[0,32]]}],[]],["opshin.type_impls.dicttype.unop_typ",[],[484,{"position":[[0,36]]}],[]],["opshin.type_impls.dicttype.unop",[],[487,{"position":[[0,31]]}],[]],["instancetyp",[489,{"position":[[0,12]]}],[],[]],["opshin.type_impls.instancetyp",[],[490,{"position":[[0,30]]}],[]],["instancetype(typ",[],[],[491,{"position":[[0,17]]}]],["opshin.type_impls.instancetype.typ",[],[493,{"position":[[0,34]]}],[]],["opshin.type_impls.instancetype.id_map",[],[496,{"position":[[0,37]]}],[]],["opshin.type_impls.instancetype.constr_typ",[],[499,{"position":[[0,42]]}],[]],["opshin.type_impls.instancetype.constr",[],[502,{"position":[[0,37]]}],[]],["opshin.type_impls.instancetype.attribute_typ",[],[505,{"position":[[0,45]]}],[]],["opshin.type_impls.instancetype.attribut",[],[508,{"position":[[0,40]]}],[]],["opshin.type_impls.instancetype.cmp",[],[511,{"position":[[0,34]]}],[]],["opshin.type_impls.instancetype.stringifi",[],[514,{"position":[[0,40]]}],[]],["opshin.type_impls.instancetype.copy_only_attribut",[],[517,{"position":[[0,51]]}],[]],["opshin.type_impls.instancetype.binop_typ",[],[520,{"position":[[0,41]]}],[]],["opshin.type_impls.instancetype.binop",[],[523,{"position":[[0,36]]}],[]],["opshin.type_impls.instancetype.unop_typ",[],[526,{"position":[[0,40]]}],[]],["opshin.type_impls.instancetype.unop",[],[529,{"position":[[0,35]]}],[]],["integertyp",[531,{"position":[[0,11]]}],[],[533,{"position":[[0,13]]}]],["opshin.type_impls.integertyp",[],[532,{"position":[[0,29]]}],[]],["opshin.type_impls.integertype.id_map",[],[535,{"position":[[0,36]]}],[]],["opshin.type_impls.integertype.constr_typ",[],[538,{"position":[[0,41]]}],[]],["opshin.type_impls.integertype.cmp",[],[541,{"position":[[0,33]]}],[]],["opshin.type_impls.integertype.stringifi",[],[544,{"position":[[0,39]]}],[]],["opshin.type_impls.integertype.copy_only_attribut",[],[547,{"position":[[0,50]]}],[]],["opshin.type_impls.integertype.constr",[],[550,{"position":[[0,36]]}],[]],["opshin.type_impls.integertype.attribute_typ",[],[553,{"position":[[0,44]]}],[]],["opshin.type_impls.integertype.attribut",[],[556,{"position":[[0,39]]}],[]],["opshin.type_impls.integertype.binop_typ",[],[559,{"position":[[0,40]]}],[]],["opshin.type_impls.integertype.binop",[],[562,{"position":[[0,35]]}],[]],["opshin.type_impls.integertype.unop_typ",[],[565,{"position":[[0,39]]}],[]],["opshin.type_impls.integertype.unop",[],[568,{"position":[[0,34]]}],[]],["stringtyp",[570,{"position":[[0,10]]}],[],[572,{"position":[[0,12]]}]],["opshin.type_impls.stringtyp",[],[571,{"position":[[0,28]]}],[]],["opshin.type_impls.stringtype.constr_typ",[],[574,{"position":[[0,40]]}],[]],["opshin.type_impls.stringtype.attribute_typ",[],[577,{"position":[[0,43]]}],[]],["opshin.type_impls.stringtype.attribut",[],[580,{"position":[[0,38]]}],[]],["opshin.type_impls.stringtype.cmp",[],[583,{"position":[[0,32]]}],[]],["opshin.type_impls.stringtype.stringifi",[],[586,{"position":[[0,38]]}],[]],["opshin.type_impls.stringtype.copy_only_attribut",[],[589,{"position":[[0,49]]}],[]],["opshin.type_impls.stringtype.constr",[],[592,{"position":[[0,35]]}],[]],["opshin.type_impls.stringtype.binop_typ",[],[595,{"position":[[0,39]]}],[]],["opshin.type_impls.stringtype.binop",[],[598,{"position":[[0,34]]}],[]],["opshin.type_impls.stringtype.unop_typ",[],[601,{"position":[[0,38]]}],[]],["opshin.type_impls.stringtype.unop",[],[604,{"position":[[0,33]]}],[]],["opshin.type_impls.stringtype.id_map",[],[607,{"position":[[0,35]]}],[]],["bytestringtyp",[609,{"position":[[0,14]]}],[],[611,{"position":[[0,16]]}]],["opshin.type_impls.bytestringtyp",[],[610,{"position":[[0,32]]}],[]],["opshin.type_impls.bytestringtype.id_map",[],[613,{"position":[[0,39]]}],[]],["opshin.type_impls.bytestringtype.constr_typ",[],[616,{"position":[[0,44]]}],[]],["opshin.type_impls.bytestringtype.attribute_typ",[],[619,{"position":[[0,47]]}],[]],["opshin.type_impls.bytestringtype.attribut",[],[622,{"position":[[0,42]]}],[]],["opshin.type_impls.bytestringtype.cmp",[],[625,{"position":[[0,36]]}],[]],["opshin.type_impls.bytestringtype.stringifi",[],[628,{"position":[[0,42]]}],[]],["opshin.type_impls.bytestringtype.copy_only_attribut",[],[631,{"position":[[0,53]]}],[]],["opshin.type_impls.bytestringtype.constr",[],[634,{"position":[[0,39]]}],[]],["opshin.type_impls.bytestringtype.binop_typ",[],[637,{"position":[[0,43]]}],[]],["opshin.type_impls.bytestringtype.binop",[],[640,{"position":[[0,38]]}],[]],["opshin.type_impls.bytestringtype.unop_typ",[],[643,{"position":[[0,42]]}],[]],["opshin.type_impls.bytestringtype.unop",[],[646,{"position":[[0,37]]}],[]],["booltyp",[648,{"position":[[0,8]]}],[],[650,{"position":[[0,10]]}]],["opshin.type_impls.booltyp",[],[649,{"position":[[0,26]]}],[]],["opshin.type_impls.booltype.constr_typ",[],[652,{"position":[[0,38]]}],[]],["opshin.type_impls.booltype.cmp",[],[655,{"position":[[0,30]]}],[]],["opshin.type_impls.booltype.stringifi",[],[658,{"position":[[0,36]]}],[]],["opshin.type_impls.booltype.copy_only_attribut",[],[661,{"position":[[0,47]]}],[]],["opshin.type_impls.booltype.constr",[],[664,{"position":[[0,33]]}],[]],["opshin.type_impls.booltype.attribute_typ",[],[667,{"position":[[0,41]]}],[]],["opshin.type_impls.booltype.attribut",[],[670,{"position":[[0,36]]}],[]],["opshin.type_impls.booltype.binop_typ",[],[673,{"position":[[0,37]]}],[]],["opshin.type_impls.booltype.binop",[],[676,{"position":[[0,32]]}],[]],["opshin.type_impls.booltype.unop_typ",[],[679,{"position":[[0,36]]}],[]],["opshin.type_impls.booltype.unop",[],[682,{"position":[[0,31]]}],[]],["opshin.type_impls.booltype.id_map",[],[685,{"position":[[0,33]]}],[]],["unittyp",[687,{"position":[[0,8]]}],[],[689,{"position":[[0,10]]}]],["opshin.type_impls.unittyp",[],[688,{"position":[[0,26]]}],[]],["opshin.type_impls.unittype.cmp",[],[691,{"position":[[0,30]]}],[]],["opshin.type_impls.unittype.stringifi",[],[694,{"position":[[0,36]]}],[]],["opshin.type_impls.unittype.copy_only_attribut",[],[697,{"position":[[0,47]]}],[]],["opshin.type_impls.unittype.constr_typ",[],[700,{"position":[[0,38]]}],[]],["opshin.type_impls.unittype.constr",[],[703,{"position":[[0,33]]}],[]],["opshin.type_impls.unittype.attribute_typ",[],[706,{"position":[[0,41]]}],[]],["opshin.type_impls.unittype.attribut",[],[709,{"position":[[0,36]]}],[]],["opshin.type_impls.unittype.binop_typ",[],[712,{"position":[[0,37]]}],[]],["opshin.type_impls.unittype.binop",[],[715,{"position":[[0,32]]}],[]],["opshin.type_impls.unittype.unop_typ",[],[718,{"position":[[0,36]]}],[]],["opshin.type_impls.unittype.unop",[],[721,{"position":[[0,31]]}],[]],["opshin.type_impls.unittype.id_map",[],[724,{"position":[[0,33]]}],[]],["inaccessibletyp",[726,{"position":[[0,16]]}],[],[]],["opshin.type_impls.inaccessibletyp",[],[727,{"position":[[0,34]]}],[]],["block",[],[],[728,{"position":[[12,6]]}]],["overwrit",[],[],[728,{"position":[[19,11]]}]],["opshin.type_impls.inaccessibletype.copy_only_attribut",[],[730,{"position":[[0,55]]}],[]],["opshin.type_impls.inaccessibletype.constr_typ",[],[733,{"position":[[0,46]]}],[]],["opshin.type_impls.inaccessibletype.constr",[],[736,{"position":[[0,41]]}],[]],["opshin.type_impls.inaccessibletype.attribute_typ",[],[739,{"position":[[0,49]]}],[]],["opshin.type_impls.inaccessibletype.attribut",[],[742,{"position":[[0,44]]}],[]],["opshin.type_impls.inaccessibletype.cmp",[],[745,{"position":[[0,38]]}],[]],["opshin.type_impls.inaccessibletype.stringifi",[],[748,{"position":[[0,44]]}],[]],["opshin.type_impls.inaccessibletype.binop_typ",[],[751,{"position":[[0,45]]}],[]],["opshin.type_impls.inaccessibletype.binop",[],[754,{"position":[[0,40]]}],[]],["opshin.type_impls.inaccessibletype.unop_typ",[],[757,{"position":[[0,44]]}],[]],["opshin.type_impls.inaccessibletype.unop",[],[760,{"position":[[0,39]]}],[]],["opshin.type_impls.inaccessibletype.id_map",[],[763,{"position":[[0,41]]}],[]],["repeated_addit",[765,{"position":[[0,17]]}],[],[]],["opshin.type_impls.repeated_addit",[],[766,{"position":[[0,35]]}],[]],["powimpl",[768,{"position":[[0,7]]}],[],[]],["opshin.type_impls.powimpl",[],[769,{"position":[[0,25]]}],[]],["bytestrintmulimpl",[771,{"position":[[0,17]]}],[],[]],["opshin.type_impls.bytestrintmulimpl",[],[772,{"position":[[0,35]]}],[]],["strintmulimpl",[774,{"position":[[0,13]]}],[],[]],["opshin.type_impls.strintmulimpl",[],[775,{"position":[[0,31]]}],[]],["polymorphicfunct",[777,{"position":[[0,19]]}],[],[]],["opshin.type_impls.polymorphicfunct",[],[778,{"position":[[0,37]]}],[866,{"position":[[91,38]]}]],["type_from_arg",[780,{"position":[[0,14]]},789,{"position":[[0,14]]},798,{"position":[[0,14]]},807,{"position":[[0,14]]},816,{"position":[[0,14]]},1347,{"position":[[0,14]]},4683,{"position":[[0,14]]},4692,{"position":[[0,14]]},4701,{"position":[[0,14]]}],[],[]],["opshin.type_impls.polymorphicfunction.type_from_arg",[],[781,{"position":[[0,52]]}],[]],["impl_from_arg",[783,{"position":[[0,14]]},792,{"position":[[0,14]]},801,{"position":[[0,14]]},810,{"position":[[0,14]]},819,{"position":[[0,14]]},1350,{"position":[[0,14]]},4686,{"position":[[0,14]]},4695,{"position":[[0,14]]},4704,{"position":[[0,14]]}],[],[]],["opshin.type_impls.polymorphicfunction.impl_from_arg",[],[784,{"position":[[0,52]]}],[]],["strimpl",[786,{"position":[[0,7]]}],[],[]],["opshin.type_impls.strimpl",[],[787,{"position":[[0,25]]}],[]],["opshin.type_impls.strimpl.type_from_arg",[],[790,{"position":[[0,40]]}],[]],["opshin.type_impls.strimpl.impl_from_arg",[],[793,{"position":[[0,40]]}],[]],["intimpl",[795,{"position":[[0,7]]}],[],[]],["opshin.type_impls.intimpl",[],[796,{"position":[[0,25]]}],[]],["opshin.type_impls.intimpl.type_from_arg",[],[799,{"position":[[0,40]]}],[]],["opshin.type_impls.intimpl.impl_from_arg",[],[802,{"position":[[0,40]]}],[]],["boolimpl",[804,{"position":[[0,8]]}],[],[]],["opshin.type_impls.boolimpl",[],[805,{"position":[[0,26]]}],[]],["opshin.type_impls.boolimpl.type_from_arg",[],[808,{"position":[[0,41]]}],[]],["opshin.type_impls.boolimpl.impl_from_arg",[],[811,{"position":[[0,41]]}],[]],["bytesimpl",[813,{"position":[[0,9]]}],[],[]],["opshin.type_impls.bytesimpl",[],[814,{"position":[[0,27]]}],[]],["opshin.type_impls.bytesimpl.type_from_arg",[],[817,{"position":[[0,42]]}],[]],["opshin.type_impls.bytesimpl.impl_from_arg",[],[820,{"position":[[0,42]]}],[]],["polymorphicfunctiontyp",[822,{"position":[[0,23]]}],[],[]],["opshin.type_impls.polymorphicfunctiontyp",[],[823,{"position":[[0,41]]}],[]],["special",[],[],[824,{"position":[[2,7]]},1082,{"position":[[685,7]]},2030,{"position":[[685,7]]},2048,{"position":[[685,7]]},2126,{"position":[[685,7]]},2144,{"position":[[685,7]]},2255,{"position":[[685,7]]},2279,{"position":[[685,7]]},2309,{"position":[[685,7]]},2330,{"position":[[685,7]]},4400,{"position":[[685,7]]},4472,{"position":[[2,7]]},4673,{"position":[[2,7]]}]],["act",[],[],[824,{"position":[[35,3]]}]],["differ",[],[],[824,{"position":[[39,11],[54,9]]}]],["polymorphic_funct",[825,{"position":[[0,20]]},870,{"position":[[0,20]]}],[],[866,{"position":[[69,21]]}]],["opshin.type_impls.polymorphicfunctiontype.polymorphic_funct",[],[826,{"position":[[0,62]]}],[]],["opshin.type_impls.polymorphicfunctiontype.copy_only_attribut",[],[829,{"position":[[0,62]]}],[]],["opshin.type_impls.polymorphicfunctiontype.constr_typ",[],[832,{"position":[[0,53]]}],[]],["opshin.type_impls.polymorphicfunctiontype.constr",[],[835,{"position":[[0,48]]}],[]],["opshin.type_impls.polymorphicfunctiontype.attribute_typ",[],[838,{"position":[[0,56]]}],[]],["opshin.type_impls.polymorphicfunctiontype.attribut",[],[841,{"position":[[0,51]]}],[]],["opshin.type_impls.polymorphicfunctiontype.cmp",[],[844,{"position":[[0,45]]}],[]],["opshin.type_impls.polymorphicfunctiontype.stringifi",[],[847,{"position":[[0,51]]}],[]],["opshin.type_impls.polymorphicfunctiontype.binop_typ",[],[850,{"position":[[0,52]]}],[]],["opshin.type_impls.polymorphicfunctiontype.binop",[],[853,{"position":[[0,47]]}],[]],["opshin.type_impls.polymorphicfunctiontype.unop_typ",[],[856,{"position":[[0,51]]}],[]],["opshin.type_impls.polymorphicfunctiontype.unop",[],[859,{"position":[[0,46]]}],[]],["opshin.type_impls.polymorphicfunctiontype.id_map",[],[862,{"position":[[0,48]]}],[]],["polymorphicfunctioninstancetyp",[864,{"position":[[0,31]]}],[],[]],["opshin.type_impls.polymorphicfunctioninstancetyp",[],[865,{"position":[[0,49]]}],[]],["polymorphicfunctioninstancetype(typ",[],[],[866,{"position":[[0,36]]}]],["opshin.type_impls.polymorphicfunctioninstancetype.typ",[],[868,{"position":[[0,53]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.polymorphic_funct",[],[871,{"position":[[0,70]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.id_map",[],[874,{"position":[[0,56]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.constr_typ",[],[877,{"position":[[0,61]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.constr",[],[880,{"position":[[0,56]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.attribute_typ",[],[883,{"position":[[0,64]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.attribut",[],[886,{"position":[[0,59]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.cmp",[],[889,{"position":[[0,53]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.stringifi",[],[892,{"position":[[0,59]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.copy_only_attribut",[],[895,{"position":[[0,70]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.binop_typ",[],[898,{"position":[[0,60]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.binop",[],[901,{"position":[[0,55]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.unop_typ",[],[904,{"position":[[0,59]]}],[]],["opshin.type_impls.polymorphicfunctioninstancetype.unop",[],[907,{"position":[[0,54]]}],[]],["empty_list",[909,{"position":[[0,10]]}],[],[]],["opshin.type_impls.empty_list",[],[910,{"position":[[0,28]]}],[]],["transform_ext_params_map",[912,{"position":[[0,24]]}],[],[]],["opshin.type_impls.transform_ext_params_map",[],[913,{"position":[[0,42]]}],[]],["transform_output_map",[915,{"position":[[0,20]]}],[],[]],["opshin.type_impls.transform_output_map",[],[916,{"position":[[0,38]]}],[]],["rewrit",[918,{"position":[[0,7]]}],[],[926,{"position":[[488,8]]},941,{"position":[[488,8]]},965,{"position":[[488,8]]},986,{"position":[[488,8]]},1004,{"position":[[488,8]]},1025,{"position":[[488,8]]},1040,{"position":[[488,8]]},1061,{"position":[[488,8]]},1100,{"position":[[488,8]]},1145,{"position":[[488,8]]},1163,{"position":[[488,8]]},1169,{"position":[[488,8]]},1184,{"position":[[488,8]]},1199,{"position":[[488,8]]},1214,{"position":[[488,8]]},1232,{"position":[[488,8]]},1247,{"position":[[488,8]]},1328,{"position":[[488,8]]},1355,{"position":[[488,8]]},1373,{"position":[[488,8]]},1388,{"position":[[488,8]]},1403,{"position":[[488,8]]},1424,{"position":[[488,8]]},2000,{"position":[[488,8]]},2015,{"position":[[488,8]]},2072,{"position":[[488,8]]},2177,{"position":[[488,8]]},2249,{"position":[[488,8]]},2264,{"position":[[488,8]]},4256,{"position":[[488,8]]}]],["opshin.rewrit",[],[919,{"position":[[0,14]]}],[]],["rewrite_remove_type_stuff",[921,{"position":[[0,25]]}],[],[]],["opshin.rewrite.rewrite_remove_type_stuff",[],[922,{"position":[[0,40]]}],[]],["rewriteremovetypestuff",[924,{"position":[[0,22]]}],[],[]],["opshin.rewrite.rewrite_remove_type_stuff.rewriteremovetypestuff",[],[925,{"position":[[0,63]]}],[]],["nodevisitor",[],[],[926,{"position":[[10,11]]},941,{"position":[[10,11]]},965,{"position":[[10,11]]},986,{"position":[[10,11]]},1004,{"position":[[10,11]]},1025,{"position":[[10,11]]},1040,{"position":[[10,11]]},1061,{"position":[[10,11]]},1082,{"position":[[605,11]]},1100,{"position":[[10,11]]},1145,{"position":[[10,11]]},1163,{"position":[[10,11]]},1169,{"position":[[10,11]]},1184,{"position":[[10,11]]},1199,{"position":[[10,11]]},1214,{"position":[[10,11]]},1232,{"position":[[10,11]]},1247,{"position":[[10,11]]},1328,{"position":[[10,11]]},1355,{"position":[[10,11]]},1373,{"position":[[10,11]]},1388,{"position":[[10,11]]},1403,{"position":[[10,11]]},1424,{"position":[[10,11]]},2000,{"position":[[10,11]]},2015,{"position":[[10,11]]},2030,{"position":[[605,11]]},2048,{"position":[[605,11]]},2072,{"position":[[10,11]]},2126,{"position":[[605,11]]},2144,{"position":[[605,11]]},2177,{"position":[[10,11]]},2234,{"position":[[194,11]]},2249,{"position":[[10,11]]},2255,{"position":[[605,11]]},2264,{"position":[[10,11]]},2279,{"position":[[605,11]]},2309,{"position":[[605,11]]},2330,{"position":[[605,11]]},4256,{"position":[[10,11]]},4400,{"position":[[605,11]]}]],["subclass",[],[],[926,{"position":[[22,8]]},941,{"position":[[22,8]]},965,{"position":[[22,8]]},986,{"position":[[22,8]]},1004,{"position":[[22,8]]},1025,{"position":[[22,8]]},1040,{"position":[[22,8]]},1061,{"position":[[22,8]]},1082,{"position":[[213,11],[234,8]]},1100,{"position":[[22,8]]},1145,{"position":[[22,8]]},1163,{"position":[[22,8]]},1169,{"position":[[22,8]]},1184,{"position":[[22,8]]},1199,{"position":[[22,8]]},1214,{"position":[[22,8]]},1232,{"position":[[22,8]]},1247,{"position":[[22,8]]},1328,{"position":[[22,8]]},1355,{"position":[[22,8]]},1373,{"position":[[22,8]]},1388,{"position":[[22,8]]},1403,{"position":[[22,8]]},1424,{"position":[[22,8]]},2000,{"position":[[22,8]]},2015,{"position":[[22,8]]},2030,{"position":[[213,11],[234,8]]},2048,{"position":[[213,11],[234,8]]},2072,{"position":[[22,8]]},2126,{"position":[[213,11],[234,8]]},2144,{"position":[[213,11],[234,8]]},2177,{"position":[[22,8]]},2249,{"position":[[22,8]]},2255,{"position":[[213,11],[234,8]]},2264,{"position":[[22,8]]},2279,{"position":[[213,11],[234,8]]},2309,{"position":[[213,11],[234,8]]},2330,{"position":[[213,11],[234,8]]},2765,{"position":[[252,9],[380,8],[698,10],[880,11]]},2873,{"position":[[252,9],[380,8],[698,10],[880,11]]},2936,{"position":[[252,9],[380,8],[698,10],[880,11]]},3602,{"position":[[252,9],[380,8],[698,10],[880,11]]},3908,{"position":[[252,9],[380,8],[698,10],[880,11]]},4121,{"position":[[252,9],[380,8],[698,10],[880,11]]},4256,{"position":[[22,8]]},4400,{"position":[[213,11],[234,8]]}]],["walk",[],[],[926,{"position":[[36,5],[127,4]]},941,{"position":[[36,5],[127,4]]},965,{"position":[[36,5],[127,4]]},986,{"position":[[36,5],[127,4]]},1004,{"position":[[36,5],[127,4]]},1025,{"position":[[36,5],[127,4]]},1040,{"position":[[36,5],[127,4]]},1061,{"position":[[36,5],[127,4]]},1082,{"position":[[31,5]]},1100,{"position":[[36,5],[127,4]]},1145,{"position":[[36,5],[127,4]]},1163,{"position":[[36,5],[127,4]]},1169,{"position":[[36,5],[127,4]]},1184,{"position":[[36,5],[127,4]]},1199,{"position":[[36,5],[127,4]]},1214,{"position":[[36,5],[127,4]]},1232,{"position":[[36,5],[127,4]]},1247,{"position":[[36,5],[127,4]]},1328,{"position":[[36,5],[127,4]]},1355,{"position":[[36,5],[127,4]]},1373,{"position":[[36,5],[127,4]]},1388,{"position":[[36,5],[127,4]]},1403,{"position":[[36,5],[127,4]]},1424,{"position":[[36,5],[127,4]]},2000,{"position":[[36,5],[127,4]]},2015,{"position":[[36,5],[127,4]]},2030,{"position":[[31,5]]},2048,{"position":[[31,5]]},2072,{"position":[[36,5],[127,4]]},2126,{"position":[[31,5]]},2144,{"position":[[31,5]]},2177,{"position":[[36,5],[127,4]]},2249,{"position":[[36,5],[127,4]]},2255,{"position":[[31,5]]},2264,{"position":[[36,5],[127,4]]},2279,{"position":[[31,5]]},2309,{"position":[[31,5]]},2330,{"position":[[31,5]]},4256,{"position":[[36,5],[127,4]]},4400,{"position":[[31,5]]}]],["abstract",[],[],[926,{"position":[[46,8]]},941,{"position":[[46,8]]},965,{"position":[[46,8]]},986,{"position":[[46,8]]},1004,{"position":[[46,8]]},1025,{"position":[[46,8]]},1040,{"position":[[46,8]]},1061,{"position":[[46,8]]},1082,{"position":[[41,8]]},1100,{"position":[[46,8]]},1145,{"position":[[46,8]]},1163,{"position":[[46,8]]},1169,{"position":[[46,8]]},1184,{"position":[[46,8]]},1199,{"position":[[46,8]]},1214,{"position":[[46,8]]},1232,{"position":[[46,8]]},1247,{"position":[[46,8]]},1328,{"position":[[46,8]]},1355,{"position":[[46,8]]},1373,{"position":[[46,8]]},1388,{"position":[[46,8]]},1403,{"position":[[46,8]]},1424,{"position":[[46,8]]},2000,{"position":[[46,8]]},2015,{"position":[[46,8]]},2030,{"position":[[41,8]]},2048,{"position":[[41,8]]},2072,{"position":[[46,8]]},2126,{"position":[[41,8]]},2144,{"position":[[41,8]]},2177,{"position":[[46,8]]},2249,{"position":[[46,8]]},2255,{"position":[[41,8]]},2264,{"position":[[46,8]]},2279,{"position":[[41,8]]},2309,{"position":[[41,8]]},2330,{"position":[[41,8]]},4256,{"position":[[46,8]]},4400,{"position":[[41,8]]}]],["tree",[],[],[926,{"position":[[62,4]]},941,{"position":[[62,4]]},965,{"position":[[62,4]]},986,{"position":[[62,4]]},1004,{"position":[[62,4]]},1025,{"position":[[62,4]]},1040,{"position":[[62,4]]},1061,{"position":[[62,4]]},1082,{"position":[[57,4]]},1100,{"position":[[62,4]]},1145,{"position":[[62,4]]},1163,{"position":[[62,4]]},1169,{"position":[[62,4]]},1184,{"position":[[62,4]]},1199,{"position":[[62,4]]},1214,{"position":[[62,4]]},1232,{"position":[[62,4]]},1247,{"position":[[62,4]]},1328,{"position":[[62,4]]},1355,{"position":[[62,4]]},1373,{"position":[[62,4]]},1388,{"position":[[62,4]]},1403,{"position":[[62,4]]},1424,{"position":[[62,4]]},2000,{"position":[[62,4]]},2015,{"position":[[62,4]]},2030,{"position":[[57,4]]},2048,{"position":[[57,4]]},2072,{"position":[[62,4]]},2126,{"position":[[57,4]]},2144,{"position":[[57,4]]},2177,{"position":[[62,4]]},2249,{"position":[[62,4]]},2255,{"position":[[57,4]]},2264,{"position":[[62,4]]},2279,{"position":[[57,4]]},2309,{"position":[[57,4]]},2330,{"position":[[57,4]]},4256,{"position":[[62,4]]},4400,{"position":[[57,4]]}]],["allow",[],[],[926,{"position":[[71,6]]},941,{"position":[[71,6]]},965,{"position":[[71,6]]},986,{"position":[[71,6]]},1004,{"position":[[71,6]]},1025,{"position":[[71,6]]},1040,{"position":[[71,6]]},1061,{"position":[[71,6]]},1082,{"position":[[733,6]]},1100,{"position":[[71,6]]},1145,{"position":[[71,6]]},1163,{"position":[[71,6]]},1169,{"position":[[71,6]]},1184,{"position":[[71,6]]},1199,{"position":[[71,6]]},1214,{"position":[[71,6]]},1232,{"position":[[71,6]]},1247,{"position":[[71,6]]},1328,{"position":[[71,6]]},1355,{"position":[[71,6]]},1373,{"position":[[71,6]]},1388,{"position":[[71,6]]},1403,{"position":[[71,6]]},1424,{"position":[[71,6]]},2000,{"position":[[71,6]]},2015,{"position":[[71,6]]},2030,{"position":[[733,6]]},2048,{"position":[[733,6]]},2072,{"position":[[71,6]]},2126,{"position":[[733,6]]},2144,{"position":[[733,6]]},2177,{"position":[[71,6]]},2234,{"position":[[331,7],[384,5]]},2249,{"position":[[71,6]]},2255,{"position":[[733,6]]},2264,{"position":[[71,6]]},2279,{"position":[[733,6]]},2309,{"position":[[733,6]]},2330,{"position":[[733,6]]},4220,{"position":[[70,6],[119,5]]},4256,{"position":[[71,6]]},4400,{"position":[[733,6]]}]],["modif",[],[],[926,{"position":[[78,12]]},941,{"position":[[78,12]]},965,{"position":[[78,12]]},986,{"position":[[78,12]]},1004,{"position":[[78,12]]},1025,{"position":[[78,12]]},1040,{"position":[[78,12]]},1061,{"position":[[78,12]]},1082,{"position":[[740,14]]},1100,{"position":[[78,12]]},1145,{"position":[[78,12]]},1163,{"position":[[78,12]]},1169,{"position":[[78,12]]},1184,{"position":[[78,12]]},1199,{"position":[[78,12]]},1214,{"position":[[78,12]]},1232,{"position":[[78,12]]},1247,{"position":[[78,12]]},1328,{"position":[[78,12]]},1355,{"position":[[78,12]]},1373,{"position":[[78,12]]},1388,{"position":[[78,12]]},1403,{"position":[[78,12]]},1424,{"position":[[78,12]]},2000,{"position":[[78,12]]},2015,{"position":[[78,12]]},2030,{"position":[[740,14]]},2048,{"position":[[740,14]]},2072,{"position":[[78,12]]},2126,{"position":[[740,14]]},2144,{"position":[[740,14]]},2177,{"position":[[78,12]]},2249,{"position":[[78,12]]},2255,{"position":[[740,14]]},2264,{"position":[[78,12]]},2279,{"position":[[740,14]]},2309,{"position":[[740,14]]},2330,{"position":[[740,14]]},4256,{"position":[[78,12]]},4400,{"position":[[740,14]]}]],["nodetransform",[],[],[926,{"position":[[106,15]]},941,{"position":[[106,15]]},965,{"position":[[106,15]]},986,{"position":[[106,15]]},1004,{"position":[[106,15]]},1025,{"position":[[106,15]]},1040,{"position":[[106,15]]},1061,{"position":[[106,15]]},1082,{"position":[[710,15]]},1100,{"position":[[106,15]]},1145,{"position":[[106,15]]},1163,{"position":[[106,15]]},1169,{"position":[[106,15]]},1184,{"position":[[106,15]]},1199,{"position":[[106,15]]},1214,{"position":[[106,15]]},1232,{"position":[[106,15]]},1247,{"position":[[106,15]]},1328,{"position":[[106,15]]},1355,{"position":[[106,15]]},1373,{"position":[[106,15]]},1388,{"position":[[106,15]]},1403,{"position":[[106,15]]},1424,{"position":[[106,15]]},2000,{"position":[[106,15]]},2015,{"position":[[106,15]]},2030,{"position":[[710,15]]},2048,{"position":[[710,15]]},2072,{"position":[[106,15]]},2126,{"position":[[710,15]]},2144,{"position":[[710,15]]},2177,{"position":[[106,15]]},2234,{"position":[[174,15]]},2249,{"position":[[106,15]]},2255,{"position":[[710,15]]},2264,{"position":[[106,15]]},2279,{"position":[[710,15]]},2309,{"position":[[710,15]]},2330,{"position":[[710,15]]},4256,{"position":[[106,15]]},4400,{"position":[[710,15]]}]],["ast",[],[],[926,{"position":[[136,3]]},941,{"position":[[136,3]]},965,{"position":[[136,3]]},986,{"position":[[136,3]]},1004,{"position":[[136,3]]},1025,{"position":[[136,3]]},1040,{"position":[[136,3]]},1061,{"position":[[136,3]]},1100,{"position":[[136,3]]},1145,{"position":[[136,3]]},1163,{"position":[[136,3]]},1169,{"position":[[136,3]]},1184,{"position":[[136,3]]},1199,{"position":[[136,3]]},1214,{"position":[[136,3]]},1232,{"position":[[136,3]]},1247,{"position":[[136,3]]},1328,{"position":[[136,3]]},1355,{"position":[[136,3]]},1373,{"position":[[136,3]]},1388,{"position":[[136,3]]},1403,{"position":[[136,3]]},1424,{"position":[[136,3]]},2000,{"position":[[136,3]]},2015,{"position":[[136,3]]},2072,{"position":[[136,3]]},2177,{"position":[[136,3]]},2234,{"position":[[117,3]]},2249,{"position":[[136,3]]},2264,{"position":[[136,3]]},4256,{"position":[[136,3]]}]],["visitor",[],[],[926,{"position":[[172,7],[250,7],[991,7]]},941,{"position":[[172,7],[250,7],[991,7]]},965,{"position":[[172,7],[250,7],[991,7]]},986,{"position":[[172,7],[250,7],[991,7]]},1004,{"position":[[172,7],[250,7],[991,7]]},1025,{"position":[[172,7],[250,7],[991,7]]},1040,{"position":[[172,7],[250,7],[991,7]]},1061,{"position":[[172,7],[250,7],[991,7]]},1082,{"position":[[7,7],[74,7],[250,7],[283,7],[489,7],[565,7],[693,7]]},1100,{"position":[[172,7],[250,7],[991,7]]},1145,{"position":[[172,7],[250,7],[991,7]]},1163,{"position":[[172,7],[250,7],[991,7]]},1169,{"position":[[172,7],[250,7],[991,7]]},1184,{"position":[[172,7],[250,7],[991,7]]},1199,{"position":[[172,7],[250,7],[991,7]]},1214,{"position":[[172,7],[250,7],[991,7]]},1232,{"position":[[172,7],[250,7],[991,7]]},1247,{"position":[[172,7],[250,7],[991,7]]},1328,{"position":[[172,7],[250,7],[991,7]]},1355,{"position":[[172,7],[250,7],[991,7]]},1373,{"position":[[172,7],[250,7],[991,7]]},1388,{"position":[[172,7],[250,7],[991,7]]},1403,{"position":[[172,7],[250,7],[991,7]]},1424,{"position":[[172,7],[250,7],[991,7]]},1985,{"position":[[22,7]]},2000,{"position":[[172,7],[250,7],[991,7]]},2015,{"position":[[172,7],[250,7],[991,7]]},2030,{"position":[[7,7],[74,7],[250,7],[283,7],[489,7],[565,7],[693,7]]},2048,{"position":[[7,7],[74,7],[250,7],[283,7],[489,7],[565,7],[693,7]]},2054,{"position":[[22,7]]},2072,{"position":[[172,7],[250,7],[991,7]]},2126,{"position":[[7,7],[74,7],[250,7],[283,7],[489,7],[565,7],[693,7]]},2144,{"position":[[7,7],[74,7],[250,7],[283,7],[489,7],[565,7],[693,7]]},2177,{"position":[[172,7],[250,7],[991,7]]},2225,{"position":[[22,7]]},2249,{"position":[[172,7],[250,7],[991,7]]},2255,{"position":[[7,7],[74,7],[250,7],[283,7],[489,7],[565,7],[693,7]]},2264,{"position":[[172,7],[250,7],[991,7]]},2279,{"position":[[7,7],[74,7],[250,7],[283,7],[489,7],[565,7],[693,7]]},2309,{"position":[[7,7],[74,7],[250,7],[283,7],[489,7],[565,7],[693,7]]},2330,{"position":[[7,7],[74,7],[250,7],[283,7],[489,7],[565,7],[693,7]]},4238,{"position":[[22,7]]},4256,{"position":[[172,7],[250,7],[991,7]]},4394,{"position":[[22,7]]},4400,{"position":[[7,7],[74,7],[250,7],[283,7],[489,7],[565,7],[693,7]]},4433,{"position":[[22,7]]}]],["replac",[],[],[926,{"position":[[191,7],[336,8],[427,11]]},941,{"position":[[191,7],[336,8],[427,11]]},965,{"position":[[191,7],[336,8],[427,11]]},986,{"position":[[191,7],[336,8],[427,11]]},1004,{"position":[[191,7],[336,8],[427,11]]},1025,{"position":[[191,7],[336,8],[427,11]]},1040,{"position":[[191,7],[336,8],[427,11]]},1061,{"position":[[191,7],[336,8],[427,11]]},1100,{"position":[[191,7],[336,8],[427,11]]},1145,{"position":[[191,7],[336,8],[427,11]]},1163,{"position":[[191,7],[336,8],[427,11]]},1169,{"position":[[191,7],[336,8],[427,11]]},1184,{"position":[[191,7],[336,8],[427,11]]},1199,{"position":[[191,7],[336,8],[427,11]]},1214,{"position":[[191,7],[336,8],[427,11]]},1232,{"position":[[191,7],[336,8],[427,11]]},1247,{"position":[[191,7],[336,8],[427,11]]},1328,{"position":[[191,7],[336,8],[427,11]]},1355,{"position":[[191,7],[336,8],[427,11]]},1373,{"position":[[191,7],[336,8],[427,11]]},1388,{"position":[[191,7],[336,8],[427,11]]},1403,{"position":[[191,7],[336,8],[427,11]]},1424,{"position":[[191,7],[336,8],[427,11]]},2000,{"position":[[191,7],[336,8],[427,11]]},2015,{"position":[[191,7],[336,8],[427,11]]},2072,{"position":[[191,7],[336,8],[427,11]]},2177,{"position":[[191,7],[336,8],[427,11]]},2249,{"position":[[191,7],[336,8],[427,11]]},2264,{"position":[[191,7],[336,8],[427,11]]},4256,{"position":[[191,7],[336,8],[427,11]]}]],["remov",[],[],[926,{"position":[[202,6],[293,7]]},941,{"position":[[202,6],[293,7]]},965,{"position":[[202,6],[293,7]]},986,{"position":[[202,6],[293,7]]},1004,{"position":[[202,6],[293,7]]},1025,{"position":[[202,6],[293,7]]},1040,{"position":[[202,6],[293,7]]},1061,{"position":[[202,6],[293,7]]},1100,{"position":[[202,6],[293,7]]},1145,{"position":[[202,6],[293,7]]},1163,{"position":[[202,6],[293,7]]},1169,{"position":[[202,6],[293,7]]},1184,{"position":[[202,6],[293,7]]},1199,{"position":[[202,6],[293,7]]},1214,{"position":[[202,6],[293,7]]},1232,{"position":[[202,6],[293,7]]},1247,{"position":[[202,6],[293,7]]},1328,{"position":[[202,6],[293,7]]},1355,{"position":[[202,6],[293,7]]},1373,{"position":[[202,6],[293,7]]},1388,{"position":[[202,6],[293,7]]},1403,{"position":[[202,6],[293,7]]},1424,{"position":[[202,6],[293,7]]},2000,{"position":[[202,6],[293,7]]},2015,{"position":[[202,6],[293,7]]},2072,{"position":[[202,6],[293,7]]},2177,{"position":[[202,6],[293,7]]},2249,{"position":[[202,6],[293,7]]},2264,{"position":[[202,6],[293,7]]},4256,{"position":[[202,6],[293,7]]}]],["old",[],[],[926,{"position":[[213,3]]},941,{"position":[[213,3]]},965,{"position":[[213,3]]},986,{"position":[[213,3]]},1004,{"position":[[213,3]]},1025,{"position":[[213,3]]},1040,{"position":[[213,3]]},1061,{"position":[[213,3]]},1100,{"position":[[213,3]]},1145,{"position":[[213,3]]},1163,{"position":[[213,3]]},1169,{"position":[[213,3]]},1184,{"position":[[213,3]]},1199,{"position":[[213,3]]},1214,{"position":[[213,3]]},1232,{"position":[[213,3]]},1247,{"position":[[213,3]]},1328,{"position":[[213,3]]},1355,{"position":[[213,3]]},1373,{"position":[[213,3]]},1388,{"position":[[213,3]]},1403,{"position":[[213,3]]},1424,{"position":[[213,3]]},2000,{"position":[[213,3]]},2015,{"position":[[213,3]]},2072,{"position":[[213,3]]},2177,{"position":[[213,3]]},2249,{"position":[[213,3]]},2264,{"position":[[213,3]]},4256,{"position":[[213,3]]}]],["locat",[],[],[926,{"position":[[310,9]]},941,{"position":[[310,9]]},965,{"position":[[310,9]]},986,{"position":[[310,9]]},1004,{"position":[[310,9]]},1025,{"position":[[310,9]]},1040,{"position":[[310,9]]},1061,{"position":[[310,9]]},1100,{"position":[[310,9]]},1145,{"position":[[310,9]]},1163,{"position":[[310,9]]},1169,{"position":[[310,9]]},1184,{"position":[[310,9]]},1199,{"position":[[310,9]]},1214,{"position":[[310,9]]},1232,{"position":[[310,9]]},1247,{"position":[[310,9]]},1328,{"position":[[310,9]]},1355,{"position":[[310,9]]},1373,{"position":[[310,9]]},1388,{"position":[[310,9]]},1403,{"position":[[310,9]]},1424,{"position":[[310,9]]},2000,{"position":[[310,9]]},2015,{"position":[[310,9]]},2072,{"position":[[310,9]]},2177,{"position":[[310,9]]},2249,{"position":[[310,9]]},2264,{"position":[[310,9]]},4256,{"position":[[310,9]]}]],["otherwis",[],[],[926,{"position":[[320,9]]},941,{"position":[[320,9]]},965,{"position":[[320,9]]},986,{"position":[[320,9]]},1004,{"position":[[320,9]]},1025,{"position":[[320,9]]},1040,{"position":[[320,9]]},1061,{"position":[[320,9]]},1100,{"position":[[320,9]]},1145,{"position":[[320,9]]},1163,{"position":[[320,9]]},1169,{"position":[[320,9]]},1184,{"position":[[320,9]]},1199,{"position":[[320,9]]},1214,{"position":[[320,9]]},1232,{"position":[[320,9]]},1247,{"position":[[320,9]]},1328,{"position":[[320,9]]},1355,{"position":[[320,9]]},1373,{"position":[[320,9]]},1388,{"position":[[320,9]]},1403,{"position":[[320,9]]},1424,{"position":[[320,9]]},2000,{"position":[[320,9]]},2015,{"position":[[320,9]]},2072,{"position":[[320,9]]},2177,{"position":[[320,9]]},2243,{"position":[[105,10]]},2249,{"position":[[320,9]]},2264,{"position":[[320,9]]},4256,{"position":[[320,9]]},4901,{"position":[[162,9]]}]],["origin",[],[],[926,{"position":[[396,8]]},941,{"position":[[396,8]]},965,{"position":[[396,8]]},986,{"position":[[396,8]]},1004,{"position":[[396,8]]},1025,{"position":[[396,8]]},1040,{"position":[[396,8]]},1061,{"position":[[396,8]]},1100,{"position":[[396,8]]},1145,{"position":[[396,8]]},1163,{"position":[[396,8]]},1169,{"position":[[396,8]]},1184,{"position":[[396,8]]},1199,{"position":[[396,8]]},1214,{"position":[[396,8]]},1232,{"position":[[396,8]]},1247,{"position":[[396,8]]},1328,{"position":[[396,8]]},1355,{"position":[[396,8]]},1373,{"position":[[396,8]]},1388,{"position":[[396,8]]},1403,{"position":[[396,8]]},1424,{"position":[[396,8]]},2000,{"position":[[396,8]]},2015,{"position":[[396,8]]},2072,{"position":[[396,8]]},2177,{"position":[[396,8]]},2249,{"position":[[396,8]]},2264,{"position":[[396,8]]},4256,{"position":[[396,8]]}]],["case",[],[],[926,{"position":[[419,4]]},941,{"position":[[419,4]]},965,{"position":[[419,4]]},986,{"position":[[419,4]]},1004,{"position":[[419,4]]},1025,{"position":[[419,4]]},1040,{"position":[[419,4]]},1061,{"position":[[419,4]]},1100,{"position":[[419,4]]},1145,{"position":[[419,4]]},1163,{"position":[[419,4]]},1169,{"position":[[419,4]]},1184,{"position":[[419,4]]},1199,{"position":[[419,4]]},1214,{"position":[[419,4]]},1232,{"position":[[419,4]]},1247,{"position":[[419,4]]},1328,{"position":[[419,4]]},1355,{"position":[[419,4]]},1373,{"position":[[419,4]]},1388,{"position":[[419,4]]},1403,{"position":[[419,4]]},1424,{"position":[[419,4]]},2000,{"position":[[419,4]]},2015,{"position":[[419,4]]},2072,{"position":[[419,4]]},2177,{"position":[[419,4]]},2249,{"position":[[419,4]]},2264,{"position":[[419,4]]},2414,{"position":[[941,6]]},2444,{"position":[[941,6]]},2477,{"position":[[941,6]]},2660,{"position":[[941,6]]},2765,{"position":[[40,6],[167,6]]},2873,{"position":[[40,6],[167,6]]},2936,{"position":[[40,6],[167,6]]},3602,{"position":[[40,6],[167,6]]},3908,{"position":[[40,6],[167,6]]},4121,{"position":[[40,6],[167,6]]},4256,{"position":[[419,4]]}]],["take",[],[],[926,{"position":[[439,5]]},941,{"position":[[439,5]]},965,{"position":[[439,5]]},986,{"position":[[439,5]]},1004,{"position":[[439,5]]},1025,{"position":[[439,5]]},1040,{"position":[[439,5]]},1061,{"position":[[439,5]]},1100,{"position":[[439,5]]},1145,{"position":[[439,5]]},1163,{"position":[[439,5]]},1169,{"position":[[439,5]]},1184,{"position":[[439,5]]},1199,{"position":[[439,5]]},1214,{"position":[[439,5]]},1232,{"position":[[439,5]]},1247,{"position":[[439,5]]},1328,{"position":[[439,5]]},1355,{"position":[[439,5]]},1373,{"position":[[439,5]]},1388,{"position":[[439,5]]},1403,{"position":[[439,5]]},1424,{"position":[[439,5]]},1880,{"position":[[133,4]]},2000,{"position":[[439,5]]},2015,{"position":[[439,5]]},2072,{"position":[[439,5]]},2177,{"position":[[439,5]]},2249,{"position":[[439,5]]},2264,{"position":[[439,5]]},4256,{"position":[[439,5]]},4676,{"position":[[64,5]]}]],["place",[],[],[926,{"position":[[445,6]]},941,{"position":[[445,6]]},965,{"position":[[445,6]]},986,{"position":[[445,6]]},1004,{"position":[[445,6]]},1025,{"position":[[445,6]]},1040,{"position":[[445,6]]},1061,{"position":[[445,6]]},1100,{"position":[[445,6]]},1145,{"position":[[445,6]]},1163,{"position":[[445,6]]},1169,{"position":[[445,6]]},1184,{"position":[[445,6]]},1199,{"position":[[445,6]]},1214,{"position":[[445,6]]},1232,{"position":[[445,6]]},1247,{"position":[[445,6]]},1328,{"position":[[445,6]]},1355,{"position":[[445,6]]},1373,{"position":[[445,6]]},1388,{"position":[[445,6]]},1403,{"position":[[445,6]]},1424,{"position":[[445,6]]},2000,{"position":[[445,6]]},2015,{"position":[[445,6]]},2072,{"position":[[445,6]]},2177,{"position":[[445,6]]},2243,{"position":[[169,6]]},2249,{"position":[[445,6]]},2264,{"position":[[445,6]]},2765,{"position":[[90,6]]},2873,{"position":[[90,6]]},2936,{"position":[[90,6]]},3602,{"position":[[90,6]]},3908,{"position":[[90,6]]},4121,{"position":[[90,6]]},4256,{"position":[[445,6]]}]],["occurr",[],[],[926,{"position":[[501,11]]},941,{"position":[[501,11]]},965,{"position":[[501,11]]},986,{"position":[[501,11]]},1004,{"position":[[501,11]]},1025,{"position":[[501,11]]},1040,{"position":[[501,11]]},1061,{"position":[[501,11]]},1100,{"position":[[501,11]]},1145,{"position":[[501,11]]},1163,{"position":[[501,11]]},1169,{"position":[[501,11]]},1184,{"position":[[501,11]]},1199,{"position":[[501,11]]},1214,{"position":[[501,11]]},1232,{"position":[[501,11]]},1247,{"position":[[501,11]]},1328,{"position":[[501,11]]},1355,{"position":[[501,11]]},1373,{"position":[[501,11]]},1388,{"position":[[501,11]]},1403,{"position":[[501,11]]},1424,{"position":[[501,11]]},2000,{"position":[[501,11]]},2015,{"position":[[501,11]]},2072,{"position":[[501,11]]},2177,{"position":[[501,11]]},2249,{"position":[[501,11]]},2264,{"position":[[501,11]]},4256,{"position":[[501,11]]}]],["lookup",[],[],[926,{"position":[[521,7]]},941,{"position":[[521,7]]},965,{"position":[[521,7]]},986,{"position":[[521,7]]},1004,{"position":[[521,7]]},1025,{"position":[[521,7]]},1040,{"position":[[521,7]]},1061,{"position":[[521,7]]},1100,{"position":[[521,7]]},1145,{"position":[[521,7]]},1163,{"position":[[521,7]]},1169,{"position":[[521,7]]},1184,{"position":[[521,7]]},1199,{"position":[[521,7]]},1214,{"position":[[521,7]]},1232,{"position":[[521,7]]},1247,{"position":[[521,7]]},1316,{"position":[[179,7],[208,7]]},1328,{"position":[[521,7]]},1355,{"position":[[521,7]]},1373,{"position":[[521,7]]},1388,{"position":[[521,7]]},1403,{"position":[[521,7]]},1424,{"position":[[521,7]]},2000,{"position":[[521,7]]},2015,{"position":[[521,7]]},2072,{"position":[[521,7]]},2177,{"position":[[521,7]]},2249,{"position":[[521,7]]},2264,{"position":[[521,7]]},4256,{"position":[[521,7]]},4709,{"position":[[179,7],[208,7]]},4760,{"position":[[179,7],[208,7]]}]],["foo",[2916,{"position":[[0,3]]}],[],[926,{"position":[[531,3]]},941,{"position":[[531,3]]},965,{"position":[[531,3]]},986,{"position":[[531,3]]},1004,{"position":[[531,3]]},1025,{"position":[[531,3]]},1040,{"position":[[531,3]]},1061,{"position":[[531,3]]},1100,{"position":[[531,3]]},1145,{"position":[[531,3]]},1163,{"position":[[531,3]]},1169,{"position":[[531,3]]},1184,{"position":[[531,3]]},1199,{"position":[[531,3]]},1214,{"position":[[531,3]]},1232,{"position":[[531,3]]},1247,{"position":[[531,3]]},1328,{"position":[[531,3]]},1355,{"position":[[531,3]]},1373,{"position":[[531,3]]},1388,{"position":[[531,3]]},1403,{"position":[[531,3]]},1424,{"position":[[531,3]]},2000,{"position":[[531,3]]},2015,{"position":[[531,3]]},2072,{"position":[[531,3]]},2177,{"position":[[531,3]]},2249,{"position":[[531,3]]},2264,{"position":[[531,3]]},4256,{"position":[[531,3]]}]],["data['foo",[],[],[926,{"position":[[541,11]]},941,{"position":[[541,11]]},965,{"position":[[541,11]]},986,{"position":[[541,11]]},1004,{"position":[[541,11]]},1025,{"position":[[541,11]]},1040,{"position":[[541,11]]},1061,{"position":[[541,11]]},1100,{"position":[[541,11]]},1145,{"position":[[541,11]]},1163,{"position":[[541,11]]},1169,{"position":[[541,11]]},1184,{"position":[[541,11]]},1199,{"position":[[541,11]]},1214,{"position":[[541,11]]},1232,{"position":[[541,11]]},1247,{"position":[[541,11]]},1328,{"position":[[541,11]]},1355,{"position":[[541,11]]},1373,{"position":[[541,11]]},1388,{"position":[[541,11]]},1403,{"position":[[541,11]]},1424,{"position":[[541,11]]},2000,{"position":[[541,11]]},2015,{"position":[[541,11]]},2072,{"position":[[541,11]]},2177,{"position":[[541,11]]},2249,{"position":[[541,11]]},2264,{"position":[[541,11]]},4256,{"position":[[541,11]]}]],["rewritename(nodetransform",[],[],[926,{"position":[[560,29]]},941,{"position":[[560,29]]},965,{"position":[[560,29]]},986,{"position":[[560,29]]},1004,{"position":[[560,29]]},1025,{"position":[[560,29]]},1040,{"position":[[560,29]]},1061,{"position":[[560,29]]},1100,{"position":[[560,29]]},1145,{"position":[[560,29]]},1163,{"position":[[560,29]]},1169,{"position":[[560,29]]},1184,{"position":[[560,29]]},1199,{"position":[[560,29]]},1214,{"position":[[560,29]]},1232,{"position":[[560,29]]},1247,{"position":[[560,29]]},1328,{"position":[[560,29]]},1355,{"position":[[560,29]]},1373,{"position":[[560,29]]},1388,{"position":[[560,29]]},1403,{"position":[[560,29]]},1424,{"position":[[560,29]]},2000,{"position":[[560,29]]},2015,{"position":[[560,29]]},2072,{"position":[[560,29]]},2177,{"position":[[560,29]]},2249,{"position":[[560,29]]},2264,{"position":[[560,29]]},4256,{"position":[[560,29]]}]],["def",[],[],[926,{"position":[[590,3]]},941,{"position":[[590,3]]},965,{"position":[[590,3]]},986,{"position":[[590,3]]},1004,{"position":[[590,3]]},1025,{"position":[[590,3]]},1040,{"position":[[590,3]]},1061,{"position":[[590,3]]},1100,{"position":[[590,3]]},1145,{"position":[[590,3]]},1163,{"position":[[590,3]]},1169,{"position":[[590,3]]},1184,{"position":[[590,3]]},1199,{"position":[[590,3]]},1214,{"position":[[590,3]]},1232,{"position":[[590,3]]},1247,{"position":[[590,3]]},1328,{"position":[[590,3]]},1355,{"position":[[590,3]]},1373,{"position":[[590,3]]},1388,{"position":[[590,3]]},1403,{"position":[[590,3]]},1424,{"position":[[590,3]]},2000,{"position":[[590,3]]},2015,{"position":[[590,3]]},2072,{"position":[[590,3]]},2177,{"position":[[590,3]]},2249,{"position":[[590,3]]},2264,{"position":[[590,3]]},4256,{"position":[[590,3]]}]],["visit_name(self",[],[],[926,{"position":[[594,16]]},941,{"position":[[594,16]]},965,{"position":[[594,16]]},986,{"position":[[594,16]]},1004,{"position":[[594,16]]},1025,{"position":[[594,16]]},1040,{"position":[[594,16]]},1061,{"position":[[594,16]]},1100,{"position":[[594,16]]},1145,{"position":[[594,16]]},1163,{"position":[[594,16]]},1169,{"position":[[594,16]]},1184,{"position":[[594,16]]},1199,{"position":[[594,16]]},1214,{"position":[[594,16]]},1232,{"position":[[594,16]]},1247,{"position":[[594,16]]},1328,{"position":[[594,16]]},1355,{"position":[[594,16]]},1373,{"position":[[594,16]]},1388,{"position":[[594,16]]},1403,{"position":[[594,16]]},1424,{"position":[[594,16]]},2000,{"position":[[594,16]]},2015,{"position":[[594,16]]},2072,{"position":[[594,16]]},2177,{"position":[[594,16]]},2249,{"position":[[594,16]]},2264,{"position":[[594,16]]},4256,{"position":[[594,16]]}]],["subscript",[],[],[926,{"position":[[625,10]]},941,{"position":[[625,10]]},965,{"position":[[625,10]]},986,{"position":[[625,10]]},1004,{"position":[[625,10]]},1025,{"position":[[625,10]]},1040,{"position":[[625,10]]},1061,{"position":[[625,10]]},1100,{"position":[[625,10]]},1145,{"position":[[625,10]]},1163,{"position":[[625,10]]},1169,{"position":[[625,10]]},1184,{"position":[[625,10]]},1199,{"position":[[625,10]]},1214,{"position":[[625,10]]},1232,{"position":[[625,10]]},1247,{"position":[[625,10]]},1328,{"position":[[625,10]]},1355,{"position":[[625,10]]},1373,{"position":[[625,10]]},1388,{"position":[[625,10]]},1403,{"position":[[625,10]]},1424,{"position":[[625,10]]},2000,{"position":[[625,10]]},2015,{"position":[[625,10]]},2072,{"position":[[625,10]]},2177,{"position":[[625,10]]},2249,{"position":[[625,10]]},2264,{"position":[[625,10]]},4256,{"position":[[625,10]]}]],["value=name(id='data",[],[],[926,{"position":[[636,21]]},941,{"position":[[636,21]]},965,{"position":[[636,21]]},986,{"position":[[636,21]]},1004,{"position":[[636,21]]},1025,{"position":[[636,21]]},1040,{"position":[[636,21]]},1061,{"position":[[636,21]]},1100,{"position":[[636,21]]},1145,{"position":[[636,21]]},1163,{"position":[[636,21]]},1169,{"position":[[636,21]]},1184,{"position":[[636,21]]},1199,{"position":[[636,21]]},1214,{"position":[[636,21]]},1232,{"position":[[636,21]]},1247,{"position":[[636,21]]},1328,{"position":[[636,21]]},1355,{"position":[[636,21]]},1373,{"position":[[636,21]]},1388,{"position":[[636,21]]},1403,{"position":[[636,21]]},1424,{"position":[[636,21]]},2000,{"position":[[636,21]]},2015,{"position":[[636,21]]},2072,{"position":[[636,21]]},2177,{"position":[[636,21]]},2249,{"position":[[636,21]]},2264,{"position":[[636,21]]},4256,{"position":[[636,21]]}]],["ctx=load",[],[],[926,{"position":[[658,9]]},941,{"position":[[658,9]]},965,{"position":[[658,9]]},986,{"position":[[658,9]]},1004,{"position":[[658,9]]},1025,{"position":[[658,9]]},1040,{"position":[[658,9]]},1061,{"position":[[658,9]]},1100,{"position":[[658,9]]},1145,{"position":[[658,9]]},1163,{"position":[[658,9]]},1169,{"position":[[658,9]]},1184,{"position":[[658,9]]},1199,{"position":[[658,9]]},1214,{"position":[[658,9]]},1232,{"position":[[658,9]]},1247,{"position":[[658,9]]},1328,{"position":[[658,9]]},1355,{"position":[[658,9]]},1373,{"position":[[658,9]]},1388,{"position":[[658,9]]},1403,{"position":[[658,9]]},1424,{"position":[[658,9]]},2000,{"position":[[658,9]]},2015,{"position":[[658,9]]},2072,{"position":[[658,9]]},2177,{"position":[[658,9]]},2249,{"position":[[658,9]]},2264,{"position":[[658,9]]},4256,{"position":[[658,9]]}]],["slice=constant(value=node.id",[],[],[926,{"position":[[670,30]]},941,{"position":[[670,30]]},965,{"position":[[670,30]]},986,{"position":[[670,30]]},1004,{"position":[[670,30]]},1025,{"position":[[670,30]]},1040,{"position":[[670,30]]},1061,{"position":[[670,30]]},1100,{"position":[[670,30]]},1145,{"position":[[670,30]]},1163,{"position":[[670,30]]},1169,{"position":[[670,30]]},1184,{"position":[[670,30]]},1199,{"position":[[670,30]]},1214,{"position":[[670,30]]},1232,{"position":[[670,30]]},1247,{"position":[[670,30]]},1328,{"position":[[670,30]]},1355,{"position":[[670,30]]},1373,{"position":[[670,30]]},1388,{"position":[[670,30]]},1403,{"position":[[670,30]]},1424,{"position":[[670,30]]},2000,{"position":[[670,30]]},2015,{"position":[[670,30]]},2072,{"position":[[670,30]]},2177,{"position":[[670,30]]},2249,{"position":[[670,30]]},2264,{"position":[[670,30]]},4256,{"position":[[670,30]]}]],["ctx=node.ctx",[],[],[926,{"position":[[701,12]]},941,{"position":[[701,12]]},965,{"position":[[701,12]]},986,{"position":[[701,12]]},1004,{"position":[[701,12]]},1025,{"position":[[701,12]]},1040,{"position":[[701,12]]},1061,{"position":[[701,12]]},1100,{"position":[[701,12]]},1145,{"position":[[701,12]]},1163,{"position":[[701,12]]},1169,{"position":[[701,12]]},1184,{"position":[[701,12]]},1199,{"position":[[701,12]]},1214,{"position":[[701,12]]},1232,{"position":[[701,12]]},1247,{"position":[[701,12]]},1328,{"position":[[701,12]]},1355,{"position":[[701,12]]},1373,{"position":[[701,12]]},1388,{"position":[[701,12]]},1403,{"position":[[701,12]]},1424,{"position":[[701,12]]},2000,{"position":[[701,12]]},2015,{"position":[[701,12]]},2072,{"position":[[701,12]]},2177,{"position":[[701,12]]},2249,{"position":[[701,12]]},2264,{"position":[[701,12]]},4256,{"position":[[701,12]]}]],["keep",[],[],[926,{"position":[[716,4]]},941,{"position":[[716,4]]},965,{"position":[[716,4]]},986,{"position":[[716,4]]},1004,{"position":[[716,4]]},1025,{"position":[[716,4]]},1040,{"position":[[716,4]]},1061,{"position":[[716,4]]},1100,{"position":[[716,4]]},1145,{"position":[[716,4]]},1163,{"position":[[716,4]]},1169,{"position":[[716,4]]},1184,{"position":[[716,4]]},1199,{"position":[[716,4]]},1214,{"position":[[716,4]]},1232,{"position":[[716,4]]},1247,{"position":[[716,4]]},1328,{"position":[[716,4]]},1355,{"position":[[716,4]]},1373,{"position":[[716,4]]},1388,{"position":[[716,4]]},1403,{"position":[[716,4]]},1424,{"position":[[716,4]]},2000,{"position":[[716,4]]},2015,{"position":[[716,4]]},2072,{"position":[[716,4]]},2177,{"position":[[716,4]]},2249,{"position":[[716,4]]},2264,{"position":[[716,4]]},4256,{"position":[[716,4]]}]],["mind",[],[],[926,{"position":[[724,4]]},941,{"position":[[724,4]]},965,{"position":[[724,4]]},986,{"position":[[724,4]]},1004,{"position":[[724,4]]},1025,{"position":[[724,4]]},1040,{"position":[[724,4]]},1061,{"position":[[724,4]]},1100,{"position":[[724,4]]},1145,{"position":[[724,4]]},1163,{"position":[[724,4]]},1169,{"position":[[724,4]]},1184,{"position":[[724,4]]},1199,{"position":[[724,4]]},1214,{"position":[[724,4]]},1232,{"position":[[724,4]]},1247,{"position":[[724,4]]},1328,{"position":[[724,4]]},1355,{"position":[[724,4]]},1373,{"position":[[724,4]]},1388,{"position":[[724,4]]},1403,{"position":[[724,4]]},1424,{"position":[[724,4]]},2000,{"position":[[724,4]]},2015,{"position":[[724,4]]},2072,{"position":[[724,4]]},2177,{"position":[[724,4]]},2249,{"position":[[724,4]]},2264,{"position":[[724,4]]},4256,{"position":[[724,4]]}]],["you'r",[],[],[926,{"position":[[746,6]]},941,{"position":[[746,6]]},965,{"position":[[746,6]]},986,{"position":[[746,6]]},1004,{"position":[[746,6]]},1025,{"position":[[746,6]]},1040,{"position":[[746,6]]},1061,{"position":[[746,6]]},1100,{"position":[[746,6]]},1145,{"position":[[746,6]]},1163,{"position":[[746,6]]},1169,{"position":[[746,6]]},1184,{"position":[[746,6]]},1199,{"position":[[746,6]]},1214,{"position":[[746,6]]},1232,{"position":[[746,6]]},1247,{"position":[[746,6]]},1328,{"position":[[746,6]]},1355,{"position":[[746,6]]},1373,{"position":[[746,6]]},1388,{"position":[[746,6]]},1403,{"position":[[746,6]]},1424,{"position":[[746,6]]},2000,{"position":[[746,6]]},2015,{"position":[[746,6]]},2072,{"position":[[746,6]]},2177,{"position":[[746,6]]},2249,{"position":[[746,6]]},2264,{"position":[[746,6]]},4256,{"position":[[746,6]]}]],["child",[],[],[926,{"position":[[770,5],[812,5]]},941,{"position":[[770,5],[812,5]]},965,{"position":[[770,5],[812,5]]},986,{"position":[[770,5],[812,5]]},1004,{"position":[[770,5],[812,5]]},1025,{"position":[[770,5],[812,5]]},1040,{"position":[[770,5],[812,5]]},1061,{"position":[[770,5],[812,5]]},1100,{"position":[[770,5],[812,5]]},1145,{"position":[[770,5],[812,5]]},1163,{"position":[[770,5],[812,5]]},1169,{"position":[[770,5],[812,5]]},1184,{"position":[[770,5],[812,5]]},1199,{"position":[[770,5],[812,5]]},1214,{"position":[[770,5],[812,5]]},1232,{"position":[[770,5],[812,5]]},1247,{"position":[[770,5],[812,5]]},1328,{"position":[[770,5],[812,5]]},1355,{"position":[[770,5],[812,5]]},1373,{"position":[[770,5],[812,5]]},1388,{"position":[[770,5],[812,5]]},1403,{"position":[[770,5],[812,5]]},1424,{"position":[[770,5],[812,5]]},2000,{"position":[[770,5],[812,5]]},2015,{"position":[[770,5],[812,5]]},2072,{"position":[[770,5],[812,5]]},2177,{"position":[[770,5],[812,5]]},2249,{"position":[[770,5],[812,5]]},2264,{"position":[[770,5],[812,5]]},4256,{"position":[[770,5],[812,5]]}]],["yourself",[],[],[926,{"position":[[824,8]]},941,{"position":[[824,8]]},965,{"position":[[824,8]]},986,{"position":[[824,8]]},1004,{"position":[[824,8]]},1025,{"position":[[824,8]]},1040,{"position":[[824,8]]},1061,{"position":[[824,8]]},1100,{"position":[[824,8]]},1145,{"position":[[824,8]]},1163,{"position":[[824,8]]},1169,{"position":[[824,8]]},1184,{"position":[[824,8]]},1199,{"position":[[824,8]]},1214,{"position":[[824,8]]},1232,{"position":[[824,8]]},1247,{"position":[[824,8]]},1328,{"position":[[824,8]]},1355,{"position":[[824,8]]},1373,{"position":[[824,8]]},1388,{"position":[[824,8]]},1403,{"position":[[824,8]]},1424,{"position":[[824,8]]},2000,{"position":[[824,8]]},2015,{"position":[[824,8]]},2072,{"position":[[824,8]]},2177,{"position":[[824,8]]},2249,{"position":[[824,8]]},2264,{"position":[[824,8]]},4256,{"position":[[824,8]]}]],["meth",[],[],[926,{"position":[[845,6]]},941,{"position":[[845,6]]},965,{"position":[[845,6]]},986,{"position":[[845,6]]},1004,{"position":[[845,6]]},1025,{"position":[[845,6]]},1040,{"position":[[845,6]]},1061,{"position":[[845,6]]},1100,{"position":[[845,6]]},1145,{"position":[[845,6]]},1163,{"position":[[845,6]]},1169,{"position":[[845,6]]},1184,{"position":[[845,6]]},1199,{"position":[[845,6]]},1214,{"position":[[845,6]]},1232,{"position":[[845,6]]},1247,{"position":[[845,6]]},1328,{"position":[[845,6]]},1355,{"position":[[845,6]]},1373,{"position":[[845,6]]},1388,{"position":[[845,6]]},1403,{"position":[[845,6]]},1424,{"position":[[845,6]]},2000,{"position":[[845,6]]},2015,{"position":[[845,6]]},2072,{"position":[[845,6]]},2177,{"position":[[845,6]]},2249,{"position":[[845,6]]},2264,{"position":[[845,6]]},4256,{"position":[[845,6]]}]],["generic_visit",[1983,{"position":[[0,13]]},2052,{"position":[[0,13]]},2223,{"position":[[0,13]]},4236,{"position":[[0,13]]},4392,{"position":[[0,13]]},4431,{"position":[[0,13]]}],[],[926,{"position":[[852,13]]},941,{"position":[[852,13]]},965,{"position":[[852,13]]},986,{"position":[[852,13]]},1004,{"position":[[852,13]]},1025,{"position":[[852,13]]},1040,{"position":[[852,13]]},1061,{"position":[[852,13]]},1082,{"position":[[551,13]]},1100,{"position":[[852,13]]},1145,{"position":[[852,13]]},1163,{"position":[[852,13]]},1169,{"position":[[852,13]]},1184,{"position":[[852,13]]},1199,{"position":[[852,13]]},1214,{"position":[[852,13]]},1232,{"position":[[852,13]]},1247,{"position":[[852,13]]},1328,{"position":[[852,13]]},1355,{"position":[[852,13]]},1373,{"position":[[852,13]]},1388,{"position":[[852,13]]},1403,{"position":[[852,13]]},1424,{"position":[[852,13]]},2000,{"position":[[852,13]]},2015,{"position":[[852,13]]},2030,{"position":[[551,13]]},2048,{"position":[[551,13]]},2072,{"position":[[852,13]]},2126,{"position":[[551,13]]},2144,{"position":[[551,13]]},2177,{"position":[[852,13]]},2249,{"position":[[852,13]]},2255,{"position":[[551,13]]},2264,{"position":[[852,13]]},2279,{"position":[[551,13]]},2309,{"position":[[551,13]]},2330,{"position":[[551,13]]},4256,{"position":[[852,13]]},4400,{"position":[[551,13]]}]],["part",[],[],[926,{"position":[[913,4]]},941,{"position":[[913,4]]},965,{"position":[[913,4]]},986,{"position":[[913,4]]},1004,{"position":[[913,4]]},1025,{"position":[[913,4]]},1040,{"position":[[913,4]]},1061,{"position":[[913,4]]},1100,{"position":[[913,4]]},1145,{"position":[[913,4]]},1163,{"position":[[913,4]]},1169,{"position":[[913,4]]},1184,{"position":[[913,4]]},1199,{"position":[[913,4]]},1214,{"position":[[913,4]]},1232,{"position":[[913,4]]},1247,{"position":[[913,4]]},1328,{"position":[[913,4]]},1355,{"position":[[913,4]]},1373,{"position":[[913,4]]},1388,{"position":[[913,4]]},1403,{"position":[[913,4]]},1424,{"position":[[913,4]]},1478,{"position":[[0,4]]},1487,{"position":[[0,4]]},2000,{"position":[[913,4]]},2015,{"position":[[913,4]]},2072,{"position":[[913,4]]},2177,{"position":[[913,4]]},2249,{"position":[[913,4]]},2264,{"position":[[913,4]]},2765,{"position":[[832,5]]},2873,{"position":[[832,5]]},2936,{"position":[[832,5]]},3602,{"position":[[832,5]]},3908,{"position":[[832,5]]},4121,{"position":[[832,5]]},4256,{"position":[[913,4]]},4472,{"position":[[81,5]]}]],["collect",[],[],[926,{"position":[[923,10]]},941,{"position":[[923,10]]},965,{"position":[[923,10]]},986,{"position":[[923,10]]},1004,{"position":[[923,10]]},1025,{"position":[[923,10]]},1040,{"position":[[923,10]]},1061,{"position":[[923,10]]},1100,{"position":[[923,10]]},1145,{"position":[[923,10]]},1163,{"position":[[923,10]]},1169,{"position":[[923,10]]},1184,{"position":[[923,10]]},1199,{"position":[[923,10]]},1214,{"position":[[923,10]]},1232,{"position":[[923,10]]},1247,{"position":[[923,10]]},1316,{"position":[[9,10]]},1328,{"position":[[923,10]]},1355,{"position":[[923,10]]},1373,{"position":[[923,10]]},1388,{"position":[[923,10]]},1403,{"position":[[923,10]]},1424,{"position":[[923,10]]},2000,{"position":[[923,10]]},2015,{"position":[[923,10]]},2072,{"position":[[923,10]]},2177,{"position":[[923,10]]},2249,{"position":[[923,10]]},2264,{"position":[[923,10]]},4256,{"position":[[923,10]]},4709,{"position":[[9,10]]},4760,{"position":[[9,10]]}]],["statement",[],[],[926,{"position":[[937,10],[969,9]]},941,{"position":[[937,10],[969,9]]},965,{"position":[[937,10],[969,9]]},986,{"position":[[937,10],[969,9]]},1004,{"position":[[937,10],[969,9]]},1025,{"position":[[937,10],[969,9]]},1040,{"position":[[937,10],[969,9]]},1061,{"position":[[937,10],[969,9]]},1100,{"position":[[937,10],[969,9]]},1145,{"position":[[937,10],[969,9]]},1163,{"position":[[937,10],[969,9]]},1169,{"position":[[937,10],[969,9]]},1184,{"position":[[937,10],[969,9]]},1199,{"position":[[937,10],[969,9]]},1214,{"position":[[937,10],[969,9]]},1232,{"position":[[937,10],[969,9]]},1247,{"position":[[937,10],[969,9]]},1328,{"position":[[937,10],[969,9]]},1355,{"position":[[937,10],[969,9]]},1373,{"position":[[937,10],[969,9]]},1388,{"position":[[937,10],[969,9]]},1403,{"position":[[937,10],[969,9]]},1424,{"position":[[937,10],[969,9]]},2000,{"position":[[937,10],[969,9]]},2015,{"position":[[937,10],[969,9]]},2072,{"position":[[937,10],[969,9]]},2177,{"position":[[937,10],[969,9]]},2249,{"position":[[937,10],[969,9]]},2264,{"position":[[937,10],[969,9]]},4256,{"position":[[937,10],[969,9]]},4442,{"position":[[46,10]]}]],["list",[],[],[926,{"position":[[1017,4]]},941,{"position":[[1017,4]]},965,{"position":[[1017,4]]},986,{"position":[[1017,4]]},1004,{"position":[[1017,4]]},1025,{"position":[[1017,4]]},1040,{"position":[[1017,4]]},1061,{"position":[[1017,4]]},1100,{"position":[[1017,4]]},1145,{"position":[[1017,4]]},1163,{"position":[[1017,4]]},1169,{"position":[[1017,4]]},1184,{"position":[[1017,4]]},1199,{"position":[[1017,4]]},1214,{"position":[[1017,4]]},1232,{"position":[[1017,4]]},1247,{"position":[[1017,4]]},1328,{"position":[[1017,4]]},1355,{"position":[[1017,4]]},1373,{"position":[[1017,4]]},1388,{"position":[[1017,4]]},1403,{"position":[[1017,4]]},1424,{"position":[[1017,4]]},2000,{"position":[[1017,4]]},2015,{"position":[[1017,4]]},2072,{"position":[[1017,4]]},2177,{"position":[[1017,4]]},2246,{"position":[[21,4]]},2249,{"position":[[1017,4]]},2264,{"position":[[1017,4]]},4256,{"position":[[1017,4]]}]],["singl",[],[],[926,{"position":[[1050,6]]},941,{"position":[[1050,6]]},965,{"position":[[1050,6]]},986,{"position":[[1050,6]]},1004,{"position":[[1050,6]]},1025,{"position":[[1050,6]]},1040,{"position":[[1050,6]]},1061,{"position":[[1050,6]]},1100,{"position":[[1050,6]]},1145,{"position":[[1050,6]]},1163,{"position":[[1050,6]]},1169,{"position":[[1050,6]]},1184,{"position":[[1050,6]]},1199,{"position":[[1050,6]]},1214,{"position":[[1050,6]]},1232,{"position":[[1050,6]]},1247,{"position":[[1050,6]]},1328,{"position":[[1050,6]]},1355,{"position":[[1050,6]]},1373,{"position":[[1050,6]]},1388,{"position":[[1050,6]]},1403,{"position":[[1050,6]]},1424,{"position":[[1050,6]]},2000,{"position":[[1050,6]]},2015,{"position":[[1050,6]]},2072,{"position":[[1050,6]]},2177,{"position":[[1050,6]]},2249,{"position":[[1050,6]]},2264,{"position":[[1050,6]]},2765,{"position":[[28,6]]},2873,{"position":[[28,6]]},2936,{"position":[[28,6]]},3602,{"position":[[28,6]]},3908,{"position":[[28,6]]},4121,{"position":[[28,6]]},4256,{"position":[[1050,6]]}]],["usual",[],[],[926,{"position":[[1063,7]]},941,{"position":[[1063,7]]},965,{"position":[[1063,7]]},986,{"position":[[1063,7]]},1004,{"position":[[1063,7]]},1025,{"position":[[1063,7]]},1040,{"position":[[1063,7]]},1061,{"position":[[1063,7]]},1100,{"position":[[1063,7]]},1145,{"position":[[1063,7]]},1163,{"position":[[1063,7]]},1169,{"position":[[1063,7]]},1184,{"position":[[1063,7]]},1199,{"position":[[1063,7]]},1214,{"position":[[1063,7]]},1232,{"position":[[1063,7]]},1247,{"position":[[1063,7]]},1328,{"position":[[1063,7]]},1355,{"position":[[1063,7]]},1373,{"position":[[1063,7]]},1388,{"position":[[1063,7]]},1403,{"position":[[1063,7]]},1424,{"position":[[1063,7]]},2000,{"position":[[1063,7]]},2015,{"position":[[1063,7]]},2072,{"position":[[1063,7]]},2177,{"position":[[1063,7]]},2249,{"position":[[1063,7]]},2264,{"position":[[1063,7]]},4256,{"position":[[1063,7]]}]],["yourtransformer().visit(nod",[],[],[926,{"position":[[1112,29]]},941,{"position":[[1112,29]]},965,{"position":[[1112,29]]},986,{"position":[[1112,29]]},1004,{"position":[[1112,29]]},1025,{"position":[[1112,29]]},1040,{"position":[[1112,29]]},1061,{"position":[[1112,29]]},1100,{"position":[[1112,29]]},1145,{"position":[[1112,29]]},1163,{"position":[[1112,29]]},1169,{"position":[[1112,29]]},1184,{"position":[[1112,29]]},1199,{"position":[[1112,29]]},1214,{"position":[[1112,29]]},1232,{"position":[[1112,29]]},1247,{"position":[[1112,29]]},1328,{"position":[[1112,29]]},1355,{"position":[[1112,29]]},1373,{"position":[[1112,29]]},1388,{"position":[[1112,29]]},1403,{"position":[[1112,29]]},1424,{"position":[[1112,29]]},2000,{"position":[[1112,29]]},2015,{"position":[[1112,29]]},2072,{"position":[[1112,29]]},2177,{"position":[[1112,29]]},2249,{"position":[[1112,29]]},2264,{"position":[[1112,29]]},4256,{"position":[[1112,29]]}]],["step",[927,{"position":[[0,4]]},942,{"position":[[0,4]]},966,{"position":[[0,4]]},987,{"position":[[0,4]]},1005,{"position":[[0,4]]},1026,{"position":[[0,4]]},1041,{"position":[[0,4]]},1062,{"position":[[0,4]]},1083,{"position":[[0,4]]},1107,{"position":[[0,4]]},1170,{"position":[[0,4]]},1185,{"position":[[0,4]]},1200,{"position":[[0,4]]},1215,{"position":[[0,4]]},1233,{"position":[[0,4]]},1248,{"position":[[0,4]]},1329,{"position":[[0,4]]},1356,{"position":[[0,4]]},1374,{"position":[[0,4]]},1389,{"position":[[0,4]]},1404,{"position":[[0,4]]},1425,{"position":[[0,4]]},1884,{"position":[[0,4]]},2001,{"position":[[0,4]]},2016,{"position":[[0,4]]},2031,{"position":[[0,4]]},2049,{"position":[[0,4]]},2073,{"position":[[0,4]]},2127,{"position":[[0,4]]},2145,{"position":[[0,4]]},2178,{"position":[[0,4]]},2265,{"position":[[0,4]]},2280,{"position":[[0,4]]},2310,{"position":[[0,4]]},2331,{"position":[[0,4]]},4257,{"position":[[0,4]]}],[],[2408,{"position":[[1083,5]]},2588,{"position":[[1083,5]]},2747,{"position":[[1083,5]]}]],["opshin.rewrite.rewrite_remove_type_stuff.rewriteremovetypestuff.step",[],[928,{"position":[[0,68]]}],[]],["visit_assign",[930,{"position":[[0,12]]},1068,{"position":[[0,12]]},1911,{"position":[[0,12]]},2106,{"position":[[0,12]]},2217,{"position":[[0,12]]},4302,{"position":[[0,12]]},4425,{"position":[[0,12]]}],[],[]],["opshin.rewrite.rewrite_remove_type_stuff.rewriteremovetypestuff.visit_assign",[],[931,{"position":[[0,76]]}],[]],["visit",[933,{"position":[[0,5]]},957,{"position":[[0,5]]},978,{"position":[[0,5]]},996,{"position":[[0,5]]},1017,{"position":[[0,5]]},1032,{"position":[[0,5]]},1053,{"position":[[0,5]]},1074,{"position":[[0,5]]},1095,{"position":[[0,5]]},1140,{"position":[[0,5]]},1164,{"position":[[0,5]]},1176,{"position":[[0,5]]},1191,{"position":[[0,5]]},1206,{"position":[[0,5]]},1224,{"position":[[0,5]]},1239,{"position":[[0,5]]},1269,{"position":[[0,5]]},1338,{"position":[[0,5]]},1362,{"position":[[0,5]]},1380,{"position":[[0,5]]},1395,{"position":[[0,5]]},1416,{"position":[[0,5]]},1434,{"position":[[0,5]]},1986,{"position":[[0,5]]},2007,{"position":[[0,5]]},2022,{"position":[[0,5]]},2043,{"position":[[0,5]]},2067,{"position":[[0,5]]},2118,{"position":[[0,5]]},2139,{"position":[[0,5]]},2172,{"position":[[0,5]]},2226,{"position":[[0,5]]},2250,{"position":[[0,5]]},2256,{"position":[[0,5]]},2268,{"position":[[0,5]]},2274,{"position":[[0,5]]},2283,{"position":[[0,5]]},2322,{"position":[[0,5]]},2346,{"position":[[0,5]]},4248,{"position":[[0,5]]},4395,{"position":[[0,5]]},4461,{"position":[[0,5]]}],[],[935,{"position":[[0,5]]},959,{"position":[[0,5]]},980,{"position":[[0,5]]},998,{"position":[[0,5]]},1019,{"position":[[0,5]]},1034,{"position":[[0,5]]},1055,{"position":[[0,5]]},1076,{"position":[[0,5]]},1082,{"position":[[173,5],[377,5],[469,5]]},1097,{"position":[[0,5]]},1142,{"position":[[0,5]]},1166,{"position":[[0,5]]},1178,{"position":[[0,5]]},1193,{"position":[[0,5]]},1208,{"position":[[0,5]]},1226,{"position":[[0,5]]},1241,{"position":[[0,5]]},1271,{"position":[[0,5]]},1340,{"position":[[0,5]]},1364,{"position":[[0,5]]},1382,{"position":[[0,5]]},1397,{"position":[[0,5]]},1418,{"position":[[0,5]]},1436,{"position":[[0,5]]},1988,{"position":[[0,5]]},2009,{"position":[[0,5]]},2024,{"position":[[0,5]]},2030,{"position":[[173,5],[377,5],[469,5]]},2045,{"position":[[0,5]]},2048,{"position":[[173,5],[377,5],[469,5]]},2069,{"position":[[0,5]]},2120,{"position":[[0,5]]},2126,{"position":[[173,5],[377,5],[469,5]]},2141,{"position":[[0,5]]},2144,{"position":[[173,5],[377,5],[469,5]]},2174,{"position":[[0,5]]},2228,{"position":[[0,5]]},2252,{"position":[[0,5]]},2255,{"position":[[173,5],[377,5],[469,5]]},2258,{"position":[[0,5]]},2270,{"position":[[0,5]]},2276,{"position":[[0,5]]},2279,{"position":[[173,5],[377,5],[469,5]]},2285,{"position":[[0,5]]},2309,{"position":[[173,5],[377,5],[469,5]]},2324,{"position":[[0,5]]},2330,{"position":[[173,5],[377,5],[469,5]]},2348,{"position":[[0,5]]},4250,{"position":[[0,5]]},4397,{"position":[[0,5]]},4400,{"position":[[173,5],[377,5],[469,5]]},4463,{"position":[[0,5]]}]],["opshin.rewrite.rewrite_remove_type_stuff.rewriteremovetypestuff.visit",[],[934,{"position":[[0,69]]}],[]],["rewrite_orig_nam",[936,{"position":[[0,17]]}],[],[]],["opshin.rewrite.rewrite_orig_nam",[],[937,{"position":[[0,32]]}],[]],["rewriteorignam",[939,{"position":[[0,15]]}],[],[]],["opshin.rewrite.rewrite_orig_name.rewriteorignam",[],[940,{"position":[[0,48]]}],[]],["opshin.rewrite.rewrite_orig_name.rewriteorigname.step",[],[943,{"position":[[0,53]]}],[]],["visit_nam",[945,{"position":[[0,10]]},1086,{"position":[[0,10]]},1128,{"position":[[0,10]]},1377,{"position":[[0,10]]},1917,{"position":[[0,10]]},2034,{"position":[[0,10]]},2064,{"position":[[0,10]]},2130,{"position":[[0,10]]},2157,{"position":[[0,10]]},2313,{"position":[[0,10]]},2340,{"position":[[0,10]]},4317,{"position":[[0,10]]}],[],[]],["opshin.rewrite.rewrite_orig_name.rewriteorigname.visit_nam",[],[946,{"position":[[0,59]]}],[]],["visit_classdef",[948,{"position":[[0,14]]},975,{"position":[[0,14]]},1014,{"position":[[0,14]]},1050,{"position":[[0,14]]},1089,{"position":[[0,14]]},1131,{"position":[[0,14]]},1149,{"position":[[0,14]]},1950,{"position":[[0,14]]},2037,{"position":[[0,14]]},2112,{"position":[[0,14]]},2133,{"position":[[0,14]]},2160,{"position":[[0,14]]},2208,{"position":[[0,14]]},2316,{"position":[[0,14]]},2343,{"position":[[0,14]]},4284,{"position":[[0,14]]},4419,{"position":[[0,14]]}],[],[]],["opshin.rewrite.rewrite_orig_name.rewriteorigname.visit_classdef",[],[949,{"position":[[0,63]]}],[]],["visit_nonetyp",[951,{"position":[[0,14]]},1137,{"position":[[0,14]]},1908,{"position":[[0,14]]},4290,{"position":[[0,14]]}],[],[]],["opshin.rewrite.rewrite_orig_name.rewriteorigname.visit_nonetyp",[],[952,{"position":[[0,63]]}],[]],["visit_functiondef",[954,{"position":[[0,17]]},1092,{"position":[[0,17]]},1134,{"position":[[0,17]]},1413,{"position":[[0,17]]},1431,{"position":[[0,17]]},1926,{"position":[[0,17]]},2040,{"position":[[0,17]]},2115,{"position":[[0,17]]},2136,{"position":[[0,17]]},2163,{"position":[[0,17]]},2205,{"position":[[0,17]]},2319,{"position":[[0,17]]},2337,{"position":[[0,17]]},4332,{"position":[[0,17]]}],[],[]],["opshin.rewrite.rewrite_orig_name.rewriteorigname.visit_functiondef",[],[955,{"position":[[0,66]]}],[]],["opshin.rewrite.rewrite_orig_name.rewriteorigname.visit",[],[958,{"position":[[0,54]]}],[]],["rewrite_import_dataclass",[960,{"position":[[0,26]]}],[],[]],["opshin.rewrite.rewrite_import_dataclass",[],[961,{"position":[[0,41]]}],[]],["rewriteimportdataclass",[963,{"position":[[0,24]]}],[],[]],["opshin.rewrite.rewrite_import_dataclasses.rewriteimportdataclass",[],[964,{"position":[[0,66]]}],[]],["opshin.rewrite.rewrite_import_dataclasses.rewriteimportdataclasses.step",[],[967,{"position":[[0,71]]}],[]],["imports_dataclass",[969,{"position":[[0,19]]}],[],[]],["opshin.rewrite.rewrite_import_dataclasses.rewriteimportdataclasses.imports_dataclass",[],[970,{"position":[[0,86]]}],[]],["visit_importfrom",[972,{"position":[[0,16]]},1011,{"position":[[0,16]]},1047,{"position":[[0,16]]},1173,{"position":[[0,16]]},1335,{"position":[[0,16]]},1359,{"position":[[0,16]]},1410,{"position":[[0,16]]},2169,{"position":[[0,16]]},2211,{"position":[[0,16]]},4389,{"position":[[0,16]]}],[],[]],["opshin.rewrite.rewrite_import_dataclasses.rewriteimportdataclasses.visit_importfrom",[],[973,{"position":[[0,83]]}],[]],["opshin.rewrite.rewrite_import_dataclasses.rewriteimportdataclasses.visit_classdef",[],[976,{"position":[[0,81]]}],[]],["opshin.rewrite.rewrite_import_dataclasses.rewriteimportdataclasses.visit",[],[979,{"position":[[0,72]]}],[]],["rewrite_empty_dict",[981,{"position":[[0,19]]}],[],[]],["opshin.rewrite.rewrite_empty_dict",[],[982,{"position":[[0,34]]}],[]],["rewriteemptydict",[984,{"position":[[0,17]]}],[],[]],["opshin.rewrite.rewrite_empty_dicts.rewriteemptydict",[],[985,{"position":[[0,52]]}],[]],["opshin.rewrite.rewrite_empty_dicts.rewriteemptydicts.step",[],[988,{"position":[[0,57]]}],[]],["visit_dict",[990,{"position":[[0,10]]},1965,{"position":[[0,10]]},4299,{"position":[[0,10]]}],[],[]],["opshin.rewrite.rewrite_empty_dicts.rewriteemptydicts.visit_dict",[],[991,{"position":[[0,63]]}],[]],["visit_const",[993,{"position":[[0,14]]},1221,{"position":[[0,14]]},1905,{"position":[[0,14]]},2058,{"position":[[0,14]]},4287,{"position":[[0,14]]}],[],[]],["opshin.rewrite.rewrite_empty_dicts.rewriteemptydicts.visit_const",[],[994,{"position":[[0,67]]}],[]],["opshin.rewrite.rewrite_empty_dicts.rewriteemptydicts.visit",[],[997,{"position":[[0,58]]}],[]],["rewrite_import_typ",[999,{"position":[[0,21]]}],[],[]],["opshin.rewrite.rewrite_import_typ",[],[1000,{"position":[[0,36]]}],[]],["rewriteimporttyp",[1002,{"position":[[0,19]]}],[],[]],["opshin.rewrite.rewrite_import_typing.rewriteimporttyp",[],[1003,{"position":[[0,56]]}],[]],["opshin.rewrite.rewrite_import_typing.rewriteimporttyping.step",[],[1006,{"position":[[0,61]]}],[]],["imports_typ",[1008,{"position":[[0,14]]}],[],[]],["opshin.rewrite.rewrite_import_typing.rewriteimporttyping.imports_typ",[],[1009,{"position":[[0,71]]}],[]],["opshin.rewrite.rewrite_import_typing.rewriteimporttyping.visit_importfrom",[],[1012,{"position":[[0,73]]}],[]],["opshin.rewrite.rewrite_import_typing.rewriteimporttyping.visit_classdef",[],[1015,{"position":[[0,71]]}],[]],["opshin.rewrite.rewrite_import_typing.rewriteimporttyping.visit",[],[1018,{"position":[[0,62]]}],[]],["rewrite_inject_builtin",[1020,{"position":[[0,23]]}],[],[]],["opshin.rewrite.rewrite_inject_builtin",[],[1021,{"position":[[0,38]]}],[]],["rewriteinjectbuiltin",[1023,{"position":[[0,21]]}],[],[]],["opshin.rewrite.rewrite_inject_builtins.rewriteinjectbuiltin",[],[1024,{"position":[[0,60]]}],[]],["opshin.rewrite.rewrite_inject_builtins.rewriteinjectbuiltins.step",[],[1027,{"position":[[0,65]]}],[]],["visit_modul",[1029,{"position":[[0,12]]},1125,{"position":[[0,12]]},1251,{"position":[[0,12]]},1392,{"position":[[0,12]]},1902,{"position":[[0,12]]},2094,{"position":[[0,12]]},2202,{"position":[[0,12]]},4335,{"position":[[0,12]]}],[],[]],["opshin.rewrite.rewrite_inject_builtins.rewriteinjectbuiltins.visit_modul",[],[1030,{"position":[[0,73]]}],[]],["opshin.rewrite.rewrite_inject_builtins.rewriteinjectbuiltins.visit",[],[1033,{"position":[[0,66]]}],[]],["rewrite_import_plutusdata",[1035,{"position":[[0,25]]}],[],[]],["opshin.rewrite.rewrite_import_plutusdata",[],[1036,{"position":[[0,40]]}],[]],["rewriteimportplutusdata",[1038,{"position":[[0,23]]}],[],[]],["opshin.rewrite.rewrite_import_plutusdata.rewriteimportplutusdata",[],[1039,{"position":[[0,64]]}],[]],["opshin.rewrite.rewrite_import_plutusdata.rewriteimportplutusdata.step",[],[1042,{"position":[[0,69]]}],[]],["imports_plutus_data",[1044,{"position":[[0,19]]}],[],[]],["opshin.rewrite.rewrite_import_plutusdata.rewriteimportplutusdata.imports_plutus_data",[],[1045,{"position":[[0,84]]}],[]],["opshin.rewrite.rewrite_import_plutusdata.rewriteimportplutusdata.visit_importfrom",[],[1048,{"position":[[0,81]]}],[]],["opshin.rewrite.rewrite_import_plutusdata.rewriteimportplutusdata.visit_classdef",[],[1051,{"position":[[0,79]]}],[]],["opshin.rewrite.rewrite_import_plutusdata.rewriteimportplutusdata.visit",[],[1054,{"position":[[0,70]]}],[]],["rewrite_tuple_assign",[1056,{"position":[[0,20]]}],[],[]],["opshin.rewrite.rewrite_tuple_assign",[],[1057,{"position":[[0,35]]}],[]],["rewritetupleassign",[1059,{"position":[[0,18]]}],[],[]],["opshin.rewrite.rewrite_tuple_assign.rewritetupleassign",[],[1060,{"position":[[0,54]]}],[]],["opshin.rewrite.rewrite_tuple_assign.rewritetupleassign.step",[],[1063,{"position":[[0,59]]}],[]],["unique_id",[1065,{"position":[[0,9]]}],[],[]],["opshin.rewrite.rewrite_tuple_assign.rewritetupleassign.unique_id",[],[1066,{"position":[[0,64]]}],[]],["opshin.rewrite.rewrite_tuple_assign.rewritetupleassign.visit_assign",[],[1069,{"position":[[0,67]]}],[]],["visit_for",[1071,{"position":[[0,9]]},1932,{"position":[[0,9]]},2103,{"position":[[0,9]]},2148,{"position":[[0,9]]},4314,{"position":[[0,9]]},4449,{"position":[[0,9]]}],[],[]],["opshin.rewrite.rewrite_tuple_assign.rewritetupleassign.visit_for",[],[1072,{"position":[[0,64]]}],[]],["opshin.rewrite.rewrite_tuple_assign.rewritetupleassign.visit",[],[1075,{"position":[[0,60]]}],[]],["rewrite_scop",[1077,{"position":[[0,15]]}],[],[]],["opshin.rewrite.rewrite_scop",[],[1078,{"position":[[0,30]]}],[]],["shallownamedefcollector",[1080,{"position":[[0,23]]},2124,{"position":[[0,23]]}],[],[]],["opshin.rewrite.rewrite_scoping.shallownamedefcollector",[],[1081,{"position":[[0,54]]}],[]],["found",[],[],[1082,{"position":[[106,6]]},2030,{"position":[[106,6]]},2048,{"position":[[106,6]]},2126,{"position":[[106,6]]},2144,{"position":[[106,6]]},2255,{"position":[[106,6]]},2279,{"position":[[106,6]]},2309,{"position":[[106,6]]},2330,{"position":[[106,6]]},4400,{"position":[[106,6]]}]],["meant",[],[],[1082,{"position":[[201,5]]},2030,{"position":[[201,5]]},2048,{"position":[[201,5]]},2126,{"position":[[201,5]]},2144,{"position":[[201,5]]},2255,{"position":[[201,5]]},2279,{"position":[[201,5]]},2309,{"position":[[201,5]]},2330,{"position":[[201,5]]},4400,{"position":[[201,5]]}]],["ad",[],[],[1082,{"position":[[243,6]]},1316,{"position":[[364,5]]},2030,{"position":[[243,6]]},2048,{"position":[[243,6]]},2126,{"position":[[243,6]]},2144,{"position":[[243,6]]},2255,{"position":[[243,6]]},2279,{"position":[[243,6]]},2309,{"position":[[243,6]]},2330,{"position":[[243,6]]},4400,{"position":[[243,6]]},4709,{"position":[[364,5]]},4760,{"position":[[364,5]]}]],["per",[],[],[1082,{"position":[[267,3]]},2030,{"position":[[267,3]]},2048,{"position":[[267,3]]},2126,{"position":[[267,3]]},2144,{"position":[[267,3]]},2255,{"position":[[267,3]]},2279,{"position":[[267,3]]},2309,{"position":[[267,3]]},2330,{"position":[[267,3]]},4400,{"position":[[267,3]]},4643,{"position":[[140,3]]}]],["default",[2439,{"position":[[0,8]]}],[],[1082,{"position":[[271,7]]},2030,{"position":[[271,7]]},2048,{"position":[[271,7]]},2126,{"position":[[271,7]]},2144,{"position":[[271,7]]},2255,{"position":[[271,7]]},2279,{"position":[[271,7]]},2309,{"position":[[271,7]]},2330,{"position":[[271,7]]},2423,{"position":[[101,9]]},2765,{"position":[[50,8]]},2873,{"position":[[50,8]]},2936,{"position":[[50,8]]},3602,{"position":[[50,8]]},3908,{"position":[[50,8]]},4121,{"position":[[50,8]]},4400,{"position":[[271,7]]}]],["visit_",[],[],[1082,{"position":[[320,8]]},2030,{"position":[[320,8]]},2048,{"position":[[320,8]]},2126,{"position":[[320,8]]},2144,{"position":[[320,8]]},2255,{"position":[[320,8]]},2279,{"position":[[320,8]]},2309,{"position":[[320,8]]},2330,{"position":[[320,8]]},4400,{"position":[[320,8]]}]],["tryfin",[],[],[1082,{"position":[[361,10]]},2030,{"position":[[361,10]]},2048,{"position":[[361,10]]},2126,{"position":[[361,10]]},2144,{"position":[[361,10]]},2255,{"position":[[361,10]]},2279,{"position":[[361,10]]},2309,{"position":[[361,10]]},2330,{"position":[[361,10]]},4400,{"position":[[361,10]]}]],["visit_tryfin",[],[],[1082,{"position":[[402,16]]},2030,{"position":[[402,16]]},2048,{"position":[[402,16]]},2126,{"position":[[402,16]]},2144,{"position":[[402,16]]},2255,{"position":[[402,16]]},2279,{"position":[[402,16]]},2309,{"position":[[402,16]]},2330,{"position":[[402,16]]},4400,{"position":[[402,16]]}]],["behavior",[],[],[1082,{"position":[[426,8]]},2030,{"position":[[426,8]]},2048,{"position":[[426,8]]},2126,{"position":[[426,8]]},2144,{"position":[[426,8]]},2255,{"position":[[426,8]]},2279,{"position":[[426,8]]},2309,{"position":[[426,8]]},2330,{"position":[[426,8]]},4400,{"position":[[426,8]]}]],["chang",[],[],[1082,{"position":[[442,7],[638,7]]},2030,{"position":[[442,7],[638,7]]},2048,{"position":[[442,7],[638,7]]},2126,{"position":[[442,7],[638,7]]},2144,{"position":[[442,7],[638,7]]},2255,{"position":[[442,7],[638,7]]},2273,{"position":[[63,7]]},2279,{"position":[[442,7],[638,7]]},2309,{"position":[[442,7],[638,7]]},2330,{"position":[[442,7],[638,7]]},2765,{"position":[[720,6]]},2873,{"position":[[720,6]]},2936,{"position":[[720,6]]},3602,{"position":[[720,6]]},3908,{"position":[[720,6]]},4121,{"position":[[720,6]]},4400,{"position":[[442,7],[638,7]]}]],["overrid",[],[],[1082,{"position":[[453,10]]},2030,{"position":[[453,10]]},2048,{"position":[[453,10]]},2126,{"position":[[453,10]]},2144,{"position":[[453,10]]},2255,{"position":[[453,10]]},2279,{"position":[[453,10]]},2309,{"position":[[453,10]]},2330,{"position":[[453,10]]},2765,{"position":[[511,10],[593,8]]},2873,{"position":[[511,10],[593,8]]},2936,{"position":[[511,10],[593,8]]},3602,{"position":[[511,10],[593,8]]},3908,{"position":[[511,10],[593,8]]},4121,{"position":[[511,10],[593,8]]},4400,{"position":[[453,10]]}]],["instead",[],[],[1082,{"position":[[581,8]]},2030,{"position":[[581,8]]},2048,{"position":[[581,8]]},2126,{"position":[[581,8]]},2144,{"position":[[581,8]]},2255,{"position":[[581,8]]},2279,{"position":[[581,8]]},2309,{"position":[[581,8]]},2330,{"position":[[581,8]]},4400,{"position":[[581,8]]}]],["don't",[],[],[1082,{"position":[[590,5]]},2030,{"position":[[590,5]]},2048,{"position":[[590,5]]},2126,{"position":[[590,5]]},2144,{"position":[[590,5]]},2255,{"position":[[590,5]]},2279,{"position":[[590,5]]},2309,{"position":[[590,5]]},2330,{"position":[[590,5]]},4400,{"position":[[590,5]]}]],["travers",[],[],[1082,{"position":[[662,11]]},2030,{"position":[[662,11]]},2048,{"position":[[662,11]]},2126,{"position":[[662,11]]},2144,{"position":[[662,11]]},2255,{"position":[[662,11]]},2279,{"position":[[662,11]]},2309,{"position":[[662,11]]},2330,{"position":[[662,11]]},4400,{"position":[[662,11]]}]],["opshin.rewrite.rewrite_scoping.shallownamedefcollector.step",[],[1084,{"position":[[0,59]]}],[]],["opshin.rewrite.rewrite_scoping.shallownamedefcollector.visit_nam",[],[1087,{"position":[[0,65]]}],[]],["opshin.rewrite.rewrite_scoping.shallownamedefcollector.visit_classdef",[],[1090,{"position":[[0,69]]}],[]],["opshin.rewrite.rewrite_scoping.shallownamedefcollector.visit_functiondef",[],[1093,{"position":[[0,72]]}],[]],["opshin.rewrite.rewrite_scoping.shallownamedefcollector.visit",[],[1096,{"position":[[0,60]]}],[]],["rewritescop",[1098,{"position":[[0,14]]}],[],[]],["opshin.rewrite.rewrite_scoping.rewritescop",[],[1099,{"position":[[0,45]]}],[]],["latest_scope_id",[1101,{"position":[[0,15]]}],[],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.latest_scope_id",[],[1102,{"position":[[0,61]]}],[]],["scope",[1104,{"position":[[0,6]]},1146,{"position":[[0,5]]}],[],[1112,{"position":[[19,5]]},2357,{"position":[[48,5]]},4469,{"position":[[135,6]]}]],["opshin.rewrite.rewrite_scoping.rewritescoping.scop",[],[1105,{"position":[[0,52]]}],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.step",[],[1108,{"position":[[0,50]]}],[]],["variable_scope_id",[1110,{"position":[[0,17]]}],[],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.variable_scope_id",[],[1111,{"position":[[0,63]]}],[]],["find",[],[],[1112,{"position":[[0,4]]},1439,{"position":[[143,4]]}]],["variabl",[],[],[1112,{"position":[[39,8]]},2327,{"position":[[12,8]]},2351,{"position":[[12,8]]},2357,{"position":[[18,9]]},4220,{"position":[[162,9]]},4235,{"position":[[146,8]]}]],["defin",[],[],[1112,{"position":[[51,7]]},1439,{"position":[[41,6]]},1442,{"position":[[49,8]]},1880,{"position":[[88,7]]},4676,{"position":[[144,7]]}]],["closest",[],[],[1112,{"position":[[59,8]]}]],["enter_scop",[1113,{"position":[[0,11]]},2085,{"position":[[0,11]]},2181,{"position":[[0,11]]},4263,{"position":[[0,11]]}],[],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.enter_scop",[],[1114,{"position":[[0,57]]}],[]],["exit_scop",[1116,{"position":[[0,10]]},2088,{"position":[[0,10]]},2196,{"position":[[0,10]]},4266,{"position":[[0,10]]}],[],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.exit_scop",[],[1117,{"position":[[0,56]]}],[]],["set_variable_scop",[1119,{"position":[[0,18]]}],[],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.set_variable_scop",[],[1120,{"position":[[0,64]]}],[]],["map_nam",[1122,{"position":[[0,8]]}],[],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.map_nam",[],[1123,{"position":[[0,54]]}],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.visit_modul",[],[1126,{"position":[[0,58]]}],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.visit_nam",[],[1129,{"position":[[0,56]]}],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.visit_classdef",[],[1132,{"position":[[0,60]]}],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.visit_functiondef",[],[1135,{"position":[[0,63]]}],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.visit_nonetyp",[],[1138,{"position":[[0,60]]}],[]],["opshin.rewrite.rewrite_scoping.rewritescoping.visit",[],[1141,{"position":[[0,51]]}],[]],["recordscop",[1143,{"position":[[0,12]]}],[],[]],["opshin.rewrite.rewrite_scoping.recordscop",[],[1144,{"position":[[0,43]]}],[]],["opshin.rewrite.rewrite_scoping.recordscoper.scop",[],[1147,{"position":[[0,49]]}],[]],["opshin.rewrite.rewrite_scoping.recordscoper.visit_classdef",[],[1150,{"position":[[0,58]]}],[]],["visit_annassign",[1152,{"position":[[0,15]]},1914,{"position":[[0,15]]},2109,{"position":[[0,15]]},2220,{"position":[[0,15]]},2334,{"position":[[0,15]]},4305,{"position":[[0,15]]},4416,{"position":[[0,15]]}],[],[]],["opshin.rewrite.rewrite_scoping.recordscoper.visit_annassign",[],[1153,{"position":[[0,59]]}],[]],["rewrite_import",[1155,{"position":[[0,14]]}],[],[]],["opshin.rewrite.rewrite_import",[],[1156,{"position":[[0,29]]}],[]],["import_modul",[1158,{"position":[[0,13]]}],[],[]],["opshin.rewrite.rewrite_import.import_modul",[],[1159,{"position":[[0,43]]}],[]],["approxim",[],[],[1160,{"position":[[3,11]]}]],["rewriteloc",[1161,{"position":[[0,15]]}],[],[]],["opshin.rewrite.rewrite_import.rewriteloc",[],[1162,{"position":[[0,45]]}],[]],["opshin.rewrite.rewrite_import.rewritelocation.visit",[],[1165,{"position":[[0,51]]}],[]],["rewriteimport",[1167,{"position":[[0,13]]}],[],[]],["opshin.rewrite.rewrite_import.rewriteimport",[],[1168,{"position":[[0,43]]}],[]],["opshin.rewrite.rewrite_import.rewriteimport.step",[],[1171,{"position":[[0,48]]}],[]],["opshin.rewrite.rewrite_import.rewriteimport.visit_importfrom",[],[1174,{"position":[[0,60]]}],[]],["opshin.rewrite.rewrite_import.rewriteimport.visit",[],[1177,{"position":[[0,49]]}],[]],["rewrite_subscript38",[1179,{"position":[[0,19]]}],[],[]],["opshin.rewrite.rewrite_subscript38",[],[1180,{"position":[[0,34]]}],[]],["rewritesubscript38",[1182,{"position":[[0,18]]}],[],[]],["opshin.rewrite.rewrite_subscript38.rewritesubscript38",[],[1183,{"position":[[0,53]]}],[]],["opshin.rewrite.rewrite_subscript38.rewritesubscript38.step",[],[1186,{"position":[[0,58]]}],[]],["visit_index",[1188,{"position":[[0,11]]}],[],[]],["opshin.rewrite.rewrite_subscript38.rewritesubscript38.visit_index",[],[1189,{"position":[[0,65]]}],[]],["opshin.rewrite.rewrite_subscript38.rewritesubscript38.visit",[],[1192,{"position":[[0,59]]}],[]],["rewrite_comparison_chain",[1194,{"position":[[0,27]]}],[],[]],["opshin.rewrite.rewrite_comparison_chain",[],[1195,{"position":[[0,42]]}],[]],["rewritecomparisonchain",[1197,{"position":[[0,25]]}],[],[]],["opshin.rewrite.rewrite_comparison_chaining.rewritecomparisonchain",[],[1198,{"position":[[0,68]]}],[]],["opshin.rewrite.rewrite_comparison_chaining.rewritecomparisonchaining.step",[],[1201,{"position":[[0,73]]}],[]],["visit_compar",[1203,{"position":[[0,13]]},1899,{"position":[[0,13]]},4323,{"position":[[0,13]]}],[],[]],["opshin.rewrite.rewrite_comparison_chaining.rewritecomparisonchaining.visit_compar",[],[1204,{"position":[[0,82]]}],[]],["opshin.rewrite.rewrite_comparison_chaining.rewritecomparisonchaining.visit",[],[1207,{"position":[[0,74]]}],[]],["rewrite_empty_list",[1209,{"position":[[0,19]]}],[],[]],["opshin.rewrite.rewrite_empty_list",[],[1210,{"position":[[0,34]]}],[]],["rewriteemptylist",[1212,{"position":[[0,17]]}],[],[]],["opshin.rewrite.rewrite_empty_lists.rewriteemptylist",[],[1213,{"position":[[0,52]]}],[]],["opshin.rewrite.rewrite_empty_lists.rewriteemptylists.step",[],[1216,{"position":[[0,57]]}],[]],["visit_list",[1218,{"position":[[0,10]]},1962,{"position":[[0,10]]},4296,{"position":[[0,10]]}],[],[]],["opshin.rewrite.rewrite_empty_lists.rewriteemptylists.visit_list",[],[1219,{"position":[[0,63]]}],[]],["opshin.rewrite.rewrite_empty_lists.rewriteemptylists.visit_const",[],[1222,{"position":[[0,67]]}],[]],["opshin.rewrite.rewrite_empty_lists.rewriteemptylists.visit",[],[1225,{"position":[[0,58]]}],[]],["rewrite_augassign",[1227,{"position":[[0,17]]}],[],[]],["opshin.rewrite.rewrite_augassign",[],[1228,{"position":[[0,32]]}],[]],["rewriteaugassign",[1230,{"position":[[0,16]]}],[],[]],["opshin.rewrite.rewrite_augassign.rewriteaugassign",[],[1231,{"position":[[0,49]]}],[]],["opshin.rewrite.rewrite_augassign.rewriteaugassign.step",[],[1234,{"position":[[0,54]]}],[]],["visit_augassign",[1236,{"position":[[0,15]]}],[],[]],["opshin.rewrite.rewrite_augassign.rewriteaugassign.visit_augassign",[],[1237,{"position":[[0,65]]}],[]],["opshin.rewrite.rewrite_augassign.rewriteaugassign.visit",[],[1240,{"position":[[0,55]]}],[]],["rewrite_cast_condit",[1242,{"position":[[0,22]]}],[],[]],["opshin.rewrite.rewrite_cast_condit",[],[1243,{"position":[[0,37]]}],[]],["rewritecondit",[1245,{"position":[[0,17]]}],[],[]],["opshin.rewrite.rewrite_cast_condition.rewritecondit",[],[1246,{"position":[[0,55]]}],[]],["opshin.rewrite.rewrite_cast_condition.rewriteconditions.step",[],[1249,{"position":[[0,60]]}],[]],["opshin.rewrite.rewrite_cast_condition.rewriteconditions.visit_modul",[],[1252,{"position":[[0,68]]}],[]],["visit_if",[1254,{"position":[[0,8]]},1935,{"position":[[0,8]]},2097,{"position":[[0,8]]},2154,{"position":[[0,8]]},4308,{"position":[[0,8]]},4446,{"position":[[0,8]]}],[],[]],["opshin.rewrite.rewrite_cast_condition.rewriteconditions.visit_if",[],[1255,{"position":[[0,64]]}],[]],["visit_ifexp",[1257,{"position":[[0,11]]},1968,{"position":[[0,11]]},4371,{"position":[[0,11]]}],[],[]],["opshin.rewrite.rewrite_cast_condition.rewriteconditions.visit_ifexp",[],[1258,{"position":[[0,67]]}],[]],["visit_whil",[1260,{"position":[[0,11]]},1929,{"position":[[0,11]]},2100,{"position":[[0,11]]},2151,{"position":[[0,11]]},4311,{"position":[[0,11]]},4452,{"position":[[0,11]]}],[],[]],["opshin.rewrite.rewrite_cast_condition.rewriteconditions.visit_whil",[],[1261,{"position":[[0,67]]}],[]],["visit_boolop",[1263,{"position":[[0,12]]},1893,{"position":[[0,12]]},4242,{"position":[[0,12]]},4344,{"position":[[0,12]]}],[],[]],["opshin.rewrite.rewrite_cast_condition.rewriteconditions.visit_boolop",[],[1264,{"position":[[0,68]]}],[]],["visit_assert",[1266,{"position":[[0,12]]},1956,{"position":[[0,12]]},4365,{"position":[[0,12]]}],[],[]],["opshin.rewrite.rewrite_cast_condition.rewriteconditions.visit_assert",[],[1267,{"position":[[0,68]]}],[]],["opshin.rewrite.rewrite_cast_condition.rewriteconditions.visit",[],[1270,{"position":[[0,61]]}],[]],["rewrite_import_hashlib",[1272,{"position":[[0,22]]}],[],[]],["opshin.rewrite.rewrite_import_hashlib",[],[1273,{"position":[[0,37]]}],[]],["hashtyp",[1275,{"position":[[0,8]]}],[],[]],["opshin.rewrite.rewrite_import_hashlib.hashtyp",[],[1276,{"position":[[0,46]]}],[]],["pseudo",[],[],[1277,{"position":[[2,6]]}]],["result",[],[],[1277,{"position":[[27,6]]},4475,{"position":[[34,7]]},4478,{"position":[[47,7]]},4481,{"position":[[35,7]]},4484,{"position":[[46,7]]},4487,{"position":[[51,7]]},4490,{"position":[[52,7]]},4493,{"position":[[50,7]]},4511,{"position":[[69,9]]}]],["hash",[],[],[1277,{"position":[[44,4]]},1445,{"position":[[34,4],[88,6]]},1478,{"position":[[57,4]]},1547,{"position":[[81,5]]},1556,{"position":[[82,5]]},1571,{"position":[[83,4]]},4469,{"position":[[37,4],[117,4]]},4529,{"position":[[0,4]]},4532,{"position":[[0,4]]},4535,{"position":[[0,4]]}]],["digest",[],[],[1277,{"position":[[71,8]]}]],["opshin.rewrite.rewrite_import_hashlib.hashtype.attribute_typ",[],[1279,{"position":[[0,61]]}],[]],["opshin.rewrite.rewrite_import_hashlib.hashtype.attribut",[],[1282,{"position":[[0,56]]}],[]],["opshin.rewrite.rewrite_import_hashlib.hashtype.copy_only_attribut",[],[1285,{"position":[[0,67]]}],[]],["opshin.rewrite.rewrite_import_hashlib.hashtype.constr_typ",[],[1288,{"position":[[0,58]]}],[]],["opshin.rewrite.rewrite_import_hashlib.hashtype.constr",[],[1291,{"position":[[0,53]]}],[]],["opshin.rewrite.rewrite_import_hashlib.hashtype.cmp",[],[1294,{"position":[[0,50]]}],[]],["opshin.rewrite.rewrite_import_hashlib.hashtype.stringifi",[],[1297,{"position":[[0,56]]}],[]],["opshin.rewrite.rewrite_import_hashlib.hashtype.binop_typ",[],[1300,{"position":[[0,57]]}],[]],["opshin.rewrite.rewrite_import_hashlib.hashtype.binop",[],[1303,{"position":[[0,52]]}],[]],["opshin.rewrite.rewrite_import_hashlib.hashtype.unop_typ",[],[1306,{"position":[[0,56]]}],[]],["opshin.rewrite.rewrite_import_hashlib.hashtype.unop",[],[1309,{"position":[[0,51]]}],[]],["opshin.rewrite.rewrite_import_hashlib.hashtype.id_map",[],[1312,{"position":[[0,53]]}],[]],["pythonhashlib",[1314,{"position":[[0,13]]}],[],[]],["opshin.rewrite.rewrite_import_hashlib.pythonhashlib",[],[1315,{"position":[[0,51]]}],[]],["name/valu",[],[],[1316,{"position":[[23,10]]},4709,{"position":[[23,10]]},4760,{"position":[[23,10]]}]],["enumer",[],[],[1316,{"position":[[49,12],[234,12],[373,13]]},4709,{"position":[[49,12],[234,12],[373,13]]},4760,{"position":[[49,12],[234,12],[373,13]]}]],["color(enum",[],[],[1316,{"position":[[72,12]]},4709,{"position":[[72,12]]},4760,{"position":[[72,12]]}]],["red",[],[],[1316,{"position":[[88,3]]},4709,{"position":[[88,3]]},4760,{"position":[[88,3]]}]],["blue",[],[],[1316,{"position":[[99,4]]},4709,{"position":[[99,4]]},4760,{"position":[[99,4]]}]],["green",[],[],[1316,{"position":[[111,5]]},4709,{"position":[[111,5]]},4760,{"position":[[111,5]]}]],["3",[],[],[1316,{"position":[[119,1],[321,1]]},1505,{"position":[[222,1]]},4709,{"position":[[119,1],[321,1]]},4760,{"position":[[119,1],[321,1]]}]],["access",[],[],[1316,{"position":[[121,6],[149,6]]},4472,{"position":[[35,6]]},4673,{"position":[[28,6]]},4709,{"position":[[121,6],[149,6]]},4760,{"position":[[121,6],[149,6]]}]],["color.r",[],[],[1316,{"position":[[160,9]]},4709,{"position":[[160,9]]},4760,{"position":[[160,9]]}]],["color(1",[],[],[1316,{"position":[[191,8]]},4709,{"position":[[191,8]]},4760,{"position":[[191,8]]}]],["color['r",[],[],[1316,{"position":[[220,12]]},4709,{"position":[[220,12]]},4760,{"position":[[220,12]]}]],["iter",[2544,{"position":[[0,4]]},2592,{"position":[[0,4]]}],[],[1316,{"position":[[254,8]]},2414,{"position":[[575,5],[656,5]]},2444,{"position":[[575,5],[656,5]]},2477,{"position":[[575,5],[656,5]]},2540,{"position":[[22,5]]},2660,{"position":[[575,5],[656,5]]},4709,{"position":[[254,8]]},4760,{"position":[[254,8]]}]],["mani",[],[],[1316,{"position":[[282,4]]},1880,{"position":[[100,4]]},2765,{"position":[[157,4],[184,4]]},2873,{"position":[[157,4],[184,4]]},2936,{"position":[[157,4],[184,4]]},3602,{"position":[[157,4],[184,4]]},3908,{"position":[[157,4],[184,4]]},4121,{"position":[[157,4],[184,4]]},4709,{"position":[[282,4]]},4760,{"position":[[282,4]]},4886,{"position":[[12,4]]},4889,{"position":[[12,4]]},4892,{"position":[[12,4]]}]],["len(color",[],[],[1316,{"position":[[310,10]]},4709,{"position":[[310,10]]},4760,{"position":[[310,10]]}]],["list(color",[],[],[1316,{"position":[[327,11]]},4709,{"position":[[327,11]]},4760,{"position":[[327,11]]}]],["sha256",[1317,{"position":[[0,6]]}],[],[]],["opshin.rewrite.rewrite_import_hashlib.pythonhashlib.sha256",[],[1318,{"position":[[0,58]]}],[]],["sha3_256",[1320,{"position":[[0,8]]},4530,{"position":[[0,8]]}],[],[]],["opshin.rewrite.rewrite_import_hashlib.pythonhashlib.sha3_256",[],[1321,{"position":[[0,60]]}],[]],["blake2b",[1323,{"position":[[0,7]]}],[],[4535,{"position":[[24,7]]}]],["opshin.rewrite.rewrite_import_hashlib.pythonhashlib.blake2b",[],[1324,{"position":[[0,59]]}],[]],["rewriteimporthashlib",[1326,{"position":[[0,20]]}],[],[]],["opshin.rewrite.rewrite_import_hashlib.rewriteimporthashlib",[],[1327,{"position":[[0,58]]}],[]],["opshin.rewrite.rewrite_import_hashlib.rewriteimporthashlib.step",[],[1330,{"position":[[0,63]]}],[]],["imports_hashlib",[1332,{"position":[[0,15]]}],[],[]],["opshin.rewrite.rewrite_import_hashlib.rewriteimporthashlib.imports_hashlib",[],[1333,{"position":[[0,74]]}],[]],["opshin.rewrite.rewrite_import_hashlib.rewriteimporthashlib.visit_importfrom",[],[1336,{"position":[[0,75]]}],[]],["opshin.rewrite.rewrite_import_hashlib.rewriteimporthashlib.visit",[],[1339,{"position":[[0,64]]}],[]],["rewrite_import_integrity_check",[1341,{"position":[[0,30]]}],[],[]],["opshin.rewrite.rewrite_import_integrity_check",[],[1342,{"position":[[0,45]]}],[]],["integritycheckimpl",[1344,{"position":[[0,18]]}],[],[]],["opshin.rewrite.rewrite_import_integrity_check.integritycheckimpl",[],[1345,{"position":[[0,64]]}],[]],["opshin.rewrite.rewrite_import_integrity_check.integritycheckimpl.type_from_arg",[],[1348,{"position":[[0,79]]}],[]],["opshin.rewrite.rewrite_import_integrity_check.integritycheckimpl.impl_from_arg",[],[1351,{"position":[[0,79]]}],[]],["rewriteimportintegritycheck",[1353,{"position":[[0,27]]}],[],[]],["opshin.rewrite.rewrite_import_integrity_check.rewriteimportintegritycheck",[],[1354,{"position":[[0,73]]}],[]],["opshin.rewrite.rewrite_import_integrity_check.rewriteimportintegritycheck.step",[],[1357,{"position":[[0,78]]}],[]],["opshin.rewrite.rewrite_import_integrity_check.rewriteimportintegritycheck.visit_importfrom",[],[1360,{"position":[[0,90]]}],[]],["opshin.rewrite.rewrite_import_integrity_check.rewriteimportintegritycheck.visit",[],[1363,{"position":[[0,79]]}],[]],["rewrite_forbidden_overwrit",[1365,{"position":[[0,28]]}],[],[]],["opshin.rewrite.rewrite_forbidden_overwrit",[],[1366,{"position":[[0,43]]}],[]],["forbiddenoverwriteerror",[1368,{"position":[[0,23]]}],[],[]],["opshin.rewrite.rewrite_forbidden_overwrites.forbiddenoverwriteerror",[],[1369,{"position":[[0,67]]}],[]],["inappropri",[],[],[1370,{"position":[[0,13]]}]],["correct",[],[],[1370,{"position":[[33,7]]},4220,{"position":[[422,12]]}]],["rewriteforbiddenoverwrit",[1371,{"position":[[0,26]]}],[],[]],["opshin.rewrite.rewrite_forbidden_overwrites.rewriteforbiddenoverwrit",[],[1372,{"position":[[0,70]]}],[]],["opshin.rewrite.rewrite_forbidden_overwrites.rewriteforbiddenoverwrites.step",[],[1375,{"position":[[0,75]]}],[]],["opshin.rewrite.rewrite_forbidden_overwrites.rewriteforbiddenoverwrites.visit_nam",[],[1378,{"position":[[0,81]]}],[]],["opshin.rewrite.rewrite_forbidden_overwrites.rewriteforbiddenoverwrites.visit",[],[1381,{"position":[[0,76]]}],[]],["rewrite_inject_builtin_constr",[1383,{"position":[[0,29]]}],[],[]],["opshin.rewrite.rewrite_inject_builtin_constr",[],[1384,{"position":[[0,44]]}],[]],["rewriteinjectbuiltinsconstr",[1386,{"position":[[0,27]]}],[],[]],["opshin.rewrite.rewrite_inject_builtin_constr.rewriteinjectbuiltinsconstr",[],[1387,{"position":[[0,72]]}],[]],["opshin.rewrite.rewrite_inject_builtin_constr.rewriteinjectbuiltinsconstr.step",[],[1390,{"position":[[0,77]]}],[]],["opshin.rewrite.rewrite_inject_builtin_constr.rewriteinjectbuiltinsconstr.visit_modul",[],[1393,{"position":[[0,85]]}],[]],["opshin.rewrite.rewrite_inject_builtin_constr.rewriteinjectbuiltinsconstr.visit",[],[1396,{"position":[[0,78]]}],[]],["rewrite_import_uplc_builtin",[1398,{"position":[[0,28]]}],[],[]],["opshin.rewrite.rewrite_import_uplc_builtin",[],[1399,{"position":[[0,43]]}],[]],["rewriteimportuplcbuiltin",[1401,{"position":[[0,25]]}],[],[]],["opshin.rewrite.rewrite_import_uplc_builtins.rewriteimportuplcbuiltin",[],[1402,{"position":[[0,69]]}],[]],["opshin.rewrite.rewrite_import_uplc_builtins.rewriteimportuplcbuiltins.step",[],[1405,{"position":[[0,74]]}],[]],["imports_uplc_builtin",[1407,{"position":[[0,21]]}],[],[]],["opshin.rewrite.rewrite_import_uplc_builtins.rewriteimportuplcbuiltins.imports_uplc_builtin",[],[1408,{"position":[[0,91]]}],[]],["opshin.rewrite.rewrite_import_uplc_builtins.rewriteimportuplcbuiltins.visit_importfrom",[],[1411,{"position":[[0,86]]}],[]],["opshin.rewrite.rewrite_import_uplc_builtins.rewriteimportuplcbuiltins.visit_functiondef",[],[1414,{"position":[[0,87]]}],[]],["opshin.rewrite.rewrite_import_uplc_builtins.rewriteimportuplcbuiltins.visit",[],[1417,{"position":[[0,75]]}],[]],["rewrite_forbidden_return",[1419,{"position":[[0,24]]}],[],[]],["opshin.rewrite.rewrite_forbidden_return",[],[1420,{"position":[[0,39]]}],[]],["rewriteforbiddenreturn",[1422,{"position":[[0,22]]}],[],[]],["opshin.rewrite.rewrite_forbidden_return.rewriteforbiddenreturn",[],[1423,{"position":[[0,62]]}],[]],["opshin.rewrite.rewrite_forbidden_return.rewriteforbiddenreturn.step",[],[1426,{"position":[[0,67]]}],[]],["visit_return",[1428,{"position":[[0,12]]},1938,{"position":[[0,12]]},4359,{"position":[[0,12]]},4455,{"position":[[0,12]]}],[],[]],["opshin.rewrite.rewrite_forbidden_return.rewriteforbiddenreturn.visit_return",[],[1429,{"position":[[0,75]]}],[]],["opshin.rewrite.rewrite_forbidden_return.rewriteforbiddenreturn.visit_functiondef",[],[1432,{"position":[[0,80]]}],[]],["opshin.rewrite.rewrite_forbidden_return.rewriteforbiddenreturn.visit",[],[1435,{"position":[[0,68]]}],[]],["ledger",[1437,{"position":[[0,6]]}],[],[1442,{"position":[[13,6]]}]],["opshin.ledg",[],[1438,{"position":[[0,13]]}],[]],["provid",[],[],[1439,{"position":[[7,8]]},4466,{"position":[[7,8]]},4643,{"position":[[19,8]]}]],["helper",[],[],[1439,{"position":[[21,6]]}]],["concept",[],[],[1439,{"position":[[48,8]]}]],["introduc",[],[],[1439,{"position":[[57,10]]}]],["plutustx",[],[],[1439,{"position":[[71,8]]}]],["encod",[],[],[1439,{"position":[[112,6]]},1454,{"position":[[79,8]]},1460,{"position":[[80,8]]},4553,{"position":[[0,6]]}]],["particular",[],[],[1439,{"position":[[128,10]]},4676,{"position":[[49,11]]}]],["definit",[],[],[1439,{"position":[[152,10]]}]],["entir",[],[],[1439,{"position":[[170,6]]},1859,{"position":[[35,8]]}]],["context",[],[],[1439,{"position":[[184,7]]}]],["v2",[],[],[1439,{"position":[[203,2]]}]],["api_v2",[1440,{"position":[[0,6]]}],[],[1439,{"position":[[219,6]]}]],["opshin.ledger.api_v2",[],[1441,{"position":[[0,20]]}],[1439,{"position":[[235,20]]}]],["plutusv2",[],[],[1442,{"position":[[4,8]]}]],["scriptcontext",[1824,{"position":[[0,13]]}],[],[1442,{"position":[[62,13]]},1454,{"position":[[104,14]]},1460,{"position":[[106,14]]}]],["txid",[1443,{"position":[[0,4]]}],[],[]],["opshin.ledger.api_v2.txid",[],[1444,{"position":[[0,25]]}],[]],["64",[],[],[1445,{"position":[[20,2]]}]],["byte",[],[],[1445,{"position":[[23,5]]},1643,{"position":[[115,6]]},1655,{"position":[[27,6],[44,6]]},1667,{"position":[[40,6]]},4508,{"position":[[10,5]]},4517,{"position":[[8,4]]},4781,{"position":[[141,6],[347,6],[551,6]]}]],["long",[],[],[1445,{"position":[[29,4]]},2765,{"position":[[1161,4]]},2873,{"position":[[1161,4]]},2936,{"position":[[1161,4]]},3602,{"position":[[1161,4]]},3908,{"position":[[1161,4]]},4121,{"position":[[1161,4]]}]],["bodi",[2445,{"position":[[0,4]]},2451,{"position":[[0,4]]},2463,{"position":[[0,4]]},2478,{"position":[[0,4]]},2532,{"position":[[0,4]]},2547,{"position":[[0,4]]},2664,{"position":[[0,4]]}],[],[1445,{"position":[[58,4]]},2408,{"position":[[185,5],[215,5]]},2414,{"position":[[57,5],[178,5],[305,5],[586,5],[667,5],[732,5],[772,5],[819,5],[880,5],[991,5],[1065,5]]},2444,{"position":[[57,5],[178,5],[305,5],[586,5],[667,5],[732,5],[772,5],[819,5],[880,5],[991,5],[1065,5]]},2450,{"position":[[50,5]]},2459,{"position":[[19,5]]},2477,{"position":[[57,5],[178,5],[305,5],[586,5],[667,5],[732,5],[772,5],[819,5],[880,5],[991,5],[1065,5]]},2510,{"position":[[61,5]]},2528,{"position":[[22,5]]},2540,{"position":[[33,5]]},2588,{"position":[[185,5],[215,5]]},2660,{"position":[[57,5],[178,5],[305,5],[586,5],[667,5],[732,5],[772,5],[819,5],[880,5],[991,5],[1065,5]]},2747,{"position":[[185,5],[215,5]]}]],["txid(bytes.fromhex(\"842a4d37b036da6ab3c04331240e67d81746beb44f23ad79703e026705361956",[],[],[1445,{"position":[[110,85]]}]],["tx_id",[1446,{"position":[[0,5]]}],[],[]],["opshin.ledger.api_v2.txid.tx_id",[],[1447,{"position":[[0,31]]}],[]],["constr_id",[1449,{"position":[[0,9]]},1455,{"position":[[0,9]]},1461,{"position":[[0,9]]},1473,{"position":[[0,9]]},1482,{"position":[[0,9]]},1491,{"position":[[0,9]]},1500,{"position":[[0,9]]},1515,{"position":[[0,9]]},1521,{"position":[[0,9]]},1530,{"position":[[0,9]]},1542,{"position":[[0,9]]},1551,{"position":[[0,9]]},1560,{"position":[[0,9]]},1566,{"position":[[0,9]]},1575,{"position":[[0,9]]},1584,{"position":[[0,9]]},1590,{"position":[[0,9]]},1608,{"position":[[0,9]]},1620,{"position":[[0,9]]},1629,{"position":[[0,9]]},1638,{"position":[[0,9]]},1650,{"position":[[0,9]]},1662,{"position":[[0,9]]},1674,{"position":[[0,9]]},1680,{"position":[[0,9]]},1686,{"position":[[0,9]]},1692,{"position":[[0,9]]},1701,{"position":[[0,9]]},1707,{"position":[[0,9]]},1719,{"position":[[0,9]]},1731,{"position":[[0,9]]},1743,{"position":[[0,9]]},1752,{"position":[[0,9]]},1761,{"position":[[0,9]]},1770,{"position":[[0,9]]},1779,{"position":[[0,9]]},1821,{"position":[[0,9]]},1833,{"position":[[0,9]]},2919,{"position":[[0,9]]},2931,{"position":[[0,9]]},3888,{"position":[[0,9]]},4578,{"position":[[0,9]]},4863,{"position":[[0,9]]},4875,{"position":[[0,9]]},4881,{"position":[[0,9]]}],[],[]],["opshin.ledger.api_v2.txid.constr_id",[],[1450,{"position":[[0,35]]}],[]],["truedata",[1452,{"position":[[0,8]]}],[],[1454,{"position":[[134,10]]}]],["opshin.ledger.api_v2.truedata",[],[1453,{"position":[[0,29]]}],[]],["datum",[1581,{"position":[[0,5]]},1602,{"position":[[0,5]]}],[],[1454,{"position":[[2,5]]},1460,{"position":[[2,5]]},1547,{"position":[[26,5]]},1565,{"position":[[27,5]]},1571,{"position":[[27,5]]},1580,{"position":[[27,5],[103,5]]},1595,{"position":[[150,6],[157,5]]},4559,{"position":[[9,5]]},4565,{"position":[[12,5]]},4889,{"position":[[94,5]]},4898,{"position":[[12,5],[135,5]]},4901,{"position":[[33,5],[155,6]]}]],["true",[],[],[1454,{"position":[[24,4],[92,4]]},1859,{"position":[[8,4]]},2243,{"position":[[59,4]]},2246,{"position":[[8,4]]},2411,{"position":[[54,4]]},2492,{"position":[[54,4]]},2561,{"position":[[54,4]]},2579,{"position":[[54,4]]},2585,{"position":[[54,4]]},2600,{"position":[[54,4]]},2612,{"position":[[54,4]]},2627,{"position":[[54,4]]},2642,{"position":[[54,4]]},2651,{"position":[[54,4]]},2657,{"position":[[54,4]]},2684,{"position":[[54,4]]},2696,{"position":[[54,4]]},2705,{"position":[[54,4]]},2714,{"position":[[54,4]]},2723,{"position":[[54,4]]},2735,{"position":[[54,4]]},2756,{"position":[[54,4]]}]],["haskel",[],[],[1454,{"position":[[32,7]]},1460,{"position":[[33,7]]}]],["opshin.ledger.api_v2.truedata.constr_id",[],[1456,{"position":[[0,39]]}],[]],["falsedata",[1458,{"position":[[0,9]]}],[],[1460,{"position":[[136,11]]}]],["opshin.ledger.api_v2.falsedata",[],[1459,{"position":[[0,30]]}],[]],["fals",[],[],[1460,{"position":[[24,5],[93,5]]},2243,{"position":[[99,5]]}]],["opshin.ledger.api_v2.falsedata.constr_id",[],[1462,{"position":[[0,40]]}],[]],["txoutref",[1464,{"position":[[0,8]]}],[],[]],["opshin.ledger.api_v2.txoutref",[],[1465,{"position":[[0,29]]}],[]],["refer",[],[],[1466,{"position":[[2,9]]},1505,{"position":[[113,6]]},1595,{"position":[[211,9]]},4847,{"position":[[88,9]]}]],["hash/id",[],[],[1466,{"position":[[36,8]]}]],["index",[],[],[1466,{"position":[[47,6]]},4517,{"position":[[22,5]]}]],["opshin.ledger.api_v2.txoutref.id",[],[1468,{"position":[[0,32]]}],[]],["idx",[1470,{"position":[[0,3]]}],[],[]],["opshin.ledger.api_v2.txoutref.idx",[],[1471,{"position":[[0,33]]}],[]],["opshin.ledger.api_v2.txoutref.constr_id",[],[1474,{"position":[[0,39]]}],[]],["pubkeycredenti",[1476,{"position":[[0,16]]}],[],[]],["opshin.ledger.api_v2.pubkeycredenti",[],[1477,{"position":[[0,37]]}],[]],["authent",[],[],[1478,{"position":[[27,13]]},1487,{"position":[[27,13]]}]],["public",[],[],[1478,{"position":[[46,6]]}]],["key",[2616,{"position":[[0,3]]}],[],[1478,{"position":[[53,3]]},1505,{"position":[[163,3]]},2408,{"position":[[246,5],[391,4]]},2588,{"position":[[246,5],[391,4]]},2615,{"position":[[14,4]]},2654,{"position":[[10,5]]},2747,{"position":[[246,5],[391,4]]},4847,{"position":[[193,3]]}]],["pubkeycredential(bytes.fromhex(\"c06ddaad12fc4ded18e56feac72957c1aa75fce6096b40e63ec88274",[],[],[1478,{"position":[[77,89]]}]],["credential_hash",[1479,{"position":[[0,15]]},1488,{"position":[[0,15]]}],[],[]],["opshin.ledger.api_v2.pubkeycredential.credential_hash",[],[1480,{"position":[[0,53]]}],[]],["opshin.ledger.api_v2.pubkeycredential.constr_id",[],[1483,{"position":[[0,47]]}],[]],["scriptcredenti",[1485,{"position":[[0,16]]}],[],[]],["opshin.ledger.api_v2.scriptcredenti",[],[1486,{"position":[[0,37]]}],[]],["cotnract",[],[],[1487,{"position":[[52,8]]}]],["scriptcredential(bytes.fromhex(\"c06ddaad12fc4ded18e56feac72957c1aa75fce6096b40e63ec88274",[],[],[1487,{"position":[[76,89]]}]],["opshin.ledger.api_v2.scriptcredential.credential_hash",[],[1489,{"position":[[0,53]]}],[]],["opshin.ledger.api_v2.scriptcredential.constr_id",[],[1492,{"position":[[0,47]]}],[]],["stakinghash",[1494,{"position":[[0,11]]}],[],[]],["opshin.ledger.api_v2.stakinghash",[],[1495,{"position":[[0,32]]}],[]],["control",[],[],[1496,{"position":[[44,10]]},1505,{"position":[[44,10]]},4568,{"position":[[149,7]]}]],["associ",[],[],[1496,{"position":[[62,10]]},1505,{"position":[[62,10]]},1547,{"position":[[32,10]]},1556,{"position":[[33,10]]},1565,{"position":[[33,10]]},1571,{"position":[[33,10]]},1580,{"position":[[33,10]]},1589,{"position":[[34,10]]},1595,{"position":[[120,10],[163,10],[228,10]]}]],["credenti",[],[],[1496,{"position":[[73,10]]},1520,{"position":[[43,12]]},1526,{"position":[[40,12],[87,12]]},1535,{"position":[[55,10]]}]],["opshin.ledger.api_v2.stakinghash.valu",[],[1498,{"position":[[0,38]]}],[]],["opshin.ledger.api_v2.stakinghash.constr_id",[],[1501,{"position":[[0,42]]}],[]],["stakingptr",[1503,{"position":[[0,10]]}],[],[]],["opshin.ledger.api_v2.stakingptr",[],[1504,{"position":[[0,31]]}],[1625,{"position":[[64,33]]},1634,{"position":[[66,33]]},1643,{"position":[[70,33]]},1766,{"position":[[70,33]]}]],["pointer",[],[],[1505,{"position":[[73,8],[105,7]]}]],["point",[],[],[1505,{"position":[[125,5],[195,5]]}]],["registr",[],[],[1505,{"position":[[167,12]]}]],["certif",[],[],[1505,{"position":[[180,12]]}]],["identifi",[],[],[1505,{"position":[[204,10]]},2408,{"position":[[801,10]]},2588,{"position":[[801,10]]},2726,{"position":[[22,10]]},2747,{"position":[[801,10]]}]],["coordin",[],[],[1505,{"position":[[224,11]]}]],["slot_no",[1506,{"position":[[0,7]]}],[],[]],["opshin.ledger.api_v2.stakingptr.slot_no",[],[1507,{"position":[[0,39]]}],[]],["tx_index",[1509,{"position":[[0,8]]}],[],[]],["opshin.ledger.api_v2.stakingptr.tx_index",[],[1510,{"position":[[0,40]]}],[]],["cert_index",[1512,{"position":[[0,10]]}],[],[]],["opshin.ledger.api_v2.stakingptr.cert_index",[],[1513,{"position":[[0,42]]}],[]],["opshin.ledger.api_v2.stakingptr.constr_id",[],[1516,{"position":[[0,41]]}],[]],["nostakingcredenti",[1518,{"position":[[0,19]]}],[],[]],["opshin.ledger.api_v2.nostakingcredenti",[],[1519,{"position":[[0,40]]}],[]],["opshin.ledger.api_v2.nostakingcredential.constr_id",[],[1522,{"position":[[0,50]]}],[]],["somestakingcredenti",[1524,{"position":[[0,21]]}],[],[]],["opshin.ledger.api_v2.somestakingcredenti",[],[1525,{"position":[[0,42]]}],[]],["user",[],[],[1526,{"position":[[100,5]]},4472,{"position":[[148,5]]},4568,{"position":[[135,4]]}]],["staking_credenti",[1527,{"position":[[0,18]]},1539,{"position":[[0,18]]},1767,{"position":[[0,18]]}],[],[]],["opshin.ledger.api_v2.somestakingcredential.staking_credenti",[],[1528,{"position":[[0,61]]}],[]],["opshin.ledger.api_v2.somestakingcredential.constr_id",[],[1531,{"position":[[0,52]]}],[]],["opshin.ledger.api_v2.address",[],[1534,{"position":[[0,28]]}],[]],["shelley",[],[],[1535,{"position":[[2,7]]}]],["consist",[],[],[1535,{"position":[[19,10]]},1595,{"position":[[52,10]]},2246,{"position":[[26,8]]}]],["payment",[],[],[1535,{"position":[[35,7]]}]],["payment_credenti",[1536,{"position":[[0,18]]}],[],[]],["opshin.ledger.api_v2.address.payment_credenti",[],[1537,{"position":[[0,47]]}],[]],["opshin.ledger.api_v2.address.staking_credenti",[],[1540,{"position":[[0,47]]}],[]],["opshin.ledger.api_v2.address.constr_id",[],[1543,{"position":[[0,38]]}],[]],["somedatumhash",[1545,{"position":[[0,13]]}],[],[]],["opshin.ledger.api_v2.somedatumhash",[],[1546,{"position":[[0,34]]}],[]],["given",[],[],[1547,{"position":[[75,5]]},1556,{"position":[[76,5]]},1748,{"position":[[35,5]]},1757,{"position":[[35,5]]},1862,{"position":[[35,5],[69,5],[104,5]]},1865,{"position":[[35,5],[89,5]]},1868,{"position":[[59,5],[94,5]]},2300,{"position":[[34,5]]},4511,{"position":[[25,5]]},4517,{"position":[[16,5]]},4538,{"position":[[0,5]]},4541,{"position":[[0,5]]},4544,{"position":[[0,5]]},4886,{"position":[[60,5]]},4889,{"position":[[61,5]]},4892,{"position":[[60,5]]},4898,{"position":[[32,5]]},4901,{"position":[[53,5]]},4910,{"position":[[58,5]]},4913,{"position":[[20,5]]}]],["datum_hash",[1548,{"position":[[0,10]]},1572,{"position":[[0,10]]}],[],[]],["opshin.ledger.api_v2.somedatumhash.datum_hash",[],[1549,{"position":[[0,45]]}],[]],["opshin.ledger.api_v2.somedatumhash.constr_id",[],[1552,{"position":[[0,44]]}],[]],["somescripthash",[1554,{"position":[[0,14]]}],[],[]],["opshin.ledger.api_v2.somescripthash",[],[1555,{"position":[[0,35]]}],[]],["script_hash",[1557,{"position":[[0,11]]},4815,{"position":[[0,11]]}],[],[]],["opshin.ledger.api_v2.somescripthash.script_hash",[],[1558,{"position":[[0,47]]}],[]],["opshin.ledger.api_v2.somescripthash.constr_id",[],[1561,{"position":[[0,45]]}],[]],["nooutputdatum",[1563,{"position":[[0,13]]}],[],[4901,{"position":[[183,14]]}]],["opshin.ledger.api_v2.nooutputdatum",[],[1564,{"position":[[0,34]]}],[]],["opshin.ledger.api_v2.nooutputdatum.constr_id",[],[1567,{"position":[[0,44]]}],[]],["someoutputdatumhash",[1569,{"position":[[0,19]]}],[],[]],["opshin.ledger.api_v2.someoutputdatumhash",[],[1570,{"position":[[0,40]]}],[]],["attach",[],[],[1571,{"position":[[74,8]]},1580,{"position":[[94,8]]},4898,{"position":[[18,8],[145,9]]},4901,{"position":[[39,8],[146,8]]}]],["opshin.ledger.api_v2.someoutputdatumhash.datum_hash",[],[1573,{"position":[[0,51]]}],[]],["opshin.ledger.api_v2.someoutputdatumhash.constr_id",[],[1576,{"position":[[0,50]]}],[]],["someoutputdatum",[1578,{"position":[[0,15]]}],[],[4901,{"position":[[8,15]]}]],["opshin.ledger.api_v2.someoutputdatum",[],[1579,{"position":[[0,36]]}],[]],["inlin",[],[],[1580,{"position":[[69,7]]},4898,{"position":[[88,7]]},4901,{"position":[[109,7]]}]],["equal",[],[],[1580,{"position":[[81,5]]},4496,{"position":[[0,8]]},4562,{"position":[[0,8]]}]],["opshin.ledger.api_v2.someoutputdatum.datum",[],[1582,{"position":[[0,42]]}],[]],["opshin.ledger.api_v2.someoutputdatum.constr_id",[],[1585,{"position":[[0,46]]}],[]],["noscripthash",[1587,{"position":[[0,12]]}],[],[]],["opshin.ledger.api_v2.noscripthash",[],[1588,{"position":[[0,33]]}],[]],["opshin.ledger.api_v2.noscripthash.constr_id",[],[1591,{"position":[[0,43]]}],[]],["txout",[1593,{"position":[[0,5]]}],[],[]],["opshin.ledger.api_v2.txout",[],[1594,{"position":[[0,26]]}],[]],["represent",[],[],[1595,{"position":[[11,14]]},1613,{"position":[[11,14]]},4565,{"position":[[32,15]]}]],["own",[],[],[1595,{"position":[[85,6]]},1757,{"position":[[85,5]]}]],["token",[4866,{"position":[[0,5]]}],[],[1595,{"position":[[113,6]]},4868,{"position":[[2,6],[38,5]]},4886,{"position":[[17,6]]},4889,{"position":[[17,6]]},4892,{"position":[[17,6]]},4913,{"position":[[26,5]]}]],["reference_script",[1605,{"position":[[0,16]]}],[],[1595,{"position":[[193,17]]}]],["opshin.ledger.api_v2.txout.address",[],[1597,{"position":[[0,34]]}],[]],["opshin.ledger.api_v2.txout.valu",[],[1600,{"position":[[0,32]]}],[]],["opshin.ledger.api_v2.txout.datum",[],[1603,{"position":[[0,32]]}],[]],["opshin.ledger.api_v2.txout.reference_script",[],[1606,{"position":[[0,43]]}],[]],["opshin.ledger.api_v2.txout.constr_id",[],[1609,{"position":[[0,36]]}],[]],["txininfo",[1611,{"position":[[0,8]]}],[],[]],["opshin.ledger.api_v2.txininfo",[],[1612,{"position":[[0,29]]}],[]],["consum",[],[],[1613,{"position":[[60,8]]}]],["out_ref",[1614,{"position":[[0,7]]}],[],[]],["opshin.ledger.api_v2.txininfo.out_ref",[],[1615,{"position":[[0,37]]}],[]],["resolv",[1617,{"position":[[0,8]]}],[],[4220,{"position":[[202,7]]}]],["opshin.ledger.api_v2.txininfo.resolv",[],[1618,{"position":[[0,38]]}],[]],["opshin.ledger.api_v2.txininfo.constr_id",[],[1621,{"position":[[0,39]]}],[]],["dcertdelegregkey",[1623,{"position":[[0,16]]}],[],[]],["opshin.ledger.api_v2.dcertdelegregkey",[],[1624,{"position":[[0,37]]}],[]],["dcertdelegregkey(valu",[],[],[1625,{"position":[[0,23]]}]],["union[opshin.ledger.api_v2.stakinghash",[],[],[1625,{"position":[[24,39]]},1634,{"position":[[26,39]]},1643,{"position":[[30,39]]},1766,{"position":[[30,39]]}]],["opshin.ledger.api_v2.dcertdelegregkey.valu",[],[1627,{"position":[[0,43]]}],[]],["opshin.ledger.api_v2.dcertdelegregkey.constr_id",[],[1630,{"position":[[0,47]]}],[]],["dcertdelegderegkey",[1632,{"position":[[0,18]]}],[],[]],["opshin.ledger.api_v2.dcertdelegderegkey",[],[1633,{"position":[[0,39]]}],[1775,{"position":[[64,40]]}]],["dcertdelegderegkey(valu",[],[],[1634,{"position":[[0,25]]}]],["opshin.ledger.api_v2.dcertdelegderegkey.valu",[],[1636,{"position":[[0,45]]}],[]],["opshin.ledger.api_v2.dcertdelegderegkey.constr_id",[],[1639,{"position":[[0,49]]}],[]],["dcertdelegdeleg",[1641,{"position":[[0,18]]}],[],[]],["opshin.ledger.api_v2.dcertdelegdeleg",[],[1642,{"position":[[0,39]]}],[1775,{"position":[[105,40]]}]],["dcertdelegdelegate(deleg",[],[],[1643,{"position":[[0,29]]}]],["delegate",[1647,{"position":[[0,9]]}],[],[1643,{"position":[[104,10]]}]],["opshin.ledger.api_v2.dcertdelegdelegate.deleg",[],[1645,{"position":[[0,49]]}],[]],["opshin.ledger.api_v2.dcertdelegdelegate.delegate",[],[1648,{"position":[[0,49]]}],[]],["opshin.ledger.api_v2.dcertdelegdelegate.constr_id",[],[1651,{"position":[[0,49]]}],[]],["dcertpoolregist",[1653,{"position":[[0,17]]}],[],[]],["opshin.ledger.api_v2.dcertpoolregist",[],[1654,{"position":[[0,38]]}],[1775,{"position":[[146,39]]}]],["dcertpoolregister(pool_id",[],[],[1655,{"position":[[0,26]]}]],["pool_vfr",[1659,{"position":[[0,8]]}],[],[1655,{"position":[[34,9]]}]],["pool_id",[1656,{"position":[[0,7]]}],[],[]],["opshin.ledger.api_v2.dcertpoolregister.pool_id",[],[1657,{"position":[[0,46]]}],[]],["opshin.ledger.api_v2.dcertpoolregister.pool_vfr",[],[1660,{"position":[[0,47]]}],[]],["opshin.ledger.api_v2.dcertpoolregister.constr_id",[],[1663,{"position":[[0,48]]}],[]],["dcertpoolretir",[1665,{"position":[[0,15]]}],[],[]],["opshin.ledger.api_v2.dcertpoolretir",[],[1666,{"position":[[0,36]]}],[1775,{"position":[[186,37]]}]],["dcertpoolretire(retirement_certif",[],[],[1667,{"position":[[0,39]]}]],["epoch",[1671,{"position":[[0,5]]}],[],[1667,{"position":[[47,6]]}]],["retirement_certif",[1668,{"position":[[0,22]]}],[],[]],["opshin.ledger.api_v2.dcertpoolretire.retirement_certif",[],[1669,{"position":[[0,59]]}],[]],["opshin.ledger.api_v2.dcertpoolretire.epoch",[],[1672,{"position":[[0,42]]}],[]],["opshin.ledger.api_v2.dcertpoolretire.constr_id",[],[1675,{"position":[[0,46]]}],[]],["dcertgenesi",[1677,{"position":[[0,12]]}],[],[1679,{"position":[[0,14]]}]],["opshin.ledger.api_v2.dcertgenesi",[],[1678,{"position":[[0,33]]}],[1775,{"position":[[224,34]]}]],["opshin.ledger.api_v2.dcertgenesis.constr_id",[],[1681,{"position":[[0,43]]}],[]],["dcertmir",[1683,{"position":[[0,8]]}],[],[1685,{"position":[[0,10]]}]],["opshin.ledger.api_v2.dcertmir",[],[1684,{"position":[[0,29]]}],[1775,{"position":[[259,31]]}]],["opshin.ledger.api_v2.dcertmir.constr_id",[],[1687,{"position":[[0,39]]}],[]],["neginfposixtim",[1689,{"position":[[0,15]]}],[],[]],["opshin.ledger.api_v2.neginfposixtim",[],[1690,{"position":[[0,36]]}],[]],["neg",[],[],[1691,{"position":[[0,8]]},1868,{"position":[[31,8]]},4640,{"position":[[39,8]]}]],["infinit",[],[],[1691,{"position":[[9,8]]},1706,{"position":[[0,8]]}]],["posix",[],[],[1691,{"position":[[18,5]]},1697,{"position":[[7,5]]},1706,{"position":[[9,5]]}]],["time",[1698,{"position":[[0,4]]}],[],[1691,{"position":[[24,5]]},1697,{"position":[[13,5]]},1706,{"position":[[15,5]]},1736,{"position":[[0,4]]},1862,{"position":[[41,4],[110,4]]},1865,{"position":[[41,4],[95,4]]},1868,{"position":[[100,4]]}]],["lower",[],[],[1691,{"position":[[64,5]]},1697,{"position":[[52,5]]},1724,{"position":[[0,5]]},2408,{"position":[[1057,6]]},2588,{"position":[[1057,6]]},2747,{"position":[[1057,6]]}]],["bound",[],[],[1691,{"position":[[70,5]]},1697,{"position":[[67,5]]},1706,{"position":[[61,5]]},1712,{"position":[[6,5]]},1724,{"position":[[6,5]]},1862,{"position":[[9,7]]},1865,{"position":[[9,7]]},1868,{"position":[[9,7]]},2357,{"position":[[28,5]]}]],["opshin.ledger.api_v2.neginfposixtime.constr_id",[],[1693,{"position":[[0,46]]}],[]],["finiteposixtim",[1695,{"position":[[0,15]]}],[],[]],["opshin.ledger.api_v2.finiteposixtim",[],[1696,{"position":[[0,36]]}],[]],["finit",[],[],[1697,{"position":[[0,6]]}]],["upper",[],[],[1697,{"position":[[61,5]]},1706,{"position":[[55,5]]},1712,{"position":[[0,5]]},2408,{"position":[[1070,6]]},2588,{"position":[[1070,6]]},2747,{"position":[[1070,6]]}]],["opshin.ledger.api_v2.finiteposixtime.tim",[],[1699,{"position":[[0,41]]}],[]],["opshin.ledger.api_v2.finiteposixtime.constr_id",[],[1702,{"position":[[0,46]]}],[]],["posinfposixtim",[1704,{"position":[[0,15]]}],[],[]],["opshin.ledger.api_v2.posinfposixtim",[],[1705,{"position":[[0,36]]}],[]],["opshin.ledger.api_v2.posinfposixtime.constr_id",[],[1708,{"position":[[0,46]]}],[]],["upperboundposixtim",[1710,{"position":[[0,19]]}],[],[]],["opshin.ledger.api_v2.upperboundposixtim",[],[1711,{"position":[[0,40]]}],[]],["limit",[1713,{"position":[[0,5]]},1725,{"position":[[0,5]]}],[],[]],["opshin.ledger.api_v2.upperboundposixtime.limit",[],[1714,{"position":[[0,46]]}],[]],["close",[1716,{"position":[[0,6]]},1728,{"position":[[0,6]]}],[],[]],["opshin.ledger.api_v2.upperboundposixtime.clos",[],[1717,{"position":[[0,47]]}],[]],["opshin.ledger.api_v2.upperboundposixtime.constr_id",[],[1720,{"position":[[0,50]]}],[]],["lowerboundposixtim",[1722,{"position":[[0,19]]}],[],[]],["opshin.ledger.api_v2.lowerboundposixtim",[],[1723,{"position":[[0,40]]}],[]],["opshin.ledger.api_v2.lowerboundposixtime.limit",[],[1726,{"position":[[0,46]]}],[]],["opshin.ledger.api_v2.lowerboundposixtime.clos",[],[1729,{"position":[[0,47]]}],[]],["opshin.ledger.api_v2.lowerboundposixtime.constr_id",[],[1732,{"position":[[0,50]]}],[]],["posixtimerang",[1734,{"position":[[0,14]]}],[],[]],["opshin.ledger.api_v2.posixtimerang",[],[1735,{"position":[[0,35]]}],[]],["rang",[4746,{"position":[[0,5]]}],[],[1736,{"position":[[5,5]]}]],["lower_bound",[1737,{"position":[[0,11]]}],[],[1862,{"position":[[47,11]]},1865,{"position":[[47,11]]}]],["opshin.ledger.api_v2.posixtimerange.lower_bound",[],[1738,{"position":[[0,47]]}],[]],["upper_bound",[1740,{"position":[[0,11]]}],[],[1862,{"position":[[76,11]]},1868,{"position":[[66,11]]}]],["opshin.ledger.api_v2.posixtimerange.upper_bound",[],[1741,{"position":[[0,47]]}],[]],["opshin.ledger.api_v2.posixtimerange.constr_id",[],[1744,{"position":[[0,45]]}],[]],["opshin.ledger.api_v2.mint",[],[1747,{"position":[[0,28]]}],[]],["be",[],[],[1748,{"position":[[54,5]]},1757,{"position":[[63,5]]}]],["burn",[],[],[1748,{"position":[[70,6]]}]],["policy_id",[1749,{"position":[[0,9]]},4818,{"position":[[0,9]]},4869,{"position":[[0,9]]}],[],[]],["opshin.ledger.api_v2.minting.policy_id",[],[1750,{"position":[[0,38]]}],[]],["opshin.ledger.api_v2.minting.constr_id",[],[1753,{"position":[[0,38]]}],[]],["opshin.ledger.api_v2.spend",[],[1756,{"position":[[0,29]]}],[]],["spent",[],[],[1757,{"position":[[69,6]]},4913,{"position":[[35,5]]}]],["tx_out_ref",[1758,{"position":[[0,10]]}],[],[]],["opshin.ledger.api_v2.spending.tx_out_ref",[],[1759,{"position":[[0,40]]}],[]],["opshin.ledger.api_v2.spending.constr_id",[],[1762,{"position":[[0,39]]}],[]],["opshin.ledger.api_v2.reward",[],[1765,{"position":[[0,30]]}],[]],["rewarding(staking_credenti",[],[],[1766,{"position":[[0,29]]}]],["opshin.ledger.api_v2.rewarding.staking_credenti",[],[1768,{"position":[[0,49]]}],[]],["opshin.ledger.api_v2.rewarding.constr_id",[],[1771,{"position":[[0,40]]}],[]],["certifi",[1773,{"position":[[0,10]]},4770,{"position":[[0,10]]}],[],[]],["opshin.ledger.api_v2.certifi",[],[1774,{"position":[[0,31]]}],[]],["certifying(d_cert",[],[],[1775,{"position":[[0,18]]}]],["union[opshin.ledger.api_v2.dcertdelegregkey",[],[],[1775,{"position":[[19,44]]}]],["d_cert",[1776,{"position":[[0,6]]}],[],[]],["opshin.ledger.api_v2.certifying.d_cert",[],[1777,{"position":[[0,38]]}],[]],["opshin.ledger.api_v2.certifying.constr_id",[],[1780,{"position":[[0,41]]}],[]],["txinfo",[1782,{"position":[[0,6]]}],[],[]],["opshin.ledger.api_v2.txinfo",[],[1783,{"position":[[0,27]]}],[]],["complex",[],[],[1784,{"position":[[2,7]]},4562,{"position":[[21,7]]}]],["agglomer",[],[],[1784,{"position":[[10,13]]}]],["everyth",[],[],[1784,{"position":[[27,10]]},2297,{"position":[[55,10]]}]],["interest",[],[],[1784,{"position":[[55,8]]}]],["regard",[],[],[1784,{"position":[[88,9]]}]],["input",[1785,{"position":[[0,6]]}],[],[4913,{"position":[[55,6]]}]],["opshin.ledger.api_v2.txinfo.input",[],[1786,{"position":[[0,34]]}],[]],["reference_input",[1788,{"position":[[0,16]]}],[],[]],["opshin.ledger.api_v2.txinfo.reference_input",[],[1789,{"position":[[0,44]]}],[]],["opshin.ledger.api_v2.txinfo.output",[],[1792,{"position":[[0,35]]}],[]],["fee",[1794,{"position":[[0,3]]}],[],[]],["opshin.ledger.api_v2.txinfo.fe",[],[1795,{"position":[[0,31]]}],[]],["opshin.ledger.api_v2.txinfo.mint",[],[1798,{"position":[[0,32]]}],[]],["dcert",[1800,{"position":[[0,5]]}],[],[]],["opshin.ledger.api_v2.txinfo.dcert",[],[1801,{"position":[[0,33]]}],[]],["wdrl",[1803,{"position":[[0,4]]}],[],[]],["opshin.ledger.api_v2.txinfo.wdrl",[],[1804,{"position":[[0,32]]}],[]],["valid_rang",[1806,{"position":[[0,11]]}],[],[]],["opshin.ledger.api_v2.txinfo.valid_rang",[],[1807,{"position":[[0,39]]}],[]],["signatori",[1809,{"position":[[0,11]]}],[],[]],["opshin.ledger.api_v2.txinfo.signatori",[],[1810,{"position":[[0,39]]}],[]],["redeem",[1812,{"position":[[0,9]]}],[],[]],["opshin.ledger.api_v2.txinfo.redeem",[],[1813,{"position":[[0,37]]}],[]],["opshin.ledger.api_v2.txinfo.data",[],[1816,{"position":[[0,32]]}],[]],["opshin.ledger.api_v2.txinfo.id",[],[1819,{"position":[[0,30]]}],[]],["opshin.ledger.api_v2.txinfo.constr_id",[],[1822,{"position":[[0,37]]}],[]],["opshin.ledger.api_v2.scriptcontext",[],[1825,{"position":[[0,34]]}],[]],["auxiliari",[],[],[1826,{"position":[[0,9]]}]],["reason",[],[],[1826,{"position":[[48,6]]}]],["invoc",[],[],[1826,{"position":[[59,10]]}]],["tx_info",[1827,{"position":[[0,7]]}],[],[]],["opshin.ledger.api_v2.scriptcontext.tx_info",[],[1828,{"position":[[0,42]]}],[]],["opshin.ledger.api_v2.scriptcontext.purpos",[],[1831,{"position":[[0,42]]}],[]],["opshin.ledger.api_v2.scriptcontext.constr_id",[],[1834,{"position":[[0,44]]}],[]],["interv",[1836,{"position":[[0,8]]}],[],[1838,{"position":[[25,8]]},1859,{"position":[[20,8]]},1862,{"position":[[17,8]]},1865,{"position":[[17,8]]},1868,{"position":[[17,8]]}]],["opshin.ledger.interv",[],[1837,{"position":[[0,22]]}],[]],["assist",[],[],[1838,{"position":[[13,6]]}]],["handl",[],[],[1838,{"position":[[34,8]]}]],["opshin.ledger.interval.compar",[],[1840,{"position":[[0,30]]}],[]],["compare_extended_help",[1842,{"position":[[0,23]]}],[],[]],["opshin.ledger.interval.compare_extended_help",[],[1843,{"position":[[0,46]]}],[]],["compare_extend",[1845,{"position":[[0,16]]}],[],[]],["opshin.ledger.interval.compare_extend",[],[1846,{"position":[[0,39]]}],[]],["get_bool",[1848,{"position":[[0,8]]}],[],[]],["opshin.ledger.interval.get_bool",[],[1849,{"position":[[0,31]]}],[]],["compare_upper_bound",[1851,{"position":[[0,19]]}],[],[]],["opshin.ledger.interval.compare_upper_bound",[],[1852,{"position":[[0,42]]}],[]],["compare_lower_bound",[1854,{"position":[[0,19]]}],[],[]],["opshin.ledger.interval.compare_lower_bound",[],[1855,{"position":[[0,42]]}],[]],["opshin.ledger.interval.contain",[],[1858,{"position":[[0,31]]}],[]],["b",[2922,{"position":[[0,1]]}],[],[1859,{"position":[[30,1]]},4583,{"position":[[12,1]]},4589,{"position":[[12,1]]},4592,{"position":[[11,1]]},4595,{"position":[[12,1]]},4601,{"position":[[13,1]]},4604,{"position":[[13,1]]},4607,{"position":[[11,1]]},4610,{"position":[[12,1]]},4613,{"position":[[12,1]]},4637,{"position":[[21,1]]},4640,{"position":[[21,1]]}]],["make_rang",[1860,{"position":[[0,10]]}],[],[]],["opshin.ledger.interval.make_rang",[],[1861,{"position":[[0,33]]}],[]],["includ",[],[],[1862,{"position":[[90,9]]},1865,{"position":[[75,9]]},1868,{"position":[[80,9]]},2765,{"position":[[1175,10]]},2873,{"position":[[1175,10]]},2936,{"position":[[1175,10]]},3602,{"position":[[1175,10]]},3908,{"position":[[1175,10]]},4121,{"position":[[1175,10]]}]],["make_from",[1863,{"position":[[0,9]]}],[],[]],["opshin.ledger.interval.make_from",[],[1864,{"position":[[0,32]]}],[]],["infin",[],[],[1865,{"position":[[65,9]]},1868,{"position":[[40,8]]},4637,{"position":[[48,8]]},4640,{"position":[[48,8]]}]],["make_to",[1866,{"position":[[0,7]]}],[],[]],["opshin.ledger.interval.make_to",[],[1867,{"position":[[0,30]]}],[]],["opshin.compil",[],[1870,{"position":[[0,15]]}],[]],["rec_constant_map_data",[1872,{"position":[[0,21]]}],[],[]],["opshin.compiler.rec_constant_map_data",[],[1873,{"position":[[0,37]]}],[]],["rec_constant_map",[1875,{"position":[[0,16]]}],[],[]],["opshin.compiler.rec_constant_map",[],[1876,{"position":[[0,32]]}],[]],["wrap_validator_double_funct",[1878,{"position":[[0,30]]}],[],[]],["opshin.compiler.wrap_validator_double_funct",[],[1879,{"position":[[0,46]]}],[]],["wrap",[],[],[1880,{"position":[[0,5]]}]],["enabl",[],[],[1880,{"position":[[32,6]]}]],["doubl",[],[],[1880,{"position":[[41,6]]}]],["pass_through",[],[],[1880,{"position":[[75,12]]}]],["normal",[],[],[1880,{"position":[[124,8]]},4568,{"position":[[170,9]]}]],["plutocompil",[1881,{"position":[[0,13]]}],[],[]],["opshin.compiler.plutocompil",[],[1882,{"position":[[0,29]]}],[]],["typedast",[2400,{"position":[[0,8]]}],[],[1883,{"position":[[10,8]]}]],["uplc/pluto",[],[],[1883,{"position":[[31,10]]}]],["opshin.compiler.plutocompiler.step",[],[1885,{"position":[[0,34]]}],[]],["visit_sequ",[1887,{"position":[[0,14]]},4281,{"position":[[0,14]]},4443,{"position":[[0,14]]}],[],[]],["opshin.compiler.plutocompiler.visit_sequ",[],[1888,{"position":[[0,44]]}],[]],["visit_binop",[1890,{"position":[[0,11]]},4341,{"position":[[0,11]]}],[],[]],["opshin.compiler.plutocompiler.visit_binop",[],[1891,{"position":[[0,41]]}],[]],["opshin.compiler.plutocompiler.visit_boolop",[],[1894,{"position":[[0,42]]}],[]],["visit_unaryop",[1896,{"position":[[0,13]]},4245,{"position":[[0,13]]},4347,{"position":[[0,13]]}],[],[]],["opshin.compiler.plutocompiler.visit_unaryop",[],[1897,{"position":[[0,43]]}],[]],["opshin.compiler.plutocompiler.visit_compar",[],[1900,{"position":[[0,43]]}],[]],["opshin.compiler.plutocompiler.visit_modul",[],[1903,{"position":[[0,42]]}],[]],["opshin.compiler.plutocompiler.visit_const",[],[1906,{"position":[[0,44]]}],[]],["opshin.compiler.plutocompiler.visit_nonetyp",[],[1909,{"position":[[0,44]]}],[]],["opshin.compiler.plutocompiler.visit_assign",[],[1912,{"position":[[0,42]]}],[]],["opshin.compiler.plutocompiler.visit_annassign",[],[1915,{"position":[[0,45]]}],[]],["opshin.compiler.plutocompiler.visit_nam",[],[1918,{"position":[[0,40]]}],[]],["visit_expr",[1920,{"position":[[0,10]]},2019,{"position":[[0,10]]},4338,{"position":[[0,10]]},4428,{"position":[[0,10]]}],[],[]],["opshin.compiler.plutocompiler.visit_expr",[],[1921,{"position":[[0,40]]}],[]],["visit_cal",[1923,{"position":[[0,10]]},4239,{"position":[[0,10]]},4353,{"position":[[0,10]]}],[],[]],["opshin.compiler.plutocompiler.visit_cal",[],[1924,{"position":[[0,40]]}],[]],["opshin.compiler.plutocompiler.visit_functiondef",[],[1927,{"position":[[0,47]]}],[]],["opshin.compiler.plutocompiler.visit_whil",[],[1930,{"position":[[0,41]]}],[]],["opshin.compiler.plutocompiler.visit_for",[],[1933,{"position":[[0,39]]}],[]],["opshin.compiler.plutocompiler.visit_if",[],[1936,{"position":[[0,38]]}],[]],["opshin.compiler.plutocompiler.visit_return",[],[1939,{"position":[[0,42]]}],[]],["visit_pass",[1941,{"position":[[0,10]]},2004,{"position":[[0,10]]},4356,{"position":[[0,10]]},4422,{"position":[[0,10]]}],[],[]],["opshin.compiler.plutocompiler.visit_pass",[],[1942,{"position":[[0,40]]}],[]],["visit_subscript",[1944,{"position":[[0,15]]},4350,{"position":[[0,15]]}],[],[]],["opshin.compiler.plutocompiler.visit_subscript",[],[1945,{"position":[[0,45]]}],[]],["visit_tupl",[1947,{"position":[[0,11]]},4293,{"position":[[0,11]]}],[],[]],["opshin.compiler.plutocompiler.visit_tupl",[],[1948,{"position":[[0,41]]}],[]],["opshin.compiler.plutocompiler.visit_classdef",[],[1951,{"position":[[0,44]]}],[]],["visit_attribut",[1953,{"position":[[0,15]]},4362,{"position":[[0,15]]}],[],[]],["opshin.compiler.plutocompiler.visit_attribut",[],[1954,{"position":[[0,45]]}],[]],["opshin.compiler.plutocompiler.visit_assert",[],[1957,{"position":[[0,42]]}],[]],["visit_rawplutoexpr",[1959,{"position":[[0,18]]},2061,{"position":[[0,18]]},4368,{"position":[[0,18]]}],[],[]],["opshin.compiler.plutocompiler.visit_rawplutoexpr",[],[1960,{"position":[[0,48]]}],[]],["opshin.compiler.plutocompiler.visit_list",[],[1963,{"position":[[0,40]]}],[]],["opshin.compiler.plutocompiler.visit_dict",[],[1966,{"position":[[0,40]]}],[]],["opshin.compiler.plutocompiler.visit_ifexp",[],[1969,{"position":[[0,41]]}],[]],["visit_listcomp",[1971,{"position":[[0,14]]},4377,{"position":[[0,14]]}],[],[]],["opshin.compiler.plutocompiler.visit_listcomp",[],[1972,{"position":[[0,44]]}],[]],["visit_dictcomp",[1974,{"position":[[0,14]]},4380,{"position":[[0,14]]}],[],[]],["opshin.compiler.plutocompiler.visit_dictcomp",[],[1975,{"position":[[0,44]]}],[]],["visit_formattedvalu",[1977,{"position":[[0,20]]},4383,{"position":[[0,20]]}],[],[]],["opshin.compiler.plutocompiler.visit_formattedvalu",[],[1978,{"position":[[0,50]]}],[]],["visit_joinedstr",[1980,{"position":[[0,15]]},4386,{"position":[[0,15]]}],[],[]],["opshin.compiler.plutocompiler.visit_joinedstr",[],[1981,{"position":[[0,45]]}],[]],["opshin.compiler.plutocompiler.generic_visit",[],[1984,{"position":[[0,43]]}],[]],["explicit",[],[],[1985,{"position":[[13,8]]},2054,{"position":[[13,8]]},2225,{"position":[[13,8]]},2765,{"position":[[1273,8]]},2873,{"position":[[1273,8]]},2936,{"position":[[1273,8]]},3602,{"position":[[1273,8]]},3908,{"position":[[1273,8]]},4121,{"position":[[1273,8]]},4238,{"position":[[13,8]]},4394,{"position":[[13,8]]},4433,{"position":[[13,8]]}]],["opshin.compiler.plutocompiler.visit",[],[1987,{"position":[[0,35]]}],[]],["opshin.compiler.compil",[],[1990,{"position":[[0,23]]}],[]],["opshin.optim",[],[1993,{"position":[[0,15]]}],[]],["optimize_remove_pass",[1995,{"position":[[0,20]]}],[],[]],["opshin.optimize.optimize_remove_pass",[],[1996,{"position":[[0,36]]}],[]],["optimizeremovepass",[1998,{"position":[[0,18]]}],[],[]],["opshin.optimize.optimize_remove_pass.optimizeremovepass",[],[1999,{"position":[[0,55]]}],[]],["opshin.optimize.optimize_remove_pass.optimizeremovepass.step",[],[2002,{"position":[[0,60]]}],[]],["opshin.optimize.optimize_remove_pass.optimizeremovepass.visit_pass",[],[2005,{"position":[[0,66]]}],[]],["opshin.optimize.optimize_remove_pass.optimizeremovepass.visit",[],[2008,{"position":[[0,61]]}],[]],["optimize_remove_com",[2010,{"position":[[0,24]]}],[],[]],["opshin.optimize.optimize_remove_com",[],[2011,{"position":[[0,40]]}],[]],["optimizeremovedeadconst",[2013,{"position":[[0,27]]}],[],[]],["opshin.optimize.optimize_remove_comments.optimizeremovedeadconst",[],[2014,{"position":[[0,68]]}],[]],["opshin.optimize.optimize_remove_comments.optimizeremovedeadconstants.step",[],[2017,{"position":[[0,73]]}],[]],["opshin.optimize.optimize_remove_comments.optimizeremovedeadconstants.visit_expr",[],[2020,{"position":[[0,79]]}],[]],["opshin.optimize.optimize_remove_comments.optimizeremovedeadconstants.visit",[],[2023,{"position":[[0,74]]}],[]],["optimize_remove_deadvar",[2025,{"position":[[0,24]]}],[],[]],["opshin.optimize.optimize_remove_deadvar",[],[2026,{"position":[[0,40]]}],[]],["nameloadcollector",[2028,{"position":[[0,17]]}],[],[]],["opshin.optimize.optimize_remove_deadvars.nameloadcollector",[],[2029,{"position":[[0,58]]}],[]],["opshin.optimize.optimize_remove_deadvars.nameloadcollector.step",[],[2032,{"position":[[0,63]]}],[]],["opshin.optimize.optimize_remove_deadvars.nameloadcollector.visit_nam",[],[2035,{"position":[[0,69]]}],[]],["opshin.optimize.optimize_remove_deadvars.nameloadcollector.visit_classdef",[],[2038,{"position":[[0,73]]}],[]],["opshin.optimize.optimize_remove_deadvars.nameloadcollector.visit_functiondef",[],[2041,{"position":[[0,76]]}],[]],["opshin.optimize.optimize_remove_deadvars.nameloadcollector.visit",[],[2044,{"position":[[0,64]]}],[]],["safeoperationvisitor",[2046,{"position":[[0,20]]}],[],[]],["opshin.optimize.optimize_remove_deadvars.safeoperationvisitor",[],[2047,{"position":[[0,61]]}],[]],["opshin.optimize.optimize_remove_deadvars.safeoperationvisitor.step",[],[2050,{"position":[[0,66]]}],[]],["opshin.optimize.optimize_remove_deadvars.safeoperationvisitor.generic_visit",[],[2053,{"position":[[0,75]]}],[]],["visit_lambda",[2055,{"position":[[0,12]]}],[],[]],["opshin.optimize.optimize_remove_deadvars.safeoperationvisitor.visit_lambda",[],[2056,{"position":[[0,74]]}],[]],["opshin.optimize.optimize_remove_deadvars.safeoperationvisitor.visit_const",[],[2059,{"position":[[0,76]]}],[]],["opshin.optimize.optimize_remove_deadvars.safeoperationvisitor.visit_rawplutoexpr",[],[2062,{"position":[[0,80]]}],[]],["opshin.optimize.optimize_remove_deadvars.safeoperationvisitor.visit_nam",[],[2065,{"position":[[0,72]]}],[]],["opshin.optimize.optimize_remove_deadvars.safeoperationvisitor.visit",[],[2068,{"position":[[0,67]]}],[]],["optimizeremovedeadvar",[2070,{"position":[[0,22]]}],[],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvar",[],[2071,{"position":[[0,63]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.step",[],[2074,{"position":[[0,68]]}],[]],["loaded_var",[2076,{"position":[[0,11]]}],[],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.loaded_var",[],[2077,{"position":[[0,75]]}],[]],["guaranteed_avail_nam",[2079,{"position":[[0,22]]}],[],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.guaranteed_avail_nam",[],[2080,{"position":[[0,86]]}],[]],["guarante",[2082,{"position":[[0,10]]}],[],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.guarante",[],[2083,{"position":[[0,74]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.enter_scop",[],[2086,{"position":[[0,75]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.exit_scop",[],[2089,{"position":[[0,74]]}],[]],["set_guarante",[2091,{"position":[[0,14]]}],[],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.set_guarante",[],[2092,{"position":[[0,78]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.visit_modul",[],[2095,{"position":[[0,76]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.visit_if",[],[2098,{"position":[[0,72]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.visit_whil",[],[2101,{"position":[[0,75]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.visit_for",[],[2104,{"position":[[0,73]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.visit_assign",[],[2107,{"position":[[0,76]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.visit_annassign",[],[2110,{"position":[[0,79]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.visit_classdef",[],[2113,{"position":[[0,78]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.visit_functiondef",[],[2116,{"position":[[0,81]]}],[]],["opshin.optimize.optimize_remove_deadvars.optimizeremovedeadvars.visit",[],[2119,{"position":[[0,69]]}],[]],["optimize_const_fold",[2121,{"position":[[0,22]]}],[],[]],["opshin.optimize.optimize_const_fold",[],[2122,{"position":[[0,38]]}],[]],["opshin.optimize.optimize_const_folding.shallownamedefcollector",[],[2125,{"position":[[0,62]]}],[]],["opshin.optimize.optimize_const_folding.shallownamedefcollector.step",[],[2128,{"position":[[0,67]]}],[]],["opshin.optimize.optimize_const_folding.shallownamedefcollector.visit_nam",[],[2131,{"position":[[0,73]]}],[]],["opshin.optimize.optimize_const_folding.shallownamedefcollector.visit_classdef",[],[2134,{"position":[[0,77]]}],[]],["opshin.optimize.optimize_const_folding.shallownamedefcollector.visit_functiondef",[],[2137,{"position":[[0,80]]}],[]],["opshin.optimize.optimize_const_folding.shallownamedefcollector.visit",[],[2140,{"position":[[0,68]]}],[]],["definedtimesvisitor",[2142,{"position":[[0,19]]}],[],[]],["opshin.optimize.optimize_const_folding.definedtimesvisitor",[],[2143,{"position":[[0,58]]}],[]],["opshin.optimize.optimize_const_folding.definedtimesvisitor.step",[],[2146,{"position":[[0,63]]}],[]],["opshin.optimize.optimize_const_folding.definedtimesvisitor.visit_for",[],[2149,{"position":[[0,68]]}],[]],["opshin.optimize.optimize_const_folding.definedtimesvisitor.visit_whil",[],[2152,{"position":[[0,70]]}],[]],["opshin.optimize.optimize_const_folding.definedtimesvisitor.visit_if",[],[2155,{"position":[[0,67]]}],[]],["opshin.optimize.optimize_const_folding.definedtimesvisitor.visit_nam",[],[2158,{"position":[[0,69]]}],[]],["opshin.optimize.optimize_const_folding.definedtimesvisitor.visit_classdef",[],[2161,{"position":[[0,73]]}],[]],["opshin.optimize.optimize_const_folding.definedtimesvisitor.visit_functiondef",[],[2164,{"position":[[0,76]]}],[]],["visit_import",[2166,{"position":[[0,12]]},2214,{"position":[[0,12]]}],[],[]],["opshin.optimize.optimize_const_folding.definedtimesvisitor.visit_import",[],[2167,{"position":[[0,71]]}],[]],["opshin.optimize.optimize_const_folding.definedtimesvisitor.visit_importfrom",[],[2170,{"position":[[0,75]]}],[]],["opshin.optimize.optimize_const_folding.definedtimesvisitor.visit",[],[2173,{"position":[[0,64]]}],[]],["optimizeconstantfold",[2175,{"position":[[0,23]]}],[],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfold",[],[2176,{"position":[[0,62]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.step",[],[2179,{"position":[[0,67]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.enter_scop",[],[2182,{"position":[[0,74]]}],[]],["add_var_vis",[2184,{"position":[[0,15]]}],[],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.add_var_vis",[],[2185,{"position":[[0,78]]}],[]],["add_vars_vis",[2187,{"position":[[0,16]]}],[],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.add_vars_vis",[],[2188,{"position":[[0,79]]}],[]],["add_const",[2190,{"position":[[0,12]]}],[],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.add_const",[],[2191,{"position":[[0,75]]}],[]],["visible_var",[2193,{"position":[[0,12]]}],[],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.visible_var",[],[2194,{"position":[[0,75]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.exit_scop",[],[2197,{"position":[[0,73]]}],[]],["update_const",[2199,{"position":[[0,16]]}],[],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.update_const",[],[2200,{"position":[[0,79]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.visit_modul",[],[2203,{"position":[[0,75]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.visit_functiondef",[],[2206,{"position":[[0,80]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.visit_classdef",[],[2209,{"position":[[0,77]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.visit_importfrom",[],[2212,{"position":[[0,79]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.visit_import",[],[2215,{"position":[[0,75]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.visit_assign",[],[2218,{"position":[[0,75]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.visit_annassign",[],[2221,{"position":[[0,78]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.generic_visit",[],[2224,{"position":[[0,76]]}],[]],["opshin.optimize.optimize_const_folding.optimizeconstantfolding.visit",[],[2227,{"position":[[0,68]]}],[]],["util",[2229,{"position":[[0,4]]},3882,{"position":[[0,5]]}],[],[4442,{"position":[[0,7]]}]],["opshin.util",[],[2230,{"position":[[0,11]]}],[]],["filecontextfilt",[2232,{"position":[[0,17]]}],[],[]],["opshin.util.filecontextfilt",[],[2233,{"position":[[0,29]]}],[]],["filter",[2241,{"position":[[0,6]]}],[],[2234,{"position":[[10,6],[228,7],[351,7]]}]],["inject",[],[],[2234,{"position":[[23,7]]}]],["contextu",[],[],[2234,{"position":[[31,10]]}]],["log",[],[],[2234,{"position":[[63,4]]},2243,{"position":[[43,7],[88,7]]}]],["current",[],[],[2234,{"position":[[97,9]]}]],["inspect",[],[],[2234,{"position":[[107,9]]}]],["updat",[],[],[2234,{"position":[[155,7]]}]],["insid",[],[],[2234,{"position":[[163,6]]}]],["initi",[],[],[2234,{"position":[[215,10],[236,10]]}]],["logger",[],[],[2234,{"position":[[268,6]]}]],["togeth",[],[],[2234,{"position":[[282,8]]}]],["children",[],[],[2234,{"position":[[300,9]]}]],["event",[],[],[2234,{"position":[[324,6],[396,6]]}]],["specifi",[],[],[2234,{"position":[[373,10]]},2243,{"position":[[17,9]]},2765,{"position":[[262,7],[1641,9]]},2873,{"position":[[262,7],[1641,9]]},2936,{"position":[[262,7],[1641,9]]},3602,{"position":[[262,7],[1641,9]]},3908,{"position":[[262,7],[1641,9]]},4121,{"position":[[262,7],[1641,9]]},4676,{"position":[[177,9]]},4886,{"position":[[27,9]]},4889,{"position":[[27,9],[84,9]]},4892,{"position":[[27,9]]}]],["file_nam",[2235,{"position":[[0,9]]}],[],[]],["opshin.util.filecontextfilter.file_nam",[],[2236,{"position":[[0,39]]}],[]],["opshin.util.filecontextfilter.nod",[],[2239,{"position":[[0,34]]}],[]],["opshin.util.filecontextfilter.filt",[],[2242,{"position":[[0,36]]}],[]],["determin",[],[],[2243,{"position":[[0,9]]},2765,{"position":[[951,10],[1142,10]]},2873,{"position":[[951,10],[1142,10]]},2936,{"position":[[951,10],[1142,10]]},3602,{"position":[[951,10],[1142,10]]},3908,{"position":[[951,10],[1142,10]]},4121,{"position":[[951,10],[1142,10]]}]],["deem",[],[],[2243,{"position":[[119,6]]},2765,{"position":[[1081,6]]},2873,{"position":[[1081,6]]},2936,{"position":[[1081,6]]},3602,{"position":[[1081,6]]},3908,{"position":[[1081,6]]},4121,{"position":[[1081,6]]}]],["appropri",[],[],[2243,{"position":[[126,12]]}]],["modifi",[],[],[2243,{"position":[[157,8]]}]],["distinct",[2244,{"position":[[0,8]]}],[],[2246,{"position":[[38,8]]}]],["opshin.util.distinct",[],[2245,{"position":[[0,20]]}],[]],["iff",[],[],[2246,{"position":[[13,3]]}]],["typednodetransform",[2247,{"position":[[0,20]]}],[],[]],["opshin.util.typednodetransform",[],[2248,{"position":[[0,32]]}],[]],["opshin.util.typednodetransformer.visit",[],[2251,{"position":[[0,38]]}],[]],["typednodevisitor",[2253,{"position":[[0,16]]}],[],[]],["opshin.util.typednodevisitor",[],[2254,{"position":[[0,28]]}],[]],["opshin.util.typednodevisitor.visit",[],[2257,{"position":[[0,34]]}],[]],["compilererror",[2259,{"position":[[0,13]]}],[],[]],["opshin.util.compilererror",[],[2260,{"position":[[0,25]]}],[]],["exit",[],[],[2261,{"position":[[30,4]]}]],["compilingnodetransform",[2262,{"position":[[0,24]]}],[],[]],["opshin.util.compilingnodetransform",[],[2263,{"position":[[0,36]]}],[]],["opshin.util.compilingnodetransformer.step",[],[2266,{"position":[[0,41]]}],[]],["opshin.util.compilingnodetransformer.visit",[],[2269,{"position":[[0,42]]}],[]],["noop",[2271,{"position":[[0,4]]}],[],[]],["opshin.util.noop",[],[2272,{"position":[[0,16]]}],[]],["variat",[],[],[2273,{"position":[[2,9]]}]],["perform",[],[],[2273,{"position":[[51,8]]}]],["opshin.util.noop.visit",[],[2275,{"position":[[0,22]]}],[]],["compilingnodevisitor",[2277,{"position":[[0,20]]}],[],[]],["opshin.util.compilingnodevisitor",[],[2278,{"position":[[0,32]]}],[]],["opshin.util.compilingnodevisitor.step",[],[2281,{"position":[[0,37]]}],[]],["opshin.util.compilingnodevisitor.visit",[],[2284,{"position":[[0,38]]}],[]],["data_from_json",[2286,{"position":[[0,14]]}],[],[]],["opshin.util.data_from_json",[],[2287,{"position":[[0,26]]}],[]],["datum_to_cbor",[2289,{"position":[[0,13]]}],[],[]],["opshin.util.datum_to_cbor",[],[2290,{"position":[[0,25]]}],[]],["datum_to_json",[2292,{"position":[[0,13]]}],[],[]],["opshin.util.datum_to_json",[],[2293,{"position":[[0,25]]}],[]],["custom_fix_missing_loc",[2295,{"position":[[0,28]]}],[],[]],["opshin.util.custom_fix_missing_loc",[],[2296,{"position":[[0,40]]}],[]],["work",[],[],[2297,{"position":[[0,5]]},4220,{"position":[[42,4]]}]],["ast.fix_missing_loc",[],[],[2297,{"position":[[11,24]]}]],["forc",[],[],[2297,{"position":[[40,6]]}]],["onto",[],[],[2297,{"position":[[50,4]]}]],["make_pattern",[2298,{"position":[[0,12]]}],[],[]],["opshin.util.make_pattern",[],[2299,{"position":[[0,24]]}],[]],["share",[],[],[2300,{"position":[[10,6]]}]],["pattern",[2301,{"position":[[0,10]]}],[],[2300,{"position":[[17,7]]}]],["cach",[],[],[2300,{"position":[[48,6]]}]],["re",[],[],[2300,{"position":[[69,2]]}]],["subsequ",[],[],[2300,{"position":[[80,10]]}]],["opshin.util.pattern",[],[2302,{"position":[[0,22]]}],[]],["force_param",[2304,{"position":[[0,12]]}],[],[]],["opshin.util.force_param",[],[2305,{"position":[[0,24]]}],[]],["namewritecollector",[2307,{"position":[[0,18]]}],[],[]],["opshin.util.namewritecollector",[],[2308,{"position":[[0,30]]}],[]],["opshin.util.namewritecollector.step",[],[2311,{"position":[[0,35]]}],[]],["opshin.util.namewritecollector.visit_nam",[],[2314,{"position":[[0,41]]}],[]],["opshin.util.namewritecollector.visit_classdef",[],[2317,{"position":[[0,45]]}],[]],["opshin.util.namewritecollector.visit_functiondef",[],[2320,{"position":[[0,48]]}],[]],["opshin.util.namewritecollector.visit",[],[2323,{"position":[[0,36]]}],[]],["written_var",[2325,{"position":[[0,12]]}],[],[]],["opshin.util.written_var",[],[2326,{"position":[[0,24]]}],[]],["namereadcollector",[2328,{"position":[[0,17]]}],[],[]],["opshin.util.namereadcollector",[],[2329,{"position":[[0,29]]}],[]],["opshin.util.namereadcollector.step",[],[2332,{"position":[[0,34]]}],[]],["opshin.util.namereadcollector.visit_annassign",[],[2335,{"position":[[0,45]]}],[]],["opshin.util.namereadcollector.visit_functiondef",[],[2338,{"position":[[0,47]]}],[]],["opshin.util.namereadcollector.visit_nam",[],[2341,{"position":[[0,40]]}],[]],["opshin.util.namereadcollector.visit_classdef",[],[2344,{"position":[[0,44]]}],[]],["opshin.util.namereadcollector.visit",[],[2347,{"position":[[0,35]]}],[]],["read_var",[2349,{"position":[[0,9]]}],[],[]],["opshin.util.read_var",[],[2350,{"position":[[0,21]]}],[]],["read",[],[],[2351,{"position":[[27,4]]}]],["all_var",[2352,{"position":[[0,8]]}],[],[]],["opshin.util.all_var",[],[2353,{"position":[[0,20]]}],[]],["externally_bound_var",[2355,{"position":[[0,21]]}],[],[]],["opshin.util.externally_bound_var",[],[2356,{"position":[[0,33]]}],[]],["superset",[],[],[2357,{"position":[[2,8]]}]],["outer",[],[],[2357,{"position":[[42,5]]}]],["opshin_name_scheme_compatible_varnam",[2358,{"position":[[0,37]]}],[],[]],["opshin.util.opshin_name_scheme_compatible_varnam",[],[2359,{"position":[[0,49]]}],[]],["ovar",[2361,{"position":[[0,4]]}],[],[]],["opshin.util.ovar",[],[2362,{"position":[[0,16]]}],[]],["olambda",[2364,{"position":[[0,7]]}],[],[]],["opshin.util.olambda",[],[2365,{"position":[[0,19]]}],[]],["olet",[2367,{"position":[[0,4]]}],[],[]],["opshin.util.olet",[],[2368,{"position":[[0,16]]}],[]],["safelambda",[2370,{"position":[[0,10]]}],[],[]],["opshin.util.safelambda",[],[2371,{"position":[[0,22]]}],[]],["safeolambda",[2373,{"position":[[0,11]]}],[],[]],["opshin.util.safeolambda",[],[2374,{"position":[[0,23]]}],[]],["safeappli",[2376,{"position":[[0,9]]}],[],[]],["opshin.util.safeappli",[],[2377,{"position":[[0,21]]}],[]],["compiler_config",[2379,{"position":[[0,15]]}],[],[]],["opshin.compiler_config",[],[2380,{"position":[[0,22]]}],[]],["compilationconfig",[2382,{"position":[[0,17]]}],[],[]],["opshin.compiler_config.compilationconfig",[],[2383,{"position":[[0,40]]}],[]],["compilationconfig(compress_pattern",[],[],[2384,{"position":[[0,36]]}]],["optional[bool",[],[],[2384,{"position":[[37,14],[87,14],[138,14],[179,14],[229,14],[272,14],[313,14]]}]],["iterative_unfold_pattern",[],[],[2384,{"position":[[60,26]]}]],["constant_index_access_list",[],[],[2384,{"position":[[110,27]]}]],["constant_fold",[2385,{"position":[[0,16]]}],[],[2384,{"position":[[161,17]]}]],["allow_isinstance_anyth",[2388,{"position":[[0,25]]}],[],[2384,{"position":[[202,26]]}]],["force_three_param",[2391,{"position":[[0,18]]}],[],[2384,{"position":[[252,19]]}]],["remove_dead_cod",[2394,{"position":[[0,16]]}],[],[2384,{"position":[[295,17]]}]],["opshin.compiler_config.compilationconfig.constant_fold",[],[2386,{"position":[[0,57]]}],[]],["opshin.compiler_config.compilationconfig.allow_isinstance_anyth",[],[2389,{"position":[[0,66]]}],[]],["opshin.compiler_config.compilationconfig.force_three_param",[],[2392,{"position":[[0,59]]}],[]],["opshin.compiler_config.compilationconfig.remove_dead_cod",[],[2395,{"position":[[0,57]]}],[]],["typed_ast",[2397,{"position":[[0,9]]},4434,{"position":[[0,9]]}],[],[]],["opshin.typed_ast",[],[2398,{"position":[[0,16]]}],[]],["opshin.typed_ast.typedast",[],[2401,{"position":[[0,25]]}],[]],["opshin.typed_ast.typedast.typ",[],[2404,{"position":[[0,29]]}],[]],["typedexpr",[2406,{"position":[[0,9]]},2493,{"position":[[0,9]]}],[],[]],["opshin.typed_ast.typedexpr",[],[2407,{"position":[[0,26]]},2494,{"position":[[0,26]]}],[]],["expr",[2751,{"position":[[0,4]]}],[],[2408,{"position":[[0,4],[25,4],[63,4],[107,4],[141,4],[180,4],[210,4],[221,4],[252,4],[396,4],[582,4],[618,4],[692,5],[860,4],[1064,5],[1077,5]]},2414,{"position":[[63,4],[84,5],[184,4],[205,5],[270,4],[311,4],[400,4],[472,4],[509,4],[526,5],[570,4],[651,4],[967,5],[1144,5]]},2420,{"position":[[20,5]]},2423,{"position":[[66,4],[96,4]]},2444,{"position":[[63,4],[84,5],[184,4],[205,5],[270,4],[311,4],[400,4],[472,4],[509,4],[526,5],[570,4],[651,4],[967,5],[1144,5]]},2450,{"position":[[56,4],[77,5]]},2477,{"position":[[63,4],[84,5],[184,4],[205,5],[270,4],[311,4],[400,4],[472,4],[509,4],[526,5],[570,4],[651,4],[967,5],[1144,5]]},2483,{"position":[[16,4]]},2501,{"position":[[21,4]]},2510,{"position":[[26,4],[67,4]]},2516,{"position":[[23,4],[40,5]]},2540,{"position":[[17,4]]},2564,{"position":[[25,4]]},2588,{"position":[[0,4],[25,4],[63,4],[107,4],[141,4],[180,4],[210,4],[221,4],[252,4],[396,4],[582,4],[618,4],[692,5],[860,4],[1064,5],[1077,5]]},2615,{"position":[[19,4]]},2630,{"position":[[43,5]]},2654,{"position":[[16,4]]},2660,{"position":[[63,4],[84,5],[184,4],[205,5],[270,4],[311,4],[400,4],[472,4],[509,4],[526,5],[570,4],[651,4],[967,5],[1144,5]]},2672,{"position":[[30,4]]},2687,{"position":[[30,4]]},2699,{"position":[[18,4]]},2708,{"position":[[20,4]]},2717,{"position":[[22,4]]},2738,{"position":[[18,5]]},2747,{"position":[[0,4],[25,4],[63,4],[107,4],[141,4],[180,4],[210,4],[221,4],[252,4],[396,4],[582,4],[618,4],[692,5],[860,4],[1064,5],[1077,5]]}]],["boolop(boolop",[],[],[2408,{"position":[[7,13]]},2588,{"position":[[7,13]]},2699,{"position":[[0,13]]},2747,{"position":[[7,13]]}]],["namedexpr(expr",[],[],[2408,{"position":[[40,14]]},2588,{"position":[[40,14]]},2747,{"position":[[40,14]]}]],["target",[2502,{"position":[[0,7]]},2517,{"position":[[0,6]]},2541,{"position":[[0,6]]},2589,{"position":[[0,6]]}],[],[2408,{"position":[[55,7]]},2414,{"position":[[368,8],[391,8],[451,7],[501,7],[562,7],[643,7]]},2444,{"position":[[368,8],[391,8],[451,7],[501,7],[562,7],[643,7]]},2477,{"position":[[368,8],[391,8],[451,7],[501,7],[562,7],[643,7]]},2501,{"position":[[12,8]]},2516,{"position":[[15,7]]},2540,{"position":[[9,7]]},2588,{"position":[[55,7]]},2660,{"position":[[368,8],[391,8],[451,7],[501,7],[562,7],[643,7]]},2747,{"position":[[55,7]]}]],["binop(expr",[],[],[2408,{"position":[[77,10]]},2588,{"position":[[77,10]]},2687,{"position":[[0,10]]},2747,{"position":[[77,10]]}]],["left",[2673,{"position":[[0,4]]},2688,{"position":[[0,4]]}],[],[2408,{"position":[[88,5],[565,5]]},2588,{"position":[[88,5],[565,5]]},2672,{"position":[[13,5]]},2687,{"position":[[11,5]]},2747,{"position":[[88,5],[565,5]]}]],["right",[2691,{"position":[[0,5]]}],[],[2408,{"position":[[112,6]]},2588,{"position":[[112,6]]},2687,{"position":[[35,6]]},2747,{"position":[[112,6]]}]],["unaryop(unaryop",[],[],[2408,{"position":[[121,15]]},2588,{"position":[[121,15]]},2708,{"position":[[0,15]]},2747,{"position":[[121,15]]}]],["operand",[2709,{"position":[[0,7]]}],[],[2408,{"position":[[146,8]]},2588,{"position":[[146,8]]},2708,{"position":[[25,8]]},2747,{"position":[[146,8]]}]],["lambda(argu",[],[],[2408,{"position":[[157,16]]},2588,{"position":[[157,16]]},2747,{"position":[[157,16]]}]],["arg",[2424,{"position":[[0,4]]},2454,{"position":[[0,4]]},2487,{"position":[[0,4]]},2565,{"position":[[0,3]]}],[],[2408,{"position":[[174,5],[623,5]]},2414,{"position":[[46,5],[167,5]]},2420,{"position":[[15,4]]},2423,{"position":[[27,3],[31,5],[37,4],[50,3],[84,4]]},2444,{"position":[[46,5],[167,5]]},2450,{"position":[[39,5]]},2477,{"position":[[46,5],[167,5]]},2483,{"position":[[21,5]]},2564,{"position":[[20,4]]},2588,{"position":[[174,5],[623,5]]},2660,{"position":[[46,5],[167,5]]},2747,{"position":[[174,5],[623,5]]},4847,{"position":[[172,5]]}]],["ifexp(expr",[],[],[2408,{"position":[[193,10]]},2588,{"position":[[193,10]]},2747,{"position":[[193,10]]}]],["orels",[2466,{"position":[[0,6]]},2535,{"position":[[0,6]]},2550,{"position":[[0,6]]},2667,{"position":[[0,6]]}],[],[2408,{"position":[[226,7]]},2414,{"position":[[597,7],[678,7],[743,7],[783,7],[1026,7],[1100,7]]},2444,{"position":[[597,7],[678,7],[743,7],[783,7],[1026,7],[1100,7]]},2459,{"position":[[30,7]]},2477,{"position":[[597,7],[678,7],[743,7],[783,7],[1026,7],[1100,7]]},2528,{"position":[[33,7]]},2540,{"position":[[44,7]]},2588,{"position":[[226,7]]},2660,{"position":[[597,7],[678,7],[743,7],[783,7],[1026,7],[1100,7]]},2747,{"position":[[226,7]]}]],["dict(expr",[],[],[2408,{"position":[[236,9]]},2588,{"position":[[236,9]]},2654,{"position":[[0,9]]},2747,{"position":[[236,9]]}]],["set(expr",[],[],[2408,{"position":[[267,8]]},2588,{"position":[[267,8]]},2747,{"position":[[267,8]]}]],["elt",[2604,{"position":[[0,3]]}],[],[2408,{"position":[[276,5],[298,4],[344,4],[454,4],[982,5],[1019,5]]},2576,{"position":[[11,5]]},2582,{"position":[[10,5]]},2588,{"position":[[276,5],[298,4],[344,4],[454,4],[982,5],[1019,5]]},2603,{"position":[[14,4]]},2747,{"position":[[276,5],[298,4],[344,4],[454,4],[982,5],[1019,5]]}]],["listcomp(expr",[],[],[2408,{"position":[[284,13]]},2588,{"position":[[284,13]]},2603,{"position":[[0,13]]},2747,{"position":[[284,13]]}]],["comprehens",[],[],[2408,{"position":[[303,13],[349,13],[408,13],[459,13]]},2588,{"position":[[303,13],[349,13],[408,13],[459,13]]},2603,{"position":[[19,13]]},2615,{"position":[[31,13]]},2747,{"position":[[303,13],[349,13],[408,13],[459,13]]}]],["setcomp(expr",[],[],[2408,{"position":[[331,12]]},2588,{"position":[[331,12]]},2747,{"position":[[331,12]]}]],["dictcomp(expr",[],[],[2408,{"position":[[377,13]]},2588,{"position":[[377,13]]},2615,{"position":[[0,13]]},2747,{"position":[[377,13]]}]],["generatorexp(expr",[],[],[2408,{"position":[[436,17]]},2588,{"position":[[436,17]]},2747,{"position":[[436,17]]}]],["await(expr",[],[],[2408,{"position":[[487,10]]},2588,{"position":[[487,10]]},2747,{"position":[[487,10]]}]],["yield(expr",[],[],[2408,{"position":[[507,11]]},2588,{"position":[[507,11]]},2747,{"position":[[507,11]]}]],["yieldfrom(expr",[],[],[2408,{"position":[[528,14]]},2588,{"position":[[528,14]]},2747,{"position":[[528,14]]}]],["compare(expr",[],[],[2408,{"position":[[552,12]]},2588,{"position":[[552,12]]},2672,{"position":[[0,12]]},2747,{"position":[[552,12]]}]],["cmpop",[],[],[2408,{"position":[[571,5]]},2588,{"position":[[571,5]]},2672,{"position":[[19,5]]},2747,{"position":[[571,5]]}]],["call(expr",[],[],[2408,{"position":[[602,9]]},2483,{"position":[[0,9]]},2588,{"position":[[602,9]]},2747,{"position":[[602,9]]}]],["func",[2484,{"position":[[0,4]]}],[],[2408,{"position":[[612,5]]},2483,{"position":[[10,5]]},2588,{"position":[[612,5]]},2747,{"position":[[612,5]]}]],["keyword",[],[],[2408,{"position":[[629,7],[637,9]]},2414,{"position":[[282,7],[290,9]]},2444,{"position":[[282,7],[290,9]]},2477,{"position":[[282,7],[290,9]]},2483,{"position":[[27,7],[35,9]]},2510,{"position":[[38,7],[46,9]]},2588,{"position":[[629,7],[637,9]]},2660,{"position":[[282,7],[290,9]]},2747,{"position":[[629,7],[637,9]]}]],["formattedvalue(expr",[],[],[2408,{"position":[[649,19]]},2588,{"position":[[649,19]]},2630,{"position":[[0,19]]},2747,{"position":[[649,19]]}]],["convers",[2634,{"position":[[0,10]]}],[],[2408,{"position":[[680,11]]},2588,{"position":[[680,11]]},2630,{"position":[[31,11]]},2747,{"position":[[680,11]]}]],["format_spec",[2637,{"position":[[0,11]]}],[],[2408,{"position":[[698,12]]},2588,{"position":[[698,12]]},2630,{"position":[[49,12]]},2747,{"position":[[698,12]]}]],["joinedstr(expr",[],[],[2408,{"position":[[713,14]]},2588,{"position":[[713,14]]},2645,{"position":[[0,14]]},2747,{"position":[[713,14]]}]],["constant(const",[],[],[2408,{"position":[[738,17]]},2573,{"position":[[0,17]]},2588,{"position":[[738,17]]},2747,{"position":[[738,17]]}]],["string",[],[],[2408,{"position":[[763,7]]},2414,{"position":[[99,7],[220,7],[412,7],[605,7],[686,7],[825,7],[886,7]]},2420,{"position":[[38,7]]},2444,{"position":[[99,7],[220,7],[412,7],[605,7],[686,7],[825,7],[886,7]]},2450,{"position":[[92,7]]},2477,{"position":[[99,7],[220,7],[412,7],[605,7],[686,7],[825,7],[886,7]]},2501,{"position":[[33,7]]},2540,{"position":[[52,7]]},2573,{"position":[[25,7]]},2588,{"position":[[763,7]]},2660,{"position":[[99,7],[220,7],[412,7],[605,7],[686,7],[825,7],[886,7]]},2747,{"position":[[763,7]]}]],["kind",[],[],[2408,{"position":[[771,5]]},2573,{"position":[[33,5]]},2588,{"position":[[771,5]]},2747,{"position":[[771,5]]}]],["attribute(expr",[],[],[2408,{"position":[[779,14]]},2588,{"position":[[779,14]]},2726,{"position":[[0,14]]},2747,{"position":[[779,14]]}]],["attr",[],[],[2408,{"position":[[812,5]]},2588,{"position":[[812,5]]},2726,{"position":[[33,5]]},2747,{"position":[[812,5]]}]],["expr_context",[],[],[2408,{"position":[[818,12],[872,12],[912,12],[952,12],[988,12],[1025,12]]},2558,{"position":[[20,12]]},2576,{"position":[[17,12]]},2582,{"position":[[16,12]]},2588,{"position":[[818,12],[872,12],[912,12],[952,12],[988,12],[1025,12]]},2717,{"position":[[34,12]]},2726,{"position":[[39,12]]},2747,{"position":[[818,12],[872,12],[912,12],[952,12],[988,12],[1025,12]]}]],["ctx",[],[],[2408,{"position":[[831,4],[885,4],[925,4],[965,4],[1001,4],[1038,4]]},2558,{"position":[[33,4]]},2576,{"position":[[30,4]]},2582,{"position":[[29,4]]},2588,{"position":[[831,4],[885,4],[925,4],[965,4],[1001,4],[1038,4]]},2717,{"position":[[47,4]]},2726,{"position":[[52,4]]},2747,{"position":[[831,4],[885,4],[925,4],[965,4],[1001,4],[1038,4]]}]],["subscript(expr",[],[],[2408,{"position":[[838,14]]},2588,{"position":[[838,14]]},2717,{"position":[[0,14]]},2747,{"position":[[838,14]]}]],["slice",[],[],[2408,{"position":[[865,6]]},2588,{"position":[[865,6]]},2717,{"position":[[27,6]]},2747,{"position":[[865,6]]},4511,{"position":[[0,5]]}]],["starred(expr",[],[],[2408,{"position":[[892,12]]},2588,{"position":[[892,12]]},2747,{"position":[[892,12]]}]],["name(identifi",[],[],[2408,{"position":[[932,15]]},2558,{"position":[[0,15]]},2588,{"position":[[932,15]]},2747,{"position":[[932,15]]}]],["list(expr",[],[],[2408,{"position":[[972,9]]},2582,{"position":[[0,9]]},2588,{"position":[[972,9]]},2747,{"position":[[972,9]]}]],["tuple(expr",[],[],[2408,{"position":[[1008,10]]},2576,{"position":[[0,10]]},2588,{"position":[[1008,10]]},2747,{"position":[[1008,10]]}]],["slice(expr",[],[],[2408,{"position":[[1045,11]]},2588,{"position":[[1045,11]]},2747,{"position":[[1045,11]]}]],["typecheck",[2409,{"position":[[0,10]]},2490,{"position":[[0,10]]},2559,{"position":[[0,10]]},2577,{"position":[[0,10]]},2583,{"position":[[0,10]]},2598,{"position":[[0,10]]},2610,{"position":[[0,10]]},2625,{"position":[[0,10]]},2640,{"position":[[0,10]]},2649,{"position":[[0,10]]},2655,{"position":[[0,10]]},2682,{"position":[[0,10]]},2694,{"position":[[0,10]]},2703,{"position":[[0,10]]},2712,{"position":[[0,10]]},2721,{"position":[[0,10]]},2733,{"position":[[0,10]]},2754,{"position":[[0,10]]}],[],[2411,{"position":[[11,10]]},2492,{"position":[[11,10]]},2561,{"position":[[11,10]]},2579,{"position":[[11,10]]},2585,{"position":[[11,10]]},2600,{"position":[[11,10]]},2612,{"position":[[11,10]]},2627,{"position":[[11,10]]},2642,{"position":[[11,10]]},2651,{"position":[[11,10]]},2657,{"position":[[11,10]]},2684,{"position":[[11,10]]},2696,{"position":[[11,10]]},2705,{"position":[[11,10]]},2714,{"position":[[11,10]]},2723,{"position":[[11,10]]},2735,{"position":[[11,10]]},2756,{"position":[[11,10]]}]],["opshin.typed_ast.typedexpr.typecheck",[],[2410,{"position":[[0,37]]}],[]],["success",[],[],[2411,{"position":[[0,10]]},2492,{"position":[[0,10]]},2561,{"position":[[0,10]]},2579,{"position":[[0,10]]},2585,{"position":[[0,10]]},2600,{"position":[[0,10]]},2612,{"position":[[0,10]]},2627,{"position":[[0,10]]},2642,{"position":[[0,10]]},2651,{"position":[[0,10]]},2657,{"position":[[0,10]]},2684,{"position":[[0,10]]},2696,{"position":[[0,10]]},2705,{"position":[[0,10]]},2714,{"position":[[0,10]]},2723,{"position":[[0,10]]},2735,{"position":[[0,10]]},2756,{"position":[[0,10]]}]],["express",[],[],[2411,{"position":[[30,10]]},2492,{"position":[[30,10]]},2561,{"position":[[30,10]]},2579,{"position":[[30,10]]},2585,{"position":[[30,10]]},2600,{"position":[[30,10]]},2612,{"position":[[30,10]]},2627,{"position":[[30,10]]},2642,{"position":[[30,10]]},2651,{"position":[[30,10]]},2657,{"position":[[30,10]]},2684,{"position":[[30,10]]},2696,{"position":[[30,10]]},2705,{"position":[[30,10]]},2714,{"position":[[30,10]]},2723,{"position":[[30,10]]},2735,{"position":[[30,10]]},2756,{"position":[[30,10]]},4235,{"position":[[63,10],[210,10]]}]],["typedstmt",[2412,{"position":[[0,9]]}],[],[]],["opshin.typed_ast.typedstmt",[],[2413,{"position":[[0,26]]}],[]],["stmt",[],[],[2414,{"position":[[0,4],[52,4],[173,4],[300,4],[581,4],[592,4],[662,4],[673,4],[727,4],[738,4],[767,4],[778,4],[814,4],[875,4],[1021,4],[1034,4],[1095,4],[1108,4]]},2444,{"position":[[0,4],[52,4],[173,4],[300,4],[581,4],[592,4],[662,4],[673,4],[727,4],[738,4],[767,4],[778,4],[814,4],[875,4],[1021,4],[1034,4],[1095,4],[1108,4]]},2450,{"position":[[45,4]]},2459,{"position":[[14,4],[25,4]]},2477,{"position":[[0,4],[52,4],[173,4],[300,4],[581,4],[592,4],[662,4],[673,4],[727,4],[738,4],[767,4],[778,4],[814,4],[875,4],[1021,4],[1034,4],[1095,4],[1108,4]]},2510,{"position":[[56,4]]},2528,{"position":[[17,4],[28,4]]},2540,{"position":[[28,4],[39,4]]},2660,{"position":[[0,4],[52,4],[173,4],[300,4],[581,4],[592,4],[662,4],[673,4],[727,4],[738,4],[767,4],[778,4],[814,4],[875,4],[1021,4],[1034,4],[1095,4],[1108,4]]}]],["functiondef(identifi",[],[],[2414,{"position":[[7,22]]},2444,{"position":[[7,22]]},2450,{"position":[[0,22]]},2477,{"position":[[7,22]]},2660,{"position":[[7,22]]}]],["decorator_list",[],[],[2414,{"position":[[68,15],[189,15],[316,15]]},2444,{"position":[[68,15],[189,15],[316,15]]},2450,{"position":[[61,15]]},2477,{"position":[[68,15],[189,15],[316,15]]},2510,{"position":[[72,15]]},2660,{"position":[[68,15],[189,15],[316,15]]}]],["type_com",[],[],[2414,{"position":[[107,13],[228,13],[420,13],[613,13],[694,13],[833,13],[894,13]]},2420,{"position":[[46,13]]},2444,{"position":[[107,13],[228,13],[420,13],[613,13],[694,13],[833,13],[894,13]]},2450,{"position":[[100,13]]},2477,{"position":[[107,13],[228,13],[420,13],[613,13],[694,13],[833,13],[894,13]]},2501,{"position":[[41,13]]},2540,{"position":[[60,13]]},2660,{"position":[[107,13],[228,13],[420,13],[613,13],[694,13],[833,13],[894,13]]}]],["asyncfunctiondef(identifi",[],[],[2414,{"position":[[123,27]]},2444,{"position":[[123,27]]},2477,{"position":[[123,27]]},2660,{"position":[[123,27]]}]],["classdef(identifi",[],[],[2414,{"position":[[244,19]]},2444,{"position":[[244,19]]},2477,{"position":[[244,19]]},2510,{"position":[[0,19]]},2660,{"position":[[244,19]]}]],["return(expr",[],[],[2414,{"position":[[334,12]]},2444,{"position":[[334,12]]},2471,{"position":[[0,12]]},2477,{"position":[[334,12]]},2660,{"position":[[334,12]]}]],["delete(expr",[],[],[2414,{"position":[[356,11]]},2444,{"position":[[356,11]]},2477,{"position":[[356,11]]},2660,{"position":[[356,11]]}]],["assign(expr",[],[],[2414,{"position":[[379,11]]},2444,{"position":[[379,11]]},2477,{"position":[[379,11]]},2501,{"position":[[0,11]]},2660,{"position":[[379,11]]}]],["augassign(expr",[],[],[2414,{"position":[[436,14]]},2444,{"position":[[436,14]]},2477,{"position":[[436,14]]},2660,{"position":[[436,14]]}]],["annassign(expr",[],[],[2414,{"position":[[486,14]]},2444,{"position":[[486,14]]},2477,{"position":[[486,14]]},2516,{"position":[[0,14]]},2660,{"position":[[486,14]]}]],["annot",[2520,{"position":[[0,10]]}],[],[2414,{"position":[[514,11]]},2420,{"position":[[26,11]]},2444,{"position":[[514,11]]},2477,{"position":[[514,11]]},2516,{"position":[[28,11]]},2660,{"position":[[514,11]]}]],["for(expr",[],[],[2414,{"position":[[553,8]]},2444,{"position":[[553,8]]},2477,{"position":[[553,8]]},2540,{"position":[[0,8]]},2660,{"position":[[553,8]]}]],["asyncfor(expr",[],[],[2414,{"position":[[629,13]]},2444,{"position":[[629,13]]},2477,{"position":[[629,13]]},2660,{"position":[[629,13]]}]],["while(expr",[],[],[2414,{"position":[[710,10]]},2444,{"position":[[710,10]]},2477,{"position":[[710,10]]},2528,{"position":[[0,10]]},2660,{"position":[[710,10]]}]],["if(expr",[],[],[2414,{"position":[[753,7]]},2444,{"position":[[753,7]]},2459,{"position":[[0,7]]},2477,{"position":[[753,7]]},2660,{"position":[[753,7]]}]],["with(withitem",[],[],[2414,{"position":[[793,13]]},2444,{"position":[[793,13]]},2477,{"position":[[793,13]]},2660,{"position":[[793,13]]}]],["item",[],[],[2414,{"position":[[807,6],[868,6]]},2444,{"position":[[807,6],[868,6]]},2477,{"position":[[807,6],[868,6]]},2660,{"position":[[807,6],[868,6]]}]],["asyncwith(withitem",[],[],[2414,{"position":[[849,18]]},2444,{"position":[[849,18]]},2477,{"position":[[849,18]]},2660,{"position":[[849,18]]}]],["match(expr",[],[],[2414,{"position":[[910,10]]},2444,{"position":[[910,10]]},2477,{"position":[[910,10]]},2660,{"position":[[910,10]]}]],["subject",[],[],[2414,{"position":[[921,8]]},2444,{"position":[[921,8]]},2477,{"position":[[921,8]]},2660,{"position":[[921,8]]}]],["match_cas",[],[],[2414,{"position":[[930,10]]},2444,{"position":[[930,10]]},2477,{"position":[[930,10]]},2660,{"position":[[930,10]]}]],["raise(expr",[],[],[2414,{"position":[[950,11]]},2444,{"position":[[950,11]]},2477,{"position":[[950,11]]},2660,{"position":[[950,11]]}]],["exc",[],[],[2414,{"position":[[962,4]]},2444,{"position":[[962,4]]},2477,{"position":[[962,4]]},2660,{"position":[[962,4]]}]],["caus",[],[],[2414,{"position":[[973,6]]},2444,{"position":[[973,6]]},2477,{"position":[[973,6]]},2660,{"position":[[973,6]]}]],["try(stmt",[],[],[2414,{"position":[[982,8]]},2444,{"position":[[982,8]]},2477,{"position":[[982,8]]},2660,{"position":[[982,8]]}]],["excepthandl",[],[],[2414,{"position":[[997,13],[1071,13]]},2444,{"position":[[997,13],[1071,13]]},2477,{"position":[[997,13],[1071,13]]},2660,{"position":[[997,13],[1071,13]]}]],["handler",[],[],[2414,{"position":[[1011,9],[1085,9]]},2444,{"position":[[1011,9],[1085,9]]},2477,{"position":[[1011,9],[1085,9]]},2660,{"position":[[1011,9],[1085,9]]}]],["finalbodi",[],[],[2414,{"position":[[1039,10],[1113,10]]},2444,{"position":[[1039,10],[1113,10]]},2477,{"position":[[1039,10],[1113,10]]},2660,{"position":[[1039,10],[1113,10]]}]],["trystar(stmt",[],[],[2414,{"position":[[1052,12]]},2444,{"position":[[1052,12]]},2477,{"position":[[1052,12]]},2660,{"position":[[1052,12]]}]],["assert(expr",[],[],[2414,{"position":[[1126,11]]},2444,{"position":[[1126,11]]},2477,{"position":[[1126,11]]},2660,{"position":[[1126,11]]},2738,{"position":[[0,11]]}]],["msg",[2742,{"position":[[0,3]]}],[],[2414,{"position":[[1150,4]]},2444,{"position":[[1150,4]]},2477,{"position":[[1150,4]]},2660,{"position":[[1150,4]]},2738,{"position":[[24,4]]}]],["import(alia",[],[],[2414,{"position":[[1157,12]]},2444,{"position":[[1157,12]]},2477,{"position":[[1157,12]]},2660,{"position":[[1157,12]]}]],["importfrom(identifi",[],[],[2414,{"position":[[1179,22]]},2444,{"position":[[1179,22]]},2477,{"position":[[1179,22]]},2660,{"position":[[1179,22]]}]],["modul",[],[],[2414,{"position":[[1202,7]]},2444,{"position":[[1202,7]]},2477,{"position":[[1202,7]]},2660,{"position":[[1202,7]]},4466,{"position":[[70,7],[110,7]]},4844,{"position":[[17,6]]}]],["alia",[],[],[2414,{"position":[[1210,5]]},2444,{"position":[[1210,5]]},2477,{"position":[[1210,5]]},2660,{"position":[[1210,5]]}]],["level",[],[],[2414,{"position":[[1228,6]]},2444,{"position":[[1228,6]]},2477,{"position":[[1228,6]]},2660,{"position":[[1228,6]]}]],["global(identifi",[],[],[2414,{"position":[[1237,17]]},2444,{"position":[[1237,17]]},2477,{"position":[[1237,17]]},2660,{"position":[[1237,17]]}]],["nonlocal(identifi",[],[],[2414,{"position":[[1264,19]]},2444,{"position":[[1264,19]]},2477,{"position":[[1264,19]]},2660,{"position":[[1264,19]]}]],["expr(expr",[],[],[2414,{"position":[[1293,9]]},2444,{"position":[[1293,9]]},2477,{"position":[[1293,9]]},2495,{"position":[[0,9]]},2660,{"position":[[1293,9]]}]],["break",[],[],[2414,{"position":[[1319,5]]},2444,{"position":[[1319,5]]},2477,{"position":[[1319,5]]},2660,{"position":[[1319,5]]}]],["continu",[],[],[2414,{"position":[[1327,8]]},2444,{"position":[[1327,8]]},2477,{"position":[[1327,8]]},2660,{"position":[[1327,8]]}]],["opshin.typed_ast.typedstmt.typ",[],[2416,{"position":[[0,30]]}],[]],["typedarg",[2418,{"position":[[0,8]]}],[],[]],["opshin.typed_ast.typedarg",[],[2419,{"position":[[0,25]]}],[]],["arg(identifi",[],[],[2420,{"position":[[0,14]]}]],["typedargu",[2421,{"position":[[0,14]]}],[],[]],["opshin.typed_ast.typedargu",[],[2422,{"position":[[0,31]]}],[]],["arguments(arg",[],[],[2423,{"position":[[0,13]]}]],["posonlyarg",[],[],[2423,{"position":[[14,12]]}]],["vararg",[2427,{"position":[[0,6]]}],[],[2423,{"position":[[42,7]]}]],["kwonlyarg",[2430,{"position":[[0,10]]}],[],[2423,{"position":[[54,11]]}]],["kw_default",[2433,{"position":[[0,11]]}],[],[2423,{"position":[[71,12]]}]],["kwarg",[2436,{"position":[[0,5]]}],[],[2423,{"position":[[89,6]]},4847,{"position":[[179,7]]}]],["opshin.typed_ast.typedarguments.arg",[],[2425,{"position":[[0,36]]}],[]],["opshin.typed_ast.typedarguments.vararg",[],[2428,{"position":[[0,38]]}],[]],["opshin.typed_ast.typedarguments.kwonlyarg",[],[2431,{"position":[[0,42]]}],[]],["opshin.typed_ast.typedarguments.kw_default",[],[2434,{"position":[[0,43]]}],[]],["opshin.typed_ast.typedarguments.kwarg",[],[2437,{"position":[[0,37]]}],[]],["opshin.typed_ast.typedarguments.default",[],[2440,{"position":[[0,40]]}],[]],["typedmodul",[2442,{"position":[[0,11]]}],[],[]],["opshin.typed_ast.typedmodul",[],[2443,{"position":[[0,28]]}],[]],["opshin.typed_ast.typedmodule.bodi",[],[2446,{"position":[[0,33]]}],[]],["typedfunctiondef",[2448,{"position":[[0,16]]}],[],[]],["opshin.typed_ast.typedfunctiondef",[],[2449,{"position":[[0,33]]}],[]],["opshin.typed_ast.typedfunctiondef.bodi",[],[2452,{"position":[[0,38]]}],[]],["opshin.typed_ast.typedfunctiondef.arg",[],[2455,{"position":[[0,38]]}],[]],["typedif",[2457,{"position":[[0,7]]}],[],[]],["opshin.typed_ast.typedif",[],[2458,{"position":[[0,24]]}],[]],["opshin.typed_ast.typedif.test",[],[2461,{"position":[[0,29]]}],[]],["opshin.typed_ast.typedif.bodi",[],[2464,{"position":[[0,29]]}],[]],["opshin.typed_ast.typedif.orels",[],[2467,{"position":[[0,31]]}],[]],["typedreturn",[2469,{"position":[[0,11]]}],[],[]],["opshin.typed_ast.typedreturn",[],[2470,{"position":[[0,28]]}],[]],["opshin.typed_ast.typedreturn.valu",[],[2473,{"position":[[0,34]]}],[]],["typedexpress",[2475,{"position":[[0,15]]}],[],[]],["opshin.typed_ast.typedexpress",[],[2476,{"position":[[0,32]]}],[]],["opshin.typed_ast.typedexpression.bodi",[],[2479,{"position":[[0,37]]}],[]],["typedcal",[2481,{"position":[[0,9]]}],[],[]],["opshin.typed_ast.typedcal",[],[2482,{"position":[[0,26]]}],[]],["opshin.typed_ast.typedcall.func",[],[2485,{"position":[[0,31]]}],[]],["opshin.typed_ast.typedcall.arg",[],[2488,{"position":[[0,31]]}],[]],["opshin.typed_ast.typedcall.typecheck",[],[2491,{"position":[[0,37]]}],[]],["opshin.typed_ast.typedexpr.valu",[],[2497,{"position":[[0,32]]}],[]],["typedassign",[2499,{"position":[[0,11]]}],[],[]],["opshin.typed_ast.typedassign",[],[2500,{"position":[[0,28]]}],[]],["opshin.typed_ast.typedassign.target",[],[2503,{"position":[[0,36]]}],[]],["opshin.typed_ast.typedassign.valu",[],[2506,{"position":[[0,34]]}],[]],["typedclassdef",[2508,{"position":[[0,13]]}],[],[]],["opshin.typed_ast.typedclassdef",[],[2509,{"position":[[0,30]]}],[]],["class_typ",[2511,{"position":[[0,9]]}],[],[]],["opshin.typed_ast.typedclassdef.class_typ",[],[2512,{"position":[[0,40]]}],[]],["typedannassign",[2514,{"position":[[0,14]]}],[],[]],["opshin.typed_ast.typedannassign",[],[2515,{"position":[[0,31]]}],[]],["opshin.typed_ast.typedannassign.target",[],[2518,{"position":[[0,38]]}],[]],["opshin.typed_ast.typedannassign.annot",[],[2521,{"position":[[0,42]]}],[]],["opshin.typed_ast.typedannassign.valu",[],[2524,{"position":[[0,37]]}],[]],["typedwhil",[2526,{"position":[[0,10]]}],[],[]],["opshin.typed_ast.typedwhil",[],[2527,{"position":[[0,27]]}],[]],["opshin.typed_ast.typedwhile.test",[],[2530,{"position":[[0,32]]}],[]],["opshin.typed_ast.typedwhile.bodi",[],[2533,{"position":[[0,32]]}],[]],["opshin.typed_ast.typedwhile.orels",[],[2536,{"position":[[0,34]]}],[]],["typedfor",[2538,{"position":[[0,8]]}],[],[]],["opshin.typed_ast.typedfor",[],[2539,{"position":[[0,25]]}],[]],["opshin.typed_ast.typedfor.target",[],[2542,{"position":[[0,32]]}],[]],["opshin.typed_ast.typedfor.it",[],[2545,{"position":[[0,30]]}],[]],["opshin.typed_ast.typedfor.bodi",[],[2548,{"position":[[0,30]]}],[]],["opshin.typed_ast.typedfor.orels",[],[2551,{"position":[[0,32]]}],[]],["typedpass",[2553,{"position":[[0,9]]}],[],[]],["opshin.typed_ast.typedpass",[],[2554,{"position":[[0,26]]}],[]],["typednam",[2556,{"position":[[0,9]]}],[],[]],["opshin.typed_ast.typednam",[],[2557,{"position":[[0,26]]}],[]],["opshin.typed_ast.typedname.typecheck",[],[2560,{"position":[[0,37]]}],[]],["typedkeyword",[2562,{"position":[[0,12]]}],[],[]],["opshin.typed_ast.typedkeyword",[],[2563,{"position":[[0,29]]}],[]],["keyword(identifi",[],[],[2564,{"position":[[0,19]]}]],["opshin.typed_ast.typedkeyword.arg",[],[2566,{"position":[[0,33]]}],[]],["opshin.typed_ast.typedkeyword.valu",[],[2569,{"position":[[0,35]]}],[]],["typedconst",[2571,{"position":[[0,13]]}],[],[]],["opshin.typed_ast.typedconst",[],[2572,{"position":[[0,30]]}],[]],["typedtupl",[2574,{"position":[[0,10]]}],[],[]],["opshin.typed_ast.typedtupl",[],[2575,{"position":[[0,27]]}],[]],["opshin.typed_ast.typedtuple.typecheck",[],[2578,{"position":[[0,38]]}],[]],["typedlist",[2580,{"position":[[0,9]]}],[],[]],["opshin.typed_ast.typedlist",[],[2581,{"position":[[0,26]]}],[]],["opshin.typed_ast.typedlist.typecheck",[],[2584,{"position":[[0,37]]}],[]],["typedcomprehens",[2586,{"position":[[0,18]]}],[],[]],["opshin.typed_ast.typedcomprehens",[],[2587,{"position":[[0,35]]}],[]],["opshin.typed_ast.typedcomprehension.target",[],[2590,{"position":[[0,42]]}],[]],["opshin.typed_ast.typedcomprehension.it",[],[2593,{"position":[[0,40]]}],[]],["if",[2595,{"position":[[0,3]]}],[],[]],["opshin.typed_ast.typedcomprehension.if",[],[2596,{"position":[[0,39]]}],[]],["opshin.typed_ast.typedcomprehension.typecheck",[],[2599,{"position":[[0,46]]}],[]],["typedlistcomp",[2601,{"position":[[0,13]]}],[],[]],["opshin.typed_ast.typedlistcomp",[],[2602,{"position":[[0,30]]}],[]],["opshin.typed_ast.typedlistcomp.elt",[],[2605,{"position":[[0,34]]}],[]],["opshin.typed_ast.typedlistcomp.gener",[],[2608,{"position":[[0,41]]}],[]],["opshin.typed_ast.typedlistcomp.typecheck",[],[2611,{"position":[[0,41]]}],[]],["typeddictcomp",[2613,{"position":[[0,13]]}],[],[]],["opshin.typed_ast.typeddictcomp",[],[2614,{"position":[[0,30]]}],[]],["opshin.typed_ast.typeddictcomp.key",[],[2617,{"position":[[0,34]]}],[]],["opshin.typed_ast.typeddictcomp.valu",[],[2620,{"position":[[0,36]]}],[]],["opshin.typed_ast.typeddictcomp.gener",[],[2623,{"position":[[0,41]]}],[]],["opshin.typed_ast.typeddictcomp.typecheck",[],[2626,{"position":[[0,41]]}],[]],["typedformattedvalu",[2628,{"position":[[0,19]]}],[],[]],["opshin.typed_ast.typedformattedvalu",[],[2629,{"position":[[0,36]]}],[]],["opshin.typed_ast.typedformattedvalue.valu",[],[2632,{"position":[[0,42]]}],[]],["opshin.typed_ast.typedformattedvalue.convers",[],[2635,{"position":[[0,47]]}],[]],["opshin.typed_ast.typedformattedvalue.format_spec",[],[2638,{"position":[[0,48]]}],[]],["opshin.typed_ast.typedformattedvalue.typecheck",[],[2641,{"position":[[0,47]]}],[]],["typedjoinedstr",[2643,{"position":[[0,14]]}],[],[]],["opshin.typed_ast.typedjoinedstr",[],[2644,{"position":[[0,31]]}],[]],["opshin.typed_ast.typedjoinedstr.valu",[],[2647,{"position":[[0,38]]}],[]],["opshin.typed_ast.typedjoinedstr.typecheck",[],[2650,{"position":[[0,42]]}],[]],["typeddict",[2652,{"position":[[0,9]]}],[],[]],["opshin.typed_ast.typeddict",[],[2653,{"position":[[0,26]]}],[]],["opshin.typed_ast.typeddict.typecheck",[],[2656,{"position":[[0,37]]}],[]],["typedifexp",[2658,{"position":[[0,10]]}],[],[]],["opshin.typed_ast.typedifexp",[],[2659,{"position":[[0,27]]}],[]],["opshin.typed_ast.typedifexp.test",[],[2662,{"position":[[0,32]]}],[]],["opshin.typed_ast.typedifexp.bodi",[],[2665,{"position":[[0,32]]}],[]],["opshin.typed_ast.typedifexp.orels",[],[2668,{"position":[[0,34]]}],[]],["typedcompar",[2670,{"position":[[0,12]]}],[],[]],["opshin.typed_ast.typedcompar",[],[2671,{"position":[[0,29]]}],[]],["opshin.typed_ast.typedcompare.left",[],[2674,{"position":[[0,34]]}],[]],["opshin.typed_ast.typedcompare.op",[],[2677,{"position":[[0,33]]}],[]],["opshin.typed_ast.typedcompare.compar",[],[2680,{"position":[[0,41]]}],[]],["opshin.typed_ast.typedcompare.typecheck",[],[2683,{"position":[[0,40]]}],[]],["typedbinop",[2685,{"position":[[0,10]]}],[],[]],["opshin.typed_ast.typedbinop",[],[2686,{"position":[[0,27]]}],[]],["opshin.typed_ast.typedbinop.left",[],[2689,{"position":[[0,32]]}],[]],["opshin.typed_ast.typedbinop.right",[],[2692,{"position":[[0,33]]}],[]],["opshin.typed_ast.typedbinop.typecheck",[],[2695,{"position":[[0,38]]}],[]],["typedboolop",[2697,{"position":[[0,11]]}],[],[]],["opshin.typed_ast.typedboolop",[],[2698,{"position":[[0,28]]}],[]],["opshin.typed_ast.typedboolop.valu",[],[2701,{"position":[[0,35]]}],[]],["opshin.typed_ast.typedboolop.typecheck",[],[2704,{"position":[[0,39]]}],[]],["typedunaryop",[2706,{"position":[[0,12]]}],[],[]],["opshin.typed_ast.typedunaryop",[],[2707,{"position":[[0,29]]}],[]],["opshin.typed_ast.typedunaryop.operand",[],[2710,{"position":[[0,37]]}],[]],["opshin.typed_ast.typedunaryop.typecheck",[],[2713,{"position":[[0,40]]}],[]],["typedsubscript",[2715,{"position":[[0,14]]}],[],[]],["opshin.typed_ast.typedsubscript",[],[2716,{"position":[[0,31]]}],[]],["opshin.typed_ast.typedsubscript.valu",[],[2719,{"position":[[0,37]]}],[]],["opshin.typed_ast.typedsubscript.typecheck",[],[2722,{"position":[[0,42]]}],[]],["typedattribut",[2724,{"position":[[0,14]]}],[],[]],["opshin.typed_ast.typedattribut",[],[2725,{"position":[[0,31]]}],[]],["opshin.typed_ast.typedattribute.valu",[],[2728,{"position":[[0,37]]}],[]],["po",[2730,{"position":[[0,3]]}],[],[]],["opshin.typed_ast.typedattribute.po",[],[2731,{"position":[[0,35]]}],[]],["opshin.typed_ast.typedattribute.typecheck",[],[2734,{"position":[[0,42]]}],[]],["typedassert",[2736,{"position":[[0,11]]}],[],[]],["opshin.typed_ast.typedassert",[],[2737,{"position":[[0,28]]}],[]],["opshin.typed_ast.typedassert.test",[],[2740,{"position":[[0,33]]}],[]],["opshin.typed_ast.typedassert.msg",[],[2743,{"position":[[0,32]]}],[]],["rawplutoexpr",[2745,{"position":[[0,12]]}],[],[]],["opshin.typed_ast.rawplutoexpr",[],[2746,{"position":[[0,29]]}],[]],["opshin.typed_ast.rawplutoexpr.typ",[],[2749,{"position":[[0,33]]}],[]],["opshin.typed_ast.rawplutoexpr.expr",[],[2752,{"position":[[0,34]]}],[]],["opshin.typed_ast.rawplutoexpr.typecheck",[],[2755,{"position":[[0,40]]}],[]],["opshin.test",[],[2758,{"position":[[0,12]]}],[]],["test_builtin",[2760,{"position":[[0,13]]}],[],[]],["opshin.tests.test_builtin",[],[2761,{"position":[[0,26]]}],[]],["builtintest",[2763,{"position":[[0,11]]}],[],[]],["opshin.tests.test_builtins.builtintest",[],[2764,{"position":[[0,38]]}],[]],["whose",[],[],[2765,{"position":[[8,5]]},2873,{"position":[[8,5]]},2936,{"position":[[8,5]]},3602,{"position":[[8,5]]},3908,{"position":[[8,5]]},4121,{"position":[[8,5]]},4895,{"position":[[17,5]]}]],["instanc",[],[],[2765,{"position":[[14,9],[336,8],[773,9],[1417,8],[1500,8],[1600,8]]},2873,{"position":[[14,9],[336,8],[773,9],[1417,8],[1500,8],[1600,8]]},2936,{"position":[[14,9],[336,8],[773,9],[1417,8],[1500,8],[1600,8]]},3602,{"position":[[14,9],[336,8],[773,9],[1417,8],[1500,8],[1600,8]]},3908,{"position":[[14,9],[336,8],[773,9],[1417,8],[1500,8],[1600,8]]},4121,{"position":[[14,9],[336,8],[773,9],[1417,8],[1500,8],[1600,8]]}]],["runtest",[],[],[2765,{"position":[[115,10]]},2873,{"position":[[115,10]]},2936,{"position":[[115,10]]},3602,{"position":[[115,10]]},3908,{"position":[[115,10]]},4121,{"position":[[115,10]]}]],["fixtur",[],[],[2765,{"position":[[133,7],[477,11]]},2873,{"position":[[133,7],[477,11]]},2936,{"position":[[133,7],[477,11]]},3602,{"position":[[133,7],[477,11]]},3908,{"position":[[133,7],[477,11]]},4121,{"position":[[133,7],[477,11]]}]],["instanti",[],[],[2765,{"position":[[222,13],[802,12]]},2873,{"position":[[222,13],[802,12]]},2936,{"position":[[222,13],[802,12]]},3602,{"position":[[222,13],[802,12]]},3908,{"position":[[222,13],[802,12]]},4121,{"position":[[222,13],[802,12]]}]],["such",[],[],[2765,{"position":[[236,4]]},2873,{"position":[[236,4]]},2936,{"position":[[236,4]]},3602,{"position":[[236,4]]},3908,{"position":[[236,4]]},4121,{"position":[[236,4]]}]],["testcas",[],[],[2765,{"position":[[243,8],[389,8],[892,9]]},2873,{"position":[[243,8],[389,8],[892,9]]},2936,{"position":[[243,8],[389,8],[892,9]]},3602,{"position":[[243,8],[389,8],[892,9]]},3908,{"position":[[243,8],[389,8],[892,9]]},4121,{"position":[[243,8],[389,8],[892,9]]}]],["author",[],[],[2765,{"position":[[365,7]]},2873,{"position":[[365,7]]},2936,{"position":[[365,7]]},3602,{"position":[[365,7]]},3908,{"position":[[365,7]]},4121,{"position":[[365,7]]}]],["construct",[],[],[2765,{"position":[[419,12]]},2873,{"position":[[419,12]]},2936,{"position":[[419,12]]},3602,{"position":[[419,12]]},3908,{"position":[[419,12]]},4121,{"position":[[419,12]]}]],["deconstruct",[],[],[2765,{"position":[[436,14]]},2873,{"position":[[436,14]]},2936,{"position":[[436,14]]},3602,{"position":[[436,14]]},3908,{"position":[[436,14]]},4121,{"position":[[436,14]]}]],["test'",[],[],[2765,{"position":[[458,6]]},2873,{"position":[[458,6]]},2936,{"position":[[458,6]]},3602,{"position":[[458,6]]},3908,{"position":[[458,6]]},4121,{"position":[[458,6]]}]],["environ",[],[],[2765,{"position":[[465,11]]},2873,{"position":[[465,11]]},2936,{"position":[[465,11]]},3602,{"position":[[465,11]]},3908,{"position":[[465,11]]},4121,{"position":[[465,11]]}]],["setup",[],[],[2765,{"position":[[526,7]]},2873,{"position":[[526,7]]},2936,{"position":[[526,7]]},3602,{"position":[[526,7]]},3908,{"position":[[526,7]]},4121,{"position":[[526,7]]}]],["teardown",[],[],[2765,{"position":[[538,10]]},2873,{"position":[[538,10]]},2936,{"position":[[538,10]]},3602,{"position":[[538,10]]},3908,{"position":[[538,10]]},4121,{"position":[[538,10]]}]],["respect",[],[],[2765,{"position":[[557,13]]},2873,{"position":[[557,13]]},2936,{"position":[[557,13]]},3602,{"position":[[557,13]]},3908,{"position":[[557,13]]},4121,{"position":[[557,13]]},4235,{"position":[[235,12]]}]],["necessari",[],[],[2765,{"position":[[580,9]]},2873,{"position":[[580,9]]},2936,{"position":[[580,9]]},3602,{"position":[[580,9]]},3908,{"position":[[580,9]]},4121,{"position":[[580,9]]}]],["__init__",[],[],[2765,{"position":[[606,8],[638,8],[750,8]]},2873,{"position":[[606,8],[638,8],[750,8]]},2936,{"position":[[606,8],[638,8],[750,8]]},3602,{"position":[[606,8],[638,8],[750,8]]},3908,{"position":[[606,8],[638,8],[750,8]]},4121,{"position":[[606,8],[638,8],[750,8]]}]],["alway",[],[],[2765,{"position":[[659,6]]},2873,{"position":[[659,6]]},2936,{"position":[[659,6]]},3602,{"position":[[659,6]]},3908,{"position":[[659,6]]},4121,{"position":[[659,6]]}]],["signatur",[],[],[2765,{"position":[[731,9]]},2873,{"position":[[731,9]]},2936,{"position":[[731,9]]},3602,{"position":[[731,9]]},3908,{"position":[[731,9]]},4121,{"position":[[731,9]]},4538,{"position":[[27,10],[57,10]]},4541,{"position":[[27,10],[55,10]]},4544,{"position":[[27,10],[57,10]]}]],["framework",[],[],[2765,{"position":[[845,9]]},2873,{"position":[[845,9]]},2936,{"position":[[845,9]]},3602,{"position":[[845,9]]},3908,{"position":[[845,9]]},4121,{"position":[[845,9]]}]],["failureexcept",[],[],[2765,{"position":[[933,17]]},2873,{"position":[[933,17]]},2936,{"position":[[933,17]]},3602,{"position":[[933,17]]},3908,{"position":[[933,17]]},4121,{"position":[[933,17]]}]],["rais",[],[],[2765,{"position":[[986,6],[1050,7],[1573,6]]},2873,{"position":[[986,6],[1050,7],[1573,6]]},2936,{"position":[[986,6],[1050,7],[1573,6]]},3602,{"position":[[986,6],[1050,7],[1573,6]]},3908,{"position":[[986,6],[1050,7],[1573,6]]},4121,{"position":[[986,6],[1050,7],[1573,6]]},4898,{"position":[[109,6]]}]],["instance'",[],[],[2765,{"position":[[1002,10]]},2873,{"position":[[1002,10]]},2936,{"position":[[1002,10]]},3602,{"position":[[1002,10]]},3908,{"position":[[1002,10]]},4121,{"position":[[1002,10]]}]],["longmessag",[],[],[2765,{"position":[[1129,12]]},2873,{"position":[[1129,12]]},2936,{"position":[[1129,12]]},3602,{"position":[[1129,12]]},3908,{"position":[[1129,12]]},4121,{"position":[[1129,12]]}]],["repr",[],[],[2765,{"position":[[1186,4]]},2873,{"position":[[1186,4]]},2936,{"position":[[1186,4]]},3602,{"position":[[1186,4]]},3908,{"position":[[1186,4]]},4121,{"position":[[1186,4]]}]],["print",[4737,{"position":[[0,5]]}],[],[2765,{"position":[[1234,7]]},2873,{"position":[[1234,7]]},2936,{"position":[[1234,7]]},3602,{"position":[[1234,7]]},3908,{"position":[[1234,7]]},4121,{"position":[[1234,7]]}]],["failur",[],[],[2765,{"position":[[1245,7],[1345,7]]},2873,{"position":[[1245,7],[1345,7]]},2936,{"position":[[1245,7],[1345,7]]},3602,{"position":[[1245,7],[1345,7]]},3908,{"position":[[1245,7],[1345,7]]},4121,{"position":[[1245,7],[1345,7]]}]],["addit",[],[],[2765,{"position":[[1257,8]]},2873,{"position":[[1257,8]]},2936,{"position":[[1257,8]]},3602,{"position":[[1257,8]]},3908,{"position":[[1257,8]]},4121,{"position":[[1257,8]]},4220,{"position":[[352,10]]},4676,{"position":[[216,10]]}]],["maxdiff",[],[],[2765,{"position":[[1299,8]]},2873,{"position":[[1299,8]]},2936,{"position":[[1299,8]]},3602,{"position":[[1299,8]]},3908,{"position":[[1299,8]]},4121,{"position":[[1299,8]]}]],["maximum",[],[],[2765,{"position":[[1317,7]]},2873,{"position":[[1317,7]]},2936,{"position":[[1317,7]]},3602,{"position":[[1317,7]]},3908,{"position":[[1317,7]]},4121,{"position":[[1317,7]]}]],["length",[],[],[2765,{"position":[[1325,6]]},2873,{"position":[[1325,6]]},2936,{"position":[[1325,6]]},3602,{"position":[[1325,6]]},3908,{"position":[[1325,6]]},4121,{"position":[[1325,6]]},4514,{"position":[[8,6]]}]],["diff",[],[],[2765,{"position":[[1337,4]]},2873,{"position":[[1337,4]]},2936,{"position":[[1337,4]]},3602,{"position":[[1337,4]]},3908,{"position":[[1337,4]]},4121,{"position":[[1337,4]]}]],["difflib",[],[],[2765,{"position":[[1386,8]]},2873,{"position":[[1386,8]]},2936,{"position":[[1386,8]]},3602,{"position":[[1386,8]]},3908,{"position":[[1386,8]]},4121,{"position":[[1386,8]]}]],["look",[],[],[2765,{"position":[[1401,6]]},2873,{"position":[[1401,6]]},2936,{"position":[[1401,6]]},3602,{"position":[[1401,6]]},3908,{"position":[[1401,6]]},4121,{"position":[[1401,6]]}]],["configur",[],[],[2765,{"position":[[1446,10]]},2873,{"position":[[1446,10]]},2936,{"position":[[1446,10]]},3602,{"position":[[1446,10]]},3908,{"position":[[1446,10]]},4121,{"position":[[1446,10]]}]],["individu",[],[],[2765,{"position":[[1460,10]]},2873,{"position":[[1460,10]]},2936,{"position":[[1460,10]]},3602,{"position":[[1460,10]]},3908,{"position":[[1460,10]]},4121,{"position":[[1460,10]]}]],["valueerror",[],[],[2765,{"position":[[1582,10]]},2873,{"position":[[1582,10]]},2936,{"position":[[1582,10]]},3602,{"position":[[1582,10]]},3908,{"position":[[1582,10]]},4121,{"position":[[1582,10]]}]],["test_al",[2766,{"position":[[0,8]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_al",[],[2767,{"position":[[0,47]]}],[]],["test_ani",[2769,{"position":[[0,8]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_ani",[],[2770,{"position":[[0,47]]}],[]],["test_ab",[2772,{"position":[[0,8]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_ab",[],[2773,{"position":[[0,47]]}],[]],["test_bytes_int_list",[2775,{"position":[[0,19]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_bytes_int_list",[],[2776,{"position":[[0,58]]}],[]],["test_bytes_int",[2778,{"position":[[0,14]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_bytes_int",[],[2779,{"position":[[0,53]]}],[]],["test_bytes_byt",[2781,{"position":[[0,16]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_bytes_byt",[],[2782,{"position":[[0,55]]}],[]],["test_chr",[2784,{"position":[[0,8]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_chr",[],[2785,{"position":[[0,47]]}],[]],["test_hex",[2787,{"position":[[0,8]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_hex",[],[2788,{"position":[[0,47]]}],[]],["test_int_str",[2790,{"position":[[0,15]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_int_str",[],[2791,{"position":[[0,54]]}],[]],["test_int_bool",[2793,{"position":[[0,13]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_int_bool",[],[2794,{"position":[[0,52]]}],[]],["test_int_int",[2796,{"position":[[0,12]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_int_int",[],[2797,{"position":[[0,51]]}],[]],["test_len_bytestr",[2799,{"position":[[0,19]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_len_bytestr",[],[2800,{"position":[[0,58]]}],[]],["test_len_list",[2802,{"position":[[0,14]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_len_list",[],[2803,{"position":[[0,53]]}],[]],["test_len_dict",[2805,{"position":[[0,14]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_len_dict",[],[2806,{"position":[[0,53]]}],[]],["test_len_tupl",[2808,{"position":[[0,15]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_len_tupl",[],[2809,{"position":[[0,54]]}],[]],["test_max",[2811,{"position":[[0,8]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_max",[],[2812,{"position":[[0,47]]}],[]],["test_min",[2814,{"position":[[0,8]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_min",[],[2815,{"position":[[0,47]]}],[]],["test_pow",[2817,{"position":[[0,8]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_pow",[],[2818,{"position":[[0,47]]}],[]],["test_neg_pow",[2820,{"position":[[0,12]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_neg_pow",[],[2821,{"position":[[0,51]]}],[]],["test_oct",[2823,{"position":[[0,8]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_oct",[],[2824,{"position":[[0,47]]}],[]],["test_rang",[2826,{"position":[[0,10]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_rang",[],[2827,{"position":[[0,49]]}],[]],["test_str_int",[2829,{"position":[[0,12]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_str_int",[],[2830,{"position":[[0,51]]}],[]],["test_str_bool",[2832,{"position":[[0,13]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_str_bool",[],[2833,{"position":[[0,52]]}],[]],["test_sum",[2835,{"position":[[0,8]]},2952,{"position":[[0,8]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_sum",[],[2836,{"position":[[0,47]]}],[]],["test_revers",[2838,{"position":[[0,13]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_revers",[],[2839,{"position":[[0,52]]}],[]],["test_bool_constr_int",[2841,{"position":[[0,20]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_bool_constr_int",[],[2842,{"position":[[0,59]]}],[]],["test_bool_constr_str",[2844,{"position":[[0,20]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_bool_constr_str",[],[2845,{"position":[[0,59]]}],[]],["test_bool_constr_byt",[2847,{"position":[[0,22]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_bool_constr_byt",[],[2848,{"position":[[0,61]]}],[]],["test_bool_constr_non",[2850,{"position":[[0,21]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_bool_constr_non",[],[2851,{"position":[[0,60]]}],[]],["test_bool_constr_bool",[2853,{"position":[[0,21]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_bool_constr_bool",[],[2854,{"position":[[0,60]]}],[]],["test_bool_constr_list",[2856,{"position":[[0,21]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_bool_constr_list",[],[2857,{"position":[[0,60]]}],[]],["test_bool_constr_dict",[2859,{"position":[[0,21]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_bool_constr_dict",[],[2860,{"position":[[0,60]]}],[]],["test_print_compil",[2862,{"position":[[0,18]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_print_compil",[],[2863,{"position":[[0,57]]}],[]],["test_fromhex",[2865,{"position":[[0,12]]}],[],[]],["opshin.tests.test_builtins.builtintest.test_fromhex",[],[2866,{"position":[[0,51]]}],[]],["test_keyword",[2868,{"position":[[0,13]]}],[],[]],["opshin.tests.test_keyword",[],[2869,{"position":[[0,26]]}],[]],["keyword_test",[2871,{"position":[[0,13]]}],[],[]],["opshin.tests.test_keywords.keyword_test",[],[2872,{"position":[[0,40]]}],[]],["test_all_keyword",[2874,{"position":[[0,17]]}],[],[]],["opshin.tests.test_keywords.keyword_tests.test_all_keyword",[],[2875,{"position":[[0,58]]}],[]],["test_mixture_args_and_keyword",[2877,{"position":[[0,30]]}],[],[]],["opshin.tests.test_keywords.keyword_tests.test_mixture_args_and_keyword",[],[2878,{"position":[[0,71]]}],[]],["test_keyword_position_independ",[2880,{"position":[[0,34]]}],[],[]],["opshin.tests.test_keywords.keyword_tests.test_keyword_position_independ",[],[2881,{"position":[[0,75]]}],[]],["test_arg_after_keyword_failur",[2883,{"position":[[0,30]]}],[],[]],["opshin.tests.test_keywords.keyword_tests.test_arg_after_keyword_failur",[],[2884,{"position":[[0,71]]}],[]],["test_too_many_keywords_failur",[2886,{"position":[[0,30]]}],[],[]],["opshin.tests.test_keywords.keyword_tests.test_too_many_keywords_failur",[],[2887,{"position":[[0,71]]}],[]],["test_incorrect_keywords_failur",[2889,{"position":[[0,31]]}],[],[]],["opshin.tests.test_keywords.keyword_tests.test_incorrect_keywords_failur",[],[2890,{"position":[[0,72]]}],[]],["test_correct_scop",[2892,{"position":[[0,18]]}],[],[]],["opshin.tests.test_keywords.keyword_tests.test_correct_scop",[],[2893,{"position":[[0,59]]}],[]],["test_type_mismatch",[2895,{"position":[[0,18]]}],[],[]],["opshin.tests.test_keywords.keyword_tests.test_type_mismatch",[],[2896,{"position":[[0,59]]}],[]],["test_class_keyword",[2898,{"position":[[0,19]]}],[],[]],["opshin.tests.test_keywords.keyword_tests.test_class_keyword",[],[2899,{"position":[[0,60]]}],[]],["test_class_keywords_reord",[2901,{"position":[[0,27]]}],[],[]],["opshin.tests.test_keywords.keyword_tests.test_class_keywords_reord",[],[2902,{"position":[[0,68]]}],[]],["test_class_keywords_invalid",[2904,{"position":[[0,27]]}],[],[]],["opshin.tests.test_keywords.keyword_tests.test_class_keywords_invalid",[],[2905,{"position":[[0,68]]}],[]],["test_misc",[2907,{"position":[[0,9]]}],[],[]],["opshin.tests.test_misc",[],[2908,{"position":[[0,22]]}],[]],["fib",[2910,{"position":[[0,3]]}],[],[]],["opshin.tests.test_misc.fib",[],[2911,{"position":[[0,26]]}],[]],["opshin.tests.test_misc.a",[],[2914,{"position":[[0,24]]}],[]],["a(foo",[],[],[2915,{"position":[[0,6]]}]],["opshin.tests.test_misc.a.foo",[],[2917,{"position":[[0,28]]}],[]],["opshin.tests.test_misc.a.constr_id",[],[2920,{"position":[[0,34]]}],[]],["opshin.tests.test_misc.b",[],[2923,{"position":[[0,24]]}],[]],["b(foobar",[],[],[2924,{"position":[[0,9]]}]],["bar",[2928,{"position":[[0,3]]}],[],[2924,{"position":[[15,4]]}]],["foobar",[2925,{"position":[[0,6]]}],[],[]],["opshin.tests.test_misc.b.foobar",[],[2926,{"position":[[0,31]]}],[]],["opshin.tests.test_misc.b.bar",[],[2929,{"position":[[0,28]]}],[]],["opshin.tests.test_misc.b.constr_id",[],[2932,{"position":[[0,34]]}],[]],["misctest",[2934,{"position":[[0,8]]}],[],[]],["opshin.tests.test_misc.misctest",[],[2935,{"position":[[0,31]]}],[]],["test_assert_sum_contract_succe",[2937,{"position":[[0,32]]}],[],[]],["opshin.tests.test_misc.misctest.test_assert_sum_contract_succe",[],[2938,{"position":[[0,64]]}],[]],["test_assert_sum_contract_fail",[2940,{"position":[[0,29]]}],[],[]],["opshin.tests.test_misc.misctest.test_assert_sum_contract_fail",[],[2941,{"position":[[0,61]]}],[]],["test_mult_for",[2943,{"position":[[0,13]]}],[],[]],["opshin.tests.test_misc.misctest.test_mult_for",[],[2944,{"position":[[0,45]]}],[]],["test_mult_for_return",[2946,{"position":[[0,20]]}],[],[]],["opshin.tests.test_misc.misctest.test_mult_for_return",[],[2947,{"position":[[0,52]]}],[]],["test_mult_while_return",[2949,{"position":[[0,22]]}],[],[]],["opshin.tests.test_misc.misctest.test_mult_while_return",[],[2950,{"position":[[0,54]]}],[]],["opshin.tests.test_misc.misctest.test_sum",[],[2953,{"position":[[0,40]]}],[]],["test_complex_datum_correct_v",[2955,{"position":[[0,31]]}],[],[]],["opshin.tests.test_misc.misctest.test_complex_datum_correct_v",[],[2956,{"position":[[0,63]]}],[]],["test_hello_world",[2958,{"position":[[0,16]]}],[],[]],["opshin.tests.test_misc.misctest.test_hello_world",[],[2959,{"position":[[0,48]]}],[]],["test_list_datum_correct_v",[2961,{"position":[[0,28]]}],[],[]],["opshin.tests.test_misc.misctest.test_list_datum_correct_v",[],[2962,{"position":[[0,60]]}],[]],["test_showcas",[2964,{"position":[[0,13]]}],[],[]],["opshin.tests.test_misc.misctest.test_showcas",[],[2965,{"position":[[0,45]]}],[]],["test_fib_it",[2967,{"position":[[0,13]]}],[],[]],["opshin.tests.test_misc.misctest.test_fib_it",[],[2968,{"position":[[0,45]]}],[]],["test_fib_rec",[2970,{"position":[[0,12]]}],[],[]],["opshin.tests.test_misc.misctest.test_fib_rec",[],[2971,{"position":[[0,44]]}],[]],["test_gift_contract_succe",[2973,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_gift_contract_succe",[],[2974,{"position":[[0,58]]}],[]],["test_gift_contract_fail",[2976,{"position":[[0,23]]}],[],[]],["opshin.tests.test_misc.misctest.test_gift_contract_fail",[],[2977,{"position":[[0,55]]}],[]],["test_recursion_simpl",[2979,{"position":[[0,21]]}],[],[]],["opshin.tests.test_misc.misctest.test_recursion_simpl",[],[2980,{"position":[[0,53]]}],[]],["test_recursion_illeg",[2982,{"position":[[0,22]]}],[],[]],["opshin.tests.test_misc.misctest.test_recursion_illeg",[],[2983,{"position":[[0,54]]}],[]],["test_recursion_leg",[2985,{"position":[[0,20]]}],[],[]],["opshin.tests.test_misc.misctest.test_recursion_leg",[],[2986,{"position":[[0,52]]}],[]],["test_uninitialized_access",[2988,{"position":[[0,25]]}],[],[]],["opshin.tests.test_misc.misctest.test_uninitialized_access",[],[2989,{"position":[[0,57]]}],[]],["test_illegal_bind",[2991,{"position":[[0,17]]}],[],[]],["opshin.tests.test_misc.misctest.test_illegal_bind",[],[2992,{"position":[[0,49]]}],[]],["test_type_reassignment_function_bound",[2994,{"position":[[0,37]]}],[],[]],["opshin.tests.test_misc.misctest.test_type_reassignment_function_bound",[],[2995,{"position":[[0,69]]}],[]],["test_illegal_function_retyp",[2997,{"position":[[0,28]]}],[],[]],["opshin.tests.test_misc.misctest.test_illegal_function_retyp",[],[2998,{"position":[[0,60]]}],[]],["test_datum_cast",[3000,{"position":[[0,15]]}],[],[]],["opshin.tests.test_misc.misctest.test_datum_cast",[],[3001,{"position":[[0,47]]}],[]],["test_wrapping_contract_compil",[3003,{"position":[[0,30]]}],[],[]],["opshin.tests.test_misc.misctest.test_wrapping_contract_compil",[],[3004,{"position":[[0,62]]}],[]],["test_dual_use_compil",[3006,{"position":[[0,21]]}],[],[]],["opshin.tests.test_misc.misctest.test_dual_use_compil",[],[3007,{"position":[[0,53]]}],[]],["test_marketplace_compil",[3009,{"position":[[0,24]]}],[],[]],["opshin.tests.test_misc.misctest.test_marketplace_compil",[],[3010,{"position":[[0,56]]}],[]],["test_marketplace_compile_fail",[3012,{"position":[[0,29]]}],[],[]],["opshin.tests.test_misc.misctest.test_marketplace_compile_fail",[],[3013,{"position":[[0,61]]}],[]],["test_parameterized_compil",[3015,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_parameterized_compil",[],[3016,{"position":[[0,58]]}],[]],["test_dict_datum",[3018,{"position":[[0,15]]}],[],[]],["opshin.tests.test_misc.misctest.test_dict_datum",[],[3019,{"position":[[0,47]]}],[]],["test_dict_datum_wrong",[3021,{"position":[[0,21]]}],[],[]],["opshin.tests.test_misc.misctest.test_dict_datum_wrong",[],[3022,{"position":[[0,53]]}],[]],["test_removedeadvar_noissu",[3024,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_removedeadvar_noissu",[],[3025,{"position":[[0,58]]}],[]],["test_removedeadvar_noissue2",[3027,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_removedeadvar_noissue2",[],[3028,{"position":[[0,59]]}],[]],["test_removedeadvar_noissue3",[3030,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_removedeadvar_noissue3",[],[3031,{"position":[[0,59]]}],[]],["test_overopt_removedeadvar",[3033,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_overopt_removedeadvar",[],[3034,{"position":[[0,58]]}],[]],["test_opt_shared_var",[3036,{"position":[[0,19]]}],[],[]],["opshin.tests.test_misc.misctest.test_opt_shared_var",[],[3037,{"position":[[0,51]]}],[]],["test_list_expr",[3039,{"position":[[0,14]]}],[],[]],["opshin.tests.test_misc.misctest.test_list_expr",[],[3040,{"position":[[0,46]]}],[]],["test_list_expr_not_const",[3042,{"position":[[0,24]]}],[],[]],["opshin.tests.test_misc.misctest.test_list_expr_not_const",[],[3043,{"position":[[0,56]]}],[]],["test_dict_expr_not_const",[3045,{"position":[[0,24]]}],[],[]],["opshin.tests.test_misc.misctest.test_dict_expr_not_const",[],[3046,{"position":[[0,56]]}],[]],["test_redefine_poly_constr",[3048,{"position":[[0,25]]}],[],[]],["opshin.tests.test_misc.misctest.test_redefine_poly_constr",[],[3049,{"position":[[0,57]]}],[]],["test_redefine_constr",[3051,{"position":[[0,20]]}],[],[]],["opshin.tests.test_misc.misctest.test_redefine_constr",[],[3052,{"position":[[0,52]]}],[]],["test_wrap_into_generic_data",[3054,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_wrap_into_generic_data",[],[3055,{"position":[[0,59]]}],[]],["test_list_comprehension_even",[3057,{"position":[[0,28]]}],[],[]],["opshin.tests.test_misc.misctest.test_list_comprehension_even",[],[3058,{"position":[[0,60]]}],[]],["test_list_comprehension_al",[3060,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_list_comprehension_al",[],[3061,{"position":[[0,59]]}],[]],["test_dict_comprehension_even",[3063,{"position":[[0,28]]}],[],[]],["opshin.tests.test_misc.misctest.test_dict_comprehension_even",[],[3064,{"position":[[0,60]]}],[]],["test_dict_comprehension_al",[3066,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_dict_comprehension_al",[],[3067,{"position":[[0,59]]}],[]],["test_union_type_attr_access_all_record",[3069,{"position":[[0,39]]}],[],[]],["opshin.tests.test_misc.misctest.test_union_type_attr_access_all_record",[],[3070,{"position":[[0,71]]}],[]],["test_union_type_attr_access_all_records_diff_po",[3072,{"position":[[0,48]]}],[],[]],["opshin.tests.test_misc.misctest.test_union_type_attr_access_all_records_diff_po",[],[3073,{"position":[[0,80]]}],[]],["test_union_type_all_records_same_constr",[3075,{"position":[[0,39]]}],[],[]],["opshin.tests.test_misc.misctest.test_union_type_all_records_same_constr",[],[3076,{"position":[[0,71]]}],[]],["test_union_type_attr_access_all_records_same_constr",[3078,{"position":[[0,51]]}],[],[]],["opshin.tests.test_misc.misctest.test_union_type_attr_access_all_records_same_constr",[],[3079,{"position":[[0,83]]}],[]],["test_union_type_attr_access_maximum_typ",[3081,{"position":[[0,40]]}],[],[]],["opshin.tests.test_misc.misctest.test_union_type_attr_access_maximum_typ",[],[3082,{"position":[[0,72]]}],[]],["test_union_type_attr_anytyp",[3084,{"position":[[0,28]]}],[],[]],["opshin.tests.test_misc.misctest.test_union_type_attr_anytyp",[],[3085,{"position":[[0,60]]}],[]],["test_typecast_anything_int",[3087,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_typecast_anything_int",[],[3088,{"position":[[0,58]]}],[]],["test_typecast_int_anyth",[3090,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_typecast_int_anyth",[],[3091,{"position":[[0,58]]}],[]],["test_typecast_int_anything_int",[3093,{"position":[[0,30]]}],[],[]],["opshin.tests.test_misc.misctest.test_typecast_int_anything_int",[],[3094,{"position":[[0,62]]}],[]],["test_typecast_anything_int_anyth",[3096,{"position":[[0,35]]}],[],[]],["opshin.tests.test_misc.misctest.test_typecast_anything_int_anyth",[],[3097,{"position":[[0,67]]}],[]],["test_typecast_int_str",[3099,{"position":[[0,21]]}],[],[]],["opshin.tests.test_misc.misctest.test_typecast_int_str",[],[3100,{"position":[[0,53]]}],[]],["test_typecast_int_int",[3102,{"position":[[0,21]]}],[],[]],["opshin.tests.test_misc.misctest.test_typecast_int_int",[],[3103,{"position":[[0,53]]}],[]],["test_zero_ari",[3105,{"position":[[0,13]]}],[],[]],["opshin.tests.test_misc.misctest.test_zero_ari",[],[3106,{"position":[[0,45]]}],[]],["test_zero_ary_exec",[3108,{"position":[[0,18]]}],[],[]],["opshin.tests.test_misc.misctest.test_zero_ary_exec",[],[3109,{"position":[[0,50]]}],[]],["test_zero_ary_method",[3111,{"position":[[0,20]]}],[],[]],["opshin.tests.test_misc.misctest.test_zero_ary_method",[],[3112,{"position":[[0,52]]}],[]],["test_zero_ary_method_exec",[3114,{"position":[[0,25]]}],[],[]],["opshin.tests.test_misc.misctest.test_zero_ary_method_exec",[],[3115,{"position":[[0,57]]}],[]],["test_zero_ary_method_exec_suc",[3117,{"position":[[0,29]]}],[],[]],["opshin.tests.test_misc.misctest.test_zero_ary_method_exec_suc",[],[3118,{"position":[[0,61]]}],[]],["test_return_anyth",[3120,{"position":[[0,20]]}],[],[]],["opshin.tests.test_misc.misctest.test_return_anyth",[],[3121,{"position":[[0,52]]}],[]],["test_no_return_annot",[3123,{"position":[[0,25]]}],[],[]],["opshin.tests.test_misc.misctest.test_no_return_annot",[],[3124,{"position":[[0,57]]}],[]],["test_no_parameter_annot",[3126,{"position":[[0,28]]}],[],[]],["opshin.tests.test_misc.misctest.test_no_parameter_annot",[],[3127,{"position":[[0,60]]}],[]],["test_dict_items_values_deconstr",[3129,{"position":[[0,31]]}],[],[]],["opshin.tests.test_misc.misctest.test_dict_items_values_deconstr",[],[3130,{"position":[[0,63]]}],[]],["test_nested_deconstruct",[3132,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_nested_deconstruct",[],[3133,{"position":[[0,58]]}],[]],["test_no_return_annotation_no_return",[3135,{"position":[[0,35]]}],[],[]],["opshin.tests.test_misc.misctest.test_no_return_annotation_no_return",[],[3136,{"position":[[0,67]]}],[]],["test_opt_unsafe_cast",[3138,{"position":[[0,20]]}],[],[]],["opshin.tests.test_misc.misctest.test_opt_unsafe_cast",[],[3139,{"position":[[0,52]]}],[]],["test_constant_fold",[3141,{"position":[[0,21]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_fold",[],[3142,{"position":[[0,53]]}],[]],["test_constant_folding_dis",[3144,{"position":[[0,30]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_dis",[],[3145,{"position":[[0,62]]}],[]],["test_constant_folding_list",[3147,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_list",[],[3148,{"position":[[0,58]]}],[]],["test_constant_folding_dict",[3150,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_dict",[],[3151,{"position":[[0,58]]}],[]],["test_constant_folding_complex",[3153,{"position":[[0,29]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_complex",[],[3154,{"position":[[0,61]]}],[]],["test_constant_folding_plutusdata",[3156,{"position":[[0,32]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_plutusdata",[],[3157,{"position":[[0,64]]}],[]],["test_constant_folding_user_def",[3159,{"position":[[0,30]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_user_def",[],[3160,{"position":[[0,62]]}],[]],["test_constant_folding_ifels",[3162,{"position":[[0,28]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_ifels",[],[3163,{"position":[[0,60]]}],[]],["test_constant_folding_for",[3165,{"position":[[0,25]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_for",[],[3166,{"position":[[0,57]]}],[]],["test_constant_folding_for_target",[3168,{"position":[[0,32]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_for_target",[],[3169,{"position":[[0,64]]}],[]],["test_constant_folding_whil",[3171,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_whil",[],[3172,{"position":[[0,59]]}],[]],["test_constant_folding_guaranteed_branch",[3174,{"position":[[0,39]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_guaranteed_branch",[],[3175,{"position":[[0,71]]}],[]],["test_constant_folding_scop",[3177,{"position":[[0,29]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_scop",[],[3178,{"position":[[0,61]]}],[]],["test_constant_folding_no_scop",[3180,{"position":[[0,32]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_no_scop",[],[3181,{"position":[[0,64]]}],[]],["test_constant_folding_repeated_assign",[3183,{"position":[[0,37]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_repeated_assign",[],[3184,{"position":[[0,69]]}],[]],["test_constant_folding_math",[3186,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_math",[],[3187,{"position":[[0,58]]}],[]],["test_reassign_builtin",[3189,{"position":[[0,21]]}],[],[]],["opshin.tests.test_misc.misctest.test_reassign_builtin",[],[3190,{"position":[[0,53]]}],[]],["test_reassign_builtin_invalid_typ",[3192,{"position":[[0,34]]}],[],[]],["opshin.tests.test_misc.misctest.test_reassign_builtin_invalid_typ",[],[3193,{"position":[[0,66]]}],[]],["test_constant_folding_ignore_reassign",[3195,{"position":[[0,41]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_ignore_reassign",[],[3196,{"position":[[0,73]]}],[]],["test_constant_folding_no_print_ev",[3198,{"position":[[0,35]]}],[],[]],["opshin.tests.test_misc.misctest.test_constant_folding_no_print_ev",[],[3199,{"position":[[0,67]]}],[]],["test_inner_outer_state_funct",[3201,{"position":[[0,32]]}],[],[]],["opshin.tests.test_misc.misctest.test_inner_outer_state_funct",[],[3202,{"position":[[0,64]]}],[]],["test_inner_outer_state_functions_nonglob",[3204,{"position":[[0,42]]}],[],[]],["opshin.tests.test_misc.misctest.test_inner_outer_state_functions_nonglob",[],[3205,{"position":[[0,74]]}],[]],["test_outer_state_change_funct",[3207,{"position":[[0,33]]}],[],[]],["opshin.tests.test_misc.misctest.test_outer_state_change_funct",[],[3208,{"position":[[0,65]]}],[]],["test_failing_annotated_typ",[3210,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_failing_annotated_typ",[],[3211,{"position":[[0,59]]}],[]],["test_access_enclosing_variable_before_def",[3213,{"position":[[0,41]]}],[],[]],["opshin.tests.test_misc.misctest.test_access_enclosing_variable_before_def",[],[3214,{"position":[[0,73]]}],[]],["test_access_local_variable_before_assign",[3216,{"position":[[0,44]]}],[],[]],["opshin.tests.test_misc.misctest.test_access_local_variable_before_assign",[],[3217,{"position":[[0,76]]}],[]],["test_warn_bytestr",[3219,{"position":[[0,20]]}],[],[]],["opshin.tests.test_misc.misctest.test_warn_bytestr",[],[3220,{"position":[[0,52]]}],[]],["test_script_context_str_format_0_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[3222,{"position":[[0,939]]}],[],[]],["opshin.tests.test_misc.misctest.test_script_context_str_format_0_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[],[3223,{"position":[[0,971]]}],[]],["test_script_context_str_format_1_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820797a1e1720b63621c6b185088184cb8e23af6e46b55bd83e7a91024c823a6c2affffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[3225,{"position":[[0,959]]}],[],[]],["opshin.tests.test_misc.misctest.test_script_context_str_format_1_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820797a1e1720b63621c6b185088184cb8e23af6e46b55bd83e7a91024c823a6c2affffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[],[3226,{"position":[[0,991]]}],[]],["test_script_context_str_format_2_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a1401a000f4240d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff9f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffa1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820c17c32f6433ae22c2acaebfb796bbfaee3993ff7ebb58a2bac6b4a3bdd2f6d28ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[3228,{"position":[[0,1141]]}],[],[]],["opshin.tests.test_misc.misctest.test_script_context_str_format_2_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a1401a000f4240d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff9f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffa1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820c17c32f6433ae22c2acaebfb796bbfaee3993ff7ebb58a2bac6b4a3bdd2f6d28ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[],[3229,{"position":[[0,1173]]}],[]],["test_script_context_str_format",[3231,{"position":[[0,30]]}],[],[]],["opshin.tests.test_misc.misctest.test_script_context_str_format",[],[3232,{"position":[[0,62]]}],[]],["test_uplc_builtin",[3234,{"position":[[0,17]]}],[],[]],["opshin.tests.test_misc.misctest.test_uplc_builtin",[],[3235,{"position":[[0,49]]}],[]],["test_trace_ord",[3237,{"position":[[0,16]]}],[],[]],["opshin.tests.test_misc.misctest.test_trace_ord",[],[3238,{"position":[[0,48]]}],[]],["test_print_empti",[3240,{"position":[[0,16]]}],[],[]],["opshin.tests.test_misc.misctest.test_print_empti",[],[3241,{"position":[[0,48]]}],[]],["test_cast_bool_it",[3243,{"position":[[0,18]]}],[],[]],["opshin.tests.test_misc.misctest.test_cast_bool_it",[],[3244,{"position":[[0,50]]}],[]],["test_cast_bool_ite_expr",[3246,{"position":[[0,23]]}],[],[]],["opshin.tests.test_misc.misctest.test_cast_bool_ite_expr",[],[3247,{"position":[[0,55]]}],[]],["test_cast_bool_whil",[3249,{"position":[[0,20]]}],[],[]],["opshin.tests.test_misc.misctest.test_cast_bool_whil",[],[3250,{"position":[[0,52]]}],[]],["test_cast_bool_boolop",[3252,{"position":[[0,22]]}],[],[]],["opshin.tests.test_misc.misctest.test_cast_bool_boolop",[],[3253,{"position":[[0,54]]}],[]],["test_isinstance_cast_if",[3255,{"position":[[0,23]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_if",[],[3256,{"position":[[0,55]]}],[]],["test_complex_isinstance_cast_if",[3258,{"position":[[0,31]]}],[],[]],["opshin.tests.test_misc.misctest.test_complex_isinstance_cast_if",[],[3259,{"position":[[0,63]]}],[]],["test_isinstance_cast_ifexpr",[3261,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_ifexpr",[],[3262,{"position":[[0,59]]}],[]],["test_isinstance_cast_whil",[3264,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_whil",[],[3265,{"position":[[0,58]]}],[]],["test_isinstance_cast_random",[3267,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_random",[],[3268,{"position":[[0,59]]}],[]],["test_isinstance_cast_shortcut_and",[3270,{"position":[[0,33]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_shortcut_and",[],[3271,{"position":[[0,65]]}],[]],["test_isinstance_cast_assert",[3273,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_assert",[],[3274,{"position":[[0,59]]}],[]],["test_isinstance_cast_assert_if",[3276,{"position":[[0,30]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_assert_if",[],[3277,{"position":[[0,62]]}],[]],["test_isinstance_cast_complex_or",[3279,{"position":[[0,31]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_complex_or",[],[3280,{"position":[[0,63]]}],[]],["test_isinstance_cast_complex_or_sameconstr",[3282,{"position":[[0,42]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_complex_or_sameconstr",[],[3283,{"position":[[0,74]]}],[]],["test_isinstance_cast_complex_not",[3285,{"position":[[0,32]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_complex_not",[],[3286,{"position":[[0,64]]}],[]],["test_isinstance_cast_complex_ifels",[3288,{"position":[[0,35]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_complex_ifels",[],[3289,{"position":[[0,67]]}],[]],["test_isinstance_cast_complex_or_els",[3291,{"position":[[0,36]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_complex_or_els",[],[3292,{"position":[[0,68]]}],[]],["test_isinstance_cast_complex_and_els",[3294,{"position":[[0,37]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_complex_and_els",[],[3295,{"position":[[0,69]]}],[]],["test_isinstance_cast_complex_and",[3297,{"position":[[0,32]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_complex_and",[],[3298,{"position":[[0,64]]}],[]],["test_isinstance_cast_shortcut_or",[3300,{"position":[[0,32]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_shortcut_or",[],[3301,{"position":[[0,64]]}],[]],["test_uniontype_if",[3303,{"position":[[0,17]]}],[],[]],["opshin.tests.test_misc.misctest.test_uniontype_if",[],[3304,{"position":[[0,49]]}],[]],["test_if_no_retype_no_plutusdata",[3306,{"position":[[0,31]]}],[],[]],["opshin.tests.test_misc.misctest.test_if_no_retype_no_plutusdata",[],[3307,{"position":[[0,63]]}],[]],["test_while_no_retype_no_plutusdata",[3309,{"position":[[0,34]]}],[],[]],["opshin.tests.test_misc.misctest.test_while_no_retype_no_plutusdata",[],[3310,{"position":[[0,66]]}],[]],["test_retype_whil",[3312,{"position":[[0,17]]}],[],[]],["opshin.tests.test_misc.misctest.test_retype_whil",[],[3313,{"position":[[0,49]]}],[]],["test_retype_if_branch_correct",[3315,{"position":[[0,29]]}],[],[]],["opshin.tests.test_misc.misctest.test_retype_if_branch_correct",[],[3316,{"position":[[0,61]]}],[]],["test_retype_while_branch_correct",[3318,{"position":[[0,32]]}],[],[]],["opshin.tests.test_misc.misctest.test_retype_while_branch_correct",[],[3319,{"position":[[0,64]]}],[]],["test_retype_while_wrong_after_it",[3321,{"position":[[0,34]]}],[],[]],["opshin.tests.test_misc.misctest.test_retype_while_wrong_after_it",[],[3322,{"position":[[0,66]]}],[]],["test_retyp",[3324,{"position":[[0,11]]}],[],[]],["opshin.tests.test_misc.misctest.test_retyp",[],[3325,{"position":[[0,43]]}],[]],["test_retype_if_primit",[3327,{"position":[[0,25]]}],[],[]],["opshin.tests.test_misc.misctest.test_retype_if_primit",[],[3328,{"position":[[0,57]]}],[]],["test_in_list",[3330,{"position":[[0,12]]}],[],[]],["opshin.tests.test_misc.misctest.test_in_list",[],[3331,{"position":[[0,44]]}],[]],["test_comparison_chain",[3333,{"position":[[0,24]]}],[],[]],["opshin.tests.test_misc.misctest.test_comparison_chain",[],[3334,{"position":[[0,56]]}],[]],["test_double_import_offset",[3336,{"position":[[0,25]]}],[],[]],["opshin.tests.test_misc.misctest.test_double_import_offset",[],[3337,{"position":[[0,57]]}],[]],["test_double_import_direct",[3339,{"position":[[0,25]]}],[],[]],["opshin.tests.test_misc.misctest.test_double_import_direct",[],[3340,{"position":[[0,57]]}],[]],["test_double_import_deep",[3342,{"position":[[0,23]]}],[],[]],["opshin.tests.test_misc.misctest.test_double_import_deep",[],[3343,{"position":[[0,55]]}],[]],["test_bytearray_altern",[3345,{"position":[[0,26]]}],[],[]],["opshin.tests.test_misc.misctest.test_bytearray_altern",[],[3346,{"position":[[0,58]]}],[]],["test_bytestring_altern",[3348,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_bytestring_altern",[],[3349,{"position":[[0,59]]}],[]],["test_boolop_chain",[3351,{"position":[[0,20]]}],[],[]],["opshin.tests.test_misc.misctest.test_boolop_chain",[],[3352,{"position":[[0,52]]}],[]],["test_wrapping_contract_appli",[3354,{"position":[[0,28]]}],[],[]],["opshin.tests.test_misc.misctest.test_wrapping_contract_appli",[],[3355,{"position":[[0,60]]}],[]],["test_wrapping_contract_dump_load",[3357,{"position":[[0,32]]}],[],[]],["opshin.tests.test_misc.misctest.test_wrapping_contract_dump_load",[],[3358,{"position":[[0,64]]}],[]],["test_bridg",[3360,{"position":[[0,11]]}],[],[]],["opshin.tests.test_misc.misctest.test_bridg",[],[3361,{"position":[[0,43]]}],[]],["test_forbidden_overwrit",[3363,{"position":[[0,24]]}],[],[]],["opshin.tests.test_misc.misctest.test_forbidden_overwrit",[],[3364,{"position":[[0,56]]}],[]],["test_compilation_deterministic_local_00_examples_list_comprehensions_pi",[3366,{"position":[[0,71]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_00_examples_list_comprehensions_pi",[],[3367,{"position":[[0,103]]}],[]],["test_compilation_deterministic_local_01_examples_fib_rec_pi",[3369,{"position":[[0,59]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_01_examples_fib_rec_pi",[],[3370,{"position":[[0,91]]}],[]],["test_compilation_deterministic_local_02_examples_hello_world_pi",[3372,{"position":[[0,63]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_02_examples_hello_world_pi",[],[3373,{"position":[[0,95]]}],[]],["test_compilation_deterministic_local_03_examples_dict_comprehensions_pi",[3375,{"position":[[0,71]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_03_examples_dict_comprehensions_pi",[],[3376,{"position":[[0,103]]}],[]],["test_compilation_deterministic_local_04_examples_mult_for_pi",[3378,{"position":[[0,60]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_04_examples_mult_for_pi",[],[3379,{"position":[[0,92]]}],[]],["test_compilation_deterministic_local_05_examples_inspect_script_context_pi",[3381,{"position":[[0,74]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_05_examples_inspect_script_context_pi",[],[3382,{"position":[[0,106]]}],[]],["test_compilation_deterministic_local_06_examples_showcase_pi",[3384,{"position":[[0,60]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_06_examples_showcase_pi",[],[3385,{"position":[[0,92]]}],[]],["test_compilation_deterministic_local_07_examples_dict_datum_pi",[3387,{"position":[[0,62]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_07_examples_dict_datum_pi",[],[3388,{"position":[[0,94]]}],[]],["test_compilation_deterministic_local_08_examples_datum_cast_pi",[3390,{"position":[[0,62]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_08_examples_datum_cast_pi",[],[3391,{"position":[[0,94]]}],[]],["test_compilation_deterministic_local_09_examples_complex_datum_pi",[3393,{"position":[[0,65]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_09_examples_complex_datum_pi",[],[3394,{"position":[[0,97]]}],[]],["test_compilation_deterministic_local_10_examples_sum_pi",[3396,{"position":[[0,55]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_10_examples_sum_pi",[],[3397,{"position":[[0,87]]}],[]],["test_compilation_deterministic_local_11_examples_mult_while_pi",[3399,{"position":[[0,62]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_11_examples_mult_while_pi",[],[3400,{"position":[[0,94]]}],[]],["test_compilation_deterministic_local_12_examples_fib_iter_pi",[3402,{"position":[[0,60]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_12_examples_fib_iter_pi",[],[3403,{"position":[[0,92]]}],[]],["test_compilation_deterministic_local_13_examples_list_datum_pi",[3405,{"position":[[0,62]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_13_examples_list_datum_pi",[],[3406,{"position":[[0,94]]}],[]],["test_compilation_deterministic_local_14_examples_smart_contracts_micropayments_pi",[3408,{"position":[[0,81]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_14_examples_smart_contracts_micropayments_pi",[],[3409,{"position":[[0,113]]}],[]],["test_compilation_deterministic_local_15_examples_smart_contracts_assert_sum_pi",[3411,{"position":[[0,78]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_15_examples_smart_contracts_assert_sum_pi",[],[3412,{"position":[[0,110]]}],[]],["test_compilation_deterministic_local_16_examples_smart_contracts_wrapped_token_pi",[3414,{"position":[[0,81]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_16_examples_smart_contracts_wrapped_token_pi",[],[3415,{"position":[[0,113]]}],[]],["test_compilation_deterministic_local_17_examples_smart_contracts_simple_script_pi",[3417,{"position":[[0,81]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_17_examples_smart_contracts_simple_script_pi",[],[3418,{"position":[[0,113]]}],[]],["test_compilation_deterministic_local_18_examples_smart_contracts_marketplace_pi",[3420,{"position":[[0,79]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_18_examples_smart_contracts_marketplace_pi",[],[3421,{"position":[[0,111]]}],[]],["test_compilation_deterministic_local_19_examples_smart_contracts_gift_pi",[3423,{"position":[[0,72]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_19_examples_smart_contracts_gift_pi",[],[3424,{"position":[[0,104]]}],[]],["test_compilation_deterministic_local_20_examples_smart_contracts_parameterized_pi",[3426,{"position":[[0,81]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_20_examples_smart_contracts_parameterized_pi",[],[3427,{"position":[[0,113]]}],[]],["test_compilation_deterministic_local_21_examples_smart_contracts_always_true_pi",[3429,{"position":[[0,79]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_21_examples_smart_contracts_always_true_pi",[],[3430,{"position":[[0,111]]}],[]],["test_compilation_deterministic_local_22_examples_smart_contracts_dual_use_pi",[3432,{"position":[[0,76]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_local_22_examples_smart_contracts_dual_use_pi",[],[3433,{"position":[[0,108]]}],[]],["test_compilation_deterministic_loc",[3435,{"position":[[0,36]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_loc",[],[3436,{"position":[[0,68]]}],[]],["test_compilation_deterministic_external_00_examples_list_comprehensions_pi",[3438,{"position":[[0,74]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_00_examples_list_comprehensions_pi",[],[3439,{"position":[[0,106]]}],[]],["test_compilation_deterministic_external_01_examples_fib_rec_pi",[3441,{"position":[[0,62]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_01_examples_fib_rec_pi",[],[3442,{"position":[[0,94]]}],[]],["test_compilation_deterministic_external_02_examples_hello_world_pi",[3444,{"position":[[0,66]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_02_examples_hello_world_pi",[],[3445,{"position":[[0,98]]}],[]],["test_compilation_deterministic_external_03_examples_dict_comprehensions_pi",[3447,{"position":[[0,74]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_03_examples_dict_comprehensions_pi",[],[3448,{"position":[[0,106]]}],[]],["test_compilation_deterministic_external_04_examples_mult_for_pi",[3450,{"position":[[0,63]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_04_examples_mult_for_pi",[],[3451,{"position":[[0,95]]}],[]],["test_compilation_deterministic_external_05_examples_inspect_script_context_pi",[3453,{"position":[[0,77]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_05_examples_inspect_script_context_pi",[],[3454,{"position":[[0,109]]}],[]],["test_compilation_deterministic_external_06_examples_showcase_pi",[3456,{"position":[[0,63]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_06_examples_showcase_pi",[],[3457,{"position":[[0,95]]}],[]],["test_compilation_deterministic_external_07_examples_dict_datum_pi",[3459,{"position":[[0,65]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_07_examples_dict_datum_pi",[],[3460,{"position":[[0,97]]}],[]],["test_compilation_deterministic_external_08_examples_datum_cast_pi",[3462,{"position":[[0,65]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_08_examples_datum_cast_pi",[],[3463,{"position":[[0,97]]}],[]],["test_compilation_deterministic_external_09_examples_complex_datum_pi",[3465,{"position":[[0,68]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_09_examples_complex_datum_pi",[],[3466,{"position":[[0,100]]}],[]],["test_compilation_deterministic_external_10_examples_sum_pi",[3468,{"position":[[0,58]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_10_examples_sum_pi",[],[3469,{"position":[[0,90]]}],[]],["test_compilation_deterministic_external_11_examples_mult_while_pi",[3471,{"position":[[0,65]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_11_examples_mult_while_pi",[],[3472,{"position":[[0,97]]}],[]],["test_compilation_deterministic_external_12_examples_fib_iter_pi",[3474,{"position":[[0,63]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_12_examples_fib_iter_pi",[],[3475,{"position":[[0,95]]}],[]],["test_compilation_deterministic_external_13_examples_list_datum_pi",[3477,{"position":[[0,65]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_13_examples_list_datum_pi",[],[3478,{"position":[[0,97]]}],[]],["test_compilation_deterministic_external_14_examples_smart_contracts_micropayments_pi",[3480,{"position":[[0,84]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_14_examples_smart_contracts_micropayments_pi",[],[3481,{"position":[[0,116]]}],[]],["test_compilation_deterministic_external_15_examples_smart_contracts_assert_sum_pi",[3483,{"position":[[0,81]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_15_examples_smart_contracts_assert_sum_pi",[],[3484,{"position":[[0,113]]}],[]],["test_compilation_deterministic_external_16_examples_smart_contracts_wrapped_token_pi",[3486,{"position":[[0,84]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_16_examples_smart_contracts_wrapped_token_pi",[],[3487,{"position":[[0,116]]}],[]],["test_compilation_deterministic_external_17_examples_smart_contracts_simple_script_pi",[3489,{"position":[[0,84]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_17_examples_smart_contracts_simple_script_pi",[],[3490,{"position":[[0,116]]}],[]],["test_compilation_deterministic_external_18_examples_smart_contracts_marketplace_pi",[3492,{"position":[[0,82]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_18_examples_smart_contracts_marketplace_pi",[],[3493,{"position":[[0,114]]}],[]],["test_compilation_deterministic_external_19_examples_smart_contracts_gift_pi",[3495,{"position":[[0,75]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_19_examples_smart_contracts_gift_pi",[],[3496,{"position":[[0,107]]}],[]],["test_compilation_deterministic_external_20_examples_smart_contracts_parameterized_pi",[3498,{"position":[[0,84]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_20_examples_smart_contracts_parameterized_pi",[],[3499,{"position":[[0,116]]}],[]],["test_compilation_deterministic_external_21_examples_smart_contracts_always_true_pi",[3501,{"position":[[0,82]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_21_examples_smart_contracts_always_true_pi",[],[3502,{"position":[[0,114]]}],[]],["test_compilation_deterministic_external_22_examples_smart_contracts_dual_use_pi",[3504,{"position":[[0,79]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_external_22_examples_smart_contracts_dual_use_pi",[],[3505,{"position":[[0,111]]}],[]],["test_compilation_deterministic_extern",[3507,{"position":[[0,39]]}],[],[]],["opshin.tests.test_misc.misctest.test_compilation_deterministic_extern",[],[3508,{"position":[[0,71]]}],[]],["test_return_illeg",[3510,{"position":[[0,19]]}],[],[]],["opshin.tests.test_misc.misctest.test_return_illeg",[],[3511,{"position":[[0,51]]}],[]],["test_return_in_loop",[3513,{"position":[[0,19]]}],[],[]],["opshin.tests.test_misc.misctest.test_return_in_loop",[],[3514,{"position":[[0,51]]}],[]],["test_return_in_for",[3516,{"position":[[0,18]]}],[],[]],["opshin.tests.test_misc.misctest.test_return_in_for",[],[3517,{"position":[[0,50]]}],[]],["test_return_in_if",[3519,{"position":[[0,17]]}],[],[]],["opshin.tests.test_misc.misctest.test_return_in_if",[],[3520,{"position":[[0,49]]}],[]],["test_return_in_if_same_typ",[3522,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_return_in_if_same_typ",[],[3523,{"position":[[0,59]]}],[]],["test_isinstance_cast_if2",[3525,{"position":[[0,24]]}],[],[]],["opshin.tests.test_misc.misctest.test_isinstance_cast_if2",[],[3526,{"position":[[0,56]]}],[]],["test_return_in_if_missing_return",[3528,{"position":[[0,32]]}],[],[]],["opshin.tests.test_misc.misctest.test_return_in_if_missing_return",[],[3529,{"position":[[0,64]]}],[]],["test_different_return_types_anyth",[3531,{"position":[[0,36]]}],[],[]],["opshin.tests.test_misc.misctest.test_different_return_types_anyth",[],[3532,{"position":[[0,68]]}],[]],["test_different_return_types_while_loop",[3534,{"position":[[0,38]]}],[],[]],["opshin.tests.test_misc.misctest.test_different_return_types_while_loop",[],[3535,{"position":[[0,70]]}],[]],["test_different_return_types_for_loop",[3537,{"position":[[0,36]]}],[],[]],["opshin.tests.test_misc.misctest.test_different_return_types_for_loop",[],[3538,{"position":[[0,68]]}],[]],["test_return_else_loop_whil",[3540,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_return_else_loop_whil",[],[3541,{"position":[[0,59]]}],[]],["test_return_else_loop_for",[3543,{"position":[[0,25]]}],[],[]],["opshin.tests.test_misc.misctest.test_return_else_loop_for",[],[3544,{"position":[[0,57]]}],[]],["test_empty_list_int",[3546,{"position":[[0,19]]}],[],[]],["opshin.tests.test_misc.misctest.test_empty_list_int",[],[3547,{"position":[[0,51]]}],[]],["test_empty_list_data",[3549,{"position":[[0,20]]}],[],[]],["opshin.tests.test_misc.misctest.test_empty_list_data",[],[3550,{"position":[[0,52]]}],[]],["test_empty_list_int_constant_fold",[3552,{"position":[[0,36]]}],[],[]],["opshin.tests.test_misc.misctest.test_empty_list_int_constant_fold",[],[3553,{"position":[[0,68]]}],[]],["test_empty_dict_int_int",[3555,{"position":[[0,23]]}],[],[]],["opshin.tests.test_misc.misctest.test_empty_dict_int_int",[],[3556,{"position":[[0,55]]}],[]],["test_empty_dict_int_int_constant_fold",[3558,{"position":[[0,40]]}],[],[]],["opshin.tests.test_misc.misctest.test_empty_dict_int_int_constant_fold",[],[3559,{"position":[[0,72]]}],[]],["test_empty_dict_displaced_constant_fold",[3561,{"position":[[0,42]]}],[],[]],["opshin.tests.test_misc.misctest.test_empty_dict_displaced_constant_fold",[],[3562,{"position":[[0,74]]}],[]],["test_union_subset_cal",[3564,{"position":[[0,22]]}],[],[]],["opshin.tests.test_misc.misctest.test_union_subset_cal",[],[3565,{"position":[[0,54]]}],[]],["test_union_superset_cal",[3567,{"position":[[0,24]]}],[],[]],["opshin.tests.test_misc.misctest.test_union_superset_cal",[],[3568,{"position":[[0,56]]}],[]],["test_merge_function_same_capture_different_typ",[3570,{"position":[[0,47]]}],[],[]],["opshin.tests.test_misc.misctest.test_merge_function_same_capture_different_typ",[],[3571,{"position":[[0,79]]}],[]],["test_merge_function_same_capture_same_typ",[3573,{"position":[[0,42]]}],[],[]],["opshin.tests.test_misc.misctest.test_merge_function_same_capture_same_typ",[],[3574,{"position":[[0,74]]}],[]],["test_merge_print",[3576,{"position":[[0,16]]}],[],[]],["opshin.tests.test_misc.misctest.test_merge_print",[],[3577,{"position":[[0,48]]}],[]],["test_print_reassign",[3579,{"position":[[0,19]]}],[],[]],["opshin.tests.test_misc.misctest.test_print_reassign",[],[3580,{"position":[[0,51]]}],[]],["test_str_constr_reassign",[3582,{"position":[[0,24]]}],[],[]],["opshin.tests.test_misc.misctest.test_str_constr_reassign",[],[3583,{"position":[[0,56]]}],[]],["test_class_attribute_access",[3585,{"position":[[0,27]]}],[],[]],["opshin.tests.test_misc.misctest.test_class_attribute_access",[],[3586,{"position":[[0,59]]}],[]],["test_constr_id_access",[3588,{"position":[[0,21]]}],[],[]],["opshin.tests.test_misc.misctest.test_constr_id_access",[],[3589,{"position":[[0,53]]}],[]],["test_id_map_equals_pycardano",[3591,{"position":[[0,28]]}],[],[]],["opshin.tests.test_misc.misctest.test_id_map_equals_pycardano",[],[3592,{"position":[[0,60]]}],[]],["test_empty_return",[3594,{"position":[[0,17]]}],[],[]],["opshin.tests.test_misc.misctest.test_empty_return",[],[3595,{"position":[[0,49]]}],[]],["test_stdlib",[3597,{"position":[[0,11]]}],[],[]],["opshin.tests.test_stdlib",[],[3598,{"position":[[0,24]]}],[]],["stdlibtest",[3600,{"position":[[0,10]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest",[],[3601,{"position":[[0,35]]}],[]],["test_dict_get",[3603,{"position":[[0,13]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_dict_get",[],[3604,{"position":[[0,49]]}],[]],["test_dict_subscript",[3606,{"position":[[0,19]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_dict_subscript",[],[3607,{"position":[[0,55]]}],[]],["test_list_index",[3609,{"position":[[0,15]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_list_index",[],[3610,{"position":[[0,51]]}],[]],["test_dict_key",[3612,{"position":[[0,14]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_dict_key",[],[3613,{"position":[[0,50]]}],[]],["test_dict_valu",[3615,{"position":[[0,16]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_dict_valu",[],[3616,{"position":[[0,52]]}],[]],["test_dict_items_keys_sum",[3618,{"position":[[0,24]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_dict_items_keys_sum",[],[3619,{"position":[[0,60]]}],[]],["test_dict_items_values_sum",[3621,{"position":[[0,26]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_dict_items_values_sum",[],[3622,{"position":[[0,62]]}],[]],["test_str_encod",[3624,{"position":[[0,15]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_str_encod",[],[3625,{"position":[[0,51]]}],[]],["test_bytes_decod",[3627,{"position":[[0,17]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_bytes_decod",[],[3628,{"position":[[0,53]]}],[]],["test_bytes_hex",[3630,{"position":[[0,14]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_bytes_hex",[],[3631,{"position":[[0,50]]}],[]],["test_constant_bytestr",[3633,{"position":[[0,24]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_constant_bytestr",[],[3634,{"position":[[0,60]]}],[]],["test_constant_integ",[3636,{"position":[[0,21]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_constant_integ",[],[3637,{"position":[[0,57]]}],[]],["test_constant_str",[3639,{"position":[[0,20]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_constant_str",[],[3640,{"position":[[0,56]]}],[]],["test_constant_unit",[3642,{"position":[[0,18]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_constant_unit",[],[3643,{"position":[[0,54]]}],[]],["test_constant_bool",[3645,{"position":[[0,18]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_constant_bool",[],[3646,{"position":[[0,54]]}],[]],["test_plutusdata_to_cbor",[3648,{"position":[[0,23]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_plutusdata_to_cbor",[],[3649,{"position":[[0,59]]}],[]],["test_union_to_cbor",[3651,{"position":[[0,18]]}],[],[]],["opshin.tests.test_stdlib.stdlibtest.test_union_to_cbor",[],[3652,{"position":[[0,54]]}],[]],["test_ledg",[3654,{"position":[[0,11]]}],[],[]],["opshin.tests.test_ledg",[],[3655,{"position":[[0,24]]}],[]],["test_interv",[3657,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ledger.test_interv",[],[3658,{"position":[[0,38]]}],[]],["test_ordering_compar",[3660,{"position":[[0,21]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_ordering_compar",[],[3661,{"position":[[0,60]]}],[]],["test_commutative_compare_extend",[3663,{"position":[[0,33]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_commutative_compare_extend",[],[3664,{"position":[[0,72]]}],[]],["test_ordering_compare_extend",[3666,{"position":[[0,30]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_ordering_compare_extend",[],[3667,{"position":[[0,69]]}],[]],["test_ordering_compare_lower_bound",[3669,{"position":[[0,33]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_ordering_compare_lower_bound",[],[3670,{"position":[[0,72]]}],[]],["test_commutative_lower_bound",[3672,{"position":[[0,28]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_commutative_lower_bound",[],[3673,{"position":[[0,67]]}],[]],["test_ordering_compare_upper_bound",[3675,{"position":[[0,33]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_ordering_compare_upper_bound",[],[3676,{"position":[[0,72]]}],[]],["test_commutative_compare_upper_bound",[3678,{"position":[[0,36]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_commutative_compare_upper_bound",[],[3679,{"position":[[0,75]]}],[]],["test_contain",[3681,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_contain",[],[3682,{"position":[[0,52]]}],[]],["test_fuzz_make_from",[3684,{"position":[[0,19]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_fuzz_make_from",[],[3685,{"position":[[0,58]]}],[]],["test_fuzz_make_rang",[3687,{"position":[[0,20]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_fuzz_make_rang",[],[3688,{"position":[[0,59]]}],[]],["test_fuzz_make_to",[3690,{"position":[[0,17]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_fuzz_make_to",[],[3691,{"position":[[0,56]]}],[]],["test_fuzz_compare_extended_help",[3693,{"position":[[0,33]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_fuzz_compare_extended_help",[],[3694,{"position":[[0,72]]}],[]],["test_get_bool",[3696,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_get_bool",[],[3697,{"position":[[0,52]]}],[]],["test_make_to_in_make_rang",[3699,{"position":[[0,26]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_make_to_in_make_rang",[],[3700,{"position":[[0,65]]}],[]],["test_make_from_in_make_rang",[3702,{"position":[[0,28]]}],[],[]],["opshin.tests.test_ledger.test_interval.test_make_from_in_make_rang",[],[3703,{"position":[[0,67]]}],[]],["test_api_v2",[3705,{"position":[[0,11]]}],[],[]],["opshin.tests.test_ledger.test_api_v2",[],[3706,{"position":[[0,36]]}],[]],["test_script_context_repr_correct_0_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[3708,{"position":[[0,941]]}],[],[]],["opshin.tests.test_ledger.test_api_v2.test_script_context_repr_correct_0_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[],[3709,{"position":[[0,978]]}],[]],["test_script_context_repr_correct_1_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820797a1e1720b63621c6b185088184cb8e23af6e46b55bd83e7a91024c823a6c2affffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[3711,{"position":[[0,961]]}],[],[]],["opshin.tests.test_ledger.test_api_v2.test_script_context_repr_correct_1_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820797a1e1720b63621c6b185088184cb8e23af6e46b55bd83e7a91024c823a6c2affffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[],[3712,{"position":[[0,998]]}],[]],["test_script_context_repr_correct_2_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a1401a000f4240d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff9f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffa1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820c17c32f6433ae22c2acaebfb796bbfaee3993ff7ebb58a2bac6b4a3bdd2f6d28ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[3714,{"position":[[0,1143]]}],[],[]],["opshin.tests.test_ledger.test_api_v2.test_script_context_repr_correct_2_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a1401a000f4240d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff9f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffa1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820c17c32f6433ae22c2acaebfb796bbfaee3993ff7ebb58a2bac6b4a3bdd2f6d28ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff",[],[3715,{"position":[[0,1180]]}],[]],["test_hashlib",[3717,{"position":[[0,12]]}],[],[]],["opshin.tests.test_hashlib",[],[3718,{"position":[[0,25]]}],[]],["test_sha256",[3720,{"position":[[0,11]]}],[],[]],["opshin.tests.test_hashlib.test_sha256",[],[3721,{"position":[[0,37]]}],[]],["test_sha3_256",[3723,{"position":[[0,13]]}],[],[]],["opshin.tests.test_hashlib.test_sha3_256",[],[3724,{"position":[[0,39]]}],[]],["test_blake2b",[3726,{"position":[[0,12]]}],[],[]],["opshin.tests.test_hashlib.test_blake2b",[],[3727,{"position":[[0,38]]}],[]],["test_std",[3729,{"position":[[0,8]]}],[],[]],["opshin.tests.test_std",[],[3730,{"position":[[0,21]]}],[]],["test_fract",[3732,{"position":[[0,14]]}],[],[]],["opshin.tests.test_std.test_fract",[],[3733,{"position":[[0,36]]}],[]],["native_fraction_from_oc_fract",[3735,{"position":[[0,32]]}],[],[]],["opshin.tests.test_std.test_fractions.native_fraction_from_oc_fract",[],[3736,{"position":[[0,69]]}],[]],["test_add",[3738,{"position":[[0,8]]}],[],[]],["opshin.tests.test_std.test_fractions.test_add",[],[3739,{"position":[[0,45]]}],[]],["test_sub",[3741,{"position":[[0,8]]}],[],[]],["opshin.tests.test_std.test_fractions.test_sub",[],[3742,{"position":[[0,45]]}],[]],["test_neg",[3744,{"position":[[0,8]]}],[],[]],["opshin.tests.test_std.test_fractions.test_neg",[],[3745,{"position":[[0,45]]}],[]],["test_mul",[3747,{"position":[[0,8]]}],[],[]],["opshin.tests.test_std.test_fractions.test_mul",[],[3748,{"position":[[0,45]]}],[]],["test_div",[3750,{"position":[[0,8]]}],[],[]],["opshin.tests.test_std.test_fractions.test_div",[],[3751,{"position":[[0,45]]}],[]],["test_norm_sign",[3753,{"position":[[0,14]]}],[],[]],["opshin.tests.test_std.test_fractions.test_norm_sign",[],[3754,{"position":[[0,51]]}],[]],["test_norm",[3756,{"position":[[0,9]]}],[],[]],["opshin.tests.test_std.test_fractions.test_norm",[],[3757,{"position":[[0,46]]}],[]],["test_g",[3759,{"position":[[0,7]]}],[],[]],["opshin.tests.test_std.test_fractions.test_g",[],[3760,{"position":[[0,44]]}],[]],["test_l",[3762,{"position":[[0,7]]}],[],[]],["opshin.tests.test_std.test_fractions.test_l",[],[3763,{"position":[[0,44]]}],[]],["test_lt",[3765,{"position":[[0,7]]}],[],[]],["opshin.tests.test_std.test_fractions.test_lt",[],[3766,{"position":[[0,44]]}],[]],["test_gt",[3768,{"position":[[0,7]]}],[],[]],["opshin.tests.test_std.test_fractions.test_gt",[],[3769,{"position":[[0,44]]}],[]],["test_eq",[3771,{"position":[[0,7]]}],[],[]],["opshin.tests.test_std.test_fractions.test_eq",[],[3772,{"position":[[0,44]]}],[]],["test_floor",[3774,{"position":[[0,10]]},3879,{"position":[[0,10]]}],[],[]],["opshin.tests.test_std.test_fractions.test_floor",[],[3775,{"position":[[0,47]]}],[]],["test_ceil",[3777,{"position":[[0,9]]},3876,{"position":[[0,9]]}],[],[]],["opshin.tests.test_std.test_fractions.test_ceil",[],[3778,{"position":[[0,46]]}],[]],["test_bitmap",[3780,{"position":[[0,11]]},4647,{"position":[[0,11]]}],[],[]],["opshin.tests.test_std.test_bitmap",[],[3781,{"position":[[0,33]]}],[]],["test_init_bitmap",[3783,{"position":[[0,16]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_init_bitmap",[],[3784,{"position":[[0,50]]}],[]],["bytes_and_index",[3786,{"position":[[0,15]]}],[],[]],["opshin.tests.test_std.test_bitmap.bytes_and_index",[],[3787,{"position":[[0,49]]}],[]],["test_test_bitmap",[3789,{"position":[[0,16]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_test_bitmap",[],[3790,{"position":[[0,50]]}],[]],["test__set_bitmap",[3792,{"position":[[0,16]]}],[],[]],["opshin.tests.test_std.test_bitmap.test__set_bitmap",[],[3793,{"position":[[0,50]]}],[]],["test_set_bitmap",[3795,{"position":[[0,15]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_set_bitmap",[],[3796,{"position":[[0,49]]}],[]],["test_reset_bitmap",[3798,{"position":[[0,17]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_reset_bitmap",[],[3799,{"position":[[0,51]]}],[]],["test_flip_bitmap",[3801,{"position":[[0,16]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_flip_bitmap",[],[3802,{"position":[[0,50]]}],[]],["test_size_bitmap",[3804,{"position":[[0,16]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_size_bitmap",[],[3805,{"position":[[0,50]]}],[]],["test_all_bitmap",[3807,{"position":[[0,15]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_all_bitmap",[],[3808,{"position":[[0,49]]}],[]],["test_any_bitmap",[3810,{"position":[[0,15]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_any_bitmap",[],[3811,{"position":[[0,49]]}],[]],["test_none_bitmap",[3813,{"position":[[0,16]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_none_bitmap",[],[3814,{"position":[[0,50]]}],[]],["test_flip_roundtrip",[3816,{"position":[[0,19]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_flip_roundtrip",[],[3817,{"position":[[0,53]]}],[]],["test_set_test",[3819,{"position":[[0,13]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_set_test",[],[3820,{"position":[[0,47]]}],[]],["test_reset_test",[3822,{"position":[[0,15]]}],[],[]],["opshin.tests.test_std.test_bitmap.test_reset_test",[],[3823,{"position":[[0,49]]}],[]],["test_integr",[3825,{"position":[[0,14]]}],[],[]],["opshin.tests.test_std.test_integr",[],[3826,{"position":[[0,36]]}],[]],["test_integrity_check_0",[3828,{"position":[[0,22]]}],[],[]],["opshin.tests.test_std.test_integrity.test_integrity_check_0",[],[3829,{"position":[[0,59]]}],[]],["test_integrity_check_1",[3831,{"position":[[0,22]]}],[],[]],["opshin.tests.test_std.test_integrity.test_integrity_check_1",[],[3832,{"position":[[0,59]]}],[]],["test_integrity_check_2",[3834,{"position":[[0,22]]}],[],[]],["opshin.tests.test_std.test_integrity.test_integrity_check_2",[],[3835,{"position":[[0,59]]}],[]],["test_integrity_check_3",[3837,{"position":[[0,22]]}],[],[]],["opshin.tests.test_std.test_integrity.test_integrity_check_3",[],[3838,{"position":[[0,59]]}],[]],["test_integrity_check_list_0",[3840,{"position":[[0,27]]}],[],[]],["opshin.tests.test_std.test_integrity.test_integrity_check_list_0",[],[3841,{"position":[[0,64]]}],[]],["test_integrity_check_list_1",[3843,{"position":[[0,27]]}],[],[]],["opshin.tests.test_std.test_integrity.test_integrity_check_list_1",[],[3844,{"position":[[0,64]]}],[]],["test_integrity_check_list_2",[3846,{"position":[[0,27]]}],[],[]],["opshin.tests.test_std.test_integrity.test_integrity_check_list_2",[],[3847,{"position":[[0,64]]}],[]],["test_integrity_check_dict_0",[3849,{"position":[[0,27]]}],[],[]],["opshin.tests.test_std.test_integrity.test_integrity_check_dict_0",[],[3850,{"position":[[0,64]]}],[]],["test_integrity_check_dict_1",[3852,{"position":[[0,27]]}],[],[]],["opshin.tests.test_std.test_integrity.test_integrity_check_dict_1",[],[3853,{"position":[[0,64]]}],[]],["test_integrity_check_dict_2",[3855,{"position":[[0,27]]}],[],[]],["opshin.tests.test_std.test_integrity.test_integrity_check_dict_2",[],[3856,{"position":[[0,64]]}],[]],["test_integrity_check_renam",[3858,{"position":[[0,27]]}],[],[]],["opshin.tests.test_std.test_integrity.test_integrity_check_renam",[],[3859,{"position":[[0,64]]}],[]],["test_math",[3861,{"position":[[0,9]]}],[],[]],["opshin.tests.test_std.test_math",[],[3862,{"position":[[0,31]]}],[]],["test_gcd",[3864,{"position":[[0,8]]}],[],[]],["opshin.tests.test_std.test_math.test_gcd",[],[3865,{"position":[[0,40]]}],[]],["test_sign",[3867,{"position":[[0,9]]}],[],[]],["opshin.tests.test_std.test_math.test_sign",[],[3868,{"position":[[0,41]]}],[]],["test_unsigned_int_from_bytes_big",[3870,{"position":[[0,32]]}],[],[]],["opshin.tests.test_std.test_math.test_unsigned_int_from_bytes_big",[],[3871,{"position":[[0,64]]}],[]],["test_bytes_big_from_unsigned_int",[3873,{"position":[[0,32]]}],[],[]],["opshin.tests.test_std.test_math.test_bytes_big_from_unsigned_int",[],[3874,{"position":[[0,64]]}],[]],["opshin.tests.test_std.test_math.test_ceil",[],[3877,{"position":[[0,41]]}],[]],["opshin.tests.test_std.test_math.test_floor",[],[3880,{"position":[[0,42]]}],[]],["opshin.tests.util",[],[3883,{"position":[[0,18]]}],[]],["opshin.tests.utils.unit",[],[3886,{"position":[[0,23]]}],[]],["opshin.tests.utils.unit.constr_id",[],[3889,{"position":[[0,33]]}],[]],["opshin.tests.utils.eval_uplc",[],[3892,{"position":[[0,28]]}],[]],["eval_uplc_valu",[3894,{"position":[[0,15]]}],[],[]],["opshin.tests.utils.eval_uplc_valu",[],[3895,{"position":[[0,34]]}],[]],["test_op",[3897,{"position":[[0,8]]}],[],[]],["opshin.tests.test_op",[],[3898,{"position":[[0,21]]}],[]],["frozenlist",[3900,{"position":[[0,10]]}],[],[]],["opshin.tests.test_ops.frozenlist",[],[3901,{"position":[[0,32]]}],[]],["rec_data_strategi",[3903,{"position":[[0,19]]}],[],[]],["opshin.tests.test_ops.rec_data_strategi",[],[3904,{"position":[[0,41]]}],[]],["optest",[3906,{"position":[[0,6]]}],[],[]],["opshin.tests.test_ops.optest",[],[3907,{"position":[[0,28]]}],[]],["test_and_bool",[3909,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_and_bool",[],[3910,{"position":[[0,42]]}],[]],["test_or_bool",[3912,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_or_bool",[],[3913,{"position":[[0,41]]}],[]],["test_not_bool",[3915,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_not_bool",[],[3916,{"position":[[0,42]]}],[]],["test_usub_int",[3918,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_usub_int",[],[3919,{"position":[[0,42]]}],[]],["test_uadd_int",[3921,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_uadd_int",[],[3922,{"position":[[0,42]]}],[]],["test_not_int",[3924,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_not_int",[],[3925,{"position":[[0,41]]}],[]],["test_add_int",[3927,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_add_int",[],[3928,{"position":[[0,41]]}],[]],["test_sub_int",[3930,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_sub_int",[],[3931,{"position":[[0,41]]}],[]],["test_mul_int",[3933,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_mul_int",[],[3934,{"position":[[0,41]]}],[]],["test_div_int",[3936,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_div_int",[],[3937,{"position":[[0,41]]}],[]],["test_mod_int",[3939,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_mod_int",[],[3940,{"position":[[0,41]]}],[]],["test_pow_int",[3942,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_pow_int",[],[3943,{"position":[[0,41]]}],[]],["test_neg_pow_int",[3945,{"position":[[0,16]]}],[],[]],["opshin.tests.test_ops.optest.test_neg_pow_int",[],[3946,{"position":[[0,45]]}],[]],["test_add_byt",[3948,{"position":[[0,14]]}],[],[]],["opshin.tests.test_ops.optest.test_add_byt",[],[3949,{"position":[[0,43]]}],[]],["test_add_str",[3951,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_add_str",[],[3952,{"position":[[0,41]]}],[]],["test_slice_byt",[3954,{"position":[[0,16]]}],[],[]],["opshin.tests.test_ops.optest.test_slice_byt",[],[3955,{"position":[[0,45]]}],[]],["test_slice_bytes_low",[3957,{"position":[[0,22]]}],[],[]],["opshin.tests.test_ops.optest.test_slice_bytes_low",[],[3958,{"position":[[0,51]]}],[]],["test_slice_bytes_upp",[3960,{"position":[[0,22]]}],[],[]],["opshin.tests.test_ops.optest.test_slice_bytes_upp",[],[3961,{"position":[[0,51]]}],[]],["test_slice_bytes_ful",[3963,{"position":[[0,21]]}],[],[]],["opshin.tests.test_ops.optest.test_slice_bytes_ful",[],[3964,{"position":[[0,50]]}],[]],["test_index_byt",[3966,{"position":[[0,16]]}],[],[]],["opshin.tests.test_ops.optest.test_index_byt",[],[3967,{"position":[[0,45]]}],[]],["test_index_list",[3969,{"position":[[0,15]]}],[],[]],["opshin.tests.test_ops.optest.test_index_list",[],[3970,{"position":[[0,44]]}],[]],["test_slice_list",[3972,{"position":[[0,15]]}],[],[]],["opshin.tests.test_ops.optest.test_slice_list",[],[3973,{"position":[[0,44]]}],[]],["test_slice_list_low",[3975,{"position":[[0,21]]}],[],[]],["opshin.tests.test_ops.optest.test_slice_list_low",[],[3976,{"position":[[0,50]]}],[]],["test_slice_list_upp",[3978,{"position":[[0,21]]}],[],[]],["opshin.tests.test_ops.optest.test_slice_list_upp",[],[3979,{"position":[[0,50]]}],[]],["test_slice_list_ful",[3981,{"position":[[0,20]]}],[],[]],["opshin.tests.test_ops.optest.test_slice_list_ful",[],[3982,{"position":[[0,49]]}],[]],["test_in_list_int",[3984,{"position":[[0,16]]}],[],[]],["opshin.tests.test_ops.optest.test_in_list_int",[],[3985,{"position":[[0,45]]}],[]],["test_in_list_byt",[3987,{"position":[[0,18]]}],[],[]],["opshin.tests.test_ops.optest.test_in_list_byt",[],[3988,{"position":[[0,47]]}],[]],["test_in_list_data",[3990,{"position":[[0,17]]}],[],[]],["opshin.tests.test_ops.optest.test_in_list_data",[],[3991,{"position":[[0,46]]}],[]],["test_not_in_list_data",[3993,{"position":[[0,21]]}],[],[]],["opshin.tests.test_ops.optest.test_not_in_list_data",[],[3994,{"position":[[0,50]]}],[]],["test_not_in_list_int",[3996,{"position":[[0,20]]}],[],[]],["opshin.tests.test_ops.optest.test_not_in_list_int",[],[3997,{"position":[[0,49]]}],[]],["test_not_in_list_byt",[3999,{"position":[[0,22]]}],[],[]],["opshin.tests.test_ops.optest.test_not_in_list_byt",[],[4000,{"position":[[0,51]]}],[]],["test_not_list",[4002,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_not_list",[],[4003,{"position":[[0,42]]}],[]],["test_eq_byt",[4005,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_eq_byt",[],[4006,{"position":[[0,42]]}],[]],["test_eq_int",[4008,{"position":[[0,11]]}],[],[]],["opshin.tests.test_ops.optest.test_eq_int",[],[4009,{"position":[[0,40]]}],[]],["test_eq_str",[4011,{"position":[[0,11]]}],[],[]],["opshin.tests.test_ops.optest.test_eq_str",[],[4012,{"position":[[0,40]]}],[]],["test_eq_bool",[4014,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_eq_bool",[],[4015,{"position":[[0,41]]}],[]],["test_eq_data",[4017,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_eq_data",[],[4018,{"position":[[0,41]]}],[]],["test_eq_bool_int",[4020,{"position":[[0,16]]}],[],[]],["opshin.tests.test_ops.optest.test_eq_bool_int",[],[4021,{"position":[[0,45]]}],[]],["test_neq_str",[4023,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_neq_str",[],[4024,{"position":[[0,41]]}],[]],["test_neq_int",[4026,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_neq_int",[],[4027,{"position":[[0,41]]}],[]],["test_neq_byt",[4029,{"position":[[0,14]]}],[],[]],["opshin.tests.test_ops.optest.test_neq_byt",[],[4030,{"position":[[0,43]]}],[]],["test_neq_bool",[4032,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_neq_bool",[],[4033,{"position":[[0,42]]}],[]],["test_neq_bool_int",[4035,{"position":[[0,17]]}],[],[]],["opshin.tests.test_ops.optest.test_neq_bool_int",[],[4036,{"position":[[0,46]]}],[]],["test_neq_data",[4038,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_neq_data",[],[4039,{"position":[[0,42]]}],[]],["test_mul_int_str",[4041,{"position":[[0,16]]}],[],[]],["opshin.tests.test_ops.optest.test_mul_int_str",[],[4042,{"position":[[0,45]]}],[]],["test_mul_str_int",[4044,{"position":[[0,16]]}],[],[]],["opshin.tests.test_ops.optest.test_mul_str_int",[],[4045,{"position":[[0,45]]}],[]],["test_mul_int_byt",[4047,{"position":[[0,18]]}],[],[]],["opshin.tests.test_ops.optest.test_mul_int_byt",[],[4048,{"position":[[0,47]]}],[]],["test_mul_bytes_int",[4050,{"position":[[0,18]]}],[],[]],["opshin.tests.test_ops.optest.test_mul_bytes_int",[],[4051,{"position":[[0,47]]}],[]],["test_add_list",[4053,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_add_list",[],[4054,{"position":[[0,42]]}],[]],["test_fmt_int",[4056,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_int",[],[4057,{"position":[[0,41]]}],[]],["test_fmt_bool",[4059,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_bool",[],[4060,{"position":[[0,42]]}],[]],["test_fmt_str",[4062,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_str",[],[4063,{"position":[[0,41]]}],[]],["test_fmt_byt",[4065,{"position":[[0,14]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_byt",[],[4066,{"position":[[0,43]]}],[]],["test_fmt_non",[4068,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_non",[],[4069,{"position":[[0,42]]}],[]],["test_fmt_dataclass",[4071,{"position":[[0,18]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_dataclass",[],[4072,{"position":[[0,47]]}],[]],["test_fmt_multipl",[4074,{"position":[[0,17]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_multipl",[],[4075,{"position":[[0,46]]}],[]],["test_fmt_tuple_int",[4077,{"position":[[0,18]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_tuple_int",[],[4078,{"position":[[0,47]]}],[]],["test_fmt_tuple_str",[4080,{"position":[[0,18]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_tuple_str",[],[4081,{"position":[[0,47]]}],[]],["test_fmt_pair_int",[4083,{"position":[[0,17]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_pair_int",[],[4084,{"position":[[0,46]]}],[]],["test_fmt_pair_str",[4086,{"position":[[0,17]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_pair_str",[],[4087,{"position":[[0,46]]}],[]],["test_fmt_list_str",[4089,{"position":[[0,17]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_list_str",[],[4090,{"position":[[0,46]]}],[]],["test_fmt_list_int",[4092,{"position":[[0,17]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_list_int",[],[4093,{"position":[[0,46]]}],[]],["test_not_dict",[4095,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_not_dict",[],[4096,{"position":[[0,42]]}],[]],["test_index_dict",[4098,{"position":[[0,15]]}],[],[]],["opshin.tests.test_ops.optest.test_index_dict",[],[4099,{"position":[[0,44]]}],[]],["test_fmt_dict_int",[4101,{"position":[[0,17]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_dict_int",[],[4102,{"position":[[0,46]]}],[]],["test_fmt_ani",[4104,{"position":[[0,12]]}],[],[]],["opshin.tests.test_ops.optest.test_fmt_ani",[],[4105,{"position":[[0,41]]}],[]],["test_not_str",[4107,{"position":[[0,15]]}],[],[]],["opshin.tests.test_ops.optest.test_not_str",[],[4108,{"position":[[0,44]]}],[]],["test_not_byt",[4110,{"position":[[0,14]]}],[],[]],["opshin.tests.test_ops.optest.test_not_byt",[],[4111,{"position":[[0,43]]}],[]],["test_not_unit",[4113,{"position":[[0,13]]}],[],[]],["opshin.tests.test_ops.optest.test_not_unit",[],[4114,{"position":[[0,42]]}],[]],["test_class_method",[4116,{"position":[[0,18]]}],[],[]],["opshin.tests.test_class_method",[],[4117,{"position":[[0,31]]}],[]],["classmethod_test",[4119,{"position":[[0,17]]}],[],[]],["opshin.tests.test_class_methods.classmethod_test",[],[4120,{"position":[[0,49]]}],[]],["test_accessible_attribut",[4122,{"position":[[0,26]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_accessible_attribut",[],[4123,{"position":[[0,76]]}],[]],["test_instance_method_onli",[4125,{"position":[[0,25]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_instance_method_onli",[],[4126,{"position":[[0,75]]}],[]],["test_le_dund",[4128,{"position":[[0,14]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_le_dund",[],[4129,{"position":[[0,64]]}],[]],["test_invalid_python",[4131,{"position":[[0,19]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_invalid_python",[],[4132,{"position":[[0,69]]}],[]],["test_self_argu",[4134,{"position":[[0,19]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_self_argu",[],[4135,{"position":[[0,69]]}],[]],["test_self_return",[4137,{"position":[[0,16]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_self_return",[],[4138,{"position":[[0,66]]}],[]],["test_externally_bound_variables_scop",[4140,{"position":[[0,37]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_externally_bound_variables_scop",[],[4141,{"position":[[0,87]]}],[]],["test_eq_dund",[4143,{"position":[[0,14]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_eq_dund",[],[4144,{"position":[[0,64]]}],[]],["test_ne_dund",[4146,{"position":[[0,14]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_ne_dund",[],[4147,{"position":[[0,64]]}],[]],["test_lt_dund",[4149,{"position":[[0,14]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_lt_dund",[],[4150,{"position":[[0,64]]}],[]],["test_gt_dund",[4152,{"position":[[0,14]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_gt_dund",[],[4153,{"position":[[0,64]]}],[]],["test_ge_dund",[4155,{"position":[[0,14]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_ge_dund",[],[4156,{"position":[[0,64]]}],[]],["test_add_dund",[4158,{"position":[[0,15]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_add_dund",[],[4159,{"position":[[0,65]]}],[]],["test_sub_dund",[4161,{"position":[[0,15]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_sub_dund",[],[4162,{"position":[[0,65]]}],[]],["test_mul_dund",[4164,{"position":[[0,15]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_mul_dund",[],[4165,{"position":[[0,65]]}],[]],["test_floordiv_dund",[4167,{"position":[[0,20]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_floordiv_dund",[],[4168,{"position":[[0,70]]}],[]],["test_mod_dund",[4170,{"position":[[0,15]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_mod_dund",[],[4171,{"position":[[0,65]]}],[]],["test_pow_dund",[4173,{"position":[[0,15]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_pow_dund",[],[4174,{"position":[[0,65]]}],[]],["test_matmul_dund",[4176,{"position":[[0,18]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_matmul_dund",[],[4177,{"position":[[0,68]]}],[]],["test_unsupported_dund",[4179,{"position":[[0,23]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_unsupported_dund",[],[4180,{"position":[[0,73]]}],[]],["test_truediv_dund",[4182,{"position":[[0,19]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_truediv_dund",[],[4183,{"position":[[0,69]]}],[]],["test_not_dund",[4185,{"position":[[0,15]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_not_dund",[],[4186,{"position":[[0,65]]}],[]],["test_neg_dund",[4188,{"position":[[0,15]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_neg_dund",[],[4189,{"position":[[0,65]]}],[]],["test_in_dund",[4191,{"position":[[0,14]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_in_dund",[],[4192,{"position":[[0,64]]}],[]],["test_notin_dund",[4194,{"position":[[0,17]]}],[],[]],["opshin.tests.test_class_methods.classmethod_tests.test_notin_dund",[],[4195,{"position":[[0,67]]}],[]],["test_typ",[4197,{"position":[[0,10]]}],[],[]],["opshin.tests.test_typ",[],[4198,{"position":[[0,23]]}],[]],["test_record_type_ord",[4200,{"position":[[0,22]]}],[],[]],["opshin.tests.test_types.test_record_type_ord",[],[4201,{"position":[[0,46]]}],[]],["test_union_type_ord",[4203,{"position":[[0,21]]}],[],[]],["opshin.tests.test_types.test_union_type_ord",[],[4204,{"position":[[0,45]]}],[]],["bridg",[4206,{"position":[[0,6]]}],[],[4208,{"position":[[0,8]]}]],["opshin.bridg",[],[4207,{"position":[[0,13]]}],[]],["to_uplc_builtin",[4209,{"position":[[0,15]]}],[],[]],["opshin.bridge.to_uplc_builtin",[],[4210,{"position":[[0,29]]}],[]],["to_python",[4212,{"position":[[0,9]]}],[],[]],["opshin.bridge.to_python",[],[4213,{"position":[[0,23]]}],[]],["wraps_builtin",[4215,{"position":[[0,13]]}],[],[]],["opshin.bridge.wraps_builtin",[],[4216,{"position":[[0,27]]}],[]],["type_infer",[4218,{"position":[[0,14]]}],[],[]],["opshin.type_infer",[],[4219,{"position":[[0,21]]}],[]],["aggress",[],[],[4220,{"position":[[3,10]]}]],["aycock",[],[],[4220,{"position":[[50,6]]}]],["legal",[],[],[4220,{"position":[[89,5]]}]],["overload",[],[],[4220,{"position":[[210,10]]}]],["translat",[],[],[4220,{"position":[[236,11]]}]],["dynam",[],[],[4220,{"position":[[283,7]]}]],["addition",[],[],[4220,{"position":[[306,13]]}]],["conveni",[],[],[4220,{"position":[[325,12]]}]],["layer",[],[],[4220,{"position":[[363,5]]}]],["legacy.python.org/workshops/2000",[],[],[4220,{"position":[[447,32]]}]],["01/proceedings/papers/aycock/aycock.html",[],[],[4220,{"position":[[480,40]]}]],["record_from_plutusdata",[4221,{"position":[[0,22]]}],[],[]],["opshin.type_inference.record_from_plutusdata",[],[4222,{"position":[[0,44]]}],[]],["constant_typ",[4224,{"position":[[0,13]]}],[],[]],["opshin.type_inference.constant_typ",[],[4225,{"position":[[0,35]]}],[]],["union_typ",[4227,{"position":[[0,11]]}],[],[]],["opshin.type_inference.union_typ",[],[4228,{"position":[[0,33]]}],[]],["intersection_typ",[4230,{"position":[[0,18]]}],[],[]],["opshin.type_inference.intersection_typ",[],[4231,{"position":[[0,40]]}],[]],["typecheckvisitor",[4233,{"position":[[0,16]]}],[],[]],["opshin.type_inference.typecheckvisitor",[],[4234,{"position":[[0,38]]}],[]],["cast",[],[],[4235,{"position":[[41,4]]}]],["due",[],[],[4235,{"position":[[46,3]]}]],["boolean",[],[],[4235,{"position":[[55,7]]},4643,{"position":[[96,7]]}]],["tupl",[],[],[4235,{"position":[[87,5]]}]],["dictionari",[],[],[4235,{"position":[[96,12]]},4847,{"position":[[13,10]]},4850,{"position":[[15,10]]}]],["assur",[],[],[4235,{"position":[[170,7]]}]],["true/fals",[],[],[4235,{"position":[[224,10]]}]],["opshin.type_inference.typecheckvisitor.generic_visit",[],[4237,{"position":[[0,52]]}],[]],["opshin.type_inference.typecheckvisitor.visit_cal",[],[4240,{"position":[[0,49]]}],[]],["opshin.type_inference.typecheckvisitor.visit_boolop",[],[4243,{"position":[[0,51]]}],[]],["opshin.type_inference.typecheckvisitor.visit_unaryop",[],[4246,{"position":[[0,52]]}],[]],["opshin.type_inference.typecheckvisitor.visit",[],[4249,{"position":[[0,44]]}],[]],["merge_scop",[4251,{"position":[[0,11]]}],[],[]],["opshin.type_inference.merge_scop",[],[4252,{"position":[[0,33]]}],[]],["aggressivetypeinferenc",[4254,{"position":[[0,24]]}],[],[]],["opshin.type_inference.aggressivetypeinferenc",[],[4255,{"position":[[0,46]]}],[]],["opshin.type_inference.aggressivetypeinferencer.step",[],[4258,{"position":[[0,51]]}],[]],["variable_typ",[4260,{"position":[[0,13]]}],[],[]],["opshin.type_inference.aggressivetypeinferencer.variable_typ",[],[4261,{"position":[[0,60]]}],[]],["opshin.type_inference.aggressivetypeinferencer.enter_scop",[],[4264,{"position":[[0,58]]}],[]],["opshin.type_inference.aggressivetypeinferencer.exit_scop",[],[4267,{"position":[[0,57]]}],[]],["set_variable_typ",[4269,{"position":[[0,17]]}],[],[]],["opshin.type_inference.aggressivetypeinferencer.set_variable_typ",[],[4270,{"position":[[0,64]]}],[]],["implement_typecheck",[4272,{"position":[[0,20]]}],[],[]],["opshin.type_inference.aggressivetypeinferencer.implement_typecheck",[],[4273,{"position":[[0,67]]}],[]],["dunder_overrid",[4275,{"position":[[0,15]]}],[],[]],["opshin.type_inference.aggressivetypeinferencer.dunder_overrid",[],[4276,{"position":[[0,62]]}],[]],["type_from_annot",[4278,{"position":[[0,20]]}],[],[]],["opshin.type_inference.aggressivetypeinferencer.type_from_annot",[],[4279,{"position":[[0,67]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_sequ",[],[4282,{"position":[[0,61]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_classdef",[],[4285,{"position":[[0,61]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_const",[],[4288,{"position":[[0,61]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_nonetyp",[],[4291,{"position":[[0,61]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_tupl",[],[4294,{"position":[[0,58]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_list",[],[4297,{"position":[[0,57]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_dict",[],[4300,{"position":[[0,57]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_assign",[],[4303,{"position":[[0,59]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_annassign",[],[4306,{"position":[[0,62]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_if",[],[4309,{"position":[[0,55]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_whil",[],[4312,{"position":[[0,58]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_for",[],[4315,{"position":[[0,56]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_nam",[],[4318,{"position":[[0,57]]}],[]],["visit_keyword",[4320,{"position":[[0,13]]}],[],[]],["opshin.type_inference.aggressivetypeinferencer.visit_keyword",[],[4321,{"position":[[0,60]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_compar",[],[4324,{"position":[[0,60]]}],[]],["visit_arg",[4326,{"position":[[0,9]]}],[],[]],["opshin.type_inference.aggressivetypeinferencer.visit_arg",[],[4327,{"position":[[0,56]]}],[]],["visit_argu",[4329,{"position":[[0,15]]}],[],[]],["opshin.type_inference.aggressivetypeinferencer.visit_argu",[],[4330,{"position":[[0,62]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_functiondef",[],[4333,{"position":[[0,64]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_modul",[],[4336,{"position":[[0,59]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_expr",[],[4339,{"position":[[0,57]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_binop",[],[4342,{"position":[[0,58]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_boolop",[],[4345,{"position":[[0,59]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_unaryop",[],[4348,{"position":[[0,60]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_subscript",[],[4351,{"position":[[0,62]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_cal",[],[4354,{"position":[[0,57]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_pass",[],[4357,{"position":[[0,57]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_return",[],[4360,{"position":[[0,59]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_attribut",[],[4363,{"position":[[0,62]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_assert",[],[4366,{"position":[[0,59]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_rawplutoexpr",[],[4369,{"position":[[0,65]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_ifexp",[],[4372,{"position":[[0,58]]}],[]],["visit_comprehens",[4374,{"position":[[0,19]]}],[],[]],["opshin.type_inference.aggressivetypeinferencer.visit_comprehens",[],[4375,{"position":[[0,66]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_listcomp",[],[4378,{"position":[[0,61]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_dictcomp",[],[4381,{"position":[[0,61]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_formattedvalu",[],[4384,{"position":[[0,67]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_joinedstr",[],[4387,{"position":[[0,62]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit_importfrom",[],[4390,{"position":[[0,63]]}],[]],["opshin.type_inference.aggressivetypeinferencer.generic_visit",[],[4393,{"position":[[0,60]]}],[]],["opshin.type_inference.aggressivetypeinferencer.visit",[],[4396,{"position":[[0,52]]}],[]],["recordread",[4398,{"position":[[0,12]]}],[],[]],["opshin.type_inference.recordread",[],[4399,{"position":[[0,34]]}],[]],["opshin.type_inference.recordreader.nam",[],[4402,{"position":[[0,39]]}],[]],["opshin.type_inference.recordreader.orig_nam",[],[4405,{"position":[[0,44]]}],[]],["opshin.type_inference.recordreader.constructor",[],[4408,{"position":[[0,46]]}],[]],["opshin.type_inference.recordreader.attribut",[],[4411,{"position":[[0,45]]}],[]],["extract",[4413,{"position":[[0,7]]}],[],[]],["opshin.type_inference.recordreader.extract",[],[4414,{"position":[[0,42]]}],[]],["opshin.type_inference.recordreader.visit_annassign",[],[4417,{"position":[[0,50]]}],[]],["opshin.type_inference.recordreader.visit_classdef",[],[4420,{"position":[[0,49]]}],[]],["opshin.type_inference.recordreader.visit_pass",[],[4423,{"position":[[0,45]]}],[]],["opshin.type_inference.recordreader.visit_assign",[],[4426,{"position":[[0,47]]}],[]],["opshin.type_inference.recordreader.visit_expr",[],[4429,{"position":[[0,45]]}],[]],["opshin.type_inference.recordreader.generic_visit",[],[4432,{"position":[[0,48]]}],[]],["opshin.type_inference.typed_ast",[],[4435,{"position":[[0,31]]}],[]],["map_to_orig_nam",[4437,{"position":[[0,16]]}],[],[]],["opshin.type_inference.map_to_orig_nam",[],[4438,{"position":[[0,38]]}],[]],["returnextractor",[4440,{"position":[[0,15]]}],[],[]],["opshin.type_inference.returnextractor",[],[4441,{"position":[[0,37]]}],[]],["end",[],[],[4442,{"position":[[32,3]]},4511,{"position":[[58,6]]}]],["proper",[],[],[4442,{"position":[[66,6]]}]],["remain",[],[],[4442,{"position":[[106,9]]}]],["opshin.type_inference.returnextractor.visit_sequ",[],[4444,{"position":[[0,52]]}],[]],["opshin.type_inference.returnextractor.visit_if",[],[4447,{"position":[[0,46]]}],[]],["opshin.type_inference.returnextractor.visit_for",[],[4450,{"position":[[0,47]]}],[]],["opshin.type_inference.returnextractor.visit_whil",[],[4453,{"position":[[0,49]]}],[]],["opshin.type_inference.returnextractor.visit_return",[],[4456,{"position":[[0,50]]}],[]],["check_fulfil",[4458,{"position":[[0,14]]}],[],[]],["opshin.type_inference.returnextractor.check_fulfil",[],[4459,{"position":[[0,52]]}],[]],["opshin.type_inference.returnextractor.visit",[],[4462,{"position":[[0,43]]}],[]],["std",[4464,{"position":[[0,3]]}],[],[4469,{"position":[[2,3]]}]],["opshin.std",[],[4465,{"position":[[0,10]]}],[]],["few",[],[],[4466,{"position":[[18,3]]}]],["featur",[],[],[4466,{"position":[[22,8]]}]],["standard",[],[],[4466,{"position":[[38,8]]}]],["libari",[],[],[4466,{"position":[[47,7]]},4472,{"position":[[10,6]]},4673,{"position":[[10,6]]}]],["i.",[],[],[4466,{"position":[[89,5]]}]],["fraction",[4566,{"position":[[0,9]]},4569,{"position":[[0,8]]}],[],[4466,{"position":[[100,9]]},4568,{"position":[[21,9],[184,9]]}]],["opshin.std.fract",[],[4567,{"position":[[0,20]]}],[4466,{"position":[[130,20]]}]],["hashlib",[4467,{"position":[[0,7]]}],[],[4469,{"position":[[76,7]]}]],["opshin.std.hashlib",[],[4468,{"position":[[0,18]]}],[4469,{"position":[[159,18]]}]],["simpli",[],[],[4469,{"position":[[142,6]]}]],["opshin.std.builtin",[],[4471,{"position":[[0,19]]}],[]],["give",[],[],[4472,{"position":[[22,5]]},4673,{"position":[[22,5]]}]],["direct",[],[],[4472,{"position":[[28,6]]}]],["in",[],[],[4472,{"position":[[56,3],[124,3]]}]],["add_integ",[4473,{"position":[[0,11]]}],[],[]],["opshin.std.builtins.add_integ",[],[4474,{"position":[[0,31]]}],[]],["integ",[],[],[4475,{"position":[[9,8]]},4478,{"position":[[14,7]]},4481,{"position":[[11,8]]},4484,{"position":[[13,7]]},4487,{"position":[[18,7]]},4490,{"position":[[19,7]]},4493,{"position":[[17,7]]},4496,{"position":[[21,9]]},4508,{"position":[[48,10]]},4631,{"position":[[45,8]]},4634,{"position":[[12,7]]}]],["subtract_integ",[4476,{"position":[[0,16]]}],[],[]],["opshin.std.builtins.subtract_integ",[],[4477,{"position":[[0,36]]}],[]],["subtract",[],[],[4478,{"position":[[0,8]]}]],["fist",[],[],[4478,{"position":[[9,4]]}]],["multiply_integ",[4479,{"position":[[0,16]]}],[],[]],["opshin.std.builtins.multiply_integ",[],[4480,{"position":[[0,36]]}],[]],["multipli",[],[],[4481,{"position":[[0,8]]}]],["divide_integ",[4482,{"position":[[0,14]]}],[],[]],["opshin.std.builtins.divide_integ",[],[4483,{"position":[[0,34]]}],[]],["divid",[],[],[4484,{"position":[[0,6]]},4637,{"position":[[10,7]]},4640,{"position":[[10,7]]}]],["quotient_integ",[4485,{"position":[[0,16]]}],[],[]],["opshin.std.builtins.quotient_integ",[],[4486,{"position":[[0,36]]}],[]],["quotient",[],[],[4487,{"position":[[0,8]]}]],["remainder_integ",[4488,{"position":[[0,17]]}],[],[]],["opshin.std.builtins.remainder_integ",[],[4489,{"position":[[0,37]]}],[]],["remaind",[],[],[4490,{"position":[[0,9]]}]],["mod_integ",[4491,{"position":[[0,11]]}],[],[]],["opshin.std.builtins.mod_integ",[],[4492,{"position":[[0,31]]}],[]],["modulu",[],[],[4493,{"position":[[0,7]]}]],["equals_integ",[4494,{"position":[[0,14]]}],[],[]],["opshin.std.builtins.equals_integ",[],[4495,{"position":[[0,34]]}],[]],["less_than_integ",[4497,{"position":[[0,17]]}],[],[]],["opshin.std.builtins.less_than_integ",[],[4498,{"position":[[0,37]]}],[]],["y",[],[],[4499,{"position":[[12,1]]},4502,{"position":[[13,2]]},4520,{"position":[[11,2]]},4523,{"position":[[12,2]]},4526,{"position":[[13,2]]},4550,{"position":[[11,2]]},4559,{"position":[[48,2]]}]],["less_than_equals_integ",[4500,{"position":[[0,24]]}],[],[]],["opshin.std.builtins.less_than_equals_integ",[],[4501,{"position":[[0,44]]}],[]],["append_byte_str",[4503,{"position":[[0,18]]}],[],[]],["opshin.std.builtins.append_byte_str",[],[4504,{"position":[[0,38]]}],[]],["concaten",[],[],[4505,{"position":[[0,11]]},4547,{"position":[[0,11]]}]],["bytestr",[],[],[4505,{"position":[[16,12]]},4508,{"position":[[64,11]]},4511,{"position":[[8,10],[79,10]]},4514,{"position":[[20,11]]},4517,{"position":[[35,11]]},4529,{"position":[[7,10]]},4532,{"position":[[7,10]]},4535,{"position":[[7,10]]},4631,{"position":[[11,10]]},4634,{"position":[[43,11]]}]],["cons_byte_str",[4506,{"position":[[0,16]]}],[],[]],["opshin.std.builtins.cons_byte_str",[],[4507,{"position":[[0,36]]}],[]],["prepend",[],[],[4508,{"position":[[0,7]]}]],["natur",[],[],[4508,{"position":[[33,7]]}]],["number",[],[],[4508,{"position":[[41,6]]}]],["slice_byte_str",[4509,{"position":[[0,17]]}],[],[]],["opshin.std.builtins.slice_byte_str",[],[4510,{"position":[[0,37]]}],[]],["inclus",[],[],[4511,{"position":[[39,10]]}]],["both",[],[],[4511,{"position":[[53,4]]}]],["z[x:x+i",[],[],[4511,{"position":[[93,9]]}]],["length_of_byte_str",[4512,{"position":[[0,21]]}],[],[]],["opshin.std.builtins.length_of_byte_str",[],[4513,{"position":[[0,41]]}],[]],["index_byte_str",[4515,{"position":[[0,17]]}],[],[]],["opshin.std.builtins.index_byte_str",[],[4516,{"position":[[0,37]]}],[]],["equals_byte_str",[4518,{"position":[[0,18]]}],[],[]],["opshin.std.builtins.equals_byte_str",[],[4519,{"position":[[0,38]]}],[]],["less_than_byte_str",[4521,{"position":[[0,21]]}],[],[]],["opshin.std.builtins.less_than_byte_str",[],[4522,{"position":[[0,41]]}],[]],["less_than_equals_byte_str",[4524,{"position":[[0,28]]}],[],[]],["opshin.std.builtins.less_than_equals_byte_str",[],[4525,{"position":[[0,48]]}],[]],["sha2_256",[4527,{"position":[[0,8]]}],[],[]],["opshin.std.builtins.sha2_256",[],[4528,{"position":[[0,28]]}],[]],["sha",[],[],[4529,{"position":[[24,3]]}]],["256",[],[],[4529,{"position":[[28,4]]},4532,{"position":[[29,4]]},4535,{"position":[[32,4]]}]],["opshin.std.builtins.sha3_256",[],[4531,{"position":[[0,28]]}],[]],["sha3",[],[],[4532,{"position":[[24,4]]}]],["blake2b_256",[4533,{"position":[[0,11]]}],[],[]],["opshin.std.builtins.blake2b_256",[],[4534,{"position":[[0,31]]}],[]],["verify_ed25519_signatur",[4536,{"position":[[0,24]]}],[],[]],["opshin.std.builtins.verify_ed25519_signatur",[],[4537,{"position":[[0,44]]}],[]],["pubkey",[],[],[4538,{"position":[[6,7]]},4541,{"position":[[6,7]]},4544,{"position":[[6,7]]}]],["verifi",[],[],[4538,{"position":[[38,6]]},4541,{"position":[[38,6]]},4544,{"position":[[38,6]]}]],["ed25519",[],[],[4538,{"position":[[49,7]]}]],["verify_ecdsa_secp256k1_signatur",[4539,{"position":[[0,32]]}],[],[]],["opshin.std.builtins.verify_ecdsa_secp256k1_signatur",[],[4540,{"position":[[0,52]]}],[]],["ecdsa",[],[],[4541,{"position":[[49,5]]}]],["verify_schnorr_secp256k1_signatur",[4542,{"position":[[0,34]]}],[],[]],["opshin.std.builtins.verify_schnorr_secp256k1_signatur",[],[4543,{"position":[[0,54]]}],[]],["schnorr",[],[],[4544,{"position":[[49,7]]}]],["append_str",[4545,{"position":[[0,13]]}],[],[]],["opshin.std.builtins.append_str",[],[4546,{"position":[[0,33]]}],[]],["strings/text",[],[],[4547,{"position":[[16,14]]}]],["equals_str",[4548,{"position":[[0,13]]}],[],[]],["opshin.std.builtins.equals_str",[],[4549,{"position":[[0,33]]}],[]],["encode_utf8",[4551,{"position":[[0,11]]}],[],[]],["opshin.std.builtins.encode_utf8",[],[4552,{"position":[[0,31]]}],[]],["string/text",[],[],[4553,{"position":[[9,11]]},4556,{"position":[[9,11]]}]],["utf",[],[],[4553,{"position":[[27,3]]},4556,{"position":[[27,3]]}]],["8",[],[],[4553,{"position":[[31,2]]},4556,{"position":[[31,2]]}]],["decode_utf8",[4554,{"position":[[0,11]]}],[],[]],["opshin.std.builtins.decode_utf8",[],[4555,{"position":[[0,31]]}],[]],["decod",[],[],[4556,{"position":[[0,6]]}]],["constr_data",[4557,{"position":[[0,11]]}],[],[]],["opshin.std.builtins.constr_data",[],[4558,{"position":[[0,31]]}],[]],["equals_data",[4560,{"position":[[0,11]]}],[],[]],["opshin.std.builtins.equals_data",[],[4561,{"position":[[0,31]]}],[]],["serialise_data",[4563,{"position":[[0,14]]}],[],[]],["opshin.std.builtins.serialise_data",[],[4564,{"position":[[0,34]]}],[]],["serial",[],[],[4565,{"position":[[0,9]]}]],["cbor",[4809,{"position":[[0,4]]}],[],[4565,{"position":[[27,4]]}]],["maintain",[],[],[4568,{"position":[[55,8]]}]],["smallest",[],[],[4568,{"position":[[64,8]]},4598,{"position":[[49,8]]}]],["possibl",[],[],[4568,{"position":[[73,8]]},4598,{"position":[[58,8]]}]],["invari",[],[],[4568,{"position":[[91,10]]},4598,{"position":[[13,9]]}]],["sake",[],[],[4568,{"position":[[110,4]]}]],["full",[],[],[4568,{"position":[[144,4]]}]],["norm_fract",[4596,{"position":[[0,13]]}],[],[4568,{"position":[[217,13]]}]],["opshin.std.fractions.fract",[],[4570,{"position":[[0,29]]}],[]],["fraction(numer",[],[],[4571,{"position":[[0,19]]}]],["denomin",[4575,{"position":[[0,11]]}],[],[4571,{"position":[[25,12]]},4598,{"position":[[67,12],[84,11]]}]],["numer",[4572,{"position":[[0,9]]}],[],[]],["opshin.std.fractions.fraction.numer",[],[4573,{"position":[[0,39]]}],[]],["opshin.std.fractions.fraction.denomin",[],[4576,{"position":[[0,41]]}],[]],["opshin.std.fractions.fraction.constr_id",[],[4579,{"position":[[0,39]]}],[]],["add_fract",[4581,{"position":[[0,12]]}],[],[]],["opshin.std.fractions.add_fract",[],[4582,{"position":[[0,33]]}],[]],["neg_fract",[4584,{"position":[[0,12]]}],[],[]],["opshin.std.fractions.neg_fract",[],[4585,{"position":[[0,33]]}],[]],["sub_fract",[4587,{"position":[[0,12]]}],[],[]],["opshin.std.fractions.sub_fract",[],[4588,{"position":[[0,33]]}],[]],["mul_fract",[4590,{"position":[[0,12]]}],[],[]],["opshin.std.fractions.mul_fract",[],[4591,{"position":[[0,33]]}],[]],["div_fract",[4593,{"position":[[0,12]]}],[],[]],["opshin.std.fractions.div_fract",[],[4594,{"position":[[0,33]]}],[]],["opshin.std.fractions.norm_fract",[],[4597,{"position":[[0,34]]}],[]],["restor",[],[],[4598,{"position":[[0,8]]}]],["num/denom",[],[],[4598,{"position":[[28,9]]}]],["0",[],[],[4598,{"position":[[98,1]]},4655,{"position":[[28,1]]}]],["ge_fract",[4599,{"position":[[0,11]]}],[],[]],["opshin.std.fractions.ge_fract",[],[4600,{"position":[[0,32]]}],[]],["le_fract",[4602,{"position":[[0,11]]}],[],[]],["opshin.std.fractions.le_fract",[],[4603,{"position":[[0,32]]}],[]],["eq_fract",[4605,{"position":[[0,11]]}],[],[]],["opshin.std.fractions.eq_fract",[],[4606,{"position":[[0,32]]}],[]],["lt_fraction",[4608,{"position":[[0,11]]}],[],[]],["opshin.std.fractions.lt_fract",[],[4609,{"position":[[0,32]]}],[]],["gt_fraction",[4611,{"position":[[0,11]]}],[],[]],["opshin.std.fractions.gt_fract",[],[4612,{"position":[[0,32]]}],[]],["floor_fract",[4614,{"position":[[0,14]]}],[],[]],["opshin.std.fractions.floor_fract",[],[4615,{"position":[[0,35]]}],[]],["ceil_fract",[4617,{"position":[[0,13]]}],[],[]],["opshin.std.fractions.ceil_fract",[],[4618,{"position":[[0,34]]}],[]],["math",[4620,{"position":[[0,4]]}],[],[4622,{"position":[[26,4]]}]],["opshin.std.math",[],[4621,{"position":[[0,15]]}],[]],["gcd",[4623,{"position":[[0,3]]}],[],[]],["opshin.std.math.gcd",[],[4624,{"position":[[0,19]]}],[]],["sign",[4626,{"position":[[0,4]]}],[],[]],["opshin.std.math.sign",[],[4627,{"position":[[0,20]]}],[]],["unsigned_int_from_bytes_big",[4629,{"position":[[0,27]]}],[],[]],["opshin.std.math.unsigned_int_from_bytes_big",[],[4630,{"position":[[0,43]]}],[]],["convert",[],[],[4631,{"position":[[0,8]]},4634,{"position":[[0,8]]},4847,{"position":[[0,7]]},4850,{"position":[[0,7]]}]],["correspond",[],[],[4631,{"position":[[31,13]]},4634,{"position":[[29,13]]},4910,{"position":[[37,13]]}]],["big/network",[],[],[4631,{"position":[[54,11]]},4634,{"position":[[55,11]]}]],["byteord",[],[],[4631,{"position":[[66,10]]},4634,{"position":[[67,10]]}]],["unsign",[],[],[4631,{"position":[[77,8]]},4634,{"position":[[78,8]]}]],["bytes_big_from_unsigned_int",[4632,{"position":[[0,27]]}],[],[]],["opshin.std.math.bytes_big_from_unsigned_int",[],[4633,{"position":[[0,43]]}],[]],["ceil",[4635,{"position":[[0,4]]}],[],[]],["opshin.std.math.ceil",[],[4636,{"position":[[0,20]]}],[]],["round",[],[],[4637,{"position":[[23,7]]},4640,{"position":[[23,7]]}]],["toward",[],[],[4637,{"position":[[31,7]]},4640,{"position":[[31,7]]}]],["posit",[],[],[4637,{"position":[[39,8]]},4649,{"position":[[16,8]]}]],["floor",[4638,{"position":[[0,5]]}],[],[]],["opshin.std.math.floor",[],[4639,{"position":[[0,21]]}],[]],["bitmap",[4641,{"position":[[0,6]]}],[],[4643,{"position":[[4,6]]},4646,{"position":[[17,6]]},4652,{"position":[[18,6]]},4655,{"position":[[18,6]]},4658,{"position":[[19,6]]},4661,{"position":[[24,6]]}]],["opshin.std.bitmap",[],[4642,{"position":[[0,17]]}],[]],["interact",[],[],[4643,{"position":[[37,8]]}]],["highli",[],[],[4643,{"position":[[53,6]]}]],["datastructur",[],[],[4643,{"position":[[70,13]]}]],["minim",[],[],[4643,{"position":[[116,7]]}]],["overhead",[],[],[4643,{"position":[[124,8]]}]],["bit",[],[],[4643,{"position":[[136,3]]},4646,{"position":[[34,4]]},4649,{"position":[[9,3]]},4652,{"position":[[7,3]]},4655,{"position":[[7,3]]},4658,{"position":[[8,3]]},4661,{"position":[[34,4]]},4664,{"position":[[20,3]]},4667,{"position":[[20,4]]},4670,{"position":[[19,4]]}]],["bool",[],[],[4643,{"position":[[144,5]]}]],["init_bitmap",[4644,{"position":[[0,11]]}],[],[]],["opshin.std.bitmap.init_bitmap",[],[4645,{"position":[[0,29]]}],[]],["empti",[],[],[4646,{"position":[[11,5]]}]],["size",[],[],[4646,{"position":[[29,4]]},4661,{"position":[[12,4]]}]],["opshin.std.bitmap.test_bitmap",[],[4648,{"position":[[0,29]]}],[]],["set_bitmap",[4650,{"position":[[0,10]]}],[],[]],["opshin.std.bitmap.set_bitmap",[],[4651,{"position":[[0,28]]}],[]],["reset_bitmap",[4653,{"position":[[0,12]]}],[],[]],["opshin.std.bitmap.reset_bitmap",[],[4654,{"position":[[0,30]]}],[]],["flip_bitmap",[4656,{"position":[[0,11]]}],[],[]],["opshin.std.bitmap.flip_bitmap",[],[4657,{"position":[[0,29]]}],[]],["flip",[],[],[4658,{"position":[[0,5]]}]],["size_bitmap",[4659,{"position":[[0,11]]}],[],[]],["opshin.std.bitmap.size_bitmap",[],[4660,{"position":[[0,29]]}],[]],["any_bitmap",[4662,{"position":[[0,10]]}],[],[]],["opshin.std.bitmap.any_bitmap",[],[4663,{"position":[[0,28]]}],[]],["all_bitmap",[4665,{"position":[[0,10]]}],[],[]],["opshin.std.bitmap.all_bitmap",[],[4666,{"position":[[0,28]]}],[]],["none_bitmap",[4668,{"position":[[0,11]]}],[],[]],["opshin.std.bitmap.none_bitmap",[],[4669,{"position":[[0,29]]}],[]],["opshin.std.integr",[],[4672,{"position":[[0,20]]}],[]],["plutusdatum",[],[],[4673,{"position":[[78,11]]},4676,{"position":[[26,11]]}]],["check_integr",[4674,{"position":[[0,15]]}],[],[]],["opshin.std.integrity.check_integr",[],[4675,{"position":[[0,36]]}],[]],["match",[],[],[4676,{"position":[[129,7]]}]],["present",[],[],[4676,{"position":[[203,7],[238,7]]}]],["equival",[],[],[4676,{"position":[[258,10]]}]],["fun_impl",[4677,{"position":[[0,9]]}],[],[]],["opshin.fun_impl",[],[4678,{"position":[[0,16]]}],[]],["lenimpl",[4680,{"position":[[0,7]]}],[],[]],["opshin.fun_impls.lenimpl",[],[4681,{"position":[[0,24]]}],[]],["opshin.fun_impls.lenimpl.type_from_arg",[],[4684,{"position":[[0,39]]}],[]],["opshin.fun_impls.lenimpl.impl_from_arg",[],[4687,{"position":[[0,39]]}],[]],["reversedimpl",[4689,{"position":[[0,12]]}],[],[]],["opshin.fun_impls.reversedimpl",[],[4690,{"position":[[0,29]]}],[]],["opshin.fun_impls.reversedimpl.type_from_arg",[],[4693,{"position":[[0,44]]}],[]],["opshin.fun_impls.reversedimpl.impl_from_arg",[],[4696,{"position":[[0,44]]}],[]],["printimpl",[4698,{"position":[[0,9]]}],[],[]],["opshin.fun_impls.printimpl",[],[4699,{"position":[[0,26]]}],[]],["opshin.fun_impls.printimpl.type_from_arg",[],[4702,{"position":[[0,41]]}],[]],["opshin.fun_impls.printimpl.impl_from_arg",[],[4705,{"position":[[0,41]]}],[]],["pythonbuiltin",[4707,{"position":[[0,13]]}],[],[]],["opshin.fun_impls.pythonbuiltin",[],[4708,{"position":[[0,30]]}],[]],["opshin.fun_impls.pythonbuiltin.al",[],[4711,{"position":[[0,34]]}],[]],["opshin.fun_impls.pythonbuiltin.ani",[],[4714,{"position":[[0,34]]}],[]],["ab",[4716,{"position":[[0,3]]}],[],[]],["opshin.fun_impls.pythonbuiltin.ab",[],[4717,{"position":[[0,34]]}],[]],["chr",[4719,{"position":[[0,3]]}],[],[]],["opshin.fun_impls.pythonbuiltin.chr",[],[4720,{"position":[[0,34]]}],[]],["breakpoint",[4722,{"position":[[0,10]]}],[],[]],["opshin.fun_impls.pythonbuiltin.breakpoint",[],[4723,{"position":[[0,41]]}],[]],["hex",[4725,{"position":[[0,3]]}],[],[]],["opshin.fun_impls.pythonbuiltin.hex",[],[4726,{"position":[[0,34]]}],[]],["len",[4728,{"position":[[0,3]]}],[],[]],["opshin.fun_impls.pythonbuiltin.len",[],[4729,{"position":[[0,34]]}],[]],["max",[4731,{"position":[[0,3]]}],[],[]],["opshin.fun_impls.pythonbuiltin.max",[],[4732,{"position":[[0,34]]}],[]],["min",[4734,{"position":[[0,3]]}],[],[]],["opshin.fun_impls.pythonbuiltin.min",[],[4735,{"position":[[0,34]]}],[]],["opshin.fun_impls.pythonbuiltin.print",[],[4738,{"position":[[0,36]]}],[]],["pow",[4740,{"position":[[0,3]]}],[],[]],["opshin.fun_impls.pythonbuiltin.pow",[],[4741,{"position":[[0,34]]}],[]],["oct",[4743,{"position":[[0,3]]}],[],[]],["opshin.fun_impls.pythonbuiltin.oct",[],[4744,{"position":[[0,34]]}],[]],["opshin.fun_impls.pythonbuiltin.rang",[],[4747,{"position":[[0,36]]}],[]],["revers",[4749,{"position":[[0,8]]}],[],[]],["opshin.fun_impls.pythonbuiltin.revers",[],[4750,{"position":[[0,39]]}],[]],["sum",[4752,{"position":[[0,3]]}],[],[]],["opshin.fun_impls.pythonbuiltin.sum",[],[4753,{"position":[[0,34]]}],[]],["builder",[4755,{"position":[[0,7]]}],[],[]],["opshin.builder.purpos",[],[4759,{"position":[[0,22]]}],[]],["opshin.builder.purpose.spend",[],[4762,{"position":[[0,31]]}],[]],["opshin.builder.purpose.mint",[],[4765,{"position":[[0,30]]}],[]],["opshin.builder.purpose.reward",[],[4768,{"position":[[0,32]]}],[]],["opshin.builder.purpose.certifi",[],[4771,{"position":[[0,33]]}],[]],["opshin.builder.purpose.ani",[],[4774,{"position":[[0,26]]}],[]],["lib",[4776,{"position":[[0,3]]}],[],[]],["opshin.builder.purpose.lib",[],[4777,{"position":[[0,26]]}],[]],["plutuscontract",[4779,{"position":[[0,14]]}],[],[]],["opshin.builder.plutuscontract",[],[4780,{"position":[[0,29]]}],[]],["plutuscontract(contract",[],[],[4781,{"position":[[0,24]]}]],["pycardano.plutus.plutusv2script",[],[],[4781,{"position":[[25,32]]}]],["datum_typ",[4788,{"position":[[0,10]]}],[],[4781,{"position":[[58,11]]}]],["optional[tuple[str",[],[],[4781,{"position":[[70,19],[276,19]]}]],["type[union[pycardano.plutus.plutusdata",[],[],[4781,{"position":[[90,39],[296,39],[500,39]]}]],["dict",[],[],[4781,{"position":[[130,5],[336,5],[540,5]]},4847,{"position":[[251,5],[259,4]]}]],["pycardano.serialization.indefinitelist",[],[],[4781,{"position":[[148,39],[354,39],[558,39]]}]],["pycardano.serialization.rawcbor",[],[],[4781,{"position":[[188,32],[394,32],[598,32]]}]],["pycardano.plutus.rawplutusdata",[],[],[4781,{"position":[[221,30],[427,30],[631,30]]}]],["redeemer_typ",[4791,{"position":[[0,13]]}],[],[4781,{"position":[[261,14]]}]],["parameter_typ",[4785,{"position":[[0,15]]}],[],[4781,{"position":[[467,16]]}]],["list[tuple[str",[],[],[4781,{"position":[[484,15]]}]],["iterable[opshin.builder.purpos",[],[],[4781,{"position":[[677,32]]}]],["1.0.0",[],[],[4781,{"position":[[743,8]]}]],["titl",[4800,{"position":[[0,5]]}],[],[4781,{"position":[[752,6]]}]],["0.23.0",[],[],[4781,{"position":[[815,6]]}]],["licens",[4806,{"position":[[0,7]]}],[],[4781,{"position":[[839,8]]}]],["opshin.builder.plutuscontract.contract",[],[4783,{"position":[[0,38]]}],[]],["opshin.builder.plutuscontract.parameter_typ",[],[4786,{"position":[[0,45]]}],[]],["opshin.builder.plutuscontract.datum_typ",[],[4789,{"position":[[0,40]]}],[]],["opshin.builder.plutuscontract.redeemer_typ",[],[4792,{"position":[[0,43]]}],[]],["opshin.builder.plutuscontract.purpos",[],[4795,{"position":[[0,37]]}],[]],["opshin.builder.plutuscontract.vers",[],[4798,{"position":[[0,37]]}],[]],["opshin.builder.plutuscontract.titl",[],[4801,{"position":[[0,35]]}],[]],["opshin.builder.plutuscontract.descript",[],[4804,{"position":[[0,41]]}],[]],["opshin.builder.plutuscontract.licens",[],[4807,{"position":[[0,37]]}],[]],["opshin.builder.plutuscontract.cbor",[],[4810,{"position":[[0,34]]}],[]],["cbor_hex",[4812,{"position":[[0,8]]}],[],[]],["opshin.builder.plutuscontract.cbor_hex",[],[4813,{"position":[[0,38]]}],[]],["opshin.builder.plutuscontract.script_hash",[],[4816,{"position":[[0,41]]}],[]],["opshin.builder.plutuscontract.policy_id",[],[4819,{"position":[[0,39]]}],[]],["mainnet_addr",[4821,{"position":[[0,12]]}],[],[]],["opshin.builder.plutuscontract.mainnet_addr",[],[4822,{"position":[[0,42]]}],[]],["testnet_addr",[4824,{"position":[[0,12]]}],[],[]],["opshin.builder.plutuscontract.testnet_addr",[],[4825,{"position":[[0,42]]}],[]],["plutus_json",[4827,{"position":[[0,11]]}],[],[]],["opshin.builder.plutuscontract.plutus_json",[],[4828,{"position":[[0,41]]}],[]],["opshin.builder.plutuscontract.blueprint",[],[4831,{"position":[[0,39]]}],[]],["apply_paramet",[4833,{"position":[[0,15]]},4851,{"position":[[0,16]]}],[],[]],["opshin.builder.plutuscontract.apply_paramet",[],[4834,{"position":[[0,45]]}],[]],["new",[],[],[4835,{"position":[[10,3]]}]],["dump",[4836,{"position":[[0,4]]}],[],[]],["opshin.builder.plutuscontract.dump",[],[4837,{"position":[[0,34]]}],[]],["opshin.builder.compil",[],[4840,{"position":[[0,22]]}],[]],["opshin.builder.build",[],[4843,{"position":[[0,20]]}],[]],["to_plutus_schema",[4845,{"position":[[0,16]]}],[],[]],["opshin.builder.to_plutus_schema",[],[4846,{"position":[[0,31]]}],[]],["schema",[],[],[4847,{"position":[[44,6],[281,6]]},4850,{"position":[[46,6]]}]],["accord",[],[],[4847,{"position":[[51,9]]},4850,{"position":[[53,9]]}]],["cip",[],[],[4847,{"position":[[64,3]]},4850,{"position":[[66,3]]}]],["57",[],[],[4847,{"position":[[68,2]]},4850,{"position":[[70,2]]}]],["core",[],[],[4847,{"position":[[105,4]]}]],["structur",[],[],[4847,{"position":[[110,10]]}]],["cips.cardano.org/cips/cip57",[],[],[4847,{"position":[[128,28]]}]],["corevocabulari",[],[],[4847,{"position":[[157,14]]}]],["extra",[],[],[4847,{"position":[[187,5]]}]],["json.dump",[],[],[4847,{"position":[[229,12]]}]],["from_plutus_schema",[4848,{"position":[[0,18]]}],[],[]],["opshin.builder.from_plutus_schema",[],[4849,{"position":[[0,33]]}],[]],["opshin.builder.apply_paramet",[],[4852,{"position":[[0,31]]}],[]],["opshin.builder.load",[],[4855,{"position":[[0,19]]}],[]],["directori",[],[],[4856,{"position":[[31,9]]}]],["prelud",[4857,{"position":[[0,7]]}],[],[]],["opshin.prelud",[],[4858,{"position":[[0,14]]}],[]],["noth",[4860,{"position":[[0,7]]},4878,{"position":[[0,7]]}],[],[4862,{"position":[[0,8],[91,9]]},4880,{"position":[[0,8],[91,9]]}]],["opshin.prelude.noth",[],[4861,{"position":[[0,22]]},4879,{"position":[[0,22]]}],[]],["signifi",[],[],[4862,{"position":[[24,7]]},4880,{"position":[[24,7]]}]],["opshin.prelude.nothing.constr_id",[],[4864,{"position":[[0,32]]},4882,{"position":[[0,32]]}],[]],["opshin.prelude.token",[],[4867,{"position":[[0,20]]}],[]],["opshin.prelude.token.policy_id",[],[4870,{"position":[[0,30]]}],[]],["token_nam",[4872,{"position":[[0,10]]}],[],[]],["opshin.prelude.token.token_nam",[],[4873,{"position":[[0,31]]}],[]],["opshin.prelude.token.constr_id",[],[4876,{"position":[[0,30]]}],[]],["all_tokens_unlocked_from_address",[4884,{"position":[[0,32]]}],[],[]],["opshin.prelude.all_tokens_unlocked_from_address",[],[4885,{"position":[[0,47]]}],[]],["unlock",[],[],[4886,{"position":[[46,8]]}]],["all_tokens_locked_at_address_with_datum",[4887,{"position":[[0,39]]}],[],[]],["opshin.prelude.all_tokens_locked_at_address_with_datum",[],[4888,{"position":[[0,54]]}],[]],["lock",[],[],[4889,{"position":[[46,6]]},4892,{"position":[[46,6]]}]],["all_tokens_locked_at_address",[4890,{"position":[[0,28]]}],[],[]],["opshin.prelude.all_tokens_locked_at_address",[],[4891,{"position":[[0,43]]}],[]],["resolve_spent_utxo",[4893,{"position":[[0,18]]}],[],[]],["opshin.prelude.resolve_spent_utxo",[],[4894,{"position":[[0,33]]}],[]],["utxo",[],[],[4895,{"position":[[12,4]]}]],["resolve_datum_unsaf",[4896,{"position":[[0,20]]}],[],[]],["opshin.prelude.resolve_datum_unsaf",[],[4897,{"position":[[0,35]]}],[]],["independ",[],[],[4898,{"position":[[58,11]]},4901,{"position":[[79,11]]}]],["embed",[],[],[4898,{"position":[[99,9]]},4901,{"position":[[120,9]]}]],["resolve_datum",[4899,{"position":[[0,13]]}],[],[]],["opshin.prelude.resolve_datum",[],[4900,{"position":[[0,28]]}],[]],["own_spent_utxo",[4902,{"position":[[0,14]]}],[],[]],["opshin.prelude.own_spent_utxo",[],[4903,{"position":[[0,29]]}],[]],["own_policy_id",[4905,{"position":[[0,13]]}],[],[]],["opshin.prelude.own_policy_id",[],[4906,{"position":[[0,28]]}],[]],["obtain",[],[],[4907,{"position":[[0,6]]}]],["minting/burn",[],[],[4907,{"position":[[58,15]]}]],["own_address",[4908,{"position":[[0,11]]}],[],[]],["opshin.prelude.own_address",[],[4909,{"position":[[0,26]]}],[]],["comput",[],[],[4910,{"position":[[0,8]]}]],["token_present_in_input",[4911,{"position":[[0,23]]}],[],[]],["opshin.prelude.token_present_in_input",[],[4912,{"position":[[0,38]]}],[]],["on",[],[],[4913,{"position":[[44,3]]}]]],"pipeline":["stemmer"]} \ No newline at end of file diff --git a/docs/opshin/bridge.html b/docs/opshin/bridge.html deleted file mode 100644 index 4eb06e8d..00000000 --- a/docs/opshin/bridge.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - -opshin.bridge API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.bridge

-
-
-

Bridging tools between uplc and opshin

-
- -Expand source code - -
""" Bridging tools between uplc and opshin """
-
-from functools import wraps
-
-import re
-
-import uplc.ast
-from pycardano import PlutusData, RawCBOR
-
-
-def to_uplc_builtin(a):
-    if isinstance(a, int):
-        return uplc.ast.BuiltinInteger(a)
-    if isinstance(a, str):
-        return uplc.ast.BuiltinString(a)
-    if isinstance(a, bytes):
-        return uplc.ast.BuiltinByteString(a)
-    if isinstance(a, list):
-        return uplc.ast.BuiltinList(list(map(to_uplc_builtin, a)))
-    if isinstance(a, dict):
-        return uplc.ast.BuiltinList(
-            list([(to_uplc_builtin(k), to_uplc_builtin(v)) for k, v in a])
-        )
-    if isinstance(a, PlutusData):
-        return uplc.ast.data_from_cbor(a.to_cbor())
-
-
-def to_python(a):
-    if (
-        isinstance(a, uplc.ast.BuiltinInteger)
-        or isinstance(a, uplc.ast.BuiltinString)
-        or isinstance(a, uplc.ast.BuiltinByteString)
-    ):
-        return a.value
-    # TODO how to remap dict? use type annotations?
-    if isinstance(a, uplc.ast.BuiltinList):
-        return list(map(to_python, a.values))
-    # TODO how to remap data? use type annotations?
-    if isinstance(a, uplc.ast.PlutusData):
-        return RawCBOR(uplc.ast.plutus_cbor_dumps(a))
-
-
-def wraps_builtin(func):
-    snake_case_fun_name = func.__name__
-    CamelCaseFunName = "".join(
-        p.capitalize() for p in re.split(r"_(?!\d)", snake_case_fun_name)
-    )
-
-    @wraps(func)
-    def wrapped(*args):
-        """
-        A UPLC builtin that was wrapped to be available in OpShin/Python.
-        The type annotation of the original function is preserved.
-        """
-        uplc_fun = uplc.ast.BuiltInFun.__dict__[CamelCaseFunName]
-        return to_python(
-            uplc.ast.BuiltInFunEvalMap[uplc_fun](*(map(to_uplc_builtin, args)))
-        )
-
-    return wrapped
-
-
-
-
-
-
-
-

Functions

-
-
-def to_python(a) -
-
-
-
-
-def to_uplc_builtin(a) -
-
-
-
-
-def wraps_builtin(func) -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/builder.html b/docs/opshin/builder.html deleted file mode 100644 index cfe8aee6..00000000 --- a/docs/opshin/builder.html +++ /dev/null @@ -1,1244 +0,0 @@ - - - - - - - - -opshin.builder API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.builder

-
-
-
- -Expand source code - -
import copy
-import dataclasses
-import enum
-import functools
-import json
-import types
-import typing
-from ast import Module
-from typing import Optional, Any, Union
-from pathlib import Path
-
-from pycardano import PlutusV2Script, IndefiniteList, PlutusData, Datum
-
-from . import __version__, compiler, DEFAULT_CONFIG
-
-import uplc.ast
-from uplc import flatten, ast as uplc_ast, eval as uplc_eval
-import cbor2
-import pycardano
-from pluthon import compile as plt_compile
-
-from .util import datum_to_cbor
-
-
-class Purpose(enum.Enum):
-    spending = "spending"
-    minting = "minting"
-    rewarding = "rewarding"
-    certifying = "certifying"
-    any = "any"
-    lib = "lib"
-
-
-@dataclasses.dataclass
-class PlutusContract:
-    contract: PlutusV2Script
-    datum_type: Optional[typing.Tuple[str, typing.Type[Datum]]] = None
-    redeemer_type: Optional[typing.Tuple[str, typing.Type[Datum]]] = None
-    parameter_types: typing.List[typing.Tuple[str, typing.Type[Datum]]] = (
-        dataclasses.field(default_factory=list)
-    )
-    purpose: typing.Iterable[Purpose] = (Purpose.any,)
-    version: Optional[str] = "1.0.0"
-    title: str = "validator"
-    description: Optional[str] = f"opshin {__version__} Smart Contract"
-    license: Optional[str] = None
-
-    @property
-    def cbor(self) -> bytes:
-        return self.contract
-
-    @property
-    def cbor_hex(self) -> str:
-        return self.contract.hex()
-
-    @property
-    def script_hash(self):
-        return pycardano.plutus_script_hash(self.contract)
-
-    @property
-    def policy_id(self):
-        return self.script_hash.to_primitive().hex()
-
-    @property
-    def mainnet_addr(self):
-        return pycardano.Address(self.script_hash, network=pycardano.Network.MAINNET)
-
-    @property
-    def testnet_addr(self):
-        return pycardano.Address(self.script_hash, network=pycardano.Network.TESTNET)
-
-    @property
-    def plutus_json(self):
-        return json.dumps(
-            {
-                "type": "PlutusScriptV2",
-                "description": self.description,
-                "cborHex": self.cbor_hex,
-            },
-            indent=2,
-        )
-
-    @property
-    def blueprint(self):
-        return {
-            "$schema": "https://cips.cardano.org/cips/cip57/schemas/plutus-blueprint.json",
-            "$id": "https://github.com/aiken-lang/aiken/blob/main/examples/hello_world/plutus.json",
-            "$vocabulary": {
-                "https://json-schema.org/draft/2020-12/vocab/core": True,
-                "https://json-schema.org/draft/2020-12/vocab/applicator": True,
-                "https://json-schema.org/draft/2020-12/vocab/validation": True,
-                "https://cips.cardano.org/cips/cip57": True,
-            },
-            "preamble": {
-                "version": self.version,
-                "plutusVersion": "v2",
-                "description": self.description,
-                "title": self.title,
-                **({"license": self.license} if self.license is not None else {}),
-            },
-            "validators": [
-                {
-                    "title": self.title,
-                    **(
-                        {
-                            "datum": {
-                                "title": self.datum_type[0],
-                                "purpose": PURPOSE_MAP[Purpose.spending],
-                                "schema": to_plutus_schema(self.datum_type[1]),
-                            }
-                        }
-                        if self.datum_type is not None
-                        else {}
-                    ),
-                    "redeemer": (
-                        {
-                            "title": self.redeemer_type[0],
-                            "purpose": {
-                                "oneOf": [PURPOSE_MAP[p] for p in self.purpose]
-                            },
-                            "schema": to_plutus_schema(self.redeemer_type[1]),
-                        }
-                        if self.redeemer_type is not None
-                        else {}
-                    ),
-                    **(
-                        {
-                            "parameters": [
-                                {
-                                    "title": t[0],
-                                    "purpose": PURPOSE_MAP[Purpose.spending],
-                                    "schema": to_plutus_schema(t[1]),
-                                }
-                                for t in self.parameter_types
-                            ]
-                        }
-                        if self.parameter_types
-                        else {}
-                    ),
-                    "compiledCode": self.cbor_hex,
-                    "hash": self.policy_id,
-                },
-            ],
-        }
-
-    def apply_parameter(self, *args: pycardano.Datum):
-        """
-        Returns a new OpShin Contract with the applied parameters
-        """
-        # update the parameters in the blueprint (remove applied parameters)
-        assert len(self.parameter_types) >= len(
-            args
-        ), f"Applying too many parameters to contract, allowed amount: {self.parameter_types}, but got {len(args)}"
-        new_parameter_types = copy.copy(self.parameter_types)
-        for _ in args:
-            # TODO validate that the applied parameters are of the correct type
-            new_parameter_types.pop(0)
-        new_contract_contract = apply_parameters(self.contract, *args)
-        new_contract = PlutusContract(
-            new_contract_contract,
-            self.datum_type,
-            self.redeemer_type,
-            new_parameter_types,
-            self.purpose,
-            self.version,
-            self.title,
-            self.description,
-        )
-        return new_contract
-
-    def dump(self, target_dir: Union[str, Path]):
-        target_dir = Path(target_dir)
-        target_dir.mkdir(exist_ok=True, parents=True)
-        with (target_dir / "script.cbor").open("w") as fp:
-            fp.write(self.cbor_hex)
-        with (target_dir / "script.plutus").open("w") as fp:
-            fp.write(self.plutus_json)
-        with (target_dir / "script.policy_id").open("w") as fp:
-            fp.write(self.policy_id)
-        with (target_dir / "mainnet.addr").open("w") as fp:
-            fp.write(self.mainnet_addr.encode())
-        with (target_dir / "testnet.addr").open("w") as fp:
-            fp.write(self.testnet_addr.encode())
-        with (target_dir / "blueprint.json").open("w") as fp:
-            json.dump(self.blueprint, fp, indent=2)
-
-
-def compile(
-    program: Module,
-    contract_filename: Optional[str] = None,
-    validator_function_name="validator",
-    config=DEFAULT_CONFIG,
-) -> uplc_ast.Program:
-    code = compiler.compile(
-        program,
-        filename=contract_filename,
-        validator_function_name=validator_function_name,
-        config=config,
-    )
-    plt_code = plt_compile(code, config)
-    return plt_code
-
-
-@functools.lru_cache(maxsize=32)
-def _static_compile(
-    source_code: str,
-    contract_file: str = "<unknown>",
-    validator_function_name="validator",
-    config=DEFAULT_CONFIG,
-):
-    """
-    Expects a python module and returns the build artifacts from compiling it
-    """
-
-    source_ast = compiler.parse(source_code, filename=contract_file)
-    code = compile(
-        source_ast,
-        contract_filename=contract_file,
-        validator_function_name=validator_function_name,
-        config=config,
-    )
-    return code
-
-
-def _compile(
-    source_code: str,
-    *args: typing.Union[pycardano.Datum, uplc_ast.Constant],
-    contract_file: str = "<unknown>",
-    validator_function_name="validator",
-    config=DEFAULT_CONFIG,
-):
-    """
-    Expects a python module and returns the build artifacts from compiling it
-    """
-
-    code = _static_compile(
-        source_code,
-        contract_file=contract_file,
-        validator_function_name=validator_function_name,
-        config=config,
-    )
-    code = _apply_parameters(code, *args)
-    return code
-
-
-def build(
-    contract_file: str,
-    *args: typing.Union[pycardano.Datum, uplc_ast.Constant],
-    validator_function_name="validator",
-    config=DEFAULT_CONFIG,
-):
-    """
-    Expects a python module and returns the build artifacts from compiling it
-    """
-    with open(contract_file) as f:
-        source_code = f.read()
-    code = _compile(
-        source_code,
-        *args,
-        contract_file=contract_file,
-        validator_function_name=validator_function_name,
-        config=config,
-    )
-    return _build(code)
-
-
-def _build(contract: uplc.ast.Program):
-    # create cbor file for use with pycardano/lucid
-    cbor = flatten(contract)
-    return pycardano.PlutusV2Script(cbor)
-
-
-PURPOSE_MAP = {
-    Purpose.any: {"oneOf": ["spend", "mint", "withdraw", "publish"]},
-    Purpose.spending: "spend",
-    Purpose.minting: "mint",
-    Purpose.rewarding: "withdraw",
-    Purpose.certifying: "publish",
-}
-
-
-def to_plutus_schema(cls: typing.Type[Datum]) -> dict:
-    """
-    Convert to a dictionary representing a json schema according to CIP 57 Plutus Blueprint
-    Reference of the core structure:
-    https://cips.cardano.org/cips/cip57/#corevocabulary
-
-    Args:
-        **kwargs: Extra key word arguments to be passed to `json.dumps()`
-
-    Returns:
-        dict: a dict representing the schema of this class.
-    """
-    if hasattr(cls, "__origin__") and cls.__origin__ is list:
-        return {
-            "dataType": "list",
-            **(
-                {"items": to_plutus_schema(cls.__args__[0])}
-                if hasattr(cls, "__args__")
-                else {}
-            ),
-        }
-    elif hasattr(cls, "__origin__") and cls.__origin__ is dict:
-        return {
-            "dataType": "map",
-            **(
-                {
-                    "keys": to_plutus_schema(cls.__args__[0]),
-                    "values": to_plutus_schema(cls.__args__[1]),
-                }
-                if hasattr(cls, "__args__")
-                else {}
-            ),
-        }
-    elif hasattr(cls, "__origin__") and cls.__origin__ is Union:
-        return {
-            "anyOf": (
-                [to_plutus_schema(t) for t in cls.__args__]
-                if hasattr(cls, "__args__")
-                else []
-            )
-        }
-    elif issubclass(cls, PlutusData):
-        fields = []
-        for field_value in cls.__dataclass_fields__.values():
-            if field_value.name == "CONSTR_ID":
-                continue
-            field_schema = to_plutus_schema(field_value.type)
-            field_schema["title"] = field_value.name
-            fields.append(field_schema)
-        return {
-            "dataType": "constructor",
-            "index": cls.CONSTR_ID,
-            "fields": fields,
-            "title": cls.__name__,
-        }
-    elif issubclass(cls, bytes):
-        return {"dataType": "bytes"}
-    elif issubclass(cls, int):
-        return {"dataType": "integer"}
-    elif issubclass(cls, IndefiniteList) or issubclass(cls, list):
-        return {"dataType": "list"}
-    else:
-        return {}
-
-
-def from_plutus_schema(schema: dict) -> typing.Type[pycardano.Datum]:
-    """
-    Convert from a dictionary representing a json schema according to CIP 57 Plutus Blueprint
-    """
-    if schema == {}:
-        return pycardano.Datum
-    if "anyOf" in schema:
-        if len(schema["anyOf"]) == 0:
-            raise ValueError("Cannot convert empty anyOf schema")
-        union_t = typing.Union[from_plutus_schema(schema["anyOf"][0])]
-        for s in schema["anyOf"][1:]:
-            union_t = typing.Union[union_t, from_plutus_schema(s)]
-        return union_t
-    if "dataType" in schema:
-        typ = schema["dataType"]
-        if typ == "bytes":
-            return bytes
-        elif typ == "integer":
-            return int
-        elif typ == "list":
-            if "items" in schema:
-                return typing.List[from_plutus_schema(schema["items"])]
-            else:
-                return typing.List[pycardano.Datum]
-        elif typ == "map":
-            key_t = (
-                from_plutus_schema(schema["keys"])
-                if "keys" in schema
-                else pycardano.Datum
-            )
-            value_t = (
-                from_plutus_schema(schema["values"])
-                if "values" in schema
-                else pycardano.Datum
-            )
-            return typing.Dict[key_t, value_t]
-        elif typ == "constructor":
-            fields = {}
-            for field in schema["fields"]:
-                fields[field["title"]] = from_plutus_schema(field)
-            fields["CONSTR_ID"] = schema["index"]
-            return dataclasses.dataclass(
-                type(schema["title"], (pycardano.PlutusData,), fields)
-            )
-    raise ValueError(f"Cannot read schema (not supported yet) {schema}")
-
-
-def apply_parameters(script: PlutusV2Script, *args: pycardano.Datum):
-    """
-    Expects a plutus script (compiled) and returns the compiled script from applying parameters to it
-    """
-    return _build(_apply_parameters(uplc.unflatten(script), *args))
-
-
-def _apply_parameters(script: uplc.ast.Program, *args: pycardano.Datum):
-    """
-    Expects a UPLC program and returns the build artifacts from applying parameters to it
-    """
-    # apply parameters from the command line to the contract (instantiates parameterized contract!)
-    code = script.term
-    # UPLC lambdas may only take one argument at a time, so we evaluate by repeatedly applying
-    for d in args:
-        code = uplc.ast.Apply(
-            code,
-            (
-                uplc.ast.data_from_cbor(datum_to_cbor(d))
-                if not isinstance(d, uplc_ast.Constant)
-                else d
-            ),
-        )
-    code = uplc.ast.Program((1, 0, 0), code)
-    return code
-
-
-def load(contract_path: Union[Path, str]) -> PlutusContract:
-    """
-    Load a contract from a file or directory and generate the artifacts
-    """
-    if isinstance(contract_path, str):
-        contract_path = Path(contract_path)
-    if contract_path.is_dir():
-        contract_candidates = list(contract_path.iterdir())
-    elif contract_path.is_file():
-        contract_candidates = [contract_path]
-    else:
-        raise ValueError(
-            f"Invalid contract path, is neither file nor directory: {contract_path}"
-        )
-    for contract_file in contract_candidates:
-        with contract_file.open("r") as f:
-            contract_content = f.read()
-        # could be a plutus blueprint
-        try:
-            contract = json.loads(contract_content)
-            if "validators" in contract:
-                assert len(contract["validators"]) == 1, "Only one validator supported"
-                validator = contract["validators"][0]
-                contract_cbor = PlutusV2Script(bytes.fromhex(validator["compiledCode"]))
-                datum_type = (
-                    validator["datum"]["title"],
-                    from_plutus_schema(validator["datum"]["schema"]),
-                )
-                redeemer_type = (
-                    validator["redeemer"]["title"],
-                    from_plutus_schema(validator["redeemer"]["schema"]),
-                )
-                parameter_types = [
-                    (p["title"], from_plutus_schema(p["schema"]))
-                    for p in validator["parameters"]
-                ]
-                if "oneOf" in validator["redeemer"]["purpose"]:
-                    purpose = [
-                        k
-                        for k, v in PURPOSE_MAP.items()
-                        if v in validator["redeemer"]["purpose"]["oneOf"]
-                    ]
-                else:
-                    purpose = [
-                        k
-                        for k, v in PURPOSE_MAP.items()
-                        if v == validator["redeemer"]["purpose"]
-                    ]
-                version = contract["preamble"].get("version")
-                title = contract["preamble"].get("title")
-                description = contract["preamble"].get("description")
-                license = contract["preamble"].get("license")
-                assert (
-                    contract["preamble"].get("plutusVersion") == "v2"
-                ), "Only Plutus V2 supported"
-                return PlutusContract(
-                    contract_cbor,
-                    datum_type,
-                    redeemer_type,
-                    parameter_types,
-                    purpose,
-                    version,
-                    title,
-                    description,
-                    license,
-                )
-        except (ValueError, KeyError) as e:
-            pass
-    contract_cbor = None
-    for contract_file in contract_candidates:
-        with contract_file.open("r") as f:
-            contract_content = f.read()
-        # could be a singly wrapped cbor hex
-        try:
-            # try to unwrap to see if it is cbor
-            contract_cbor_unwrapped = cbor2.loads(bytes.fromhex(contract_content))
-            contract_cbor = bytes.fromhex(contract_content)
-            # if we can unwrap again, its doubly wrapped
-            try:
-                cbor2.loads(contract_cbor_unwrapped)
-                contract_cbor = contract_cbor_unwrapped
-            except ValueError:
-                pass
-            break
-        except ValueError:
-            pass
-        # could be a plutus json
-        try:
-            contract = json.loads(contract_content)
-            contract_cbor = cbor2.loads(bytes.fromhex(contract["cborHex"]))
-        except (ValueError, KeyError):
-            pass
-        # could be uplc
-        try:
-            contract_ast = uplc.parse(contract_content)
-            contract_cbor = uplc.flatten(contract_ast)
-        except:
-            pass
-    if contract_cbor is None:
-        raise ValueError(f"Could not load contract from file {contract_path}")
-    return PlutusContract(PlutusV2Script(contract_cbor))
-
-
-
-
-
-
-
-

Functions

-
-
-def apply_parameters(script: pycardano.plutus.PlutusV2Script, *args: Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]) -
-
-

Expects a plutus script (compiled) and returns the compiled script from applying parameters to it

-
-
-def build(contract_file: str, *args: Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData, uplc.ast.Constant], validator_function_name='validator', config=CompilationConfig(compress_patterns=True, iterative_unfold_patterns=False, constant_index_access_list=True, constant_folding=False, allow_isinstance_anything=False, force_three_params=False, remove_dead_code=True)) -
-
-

Expects a python module and returns the build artifacts from compiling it

-
-
-def compile(program: ast.Module, contract_filename: Optional[str] = None, validator_function_name='validator', config=CompilationConfig(compress_patterns=True, iterative_unfold_patterns=False, constant_index_access_list=True, constant_folding=False, allow_isinstance_anything=False, force_three_params=False, remove_dead_code=True)) ‑> uplc.ast.Program -
-
-
-
-
-def from_plutus_schema(schema: dict) ‑> Type[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]] -
-
-

Convert from a dictionary representing a json schema according to CIP 57 Plutus Blueprint

-
-
-def load(contract_path: Union[pathlib.Path, str]) ‑> PlutusContract -
-
-

Load a contract from a file or directory and generate the artifacts

-
-
-def to_plutus_schema(cls: Type[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]) ‑> dict -
-
-

Convert to a dictionary representing a json schema according to CIP 57 Plutus Blueprint -Reference of the core structure: -https://cips.cardano.org/cips/cip57/#corevocabulary

-

Args

-
-
**kwargs
-
Extra key word arguments to be passed to json.dumps()
-
-

Returns

-
-
dict
-
a dict representing the schema of this class.
-
-
-
-
-
-

Classes

-
-
-class PlutusContract -(contract: pycardano.plutus.PlutusV2Script, datum_type: Optional[Tuple[str, Type[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]]] = None, redeemer_type: Optional[Tuple[str, Type[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]]] = None, parameter_types: List[Tuple[str, Type[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]]] = <factory>, purpose: Iterable[Purpose] = (<Purpose.any: 'any'>,), version: Optional[str] = '1.0.0', title: str = 'validator', description: Optional[str] = 'opshin 0.23.0 Smart Contract', license: Optional[str] = None) -
-
-

PlutusContract(contract: pycardano.plutus.PlutusV2Script, datum_type: Optional[Tuple[str, Type[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]]] = None, redeemer_type: Optional[Tuple[str, Type[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]]] = None, parameter_types: List[Tuple[str, Type[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]]] = , purpose: Iterable[opshin.builder.Purpose] = (,), version: Optional[str] = '1.0.0', title: str = 'validator', description: Optional[str] = 'opshin 0.23.0 Smart Contract', license: Optional[str] = None)

-
- -Expand source code - -
@dataclasses.dataclass
-class PlutusContract:
-    contract: PlutusV2Script
-    datum_type: Optional[typing.Tuple[str, typing.Type[Datum]]] = None
-    redeemer_type: Optional[typing.Tuple[str, typing.Type[Datum]]] = None
-    parameter_types: typing.List[typing.Tuple[str, typing.Type[Datum]]] = (
-        dataclasses.field(default_factory=list)
-    )
-    purpose: typing.Iterable[Purpose] = (Purpose.any,)
-    version: Optional[str] = "1.0.0"
-    title: str = "validator"
-    description: Optional[str] = f"opshin {__version__} Smart Contract"
-    license: Optional[str] = None
-
-    @property
-    def cbor(self) -> bytes:
-        return self.contract
-
-    @property
-    def cbor_hex(self) -> str:
-        return self.contract.hex()
-
-    @property
-    def script_hash(self):
-        return pycardano.plutus_script_hash(self.contract)
-
-    @property
-    def policy_id(self):
-        return self.script_hash.to_primitive().hex()
-
-    @property
-    def mainnet_addr(self):
-        return pycardano.Address(self.script_hash, network=pycardano.Network.MAINNET)
-
-    @property
-    def testnet_addr(self):
-        return pycardano.Address(self.script_hash, network=pycardano.Network.TESTNET)
-
-    @property
-    def plutus_json(self):
-        return json.dumps(
-            {
-                "type": "PlutusScriptV2",
-                "description": self.description,
-                "cborHex": self.cbor_hex,
-            },
-            indent=2,
-        )
-
-    @property
-    def blueprint(self):
-        return {
-            "$schema": "https://cips.cardano.org/cips/cip57/schemas/plutus-blueprint.json",
-            "$id": "https://github.com/aiken-lang/aiken/blob/main/examples/hello_world/plutus.json",
-            "$vocabulary": {
-                "https://json-schema.org/draft/2020-12/vocab/core": True,
-                "https://json-schema.org/draft/2020-12/vocab/applicator": True,
-                "https://json-schema.org/draft/2020-12/vocab/validation": True,
-                "https://cips.cardano.org/cips/cip57": True,
-            },
-            "preamble": {
-                "version": self.version,
-                "plutusVersion": "v2",
-                "description": self.description,
-                "title": self.title,
-                **({"license": self.license} if self.license is not None else {}),
-            },
-            "validators": [
-                {
-                    "title": self.title,
-                    **(
-                        {
-                            "datum": {
-                                "title": self.datum_type[0],
-                                "purpose": PURPOSE_MAP[Purpose.spending],
-                                "schema": to_plutus_schema(self.datum_type[1]),
-                            }
-                        }
-                        if self.datum_type is not None
-                        else {}
-                    ),
-                    "redeemer": (
-                        {
-                            "title": self.redeemer_type[0],
-                            "purpose": {
-                                "oneOf": [PURPOSE_MAP[p] for p in self.purpose]
-                            },
-                            "schema": to_plutus_schema(self.redeemer_type[1]),
-                        }
-                        if self.redeemer_type is not None
-                        else {}
-                    ),
-                    **(
-                        {
-                            "parameters": [
-                                {
-                                    "title": t[0],
-                                    "purpose": PURPOSE_MAP[Purpose.spending],
-                                    "schema": to_plutus_schema(t[1]),
-                                }
-                                for t in self.parameter_types
-                            ]
-                        }
-                        if self.parameter_types
-                        else {}
-                    ),
-                    "compiledCode": self.cbor_hex,
-                    "hash": self.policy_id,
-                },
-            ],
-        }
-
-    def apply_parameter(self, *args: pycardano.Datum):
-        """
-        Returns a new OpShin Contract with the applied parameters
-        """
-        # update the parameters in the blueprint (remove applied parameters)
-        assert len(self.parameter_types) >= len(
-            args
-        ), f"Applying too many parameters to contract, allowed amount: {self.parameter_types}, but got {len(args)}"
-        new_parameter_types = copy.copy(self.parameter_types)
-        for _ in args:
-            # TODO validate that the applied parameters are of the correct type
-            new_parameter_types.pop(0)
-        new_contract_contract = apply_parameters(self.contract, *args)
-        new_contract = PlutusContract(
-            new_contract_contract,
-            self.datum_type,
-            self.redeemer_type,
-            new_parameter_types,
-            self.purpose,
-            self.version,
-            self.title,
-            self.description,
-        )
-        return new_contract
-
-    def dump(self, target_dir: Union[str, Path]):
-        target_dir = Path(target_dir)
-        target_dir.mkdir(exist_ok=True, parents=True)
-        with (target_dir / "script.cbor").open("w") as fp:
-            fp.write(self.cbor_hex)
-        with (target_dir / "script.plutus").open("w") as fp:
-            fp.write(self.plutus_json)
-        with (target_dir / "script.policy_id").open("w") as fp:
-            fp.write(self.policy_id)
-        with (target_dir / "mainnet.addr").open("w") as fp:
-            fp.write(self.mainnet_addr.encode())
-        with (target_dir / "testnet.addr").open("w") as fp:
-            fp.write(self.testnet_addr.encode())
-        with (target_dir / "blueprint.json").open("w") as fp:
-            json.dump(self.blueprint, fp, indent=2)
-
-

Class variables

-
-
var contract : pycardano.plutus.PlutusV2Script
-
-
-
-
var datum_type : Optional[Tuple[str, Type[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]]]
-
-
-
-
var description : Optional[str]
-
-
-
-
var license : Optional[str]
-
-
-
-
var parameter_types : List[Tuple[str, Type[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]]]
-
-
-
-
var purpose : Iterable[Purpose]
-
-
-
-
var redeemer_type : Optional[Tuple[str, Type[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]]]
-
-
-
-
var title : str
-
-
-
-
var version : Optional[str]
-
-
-
-
-

Instance variables

-
-
var blueprint
-
-
-
- -Expand source code - -
@property
-def blueprint(self):
-    return {
-        "$schema": "https://cips.cardano.org/cips/cip57/schemas/plutus-blueprint.json",
-        "$id": "https://github.com/aiken-lang/aiken/blob/main/examples/hello_world/plutus.json",
-        "$vocabulary": {
-            "https://json-schema.org/draft/2020-12/vocab/core": True,
-            "https://json-schema.org/draft/2020-12/vocab/applicator": True,
-            "https://json-schema.org/draft/2020-12/vocab/validation": True,
-            "https://cips.cardano.org/cips/cip57": True,
-        },
-        "preamble": {
-            "version": self.version,
-            "plutusVersion": "v2",
-            "description": self.description,
-            "title": self.title,
-            **({"license": self.license} if self.license is not None else {}),
-        },
-        "validators": [
-            {
-                "title": self.title,
-                **(
-                    {
-                        "datum": {
-                            "title": self.datum_type[0],
-                            "purpose": PURPOSE_MAP[Purpose.spending],
-                            "schema": to_plutus_schema(self.datum_type[1]),
-                        }
-                    }
-                    if self.datum_type is not None
-                    else {}
-                ),
-                "redeemer": (
-                    {
-                        "title": self.redeemer_type[0],
-                        "purpose": {
-                            "oneOf": [PURPOSE_MAP[p] for p in self.purpose]
-                        },
-                        "schema": to_plutus_schema(self.redeemer_type[1]),
-                    }
-                    if self.redeemer_type is not None
-                    else {}
-                ),
-                **(
-                    {
-                        "parameters": [
-                            {
-                                "title": t[0],
-                                "purpose": PURPOSE_MAP[Purpose.spending],
-                                "schema": to_plutus_schema(t[1]),
-                            }
-                            for t in self.parameter_types
-                        ]
-                    }
-                    if self.parameter_types
-                    else {}
-                ),
-                "compiledCode": self.cbor_hex,
-                "hash": self.policy_id,
-            },
-        ],
-    }
-
-
-
var cbor : bytes
-
-
-
- -Expand source code - -
@property
-def cbor(self) -> bytes:
-    return self.contract
-
-
-
var cbor_hex : str
-
-
-
- -Expand source code - -
@property
-def cbor_hex(self) -> str:
-    return self.contract.hex()
-
-
-
var mainnet_addr
-
-
-
- -Expand source code - -
@property
-def mainnet_addr(self):
-    return pycardano.Address(self.script_hash, network=pycardano.Network.MAINNET)
-
-
-
var plutus_json
-
-
-
- -Expand source code - -
@property
-def plutus_json(self):
-    return json.dumps(
-        {
-            "type": "PlutusScriptV2",
-            "description": self.description,
-            "cborHex": self.cbor_hex,
-        },
-        indent=2,
-    )
-
-
-
var policy_id
-
-
-
- -Expand source code - -
@property
-def policy_id(self):
-    return self.script_hash.to_primitive().hex()
-
-
-
var script_hash
-
-
-
- -Expand source code - -
@property
-def script_hash(self):
-    return pycardano.plutus_script_hash(self.contract)
-
-
-
var testnet_addr
-
-
-
- -Expand source code - -
@property
-def testnet_addr(self):
-    return pycardano.Address(self.script_hash, network=pycardano.Network.TESTNET)
-
-
-
-

Methods

-
-
-def apply_parameter(self, *args: Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]) -
-
-

Returns a new OpShin Contract with the applied parameters

-
-
-def dump(self, target_dir: Union[pathlib.Path, str]) -
-
-
-
-
-
-
-class Purpose -(*args, **kwds) -
-
-

Create a collection of name/value pairs.

-

Example enumeration:

-
>>> class Color(Enum):
-...     RED = 1
-...     BLUE = 2
-...     GREEN = 3
-
-

Access them by:

-
    -
  • attribute access::
  • -
-
>>> Color.RED
-<Color.RED: 1>
-
-
    -
  • value lookup:
  • -
-
>>> Color(1)
-<Color.RED: 1>
-
-
    -
  • name lookup:
  • -
-
>>> Color['RED']
-<Color.RED: 1>
-
-

Enumerations can be iterated over, and know how many members they have:

-
>>> len(Color)
-3
-
-
>>> list(Color)
-[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
-
-

Methods can be added to enumerations, and members can have their own -attributes – see the documentation for details.

-
- -Expand source code - -
class Purpose(enum.Enum):
-    spending = "spending"
-    minting = "minting"
-    rewarding = "rewarding"
-    certifying = "certifying"
-    any = "any"
-    lib = "lib"
-
-

Ancestors

-
    -
  • enum.Enum
  • -
-

Class variables

-
-
var any
-
-
-
-
var certifying
-
-
-
-
var lib
-
-
-
-
var minting
-
-
-
-
var rewarding
-
-
-
-
var spending
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/compiler.html b/docs/opshin/compiler.html deleted file mode 100644 index d8cef788..00000000 --- a/docs/opshin/compiler.html +++ /dev/null @@ -1,2437 +0,0 @@ - - - - - - - - -opshin.compiler API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.compiler

-
-
-
- -Expand source code - -
import copy
-
-from uplc.ast import data_from_cbor
-
-from .compiler_config import DEFAULT_CONFIG
-from .optimize.optimize_const_folding import OptimizeConstantFolding
-from .optimize.optimize_remove_comments import OptimizeRemoveDeadconstants
-from .rewrite.rewrite_augassign import RewriteAugAssign
-from .rewrite.rewrite_cast_condition import RewriteConditions
-from .rewrite.rewrite_comparison_chaining import RewriteComparisonChaining
-from .rewrite.rewrite_empty_dicts import RewriteEmptyDicts
-from .rewrite.rewrite_empty_lists import RewriteEmptyLists
-from .rewrite.rewrite_forbidden_overwrites import RewriteForbiddenOverwrites
-from .rewrite.rewrite_forbidden_return import RewriteForbiddenReturn
-from .rewrite.rewrite_import import RewriteImport
-from .rewrite.rewrite_import_dataclasses import RewriteImportDataclasses
-from .rewrite.rewrite_import_hashlib import RewriteImportHashlib
-from .rewrite.rewrite_import_integrity_check import RewriteImportIntegrityCheck
-from .rewrite.rewrite_import_plutusdata import RewriteImportPlutusData
-from .rewrite.rewrite_import_typing import RewriteImportTyping
-from .rewrite.rewrite_import_uplc_builtins import RewriteImportUPLCBuiltins
-from .rewrite.rewrite_inject_builtins import RewriteInjectBuiltins
-from .rewrite.rewrite_inject_builtin_constr import RewriteInjectBuiltinsConstr
-from .rewrite.rewrite_orig_name import RewriteOrigName
-from .rewrite.rewrite_remove_type_stuff import RewriteRemoveTypeStuff
-from .rewrite.rewrite_scoping import RewriteScoping
-from .rewrite.rewrite_subscript38 import RewriteSubscript38
-from .rewrite.rewrite_tuple_assign import RewriteTupleAssign
-from .optimize.optimize_remove_pass import OptimizeRemovePass
-from .optimize.optimize_remove_deadvars import OptimizeRemoveDeadvars, NameLoadCollector
-from .type_inference import *
-from .util import (
-    CompilingNodeTransformer,
-    NoOp,
-)
-from .typed_ast import (
-    transform_ext_params_map,
-    transform_output_map,
-    RawPlutoExpr,
-)
-
-
-BoolOpMap = {
-    And: plt.And,
-    Or: plt.Or,
-}
-
-
-def rec_constant_map_data(c):
-    if isinstance(c, bool):
-        return uplc.PlutusInteger(int(c))
-    if isinstance(c, int):
-        return uplc.PlutusInteger(c)
-    if isinstance(c, type(None)):
-        return uplc.PlutusConstr(0, [])
-    if isinstance(c, bytes):
-        return uplc.PlutusByteString(c)
-    if isinstance(c, str):
-        return uplc.PlutusByteString(c.encode())
-    if isinstance(c, list):
-        return uplc.PlutusList([rec_constant_map_data(ce) for ce in c])
-    if isinstance(c, dict):
-        return uplc.PlutusMap(
-            dict(
-                zip(
-                    (rec_constant_map_data(ce) for ce in c.keys()),
-                    (rec_constant_map_data(ce) for ce in c.values()),
-                )
-            )
-        )
-    raise NotImplementedError(f"Unsupported constant type {type(c)}")
-
-
-def rec_constant_map(c):
-    if isinstance(c, bool):
-        return uplc.BuiltinBool(c)
-    if isinstance(c, int):
-        return uplc.BuiltinInteger(c)
-    if isinstance(c, type(None)):
-        return uplc.BuiltinUnit()
-    if isinstance(c, bytes):
-        return uplc.BuiltinByteString(c)
-    if isinstance(c, str):
-        return uplc.BuiltinString(c)
-    if isinstance(c, list):
-        return uplc.BuiltinList([rec_constant_map(ce) for ce in c])
-    if isinstance(c, dict):
-        return uplc.BuiltinList(
-            [
-                uplc.BuiltinPair(*p)
-                for p in zip(
-                    (rec_constant_map_data(ce) for ce in c.keys()),
-                    (rec_constant_map_data(ce) for ce in c.values()),
-                )
-            ]
-        )
-    if isinstance(c, PlutusData):
-        return data_from_cbor(c.to_cbor())
-    raise NotImplementedError(f"Unsupported constant type {type(c)}")
-
-
-def wrap_validator_double_function(x: plt.AST, pass_through: int = 0):
-    """
-    Wraps the validator function to enable a double function as minting script
-
-    pass_through defines how many parameters x would normally take and should be passed through to x
-    """
-    return OLambda(
-        [f"v{i}" for i in range(pass_through)] + ["a0", "a1"],
-        OLet(
-            [("p", plt.Apply(x, *(OVar(f"v{i}") for i in range(pass_through))))],
-            plt.Ite(
-                # if the second argument has constructor 0 = script context
-                plt.DelayedChooseData(
-                    OVar("a1"),
-                    plt.EqualsInteger(plt.Constructor(OVar("a1")), plt.Integer(0)),
-                    plt.Bool(False),
-                    plt.Bool(False),
-                    plt.Bool(False),
-                    plt.Bool(False),
-                ),
-                # call the validator with a0, a1, and plug in "Nothing" for data
-                plt.Apply(
-                    OVar("p"),
-                    plt.UPLCConstant(uplc.PlutusConstr(6, [])),
-                    OVar("a0"),
-                    OVar("a1"),
-                ),
-                # else call the validator with a0, a1 and return (now partially bound)
-                plt.Apply(OVar("p"), OVar("a0"), OVar("a1")),
-            ),
-        ),
-    )
-
-
-CallAST = typing.Callable[[plt.AST], plt.AST]
-
-
-class PlutoCompiler(CompilingNodeTransformer):
-    """
-    Expects a TypedAST and returns UPLC/Pluto like code
-    """
-
-    step = "Compiling python statements to UPLC"
-
-    def __init__(self, force_three_params=False, validator_function_name="validator"):
-        # parameters
-        self.force_three_params = force_three_params
-        self.validator_function_name = validator_function_name
-        # marked knowledge during compilation
-        self.current_function_typ: typing.List[FunctionType] = []
-
-    def visit_sequence(self, node_seq: typing.List[typedstmt]) -> CallAST:
-        def g(s: plt.AST):
-            for n in reversed(node_seq):
-                compiled_stmt = self.visit(n)
-                s = compiled_stmt(s)
-            return s
-
-        return g
-
-    def visit_BinOp(self, node: TypedBinOp) -> plt.AST:
-        op = node.left.typ.binop(node.op, node.right)
-        return plt.Apply(
-            op,
-            self.visit(node.left),
-            self.visit(node.right),
-        )
-
-    def visit_BoolOp(self, node: TypedBoolOp) -> plt.AST:
-        op = BoolOpMap.get(type(node.op))
-        assert len(node.values) >= 2, "Need to compare at least to values"
-        ops = op(
-            self.visit(node.values[0]),
-            self.visit(node.values[1]),
-        )
-        for v in node.values[2:]:
-            ops = op(ops, self.visit(v))
-        return ops
-
-    def visit_UnaryOp(self, node: TypedUnaryOp) -> plt.AST:
-        op = node.operand.typ.unop(node.op)
-        return plt.Apply(
-            op,
-            self.visit(node.operand),
-        )
-
-    def visit_Compare(self, node: TypedCompare) -> plt.AST:
-        assert len(node.ops) == 1, "Only single comparisons are supported"
-        assert len(node.comparators) == 1, "Only single comparisons are supported"
-        cmpop = node.ops[0]
-        comparator = node.comparators[0].typ
-        op = node.left.typ.cmp(cmpop, comparator)
-        return plt.Apply(
-            op,
-            self.visit(node.left),
-            self.visit(node.comparators[0]),
-        )
-
-    def visit_Module(self, node: TypedModule) -> plt.AST:
-        # extract actually read variables by each function
-        if self.validator_function_name is not None:
-            # for validators find main function
-            # TODO can use more sophisiticated procedure here i.e. functions marked by comment
-            main_fun: typing.Optional[InstanceType] = None
-            for s in node.body:
-                if (
-                    isinstance(s, FunctionDef)
-                    and s.orig_name == self.validator_function_name
-                ):
-                    main_fun = s
-            assert (
-                main_fun is not None
-            ), f"Could not find function named {self.validator_function_name}"
-            main_fun_typ: FunctionType = main_fun.typ.typ
-            assert isinstance(
-                main_fun_typ, FunctionType
-            ), f"Variable named {self.validator_function_name} is not of type function"
-
-            # check if this is a contract written to double function
-            enable_double_func_mint_spend = False
-            if len(main_fun_typ.argtyps) >= 3 and self.force_three_params:
-                # check if is possible
-                second_last_arg = main_fun_typ.argtyps[-2]
-                assert isinstance(
-                    second_last_arg, InstanceType
-                ), "Can not pass Class into validator"
-                if isinstance(second_last_arg.typ, UnionType):
-                    possible_types = second_last_arg.typ.typs
-                else:
-                    possible_types = [second_last_arg.typ]
-                if any(isinstance(t, UnitType) for t in possible_types):
-                    OPSHIN_LOGGER.warning(
-                        "The redeemer is annotated to be 'None'. This value is usually encoded in PlutusData with constructor id 0 and no fields. If you want the script to double function as minting and spending script, annotate the second argument with 'NoRedeemer'."
-                    )
-                enable_double_func_mint_spend = not any(
-                    (isinstance(t, RecordType) and t.record.constructor == 0)
-                    or isinstance(t, UnitType)
-                    for t in possible_types
-                )
-                if not enable_double_func_mint_spend:
-                    OPSHIN_LOGGER.warning(
-                        "The second argument to the validator function potentially has constructor id 0. The validator will not be able to double function as minting script and spending script."
-                    )
-
-            body = node.body + (
-                [
-                    TypedReturn(
-                        TypedCall(
-                            func=Name(
-                                id=main_fun.name,
-                                typ=InstanceType(main_fun_typ),
-                                ctx=Load(),
-                            ),
-                            typ=main_fun_typ.rettyp,
-                            args=[
-                                RawPlutoExpr(
-                                    expr=transform_ext_params_map(a)(
-                                        OVar(f"val_param{i}")
-                                    ),
-                                    typ=a,
-                                )
-                                for i, a in enumerate(main_fun_typ.argtyps)
-                            ],
-                        )
-                    )
-                ]
-            )
-            self.current_function_typ.append(FunctionType([], InstanceType(AnyType())))
-            name_load_visitor = NameLoadCollector()
-            name_load_visitor.visit(node)
-            all_vs = sorted(set(all_vars(node)) | set(name_load_visitor.loaded.keys()))
-
-            # write all variables that are ever read
-            # once at the beginning so that we can always access them (only potentially causing a nameerror at runtime)
-            validator = SafeOLambda(
-                [f"val_param{i}" for i, _ in enumerate(main_fun_typ.argtyps)],
-                plt.Let(
-                    [
-                        (
-                            x,
-                            plt.Delay(
-                                plt.TraceError(f"NameError: {map_to_orig_name(x)}")
-                            ),
-                        )
-                        for x in all_vs
-                    ],
-                    self.visit_sequence(body)(
-                        plt.ConstrData(plt.Integer(0), plt.EmptyDataList())
-                    ),
-                ),
-            )
-            self.current_function_typ.pop()
-            if enable_double_func_mint_spend:
-                validator = wrap_validator_double_function(
-                    validator, pass_through=len(main_fun_typ.argtyps) - 3
-                )
-            elif self.force_three_params:
-                # Error if the double function is enforced but not possible
-                raise RuntimeError(
-                    "The contract can not always detect if it was passed three or two parameters on-chain."
-                )
-        else:
-            name_load_visitor = NameLoadCollector()
-            name_load_visitor.visit(node)
-            all_vs = sorted(set(all_vars(node)) | set(name_load_visitor.loaded.keys()))
-
-            body = node.body
-            # write all variables that are ever read
-            # once at the beginning so that we can always access them (only potentially causing a nameerror at runtime)
-            validator = plt.Let(
-                [
-                    (
-                        x,
-                        plt.Delay(plt.TraceError(f"NameError: {map_to_orig_name(x)}")),
-                    )
-                    for x in all_vs
-                ],
-                self.visit_sequence(body)(
-                    plt.ConstrData(plt.Integer(0), plt.EmptyDataList())
-                ),
-            )
-
-        cp = plt.Program((1, 0, 0), validator)
-        return cp
-
-    def visit_Constant(self, node: TypedConstant) -> plt.AST:
-        if isinstance(node.value, bytes) and node.value != b"":
-            try:
-                bytes.fromhex(node.value.decode())
-            except ValueError:
-                pass
-            else:
-                OPSHIN_LOGGER.warning(
-                    f"The string {node.value} looks like it is supposed to be a hex-encoded bytestring but is actually utf8-encoded. Try using `bytes.fromhex('{node.value.decode()}')` instead."
-                )
-        plt_val = plt.UPLCConstant(rec_constant_map(node.value))
-        return plt_val
-
-    def visit_NoneType(self, _: typing.Optional[typing.Any]) -> plt.AST:
-        return plt.Unit()
-
-    def visit_Assign(self, node: TypedAssign) -> CallAST:
-        assert (
-            len(node.targets) == 1
-        ), "Assignments to more than one variable not supported yet"
-        assert isinstance(
-            node.targets[0], Name
-        ), "Assignments to other things then names are not supported"
-        compiled_e = self.visit(node.value)
-        varname = node.targets[0].id
-        # first evaluate the term, then wrap in a delay
-        return lambda x: plt.Let(
-            [
-                (opshin_name_scheme_compatible_varname(varname), compiled_e),
-                (varname, plt.Delay(OVar(varname))),
-            ],
-            x,
-        )
-
-    def visit_AnnAssign(self, node: AnnAssign) -> CallAST:
-        assert isinstance(
-            node.target, Name
-        ), "Assignments to other things then names are not supported"
-        assert isinstance(
-            node.target.typ, InstanceType
-        ), "Can only assign instances to instances"
-        val = self.visit(node.value)
-        if isinstance(node.value.typ, InstanceType) and isinstance(
-            node.value.typ.typ, AnyType
-        ):
-            # we need to map this as it will originate from PlutusData
-            # AnyType is the only type other than the builtin itself that can be cast to builtin values
-            val = transform_ext_params_map(node.target.typ)(val)
-        if isinstance(node.target.typ, InstanceType) and isinstance(
-            node.target.typ.typ, AnyType
-        ):
-            # we need to map this back as it will be treated as PlutusData
-            # AnyType is the only type other than the builtin itself that can be cast to from builtin values
-            val = transform_output_map(node.value.typ)(val)
-        return lambda x: plt.Let(
-            [
-                (opshin_name_scheme_compatible_varname(node.target.id), val),
-                (node.target.id, plt.Delay(OVar(node.target.id))),
-            ],
-            x,
-        )
-
-    def visit_Name(self, node: TypedName) -> plt.AST:
-        # depending on load or store context, return the value of the variable or its name
-        if not isinstance(node.ctx, Load):
-            raise NotImplementedError(f"Context {node.ctx} not supported")
-        if isinstance(node.typ, ClassType):
-            # if this is not an instance but a class, call the constructor
-            return node.typ.constr()
-        return plt.Force(plt.Var(node.id))
-
-    def visit_Expr(self, node: TypedExpr) -> CallAST:
-        # we exploit UPLCs eager evaluation here
-        # the expression is computed even though its value is eventually discarded
-        # Note this really only makes sense for Trace
-        # we use an invalid name here to avoid conflicts
-        return lambda x: plt.Apply(OLambda(["0"], x), self.visit(node.value))
-
-    def visit_Call(self, node: TypedCall) -> plt.AST:
-        # compiled_args = " ".join(f"({self.visit(a)} {STATEMONAD})" for a in node.args)
-        # return rf"(\{STATEMONAD} -> ({self.visit(node.func)} {compiled_args})"
-        # TODO function is actually not of type polymorphic function type here anymore
-        if isinstance(node.func.typ, PolymorphicFunctionInstanceType):
-            # edge case for weird builtins that are polymorphic
-            func_plt = force_params(
-                node.func.typ.polymorphic_function.impl_from_args(
-                    node.func.typ.typ.argtyps
-                )
-            )
-            bind_self = None
-        else:
-            assert isinstance(node.func.typ, InstanceType) and isinstance(
-                node.func.typ.typ, FunctionType
-            )
-            func_plt = self.visit(node.func)
-            bind_self = node.func.typ.typ.bind_self
-        bound_vs = sorted(list(node.func.typ.typ.bound_vars.keys()))
-        args = []
-        for a, t in zip(node.args, node.func.typ.typ.argtyps):
-            assert isinstance(t, InstanceType)
-            # pass in all arguments evaluated with the statemonad
-            a_int = self.visit(a)
-            if isinstance(t.typ, AnyType):
-                # if the function expects input of generic type data, wrap data before passing it inside
-                a_int = transform_output_map(a.typ)(a_int)
-            args.append(a_int)
-        # First assign to let to ensure that the arguments are evaluated before the call, but need to delay
-        # as this is a variable assignment
-        # Also bring all states of variables read inside the function into scope / update with value in current state
-        # before call to simulate statemonad with current state being passed in
-        return OLet(
-            [(f"p{i}", a) for i, a in enumerate(args)],
-            SafeApply(
-                func_plt,
-                *([plt.Var(bind_self)] if bind_self is not None else []),
-                *[plt.Var(n) for n in bound_vs],
-                *[plt.Delay(OVar(f"p{i}")) for i in range(len(args))],
-            ),
-        )
-
-    def visit_FunctionDef(self, node: TypedFunctionDef) -> CallAST:
-        body = node.body.copy()
-        # defaults to returning None if there is no return statement
-        if node.typ.typ.rettyp.typ == AnyType():
-            ret_val = plt.ConstrData(plt.Integer(0), plt.EmptyDataList())
-        else:
-            ret_val = plt.Unit()
-        read_vs = sorted(list(node.typ.typ.bound_vars.keys()))
-        if node.typ.typ.bind_self is not None:
-            read_vs.insert(0, node.typ.typ.bind_self)
-        self.current_function_typ.append(node.typ.typ)
-        compiled_body = self.visit_sequence(body)(ret_val)
-        self.current_function_typ.pop()
-        return lambda x: plt.Let(
-            [
-                (
-                    node.name,
-                    plt.Delay(
-                        SafeLambda(
-                            read_vs + [a.arg for a in node.args.args],
-                            compiled_body,
-                        )
-                    ),
-                )
-            ],
-            x,
-        )
-
-    def visit_While(self, node: TypedWhile) -> CallAST:
-        # the while loop calls itself, updating the values at overwritten names
-        # by overwriting them with arguments to its self-recall
-        if node.orelse:
-            # If there is orelse, transform it to an appended sequence (TODO check if this is correct)
-            cn = copy(node)
-            cn.orelse = []
-            return self.visit_sequence([cn] + node.orelse)
-        compiled_c = self.visit(node.test)
-        compiled_s = self.visit_sequence(node.body)
-        written_vs = written_vars(node)
-        pwritten_vs = [plt.Var(x) for x in written_vs]
-        s_fun = lambda x: plt.Lambda(
-            [opshin_name_scheme_compatible_varname("while")] + written_vs,
-            plt.Ite(
-                compiled_c,
-                compiled_s(
-                    plt.Apply(
-                        OVar("while"),
-                        OVar("while"),
-                        *deepcopy(pwritten_vs),
-                    )
-                ),
-                x,
-            ),
-        )
-
-        return lambda x: OLet(
-            [
-                ("adjusted_next", SafeLambda(written_vs, x)),
-                (
-                    "while",
-                    s_fun(SafeApply(OVar("adjusted_next"), *deepcopy(pwritten_vs))),
-                ),
-            ],
-            plt.Apply(OVar("while"), OVar("while"), *deepcopy(pwritten_vs)),
-        )
-
-    def visit_For(self, node: TypedFor) -> CallAST:
-        if node.orelse:
-            # If there is orelse, transform it to an appended sequence (TODO check if this is correct)
-            cn = copy(node)
-            cn.orelse = []
-            return self.visit_sequence([cn] + node.orelse)
-        assert isinstance(node.iter.typ, InstanceType)
-        if isinstance(node.iter.typ.typ, ListType):
-            assert isinstance(
-                node.target, Name
-            ), "Can only assign value to singleton element"
-            compiled_s = self.visit_sequence(node.body)
-            compiled_iter = self.visit(node.iter)
-            written_vs = written_vars(node)
-            pwritten_vs = [plt.Var(x) for x in written_vs]
-            s_fun = lambda x: plt.Lambda(
-                [
-                    opshin_name_scheme_compatible_varname("for"),
-                    opshin_name_scheme_compatible_varname("iter"),
-                ]
-                + written_vs,
-                plt.IteNullList(
-                    OVar("iter"),
-                    x,
-                    plt.Let(
-                        [(node.target.id, plt.Delay(plt.HeadList(OVar("iter"))))],
-                        compiled_s(
-                            plt.Apply(
-                                OVar("for"),
-                                OVar("for"),
-                                plt.TailList(OVar("iter")),
-                                *deepcopy(pwritten_vs),
-                            )
-                        ),
-                    ),
-                ),
-            )
-            return lambda x: OLet(
-                [
-                    ("adjusted_next", plt.Lambda([node.target.id] + written_vs, x)),
-                    (
-                        "for",
-                        s_fun(
-                            plt.Apply(
-                                OVar("adjusted_next"),
-                                plt.Var(node.target.id),
-                                *deepcopy(pwritten_vs),
-                            )
-                        ),
-                    ),
-                ],
-                plt.Apply(
-                    OVar("for"),
-                    OVar("for"),
-                    compiled_iter,
-                    *deepcopy(pwritten_vs),
-                ),
-            )
-        raise NotImplementedError(
-            "Compilation of for statements for anything but lists not implemented yet"
-        )
-
-    def visit_If(self, node: TypedIf) -> CallAST:
-        written_vs = written_vars(node)
-        pwritten_vs = [plt.Var(x) for x in written_vs]
-        return lambda x: OLet(
-            [("adjusted_next", SafeLambda(written_vs, x))],
-            plt.Ite(
-                self.visit(node.test),
-                self.visit_sequence(node.body)(
-                    SafeApply(OVar("adjusted_next"), *deepcopy(pwritten_vs))
-                ),
-                self.visit_sequence(node.orelse)(
-                    SafeApply(OVar("adjusted_next"), *deepcopy(pwritten_vs))
-                ),
-            ),
-        )
-
-    def visit_Return(self, node: TypedReturn) -> CallAST:
-        value_plt = self.visit(node.value)
-        assert self.current_function_typ, "Can not handle Return outside of a function"
-        if isinstance(self.current_function_typ[-1].rettyp.typ, AnyType):
-            value_plt = transform_output_map(node.value.typ)(value_plt)
-        return lambda _: value_plt
-
-    def visit_Pass(self, node: TypedPass) -> CallAST:
-        return self.visit_sequence([])
-
-    def visit_Subscript(self, node: TypedSubscript) -> plt.AST:
-        assert isinstance(
-            node.value.typ, InstanceType
-        ), "Can only access elements of instances, not classes"
-        if isinstance(node.value.typ.typ, TupleType):
-            assert isinstance(
-                node.slice, Constant
-            ), "Only constant index access for tuples is supported"
-            assert isinstance(
-                node.slice.value, int
-            ), "Only constant index integer access for tuples is supported"
-            index = node.slice.value
-            if index < 0:
-                index += len(node.value.typ.typ.typs)
-            assert isinstance(node.ctx, Load), "Tuples are read-only"
-            return plt.FunctionalTupleAccess(
-                self.visit(node.value),
-                index,
-                len(node.value.typ.typ.typs),
-            )
-        if isinstance(node.value.typ.typ, PairType):
-            assert isinstance(
-                node.slice, Constant
-            ), "Only constant index access for pairs is supported"
-            assert isinstance(
-                node.slice.value, int
-            ), "Only constant index integer access for pairs is supported"
-            index = node.slice.value
-            if index < 0:
-                index += 2
-            assert isinstance(node.ctx, Load), "Pairs are read-only"
-            assert (
-                0 <= index < 2
-            ), f"Pairs only have 2 elements, index should be 0 or 1, is {node.slice.value}"
-            member_func = plt.FstPair if index == 0 else plt.SndPair
-            # the content of pairs is always Data, so we need to unwrap
-            member_typ = node.typ
-            return transform_ext_params_map(member_typ)(
-                member_func(
-                    self.visit(node.value),
-                ),
-            )
-        if isinstance(node.value.typ.typ, ListType):
-            if not isinstance(node.slice, Slice):
-                assert (
-                    node.slice.typ == IntegerInstanceType
-                ), "Only single element list index access supported"
-                return OLet(
-                    [
-                        (
-                            "l",
-                            self.visit(node.value),
-                        ),
-                        (
-                            "raw_i",
-                            self.visit(node.slice),
-                        ),
-                        (
-                            "i",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_i"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_i"), plt.LengthList(OVar("l"))
-                                ),
-                                OVar("raw_i"),
-                            ),
-                        ),
-                    ],
-                    plt.IndexAccessList(OVar("l"), OVar("i")),
-                )
-            else:
-                return OLet(
-                    [
-                        (
-                            "xs",
-                            self.visit(node.value),
-                        ),
-                        (
-                            "raw_i",
-                            self.visit(node.slice.lower),
-                        ),
-                        (
-                            "i",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_i"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_i"),
-                                    plt.LengthList(OVar("xs")),
-                                ),
-                                OVar("raw_i"),
-                            ),
-                        ),
-                        (
-                            "raw_j",
-                            self.visit(node.slice.upper),
-                        ),
-                        (
-                            "j",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_j"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_j"),
-                                    plt.LengthList(OVar("xs")),
-                                ),
-                                OVar("raw_j"),
-                            ),
-                        ),
-                        (
-                            "drop",
-                            plt.Ite(
-                                plt.LessThanEqualsInteger(OVar("i"), plt.Integer(0)),
-                                plt.Integer(0),
-                                OVar("i"),
-                            ),
-                        ),
-                        (
-                            "take",
-                            plt.SubtractInteger(OVar("j"), OVar("drop")),
-                        ),
-                    ],
-                    plt.Ite(
-                        plt.LessThanEqualsInteger(OVar("j"), OVar("i")),
-                        empty_list(node.value.typ.typ.typ),
-                        plt.SliceList(
-                            OVar("drop"),
-                            OVar("take"),
-                            OVar("xs"),
-                            empty_list(node.value.typ.typ.typ),
-                        ),
-                    ),
-                )
-        elif isinstance(node.value.typ.typ, DictType):
-            dict_typ = node.value.typ.typ
-            if not isinstance(node.slice, Slice):
-                return OLet(
-                    [
-                        (
-                            "key",
-                            self.visit(node.slice),
-                        )
-                    ],
-                    transform_ext_params_map(dict_typ.value_typ)(
-                        plt.SndPair(
-                            plt.FindList(
-                                self.visit(node.value),
-                                OLambda(
-                                    ["x"],
-                                    plt.EqualsData(
-                                        transform_output_map(dict_typ.key_typ)(
-                                            OVar("key")
-                                        ),
-                                        plt.FstPair(OVar("x")),
-                                    ),
-                                ),
-                                plt.TraceError("KeyError"),
-                            )
-                        ),
-                    ),
-                )
-        elif isinstance(node.value.typ.typ, ByteStringType):
-            if not isinstance(node.slice, Slice):
-                return OLet(
-                    [
-                        (
-                            "bs",
-                            self.visit(node.value),
-                        ),
-                        (
-                            "raw_ix",
-                            self.visit(node.slice),
-                        ),
-                        (
-                            "ix",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_ix"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_ix"),
-                                    plt.LengthOfByteString(OVar("bs")),
-                                ),
-                                OVar("raw_ix"),
-                            ),
-                        ),
-                    ],
-                    plt.IndexByteString(OVar("bs"), OVar("ix")),
-                )
-            elif isinstance(node.slice, Slice):
-                return OLet(
-                    [
-                        (
-                            "bs",
-                            self.visit(node.value),
-                        ),
-                        (
-                            "raw_i",
-                            self.visit(node.slice.lower),
-                        ),
-                        (
-                            "i",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_i"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_i"),
-                                    plt.LengthOfByteString(OVar("bs")),
-                                ),
-                                OVar("raw_i"),
-                            ),
-                        ),
-                        (
-                            "raw_j",
-                            self.visit(node.slice.upper),
-                        ),
-                        (
-                            "j",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_j"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_j"),
-                                    plt.LengthOfByteString(OVar("bs")),
-                                ),
-                                OVar("raw_j"),
-                            ),
-                        ),
-                        (
-                            "drop",
-                            plt.Ite(
-                                plt.LessThanEqualsInteger(OVar("i"), plt.Integer(0)),
-                                plt.Integer(0),
-                                OVar("i"),
-                            ),
-                        ),
-                        (
-                            "take",
-                            plt.SubtractInteger(OVar("j"), OVar("drop")),
-                        ),
-                    ],
-                    plt.Ite(
-                        plt.LessThanEqualsInteger(OVar("j"), OVar("i")),
-                        plt.ByteString(b""),
-                        plt.SliceByteString(
-                            OVar("drop"),
-                            OVar("take"),
-                            OVar("bs"),
-                        ),
-                    ),
-                )
-        raise NotImplementedError(
-            f'Could not implement subscript "{node.slice}" of "{node.value}"'
-        )
-
-    def visit_Tuple(self, node: TypedTuple) -> plt.AST:
-        return plt.FunctionalTuple(*(self.visit(e) for e in node.elts))
-
-    def visit_ClassDef(self, node: TypedClassDef) -> CallAST:
-        return lambda x: plt.Let([(node.name, plt.Delay(node.class_typ.constr()))], x)
-
-    def visit_Attribute(self, node: TypedAttribute) -> plt.AST:
-        assert isinstance(
-            node.value.typ, InstanceType
-        ), "Can only access attributes of instances"
-        obj = self.visit(node.value)
-        attr = node.value.typ.attribute(node.attr)
-        return plt.Apply(attr, obj)
-
-    def visit_Assert(self, node: TypedAssert) -> CallAST:
-        return lambda x: plt.Ite(
-            self.visit(node.test),
-            x,
-            plt.Apply(
-                plt.Error(),
-                (
-                    plt.Trace(self.visit(node.msg), plt.Unit())
-                    if node.msg is not None
-                    else plt.Unit()
-                ),
-            ),
-        )
-
-    def visit_RawPlutoExpr(self, node: RawPlutoExpr) -> plt.AST:
-        return node.expr
-
-    def visit_List(self, node: TypedList) -> plt.AST:
-        assert isinstance(node.typ, InstanceType)
-        assert isinstance(node.typ.typ, ListType)
-        l = empty_list(node.typ.typ.typ)
-        for e in reversed(node.elts):
-            l = plt.MkCons(self.visit(e), l)
-        return l
-
-    def visit_Dict(self, node: TypedDict) -> plt.AST:
-        assert isinstance(node.typ, InstanceType)
-        assert isinstance(node.typ.typ, DictType)
-        key_type = node.typ.typ.key_typ
-        value_type = node.typ.typ.value_typ
-        l = plt.EmptyDataPairList()
-        for k, v in zip(node.keys, node.values):
-            l = plt.MkCons(
-                plt.MkPairData(
-                    transform_output_map(key_type)(
-                        self.visit(k),
-                    ),
-                    transform_output_map(value_type)(
-                        self.visit(v),
-                    ),
-                ),
-                l,
-            )
-        return l
-
-    def visit_IfExp(self, node: TypedIfExp) -> plt.AST:
-        return plt.Ite(
-            self.visit(node.test),
-            self.visit(node.body),
-            self.visit(node.orelse),
-        )
-
-    def visit_ListComp(self, node: TypedListComp) -> plt.AST:
-        assert len(node.generators) == 1, "Currently only one generator supported"
-        gen = node.generators[0]
-        assert isinstance(gen.iter.typ, InstanceType), "Only lists are valid generators"
-        assert isinstance(gen.iter.typ.typ, ListType), "Only lists are valid generators"
-        assert isinstance(
-            gen.target, Name
-        ), "Can only assign value to singleton element"
-        lst = self.visit(gen.iter)
-        ifs = None
-        for ifexpr in gen.ifs:
-            if ifs is None:
-                ifs = self.visit(ifexpr)
-            else:
-                ifs = plt.And(ifs, self.visit(ifexpr))
-        map_fun = OLambda(
-            ["x"],
-            plt.Let(
-                [(gen.target.id, plt.Delay(OVar("x")))],
-                self.visit(node.elt),
-            ),
-        )
-        empty_list_con = empty_list(node.elt.typ)
-        if ifs is not None:
-            filter_fun = OLambda(
-                ["x"],
-                plt.Let(
-                    [(gen.target.id, plt.Delay(OVar("x")))],
-                    ifs,
-                ),
-            )
-            return plt.MapFilterList(
-                lst,
-                filter_fun,
-                map_fun,
-                empty_list_con,
-            )
-        else:
-            return plt.MapList(
-                lst,
-                map_fun,
-                empty_list_con,
-            )
-
-    def visit_DictComp(self, node: TypedDictComp) -> plt.AST:
-        assert len(node.generators) == 1, "Currently only one generator supported"
-        gen = node.generators[0]
-        assert isinstance(gen.iter.typ, InstanceType), "Only lists are valid generators"
-        assert isinstance(gen.iter.typ.typ, ListType), "Only lists are valid generators"
-        assert isinstance(
-            gen.target, Name
-        ), "Can only assign value to singleton element"
-        lst = self.visit(gen.iter)
-        ifs = None
-        for ifexpr in gen.ifs:
-            if ifs is None:
-                ifs = self.visit(ifexpr)
-            else:
-                ifs = plt.And(ifs, self.visit(ifexpr))
-        map_fun = OLambda(
-            ["x"],
-            plt.Let(
-                [(gen.target.id, plt.Delay(OVar("x")))],
-                plt.MkPairData(
-                    transform_output_map(node.key.typ)(
-                        self.visit(node.key),
-                    ),
-                    transform_output_map(node.value.typ)(
-                        self.visit(node.value),
-                    ),
-                ),
-            ),
-        )
-        empty_list_con = plt.EmptyDataPairList()
-        if ifs is not None:
-            filter_fun = OLambda(
-                ["x"],
-                plt.Let(
-                    [(gen.target.id, plt.Delay(OVar("x")))],
-                    ifs,
-                ),
-            )
-            return plt.MapFilterList(
-                lst,
-                filter_fun,
-                map_fun,
-                empty_list_con,
-            )
-        else:
-            return plt.MapList(
-                lst,
-                map_fun,
-                empty_list_con,
-            )
-
-    def visit_FormattedValue(self, node: TypedFormattedValue) -> plt.AST:
-        return plt.Apply(
-            node.value.typ.stringify(),
-            self.visit(node.value),
-        )
-
-    def visit_JoinedStr(self, node: TypedJoinedStr) -> plt.AST:
-        joined_str = plt.Text("")
-        for v in reversed(node.values):
-            joined_str = plt.AppendString(self.visit(v), joined_str)
-        return joined_str
-
-    def generic_visit(self, node: AST) -> plt.AST:
-        raise NotImplementedError(f"Can not compile {node}")
-
-
-def compile(
-    prog: AST,
-    filename=None,
-    validator_function_name="validator",
-    config=DEFAULT_CONFIG,
-) -> plt.Program:
-    compile_pipeline = [
-        # Important to call this one first - it imports all further files
-        RewriteImport(filename=filename),
-        # Rewrites that simplify the python code
-        RewriteForbiddenReturn(),
-        OptimizeConstantFolding() if config.constant_folding else NoOp(),
-        RewriteSubscript38(),
-        RewriteAugAssign(),
-        RewriteComparisonChaining(),
-        RewriteTupleAssign(),
-        RewriteImportIntegrityCheck(),
-        RewriteImportPlutusData(),
-        RewriteImportHashlib(),
-        RewriteImportTyping(),
-        RewriteForbiddenOverwrites(),
-        RewriteImportDataclasses(),
-        RewriteInjectBuiltins(),
-        RewriteConditions(),
-        # Save the original names of variables
-        RewriteOrigName(),
-        RewriteScoping(),
-        # The type inference needs to be run after complex python operations were rewritten
-        AggressiveTypeInferencer(config.allow_isinstance_anything),
-        # Rewrites that circumvent the type inference or use its results
-        RewriteEmptyLists(),
-        RewriteEmptyDicts(),
-        RewriteImportUPLCBuiltins(),
-        RewriteInjectBuiltinsConstr(),
-        RewriteRemoveTypeStuff(),
-        # Apply optimizations
-        OptimizeRemoveDeadvars() if config.remove_dead_code else NoOp(),
-        OptimizeRemoveDeadconstants() if config.remove_dead_code else NoOp(),
-        OptimizeRemovePass(),
-    ]
-    for s in compile_pipeline:
-        prog = s.visit(prog)
-        prog = custom_fix_missing_locations(prog)
-
-    # the compiler runs last
-    s = PlutoCompiler(
-        force_three_params=config.force_three_params,
-        validator_function_name=validator_function_name,
-    )
-    prog = s.visit(prog)
-
-    return prog
-
-
-
-
-
-
-
-

Functions

-
-
-def compile(prog: ast.AST, filename=None, validator_function_name='validator', config=CompilationConfig(compress_patterns=True, iterative_unfold_patterns=False, constant_index_access_list=True, constant_folding=False, allow_isinstance_anything=False, force_three_params=False, remove_dead_code=True)) ‑> pluthon.pluthon_ast.Program -
-
-
-
-
-def rec_constant_map(c) -
-
-
-
-
-def rec_constant_map_data(c) -
-
-
-
-
-def wrap_validator_double_function(x: pluthon.pluthon_ast.AST, pass_through: int = 0) -
-
-

Wraps the validator function to enable a double function as minting script

-

pass_through defines how many parameters x would normally take and should be passed through to x

-
-
-
-
-

Classes

-
-
-class PlutoCompiler -(force_three_params=False, validator_function_name='validator') -
-
-

Expects a TypedAST and returns UPLC/Pluto like code

-
- -Expand source code - -
class PlutoCompiler(CompilingNodeTransformer):
-    """
-    Expects a TypedAST and returns UPLC/Pluto like code
-    """
-
-    step = "Compiling python statements to UPLC"
-
-    def __init__(self, force_three_params=False, validator_function_name="validator"):
-        # parameters
-        self.force_three_params = force_three_params
-        self.validator_function_name = validator_function_name
-        # marked knowledge during compilation
-        self.current_function_typ: typing.List[FunctionType] = []
-
-    def visit_sequence(self, node_seq: typing.List[typedstmt]) -> CallAST:
-        def g(s: plt.AST):
-            for n in reversed(node_seq):
-                compiled_stmt = self.visit(n)
-                s = compiled_stmt(s)
-            return s
-
-        return g
-
-    def visit_BinOp(self, node: TypedBinOp) -> plt.AST:
-        op = node.left.typ.binop(node.op, node.right)
-        return plt.Apply(
-            op,
-            self.visit(node.left),
-            self.visit(node.right),
-        )
-
-    def visit_BoolOp(self, node: TypedBoolOp) -> plt.AST:
-        op = BoolOpMap.get(type(node.op))
-        assert len(node.values) >= 2, "Need to compare at least to values"
-        ops = op(
-            self.visit(node.values[0]),
-            self.visit(node.values[1]),
-        )
-        for v in node.values[2:]:
-            ops = op(ops, self.visit(v))
-        return ops
-
-    def visit_UnaryOp(self, node: TypedUnaryOp) -> plt.AST:
-        op = node.operand.typ.unop(node.op)
-        return plt.Apply(
-            op,
-            self.visit(node.operand),
-        )
-
-    def visit_Compare(self, node: TypedCompare) -> plt.AST:
-        assert len(node.ops) == 1, "Only single comparisons are supported"
-        assert len(node.comparators) == 1, "Only single comparisons are supported"
-        cmpop = node.ops[0]
-        comparator = node.comparators[0].typ
-        op = node.left.typ.cmp(cmpop, comparator)
-        return plt.Apply(
-            op,
-            self.visit(node.left),
-            self.visit(node.comparators[0]),
-        )
-
-    def visit_Module(self, node: TypedModule) -> plt.AST:
-        # extract actually read variables by each function
-        if self.validator_function_name is not None:
-            # for validators find main function
-            # TODO can use more sophisiticated procedure here i.e. functions marked by comment
-            main_fun: typing.Optional[InstanceType] = None
-            for s in node.body:
-                if (
-                    isinstance(s, FunctionDef)
-                    and s.orig_name == self.validator_function_name
-                ):
-                    main_fun = s
-            assert (
-                main_fun is not None
-            ), f"Could not find function named {self.validator_function_name}"
-            main_fun_typ: FunctionType = main_fun.typ.typ
-            assert isinstance(
-                main_fun_typ, FunctionType
-            ), f"Variable named {self.validator_function_name} is not of type function"
-
-            # check if this is a contract written to double function
-            enable_double_func_mint_spend = False
-            if len(main_fun_typ.argtyps) >= 3 and self.force_three_params:
-                # check if is possible
-                second_last_arg = main_fun_typ.argtyps[-2]
-                assert isinstance(
-                    second_last_arg, InstanceType
-                ), "Can not pass Class into validator"
-                if isinstance(second_last_arg.typ, UnionType):
-                    possible_types = second_last_arg.typ.typs
-                else:
-                    possible_types = [second_last_arg.typ]
-                if any(isinstance(t, UnitType) for t in possible_types):
-                    OPSHIN_LOGGER.warning(
-                        "The redeemer is annotated to be 'None'. This value is usually encoded in PlutusData with constructor id 0 and no fields. If you want the script to double function as minting and spending script, annotate the second argument with 'NoRedeemer'."
-                    )
-                enable_double_func_mint_spend = not any(
-                    (isinstance(t, RecordType) and t.record.constructor == 0)
-                    or isinstance(t, UnitType)
-                    for t in possible_types
-                )
-                if not enable_double_func_mint_spend:
-                    OPSHIN_LOGGER.warning(
-                        "The second argument to the validator function potentially has constructor id 0. The validator will not be able to double function as minting script and spending script."
-                    )
-
-            body = node.body + (
-                [
-                    TypedReturn(
-                        TypedCall(
-                            func=Name(
-                                id=main_fun.name,
-                                typ=InstanceType(main_fun_typ),
-                                ctx=Load(),
-                            ),
-                            typ=main_fun_typ.rettyp,
-                            args=[
-                                RawPlutoExpr(
-                                    expr=transform_ext_params_map(a)(
-                                        OVar(f"val_param{i}")
-                                    ),
-                                    typ=a,
-                                )
-                                for i, a in enumerate(main_fun_typ.argtyps)
-                            ],
-                        )
-                    )
-                ]
-            )
-            self.current_function_typ.append(FunctionType([], InstanceType(AnyType())))
-            name_load_visitor = NameLoadCollector()
-            name_load_visitor.visit(node)
-            all_vs = sorted(set(all_vars(node)) | set(name_load_visitor.loaded.keys()))
-
-            # write all variables that are ever read
-            # once at the beginning so that we can always access them (only potentially causing a nameerror at runtime)
-            validator = SafeOLambda(
-                [f"val_param{i}" for i, _ in enumerate(main_fun_typ.argtyps)],
-                plt.Let(
-                    [
-                        (
-                            x,
-                            plt.Delay(
-                                plt.TraceError(f"NameError: {map_to_orig_name(x)}")
-                            ),
-                        )
-                        for x in all_vs
-                    ],
-                    self.visit_sequence(body)(
-                        plt.ConstrData(plt.Integer(0), plt.EmptyDataList())
-                    ),
-                ),
-            )
-            self.current_function_typ.pop()
-            if enable_double_func_mint_spend:
-                validator = wrap_validator_double_function(
-                    validator, pass_through=len(main_fun_typ.argtyps) - 3
-                )
-            elif self.force_three_params:
-                # Error if the double function is enforced but not possible
-                raise RuntimeError(
-                    "The contract can not always detect if it was passed three or two parameters on-chain."
-                )
-        else:
-            name_load_visitor = NameLoadCollector()
-            name_load_visitor.visit(node)
-            all_vs = sorted(set(all_vars(node)) | set(name_load_visitor.loaded.keys()))
-
-            body = node.body
-            # write all variables that are ever read
-            # once at the beginning so that we can always access them (only potentially causing a nameerror at runtime)
-            validator = plt.Let(
-                [
-                    (
-                        x,
-                        plt.Delay(plt.TraceError(f"NameError: {map_to_orig_name(x)}")),
-                    )
-                    for x in all_vs
-                ],
-                self.visit_sequence(body)(
-                    plt.ConstrData(plt.Integer(0), plt.EmptyDataList())
-                ),
-            )
-
-        cp = plt.Program((1, 0, 0), validator)
-        return cp
-
-    def visit_Constant(self, node: TypedConstant) -> plt.AST:
-        if isinstance(node.value, bytes) and node.value != b"":
-            try:
-                bytes.fromhex(node.value.decode())
-            except ValueError:
-                pass
-            else:
-                OPSHIN_LOGGER.warning(
-                    f"The string {node.value} looks like it is supposed to be a hex-encoded bytestring but is actually utf8-encoded. Try using `bytes.fromhex('{node.value.decode()}')` instead."
-                )
-        plt_val = plt.UPLCConstant(rec_constant_map(node.value))
-        return plt_val
-
-    def visit_NoneType(self, _: typing.Optional[typing.Any]) -> plt.AST:
-        return plt.Unit()
-
-    def visit_Assign(self, node: TypedAssign) -> CallAST:
-        assert (
-            len(node.targets) == 1
-        ), "Assignments to more than one variable not supported yet"
-        assert isinstance(
-            node.targets[0], Name
-        ), "Assignments to other things then names are not supported"
-        compiled_e = self.visit(node.value)
-        varname = node.targets[0].id
-        # first evaluate the term, then wrap in a delay
-        return lambda x: plt.Let(
-            [
-                (opshin_name_scheme_compatible_varname(varname), compiled_e),
-                (varname, plt.Delay(OVar(varname))),
-            ],
-            x,
-        )
-
-    def visit_AnnAssign(self, node: AnnAssign) -> CallAST:
-        assert isinstance(
-            node.target, Name
-        ), "Assignments to other things then names are not supported"
-        assert isinstance(
-            node.target.typ, InstanceType
-        ), "Can only assign instances to instances"
-        val = self.visit(node.value)
-        if isinstance(node.value.typ, InstanceType) and isinstance(
-            node.value.typ.typ, AnyType
-        ):
-            # we need to map this as it will originate from PlutusData
-            # AnyType is the only type other than the builtin itself that can be cast to builtin values
-            val = transform_ext_params_map(node.target.typ)(val)
-        if isinstance(node.target.typ, InstanceType) and isinstance(
-            node.target.typ.typ, AnyType
-        ):
-            # we need to map this back as it will be treated as PlutusData
-            # AnyType is the only type other than the builtin itself that can be cast to from builtin values
-            val = transform_output_map(node.value.typ)(val)
-        return lambda x: plt.Let(
-            [
-                (opshin_name_scheme_compatible_varname(node.target.id), val),
-                (node.target.id, plt.Delay(OVar(node.target.id))),
-            ],
-            x,
-        )
-
-    def visit_Name(self, node: TypedName) -> plt.AST:
-        # depending on load or store context, return the value of the variable or its name
-        if not isinstance(node.ctx, Load):
-            raise NotImplementedError(f"Context {node.ctx} not supported")
-        if isinstance(node.typ, ClassType):
-            # if this is not an instance but a class, call the constructor
-            return node.typ.constr()
-        return plt.Force(plt.Var(node.id))
-
-    def visit_Expr(self, node: TypedExpr) -> CallAST:
-        # we exploit UPLCs eager evaluation here
-        # the expression is computed even though its value is eventually discarded
-        # Note this really only makes sense for Trace
-        # we use an invalid name here to avoid conflicts
-        return lambda x: plt.Apply(OLambda(["0"], x), self.visit(node.value))
-
-    def visit_Call(self, node: TypedCall) -> plt.AST:
-        # compiled_args = " ".join(f"({self.visit(a)} {STATEMONAD})" for a in node.args)
-        # return rf"(\{STATEMONAD} -> ({self.visit(node.func)} {compiled_args})"
-        # TODO function is actually not of type polymorphic function type here anymore
-        if isinstance(node.func.typ, PolymorphicFunctionInstanceType):
-            # edge case for weird builtins that are polymorphic
-            func_plt = force_params(
-                node.func.typ.polymorphic_function.impl_from_args(
-                    node.func.typ.typ.argtyps
-                )
-            )
-            bind_self = None
-        else:
-            assert isinstance(node.func.typ, InstanceType) and isinstance(
-                node.func.typ.typ, FunctionType
-            )
-            func_plt = self.visit(node.func)
-            bind_self = node.func.typ.typ.bind_self
-        bound_vs = sorted(list(node.func.typ.typ.bound_vars.keys()))
-        args = []
-        for a, t in zip(node.args, node.func.typ.typ.argtyps):
-            assert isinstance(t, InstanceType)
-            # pass in all arguments evaluated with the statemonad
-            a_int = self.visit(a)
-            if isinstance(t.typ, AnyType):
-                # if the function expects input of generic type data, wrap data before passing it inside
-                a_int = transform_output_map(a.typ)(a_int)
-            args.append(a_int)
-        # First assign to let to ensure that the arguments are evaluated before the call, but need to delay
-        # as this is a variable assignment
-        # Also bring all states of variables read inside the function into scope / update with value in current state
-        # before call to simulate statemonad with current state being passed in
-        return OLet(
-            [(f"p{i}", a) for i, a in enumerate(args)],
-            SafeApply(
-                func_plt,
-                *([plt.Var(bind_self)] if bind_self is not None else []),
-                *[plt.Var(n) for n in bound_vs],
-                *[plt.Delay(OVar(f"p{i}")) for i in range(len(args))],
-            ),
-        )
-
-    def visit_FunctionDef(self, node: TypedFunctionDef) -> CallAST:
-        body = node.body.copy()
-        # defaults to returning None if there is no return statement
-        if node.typ.typ.rettyp.typ == AnyType():
-            ret_val = plt.ConstrData(plt.Integer(0), plt.EmptyDataList())
-        else:
-            ret_val = plt.Unit()
-        read_vs = sorted(list(node.typ.typ.bound_vars.keys()))
-        if node.typ.typ.bind_self is not None:
-            read_vs.insert(0, node.typ.typ.bind_self)
-        self.current_function_typ.append(node.typ.typ)
-        compiled_body = self.visit_sequence(body)(ret_val)
-        self.current_function_typ.pop()
-        return lambda x: plt.Let(
-            [
-                (
-                    node.name,
-                    plt.Delay(
-                        SafeLambda(
-                            read_vs + [a.arg for a in node.args.args],
-                            compiled_body,
-                        )
-                    ),
-                )
-            ],
-            x,
-        )
-
-    def visit_While(self, node: TypedWhile) -> CallAST:
-        # the while loop calls itself, updating the values at overwritten names
-        # by overwriting them with arguments to its self-recall
-        if node.orelse:
-            # If there is orelse, transform it to an appended sequence (TODO check if this is correct)
-            cn = copy(node)
-            cn.orelse = []
-            return self.visit_sequence([cn] + node.orelse)
-        compiled_c = self.visit(node.test)
-        compiled_s = self.visit_sequence(node.body)
-        written_vs = written_vars(node)
-        pwritten_vs = [plt.Var(x) for x in written_vs]
-        s_fun = lambda x: plt.Lambda(
-            [opshin_name_scheme_compatible_varname("while")] + written_vs,
-            plt.Ite(
-                compiled_c,
-                compiled_s(
-                    plt.Apply(
-                        OVar("while"),
-                        OVar("while"),
-                        *deepcopy(pwritten_vs),
-                    )
-                ),
-                x,
-            ),
-        )
-
-        return lambda x: OLet(
-            [
-                ("adjusted_next", SafeLambda(written_vs, x)),
-                (
-                    "while",
-                    s_fun(SafeApply(OVar("adjusted_next"), *deepcopy(pwritten_vs))),
-                ),
-            ],
-            plt.Apply(OVar("while"), OVar("while"), *deepcopy(pwritten_vs)),
-        )
-
-    def visit_For(self, node: TypedFor) -> CallAST:
-        if node.orelse:
-            # If there is orelse, transform it to an appended sequence (TODO check if this is correct)
-            cn = copy(node)
-            cn.orelse = []
-            return self.visit_sequence([cn] + node.orelse)
-        assert isinstance(node.iter.typ, InstanceType)
-        if isinstance(node.iter.typ.typ, ListType):
-            assert isinstance(
-                node.target, Name
-            ), "Can only assign value to singleton element"
-            compiled_s = self.visit_sequence(node.body)
-            compiled_iter = self.visit(node.iter)
-            written_vs = written_vars(node)
-            pwritten_vs = [plt.Var(x) for x in written_vs]
-            s_fun = lambda x: plt.Lambda(
-                [
-                    opshin_name_scheme_compatible_varname("for"),
-                    opshin_name_scheme_compatible_varname("iter"),
-                ]
-                + written_vs,
-                plt.IteNullList(
-                    OVar("iter"),
-                    x,
-                    plt.Let(
-                        [(node.target.id, plt.Delay(plt.HeadList(OVar("iter"))))],
-                        compiled_s(
-                            plt.Apply(
-                                OVar("for"),
-                                OVar("for"),
-                                plt.TailList(OVar("iter")),
-                                *deepcopy(pwritten_vs),
-                            )
-                        ),
-                    ),
-                ),
-            )
-            return lambda x: OLet(
-                [
-                    ("adjusted_next", plt.Lambda([node.target.id] + written_vs, x)),
-                    (
-                        "for",
-                        s_fun(
-                            plt.Apply(
-                                OVar("adjusted_next"),
-                                plt.Var(node.target.id),
-                                *deepcopy(pwritten_vs),
-                            )
-                        ),
-                    ),
-                ],
-                plt.Apply(
-                    OVar("for"),
-                    OVar("for"),
-                    compiled_iter,
-                    *deepcopy(pwritten_vs),
-                ),
-            )
-        raise NotImplementedError(
-            "Compilation of for statements for anything but lists not implemented yet"
-        )
-
-    def visit_If(self, node: TypedIf) -> CallAST:
-        written_vs = written_vars(node)
-        pwritten_vs = [plt.Var(x) for x in written_vs]
-        return lambda x: OLet(
-            [("adjusted_next", SafeLambda(written_vs, x))],
-            plt.Ite(
-                self.visit(node.test),
-                self.visit_sequence(node.body)(
-                    SafeApply(OVar("adjusted_next"), *deepcopy(pwritten_vs))
-                ),
-                self.visit_sequence(node.orelse)(
-                    SafeApply(OVar("adjusted_next"), *deepcopy(pwritten_vs))
-                ),
-            ),
-        )
-
-    def visit_Return(self, node: TypedReturn) -> CallAST:
-        value_plt = self.visit(node.value)
-        assert self.current_function_typ, "Can not handle Return outside of a function"
-        if isinstance(self.current_function_typ[-1].rettyp.typ, AnyType):
-            value_plt = transform_output_map(node.value.typ)(value_plt)
-        return lambda _: value_plt
-
-    def visit_Pass(self, node: TypedPass) -> CallAST:
-        return self.visit_sequence([])
-
-    def visit_Subscript(self, node: TypedSubscript) -> plt.AST:
-        assert isinstance(
-            node.value.typ, InstanceType
-        ), "Can only access elements of instances, not classes"
-        if isinstance(node.value.typ.typ, TupleType):
-            assert isinstance(
-                node.slice, Constant
-            ), "Only constant index access for tuples is supported"
-            assert isinstance(
-                node.slice.value, int
-            ), "Only constant index integer access for tuples is supported"
-            index = node.slice.value
-            if index < 0:
-                index += len(node.value.typ.typ.typs)
-            assert isinstance(node.ctx, Load), "Tuples are read-only"
-            return plt.FunctionalTupleAccess(
-                self.visit(node.value),
-                index,
-                len(node.value.typ.typ.typs),
-            )
-        if isinstance(node.value.typ.typ, PairType):
-            assert isinstance(
-                node.slice, Constant
-            ), "Only constant index access for pairs is supported"
-            assert isinstance(
-                node.slice.value, int
-            ), "Only constant index integer access for pairs is supported"
-            index = node.slice.value
-            if index < 0:
-                index += 2
-            assert isinstance(node.ctx, Load), "Pairs are read-only"
-            assert (
-                0 <= index < 2
-            ), f"Pairs only have 2 elements, index should be 0 or 1, is {node.slice.value}"
-            member_func = plt.FstPair if index == 0 else plt.SndPair
-            # the content of pairs is always Data, so we need to unwrap
-            member_typ = node.typ
-            return transform_ext_params_map(member_typ)(
-                member_func(
-                    self.visit(node.value),
-                ),
-            )
-        if isinstance(node.value.typ.typ, ListType):
-            if not isinstance(node.slice, Slice):
-                assert (
-                    node.slice.typ == IntegerInstanceType
-                ), "Only single element list index access supported"
-                return OLet(
-                    [
-                        (
-                            "l",
-                            self.visit(node.value),
-                        ),
-                        (
-                            "raw_i",
-                            self.visit(node.slice),
-                        ),
-                        (
-                            "i",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_i"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_i"), plt.LengthList(OVar("l"))
-                                ),
-                                OVar("raw_i"),
-                            ),
-                        ),
-                    ],
-                    plt.IndexAccessList(OVar("l"), OVar("i")),
-                )
-            else:
-                return OLet(
-                    [
-                        (
-                            "xs",
-                            self.visit(node.value),
-                        ),
-                        (
-                            "raw_i",
-                            self.visit(node.slice.lower),
-                        ),
-                        (
-                            "i",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_i"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_i"),
-                                    plt.LengthList(OVar("xs")),
-                                ),
-                                OVar("raw_i"),
-                            ),
-                        ),
-                        (
-                            "raw_j",
-                            self.visit(node.slice.upper),
-                        ),
-                        (
-                            "j",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_j"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_j"),
-                                    plt.LengthList(OVar("xs")),
-                                ),
-                                OVar("raw_j"),
-                            ),
-                        ),
-                        (
-                            "drop",
-                            plt.Ite(
-                                plt.LessThanEqualsInteger(OVar("i"), plt.Integer(0)),
-                                plt.Integer(0),
-                                OVar("i"),
-                            ),
-                        ),
-                        (
-                            "take",
-                            plt.SubtractInteger(OVar("j"), OVar("drop")),
-                        ),
-                    ],
-                    plt.Ite(
-                        plt.LessThanEqualsInteger(OVar("j"), OVar("i")),
-                        empty_list(node.value.typ.typ.typ),
-                        plt.SliceList(
-                            OVar("drop"),
-                            OVar("take"),
-                            OVar("xs"),
-                            empty_list(node.value.typ.typ.typ),
-                        ),
-                    ),
-                )
-        elif isinstance(node.value.typ.typ, DictType):
-            dict_typ = node.value.typ.typ
-            if not isinstance(node.slice, Slice):
-                return OLet(
-                    [
-                        (
-                            "key",
-                            self.visit(node.slice),
-                        )
-                    ],
-                    transform_ext_params_map(dict_typ.value_typ)(
-                        plt.SndPair(
-                            plt.FindList(
-                                self.visit(node.value),
-                                OLambda(
-                                    ["x"],
-                                    plt.EqualsData(
-                                        transform_output_map(dict_typ.key_typ)(
-                                            OVar("key")
-                                        ),
-                                        plt.FstPair(OVar("x")),
-                                    ),
-                                ),
-                                plt.TraceError("KeyError"),
-                            )
-                        ),
-                    ),
-                )
-        elif isinstance(node.value.typ.typ, ByteStringType):
-            if not isinstance(node.slice, Slice):
-                return OLet(
-                    [
-                        (
-                            "bs",
-                            self.visit(node.value),
-                        ),
-                        (
-                            "raw_ix",
-                            self.visit(node.slice),
-                        ),
-                        (
-                            "ix",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_ix"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_ix"),
-                                    plt.LengthOfByteString(OVar("bs")),
-                                ),
-                                OVar("raw_ix"),
-                            ),
-                        ),
-                    ],
-                    plt.IndexByteString(OVar("bs"), OVar("ix")),
-                )
-            elif isinstance(node.slice, Slice):
-                return OLet(
-                    [
-                        (
-                            "bs",
-                            self.visit(node.value),
-                        ),
-                        (
-                            "raw_i",
-                            self.visit(node.slice.lower),
-                        ),
-                        (
-                            "i",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_i"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_i"),
-                                    plt.LengthOfByteString(OVar("bs")),
-                                ),
-                                OVar("raw_i"),
-                            ),
-                        ),
-                        (
-                            "raw_j",
-                            self.visit(node.slice.upper),
-                        ),
-                        (
-                            "j",
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("raw_j"), plt.Integer(0)),
-                                plt.AddInteger(
-                                    OVar("raw_j"),
-                                    plt.LengthOfByteString(OVar("bs")),
-                                ),
-                                OVar("raw_j"),
-                            ),
-                        ),
-                        (
-                            "drop",
-                            plt.Ite(
-                                plt.LessThanEqualsInteger(OVar("i"), plt.Integer(0)),
-                                plt.Integer(0),
-                                OVar("i"),
-                            ),
-                        ),
-                        (
-                            "take",
-                            plt.SubtractInteger(OVar("j"), OVar("drop")),
-                        ),
-                    ],
-                    plt.Ite(
-                        plt.LessThanEqualsInteger(OVar("j"), OVar("i")),
-                        plt.ByteString(b""),
-                        plt.SliceByteString(
-                            OVar("drop"),
-                            OVar("take"),
-                            OVar("bs"),
-                        ),
-                    ),
-                )
-        raise NotImplementedError(
-            f'Could not implement subscript "{node.slice}" of "{node.value}"'
-        )
-
-    def visit_Tuple(self, node: TypedTuple) -> plt.AST:
-        return plt.FunctionalTuple(*(self.visit(e) for e in node.elts))
-
-    def visit_ClassDef(self, node: TypedClassDef) -> CallAST:
-        return lambda x: plt.Let([(node.name, plt.Delay(node.class_typ.constr()))], x)
-
-    def visit_Attribute(self, node: TypedAttribute) -> plt.AST:
-        assert isinstance(
-            node.value.typ, InstanceType
-        ), "Can only access attributes of instances"
-        obj = self.visit(node.value)
-        attr = node.value.typ.attribute(node.attr)
-        return plt.Apply(attr, obj)
-
-    def visit_Assert(self, node: TypedAssert) -> CallAST:
-        return lambda x: plt.Ite(
-            self.visit(node.test),
-            x,
-            plt.Apply(
-                plt.Error(),
-                (
-                    plt.Trace(self.visit(node.msg), plt.Unit())
-                    if node.msg is not None
-                    else plt.Unit()
-                ),
-            ),
-        )
-
-    def visit_RawPlutoExpr(self, node: RawPlutoExpr) -> plt.AST:
-        return node.expr
-
-    def visit_List(self, node: TypedList) -> plt.AST:
-        assert isinstance(node.typ, InstanceType)
-        assert isinstance(node.typ.typ, ListType)
-        l = empty_list(node.typ.typ.typ)
-        for e in reversed(node.elts):
-            l = plt.MkCons(self.visit(e), l)
-        return l
-
-    def visit_Dict(self, node: TypedDict) -> plt.AST:
-        assert isinstance(node.typ, InstanceType)
-        assert isinstance(node.typ.typ, DictType)
-        key_type = node.typ.typ.key_typ
-        value_type = node.typ.typ.value_typ
-        l = plt.EmptyDataPairList()
-        for k, v in zip(node.keys, node.values):
-            l = plt.MkCons(
-                plt.MkPairData(
-                    transform_output_map(key_type)(
-                        self.visit(k),
-                    ),
-                    transform_output_map(value_type)(
-                        self.visit(v),
-                    ),
-                ),
-                l,
-            )
-        return l
-
-    def visit_IfExp(self, node: TypedIfExp) -> plt.AST:
-        return plt.Ite(
-            self.visit(node.test),
-            self.visit(node.body),
-            self.visit(node.orelse),
-        )
-
-    def visit_ListComp(self, node: TypedListComp) -> plt.AST:
-        assert len(node.generators) == 1, "Currently only one generator supported"
-        gen = node.generators[0]
-        assert isinstance(gen.iter.typ, InstanceType), "Only lists are valid generators"
-        assert isinstance(gen.iter.typ.typ, ListType), "Only lists are valid generators"
-        assert isinstance(
-            gen.target, Name
-        ), "Can only assign value to singleton element"
-        lst = self.visit(gen.iter)
-        ifs = None
-        for ifexpr in gen.ifs:
-            if ifs is None:
-                ifs = self.visit(ifexpr)
-            else:
-                ifs = plt.And(ifs, self.visit(ifexpr))
-        map_fun = OLambda(
-            ["x"],
-            plt.Let(
-                [(gen.target.id, plt.Delay(OVar("x")))],
-                self.visit(node.elt),
-            ),
-        )
-        empty_list_con = empty_list(node.elt.typ)
-        if ifs is not None:
-            filter_fun = OLambda(
-                ["x"],
-                plt.Let(
-                    [(gen.target.id, plt.Delay(OVar("x")))],
-                    ifs,
-                ),
-            )
-            return plt.MapFilterList(
-                lst,
-                filter_fun,
-                map_fun,
-                empty_list_con,
-            )
-        else:
-            return plt.MapList(
-                lst,
-                map_fun,
-                empty_list_con,
-            )
-
-    def visit_DictComp(self, node: TypedDictComp) -> plt.AST:
-        assert len(node.generators) == 1, "Currently only one generator supported"
-        gen = node.generators[0]
-        assert isinstance(gen.iter.typ, InstanceType), "Only lists are valid generators"
-        assert isinstance(gen.iter.typ.typ, ListType), "Only lists are valid generators"
-        assert isinstance(
-            gen.target, Name
-        ), "Can only assign value to singleton element"
-        lst = self.visit(gen.iter)
-        ifs = None
-        for ifexpr in gen.ifs:
-            if ifs is None:
-                ifs = self.visit(ifexpr)
-            else:
-                ifs = plt.And(ifs, self.visit(ifexpr))
-        map_fun = OLambda(
-            ["x"],
-            plt.Let(
-                [(gen.target.id, plt.Delay(OVar("x")))],
-                plt.MkPairData(
-                    transform_output_map(node.key.typ)(
-                        self.visit(node.key),
-                    ),
-                    transform_output_map(node.value.typ)(
-                        self.visit(node.value),
-                    ),
-                ),
-            ),
-        )
-        empty_list_con = plt.EmptyDataPairList()
-        if ifs is not None:
-            filter_fun = OLambda(
-                ["x"],
-                plt.Let(
-                    [(gen.target.id, plt.Delay(OVar("x")))],
-                    ifs,
-                ),
-            )
-            return plt.MapFilterList(
-                lst,
-                filter_fun,
-                map_fun,
-                empty_list_con,
-            )
-        else:
-            return plt.MapList(
-                lst,
-                map_fun,
-                empty_list_con,
-            )
-
-    def visit_FormattedValue(self, node: TypedFormattedValue) -> plt.AST:
-        return plt.Apply(
-            node.value.typ.stringify(),
-            self.visit(node.value),
-        )
-
-    def visit_JoinedStr(self, node: TypedJoinedStr) -> plt.AST:
-        joined_str = plt.Text("")
-        for v in reversed(node.values):
-            joined_str = plt.AppendString(self.visit(v), joined_str)
-        return joined_str
-
-    def generic_visit(self, node: AST) -> plt.AST:
-        raise NotImplementedError(f"Can not compile {node}")
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def generic_visit(self, node: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

Called if no explicit visitor function exists for a node.

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_AnnAssign(self, node: ast.AnnAssign) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-def visit_Assert(self, node: TypedAssert) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-def visit_Assign(self, node: TypedAssign) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-def visit_Attribute(self, node: TypedAttribute) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_BinOp(self, node: TypedBinOp) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_BoolOp(self, node: TypedBoolOp) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_Call(self, node: TypedCall) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_ClassDef(self, node: TypedClassDef) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-def visit_Compare(self, node: TypedCompare) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_Constant(self, node: TypedConstant) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_Dict(self, node: TypedDict) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_DictComp(self, node: TypedDictComp) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_Expr(self, node: TypedExpr) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-def visit_For(self, node: TypedFor) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-def visit_FormattedValue(self, node: TypedFormattedValue) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_FunctionDef(self, node: TypedFunctionDef) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-def visit_If(self, node: TypedIf) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-def visit_IfExp(self, node: TypedIfExp) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_JoinedStr(self, node: TypedJoinedStr) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_List(self, node: TypedList) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_ListComp(self, node: TypedListComp) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_Module(self, node: TypedModule) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_Name(self, node: TypedName) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_NoneType(self, _: Optional[Any]) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_Pass(self, node: TypedPass) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-def visit_RawPlutoExpr(self, node: RawPlutoExpr) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_Return(self, node: TypedReturn) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-def visit_Subscript(self, node: TypedSubscript) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_Tuple(self, node: TypedTuple) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_UnaryOp(self, node: TypedUnaryOp) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def visit_While(self, node: TypedWhile) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-def visit_sequence(self, node_seq: List[typedstmt]) ‑> Callable[[pluthon.pluthon_ast.AST], pluthon.pluthon_ast.AST] -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/compiler_config.html b/docs/opshin/compiler_config.html deleted file mode 100644 index d2d526d9..00000000 --- a/docs/opshin/compiler_config.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - - -opshin.compiler_config API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.compiler_config

-
-
-
- -Expand source code - -
from dataclasses import dataclass
-from typing import Optional
-
-import pluthon
-
-
-@dataclass(frozen=True)
-class CompilationConfig(pluthon.CompilationConfig):
-    constant_folding: Optional[bool] = None
-    allow_isinstance_anything: Optional[bool] = None
-    force_three_params: Optional[bool] = None
-    remove_dead_code: Optional[bool] = None
-
-
-# The default configuration for the compiler
-OPT_O0_CONFIG = (
-    CompilationConfig()
-    .update(pluthon.OPT_O0_CONFIG)
-    .update(
-        constant_folding=False,
-        remove_dead_code=False,
-    )
-)
-OPT_O1_CONFIG = (
-    CompilationConfig()
-    .update(OPT_O0_CONFIG)
-    .update(pluthon.OPT_O1_CONFIG)
-    .update(
-        remove_dead_code=True,
-    )
-)
-OPT_O2_CONFIG = (
-    CompilationConfig()
-    .update(OPT_O1_CONFIG)
-    .update(pluthon.OPT_O2_CONFIG)
-    .update(
-        constant_folding=True,
-    )
-)
-OPT_O3_CONFIG = (
-    CompilationConfig().update(pluthon.OPT_O3_CONFIG).update(OPT_O2_CONFIG).update()
-)
-OPT_CONFIGS = [OPT_O0_CONFIG, OPT_O1_CONFIG, OPT_O2_CONFIG, OPT_O3_CONFIG]
-
-DEFAULT_CONFIG = CompilationConfig(
-    allow_isinstance_anything=False,
-    force_three_params=False,
-).update(OPT_O1_CONFIG)
-
-ARGPARSE_ARGS = pluthon.ARGPARSE_ARGS.copy()
-ARGPARSE_ARGS.update(
-    {
-        "constant_folding": {
-            "__alts__": ["--cf"],
-            "help": "Enables experimental constant folding, including propagation and code execution.",
-        },
-        "allow_isinstance_anything": {
-            "help": "Enables the use of isinstance(x, D) in the contract where x is of type Anything. This is not recommended as it only checks the constructor id and not the actual type of the data.",
-        },
-        "force_three_params": {
-            "__alts__": ["--ftp"],
-            "help": "Enforces that the contract is always called with three virtual parameters on-chain. Enable if the script should support spending and other purposes.",
-        },
-        "remove_dead_code": {
-            "help": "Removes dead code and variables from the contract. Should be enabled for non-debugging purposes.",
-        },
-    }
-)
-for k in ARGPARSE_ARGS:
-    assert (
-        k in DEFAULT_CONFIG.__dict__
-    ), f"Key {k} not found in CompilationConfig.__dict__"
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class CompilationConfig -(compress_patterns: Optional[bool] = None, iterative_unfold_patterns: Optional[bool] = None, constant_index_access_list: Optional[bool] = None, constant_folding: Optional[bool] = None, allow_isinstance_anything: Optional[bool] = None, force_three_params: Optional[bool] = None, remove_dead_code: Optional[bool] = None) -
-
-

CompilationConfig(compress_patterns: Optional[bool] = None, iterative_unfold_patterns: Optional[bool] = None, constant_index_access_list: Optional[bool] = None, constant_folding: Optional[bool] = None, allow_isinstance_anything: Optional[bool] = None, force_three_params: Optional[bool] = None, remove_dead_code: Optional[bool] = None)

-
- -Expand source code - -
@dataclass(frozen=True)
-class CompilationConfig(pluthon.CompilationConfig):
-    constant_folding: Optional[bool] = None
-    allow_isinstance_anything: Optional[bool] = None
-    force_three_params: Optional[bool] = None
-    remove_dead_code: Optional[bool] = None
-
-

Ancestors

-
    -
  • pluthon.compiler_config.CompilationConfig
  • -
-

Class variables

-
-
var allow_isinstance_anything : Optional[bool]
-
-
-
-
var constant_folding : Optional[bool]
-
-
-
-
var force_three_params : Optional[bool]
-
-
-
-
var remove_dead_code : Optional[bool]
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/fun_impls.html b/docs/opshin/fun_impls.html deleted file mode 100644 index 2de81a11..00000000 --- a/docs/opshin/fun_impls.html +++ /dev/null @@ -1,1348 +0,0 @@ - - - - - - - - -opshin.fun_impls API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.fun_impls

-
-
-
- -Expand source code - -
from enum import Enum
-
-from .typed_ast import *
-
-
-class LenImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'len' takes only one argument, but {len(args)} were given"
-        assert isinstance(
-            args[0], InstanceType
-        ), "Can only determine length of instances"
-        return FunctionType(args, IntegerInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only determine length of instances"
-        if arg == ByteStringInstanceType:
-            return OLambda(["x"], plt.LengthOfByteString(OVar("x")))
-        elif isinstance(arg.typ, ListType) or isinstance(arg.typ, DictType):
-            # simple list length function
-            return OLambda(
-                ["x"],
-                plt.FoldList(
-                    OVar("x"),
-                    OLambda(["a", "_"], plt.AddInteger(OVar("a"), plt.Integer(1))),
-                    plt.Integer(0),
-                ),
-            )
-        elif isinstance(arg.typ, TupleType):
-            return OLambda(
-                ["x"],
-                plt.Integer(len(arg.typ.typs)),
-            )
-        raise NotImplementedError(f"'len' is not implemented for type {arg}")
-
-
-class ReversedImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'reversed' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only reverse instances"
-        assert isinstance(typ.typ, ListType), "Can only reverse instances of lists"
-        # returns list of same type
-        return FunctionType(args, typ)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only reverse instances"
-        if isinstance(arg.typ, ListType):
-            empty_l = empty_list(arg.typ.typ)
-            return OLambda(
-                ["xs"],
-                plt.FoldList(
-                    OVar("xs"),
-                    OLambda(["a", "x"], plt.MkCons(OVar("x"), OVar("a"))),
-                    empty_l,
-                ),
-            )
-        raise NotImplementedError(f"'reversed' is not implemented for type {arg}")
-
-
-class PrintImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert all(
-            isinstance(typ, InstanceType) for typ in args
-        ), "Can only print instances"
-        return FunctionType(args, NoneInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        if not args:
-            return SafeOLambda([], plt.Trace(plt.Text("\n"), plt.NoneData()))
-        assert all(
-            isinstance(arg, InstanceType) for arg in args
-        ), "Can only stringify instances"
-        stringify_ops = [
-            plt.Apply(arg.typ.stringify(), OVar(f"x{i}")) for i, arg in enumerate(args)
-        ]
-        stringify_ops_joined = sum(((x, plt.Text(" ")) for x in stringify_ops), ())[:-1]
-        print = SafeOLambda(
-            [f"x{i}" for i in range(len(args))],
-            plt.Trace(plt.ConcatString(*stringify_ops_joined), plt.NoneData()),
-        )
-        return print
-
-
-class PythonBuiltIn(Enum):
-    all = OLambda(
-        ["xs"],
-        plt.FoldList(
-            OVar("xs"),
-            OLambda(["x", "a"], plt.And(OVar("x"), OVar("a"))),
-            plt.Bool(True),
-        ),
-    )
-    any = OLambda(
-        ["xs"],
-        plt.FoldList(
-            OVar("xs"),
-            OLambda(["x", "a"], plt.Or(OVar("x"), OVar("a"))),
-            plt.Bool(False),
-        ),
-    )
-    abs = OLambda(
-        ["x"],
-        plt.Ite(
-            plt.LessThanInteger(OVar("x"), plt.Integer(0)),
-            plt.Negate(OVar("x")),
-            OVar("x"),
-        ),
-    )
-    # maps an integer to a unicode code point and decodes it
-    # reference: https://en.wikipedia.org/wiki/UTF-8#Encoding
-    chr = OLambda(
-        ["x"],
-        plt.DecodeUtf8(
-            plt.Ite(
-                plt.LessThanInteger(OVar("x"), plt.Integer(0x0)),
-                plt.TraceError("ValueError: chr() arg not in range(0x110000)"),
-                plt.Ite(
-                    plt.LessThanInteger(OVar("x"), plt.Integer(0x80)),
-                    # encoding of 0x0 - 0x80
-                    plt.ConsByteString(OVar("x"), plt.ByteString(b"")),
-                    plt.Ite(
-                        plt.LessThanInteger(OVar("x"), plt.Integer(0x800)),
-                        # encoding of 0x80 - 0x800
-                        plt.ConsByteString(
-                            # we do bit manipulation using integer arithmetic here - nice
-                            plt.AddInteger(
-                                plt.Integer(0b110 << 5),
-                                plt.DivideInteger(OVar("x"), plt.Integer(1 << 6)),
-                            ),
-                            plt.ConsByteString(
-                                plt.AddInteger(
-                                    plt.Integer(0b10 << 6),
-                                    plt.ModInteger(OVar("x"), plt.Integer(1 << 6)),
-                                ),
-                                plt.ByteString(b""),
-                            ),
-                        ),
-                        plt.Ite(
-                            plt.LessThanInteger(OVar("x"), plt.Integer(0x10000)),
-                            # encoding of 0x800 - 0x10000
-                            plt.ConsByteString(
-                                plt.AddInteger(
-                                    plt.Integer(0b1110 << 4),
-                                    plt.DivideInteger(OVar("x"), plt.Integer(1 << 12)),
-                                ),
-                                plt.ConsByteString(
-                                    plt.AddInteger(
-                                        plt.Integer(0b10 << 6),
-                                        plt.DivideInteger(
-                                            plt.ModInteger(
-                                                OVar("x"), plt.Integer(1 << 12)
-                                            ),
-                                            plt.Integer(1 << 6),
-                                        ),
-                                    ),
-                                    plt.ConsByteString(
-                                        plt.AddInteger(
-                                            plt.Integer(0b10 << 6),
-                                            plt.ModInteger(
-                                                OVar("x"), plt.Integer(1 << 6)
-                                            ),
-                                        ),
-                                        plt.ByteString(b""),
-                                    ),
-                                ),
-                            ),
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("x"), plt.Integer(0x110000)),
-                                # encoding of 0x10000 - 0x10FFF
-                                plt.ConsByteString(
-                                    plt.AddInteger(
-                                        plt.Integer(0b11110 << 3),
-                                        plt.DivideInteger(
-                                            OVar("x"), plt.Integer(1 << 18)
-                                        ),
-                                    ),
-                                    plt.ConsByteString(
-                                        plt.AddInteger(
-                                            plt.Integer(0b10 << 6),
-                                            plt.DivideInteger(
-                                                plt.ModInteger(
-                                                    OVar("x"), plt.Integer(1 << 18)
-                                                ),
-                                                plt.Integer(1 << 12),
-                                            ),
-                                        ),
-                                        plt.ConsByteString(
-                                            plt.AddInteger(
-                                                plt.Integer(0b10 << 6),
-                                                plt.DivideInteger(
-                                                    plt.ModInteger(
-                                                        OVar("x"),
-                                                        plt.Integer(1 << 12),
-                                                    ),
-                                                    plt.Integer(1 << 6),
-                                                ),
-                                            ),
-                                            plt.ConsByteString(
-                                                plt.AddInteger(
-                                                    plt.Integer(0b10 << 6),
-                                                    plt.ModInteger(
-                                                        OVar("x"),
-                                                        plt.Integer(1 << 6),
-                                                    ),
-                                                ),
-                                                plt.ByteString(b""),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                                plt.TraceError(
-                                    "ValueError: chr() arg not in range(0x110000)"
-                                ),
-                            ),
-                        ),
-                    ),
-                ),
-            )
-        ),
-    )
-    breakpoint = OLambda(["_"], plt.NoneData())
-    hex = OLambda(
-        ["x"],
-        plt.DecodeUtf8(
-            OLet(
-                [
-                    (
-                        "hexlist",
-                        plt.RecFun(
-                            OLambda(
-                                ["f", "i"],
-                                plt.Ite(
-                                    plt.LessThanEqualsInteger(
-                                        OVar("i"), plt.Integer(0)
-                                    ),
-                                    plt.EmptyIntegerList(),
-                                    plt.MkCons(
-                                        OLet(
-                                            [
-                                                (
-                                                    "mod",
-                                                    plt.ModInteger(
-                                                        OVar("i"), plt.Integer(16)
-                                                    ),
-                                                ),
-                                            ],
-                                            plt.AddInteger(
-                                                OVar("mod"),
-                                                plt.IfThenElse(
-                                                    plt.LessThanInteger(
-                                                        OVar("mod"), plt.Integer(10)
-                                                    ),
-                                                    plt.Integer(ord("0")),
-                                                    plt.Integer(ord("a") - 10),
-                                                ),
-                                            ),
-                                        ),
-                                        plt.Apply(
-                                            OVar("f"),
-                                            OVar("f"),
-                                            plt.DivideInteger(
-                                                OVar("i"), plt.Integer(16)
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                    ),
-                    (
-                        "mkstr",
-                        OLambda(
-                            ["i"],
-                            plt.FoldList(
-                                plt.Apply(OVar("hexlist"), OVar("i")),
-                                OLambda(
-                                    ["b", "i"],
-                                    plt.ConsByteString(OVar("i"), OVar("b")),
-                                ),
-                                plt.ByteString(b""),
-                            ),
-                        ),
-                    ),
-                ],
-                plt.Ite(
-                    plt.EqualsInteger(OVar("x"), plt.Integer(0)),
-                    plt.ByteString(b"0x0"),
-                    plt.Ite(
-                        plt.LessThanInteger(OVar("x"), plt.Integer(0)),
-                        plt.ConsByteString(
-                            plt.Integer(ord("-")),
-                            plt.AppendByteString(
-                                plt.ByteString(b"0x"),
-                                plt.Apply(OVar("mkstr"), plt.Negate(OVar("x"))),
-                            ),
-                        ),
-                        plt.AppendByteString(
-                            plt.ByteString(b"0x"),
-                            plt.Apply(OVar("mkstr"), OVar("x")),
-                        ),
-                    ),
-                ),
-            )
-        ),
-    )
-    len = "len"
-    max = OLambda(
-        ["xs"],
-        plt.IteNullList(
-            OVar("xs"),
-            plt.TraceError("ValueError: max() arg is an empty sequence"),
-            plt.FoldList(
-                plt.TailList(OVar("xs")),
-                OLambda(
-                    ["x", "a"],
-                    plt.IfThenElse(
-                        plt.LessThanInteger(OVar("a"), OVar("x")),
-                        OVar("x"),
-                        OVar("a"),
-                    ),
-                ),
-                plt.HeadList(OVar("xs")),
-            ),
-        ),
-    )
-    min = OLambda(
-        ["xs"],
-        plt.IteNullList(
-            OVar("xs"),
-            plt.TraceError("ValueError: min() arg is an empty sequence"),
-            plt.FoldList(
-                plt.TailList(OVar("xs")),
-                OLambda(
-                    ["x", "a"],
-                    plt.IfThenElse(
-                        plt.LessThanInteger(OVar("a"), OVar("x")),
-                        OVar("a"),
-                        OVar("x"),
-                    ),
-                ),
-                plt.HeadList(OVar("xs")),
-            ),
-        ),
-    )
-    print = "print"
-    # NOTE: only correctly defined for positive y
-    pow = OLambda(
-        ["x", "y"],
-        plt.Ite(
-            plt.LessThanInteger(OVar("y"), plt.Integer(0)),
-            plt.TraceError("Negative exponentiation is not supported"),
-            PowImpl(OVar("x"), OVar("y")),
-        ),
-    )
-    oct = OLambda(
-        ["x"],
-        plt.DecodeUtf8(
-            OLet(
-                [
-                    (
-                        "octlist",
-                        plt.RecFun(
-                            OLambda(
-                                ["f", "i"],
-                                plt.Ite(
-                                    plt.LessThanEqualsInteger(
-                                        OVar("i"), plt.Integer(0)
-                                    ),
-                                    plt.EmptyIntegerList(),
-                                    plt.MkCons(
-                                        plt.AddInteger(
-                                            plt.ModInteger(OVar("i"), plt.Integer(8)),
-                                            plt.Integer(ord("0")),
-                                        ),
-                                        plt.Apply(
-                                            OVar("f"),
-                                            OVar("f"),
-                                            plt.DivideInteger(
-                                                OVar("i"), plt.Integer(8)
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                    ),
-                    (
-                        "mkoct",
-                        OLambda(
-                            ["i"],
-                            plt.FoldList(
-                                plt.Apply(OVar("octlist"), OVar("i")),
-                                OLambda(
-                                    ["b", "i"],
-                                    plt.ConsByteString(OVar("i"), OVar("b")),
-                                ),
-                                plt.ByteString(b""),
-                            ),
-                        ),
-                    ),
-                ],
-                plt.Ite(
-                    plt.EqualsInteger(OVar("x"), plt.Integer(0)),
-                    plt.ByteString(b"0o0"),
-                    plt.Ite(
-                        plt.LessThanInteger(OVar("x"), plt.Integer(0)),
-                        plt.ConsByteString(
-                            plt.Integer(ord("-")),
-                            plt.AppendByteString(
-                                plt.ByteString(b"0o"),
-                                plt.Apply(OVar("mkoct"), plt.Negate(OVar("x"))),
-                            ),
-                        ),
-                        plt.AppendByteString(
-                            plt.ByteString(b"0o"),
-                            plt.Apply(OVar("mkoct"), OVar("x")),
-                        ),
-                    ),
-                ),
-            )
-        ),
-    )
-    range = OLambda(
-        ["limit"],
-        plt.Range(OVar("limit")),
-    )
-    reversed = "reversed"
-    sum = OLambda(
-        ["xs"],
-        plt.FoldList(
-            OVar("xs"), plt.BuiltIn(uplc.BuiltInFun.AddInteger), plt.Integer(0)
-        ),
-    )
-
-
-PythonBuiltInTypes = {
-    PythonBuiltIn.all: InstanceType(
-        FunctionType(
-            [InstanceType(ListType(BoolInstanceType))],
-            BoolInstanceType,
-        )
-    ),
-    PythonBuiltIn.any: InstanceType(
-        FunctionType(
-            [InstanceType(ListType(BoolInstanceType))],
-            BoolInstanceType,
-        )
-    ),
-    PythonBuiltIn.abs: InstanceType(
-        FunctionType(
-            [IntegerInstanceType],
-            IntegerInstanceType,
-        )
-    ),
-    PythonBuiltIn.chr: InstanceType(
-        FunctionType(
-            [IntegerInstanceType],
-            StringInstanceType,
-        )
-    ),
-    PythonBuiltIn.breakpoint: InstanceType(FunctionType([], NoneInstanceType)),
-    PythonBuiltIn.len: InstanceType(PolymorphicFunctionType(LenImpl())),
-    PythonBuiltIn.hex: InstanceType(
-        FunctionType(
-            [IntegerInstanceType],
-            StringInstanceType,
-        )
-    ),
-    PythonBuiltIn.max: InstanceType(
-        FunctionType(
-            [InstanceType(ListType(IntegerInstanceType))],
-            IntegerInstanceType,
-        )
-    ),
-    PythonBuiltIn.min: InstanceType(
-        FunctionType(
-            [InstanceType(ListType(IntegerInstanceType))],
-            IntegerInstanceType,
-        )
-    ),
-    PythonBuiltIn.print: InstanceType(PolymorphicFunctionType(PrintImpl())),
-    PythonBuiltIn.pow: InstanceType(
-        FunctionType(
-            [IntegerInstanceType, IntegerInstanceType],
-            IntegerInstanceType,
-        )
-    ),
-    PythonBuiltIn.oct: InstanceType(
-        FunctionType(
-            [IntegerInstanceType],
-            StringInstanceType,
-        )
-    ),
-    PythonBuiltIn.range: InstanceType(
-        FunctionType(
-            [IntegerInstanceType],
-            InstanceType(ListType(IntegerInstanceType)),
-        )
-    ),
-    PythonBuiltIn.reversed: InstanceType(PolymorphicFunctionType(ReversedImpl())),
-    PythonBuiltIn.sum: InstanceType(
-        FunctionType(
-            [InstanceType(ListType(IntegerInstanceType))],
-            IntegerInstanceType,
-        )
-    ),
-}
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class LenImpl -(*args, **kwargs) -
-
-
-
- -Expand source code - -
class LenImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'len' takes only one argument, but {len(args)} were given"
-        assert isinstance(
-            args[0], InstanceType
-        ), "Can only determine length of instances"
-        return FunctionType(args, IntegerInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only determine length of instances"
-        if arg == ByteStringInstanceType:
-            return OLambda(["x"], plt.LengthOfByteString(OVar("x")))
-        elif isinstance(arg.typ, ListType) or isinstance(arg.typ, DictType):
-            # simple list length function
-            return OLambda(
-                ["x"],
-                plt.FoldList(
-                    OVar("x"),
-                    OLambda(["a", "_"], plt.AddInteger(OVar("a"), plt.Integer(1))),
-                    plt.Integer(0),
-                ),
-            )
-        elif isinstance(arg.typ, TupleType):
-            return OLambda(
-                ["x"],
-                plt.Integer(len(arg.typ.typs)),
-            )
-        raise NotImplementedError(f"'len' is not implemented for type {arg}")
-
-

Ancestors

- -

Methods

-
-
-def impl_from_args(self, args: List[Type]) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def type_from_args(self, args: List[Type]) ‑> FunctionType -
-
-
-
-
-
-
-class PrintImpl -(*args, **kwargs) -
-
-
-
- -Expand source code - -
class PrintImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert all(
-            isinstance(typ, InstanceType) for typ in args
-        ), "Can only print instances"
-        return FunctionType(args, NoneInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        if not args:
-            return SafeOLambda([], plt.Trace(plt.Text("\n"), plt.NoneData()))
-        assert all(
-            isinstance(arg, InstanceType) for arg in args
-        ), "Can only stringify instances"
-        stringify_ops = [
-            plt.Apply(arg.typ.stringify(), OVar(f"x{i}")) for i, arg in enumerate(args)
-        ]
-        stringify_ops_joined = sum(((x, plt.Text(" ")) for x in stringify_ops), ())[:-1]
-        print = SafeOLambda(
-            [f"x{i}" for i in range(len(args))],
-            plt.Trace(plt.ConcatString(*stringify_ops_joined), plt.NoneData()),
-        )
-        return print
-
-

Ancestors

- -

Methods

-
-
-def impl_from_args(self, args: List[Type]) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def type_from_args(self, args: List[Type]) ‑> FunctionType -
-
-
-
-
-
-
-class PythonBuiltIn -(*args, **kwds) -
-
-

Create a collection of name/value pairs.

-

Example enumeration:

-
>>> class Color(Enum):
-...     RED = 1
-...     BLUE = 2
-...     GREEN = 3
-
-

Access them by:

-
    -
  • attribute access::
  • -
-
>>> Color.RED
-<Color.RED: 1>
-
-
    -
  • value lookup:
  • -
-
>>> Color(1)
-<Color.RED: 1>
-
-
    -
  • name lookup:
  • -
-
>>> Color['RED']
-<Color.RED: 1>
-
-

Enumerations can be iterated over, and know how many members they have:

-
>>> len(Color)
-3
-
-
>>> list(Color)
-[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
-
-

Methods can be added to enumerations, and members can have their own -attributes – see the documentation for details.

-
- -Expand source code - -
class PythonBuiltIn(Enum):
-    all = OLambda(
-        ["xs"],
-        plt.FoldList(
-            OVar("xs"),
-            OLambda(["x", "a"], plt.And(OVar("x"), OVar("a"))),
-            plt.Bool(True),
-        ),
-    )
-    any = OLambda(
-        ["xs"],
-        plt.FoldList(
-            OVar("xs"),
-            OLambda(["x", "a"], plt.Or(OVar("x"), OVar("a"))),
-            plt.Bool(False),
-        ),
-    )
-    abs = OLambda(
-        ["x"],
-        plt.Ite(
-            plt.LessThanInteger(OVar("x"), plt.Integer(0)),
-            plt.Negate(OVar("x")),
-            OVar("x"),
-        ),
-    )
-    # maps an integer to a unicode code point and decodes it
-    # reference: https://en.wikipedia.org/wiki/UTF-8#Encoding
-    chr = OLambda(
-        ["x"],
-        plt.DecodeUtf8(
-            plt.Ite(
-                plt.LessThanInteger(OVar("x"), plt.Integer(0x0)),
-                plt.TraceError("ValueError: chr() arg not in range(0x110000)"),
-                plt.Ite(
-                    plt.LessThanInteger(OVar("x"), plt.Integer(0x80)),
-                    # encoding of 0x0 - 0x80
-                    plt.ConsByteString(OVar("x"), plt.ByteString(b"")),
-                    plt.Ite(
-                        plt.LessThanInteger(OVar("x"), plt.Integer(0x800)),
-                        # encoding of 0x80 - 0x800
-                        plt.ConsByteString(
-                            # we do bit manipulation using integer arithmetic here - nice
-                            plt.AddInteger(
-                                plt.Integer(0b110 << 5),
-                                plt.DivideInteger(OVar("x"), plt.Integer(1 << 6)),
-                            ),
-                            plt.ConsByteString(
-                                plt.AddInteger(
-                                    plt.Integer(0b10 << 6),
-                                    plt.ModInteger(OVar("x"), plt.Integer(1 << 6)),
-                                ),
-                                plt.ByteString(b""),
-                            ),
-                        ),
-                        plt.Ite(
-                            plt.LessThanInteger(OVar("x"), plt.Integer(0x10000)),
-                            # encoding of 0x800 - 0x10000
-                            plt.ConsByteString(
-                                plt.AddInteger(
-                                    plt.Integer(0b1110 << 4),
-                                    plt.DivideInteger(OVar("x"), plt.Integer(1 << 12)),
-                                ),
-                                plt.ConsByteString(
-                                    plt.AddInteger(
-                                        plt.Integer(0b10 << 6),
-                                        plt.DivideInteger(
-                                            plt.ModInteger(
-                                                OVar("x"), plt.Integer(1 << 12)
-                                            ),
-                                            plt.Integer(1 << 6),
-                                        ),
-                                    ),
-                                    plt.ConsByteString(
-                                        plt.AddInteger(
-                                            plt.Integer(0b10 << 6),
-                                            plt.ModInteger(
-                                                OVar("x"), plt.Integer(1 << 6)
-                                            ),
-                                        ),
-                                        plt.ByteString(b""),
-                                    ),
-                                ),
-                            ),
-                            plt.Ite(
-                                plt.LessThanInteger(OVar("x"), plt.Integer(0x110000)),
-                                # encoding of 0x10000 - 0x10FFF
-                                plt.ConsByteString(
-                                    plt.AddInteger(
-                                        plt.Integer(0b11110 << 3),
-                                        plt.DivideInteger(
-                                            OVar("x"), plt.Integer(1 << 18)
-                                        ),
-                                    ),
-                                    plt.ConsByteString(
-                                        plt.AddInteger(
-                                            plt.Integer(0b10 << 6),
-                                            plt.DivideInteger(
-                                                plt.ModInteger(
-                                                    OVar("x"), plt.Integer(1 << 18)
-                                                ),
-                                                plt.Integer(1 << 12),
-                                            ),
-                                        ),
-                                        plt.ConsByteString(
-                                            plt.AddInteger(
-                                                plt.Integer(0b10 << 6),
-                                                plt.DivideInteger(
-                                                    plt.ModInteger(
-                                                        OVar("x"),
-                                                        plt.Integer(1 << 12),
-                                                    ),
-                                                    plt.Integer(1 << 6),
-                                                ),
-                                            ),
-                                            plt.ConsByteString(
-                                                plt.AddInteger(
-                                                    plt.Integer(0b10 << 6),
-                                                    plt.ModInteger(
-                                                        OVar("x"),
-                                                        plt.Integer(1 << 6),
-                                                    ),
-                                                ),
-                                                plt.ByteString(b""),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                                plt.TraceError(
-                                    "ValueError: chr() arg not in range(0x110000)"
-                                ),
-                            ),
-                        ),
-                    ),
-                ),
-            )
-        ),
-    )
-    breakpoint = OLambda(["_"], plt.NoneData())
-    hex = OLambda(
-        ["x"],
-        plt.DecodeUtf8(
-            OLet(
-                [
-                    (
-                        "hexlist",
-                        plt.RecFun(
-                            OLambda(
-                                ["f", "i"],
-                                plt.Ite(
-                                    plt.LessThanEqualsInteger(
-                                        OVar("i"), plt.Integer(0)
-                                    ),
-                                    plt.EmptyIntegerList(),
-                                    plt.MkCons(
-                                        OLet(
-                                            [
-                                                (
-                                                    "mod",
-                                                    plt.ModInteger(
-                                                        OVar("i"), plt.Integer(16)
-                                                    ),
-                                                ),
-                                            ],
-                                            plt.AddInteger(
-                                                OVar("mod"),
-                                                plt.IfThenElse(
-                                                    plt.LessThanInteger(
-                                                        OVar("mod"), plt.Integer(10)
-                                                    ),
-                                                    plt.Integer(ord("0")),
-                                                    plt.Integer(ord("a") - 10),
-                                                ),
-                                            ),
-                                        ),
-                                        plt.Apply(
-                                            OVar("f"),
-                                            OVar("f"),
-                                            plt.DivideInteger(
-                                                OVar("i"), plt.Integer(16)
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                    ),
-                    (
-                        "mkstr",
-                        OLambda(
-                            ["i"],
-                            plt.FoldList(
-                                plt.Apply(OVar("hexlist"), OVar("i")),
-                                OLambda(
-                                    ["b", "i"],
-                                    plt.ConsByteString(OVar("i"), OVar("b")),
-                                ),
-                                plt.ByteString(b""),
-                            ),
-                        ),
-                    ),
-                ],
-                plt.Ite(
-                    plt.EqualsInteger(OVar("x"), plt.Integer(0)),
-                    plt.ByteString(b"0x0"),
-                    plt.Ite(
-                        plt.LessThanInteger(OVar("x"), plt.Integer(0)),
-                        plt.ConsByteString(
-                            plt.Integer(ord("-")),
-                            plt.AppendByteString(
-                                plt.ByteString(b"0x"),
-                                plt.Apply(OVar("mkstr"), plt.Negate(OVar("x"))),
-                            ),
-                        ),
-                        plt.AppendByteString(
-                            plt.ByteString(b"0x"),
-                            plt.Apply(OVar("mkstr"), OVar("x")),
-                        ),
-                    ),
-                ),
-            )
-        ),
-    )
-    len = "len"
-    max = OLambda(
-        ["xs"],
-        plt.IteNullList(
-            OVar("xs"),
-            plt.TraceError("ValueError: max() arg is an empty sequence"),
-            plt.FoldList(
-                plt.TailList(OVar("xs")),
-                OLambda(
-                    ["x", "a"],
-                    plt.IfThenElse(
-                        plt.LessThanInteger(OVar("a"), OVar("x")),
-                        OVar("x"),
-                        OVar("a"),
-                    ),
-                ),
-                plt.HeadList(OVar("xs")),
-            ),
-        ),
-    )
-    min = OLambda(
-        ["xs"],
-        plt.IteNullList(
-            OVar("xs"),
-            plt.TraceError("ValueError: min() arg is an empty sequence"),
-            plt.FoldList(
-                plt.TailList(OVar("xs")),
-                OLambda(
-                    ["x", "a"],
-                    plt.IfThenElse(
-                        plt.LessThanInteger(OVar("a"), OVar("x")),
-                        OVar("a"),
-                        OVar("x"),
-                    ),
-                ),
-                plt.HeadList(OVar("xs")),
-            ),
-        ),
-    )
-    print = "print"
-    # NOTE: only correctly defined for positive y
-    pow = OLambda(
-        ["x", "y"],
-        plt.Ite(
-            plt.LessThanInteger(OVar("y"), plt.Integer(0)),
-            plt.TraceError("Negative exponentiation is not supported"),
-            PowImpl(OVar("x"), OVar("y")),
-        ),
-    )
-    oct = OLambda(
-        ["x"],
-        plt.DecodeUtf8(
-            OLet(
-                [
-                    (
-                        "octlist",
-                        plt.RecFun(
-                            OLambda(
-                                ["f", "i"],
-                                plt.Ite(
-                                    plt.LessThanEqualsInteger(
-                                        OVar("i"), plt.Integer(0)
-                                    ),
-                                    plt.EmptyIntegerList(),
-                                    plt.MkCons(
-                                        plt.AddInteger(
-                                            plt.ModInteger(OVar("i"), plt.Integer(8)),
-                                            plt.Integer(ord("0")),
-                                        ),
-                                        plt.Apply(
-                                            OVar("f"),
-                                            OVar("f"),
-                                            plt.DivideInteger(
-                                                OVar("i"), plt.Integer(8)
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                    ),
-                    (
-                        "mkoct",
-                        OLambda(
-                            ["i"],
-                            plt.FoldList(
-                                plt.Apply(OVar("octlist"), OVar("i")),
-                                OLambda(
-                                    ["b", "i"],
-                                    plt.ConsByteString(OVar("i"), OVar("b")),
-                                ),
-                                plt.ByteString(b""),
-                            ),
-                        ),
-                    ),
-                ],
-                plt.Ite(
-                    plt.EqualsInteger(OVar("x"), plt.Integer(0)),
-                    plt.ByteString(b"0o0"),
-                    plt.Ite(
-                        plt.LessThanInteger(OVar("x"), plt.Integer(0)),
-                        plt.ConsByteString(
-                            plt.Integer(ord("-")),
-                            plt.AppendByteString(
-                                plt.ByteString(b"0o"),
-                                plt.Apply(OVar("mkoct"), plt.Negate(OVar("x"))),
-                            ),
-                        ),
-                        plt.AppendByteString(
-                            plt.ByteString(b"0o"),
-                            plt.Apply(OVar("mkoct"), OVar("x")),
-                        ),
-                    ),
-                ),
-            )
-        ),
-    )
-    range = OLambda(
-        ["limit"],
-        plt.Range(OVar("limit")),
-    )
-    reversed = "reversed"
-    sum = OLambda(
-        ["xs"],
-        plt.FoldList(
-            OVar("xs"), plt.BuiltIn(uplc.BuiltInFun.AddInteger), plt.Integer(0)
-        ),
-    )
-
-

Ancestors

-
    -
  • enum.Enum
  • -
-

Class variables

-
-
var abs
-
-
-
-
var all
-
-
-
-
var any
-
-
-
-
var breakpoint
-
-
-
-
var chr
-
-
-
-
var hex
-
-
-
-
var len
-
-
-
-
var max
-
-
-
-
var min
-
-
-
-
var oct
-
-
-
-
var pow
-
-
-
-
var print
-
-
-
-
var range
-
-
-
-
var reversed
-
-
-
-
var sum
-
-
-
-
-
-
-class ReversedImpl -(*args, **kwargs) -
-
-
-
- -Expand source code - -
class ReversedImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'reversed' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only reverse instances"
-        assert isinstance(typ.typ, ListType), "Can only reverse instances of lists"
-        # returns list of same type
-        return FunctionType(args, typ)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only reverse instances"
-        if isinstance(arg.typ, ListType):
-            empty_l = empty_list(arg.typ.typ)
-            return OLambda(
-                ["xs"],
-                plt.FoldList(
-                    OVar("xs"),
-                    OLambda(["a", "x"], plt.MkCons(OVar("x"), OVar("a"))),
-                    empty_l,
-                ),
-            )
-        raise NotImplementedError(f"'reversed' is not implemented for type {arg}")
-
-

Ancestors

- -

Methods

-
-
-def impl_from_args(self, args: List[Type]) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def type_from_args(self, args: List[Type]) ‑> FunctionType -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/index.html b/docs/opshin/index.html deleted file mode 100644 index e0d1292b..00000000 --- a/docs/opshin/index.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - - - -opshin API documentation - - - - - - - - - - - -
- - - - -
-
-

Package opshin

-
-
-
- -

opshin


-Build Status -PyPI version -PyPI - Python Version -PyPI - Status -Coverage Status - -
-
-

You are building what you want. Why not also build how you want?

-
-

This is an implementation of smart contracts for Cardano which are written in a strict subset of valid Python. -The general philosophy of this project is to write a compiler that -ensure the following:

-

If the program compiles then:

-
    -
  1. it is a valid Python program
  2. -
  3. the output running it with python is the same as running it on-chain.
  4. -
-

Why opshin?

-
    -
  • 100% valid Python. Leverage the existing tool stack for Python, syntax highlighting, linting, debugging, unit-testing, property-based testing, verification
  • -
  • Intuitive. Just like Python.
  • -
  • Flexible. Imperative, functional, the way you want it.
  • -
  • Efficient & Secure. Static type inference ensures strict typing and optimized code
  • -
-

Getting Started

-

Check out the OpShin Book for an introduction to this tool and details into writing smart contracts. -This document will just outline the basic usage of the tool.

-

Installation

-

Install Python 3.8, 3.9, 3.10 or 3.11. Then run

-
python3 -m pip install opshin
-
-

Writing a Smart Contract

-

Check out the OpShin Book for an introduction to this tool and details into writing smart contracts.

-

Compiling

-

Write your program in python. You may start with the content of examples. -Arguments to scripts are passed in as Plutus Data objects in JSON notation.

-

You can run any of the following commands

-
# Evaluate script in Python - this can be used to make sure there are no obvious errors
-opshin eval spending examples/smart_contracts/assert_sum.py "{\"int\": 4}" "{\"int\": 38}" d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff
-
-# Compile script to 'uplc', the Cardano Smart Contract assembly
-opshin compile spending examples/smart_contracts/assert_sum.py
-
-

Furthermore, you can add a shebang to the first line of the python file to indicate that it represents an opshin smart contract. -You can choose from the following options:

-
    -
  • a general shebang: #!opshin, which represents opshin eval any
  • -
  • or a more specific purpose: #!/usr/bin/env -S opshin eval minting
  • -
-

By doing so, you can transform your python file to an executable: chmod +x your_file.py and execute it with ./your_file.py, which will run opshin eval any ./your_file.py under the hood.

-

Deploying

-

The deploy process generates all artifacts required for usage with common libraries like pycardano, lucid and the cardano-cli.

-
# Automatically generate all artifacts needed for using this contract
-opshin build spending examples/smart_contracts/assert_sum.py
-
-

See the tutorial by pycardano for explanations how to build transactions with opshin contracts.

-

API for Smart Contracts

-

The python interface offers a simple API to compile, load, apply parameters and evaluate smart contracts.

-
from opshin.builder import *
-
-# Build a validator script from a python file that contains a validator function
-contract = build("path/to/contract.py")
-
-# You can apply parameters to the contract during compilation
-contract = build("path/to/contract.py", arg1, arg2, arg3)
-
-# Store the compilation artifacts in a folder
-contract.dump("path/to/store")
-
-# You can also load a compiled contract from a path
-contract = load("path/to/store")
-
-# And apply parameters after loading a contract
-contract = contract.apply_parameters(arg1, arg2, arg3)
-
-# The artifacts contain the compiled script, the policy ID and the addresses and blueprint
-contract_addr = contract.mainnet_addr
-contract_blueprint = contract.blueprint
-
-

Debugging artefacts

-

For debugging purposes, you can also run

-
# Compile script to 'uplc', and evaluate the script in UPLC (for debugging purposes)
-opshin eval_uplc spending examples/smart_contracts/assert_sum.py "{\"int\": 4}" "{\"int\": 38}" d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff
-
-# Compile script to 'pluto', an intermediate language (for debugging purposes)
-opshin compile_pluto spending examples/smart_contracts/assert_sum.py
-
-

Contributing

-

Developing and Technical Documentation

-

Generally, all contributions on the code side are very welcome. -To get an overview over the architecture and idea behind OpShin, check out the Technical Documentation. -A bug bounty has been set up and funded by Project Catalyst, which awards Github issue resolution wiht ADA rewards. -This is a great opportunity to get involved and earn some ADA. -Check out the detailed introduction to the bounty program for more information.

-

Sponsoring

-

You can sponsor the development of opshin through GitHub or Patreon or just by sending ADA. Drop me a message on social media and let me know what it is for.

-
    -
  • Patreon Support OpShin at Patreon to enjoy member benefits!
  • -
  • GitHub Sponsor the developers of this project through the button "Sponsor" next to them
  • -
  • ADA Donation in ADA can be submitted to $opshin or addr1qyz3vgd5xxevjy2rvqevz9n7n7dney8n6hqggp23479fm6vwpj9clsvsf85cd4xc59zjztr5zwpummwckmzr2myjwjns74lhmr.
  • -
-

Supporters

-

- - -

-

The main sponsor of this project is Inversion. Here is a word from them!

-
-

At Inversion, we pride ourselves on our passion for life and our ability to create exceptional software solutions for our clients. Our team of experts, with over a century of cumulative experience, is dedicated to harnessing the power of the Cardano blockchain to bring innovative and scalable decentralized applications to life. We've successfully built applications for NFT management, staking and delegation, chain data monitoring, analytics, and web3 integrations, as well as countless non-blockchain systems. With a focus on security, transparency, and sustainability, our team is excited to contribute to the Cardano ecosystem, pushing the boundaries of decentralized technologies to improve lives worldwide. Trust Inversion to be your go-to partner for robust, effective, and forward-thinking solutions, whether blockchain based, traditional systems, or a mix of the two.

-
-

They have recently started a podcast, called "Africa On Chain", which you can check out here: -https://www.youtube.com/@africaonchain

-
- -Expand source code - -
#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-"""
-.. include:: ../README.md
-"""
-
-import warnings
-
-__version__ = "0.23.0"
-__author__ = "nielstron"
-__author_email__ = "n.muendler@web.de"
-__copyright__ = "Copyright (C) 2023 nielstron"
-__license__ = "MIT"
-__url__ = "https://github.com/OpShin/opshin"
-
-try:
-    from .compiler import *
-    from .builder import *
-except ImportError as e:
-    warnings.warn(ImportWarning(e))
-
-
-
-

Sub-modules

-
-
opshin.bridge
-
-

Bridging tools between uplc and opshin

-
-
opshin.builder
-
-
-
-
opshin.compiler
-
-
-
-
opshin.compiler_config
-
-
-
-
opshin.fun_impls
-
-
-
-
opshin.ledger
-
-

OpShin provides some helper classes that define concepts introduced in PlutusTx -and used by the cardano node to encode data. -In particular you find …

-
-
opshin.optimize
-
-
-
-
opshin.prelude
-
-
-
-
opshin.rewrite
-
-
-
-
opshin.std
-
-

OpShin provides a few features in its standard libary. -You can import modules from there (i.e. the fractions module) with …

-
-
opshin.tests
-
-
-
-
opshin.type_impls
-
-
-
-
opshin.type_inference
-
-

An aggressive type inference based on the work of Aycock [1]. -It only allows a subset of legal python operations which -allow us to infer the type of …

-
-
opshin.typed_ast
-
-
-
-
opshin.util
-
-
-
-
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/ledger/api_v2.html b/docs/opshin/ledger/api_v2.html deleted file mode 100644 index eba02444..00000000 --- a/docs/opshin/ledger/api_v2.html +++ /dev/null @@ -1,2422 +0,0 @@ - - - - - - - - -opshin.ledger.api_v2 API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.ledger.api_v2

-
-
-

The PlutusV2 ledger API. -All classes involved in defining the ScriptContext passed by the node.

-
- -Expand source code - -
"""
-The PlutusV2 ledger API.
-All classes involved in defining the ScriptContext passed by the node.
-"""
-
-from dataclasses import dataclass
-from typing import Dict, List, Union
-
-from pycardano import Datum as Anything, PlutusData
-
-
-# Plutus V2
-@dataclass(unsafe_hash=True)
-class TxId(PlutusData):
-    """
-    A transaction id, a 64 bytes long hash of the transaction body (also called transaction hash).
-
-    Example value: TxId(bytes.fromhex("842a4d37b036da6ab3c04331240e67d81746beb44f23ad79703e026705361956"))
-    """
-
-    CONSTR_ID = 0
-
-    tx_id: bytes
-
-
-@dataclass(unsafe_hash=True)
-class TrueData(PlutusData):
-    """
-    A Datum that represents True in Haskell implementations.
-    It is thus used as an encoding for True in the ScriptContext.
-
-    Example value: TrueData()
-    """
-
-    CONSTR_ID = 0
-
-
-@dataclass(unsafe_hash=True)
-class FalseData(PlutusData):
-    """
-    A Datum that represents False in Haskell implementations.
-    It is thus used as an encoding for False in the ScriptContext.
-
-    Example value: FalseData()
-    """
-
-    CONSTR_ID = 1
-
-
-# A Datum that represents a boolean value in Haskell implementations.
-# It is thus used as an encoding for booleans in the ScriptContext.
-#
-# Example value: TrueData()
-BoolData = Union[TrueData, FalseData]
-
-
-@dataclass(unsafe_hash=True)
-class TxOutRef(PlutusData):
-    """
-    A reference to a transaction output (hash/id + index)
-    """
-
-    CONSTR_ID = 0
-
-    id: TxId
-    idx: int
-
-
-# A public key hash, used to identify signatures provided by a wallet
-PubKeyHash = bytes
-
-
-@dataclass(unsafe_hash=True)
-class PubKeyCredential(PlutusData):
-    """
-    Part of an address that is authenticated by a public key hash
-
-    Example value: PubKeyCredential(bytes.fromhex("c06ddaad12fc4ded18e56feac72957c1aa75fce6096b40e63ec88274"))
-    """
-
-    CONSTR_ID = 0
-    credential_hash: PubKeyHash
-
-
-# A validator hash, used to identify signatures provided by a smart contract
-ValidatorHash = bytes
-
-
-@dataclass(unsafe_hash=True)
-class ScriptCredential(PlutusData):
-    """
-    Part of an address that is authenticated by a smart cotnract
-
-    Example value: ScriptCredential(bytes.fromhex("c06ddaad12fc4ded18e56feac72957c1aa75fce6096b40e63ec88274"))
-    """
-
-    CONSTR_ID = 1
-    credential_hash: ValidatorHash
-
-
-# A credential, either smart contract or public key hash
-Credential = Union[PubKeyCredential, ScriptCredential]
-
-
-@dataclass(unsafe_hash=True)
-class StakingHash(PlutusData):
-    """
-    Indicates that the stake of this address is controlled by the associated credential
-    """
-
-    CONSTR_ID = 0
-    value: Credential
-
-
-@dataclass(unsafe_hash=True)
-class StakingPtr(PlutusData):
-    """
-    Indicates that the stake of this address is controlled by the associated pointer.
-
-    In an address, a chain pointer refers to a point of the chain containing a stake key registration certificate.
-    A point is identified by the 3 coordinates in this object.
-    """
-
-    CONSTR_ID = 1
-    # an absolute slot number
-    slot_no: int
-    # a transaction index (within that slot)
-    tx_index: int
-    # a (delegation) certificate index (within that transaction)
-    cert_index: int
-
-
-# Part of an address that controls who can delegate the stake associated with an address
-StakingCredential = Union[StakingHash, StakingPtr]
-
-
-@dataclass(unsafe_hash=True)
-class NoStakingCredential(PlutusData):
-    """
-    Indicates that this address has no staking credentials.
-    Its funds can not be delegated.
-    """
-
-    CONSTR_ID = 1
-
-
-@dataclass(unsafe_hash=True)
-class SomeStakingCredential(PlutusData):
-    """
-    Indicates that this address has staking credentials.
-    Its funds can be delegated by the credentialed user.
-    """
-
-    CONSTR_ID = 0
-    staking_credential: StakingCredential
-
-
-@dataclass(unsafe_hash=True)
-class Address(PlutusData):
-    """
-    A Shelley address, consisting of a payment and staking credential
-    """
-
-    CONSTR_ID = 0
-
-    payment_credential: Credential
-    staking_credential: Union[NoStakingCredential, SomeStakingCredential]
-
-
-# The policy Id of a token
-PolicyId = bytes
-
-# The name of a token in bytes (not textual representation!)
-TokenName = bytes
-
-# The Plutus representation of amounts of tokens being spent, sent or minted
-# It is a two-layered dictionary that stores for each policy id and token name
-# the amount of the token that is being sent/minted/burned etc
-#
-# Lovelace is represented with policy id b"" and token name b""
-Value = Dict[PolicyId, Dict[TokenName, int]]
-
-# A hash of a Datum
-DatumHash = bytes
-
-
-@dataclass(unsafe_hash=True)
-class SomeDatumHash(PlutusData):
-    """
-    Indicates that there is a datum associated with this output, which has the given hash.
-    """
-
-    CONSTR_ID = 1
-    datum_hash: DatumHash
-
-
-@dataclass(unsafe_hash=True)
-class SomeScriptHash(PlutusData):
-    """
-    Indicates that there is a script associated with this output, which has the given hash.
-    """
-
-    CONSTR_ID = 0
-    script_hash: DatumHash
-
-
-# The abstract super type of any object in opshin.
-# Use if you don't know what kind of object is being passed or if it doesn't matter.
-BuiltinData = Anything
-
-
-# An abstract type annotation that something is supposed to be used as a redeemer.
-Redeemer = BuiltinData
-
-
-# An abstract type annotation that something is supposed to be used as a datum.
-Datum = BuiltinData
-
-
-@dataclass(unsafe_hash=True)
-class NoOutputDatum(PlutusData):
-    """
-    Indicates that there is no datum associated with an output
-    """
-
-    CONSTR_ID = 0
-
-
-@dataclass(unsafe_hash=True)
-class SomeOutputDatumHash(PlutusData):
-    """
-    Indicates that there is an datum associated with an output, which has the attached hash
-    """
-
-    CONSTR_ID = 1
-    datum_hash: DatumHash
-
-
-@dataclass(unsafe_hash=True)
-class SomeOutputDatum(PlutusData):
-    """
-    Indicates that there is an datum associated with an output, which is inlined and equal to the attached datum
-    """
-
-    CONSTR_ID = 2
-    datum: Datum
-
-
-# Possible cases of datum association with an output
-OutputDatum = Union[NoOutputDatum, SomeOutputDatumHash, SomeOutputDatum]
-
-
-@dataclass(unsafe_hash=True)
-class NoScriptHash(PlutusData):
-    """
-    Indicates that there is no script associated with an output
-    """
-
-    CONSTR_ID = 1
-
-
-@dataclass(unsafe_hash=True)
-class TxOut(PlutusData):
-    """
-    The plutus representation of an transaction output, consisting of
-    - address: address owning this output
-    - value: tokens associated with this output
-    - datum: datum associated with this output
-    - reference_script: reference script associated with this output
-    """
-
-    CONSTR_ID = 0
-
-    address: Address
-    value: Value
-    datum: OutputDatum
-    reference_script: Union[NoScriptHash, SomeScriptHash]
-
-
-@dataclass(unsafe_hash=True)
-class TxInInfo(PlutusData):
-    """
-    The plutus representation of an transaction output, that is consumed by the transaction.
-    """
-
-    CONSTR_ID = 0
-
-    out_ref: TxOutRef
-    resolved: TxOut
-
-
-@dataclass(unsafe_hash=True)
-class DCertDelegRegKey(PlutusData):
-    CONSTR_ID = 0
-    value: StakingCredential
-
-
-@dataclass(unsafe_hash=True)
-class DCertDelegDeRegKey(PlutusData):
-    CONSTR_ID = 1
-    value: StakingCredential
-
-
-@dataclass(unsafe_hash=True)
-class DCertDelegDelegate(PlutusData):
-    CONSTR_ID = 2
-    delegator: StakingCredential
-    delegatee: PubKeyHash
-
-
-@dataclass(unsafe_hash=True)
-class DCertPoolRegister(PlutusData):
-    CONSTR_ID = 3
-    pool_id: PubKeyHash
-    pool_vfr: PubKeyHash
-
-
-@dataclass(unsafe_hash=True)
-class DCertPoolRetire(PlutusData):
-    CONSTR_ID = 4
-    retirement_certificate: PubKeyHash
-    epoch: int
-
-
-@dataclass(unsafe_hash=True)
-class DCertGenesis(PlutusData):
-    CONSTR_ID = 5
-
-
-@dataclass(unsafe_hash=True)
-class DCertMir(PlutusData):
-    CONSTR_ID = 6
-
-
-DCert = Union[
-    DCertDelegRegKey,
-    DCertDelegDeRegKey,
-    DCertDelegDelegate,
-    DCertPoolRegister,
-    DCertPoolRetire,
-    DCertGenesis,
-    DCertMir,
-]
-
-
-POSIXTime = int
-
-
-@dataclass(unsafe_hash=True)
-class NegInfPOSIXTime(PlutusData):
-    """
-    Negative infinite POSIX time, used to indicate that there is no lower bound for the execution of this transaction
-    """
-
-    CONSTR_ID = 0
-
-
-@dataclass(unsafe_hash=True)
-class FinitePOSIXTime(PlutusData):
-    """
-    Finite POSIX time, used to indicate that there is a lower or upper bound for the execution of this transaction
-    """
-
-    CONSTR_ID = 1
-    time: POSIXTime
-
-
-@dataclass(unsafe_hash=True)
-class PosInfPOSIXTime(PlutusData):
-    """
-    Infinite POSIX time, used to indicate that there is no upper bound for the execution of this transaction
-    """
-
-    CONSTR_ID = 2
-
-
-ExtendedPOSIXTime = Union[NegInfPOSIXTime, FinitePOSIXTime, PosInfPOSIXTime]
-
-
-@dataclass(unsafe_hash=True)
-class UpperBoundPOSIXTime(PlutusData):
-    """
-    Upper bound for the execution of this transaction
-    """
-
-    CONSTR_ID = 0
-    limit: ExtendedPOSIXTime
-    closed: BoolData
-
-
-@dataclass(unsafe_hash=True)
-class LowerBoundPOSIXTime(PlutusData):
-    """
-    Lower bound for the execution of this transaction
-    """
-
-    CONSTR_ID = 0
-    limit: ExtendedPOSIXTime
-    closed: BoolData
-
-
-@dataclass(unsafe_hash=True)
-class POSIXTimeRange(PlutusData):
-    """
-    Time range in which this transaction can be executed
-    """
-
-    CONSTR_ID = 0
-
-    lower_bound: LowerBoundPOSIXTime
-    upper_bound: UpperBoundPOSIXTime
-
-
-@dataclass(unsafe_hash=True)
-class Minting(PlutusData):
-    """
-    Script purpose indicating that the given policy id is being minted or burned
-    """
-
-    CONSTR_ID = 0
-    policy_id: PolicyId
-
-
-@dataclass(unsafe_hash=True)
-class Spending(PlutusData):
-    """
-    Script purpose indicating that the given transaction output is being spent, which is
-    owned by the invoked contract
-    """
-
-    CONSTR_ID = 1
-    tx_out_ref: TxOutRef
-
-
-@dataclass(unsafe_hash=True)
-class Rewarding(PlutusData):
-    CONSTR_ID = 2
-    staking_credential: StakingCredential
-
-
-@dataclass(unsafe_hash=True)
-class Certifying(PlutusData):
-    CONSTR_ID = 3
-    d_cert: DCert
-
-
-# The reason that this script is being invoked
-ScriptPurpose = Union[Minting, Spending, Rewarding, Certifying]
-
-
-@dataclass(unsafe_hash=True)
-class TxInfo(PlutusData):
-    """
-    A complex agglomeration of everything that could be of interest to the executed script, regarding the transaction
-    that invoked the script
-    """
-
-    CONSTR_ID = 0
-    inputs: List[TxInInfo]
-    reference_inputs: List[TxInInfo]
-    outputs: List[TxOut]
-    fee: Value
-    mint: Value
-    dcert: List[DCert]
-    wdrl: Dict[StakingCredential, int]
-    valid_range: POSIXTimeRange
-    signatories: List[PubKeyHash]
-    redeemers: Dict[ScriptPurpose, Redeemer]
-    data: Dict[DatumHash, Datum]
-    id: TxId
-
-
-@dataclass(unsafe_hash=True)
-class ScriptContext(PlutusData):
-    """
-    Auxiliary information about the transaction and reason for invocation of the called script.
-    """
-
-    CONSTR_ID = 0
-    tx_info: TxInfo
-    purpose: ScriptPurpose
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Address -(payment_credential: Union[PubKeyCredentialScriptCredential], staking_credential: Union[NoStakingCredentialSomeStakingCredential]) -
-
-

A Shelley address, consisting of a payment and staking credential

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class Address(PlutusData):
-    """
-    A Shelley address, consisting of a payment and staking credential
-    """
-
-    CONSTR_ID = 0
-
-    payment_credential: Credential
-    staking_credential: Union[NoStakingCredential, SomeStakingCredential]
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var payment_credential : Union[PubKeyCredentialScriptCredential]
-
-
-
-
var staking_credential : Union[NoStakingCredentialSomeStakingCredential]
-
-
-
-
-
-
-class Certifying -(d_cert: Union[DCertDelegRegKeyDCertDelegDeRegKeyDCertDelegDelegateDCertPoolRegisterDCertPoolRetireDCertGenesisDCertMir]) -
-
-

Certifying(d_cert: Union[opshin.ledger.api_v2.DCertDelegRegKey, opshin.ledger.api_v2.DCertDelegDeRegKey, opshin.ledger.api_v2.DCertDelegDelegate, opshin.ledger.api_v2.DCertPoolRegister, opshin.ledger.api_v2.DCertPoolRetire, opshin.ledger.api_v2.DCertGenesis, opshin.ledger.api_v2.DCertMir])

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class Certifying(PlutusData):
-    CONSTR_ID = 3
-    d_cert: DCert
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var d_cert : Union[DCertDelegRegKeyDCertDelegDeRegKeyDCertDelegDelegateDCertPoolRegisterDCertPoolRetireDCertGenesisDCertMir]
-
-
-
-
-
-
-class DCertDelegDeRegKey -(value: Union[StakingHashStakingPtr]) -
-
-

DCertDelegDeRegKey(value: Union[opshin.ledger.api_v2.StakingHash, opshin.ledger.api_v2.StakingPtr])

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class DCertDelegDeRegKey(PlutusData):
-    CONSTR_ID = 1
-    value: StakingCredential
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var value : Union[StakingHashStakingPtr]
-
-
-
-
-
-
-class DCertDelegDelegate -(delegator: Union[StakingHashStakingPtr], delegatee: bytes) -
-
-

DCertDelegDelegate(delegator: Union[opshin.ledger.api_v2.StakingHash, opshin.ledger.api_v2.StakingPtr], delegatee: bytes)

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class DCertDelegDelegate(PlutusData):
-    CONSTR_ID = 2
-    delegator: StakingCredential
-    delegatee: PubKeyHash
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var delegatee : bytes
-
-
-
-
var delegator : Union[StakingHashStakingPtr]
-
-
-
-
-
-
-class DCertDelegRegKey -(value: Union[StakingHashStakingPtr]) -
-
-

DCertDelegRegKey(value: Union[opshin.ledger.api_v2.StakingHash, opshin.ledger.api_v2.StakingPtr])

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class DCertDelegRegKey(PlutusData):
-    CONSTR_ID = 0
-    value: StakingCredential
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var value : Union[StakingHashStakingPtr]
-
-
-
-
-
-
-class DCertGenesis -
-
-

DCertGenesis()

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class DCertGenesis(PlutusData):
-    CONSTR_ID = 5
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-class DCertMir -
-
-

DCertMir()

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class DCertMir(PlutusData):
-    CONSTR_ID = 6
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-class DCertPoolRegister -(pool_id: bytes, pool_vfr: bytes) -
-
-

DCertPoolRegister(pool_id: bytes, pool_vfr: bytes)

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class DCertPoolRegister(PlutusData):
-    CONSTR_ID = 3
-    pool_id: PubKeyHash
-    pool_vfr: PubKeyHash
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var pool_id : bytes
-
-
-
-
var pool_vfr : bytes
-
-
-
-
-
-
-class DCertPoolRetire -(retirement_certificate: bytes, epoch: int) -
-
-

DCertPoolRetire(retirement_certificate: bytes, epoch: int)

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class DCertPoolRetire(PlutusData):
-    CONSTR_ID = 4
-    retirement_certificate: PubKeyHash
-    epoch: int
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var epoch : int
-
-
-
-
var retirement_certificate : bytes
-
-
-
-
-
-
-class FalseData -
-
-

A Datum that represents False in Haskell implementations. -It is thus used as an encoding for False in the ScriptContext.

-

Example value: FalseData()

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class FalseData(PlutusData):
-    """
-    A Datum that represents False in Haskell implementations.
-    It is thus used as an encoding for False in the ScriptContext.
-
-    Example value: FalseData()
-    """
-
-    CONSTR_ID = 1
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-class FinitePOSIXTime -(time: int) -
-
-

Finite POSIX time, used to indicate that there is a lower or upper bound for the execution of this transaction

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class FinitePOSIXTime(PlutusData):
-    """
-    Finite POSIX time, used to indicate that there is a lower or upper bound for the execution of this transaction
-    """
-
-    CONSTR_ID = 1
-    time: POSIXTime
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var time : int
-
-
-
-
-
-
-class LowerBoundPOSIXTime -(limit: Union[NegInfPOSIXTimeFinitePOSIXTimePosInfPOSIXTime], closed: Union[TrueDataFalseData]) -
-
-

Lower bound for the execution of this transaction

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class LowerBoundPOSIXTime(PlutusData):
-    """
-    Lower bound for the execution of this transaction
-    """
-
-    CONSTR_ID = 0
-    limit: ExtendedPOSIXTime
-    closed: BoolData
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var closed : Union[TrueDataFalseData]
-
-
-
-
var limit : Union[NegInfPOSIXTimeFinitePOSIXTimePosInfPOSIXTime]
-
-
-
-
-
-
-class Minting -(policy_id: bytes) -
-
-

Script purpose indicating that the given policy id is being minted or burned

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class Minting(PlutusData):
-    """
-    Script purpose indicating that the given policy id is being minted or burned
-    """
-
-    CONSTR_ID = 0
-    policy_id: PolicyId
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var policy_id : bytes
-
-
-
-
-
-
-class NegInfPOSIXTime -
-
-

Negative infinite POSIX time, used to indicate that there is no lower bound for the execution of this transaction

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class NegInfPOSIXTime(PlutusData):
-    """
-    Negative infinite POSIX time, used to indicate that there is no lower bound for the execution of this transaction
-    """
-
-    CONSTR_ID = 0
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-class NoOutputDatum -
-
-

Indicates that there is no datum associated with an output

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class NoOutputDatum(PlutusData):
-    """
-    Indicates that there is no datum associated with an output
-    """
-
-    CONSTR_ID = 0
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-class NoScriptHash -
-
-

Indicates that there is no script associated with an output

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class NoScriptHash(PlutusData):
-    """
-    Indicates that there is no script associated with an output
-    """
-
-    CONSTR_ID = 1
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-class NoStakingCredential -
-
-

Indicates that this address has no staking credentials. -Its funds can not be delegated.

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class NoStakingCredential(PlutusData):
-    """
-    Indicates that this address has no staking credentials.
-    Its funds can not be delegated.
-    """
-
-    CONSTR_ID = 1
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-class POSIXTimeRange -(lower_bound: LowerBoundPOSIXTime, upper_bound: UpperBoundPOSIXTime) -
-
-

Time range in which this transaction can be executed

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class POSIXTimeRange(PlutusData):
-    """
-    Time range in which this transaction can be executed
-    """
-
-    CONSTR_ID = 0
-
-    lower_bound: LowerBoundPOSIXTime
-    upper_bound: UpperBoundPOSIXTime
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var lower_boundLowerBoundPOSIXTime
-
-
-
-
var upper_boundUpperBoundPOSIXTime
-
-
-
-
-
-
-class PosInfPOSIXTime -
-
-

Infinite POSIX time, used to indicate that there is no upper bound for the execution of this transaction

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class PosInfPOSIXTime(PlutusData):
-    """
-    Infinite POSIX time, used to indicate that there is no upper bound for the execution of this transaction
-    """
-
-    CONSTR_ID = 2
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-class PubKeyCredential -(credential_hash: bytes) -
-
-

Part of an address that is authenticated by a public key hash

-

Example value: PubKeyCredential(bytes.fromhex("c06ddaad12fc4ded18e56feac72957c1aa75fce6096b40e63ec88274"))

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class PubKeyCredential(PlutusData):
-    """
-    Part of an address that is authenticated by a public key hash
-
-    Example value: PubKeyCredential(bytes.fromhex("c06ddaad12fc4ded18e56feac72957c1aa75fce6096b40e63ec88274"))
-    """
-
-    CONSTR_ID = 0
-    credential_hash: PubKeyHash
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var credential_hash : bytes
-
-
-
-
-
-
-class Rewarding -(staking_credential: Union[StakingHashStakingPtr]) -
-
-

Rewarding(staking_credential: Union[opshin.ledger.api_v2.StakingHash, opshin.ledger.api_v2.StakingPtr])

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class Rewarding(PlutusData):
-    CONSTR_ID = 2
-    staking_credential: StakingCredential
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var staking_credential : Union[StakingHashStakingPtr]
-
-
-
-
-
-
-class ScriptContext -(tx_info: TxInfo, purpose: Union[MintingSpendingRewardingCertifying]) -
-
-

Auxiliary information about the transaction and reason for invocation of the called script.

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class ScriptContext(PlutusData):
-    """
-    Auxiliary information about the transaction and reason for invocation of the called script.
-    """
-
-    CONSTR_ID = 0
-    tx_info: TxInfo
-    purpose: ScriptPurpose
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var purpose : Union[MintingSpendingRewardingCertifying]
-
-
-
-
var tx_infoTxInfo
-
-
-
-
-
-
-class ScriptCredential -(credential_hash: bytes) -
-
-

Part of an address that is authenticated by a smart cotnract

-

Example value: ScriptCredential(bytes.fromhex("c06ddaad12fc4ded18e56feac72957c1aa75fce6096b40e63ec88274"))

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class ScriptCredential(PlutusData):
-    """
-    Part of an address that is authenticated by a smart cotnract
-
-    Example value: ScriptCredential(bytes.fromhex("c06ddaad12fc4ded18e56feac72957c1aa75fce6096b40e63ec88274"))
-    """
-
-    CONSTR_ID = 1
-    credential_hash: ValidatorHash
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var credential_hash : bytes
-
-
-
-
-
-
-class SomeDatumHash -(datum_hash: bytes) -
-
-

Indicates that there is a datum associated with this output, which has the given hash.

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class SomeDatumHash(PlutusData):
-    """
-    Indicates that there is a datum associated with this output, which has the given hash.
-    """
-
-    CONSTR_ID = 1
-    datum_hash: DatumHash
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var datum_hash : bytes
-
-
-
-
-
-
-class SomeOutputDatum -(datum: Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]) -
-
-

Indicates that there is an datum associated with an output, which is inlined and equal to the attached datum

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class SomeOutputDatum(PlutusData):
-    """
-    Indicates that there is an datum associated with an output, which is inlined and equal to the attached datum
-    """
-
-    CONSTR_ID = 2
-    datum: Datum
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var datum : Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]
-
-
-
-
-
-
-class SomeOutputDatumHash -(datum_hash: bytes) -
-
-

Indicates that there is an datum associated with an output, which has the attached hash

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class SomeOutputDatumHash(PlutusData):
-    """
-    Indicates that there is an datum associated with an output, which has the attached hash
-    """
-
-    CONSTR_ID = 1
-    datum_hash: DatumHash
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var datum_hash : bytes
-
-
-
-
-
-
-class SomeScriptHash -(script_hash: bytes) -
-
-

Indicates that there is a script associated with this output, which has the given hash.

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class SomeScriptHash(PlutusData):
-    """
-    Indicates that there is a script associated with this output, which has the given hash.
-    """
-
-    CONSTR_ID = 0
-    script_hash: DatumHash
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var script_hash : bytes
-
-
-
-
-
-
-class SomeStakingCredential -(staking_credential: Union[StakingHashStakingPtr]) -
-
-

Indicates that this address has staking credentials. -Its funds can be delegated by the credentialed user.

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class SomeStakingCredential(PlutusData):
-    """
-    Indicates that this address has staking credentials.
-    Its funds can be delegated by the credentialed user.
-    """
-
-    CONSTR_ID = 0
-    staking_credential: StakingCredential
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var staking_credential : Union[StakingHashStakingPtr]
-
-
-
-
-
-
-class Spending -(tx_out_ref: TxOutRef) -
-
-

Script purpose indicating that the given transaction output is being spent, which is -owned by the invoked contract

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class Spending(PlutusData):
-    """
-    Script purpose indicating that the given transaction output is being spent, which is
-    owned by the invoked contract
-    """
-
-    CONSTR_ID = 1
-    tx_out_ref: TxOutRef
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var tx_out_refTxOutRef
-
-
-
-
-
-
-class StakingHash -(value: Union[PubKeyCredentialScriptCredential]) -
-
-

Indicates that the stake of this address is controlled by the associated credential

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class StakingHash(PlutusData):
-    """
-    Indicates that the stake of this address is controlled by the associated credential
-    """
-
-    CONSTR_ID = 0
-    value: Credential
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var value : Union[PubKeyCredentialScriptCredential]
-
-
-
-
-
-
-class StakingPtr -(slot_no: int, tx_index: int, cert_index: int) -
-
-

Indicates that the stake of this address is controlled by the associated pointer.

-

In an address, a chain pointer refers to a point of the chain containing a stake key registration certificate. -A point is identified by the 3 coordinates in this object.

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class StakingPtr(PlutusData):
-    """
-    Indicates that the stake of this address is controlled by the associated pointer.
-
-    In an address, a chain pointer refers to a point of the chain containing a stake key registration certificate.
-    A point is identified by the 3 coordinates in this object.
-    """
-
-    CONSTR_ID = 1
-    # an absolute slot number
-    slot_no: int
-    # a transaction index (within that slot)
-    tx_index: int
-    # a (delegation) certificate index (within that transaction)
-    cert_index: int
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var cert_index : int
-
-
-
-
var slot_no : int
-
-
-
-
var tx_index : int
-
-
-
-
-
-
-class TrueData -
-
-

A Datum that represents True in Haskell implementations. -It is thus used as an encoding for True in the ScriptContext.

-

Example value: TrueData()

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class TrueData(PlutusData):
-    """
-    A Datum that represents True in Haskell implementations.
-    It is thus used as an encoding for True in the ScriptContext.
-
-    Example value: TrueData()
-    """
-
-    CONSTR_ID = 0
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-class TxId -(tx_id: bytes) -
-
-

A transaction id, a 64 bytes long hash of the transaction body (also called transaction hash).

-

Example value: TxId(bytes.fromhex("842a4d37b036da6ab3c04331240e67d81746beb44f23ad79703e026705361956"))

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class TxId(PlutusData):
-    """
-    A transaction id, a 64 bytes long hash of the transaction body (also called transaction hash).
-
-    Example value: TxId(bytes.fromhex("842a4d37b036da6ab3c04331240e67d81746beb44f23ad79703e026705361956"))
-    """
-
-    CONSTR_ID = 0
-
-    tx_id: bytes
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var tx_id : bytes
-
-
-
-
-
-
-class TxInInfo -(out_ref: TxOutRef, resolved: TxOut) -
-
-

The plutus representation of an transaction output, that is consumed by the transaction.

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class TxInInfo(PlutusData):
-    """
-    The plutus representation of an transaction output, that is consumed by the transaction.
-    """
-
-    CONSTR_ID = 0
-
-    out_ref: TxOutRef
-    resolved: TxOut
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var out_refTxOutRef
-
-
-
-
var resolvedTxOut
-
-
-
-
-
-
-class TxInfo -(inputs: List[TxInInfo], reference_inputs: List[TxInInfo], outputs: List[TxOut], fee: Dict[bytes, Dict[bytes, int]], mint: Dict[bytes, Dict[bytes, int]], dcert: List[Union[DCertDelegRegKeyDCertDelegDeRegKeyDCertDelegDelegateDCertPoolRegisterDCertPoolRetireDCertGenesisDCertMir]], wdrl: Dict[Union[StakingHashStakingPtr], int], valid_range: POSIXTimeRange, signatories: List[bytes], redeemers: Dict[Union[MintingSpendingRewardingCertifying], Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]], data: Dict[bytes, Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]], id: TxId) -
-
-

A complex agglomeration of everything that could be of interest to the executed script, regarding the transaction -that invoked the script

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class TxInfo(PlutusData):
-    """
-    A complex agglomeration of everything that could be of interest to the executed script, regarding the transaction
-    that invoked the script
-    """
-
-    CONSTR_ID = 0
-    inputs: List[TxInInfo]
-    reference_inputs: List[TxInInfo]
-    outputs: List[TxOut]
-    fee: Value
-    mint: Value
-    dcert: List[DCert]
-    wdrl: Dict[StakingCredential, int]
-    valid_range: POSIXTimeRange
-    signatories: List[PubKeyHash]
-    redeemers: Dict[ScriptPurpose, Redeemer]
-    data: Dict[DatumHash, Datum]
-    id: TxId
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var data : Dict[bytes, Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]
-
-
-
-
var dcert : List[Union[DCertDelegRegKeyDCertDelegDeRegKeyDCertDelegDelegateDCertPoolRegisterDCertPoolRetireDCertGenesisDCertMir]]
-
-
-
-
var fee : Dict[bytes, Dict[bytes, int]]
-
-
-
-
var idTxId
-
-
-
-
var inputs : List[TxInInfo]
-
-
-
-
var mint : Dict[bytes, Dict[bytes, int]]
-
-
-
-
var outputs : List[TxOut]
-
-
-
-
var redeemers : Dict[Union[MintingSpendingRewardingCertifying], Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]
-
-
-
-
var reference_inputs : List[TxInInfo]
-
-
-
-
var signatories : List[bytes]
-
-
-
-
var valid_rangePOSIXTimeRange
-
-
-
-
var wdrl : Dict[Union[StakingHashStakingPtr], int]
-
-
-
-
-
-
-class TxOut -(address: Address, value: Dict[bytes, Dict[bytes, int]], datum: Union[NoOutputDatumSomeOutputDatumHashSomeOutputDatum], reference_script: Union[NoScriptHashSomeScriptHash]) -
-
-

The plutus representation of an transaction output, consisting of -- address: address owning this output -- value: tokens associated with this output -- datum: datum associated with this output -- reference_script: reference script associated with this output

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class TxOut(PlutusData):
-    """
-    The plutus representation of an transaction output, consisting of
-    - address: address owning this output
-    - value: tokens associated with this output
-    - datum: datum associated with this output
-    - reference_script: reference script associated with this output
-    """
-
-    CONSTR_ID = 0
-
-    address: Address
-    value: Value
-    datum: OutputDatum
-    reference_script: Union[NoScriptHash, SomeScriptHash]
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var addressAddress
-
-
-
-
var datum : Union[NoOutputDatumSomeOutputDatumHashSomeOutputDatum]
-
-
-
-
var reference_script : Union[NoScriptHashSomeScriptHash]
-
-
-
-
var value : Dict[bytes, Dict[bytes, int]]
-
-
-
-
-
-
-class TxOutRef -(id: TxId, idx: int) -
-
-

A reference to a transaction output (hash/id + index)

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class TxOutRef(PlutusData):
-    """
-    A reference to a transaction output (hash/id + index)
-    """
-
-    CONSTR_ID = 0
-
-    id: TxId
-    idx: int
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var idTxId
-
-
-
-
var idx : int
-
-
-
-
-
-
-class UpperBoundPOSIXTime -(limit: Union[NegInfPOSIXTimeFinitePOSIXTimePosInfPOSIXTime], closed: Union[TrueDataFalseData]) -
-
-

Upper bound for the execution of this transaction

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class UpperBoundPOSIXTime(PlutusData):
-    """
-    Upper bound for the execution of this transaction
-    """
-
-    CONSTR_ID = 0
-    limit: ExtendedPOSIXTime
-    closed: BoolData
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var closed : Union[TrueDataFalseData]
-
-
-
-
var limit : Union[NegInfPOSIXTimeFinitePOSIXTimePosInfPOSIXTime]
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/ledger/index.html b/docs/opshin/ledger/index.html deleted file mode 100644 index f37e5c1e..00000000 --- a/docs/opshin/ledger/index.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - -opshin.ledger API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.ledger

-
-
-

OpShin provides some helper classes that define concepts introduced in PlutusTx -and used by the cardano node to encode data. -In particular you find the definition of the entire Script Context for Plutus V2 -in the file opshin.ledger.api_v2.

-
from opshin.ledger.api_v2 import *
-
-
- -Expand source code - -
"""
-OpShin provides some helper classes that define concepts introduced in PlutusTx
-and used by the cardano node to encode data.
-In particular you find the definition of the entire Script Context for Plutus V2
-in the file `api_v2`.
-
-```python
-from opshin.ledger.api_v2 import *
-```
-"""
-
-
-
-

Sub-modules

-
-
opshin.ledger.api_v2
-
-

The PlutusV2 ledger API. -All classes involved in defining the ScriptContext passed by the node.

-
-
opshin.ledger.interval
-
-

A library to assist with interval handling

-
-
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/ledger/interval.html b/docs/opshin/ledger/interval.html deleted file mode 100644 index c9a6be37..00000000 --- a/docs/opshin/ledger/interval.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - - - -opshin.ledger.interval API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.ledger.interval

-
-
-

A library to assist with interval handling

-
- -Expand source code - -
"""
-A library to assist with interval handling
-"""
-
-from opshin.ledger.api_v2 import *
-
-
-def compare(a: int, b: int) -> int:
-    # a < b: 1
-    # a == b: 0
-    # a > b: -1
-    if a < b:
-        result = 1
-    elif a == b:
-        result = 0
-    else:
-        result = -1
-    return result
-
-
-def compare_extended_helper(time: ExtendedPOSIXTime) -> int:
-    result = 0
-    if isinstance(time, NegInfPOSIXTime):
-        result = -1
-    elif isinstance(time, FinitePOSIXTime):
-        result = 0
-    elif isinstance(time, PosInfPOSIXTime):
-        result = 1
-    return result
-
-
-def compare_extended(a: ExtendedPOSIXTime, b: ExtendedPOSIXTime) -> int:
-    # a < b: 1
-    # a == b: 0
-    # a > b: -1
-    a_val = compare_extended_helper(a)
-    b_val = compare_extended_helper(b)
-    if a_val == 0 and b_val == 0:
-        a_finite: FinitePOSIXTime = a
-        b_finite: FinitePOSIXTime = b
-        result = compare(a_finite.time, b_finite.time)
-    else:
-        result = compare(a_val, b_val)
-    return result
-
-
-def get_bool(b: BoolData) -> bool:
-    if isinstance(b, TrueData):
-        result = True
-    else:
-        result = False
-    return result
-
-
-def compare_upper_bound(a: UpperBoundPOSIXTime, b: UpperBoundPOSIXTime) -> int:
-    # a < b: 1
-    # a == b: 0
-    # a > b: -1
-    result = compare_extended(a.limit, b.limit)
-    if result == 0:
-        a_val = 1 if get_bool(a.closed) else 0
-        b_val = 1 if get_bool(b.closed) else 0
-        result = compare(a_val, b_val)
-    return result
-
-
-def compare_lower_bound(a: LowerBoundPOSIXTime, b: LowerBoundPOSIXTime) -> int:
-    # a < b: 1
-    # a == b: 0
-    # a > b: -1
-    result = compare_extended(a.limit, b.limit)
-    if result == 0:
-        a_val = 1 if get_bool(a.closed) else 0
-        b_val = 1 if get_bool(b.closed) else 0
-        result = compare(b_val, a_val)
-    return result
-
-
-def contains(a: POSIXTimeRange, b: POSIXTimeRange) -> bool:
-    """Returns True if the interval `b` is entirely contained in `a`."""
-    lower = compare_lower_bound(a.lower_bound, b.lower_bound)
-    upper = compare_upper_bound(a.upper_bound, b.upper_bound)
-    return (lower == 1 or lower == 0) and (upper == 0 or upper == -1)
-
-
-def make_range(
-    lower_bound: POSIXTime,
-    upper_bound: POSIXTime,
-) -> POSIXTimeRange:
-    """
-    Create a bounded interval from the given time `lower_bound` up to the given `upper_bound`, including the given time
-    """
-    return POSIXTimeRange(
-        LowerBoundPOSIXTime(FinitePOSIXTime(lower_bound), TrueData()),
-        UpperBoundPOSIXTime(FinitePOSIXTime(upper_bound), TrueData()),
-    )
-
-
-def make_from(lower_bound: POSIXTime) -> POSIXTimeRange:
-    """Create a bounded interval from the given time `lower_bound` up to infinity, including the given time"""
-    return POSIXTimeRange(
-        LowerBoundPOSIXTime(FinitePOSIXTime(lower_bound), TrueData()),
-        UpperBoundPOSIXTime(PosInfPOSIXTime(), TrueData()),
-    )
-
-
-def make_to(upper_bound: POSIXTime) -> POSIXTimeRange:
-    """
-    Create a bounded interval from negative infinity up to the given `upper_bound`, including the given time
-    """
-    return POSIXTimeRange(
-        LowerBoundPOSIXTime(NegInfPOSIXTime(), TrueData()),
-        UpperBoundPOSIXTime(FinitePOSIXTime(upper_bound), TrueData()),
-    )
-
-
-
-
-
-
-
-

Functions

-
-
-def compare(a: int, b: int) ‑> int -
-
-
-
-
-def compare_extended(a: Union[NegInfPOSIXTimeFinitePOSIXTimePosInfPOSIXTime], b: Union[NegInfPOSIXTimeFinitePOSIXTimePosInfPOSIXTime]) ‑> int -
-
-
-
-
-def compare_extended_helper(time: Union[NegInfPOSIXTimeFinitePOSIXTimePosInfPOSIXTime]) ‑> int -
-
-
-
-
-def compare_lower_bound(a: LowerBoundPOSIXTime, b: LowerBoundPOSIXTime) ‑> int -
-
-
-
-
-def compare_upper_bound(a: UpperBoundPOSIXTime, b: UpperBoundPOSIXTime) ‑> int -
-
-
-
-
-def contains(a: POSIXTimeRange, b: POSIXTimeRange) ‑> bool -
-
-

Returns True if the interval b is entirely contained in a.

-
-
-def get_bool(b: Union[TrueDataFalseData]) ‑> bool -
-
-
-
-
-def make_from(lower_bound: int) ‑> POSIXTimeRange -
-
-

Create a bounded interval from the given time lower_bound up to infinity, including the given time

-
-
-def make_range(lower_bound: int, upper_bound: int) ‑> POSIXTimeRange -
-
-

Create a bounded interval from the given time lower_bound up to the given upper_bound, including the given time

-
-
-def make_to(upper_bound: int) ‑> POSIXTimeRange -
-
-

Create a bounded interval from negative infinity up to the given upper_bound, including the given time

-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/optimize/index.html b/docs/opshin/optimize/index.html deleted file mode 100644 index 2641ee49..00000000 --- a/docs/opshin/optimize/index.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - -opshin.optimize API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.optimize

-
-
-
-
-

Sub-modules

-
-
opshin.optimize.optimize_const_folding
-
-
-
-
opshin.optimize.optimize_remove_comments
-
-
-
-
opshin.optimize.optimize_remove_deadvars
-
-
-
-
opshin.optimize.optimize_remove_pass
-
-
-
-
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/optimize/optimize_const_folding.html b/docs/opshin/optimize/optimize_const_folding.html deleted file mode 100644 index cd603809..00000000 --- a/docs/opshin/optimize/optimize_const_folding.html +++ /dev/null @@ -1,1128 +0,0 @@ - - - - - - - - -opshin.optimize.optimize_const_folding API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.optimize.optimize_const_folding

-
-
-
- -Expand source code - -
import typing
-from collections import defaultdict
-import logging
-
-from ast import *
-from ordered_set import OrderedSet
-
-from pycardano import PlutusData
-
-try:
-    unparse
-except NameError:
-    from astunparse import unparse
-
-from ..util import CompilingNodeTransformer, CompilingNodeVisitor, OPSHIN_LOGGER
-from ..type_inference import INITIAL_SCOPE
-
-"""
-Pre-evaluates constant statements
-"""
-
-ACCEPTED_ATOMIC_TYPES = [
-    int,
-    str,
-    bytes,
-    type(None),
-    bool,
-]
-
-SAFE_GLOBALS_LIST = [
-    abs,
-    all,
-    any,
-    ascii,
-    bin,
-    bool,
-    bytes,
-    bytearray,
-    callable,
-    chr,
-    classmethod,
-    compile,
-    complex,
-    delattr,
-    dict,
-    dir,
-    divmod,
-    enumerate,
-    filter,
-    float,
-    format,
-    frozenset,
-    getattr,
-    hasattr,
-    hash,
-    hex,
-    id,
-    input,
-    int,
-    isinstance,
-    issubclass,
-    iter,
-    len,
-    list,
-    map,
-    max,
-    min,
-    next,
-    object,
-    oct,
-    open,
-    ord,
-    pow,
-    print,
-    property,
-    range,
-    repr,
-    reversed,
-    round,
-    set,
-    setattr,
-    slice,
-    sorted,
-    staticmethod,
-    str,
-    sum,
-    super,
-    tuple,
-    type,
-    vars,
-    zip,
-]
-SAFE_GLOBALS = {x.__name__: x for x in SAFE_GLOBALS_LIST}
-
-
-class ShallowNameDefCollector(CompilingNodeVisitor):
-    step = "Collecting occuring variable names"
-
-    def __init__(self):
-        self.vars = OrderedSet()
-
-    def visit_Name(self, node: Name) -> None:
-        if isinstance(node.ctx, Store):
-            self.vars.add(node.id)
-
-    def visit_ClassDef(self, node: ClassDef):
-        self.vars.add(node.name)
-        # ignore the content (i.e. attribute names) of class definitions
-
-    def visit_FunctionDef(self, node: FunctionDef):
-        self.vars.add(node.name)
-        # ignore the recursive stuff
-
-
-class DefinedTimesVisitor(CompilingNodeVisitor):
-    step = "Collecting how often variables are written"
-
-    def __init__(self):
-        self.vars = defaultdict(int)
-
-    def visit_For(self, node: For) -> None:
-        # visit twice to have all names bumped to min 2 assignments
-        self.generic_visit(node)
-        self.generic_visit(node)
-        return
-        # TODO future items: use this together with guaranteed available
-        # visit twice to have this name bumped to min 2 assignments
-        self.visit(node.target)
-        # visit the whole function
-        self.generic_visit(node)
-
-    def visit_While(self, node: While) -> None:
-        # visit twice to have all names bumped to min 2 assignments
-        self.generic_visit(node)
-        self.generic_visit(node)
-        return
-        # TODO future items: use this together with guaranteed available
-
-    def visit_If(self, node: If) -> None:
-        # TODO future items: use this together with guaranteed available
-        # visit twice to have all names bumped to min 2 assignments
-        self.generic_visit(node)
-        self.generic_visit(node)
-
-    def visit_Name(self, node: Name) -> None:
-        if isinstance(node.ctx, Store):
-            self.vars[node.id] += 1
-
-    def visit_ClassDef(self, node: ClassDef):
-        self.vars[node.name] += 1
-        # ignore the content (i.e. attribute names) of class definitions
-
-    def visit_FunctionDef(self, node: FunctionDef):
-        self.vars[node.name] += 1
-        # visit arguments twice, they are generally assigned more than once
-        for arg in node.args.args:
-            self.vars[arg.arg] += 2
-        self.generic_visit(node)
-
-    def visit_Import(self, node: Import):
-        for n in node.names:
-            self.vars[n] += 1
-
-    def visit_ImportFrom(self, node: ImportFrom):
-        for n in node.names:
-            self.vars[n] += 1
-
-
-class OptimizeConstantFolding(CompilingNodeTransformer):
-    step = "Constant folding"
-
-    def __init__(self):
-        self.scopes_visible = [
-            OrderedSet(INITIAL_SCOPE.keys()).difference(SAFE_GLOBALS.keys())
-        ]
-        self.scopes_constants = [dict()]
-        self.constants = OrderedSet()
-
-    def enter_scope(self):
-        self.scopes_visible.append(OrderedSet())
-        self.scopes_constants.append(dict())
-
-    def add_var_visible(self, var: str):
-        self.scopes_visible[-1].add(var)
-
-    def add_vars_visible(self, var: typing.Iterable[str]):
-        self.scopes_visible[-1].update(var)
-
-    def add_constant(self, var: str, value: typing.Any):
-        self.scopes_constants[-1][var] = value
-
-    def visible_vars(self):
-        res_set = OrderedSet()
-        for s in self.scopes_visible:
-            res_set.update(s)
-        return res_set
-
-    def _constant_vars(self):
-        res_d = {}
-        for s in self.scopes_constants:
-            res_d.update(s)
-        return res_d
-
-    def exit_scope(self):
-        self.scopes_visible.pop(-1)
-        self.scopes_constants.pop(-1)
-
-    def _non_overwritten_globals(self):
-        overwritten_vars = self.visible_vars()
-
-        def err():
-            raise ValueError("Was overwritten!")
-
-        non_overwritten_globals = {
-            k: (v if k not in overwritten_vars else err)
-            for k, v in SAFE_GLOBALS.items()
-        }
-        return non_overwritten_globals
-
-    def update_constants(self, node):
-        a = self._non_overwritten_globals()
-        a.update(self._constant_vars())
-        g = a
-        l = {}
-        try:
-            exec(unparse(node), g, l)
-        except Exception as e:
-            OPSHIN_LOGGER.debug(e)
-        else:
-            # the class is defined and added to the globals
-            self.scopes_constants[-1].update(l)
-
-    def visit_Module(self, node: Module) -> Module:
-        self.enter_scope()
-        def_vars_collector = ShallowNameDefCollector()
-        def_vars_collector.visit(node)
-        def_vars = def_vars_collector.vars
-        self.add_vars_visible(def_vars)
-
-        constant_collector = DefinedTimesVisitor()
-        constant_collector.visit(node)
-        constants = constant_collector.vars
-        # if it is only assigned exactly once, it must be a constant (due to immutability)
-        self.constants = {c for c, i in constants.items() if i == 1}
-
-        res = self.generic_visit(node)
-        self.exit_scope()
-        return res
-
-    def visit_FunctionDef(self, node: FunctionDef) -> FunctionDef:
-        self.add_var_visible(node.name)
-        if node.name in self.constants:
-            a = self._non_overwritten_globals()
-            a.update(self._constant_vars())
-            g = a
-            try:
-                # we need to pass the global dict as local dict here to make closures possible (rec functions)
-                exec(unparse(node), g, g)
-            except Exception as e:
-                OPSHIN_LOGGER.debug(e)
-            else:
-                # the class is defined and added to the globals
-                self.scopes_constants[-1][node.name] = g[node.name]
-
-        self.enter_scope()
-        self.add_vars_visible(arg.arg for arg in node.args.args)
-        def_vars_collector = ShallowNameDefCollector()
-        for s in node.body:
-            def_vars_collector.visit(s)
-        def_vars = def_vars_collector.vars
-        self.add_vars_visible(def_vars)
-
-        res_node = self.generic_visit(node)
-        self.exit_scope()
-        return res_node
-
-    def visit_ClassDef(self, node: ClassDef):
-        if node.name in self.constants:
-            self.update_constants(node)
-        return node
-
-    def visit_ImportFrom(self, node: ImportFrom):
-        if all(n in self.constants for n in node.names):
-            self.update_constants(node)
-        return node
-
-    def visit_Import(self, node: Import):
-        if all(n in self.constants for n in node.names):
-            self.update_constants(node)
-        return node
-
-    def visit_Assign(self, node: Assign):
-        if len(node.targets) != 1:
-            return node
-        target = node.targets[0]
-        if not isinstance(target, Name):
-            return node
-
-        if target.id in self.constants:
-            self.update_constants(node)
-        node.value = self.visit(node.value)
-        return node
-
-    def visit_AnnAssign(self, node: AnnAssign):
-        target = node.target
-        if not isinstance(target, Name):
-            return node
-
-        if target.id in self.constants:
-            self.update_constants(node)
-        node.value = self.visit(node.value)
-        return node
-
-    def generic_visit(self, node: AST):
-        node = super().generic_visit(node)
-        if not isinstance(node, expr):
-            # only evaluate expressions, not statements
-            return node
-        if isinstance(node, Constant):
-            # prevents unneccessary computations
-            return node
-        try:
-            node_source = unparse(node)
-        except Exception as e:
-            OPSHIN_LOGGER.debug("Error when trying to unparse node: %s", e)
-            return node
-        if "print(" in node_source:
-            # do not optimize away print statements
-            return node
-        try:
-            # we add preceding constant plutusdata definitions here!
-            g = self._non_overwritten_globals()
-            l = self._constant_vars()
-            node_eval = eval(node_source, g, l)
-        except Exception as e:
-            OPSHIN_LOGGER.debug("Error trying to evaluate node: %s", e)
-            return node
-
-        if any(
-            isinstance(node_eval, t)
-            for t in ACCEPTED_ATOMIC_TYPES + [list, dict, PlutusData]
-        ) and not (node_eval == [] or node_eval == {}):
-            new_node = Constant(node_eval, None)
-            copy_location(new_node, node)
-            return new_node
-        return node
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class DefinedTimesVisitor -
-
-

A node visitor base class that walks the abstract syntax tree and calls a -visitor function for every node found. -This function may return a value -which is forwarded by the visit method.

-

This class is meant to be subclassed, with the subclass adding visitor -methods.

-

Per default the visitor functions for the nodes are 'visit_' + -class name of the node. -So a TryFinally node visit function would -be visit_TryFinally. -This behavior can be changed by overriding -the visit method. -If no visitor function exists for a node -(return value None) the generic_visit visitor is used instead.

-

Don't use the NodeVisitor if you want to apply changes to nodes during -traversing. -For this a special visitor exists (NodeTransformer) that -allows modifications.

-
- -Expand source code - -
class DefinedTimesVisitor(CompilingNodeVisitor):
-    step = "Collecting how often variables are written"
-
-    def __init__(self):
-        self.vars = defaultdict(int)
-
-    def visit_For(self, node: For) -> None:
-        # visit twice to have all names bumped to min 2 assignments
-        self.generic_visit(node)
-        self.generic_visit(node)
-        return
-        # TODO future items: use this together with guaranteed available
-        # visit twice to have this name bumped to min 2 assignments
-        self.visit(node.target)
-        # visit the whole function
-        self.generic_visit(node)
-
-    def visit_While(self, node: While) -> None:
-        # visit twice to have all names bumped to min 2 assignments
-        self.generic_visit(node)
-        self.generic_visit(node)
-        return
-        # TODO future items: use this together with guaranteed available
-
-    def visit_If(self, node: If) -> None:
-        # TODO future items: use this together with guaranteed available
-        # visit twice to have all names bumped to min 2 assignments
-        self.generic_visit(node)
-        self.generic_visit(node)
-
-    def visit_Name(self, node: Name) -> None:
-        if isinstance(node.ctx, Store):
-            self.vars[node.id] += 1
-
-    def visit_ClassDef(self, node: ClassDef):
-        self.vars[node.name] += 1
-        # ignore the content (i.e. attribute names) of class definitions
-
-    def visit_FunctionDef(self, node: FunctionDef):
-        self.vars[node.name] += 1
-        # visit arguments twice, they are generally assigned more than once
-        for arg in node.args.args:
-            self.vars[arg.arg] += 2
-        self.generic_visit(node)
-
-    def visit_Import(self, node: Import):
-        for n in node.names:
-            self.vars[n] += 1
-
-    def visit_ImportFrom(self, node: ImportFrom):
-        for n in node.names:
-            self.vars[n] += 1
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeVisitor.visit -

-

Visit a node.

-
-
-def visit_ClassDef(self, node: ast.ClassDef) -
-
-
-
-
-def visit_For(self, node: ast.For) ‑> None -
-
-
-
-
-def visit_FunctionDef(self, node: ast.FunctionDef) -
-
-
-
-
-def visit_If(self, node: ast.If) ‑> None -
-
-
-
-
-def visit_Import(self, node: ast.Import) -
-
-
-
-
-def visit_ImportFrom(self, node: ast.ImportFrom) -
-
-
-
-
-def visit_Name(self, node: ast.Name) ‑> None -
-
-
-
-
-def visit_While(self, node: ast.While) ‑> None -
-
-
-
-
-
-
-class OptimizeConstantFolding -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class OptimizeConstantFolding(CompilingNodeTransformer):
-    step = "Constant folding"
-
-    def __init__(self):
-        self.scopes_visible = [
-            OrderedSet(INITIAL_SCOPE.keys()).difference(SAFE_GLOBALS.keys())
-        ]
-        self.scopes_constants = [dict()]
-        self.constants = OrderedSet()
-
-    def enter_scope(self):
-        self.scopes_visible.append(OrderedSet())
-        self.scopes_constants.append(dict())
-
-    def add_var_visible(self, var: str):
-        self.scopes_visible[-1].add(var)
-
-    def add_vars_visible(self, var: typing.Iterable[str]):
-        self.scopes_visible[-1].update(var)
-
-    def add_constant(self, var: str, value: typing.Any):
-        self.scopes_constants[-1][var] = value
-
-    def visible_vars(self):
-        res_set = OrderedSet()
-        for s in self.scopes_visible:
-            res_set.update(s)
-        return res_set
-
-    def _constant_vars(self):
-        res_d = {}
-        for s in self.scopes_constants:
-            res_d.update(s)
-        return res_d
-
-    def exit_scope(self):
-        self.scopes_visible.pop(-1)
-        self.scopes_constants.pop(-1)
-
-    def _non_overwritten_globals(self):
-        overwritten_vars = self.visible_vars()
-
-        def err():
-            raise ValueError("Was overwritten!")
-
-        non_overwritten_globals = {
-            k: (v if k not in overwritten_vars else err)
-            for k, v in SAFE_GLOBALS.items()
-        }
-        return non_overwritten_globals
-
-    def update_constants(self, node):
-        a = self._non_overwritten_globals()
-        a.update(self._constant_vars())
-        g = a
-        l = {}
-        try:
-            exec(unparse(node), g, l)
-        except Exception as e:
-            OPSHIN_LOGGER.debug(e)
-        else:
-            # the class is defined and added to the globals
-            self.scopes_constants[-1].update(l)
-
-    def visit_Module(self, node: Module) -> Module:
-        self.enter_scope()
-        def_vars_collector = ShallowNameDefCollector()
-        def_vars_collector.visit(node)
-        def_vars = def_vars_collector.vars
-        self.add_vars_visible(def_vars)
-
-        constant_collector = DefinedTimesVisitor()
-        constant_collector.visit(node)
-        constants = constant_collector.vars
-        # if it is only assigned exactly once, it must be a constant (due to immutability)
-        self.constants = {c for c, i in constants.items() if i == 1}
-
-        res = self.generic_visit(node)
-        self.exit_scope()
-        return res
-
-    def visit_FunctionDef(self, node: FunctionDef) -> FunctionDef:
-        self.add_var_visible(node.name)
-        if node.name in self.constants:
-            a = self._non_overwritten_globals()
-            a.update(self._constant_vars())
-            g = a
-            try:
-                # we need to pass the global dict as local dict here to make closures possible (rec functions)
-                exec(unparse(node), g, g)
-            except Exception as e:
-                OPSHIN_LOGGER.debug(e)
-            else:
-                # the class is defined and added to the globals
-                self.scopes_constants[-1][node.name] = g[node.name]
-
-        self.enter_scope()
-        self.add_vars_visible(arg.arg for arg in node.args.args)
-        def_vars_collector = ShallowNameDefCollector()
-        for s in node.body:
-            def_vars_collector.visit(s)
-        def_vars = def_vars_collector.vars
-        self.add_vars_visible(def_vars)
-
-        res_node = self.generic_visit(node)
-        self.exit_scope()
-        return res_node
-
-    def visit_ClassDef(self, node: ClassDef):
-        if node.name in self.constants:
-            self.update_constants(node)
-        return node
-
-    def visit_ImportFrom(self, node: ImportFrom):
-        if all(n in self.constants for n in node.names):
-            self.update_constants(node)
-        return node
-
-    def visit_Import(self, node: Import):
-        if all(n in self.constants for n in node.names):
-            self.update_constants(node)
-        return node
-
-    def visit_Assign(self, node: Assign):
-        if len(node.targets) != 1:
-            return node
-        target = node.targets[0]
-        if not isinstance(target, Name):
-            return node
-
-        if target.id in self.constants:
-            self.update_constants(node)
-        node.value = self.visit(node.value)
-        return node
-
-    def visit_AnnAssign(self, node: AnnAssign):
-        target = node.target
-        if not isinstance(target, Name):
-            return node
-
-        if target.id in self.constants:
-            self.update_constants(node)
-        node.value = self.visit(node.value)
-        return node
-
-    def generic_visit(self, node: AST):
-        node = super().generic_visit(node)
-        if not isinstance(node, expr):
-            # only evaluate expressions, not statements
-            return node
-        if isinstance(node, Constant):
-            # prevents unneccessary computations
-            return node
-        try:
-            node_source = unparse(node)
-        except Exception as e:
-            OPSHIN_LOGGER.debug("Error when trying to unparse node: %s", e)
-            return node
-        if "print(" in node_source:
-            # do not optimize away print statements
-            return node
-        try:
-            # we add preceding constant plutusdata definitions here!
-            g = self._non_overwritten_globals()
-            l = self._constant_vars()
-            node_eval = eval(node_source, g, l)
-        except Exception as e:
-            OPSHIN_LOGGER.debug("Error trying to evaluate node: %s", e)
-            return node
-
-        if any(
-            isinstance(node_eval, t)
-            for t in ACCEPTED_ATOMIC_TYPES + [list, dict, PlutusData]
-        ) and not (node_eval == [] or node_eval == {}):
-            new_node = Constant(node_eval, None)
-            copy_location(new_node, node)
-            return new_node
-        return node
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def add_constant(self, var: str, value: Any) -
-
-
-
-
-def add_var_visible(self, var: str) -
-
-
-
-
-def add_vars_visible(self, var: Iterable[str]) -
-
-
-
-
-def enter_scope(self) -
-
-
-
-
-def exit_scope(self) -
-
-
-
-
-def generic_visit(self, node: ast.AST) -
-
-

Called if no explicit visitor function exists for a node.

-
-
-def update_constants(self, node) -
-
-
-
-
-def visible_vars(self) -
-
-
-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_AnnAssign(self, node: ast.AnnAssign) -
-
-
-
-
-def visit_Assign(self, node: ast.Assign) -
-
-
-
-
-def visit_ClassDef(self, node: ast.ClassDef) -
-
-
-
-
-def visit_FunctionDef(self, node: ast.FunctionDef) ‑> ast.FunctionDef -
-
-
-
-
-def visit_Import(self, node: ast.Import) -
-
-
-
-
-def visit_ImportFrom(self, node: ast.ImportFrom) -
-
-
-
-
-def visit_Module(self, node: ast.Module) ‑> ast.Module -
-
-
-
-
-
-
-class ShallowNameDefCollector -
-
-

A node visitor base class that walks the abstract syntax tree and calls a -visitor function for every node found. -This function may return a value -which is forwarded by the visit method.

-

This class is meant to be subclassed, with the subclass adding visitor -methods.

-

Per default the visitor functions for the nodes are 'visit_' + -class name of the node. -So a TryFinally node visit function would -be visit_TryFinally. -This behavior can be changed by overriding -the visit method. -If no visitor function exists for a node -(return value None) the generic_visit visitor is used instead.

-

Don't use the NodeVisitor if you want to apply changes to nodes during -traversing. -For this a special visitor exists (NodeTransformer) that -allows modifications.

-
- -Expand source code - -
class ShallowNameDefCollector(CompilingNodeVisitor):
-    step = "Collecting occuring variable names"
-
-    def __init__(self):
-        self.vars = OrderedSet()
-
-    def visit_Name(self, node: Name) -> None:
-        if isinstance(node.ctx, Store):
-            self.vars.add(node.id)
-
-    def visit_ClassDef(self, node: ClassDef):
-        self.vars.add(node.name)
-        # ignore the content (i.e. attribute names) of class definitions
-
-    def visit_FunctionDef(self, node: FunctionDef):
-        self.vars.add(node.name)
-        # ignore the recursive stuff
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeVisitor.visit -

-

Visit a node.

-
-
-def visit_ClassDef(self, node: ast.ClassDef) -
-
-
-
-
-def visit_FunctionDef(self, node: ast.FunctionDef) -
-
-
-
-
-def visit_Name(self, node: ast.Name) ‑> None -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/optimize/optimize_remove_comments.html b/docs/opshin/optimize/optimize_remove_comments.html deleted file mode 100644 index 4e1ec73c..00000000 --- a/docs/opshin/optimize/optimize_remove_comments.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - - -opshin.optimize.optimize_remove_comments API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.optimize.optimize_remove_comments

-
-
-
- -Expand source code - -
from ast import *
-
-from ..util import CompilingNodeTransformer
-
-"""
-Removes expressions that return constants in sequences of statements (i.e. string comments)
-"""
-
-
-class OptimizeRemoveDeadconstants(CompilingNodeTransformer):
-    step = "Removing constants (i.e. string comments)"
-
-    def visit_Expr(self, node: Expr):
-        if isinstance(node.value, Constant):
-            return None
-        return node
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class OptimizeRemoveDeadconstants -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class OptimizeRemoveDeadconstants(CompilingNodeTransformer):
-    step = "Removing constants (i.e. string comments)"
-
-    def visit_Expr(self, node: Expr):
-        if isinstance(node.value, Constant):
-            return None
-        return node
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Expr(self, node: ast.Expr) -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/optimize/optimize_remove_deadvars.html b/docs/opshin/optimize/optimize_remove_deadvars.html deleted file mode 100644 index 7fd4f316..00000000 --- a/docs/opshin/optimize/optimize_remove_deadvars.html +++ /dev/null @@ -1,881 +0,0 @@ - - - - - - - - -opshin.optimize.optimize_remove_deadvars API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.optimize.optimize_remove_deadvars

-
-
-
- -Expand source code - -
from ast import *
-from copy import copy
-from collections import defaultdict
-
-from ordered_set import OrderedSet
-
-from ..util import CompilingNodeVisitor, CompilingNodeTransformer
-from ..type_inference import INITIAL_SCOPE
-from ..typed_ast import TypedAnnAssign, TypedFunctionDef, TypedClassDef, TypedName
-
-"""
-Removes assignments to variables that are never read
-"""
-
-
-class NameLoadCollector(CompilingNodeVisitor):
-    step = "Collecting used variables"
-
-    def __init__(self):
-        self.loaded = defaultdict(int)
-
-    def visit_Name(self, node: TypedName) -> None:
-        if isinstance(node.ctx, Load):
-            self.loaded[node.id] += 1
-
-    def visit_ClassDef(self, node: TypedClassDef):
-        # ignore the content (i.e. attribute names) of class definitions
-        pass
-
-    def visit_FunctionDef(self, node: TypedFunctionDef):
-        # ignore the type hints of function arguments
-        for s in node.body:
-            self.visit(s)
-        for v in node.typ.typ.bound_vars.keys():
-            self.loaded[v] += 1
-        if node.typ.typ.bind_self is not None:
-            self.loaded[node.typ.typ.bind_self] += 1
-
-
-class SafeOperationVisitor(CompilingNodeVisitor):
-    step = "Collecting computations that can not throw errors"
-
-    def __init__(self, guaranteed_names):
-        self.guaranteed_names = guaranteed_names
-
-    def generic_visit(self, node: AST) -> bool:
-        # generally every operation is unsafe except we whitelist it
-        return False
-
-    def visit_Lambda(self, node: Lambda) -> bool:
-        # lambda definition is fine as it actually doesn't compute anything
-        return True
-
-    def visit_Constant(self, node: Constant) -> bool:
-        # Constants can not fail
-        return True
-
-    def visit_RawPlutoExpr(self, node) -> bool:
-        # these expressions are not evaluated further
-        return True
-
-    def visit_Name(self, node: Name) -> bool:
-        return node.id in self.guaranteed_names
-
-
-class OptimizeRemoveDeadvars(CompilingNodeTransformer):
-    step = "Removing unused variables"
-
-    loaded_vars = None
-    # names that are guaranteed to be available to the current node
-    # this acts differently to the type inferencer! in particular, ite/while/for all produce their own scope
-    guaranteed_avail_names = [
-        list(INITIAL_SCOPE.keys()) + ["isinstance", "Union", "Dict", "List"]
-    ]
-
-    def guaranteed(self, name: str) -> bool:
-        name = name
-        for scope in reversed(self.guaranteed_avail_names):
-            if name in scope:
-                return True
-        return False
-
-    def enter_scope(self):
-        self.guaranteed_avail_names.append([])
-
-    def exit_scope(self):
-        self.guaranteed_avail_names.pop()
-
-    def set_guaranteed(self, name: str):
-        self.guaranteed_avail_names[-1].append(name)
-
-    def visit_Module(self, node: Module) -> Module:
-        # repeat until no more change due to removal
-        # i.e. b = a; c = b needs 2 passes to remove c and b
-        node_cp = copy(node)
-        self.loaded_vars = None
-        while True:
-            self.enter_scope()
-            # collect all variable names
-            collector = NameLoadCollector()
-            collector.visit(node_cp)
-            loaded_vars = OrderedSet(collector.loaded.keys()) | {"validator_0"}
-            # break if the set of loaded vars did not change -> set of vars to remove does also not change
-            if loaded_vars == self.loaded_vars:
-                break
-            # remove unloaded ones
-            self.loaded_vars = loaded_vars
-            node_cp.body = [self.visit(s) for s in node_cp.body]
-            self.exit_scope()
-        return node_cp
-
-    def visit_If(self, node: If):
-        node_cp = copy(node)
-        node_cp.test = self.visit(node.test)
-        self.enter_scope()
-        node_cp.body = [self.visit(s) for s in node.body]
-        scope_body_cp = self.guaranteed_avail_names[-1].copy()
-        self.exit_scope()
-        self.enter_scope()
-        node_cp.orelse = [self.visit(s) for s in node.orelse]
-        scope_orelse_cp = self.guaranteed_avail_names[-1].copy()
-        self.exit_scope()
-        # what remains after this in the scope is the intersection of both
-        for var in OrderedSet(scope_body_cp).intersection(scope_orelse_cp):
-            self.set_guaranteed(var)
-        return node_cp
-
-    def visit_While(self, node: While):
-        node_cp = copy(node)
-        node_cp.test = self.visit(node.test)
-        self.enter_scope()
-        node_cp.body = [self.visit(s) for s in node.body]
-        node_cp.orelse = [self.visit(s) for s in node.orelse]
-        self.exit_scope()
-        return node_cp
-
-    def visit_For(self, node: For):
-        node_cp = copy(node)
-        assert isinstance(node.target, Name), "Can only assign to singleton name"
-        self.enter_scope()
-        self.guaranteed(node.target.id)
-        node_cp.body = [self.visit(s) for s in node.body]
-        node_cp.orelse = [self.visit(s) for s in node.orelse]
-        self.exit_scope()
-        return node_cp
-
-    def visit_Assign(self, node: Assign):
-        if (
-            len(node.targets) != 1
-            or not isinstance(node.targets[0], Name)
-            or node.targets[0].id in self.loaded_vars
-            or not SafeOperationVisitor(sum(self.guaranteed_avail_names, [])).visit(
-                node.value
-            )
-        ):
-            for t in node.targets:
-                assert isinstance(
-                    t, Name
-                ), "Need to have name for dead var remover to work"
-                self.set_guaranteed(t.id)
-            return self.generic_visit(node)
-        return Pass()
-
-    def visit_AnnAssign(self, node: TypedAnnAssign):
-        if (
-            not isinstance(node.target, Name)
-            or node.target.id in self.loaded_vars
-            or not SafeOperationVisitor(sum(self.guaranteed_avail_names, [])).visit(
-                node.value
-            )
-            # only upcasts are safe!
-            or not node.target.typ >= node.value.typ
-        ):
-            assert isinstance(
-                node.target, Name
-            ), "Need to have assignments to name for dead var remover to work"
-            self.set_guaranteed(node.target.id)
-            return self.generic_visit(node)
-        return Pass()
-
-    def visit_ClassDef(self, node: ClassDef):
-        if node.name in self.loaded_vars:
-            self.set_guaranteed(node.name)
-            return node
-        return Pass()
-
-    def visit_FunctionDef(self, node: FunctionDef):
-        node_cp = copy(node)
-        if node.name in self.loaded_vars:
-            self.set_guaranteed(node.name)
-            self.enter_scope()
-            # variable names are available here
-            for a in node.args.args:
-                self.set_guaranteed(a.arg)
-            node_cp.body = [self.visit(s) for s in node.body]
-            self.exit_scope()
-            return node_cp
-        return Pass()
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class NameLoadCollector -
-
-

A node visitor base class that walks the abstract syntax tree and calls a -visitor function for every node found. -This function may return a value -which is forwarded by the visit method.

-

This class is meant to be subclassed, with the subclass adding visitor -methods.

-

Per default the visitor functions for the nodes are 'visit_' + -class name of the node. -So a TryFinally node visit function would -be visit_TryFinally. -This behavior can be changed by overriding -the visit method. -If no visitor function exists for a node -(return value None) the generic_visit visitor is used instead.

-

Don't use the NodeVisitor if you want to apply changes to nodes during -traversing. -For this a special visitor exists (NodeTransformer) that -allows modifications.

-
- -Expand source code - -
class NameLoadCollector(CompilingNodeVisitor):
-    step = "Collecting used variables"
-
-    def __init__(self):
-        self.loaded = defaultdict(int)
-
-    def visit_Name(self, node: TypedName) -> None:
-        if isinstance(node.ctx, Load):
-            self.loaded[node.id] += 1
-
-    def visit_ClassDef(self, node: TypedClassDef):
-        # ignore the content (i.e. attribute names) of class definitions
-        pass
-
-    def visit_FunctionDef(self, node: TypedFunctionDef):
-        # ignore the type hints of function arguments
-        for s in node.body:
-            self.visit(s)
-        for v in node.typ.typ.bound_vars.keys():
-            self.loaded[v] += 1
-        if node.typ.typ.bind_self is not None:
-            self.loaded[node.typ.typ.bind_self] += 1
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeVisitor.visit -

-

Visit a node.

-
-
-def visit_ClassDef(self, node: TypedClassDef) -
-
-
-
-
-def visit_FunctionDef(self, node: TypedFunctionDef) -
-
-
-
-
-def visit_Name(self, node: TypedName) ‑> None -
-
-
-
-
-
-
-class OptimizeRemoveDeadvars -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class OptimizeRemoveDeadvars(CompilingNodeTransformer):
-    step = "Removing unused variables"
-
-    loaded_vars = None
-    # names that are guaranteed to be available to the current node
-    # this acts differently to the type inferencer! in particular, ite/while/for all produce their own scope
-    guaranteed_avail_names = [
-        list(INITIAL_SCOPE.keys()) + ["isinstance", "Union", "Dict", "List"]
-    ]
-
-    def guaranteed(self, name: str) -> bool:
-        name = name
-        for scope in reversed(self.guaranteed_avail_names):
-            if name in scope:
-                return True
-        return False
-
-    def enter_scope(self):
-        self.guaranteed_avail_names.append([])
-
-    def exit_scope(self):
-        self.guaranteed_avail_names.pop()
-
-    def set_guaranteed(self, name: str):
-        self.guaranteed_avail_names[-1].append(name)
-
-    def visit_Module(self, node: Module) -> Module:
-        # repeat until no more change due to removal
-        # i.e. b = a; c = b needs 2 passes to remove c and b
-        node_cp = copy(node)
-        self.loaded_vars = None
-        while True:
-            self.enter_scope()
-            # collect all variable names
-            collector = NameLoadCollector()
-            collector.visit(node_cp)
-            loaded_vars = OrderedSet(collector.loaded.keys()) | {"validator_0"}
-            # break if the set of loaded vars did not change -> set of vars to remove does also not change
-            if loaded_vars == self.loaded_vars:
-                break
-            # remove unloaded ones
-            self.loaded_vars = loaded_vars
-            node_cp.body = [self.visit(s) for s in node_cp.body]
-            self.exit_scope()
-        return node_cp
-
-    def visit_If(self, node: If):
-        node_cp = copy(node)
-        node_cp.test = self.visit(node.test)
-        self.enter_scope()
-        node_cp.body = [self.visit(s) for s in node.body]
-        scope_body_cp = self.guaranteed_avail_names[-1].copy()
-        self.exit_scope()
-        self.enter_scope()
-        node_cp.orelse = [self.visit(s) for s in node.orelse]
-        scope_orelse_cp = self.guaranteed_avail_names[-1].copy()
-        self.exit_scope()
-        # what remains after this in the scope is the intersection of both
-        for var in OrderedSet(scope_body_cp).intersection(scope_orelse_cp):
-            self.set_guaranteed(var)
-        return node_cp
-
-    def visit_While(self, node: While):
-        node_cp = copy(node)
-        node_cp.test = self.visit(node.test)
-        self.enter_scope()
-        node_cp.body = [self.visit(s) for s in node.body]
-        node_cp.orelse = [self.visit(s) for s in node.orelse]
-        self.exit_scope()
-        return node_cp
-
-    def visit_For(self, node: For):
-        node_cp = copy(node)
-        assert isinstance(node.target, Name), "Can only assign to singleton name"
-        self.enter_scope()
-        self.guaranteed(node.target.id)
-        node_cp.body = [self.visit(s) for s in node.body]
-        node_cp.orelse = [self.visit(s) for s in node.orelse]
-        self.exit_scope()
-        return node_cp
-
-    def visit_Assign(self, node: Assign):
-        if (
-            len(node.targets) != 1
-            or not isinstance(node.targets[0], Name)
-            or node.targets[0].id in self.loaded_vars
-            or not SafeOperationVisitor(sum(self.guaranteed_avail_names, [])).visit(
-                node.value
-            )
-        ):
-            for t in node.targets:
-                assert isinstance(
-                    t, Name
-                ), "Need to have name for dead var remover to work"
-                self.set_guaranteed(t.id)
-            return self.generic_visit(node)
-        return Pass()
-
-    def visit_AnnAssign(self, node: TypedAnnAssign):
-        if (
-            not isinstance(node.target, Name)
-            or node.target.id in self.loaded_vars
-            or not SafeOperationVisitor(sum(self.guaranteed_avail_names, [])).visit(
-                node.value
-            )
-            # only upcasts are safe!
-            or not node.target.typ >= node.value.typ
-        ):
-            assert isinstance(
-                node.target, Name
-            ), "Need to have assignments to name for dead var remover to work"
-            self.set_guaranteed(node.target.id)
-            return self.generic_visit(node)
-        return Pass()
-
-    def visit_ClassDef(self, node: ClassDef):
-        if node.name in self.loaded_vars:
-            self.set_guaranteed(node.name)
-            return node
-        return Pass()
-
-    def visit_FunctionDef(self, node: FunctionDef):
-        node_cp = copy(node)
-        if node.name in self.loaded_vars:
-            self.set_guaranteed(node.name)
-            self.enter_scope()
-            # variable names are available here
-            for a in node.args.args:
-                self.set_guaranteed(a.arg)
-            node_cp.body = [self.visit(s) for s in node.body]
-            self.exit_scope()
-            return node_cp
-        return Pass()
-
-

Ancestors

- -

Class variables

-
-
var guaranteed_avail_names
-
-
-
-
var loaded_vars
-
-
-
-
var step
-
-
-
-
-

Methods

-
-
-def enter_scope(self) -
-
-
-
-
-def exit_scope(self) -
-
-
-
-
-def guaranteed(self, name: str) ‑> bool -
-
-
-
-
-def set_guaranteed(self, name: str) -
-
-
-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_AnnAssign(self, node: TypedAnnAssign) -
-
-
-
-
-def visit_Assign(self, node: ast.Assign) -
-
-
-
-
-def visit_ClassDef(self, node: ast.ClassDef) -
-
-
-
-
-def visit_For(self, node: ast.For) -
-
-
-
-
-def visit_FunctionDef(self, node: ast.FunctionDef) -
-
-
-
-
-def visit_If(self, node: ast.If) -
-
-
-
-
-def visit_Module(self, node: ast.Module) ‑> ast.Module -
-
-
-
-
-def visit_While(self, node: ast.While) -
-
-
-
-
-
-
-class SafeOperationVisitor -(guaranteed_names) -
-
-

A node visitor base class that walks the abstract syntax tree and calls a -visitor function for every node found. -This function may return a value -which is forwarded by the visit method.

-

This class is meant to be subclassed, with the subclass adding visitor -methods.

-

Per default the visitor functions for the nodes are 'visit_' + -class name of the node. -So a TryFinally node visit function would -be visit_TryFinally. -This behavior can be changed by overriding -the visit method. -If no visitor function exists for a node -(return value None) the generic_visit visitor is used instead.

-

Don't use the NodeVisitor if you want to apply changes to nodes during -traversing. -For this a special visitor exists (NodeTransformer) that -allows modifications.

-
- -Expand source code - -
class SafeOperationVisitor(CompilingNodeVisitor):
-    step = "Collecting computations that can not throw errors"
-
-    def __init__(self, guaranteed_names):
-        self.guaranteed_names = guaranteed_names
-
-    def generic_visit(self, node: AST) -> bool:
-        # generally every operation is unsafe except we whitelist it
-        return False
-
-    def visit_Lambda(self, node: Lambda) -> bool:
-        # lambda definition is fine as it actually doesn't compute anything
-        return True
-
-    def visit_Constant(self, node: Constant) -> bool:
-        # Constants can not fail
-        return True
-
-    def visit_RawPlutoExpr(self, node) -> bool:
-        # these expressions are not evaluated further
-        return True
-
-    def visit_Name(self, node: Name) -> bool:
-        return node.id in self.guaranteed_names
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def generic_visit(self, node: ast.AST) ‑> bool -
-
-

Called if no explicit visitor function exists for a node.

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeVisitor.visit -

-

Visit a node.

-
-
-def visit_Constant(self, node: ast.Constant) ‑> bool -
-
-
-
-
-def visit_Lambda(self, node: ast.Lambda) ‑> bool -
-
-
-
-
-def visit_Name(self, node: ast.Name) ‑> bool -
-
-
-
-
-def visit_RawPlutoExpr(self, node) ‑> bool -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/optimize/optimize_remove_pass.html b/docs/opshin/optimize/optimize_remove_pass.html deleted file mode 100644 index 8ec50343..00000000 --- a/docs/opshin/optimize/optimize_remove_pass.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - - -opshin.optimize.optimize_remove_pass API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.optimize.optimize_remove_pass

-
-
-
- -Expand source code - -
from ast import *
-
-from ..util import CompilingNodeTransformer
-
-"""
-Removes pass statements
-"""
-
-
-class OptimizeRemovePass(CompilingNodeTransformer):
-    step = "Removing occurrences of 'pass'"
-
-    def visit_Pass(self, node: Pass):
-        return None
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class OptimizeRemovePass -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class OptimizeRemovePass(CompilingNodeTransformer):
-    step = "Removing occurrences of 'pass'"
-
-    def visit_Pass(self, node: Pass):
-        return None
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Pass(self, node: ast.Pass) -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/prelude.html b/docs/opshin/prelude.html deleted file mode 100644 index bc09a3a2..00000000 --- a/docs/opshin/prelude.html +++ /dev/null @@ -1,519 +0,0 @@ - - - - - - - - -opshin.prelude API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.prelude

-
-
-
- -Expand source code - -
from opshin.ledger.api_v2 import *
-
-
-@dataclass(unsafe_hash=True)
-class Nothing(PlutusData):
-    """
-    Nothing, can be used to signify non-importance of a parameter to a function
-
-    Example value: Nothing()
-    """
-
-    # The maximimum constructor ID for simple cbor types, chosen to minimize probability of collision while keeping the corresponding cbor small
-    CONSTR_ID = 6
-
-
-@dataclass(unsafe_hash=True)
-class Token(PlutusData):
-    """
-    A token, represented by policy id and token name
-    """
-
-    CONSTR_ID = 0
-    policy_id: PolicyId
-    token_name: TokenName
-
-
-# Used to indicate that this contract does not expect a redeemer
-NoRedeemer = Nothing
-
-### Optimized methods for handling tokens at addresses
-
-
-def all_tokens_unlocked_from_address(
-    txins: List[TxInInfo], address: Address, token: Token
-) -> int:
-    """Returns how many tokens of specified type are unlocked from given address"""
-    return sum(
-        [
-            txi.resolved.value.get(token.policy_id, {b"": 0}).get(token.token_name, 0)
-            for txi in txins
-            if txi.resolved.address == address
-        ]
-    )
-
-
-def all_tokens_locked_at_address_with_datum(
-    txouts: List[TxOut], address: Address, token: Token, output_datum: OutputDatum
-) -> int:
-    """Returns how many tokens of specified type are locked at then given address with the specified datum"""
-    return sum(
-        [
-            txo.value.get(token.policy_id, {b"": 0}).get(token.token_name, 0)
-            for txo in txouts
-            if txo.address == address and txo.datum == output_datum
-        ]
-    )
-
-
-def all_tokens_locked_at_address(
-    txouts: List[TxOut], address: Address, token: Token
-) -> int:
-    """Returns how many tokens of specified type are locked at the given address"""
-    return sum(
-        [
-            txo.value.get(token.policy_id, {b"": 0}).get(token.token_name, 0)
-            for txo in txouts
-            if txo.address == address
-        ]
-    )
-
-
-def resolve_spent_utxo(inputs: List[TxInInfo], purpose: Spending) -> TxOut:
-    """Returns the UTxO whose spending should be validated"""
-    return [txi.resolved for txi in inputs if txi.out_ref == purpose.tx_out_ref][0]
-
-
-def resolve_datum_unsafe(txout: TxOut, tx_info: TxInfo) -> BuiltinData:
-    """
-    Returns the datum attached to a given transaction output, independent of whether it was inlined or embedded.
-    Raises an exception if no datum was attached.
-    """
-    attached_datum = txout.datum
-    if isinstance(attached_datum, SomeOutputDatumHash):
-        res = tx_info.data[attached_datum.datum_hash]
-    elif isinstance(attached_datum, SomeOutputDatum):
-        res = attached_datum.datum
-    else:
-        # no datum attached
-        assert False, "No datum was attached to the given transaction output"
-    return res
-
-
-def resolve_datum(
-    txout: TxOut, tx_info: TxInfo
-) -> Union[SomeOutputDatum, NoOutputDatum]:
-    """
-    Returns SomeOutputDatum with the datum attached to a given transaction output,
-    independent of whether it was inlined or embedded, if there was an attached datum.
-    Otherwise it returns NoOutputDatum.
-    """
-    attached_datum = txout.datum
-    if isinstance(attached_datum, SomeOutputDatumHash):
-        res: Union[SomeOutputDatum, NoOutputDatum] = SomeOutputDatum(
-            tx_info.data[attached_datum.datum_hash]
-        )
-    else:
-        res: Union[SomeOutputDatum, NoOutputDatum] = attached_datum
-    return res
-
-
-def own_spent_utxo(txins: List[TxInInfo], p: Spending) -> TxOut:
-    # obtain the resolved txout that is going to be spent from this contract address
-    for txi in txins:
-        if txi.out_ref == p.tx_out_ref:
-            own_txout = txi.resolved
-    # This throws a name error if the txout was not found
-    return own_txout
-
-
-def own_policy_id(own_spent_utxo: TxOut) -> PolicyId:
-    """
-    obtain the policy id for which this contract can validate minting/burning
-    """
-    cred = own_spent_utxo.address.payment_credential
-    if isinstance(cred, ScriptCredential):
-        policy_id = cred.credential_hash
-    # This throws a name error if the credential is not a ScriptCredential instance
-    return policy_id
-
-
-def own_address(own_policy_id: PolicyId) -> Address:
-    """
-    Computes the spending script address corresponding to the given policy ID
-    """
-    return Address(ScriptCredential(own_policy_id), NoStakingCredential())
-
-
-def token_present_in_inputs(token: Token, inputs: List[TxInInfo]):
-    """
-    Returns whether the given token is spent in one of the inputs of the transaction
-    """
-    return any(
-        [
-            x.resolved.value.get(token.policy_id, {b"": 0}).get(token.token_name, 0) > 0
-            for x in inputs
-        ]
-    )
-
-
-
-
-
-
-
-

Functions

-
-
-def all_tokens_locked_at_address(txouts: List[TxOut], address: Address, token: Token) ‑> int -
-
-

Returns how many tokens of specified type are locked at the given address

-
-
-def all_tokens_locked_at_address_with_datum(txouts: List[TxOut], address: Address, token: Token, output_datum: Union[NoOutputDatumSomeOutputDatumHashSomeOutputDatum]) ‑> int -
-
-

Returns how many tokens of specified type are locked at then given address with the specified datum

-
-
-def all_tokens_unlocked_from_address(txins: List[TxInInfo], address: Address, token: Token) ‑> int -
-
-

Returns how many tokens of specified type are unlocked from given address

-
-
-def own_address(own_policy_id: bytes) ‑> Address -
-
-

Computes the spending script address corresponding to the given policy ID

-
-
-def own_policy_id(own_spent_utxo: TxOut) ‑> bytes -
-
-

obtain the policy id for which this contract can validate minting/burning

-
-
-def own_spent_utxo(txins: List[TxInInfo], p: Spending) ‑> TxOut -
-
-
-
-
-def resolve_datum(txout: TxOut, tx_info: TxInfo) ‑> Union[SomeOutputDatumNoOutputDatum] -
-
-

Returns SomeOutputDatum with the datum attached to a given transaction output, -independent of whether it was inlined or embedded, if there was an attached datum. -Otherwise it returns NoOutputDatum.

-
-
-def resolve_datum_unsafe(txout: TxOut, tx_info: TxInfo) ‑> Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData] -
-
-

Returns the datum attached to a given transaction output, independent of whether it was inlined or embedded. -Raises an exception if no datum was attached.

-
-
-def resolve_spent_utxo(inputs: List[TxInInfo], purpose: Spending) ‑> TxOut -
-
-

Returns the UTxO whose spending should be validated

-
-
-def token_present_in_inputs(token: Token, inputs: List[TxInInfo]) -
-
-

Returns whether the given token is spent in one of the inputs of the transaction

-
-
-
-
-

Classes

-
-
-class Nothing -
-
-

Nothing, can be used to signify non-importance of a parameter to a function

-

Example value: Nothing()

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class Nothing(PlutusData):
-    """
-    Nothing, can be used to signify non-importance of a parameter to a function
-
-    Example value: Nothing()
-    """
-
-    # The maximimum constructor ID for simple cbor types, chosen to minimize probability of collision while keeping the corresponding cbor small
-    CONSTR_ID = 6
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-class NoRedeemer -
-
-

Nothing, can be used to signify non-importance of a parameter to a function

-

Example value: Nothing()

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class Nothing(PlutusData):
-    """
-    Nothing, can be used to signify non-importance of a parameter to a function
-
-    Example value: Nothing()
-    """
-
-    # The maximimum constructor ID for simple cbor types, chosen to minimize probability of collision while keeping the corresponding cbor small
-    CONSTR_ID = 6
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-class Token -(policy_id: bytes, token_name: bytes) -
-
-

A token, represented by policy id and token name

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class Token(PlutusData):
-    """
-    A token, represented by policy id and token name
-    """
-
-    CONSTR_ID = 0
-    policy_id: PolicyId
-    token_name: TokenName
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var policy_id : bytes
-
-
-
-
var token_name : bytes
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/index.html b/docs/opshin/rewrite/index.html deleted file mode 100644 index a9e72f52..00000000 --- a/docs/opshin/rewrite/index.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - -opshin.rewrite API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite

-
-
-
-
-

Sub-modules

-
-
opshin.rewrite.rewrite_augassign
-
-
-
-
opshin.rewrite.rewrite_cast_condition
-
-
-
-
opshin.rewrite.rewrite_comparison_chaining
-
-
-
-
opshin.rewrite.rewrite_empty_dicts
-
-
-
-
opshin.rewrite.rewrite_empty_lists
-
-
-
-
opshin.rewrite.rewrite_forbidden_overwrites
-
-
-
-
opshin.rewrite.rewrite_forbidden_return
-
-
-
-
opshin.rewrite.rewrite_import
-
-
-
-
opshin.rewrite.rewrite_import_dataclasses
-
-
-
-
opshin.rewrite.rewrite_import_hashlib
-
-
-
-
opshin.rewrite.rewrite_import_integrity_check
-
-
-
-
opshin.rewrite.rewrite_import_plutusdata
-
-
-
-
opshin.rewrite.rewrite_import_typing
-
-
-
-
opshin.rewrite.rewrite_import_uplc_builtins
-
-
-
-
opshin.rewrite.rewrite_inject_builtin_constr
-
-
-
-
opshin.rewrite.rewrite_inject_builtins
-
-
-
-
opshin.rewrite.rewrite_orig_name
-
-
-
-
opshin.rewrite.rewrite_remove_type_stuff
-
-
-
-
opshin.rewrite.rewrite_scoping
-
-
-
-
opshin.rewrite.rewrite_subscript38
-
-
-
-
opshin.rewrite.rewrite_tuple_assign
-
-
-
-
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_augassign.html b/docs/opshin/rewrite/rewrite_augassign.html deleted file mode 100644 index 0b95b0c2..00000000 --- a/docs/opshin/rewrite/rewrite_augassign.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_augassign API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_augassign

-
-
-
- -Expand source code - -
from ast import *
-from copy import copy
-
-from ..util import CompilingNodeTransformer
-
-"""
-Rewrites all occurences of augmented assignments
-into normal assignments.
-"""
-
-
-class RewriteAugAssign(CompilingNodeTransformer):
-    step = "Rewriting augmenting assignments"
-
-    def visit_AugAssign(self, node: AugAssign) -> Assign:
-        target_cp = copy(node.target)
-        target_cp.ctx = Load()
-        a = Assign(
-            [self.visit(node.target)],
-            BinOp(
-                self.visit(target_cp),
-                self.visit(node.op),
-                self.visit(node.value),
-            ),
-        )
-        return a
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteAugAssign -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteAugAssign(CompilingNodeTransformer):
-    step = "Rewriting augmenting assignments"
-
-    def visit_AugAssign(self, node: AugAssign) -> Assign:
-        target_cp = copy(node.target)
-        target_cp.ctx = Load()
-        a = Assign(
-            [self.visit(node.target)],
-            BinOp(
-                self.visit(target_cp),
-                self.visit(node.op),
-                self.visit(node.value),
-            ),
-        )
-        return a
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_AugAssign(self, node: ast.AugAssign) ‑> ast.Assign -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_cast_condition.html b/docs/opshin/rewrite/rewrite_cast_condition.html deleted file mode 100644 index 46708dbe..00000000 --- a/docs/opshin/rewrite/rewrite_cast_condition.html +++ /dev/null @@ -1,352 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_cast_condition API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_cast_condition

-
-
-
- -Expand source code - -
from copy import copy
-
-from ast import *
-
-from ..util import CompilingNodeTransformer
-
-"""
-Rewrites all occurences of conditions to an implicit cast to bool
-"""
-
-SPECIAL_BOOL = "~bool"
-
-
-class RewriteConditions(CompilingNodeTransformer):
-    step = "Rewriting conditions to bools"
-
-    def visit_Module(self, node: Module) -> Module:
-        node.body.insert(0, Assign([Name(SPECIAL_BOOL, Store())], Name("bool", Load())))
-        return self.generic_visit(node)
-
-    def visit_If(self, node: If) -> If:
-        if_cp = copy(node)
-        if_cp.test = Call(Name(SPECIAL_BOOL, Load()), [node.test], [])
-        return self.generic_visit(if_cp)
-
-    def visit_IfExp(self, node: IfExp) -> IfExp:
-        if_cp = copy(node)
-        if_cp.test = Call(Name(SPECIAL_BOOL, Load()), [node.test], [])
-        return self.generic_visit(if_cp)
-
-    def visit_While(self, node: While) -> While:
-        while_cp = copy(node)
-        while_cp.test = Call(Name(SPECIAL_BOOL, Load()), [node.test], [])
-        return self.generic_visit(while_cp)
-
-    def visit_BoolOp(self, node: BoolOp) -> BoolOp:
-        bo_cp = copy(node)
-        bo_cp.values = [
-            Call(Name(SPECIAL_BOOL, Load()), [self.visit(v)], []) for v in bo_cp.values
-        ]
-        return self.generic_visit(bo_cp)
-
-    def visit_Assert(self, node: Assert) -> Assert:
-        assert_cp = copy(node)
-        assert_cp.test = Call(Name(SPECIAL_BOOL, Load()), [node.test], [])
-        return self.generic_visit(assert_cp)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteConditions -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteConditions(CompilingNodeTransformer):
-    step = "Rewriting conditions to bools"
-
-    def visit_Module(self, node: Module) -> Module:
-        node.body.insert(0, Assign([Name(SPECIAL_BOOL, Store())], Name("bool", Load())))
-        return self.generic_visit(node)
-
-    def visit_If(self, node: If) -> If:
-        if_cp = copy(node)
-        if_cp.test = Call(Name(SPECIAL_BOOL, Load()), [node.test], [])
-        return self.generic_visit(if_cp)
-
-    def visit_IfExp(self, node: IfExp) -> IfExp:
-        if_cp = copy(node)
-        if_cp.test = Call(Name(SPECIAL_BOOL, Load()), [node.test], [])
-        return self.generic_visit(if_cp)
-
-    def visit_While(self, node: While) -> While:
-        while_cp = copy(node)
-        while_cp.test = Call(Name(SPECIAL_BOOL, Load()), [node.test], [])
-        return self.generic_visit(while_cp)
-
-    def visit_BoolOp(self, node: BoolOp) -> BoolOp:
-        bo_cp = copy(node)
-        bo_cp.values = [
-            Call(Name(SPECIAL_BOOL, Load()), [self.visit(v)], []) for v in bo_cp.values
-        ]
-        return self.generic_visit(bo_cp)
-
-    def visit_Assert(self, node: Assert) -> Assert:
-        assert_cp = copy(node)
-        assert_cp.test = Call(Name(SPECIAL_BOOL, Load()), [node.test], [])
-        return self.generic_visit(assert_cp)
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Assert(self, node: ast.Assert) ‑> ast.Assert -
-
-
-
-
-def visit_BoolOp(self, node: ast.BoolOp) ‑> ast.BoolOp -
-
-
-
-
-def visit_If(self, node: ast.If) ‑> ast.If -
-
-
-
-
-def visit_IfExp(self, node: ast.IfExp) ‑> ast.IfExp -
-
-
-
-
-def visit_Module(self, node: ast.Module) ‑> ast.Module -
-
-
-
-
-def visit_While(self, node: ast.While) ‑> ast.While -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_comparison_chaining.html b/docs/opshin/rewrite/rewrite_comparison_chaining.html deleted file mode 100644 index 416c2935..00000000 --- a/docs/opshin/rewrite/rewrite_comparison_chaining.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_comparison_chaining API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_comparison_chaining

-
-
-
- -Expand source code - -
from ast import *
-from copy import copy
-
-from ..util import CompilingNodeTransformer
-
-"""
-Rewrites all occurences of comparison chaining into normal comparisons.
-"""
-
-
-class RewriteComparisonChaining(CompilingNodeTransformer):
-    step = "Rewriting comparison chaining"
-
-    def visit_Compare(self, node: Compare) -> Compare:
-        if len(node.ops) <= 1:
-            return self.generic_visit(node)
-        all_comparators = [node.left] + node.comparators
-        compare_values = []
-        for comparator_left, comparator_right, op in zip(
-            all_comparators[:-1], all_comparators[1:], node.ops
-        ):
-            compare_values.append(
-                Compare(left=comparator_left, ops=[op], comparators=[comparator_right])
-            )
-        new_node = BoolOp(
-            op=And(),
-            values=compare_values,
-        )
-        return self.generic_visit(new_node)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteComparisonChaining -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteComparisonChaining(CompilingNodeTransformer):
-    step = "Rewriting comparison chaining"
-
-    def visit_Compare(self, node: Compare) -> Compare:
-        if len(node.ops) <= 1:
-            return self.generic_visit(node)
-        all_comparators = [node.left] + node.comparators
-        compare_values = []
-        for comparator_left, comparator_right, op in zip(
-            all_comparators[:-1], all_comparators[1:], node.ops
-        ):
-            compare_values.append(
-                Compare(left=comparator_left, ops=[op], comparators=[comparator_right])
-            )
-        new_node = BoolOp(
-            op=And(),
-            values=compare_values,
-        )
-        return self.generic_visit(new_node)
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Compare(self, node: ast.Compare) ‑> ast.Compare -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_empty_dicts.html b/docs/opshin/rewrite/rewrite_empty_dicts.html deleted file mode 100644 index 64cb59fb..00000000 --- a/docs/opshin/rewrite/rewrite_empty_dicts.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_empty_dicts API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_empty_dicts

-
-
-
- -Expand source code - -
import re
-from copy import copy
-from typing import Optional
-from enum import Enum
-
-from ..util import CompilingNodeTransformer
-from ..typed_ast import *
-
-"""
-Replaces empty dicts with UPLC constants of empty data pairs
-"""
-
-
-class RewriteEmptyDicts(CompilingNodeTransformer):
-    step = "Rewrite empty lists to uplc empty lists"
-
-    def visit_Dict(self, node: TypedDict):
-        if node.keys or node.values:
-            return node
-        return RawPlutoExpr(typ=node.typ, expr=plt.MkNilPairData(plt.Unit()))
-
-    def visit_Constant(self, node: TypedConstant):
-        if node.value != {}:
-            return node
-        return RawPlutoExpr(typ=node.typ, expr=plt.MkNilPairData(plt.Unit()))
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteEmptyDicts -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteEmptyDicts(CompilingNodeTransformer):
-    step = "Rewrite empty lists to uplc empty lists"
-
-    def visit_Dict(self, node: TypedDict):
-        if node.keys or node.values:
-            return node
-        return RawPlutoExpr(typ=node.typ, expr=plt.MkNilPairData(plt.Unit()))
-
-    def visit_Constant(self, node: TypedConstant):
-        if node.value != {}:
-            return node
-        return RawPlutoExpr(typ=node.typ, expr=plt.MkNilPairData(plt.Unit()))
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Constant(self, node: TypedConstant) -
-
-
-
-
-def visit_Dict(self, node: TypedDict) -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_empty_lists.html b/docs/opshin/rewrite/rewrite_empty_lists.html deleted file mode 100644 index c2006978..00000000 --- a/docs/opshin/rewrite/rewrite_empty_lists.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_empty_lists API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_empty_lists

-
-
-
- -Expand source code - -
import re
-from copy import copy
-from typing import Optional
-from enum import Enum
-
-from ..util import CompilingNodeTransformer
-from ..typed_ast import *
-
-"""
-Replaces empty lists with UPLC constants of empty lists
-"""
-
-
-class RewriteEmptyLists(CompilingNodeTransformer):
-    step = "Rewrite empty lists to uplc empty lists"
-
-    def visit_List(self, node: TypedList):
-        if node.elts:
-            return node
-        return RawPlutoExpr(typ=node.typ, expr=empty_list(node.typ.typ.typ))
-
-    def visit_Constant(self, node: TypedConstant):
-        if node.value != []:
-            return node
-        return RawPlutoExpr(typ=node.typ, expr=empty_list(node.typ.typ.typ))
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteEmptyLists -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteEmptyLists(CompilingNodeTransformer):
-    step = "Rewrite empty lists to uplc empty lists"
-
-    def visit_List(self, node: TypedList):
-        if node.elts:
-            return node
-        return RawPlutoExpr(typ=node.typ, expr=empty_list(node.typ.typ.typ))
-
-    def visit_Constant(self, node: TypedConstant):
-        if node.value != []:
-            return node
-        return RawPlutoExpr(typ=node.typ, expr=empty_list(node.typ.typ.typ))
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Constant(self, node: TypedConstant) -
-
-
-
-
-def visit_List(self, node: TypedList) -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_forbidden_overwrites.html b/docs/opshin/rewrite/rewrite_forbidden_overwrites.html deleted file mode 100644 index 20d0a0f3..00000000 --- a/docs/opshin/rewrite/rewrite_forbidden_overwrites.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_forbidden_overwrites API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_forbidden_overwrites

-
-
-
- -Expand source code - -
from ast import *
-
-from ..util import CompilingNodeTransformer
-
-"""
-Make sure that certain variable names may never be overwritten
-"""
-
-FORBIDDEN_NAMES = {
-    # type check
-    "isinstance",
-    # Type annotations
-    "List",
-    "Dict",
-    "Union",
-    # decorator and class name
-    "dataclass",
-    "PlutusData",
-    # special decorator marking wrapped builtins
-    "wraps_builtin",
-}
-
-
-class ForbiddenOverwriteError(ValueError):
-    pass
-
-
-class RewriteForbiddenOverwrites(CompilingNodeTransformer):
-    step = "Checking for forbidden name overwrites"
-
-    def visit_Name(self, node: Name) -> Name:
-        if isinstance(node.ctx, Store) and node.id in FORBIDDEN_NAMES:
-            raise ForbiddenOverwriteError(
-                f"It is not allowed to overwrite name {node.id}"
-            )
-        return node
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class ForbiddenOverwriteError -(*args, **kwargs) -
-
-

Inappropriate argument value (of correct type).

-
- -Expand source code - -
class ForbiddenOverwriteError(ValueError):
-    pass
-
-

Ancestors

-
    -
  • builtins.ValueError
  • -
  • builtins.Exception
  • -
  • builtins.BaseException
  • -
-
-
-class RewriteForbiddenOverwrites -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteForbiddenOverwrites(CompilingNodeTransformer):
-    step = "Checking for forbidden name overwrites"
-
-    def visit_Name(self, node: Name) -> Name:
-        if isinstance(node.ctx, Store) and node.id in FORBIDDEN_NAMES:
-            raise ForbiddenOverwriteError(
-                f"It is not allowed to overwrite name {node.id}"
-            )
-        return node
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Name(self, node: ast.Name) ‑> ast.Name -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_forbidden_return.html b/docs/opshin/rewrite/rewrite_forbidden_return.html deleted file mode 100644 index 8e8a7eb6..00000000 --- a/docs/opshin/rewrite/rewrite_forbidden_return.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_forbidden_return API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_forbidden_return

-
-
-
- -Expand source code - -
from ast import *
-
-from ..util import CompilingNodeTransformer
-
-"""
-Make sure that returns are not allowed in the outermost scope
-"""
-
-
-class RewriteForbiddenReturn(CompilingNodeTransformer):
-    step = "Checking for forbidden return statements"
-
-    def visit_Return(self, node):
-        raise SyntaxError(f"Forbidden return statement outside function")
-
-    def visit_FunctionDef(self, node: Name) -> Name:
-        # skip the content of the function definition
-        return node
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteForbiddenReturn -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteForbiddenReturn(CompilingNodeTransformer):
-    step = "Checking for forbidden return statements"
-
-    def visit_Return(self, node):
-        raise SyntaxError(f"Forbidden return statement outside function")
-
-    def visit_FunctionDef(self, node: Name) -> Name:
-        # skip the content of the function definition
-        return node
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_FunctionDef(self, node: ast.Name) ‑> ast.Name -
-
-
-
-
-def visit_Return(self, node) -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_import.html b/docs/opshin/rewrite/rewrite_import.html deleted file mode 100644 index 7ef60c87..00000000 --- a/docs/opshin/rewrite/rewrite_import.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_import API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_import

-
-
-
- -Expand source code - -
import ast
-
-import importlib
-import importlib.util
-import pathlib
-import typing
-import sys
-from ast import *
-from ordered_set import OrderedSet
-
-from ..util import CompilingNodeTransformer
-
-"""
-Checks that there was an import of dataclass if there are any class definitions
-"""
-
-
-def import_module(name, package=None):
-    """An approximate implementation of import."""
-    absolute_name = importlib.util.resolve_name(name, package)
-    try:
-        return sys.modules[absolute_name]
-    except KeyError:
-        pass
-
-    path = None
-    if "." in absolute_name:
-        parent_name, _, child_name = absolute_name.rpartition(".")
-        parent_module = import_module(parent_name)
-        path = parent_module.__spec__.submodule_search_locations
-    for finder in sys.meta_path:
-        spec = finder.find_spec(absolute_name, path)
-        if spec is not None:
-            break
-    else:
-        msg = f"No module named {absolute_name!r}"
-        raise ModuleNotFoundError(msg, name=absolute_name)
-    module = importlib.util.module_from_spec(spec)
-    sys.modules[absolute_name] = module
-    spec.loader.exec_module(module)
-    if path is not None:
-        setattr(parent_module, child_name, module)
-    return module
-
-
-class RewriteLocation(CompilingNodeTransformer):
-    def __init__(self, orig_node):
-        self.orig_node = orig_node
-
-    def visit(self, node):
-        node = ast.copy_location(node, self.orig_node)
-        return super().visit(node)
-
-
-class RewriteImport(CompilingNodeTransformer):
-    step = "Resolving imports"
-
-    def __init__(self, filename=None, package=None, resolved_imports=None):
-        self.filename = filename
-        self.package = package
-        self.resolved_imports = resolved_imports or OrderedSet()
-
-    def visit_ImportFrom(
-        self, node: ImportFrom
-    ) -> typing.Union[ImportFrom, typing.List[AST], None]:
-        if node.module in [
-            "pycardano",
-            "typing",
-            "dataclasses",
-            "hashlib",
-            "opshin.bridge",
-            "opshin.std.integrity",
-        ]:
-            return node
-        assert (
-            len(node.names) == 1
-        ), "The import must have the form 'from <pkg> import *'"
-        assert (
-            node.names[0].name == "*"
-        ), "The import must have the form 'from <pkg> import *'"
-        assert (
-            node.names[0].asname == None
-        ), "The import must have the form 'from <pkg> import *'"
-        # TODO set anchor point according to own package
-        if self.filename:
-            sys.path.append(str(pathlib.Path(self.filename).parent.absolute()))
-        module = import_module(node.module, self.package)
-        if self.filename:
-            sys.path.pop()
-        module_file = pathlib.Path(module.__file__)
-        if module_file.suffix == ".pyc":
-            module_file = module_file.with_suffix(".py")
-        if module_file in self.resolved_imports:
-            # Import was already resolved and its names are visible
-            return None
-        self.resolved_imports.add(module_file)
-        assert (
-            module_file.suffix == ".py"
-        ), "The import must import a single python file."
-        # visit the imported file again - make sure that recursive imports are resolved accordingly
-        with module_file.open("r") as fp:
-            module_content = fp.read()
-        resolved = parse(module_content, filename=module_file.name)
-        # annotate this to point to the original line number!
-        RewriteLocation(node).visit(resolved)
-        # recursively import all statements there
-        recursive_resolver = RewriteImport(
-            filename=str(module_file),
-            package=module.__package__,
-            resolved_imports=self.resolved_imports,
-        )
-        recursively_resolved: Module = recursive_resolver.visit(resolved)
-        self.resolved_imports.update(recursive_resolver.resolved_imports)
-        return recursively_resolved.body
-
-
-
-
-
-
-
-

Functions

-
-
-def import_module(name, package=None) -
-
-

An approximate implementation of import.

-
-
-
-
-

Classes

-
-
-class RewriteImport -(filename=None, package=None, resolved_imports=None) -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteImport(CompilingNodeTransformer):
-    step = "Resolving imports"
-
-    def __init__(self, filename=None, package=None, resolved_imports=None):
-        self.filename = filename
-        self.package = package
-        self.resolved_imports = resolved_imports or OrderedSet()
-
-    def visit_ImportFrom(
-        self, node: ImportFrom
-    ) -> typing.Union[ImportFrom, typing.List[AST], None]:
-        if node.module in [
-            "pycardano",
-            "typing",
-            "dataclasses",
-            "hashlib",
-            "opshin.bridge",
-            "opshin.std.integrity",
-        ]:
-            return node
-        assert (
-            len(node.names) == 1
-        ), "The import must have the form 'from <pkg> import *'"
-        assert (
-            node.names[0].name == "*"
-        ), "The import must have the form 'from <pkg> import *'"
-        assert (
-            node.names[0].asname == None
-        ), "The import must have the form 'from <pkg> import *'"
-        # TODO set anchor point according to own package
-        if self.filename:
-            sys.path.append(str(pathlib.Path(self.filename).parent.absolute()))
-        module = import_module(node.module, self.package)
-        if self.filename:
-            sys.path.pop()
-        module_file = pathlib.Path(module.__file__)
-        if module_file.suffix == ".pyc":
-            module_file = module_file.with_suffix(".py")
-        if module_file in self.resolved_imports:
-            # Import was already resolved and its names are visible
-            return None
-        self.resolved_imports.add(module_file)
-        assert (
-            module_file.suffix == ".py"
-        ), "The import must import a single python file."
-        # visit the imported file again - make sure that recursive imports are resolved accordingly
-        with module_file.open("r") as fp:
-            module_content = fp.read()
-        resolved = parse(module_content, filename=module_file.name)
-        # annotate this to point to the original line number!
-        RewriteLocation(node).visit(resolved)
-        # recursively import all statements there
-        recursive_resolver = RewriteImport(
-            filename=str(module_file),
-            package=module.__package__,
-            resolved_imports=self.resolved_imports,
-        )
-        recursively_resolved: Module = recursive_resolver.visit(resolved)
-        self.resolved_imports.update(recursive_resolver.resolved_imports)
-        return recursively_resolved.body
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_ImportFrom(self, node: ast.ImportFrom) ‑> Union[ast.ImportFrom, List[ast.AST], ForwardRef(None)] -
-
-
-
-
-
-
-class RewriteLocation -(orig_node) -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteLocation(CompilingNodeTransformer):
-    def __init__(self, orig_node):
-        self.orig_node = orig_node
-
-    def visit(self, node):
-        node = ast.copy_location(node, self.orig_node)
-        return super().visit(node)
-
-

Ancestors

- -

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_import_dataclasses.html b/docs/opshin/rewrite/rewrite_import_dataclasses.html deleted file mode 100644 index e461a595..00000000 --- a/docs/opshin/rewrite/rewrite_import_dataclasses.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_import_dataclasses API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_import_dataclasses

-
-
-
- -Expand source code - -
from ast import *
-from typing import Optional
-
-from ..util import CompilingNodeTransformer
-
-"""
-Checks that there was an import of dataclass if there are any class definitions
-"""
-
-
-class RewriteImportDataclasses(CompilingNodeTransformer):
-    step = "Resolving the import and usage of dataclass"
-
-    imports_dataclasses = False
-
-    def visit_ImportFrom(self, node: ImportFrom) -> Optional[ImportFrom]:
-        if node.module != "dataclasses":
-            return node
-        assert (
-            len(node.names) == 1
-        ), "The program must contain one 'from dataclasses import dataclass'"
-        for i, n in enumerate(["dataclass"]):
-            assert (
-                node.names[i].name == n
-            ), "The program must contain one 'from dataclasses import dataclass'"
-            assert (
-                node.names[i].asname == None
-            ), "The program must contain one 'from dataclasses import dataclass'"
-        self.imports_dataclasses = True
-        return None
-
-    def visit_ClassDef(self, node: ClassDef) -> ClassDef:
-        assert (
-            self.imports_dataclasses
-        ), "dataclasses must be imported in order to use datum classes"
-        assert (
-            len(node.decorator_list) == 1
-        ), "Class definitions must have the decorator @dataclass"
-        if isinstance(node.decorator_list[0], Call):
-            node_decorator = node.decorator_list[0].func
-        elif isinstance(node.decorator_list[0], Name):
-            node_decorator = node.decorator_list[0]
-        else:
-            raise AssertionError("Class definitions must have the decorator @dataclass")
-        assert isinstance(
-            node_decorator, Name
-        ), "Class definitions must have the decorator @dataclass"
-        assert (
-            node_decorator.id == "dataclass"
-        ), "Class definitions must have the decorator @dataclass"
-        return node
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteImportDataclasses -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteImportDataclasses(CompilingNodeTransformer):
-    step = "Resolving the import and usage of dataclass"
-
-    imports_dataclasses = False
-
-    def visit_ImportFrom(self, node: ImportFrom) -> Optional[ImportFrom]:
-        if node.module != "dataclasses":
-            return node
-        assert (
-            len(node.names) == 1
-        ), "The program must contain one 'from dataclasses import dataclass'"
-        for i, n in enumerate(["dataclass"]):
-            assert (
-                node.names[i].name == n
-            ), "The program must contain one 'from dataclasses import dataclass'"
-            assert (
-                node.names[i].asname == None
-            ), "The program must contain one 'from dataclasses import dataclass'"
-        self.imports_dataclasses = True
-        return None
-
-    def visit_ClassDef(self, node: ClassDef) -> ClassDef:
-        assert (
-            self.imports_dataclasses
-        ), "dataclasses must be imported in order to use datum classes"
-        assert (
-            len(node.decorator_list) == 1
-        ), "Class definitions must have the decorator @dataclass"
-        if isinstance(node.decorator_list[0], Call):
-            node_decorator = node.decorator_list[0].func
-        elif isinstance(node.decorator_list[0], Name):
-            node_decorator = node.decorator_list[0]
-        else:
-            raise AssertionError("Class definitions must have the decorator @dataclass")
-        assert isinstance(
-            node_decorator, Name
-        ), "Class definitions must have the decorator @dataclass"
-        assert (
-            node_decorator.id == "dataclass"
-        ), "Class definitions must have the decorator @dataclass"
-        return node
-
-

Ancestors

- -

Class variables

-
-
var imports_dataclasses
-
-
-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_ClassDef(self, node: ast.ClassDef) ‑> ast.ClassDef -
-
-
-
-
-def visit_ImportFrom(self, node: ast.ImportFrom) ‑> Optional[ast.ImportFrom] -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_import_hashlib.html b/docs/opshin/rewrite/rewrite_import_hashlib.html deleted file mode 100644 index 631c90aa..00000000 --- a/docs/opshin/rewrite/rewrite_import_hashlib.html +++ /dev/null @@ -1,617 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_import_hashlib API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_import_hashlib

-
-
-
- -Expand source code - -
from typing import Optional
-from enum import Enum, auto
-
-from ..util import CompilingNodeTransformer
-from ..typed_ast import *
-
-"""
-Checks that there was an import of dataclass if there are any class definitions
-"""
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class HashType(ClassType):
-    """A pseudo class that is the result of python hash functions that need a 'digest' call"""
-
-    def attribute_type(self, attr) -> "Type":
-        if attr == "digest":
-            return InstanceType(FunctionType(frozenlist([]), ByteStringInstanceType))
-        raise NotImplementedError("HashType only has attribute 'digest'")
-
-    def attribute(self, attr) -> plt.AST:
-        if attr == "digest":
-            return plt.Lambda(["self"], plt.Var("self"))
-        raise NotImplementedError("HashType only has attribute 'digest'")
-
-    def __ge__(self, other):
-        return isinstance(other, HashType)
-
-
-HashInstanceType = InstanceType(HashType())
-
-
-class PythonHashlib(Enum):
-    sha256 = auto()
-    sha3_256 = auto()
-    blake2b = auto()
-
-
-PythonHashlibTypes = {
-    PythonHashlib.sha256: InstanceType(
-        FunctionType(
-            frozenlist([ByteStringInstanceType]),
-            HashInstanceType,
-        )
-    ),
-    PythonHashlib.sha3_256: InstanceType(
-        FunctionType(
-            frozenlist([ByteStringInstanceType]),
-            HashInstanceType,
-        )
-    ),
-    PythonHashlib.blake2b: InstanceType(
-        FunctionType(
-            frozenlist([ByteStringInstanceType]),
-            HashInstanceType,
-        )
-    ),
-}
-
-PythonHashlibImpls = {
-    PythonHashlib.sha256: force_params(
-        plt.Lambda(["x"], plt.Lambda(["_"], plt.Sha2_256(plt.Var("x"))))
-    ),
-    PythonHashlib.sha3_256: force_params(
-        plt.Lambda(["x"], plt.Lambda(["_"], plt.Sha3_256(plt.Var("x"))))
-    ),
-    PythonHashlib.blake2b: force_params(
-        plt.Lambda(["x"], plt.Lambda(["_"], plt.Blake2b_256(plt.Var("x"))))
-    ),
-}
-
-
-class RewriteImportHashlib(CompilingNodeTransformer):
-    step = "Resolving imports and usage of hashlib"
-
-    imports_hashlib = False
-
-    def visit_ImportFrom(self, node: ImportFrom) -> typing.List[AST]:
-        if node.module != "hashlib":
-            return node
-        additional_assigns = []
-        for n in node.names:
-            imported_fun = None
-            for h in PythonHashlib:
-                if h.name == n.name:
-                    imported_fun = h
-            assert (
-                imported_fun is not None
-            ), f"Unsupported function import from hashlib '{n.name}"
-            typ = PythonHashlibTypes[imported_fun]
-            imported_name = n.name if n.asname is None else n.asname
-            additional_assigns.append(
-                TypedAssign(
-                    targets=[TypedName(id=imported_name, typ=typ, ctx=Store())],
-                    value=RawPlutoExpr(typ=typ, expr=PythonHashlibImpls[imported_fun]),
-                )
-            )
-        return additional_assigns
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class HashType -
-
-

A pseudo class that is the result of python hash functions that need a 'digest' call

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class HashType(ClassType):
-    """A pseudo class that is the result of python hash functions that need a 'digest' call"""
-
-    def attribute_type(self, attr) -> "Type":
-        if attr == "digest":
-            return InstanceType(FunctionType(frozenlist([]), ByteStringInstanceType))
-        raise NotImplementedError("HashType only has attribute 'digest'")
-
-    def attribute(self, attr) -> plt.AST:
-        if attr == "digest":
-            return plt.Lambda(["self"], plt.Var("self"))
-        raise NotImplementedError("HashType only has attribute 'digest'")
-
-    def __ge__(self, other):
-        return isinstance(other, HashType)
-
-

Ancestors

- -

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class PythonHashlib -(*args, **kwds) -
-
-

Create a collection of name/value pairs.

-

Example enumeration:

-
>>> class Color(Enum):
-...     RED = 1
-...     BLUE = 2
-...     GREEN = 3
-
-

Access them by:

-
    -
  • attribute access::
  • -
-
>>> Color.RED
-<Color.RED: 1>
-
-
    -
  • value lookup:
  • -
-
>>> Color(1)
-<Color.RED: 1>
-
-
    -
  • name lookup:
  • -
-
>>> Color['RED']
-<Color.RED: 1>
-
-

Enumerations can be iterated over, and know how many members they have:

-
>>> len(Color)
-3
-
-
>>> list(Color)
-[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
-
-

Methods can be added to enumerations, and members can have their own -attributes – see the documentation for details.

-
- -Expand source code - -
class PythonHashlib(Enum):
-    sha256 = auto()
-    sha3_256 = auto()
-    blake2b = auto()
-
-

Ancestors

-
    -
  • enum.Enum
  • -
-

Class variables

-
-
var blake2b
-
-
-
-
var sha256
-
-
-
-
var sha3_256
-
-
-
-
-
-
-class RewriteImportHashlib -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteImportHashlib(CompilingNodeTransformer):
-    step = "Resolving imports and usage of hashlib"
-
-    imports_hashlib = False
-
-    def visit_ImportFrom(self, node: ImportFrom) -> typing.List[AST]:
-        if node.module != "hashlib":
-            return node
-        additional_assigns = []
-        for n in node.names:
-            imported_fun = None
-            for h in PythonHashlib:
-                if h.name == n.name:
-                    imported_fun = h
-            assert (
-                imported_fun is not None
-            ), f"Unsupported function import from hashlib '{n.name}"
-            typ = PythonHashlibTypes[imported_fun]
-            imported_name = n.name if n.asname is None else n.asname
-            additional_assigns.append(
-                TypedAssign(
-                    targets=[TypedName(id=imported_name, typ=typ, ctx=Store())],
-                    value=RawPlutoExpr(typ=typ, expr=PythonHashlibImpls[imported_fun]),
-                )
-            )
-        return additional_assigns
-
-

Ancestors

- -

Class variables

-
-
var imports_hashlib
-
-
-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_ImportFrom(self, node: ast.ImportFrom) ‑> List[ast.AST] -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_import_integrity_check.html b/docs/opshin/rewrite/rewrite_import_integrity_check.html deleted file mode 100644 index 9e904e1b..00000000 --- a/docs/opshin/rewrite/rewrite_import_integrity_check.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_import_integrity_check API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_import_integrity_check

-
-
-
- -Expand source code - -
import re
-from copy import copy
-from typing import Optional
-from enum import Enum
-
-from ..type_inference import INITIAL_SCOPE
-from ..util import CompilingNodeTransformer
-from ..typed_ast import *
-
-"""
-Injects the integrity checker function if it is imported
-"""
-
-FunctionName = "check_integrity"
-
-
-class IntegrityCheckImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'integrity_check' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only check integrity of instances"
-        assert any(
-            isinstance(typ.typ, t) for t in (RecordType, UnionType)
-        ), "Can only check integrity of PlutusData and Union types"
-        return FunctionType(args, NoneInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only check integrity of instances"
-        return OLambda(
-            ["x"],
-            plt.Ite(
-                plt.EqualsData(
-                    OVar("x"),
-                    plt.Apply(arg.typ.copy_only_attributes(), OVar("x")),
-                ),
-                plt.Unit(),
-                plt.TraceError("ValueError: datum integrity check failed"),
-            ),
-        )
-
-
-class RewriteImportIntegrityCheck(CompilingNodeTransformer):
-    step = "Resolving imports and usage of integrity check"
-
-    def visit_ImportFrom(self, node: ImportFrom) -> Optional[AST]:
-        if node.module != "opshin.std.integrity":
-            return node
-        for n in node.names:
-            assert (
-                n.name == FunctionName
-            ), "Imports something other from the integrity check than the integrity check builtin"
-            renamed = n.asname if n.asname is not None else n.name
-            INITIAL_SCOPE[renamed] = InstanceType(
-                PolymorphicFunctionType(IntegrityCheckImpl())
-            )
-        return None
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class IntegrityCheckImpl -(*args, **kwargs) -
-
-
-
- -Expand source code - -
class IntegrityCheckImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'integrity_check' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only check integrity of instances"
-        assert any(
-            isinstance(typ.typ, t) for t in (RecordType, UnionType)
-        ), "Can only check integrity of PlutusData and Union types"
-        return FunctionType(args, NoneInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only check integrity of instances"
-        return OLambda(
-            ["x"],
-            plt.Ite(
-                plt.EqualsData(
-                    OVar("x"),
-                    plt.Apply(arg.typ.copy_only_attributes(), OVar("x")),
-                ),
-                plt.Unit(),
-                plt.TraceError("ValueError: datum integrity check failed"),
-            ),
-        )
-
-

Ancestors

- -

Methods

-
-
-def impl_from_args(self, args: List[Type]) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def type_from_args(self, args: List[Type]) ‑> FunctionType -
-
-
-
-
-
-
-class RewriteImportIntegrityCheck -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteImportIntegrityCheck(CompilingNodeTransformer):
-    step = "Resolving imports and usage of integrity check"
-
-    def visit_ImportFrom(self, node: ImportFrom) -> Optional[AST]:
-        if node.module != "opshin.std.integrity":
-            return node
-        for n in node.names:
-            assert (
-                n.name == FunctionName
-            ), "Imports something other from the integrity check than the integrity check builtin"
-            renamed = n.asname if n.asname is not None else n.name
-            INITIAL_SCOPE[renamed] = InstanceType(
-                PolymorphicFunctionType(IntegrityCheckImpl())
-            )
-        return None
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_ImportFrom(self, node: ast.ImportFrom) ‑> Optional[ast.AST] -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_import_plutusdata.html b/docs/opshin/rewrite/rewrite_import_plutusdata.html deleted file mode 100644 index 17d4b996..00000000 --- a/docs/opshin/rewrite/rewrite_import_plutusdata.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_import_plutusdata API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_import_plutusdata

-
-
-
- -Expand source code - -
from ast import *
-from typing import Optional
-
-from ..util import CompilingNodeTransformer
-
-"""
-Checks that there was an import of dataclass if there are any class definitions
-"""
-
-
-class RewriteImportPlutusData(CompilingNodeTransformer):
-    step = "Resolving imports and usage of PlutusData and Datum"
-
-    imports_plutus_data = False
-
-    def visit_ImportFrom(self, node: ImportFrom) -> Optional[ImportFrom]:
-        if node.module != "pycardano":
-            return node
-        assert (
-            len(node.names) == 2
-        ), "The program must contain one 'from pycardano import Datum as Anything, PlutusData'"
-        assert (
-            node.names[0].name == "Datum"
-        ), "The program must contain one 'from pycardano import Datum as Anything, PlutusData'"
-        assert (
-            node.names[0].asname == "Anything"
-        ), "The program must contain one 'from pycardano import Datum as Anything, PlutusData'"
-        assert (
-            node.names[1].name == "PlutusData"
-        ), "The program must contain one 'from pycardano import Datum as Anything, PlutusData'"
-        assert (
-            node.names[1].asname == None
-        ), "The program must contain one 'from pycardano import Datum as Anything, PlutusData'"
-        self.imports_plutus_data = True
-        return None
-
-    def visit_ClassDef(self, node: ClassDef) -> ClassDef:
-        assert (
-            len(node.decorator_list) == 1
-        ), "Class definitions must have no decorators but @dataclass"
-        assert (
-            len(node.bases) == 1
-        ), "Class definitions must inherit only from PlutusData"
-        assert isinstance(
-            node.bases[0], Name
-        ), "The inheritance must be direct, using the name PlutusData"
-        base: Name = node.bases[0]
-        assert base.id == "PlutusData", "Class definitions must inherit from PlutusData"
-        assert (
-            self.imports_plutus_data
-        ), "PlutusData must be imported in order to use datum classes"
-        return node
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteImportPlutusData -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteImportPlutusData(CompilingNodeTransformer):
-    step = "Resolving imports and usage of PlutusData and Datum"
-
-    imports_plutus_data = False
-
-    def visit_ImportFrom(self, node: ImportFrom) -> Optional[ImportFrom]:
-        if node.module != "pycardano":
-            return node
-        assert (
-            len(node.names) == 2
-        ), "The program must contain one 'from pycardano import Datum as Anything, PlutusData'"
-        assert (
-            node.names[0].name == "Datum"
-        ), "The program must contain one 'from pycardano import Datum as Anything, PlutusData'"
-        assert (
-            node.names[0].asname == "Anything"
-        ), "The program must contain one 'from pycardano import Datum as Anything, PlutusData'"
-        assert (
-            node.names[1].name == "PlutusData"
-        ), "The program must contain one 'from pycardano import Datum as Anything, PlutusData'"
-        assert (
-            node.names[1].asname == None
-        ), "The program must contain one 'from pycardano import Datum as Anything, PlutusData'"
-        self.imports_plutus_data = True
-        return None
-
-    def visit_ClassDef(self, node: ClassDef) -> ClassDef:
-        assert (
-            len(node.decorator_list) == 1
-        ), "Class definitions must have no decorators but @dataclass"
-        assert (
-            len(node.bases) == 1
-        ), "Class definitions must inherit only from PlutusData"
-        assert isinstance(
-            node.bases[0], Name
-        ), "The inheritance must be direct, using the name PlutusData"
-        base: Name = node.bases[0]
-        assert base.id == "PlutusData", "Class definitions must inherit from PlutusData"
-        assert (
-            self.imports_plutus_data
-        ), "PlutusData must be imported in order to use datum classes"
-        return node
-
-

Ancestors

- -

Class variables

-
-
var imports_plutus_data
-
-
-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_ClassDef(self, node: ast.ClassDef) ‑> ast.ClassDef -
-
-
-
-
-def visit_ImportFrom(self, node: ast.ImportFrom) ‑> Optional[ast.ImportFrom] -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_import_typing.html b/docs/opshin/rewrite/rewrite_import_typing.html deleted file mode 100644 index ee43e78b..00000000 --- a/docs/opshin/rewrite/rewrite_import_typing.html +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_import_typing API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_import_typing

-
-
-
- -Expand source code - -
from ast import *
-from typing import Optional
-
-from ..util import CompilingNodeTransformer
-
-"""
-Checks that there was an import of dataclass if there are any class definitions
-"""
-
-
-class RewriteImportTyping(CompilingNodeTransformer):
-    step = "Checking import and usage of typing"
-
-    imports_typing = False
-
-    def __init__(self, *args, **kwargs):
-        super().__init__(*args, **kwargs)
-        self.imports_Self = False
-
-    def visit_ImportFrom(self, node: ImportFrom) -> Optional[ImportFrom]:
-        if node.module != "typing":
-            return node
-        if len(node.names) == 1 and node.names[0].name == "Self":
-            self.imports_Self = True
-            return None
-        assert (
-            len(node.names) == 3
-        ), "The program must contain one 'from typing import Dict, List, Union'"
-        for i, n in enumerate(["Dict", "List", "Union"]):
-            assert (
-                node.names[i].name == n
-            ), "The program must contain one 'from typing import Dict, List, Union'"
-            assert (
-                node.names[i].asname == None
-            ), "The program must contain one 'from typing import Dict, List, Union'"
-        self.imports_typing = True
-        return None
-
-    def visit_ClassDef(self, node: ClassDef) -> ClassDef:
-        assert (
-            self.imports_typing
-        ), "typing must be imported in order to use datum classes"
-        if self.imports_Self:
-            for i, attribute in enumerate(node.body):
-                if isinstance(attribute, FunctionDef):
-                    for j, arg in enumerate(attribute.args.args):
-                        if (
-                            isinstance(arg.annotation, Name)
-                            and arg.annotation.id == "Self"
-                        ):
-                            node.body[i].args.args[j].annotation.idSelf = node.name
-                    if (
-                        isinstance(attribute.returns, Name)
-                        and attribute.returns.id == "Self"
-                    ):
-                        node.body[i].returns.idSelf = node.name
-
-        return node
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteImportTyping -(*args, **kwargs) -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteImportTyping(CompilingNodeTransformer):
-    step = "Checking import and usage of typing"
-
-    imports_typing = False
-
-    def __init__(self, *args, **kwargs):
-        super().__init__(*args, **kwargs)
-        self.imports_Self = False
-
-    def visit_ImportFrom(self, node: ImportFrom) -> Optional[ImportFrom]:
-        if node.module != "typing":
-            return node
-        if len(node.names) == 1 and node.names[0].name == "Self":
-            self.imports_Self = True
-            return None
-        assert (
-            len(node.names) == 3
-        ), "The program must contain one 'from typing import Dict, List, Union'"
-        for i, n in enumerate(["Dict", "List", "Union"]):
-            assert (
-                node.names[i].name == n
-            ), "The program must contain one 'from typing import Dict, List, Union'"
-            assert (
-                node.names[i].asname == None
-            ), "The program must contain one 'from typing import Dict, List, Union'"
-        self.imports_typing = True
-        return None
-
-    def visit_ClassDef(self, node: ClassDef) -> ClassDef:
-        assert (
-            self.imports_typing
-        ), "typing must be imported in order to use datum classes"
-        if self.imports_Self:
-            for i, attribute in enumerate(node.body):
-                if isinstance(attribute, FunctionDef):
-                    for j, arg in enumerate(attribute.args.args):
-                        if (
-                            isinstance(arg.annotation, Name)
-                            and arg.annotation.id == "Self"
-                        ):
-                            node.body[i].args.args[j].annotation.idSelf = node.name
-                    if (
-                        isinstance(attribute.returns, Name)
-                        and attribute.returns.id == "Self"
-                    ):
-                        node.body[i].returns.idSelf = node.name
-
-        return node
-
-

Ancestors

- -

Class variables

-
-
var imports_typing
-
-
-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_ClassDef(self, node: ast.ClassDef) ‑> ast.ClassDef -
-
-
-
-
-def visit_ImportFrom(self, node: ast.ImportFrom) ‑> Optional[ast.ImportFrom] -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_import_uplc_builtins.html b/docs/opshin/rewrite/rewrite_import_uplc_builtins.html deleted file mode 100644 index c14f5709..00000000 --- a/docs/opshin/rewrite/rewrite_import_uplc_builtins.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_import_uplc_builtins API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_import_uplc_builtins

-
-
-
- -Expand source code - -
import re
-from copy import copy
-from typing import Optional
-from enum import Enum
-
-from ..util import CompilingNodeTransformer
-from ..typed_ast import *
-
-"""
-Checks that there was an import of wraps_builtin if there are any wrapped builtins
-"""
-
-DECORATOR_NAME = "wraps_builtin"
-
-
-class RewriteImportUPLCBuiltins(CompilingNodeTransformer):
-    step = "Resolving imports and usage of UPLC builtins"
-
-    imports_uplc_builtins = False
-
-    def visit_ImportFrom(self, node: ImportFrom) -> Optional[AST]:
-        if node.module != "opshin.bridge":
-            return node
-        for n in node.names:
-            assert (
-                n.name == DECORATOR_NAME
-            ), "Imports something other from the bridge than the builtin wrapper"
-            assert n.asname is None, "Renames the builtin wrapper. This is forbidden."
-        self.imports_uplc_builtins = True
-        return None
-
-    def visit_FunctionDef(self, node: TypedFunctionDef) -> AST:
-        if not node.decorator_list or len(node.decorator_list) != 1:
-            return node
-        is_wrapped = any(isinstance(n, Name) and n.id for n in node.decorator_list)
-        if not is_wrapped:
-            return node
-        assert (
-            self.imports_uplc_builtins
-        ), "To wrap builtin functions, you need to import the builtin function. Add `from opshin.bridge import wraps_builtin` to your code."
-        # we replace the body with a forwarded call to the wrapped builtin
-        CamelCaseFunName = "".join(
-            p.capitalize() for p in re.split(r"_(?!\d)", node.orig_name)
-        )
-        uplc_fun = plt.__dict__[CamelCaseFunName]
-        pluto_expression = RawPlutoExpr(
-            typ=node.typ.typ.rettyp,
-            expr=uplc_fun(
-                *(plt.Force(plt.Var(a.arg)) for a in node.args.args),
-            ),
-        )
-        node_cp = copy(node)
-        node_cp.body = [Return(pluto_expression, typ=node.typ.typ.rettyp)]
-        return node_cp
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteImportUPLCBuiltins -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteImportUPLCBuiltins(CompilingNodeTransformer):
-    step = "Resolving imports and usage of UPLC builtins"
-
-    imports_uplc_builtins = False
-
-    def visit_ImportFrom(self, node: ImportFrom) -> Optional[AST]:
-        if node.module != "opshin.bridge":
-            return node
-        for n in node.names:
-            assert (
-                n.name == DECORATOR_NAME
-            ), "Imports something other from the bridge than the builtin wrapper"
-            assert n.asname is None, "Renames the builtin wrapper. This is forbidden."
-        self.imports_uplc_builtins = True
-        return None
-
-    def visit_FunctionDef(self, node: TypedFunctionDef) -> AST:
-        if not node.decorator_list or len(node.decorator_list) != 1:
-            return node
-        is_wrapped = any(isinstance(n, Name) and n.id for n in node.decorator_list)
-        if not is_wrapped:
-            return node
-        assert (
-            self.imports_uplc_builtins
-        ), "To wrap builtin functions, you need to import the builtin function. Add `from opshin.bridge import wraps_builtin` to your code."
-        # we replace the body with a forwarded call to the wrapped builtin
-        CamelCaseFunName = "".join(
-            p.capitalize() for p in re.split(r"_(?!\d)", node.orig_name)
-        )
-        uplc_fun = plt.__dict__[CamelCaseFunName]
-        pluto_expression = RawPlutoExpr(
-            typ=node.typ.typ.rettyp,
-            expr=uplc_fun(
-                *(plt.Force(plt.Var(a.arg)) for a in node.args.args),
-            ),
-        )
-        node_cp = copy(node)
-        node_cp.body = [Return(pluto_expression, typ=node.typ.typ.rettyp)]
-        return node_cp
-
-

Ancestors

- -

Class variables

-
-
var imports_uplc_builtins
-
-
-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_FunctionDef(self, node: TypedFunctionDef) ‑> ast.AST -
-
-
-
-
-def visit_ImportFrom(self, node: ast.ImportFrom) ‑> Optional[ast.AST] -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_inject_builtin_constr.html b/docs/opshin/rewrite/rewrite_inject_builtin_constr.html deleted file mode 100644 index 998797fc..00000000 --- a/docs/opshin/rewrite/rewrite_inject_builtin_constr.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_inject_builtin_constr API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_inject_builtin_constr

-
-
-
- -Expand source code - -
from copy import copy
-
-from ..typed_ast import *
-from ..util import (
-    CompilingNodeTransformer,
-)
-
-"""
-Inject constructors for the builtin types that double function as type annotation
-"""
-
-
-class RewriteInjectBuiltinsConstr(CompilingNodeTransformer):
-    step = "Injecting builtin type constructors"
-
-    def visit_Module(self, node: TypedModule) -> TypedModule:
-        additional_assigns = []
-        for t, tname in [
-            (ByteStringType(), bytes.__name__),
-            (IntegerType(), int.__name__),
-            (StringType(), str.__name__),
-            (BoolType(), bool.__name__),
-        ]:
-            typ = t.constr_type()
-            if isinstance(typ.typ, PolymorphicFunctionType):
-                # skip polymorphic functions
-                continue
-            additional_assigns.append(
-                TypedAssign(
-                    targets=[TypedName(id=tname, typ=typ, ctx=Store())],
-                    value=RawPlutoExpr(typ=typ, expr=force_params(t.constr())),
-                )
-            )
-        md = copy(node)
-        # prepend all builtin definitions
-        md.body = additional_assigns + node.body
-        return md
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteInjectBuiltinsConstr -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteInjectBuiltinsConstr(CompilingNodeTransformer):
-    step = "Injecting builtin type constructors"
-
-    def visit_Module(self, node: TypedModule) -> TypedModule:
-        additional_assigns = []
-        for t, tname in [
-            (ByteStringType(), bytes.__name__),
-            (IntegerType(), int.__name__),
-            (StringType(), str.__name__),
-            (BoolType(), bool.__name__),
-        ]:
-            typ = t.constr_type()
-            if isinstance(typ.typ, PolymorphicFunctionType):
-                # skip polymorphic functions
-                continue
-            additional_assigns.append(
-                TypedAssign(
-                    targets=[TypedName(id=tname, typ=typ, ctx=Store())],
-                    value=RawPlutoExpr(typ=typ, expr=force_params(t.constr())),
-                )
-            )
-        md = copy(node)
-        # prepend all builtin definitions
-        md.body = additional_assigns + node.body
-        return md
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Module(self, node: TypedModule) ‑> TypedModule -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_inject_builtins.html b/docs/opshin/rewrite/rewrite_inject_builtins.html deleted file mode 100644 index 2f497128..00000000 --- a/docs/opshin/rewrite/rewrite_inject_builtins.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_inject_builtins API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_inject_builtins

-
-
-
- -Expand source code - -
from copy import copy
-
-from ..typed_ast import *
-from ..util import (
-    CompilingNodeTransformer,
-)
-from ..fun_impls import PythonBuiltIn, PythonBuiltInTypes
-
-"""
-Inject initialising the builtin functions
-"""
-
-
-class RewriteInjectBuiltins(CompilingNodeTransformer):
-    step = "Injecting builtin functions"
-
-    def visit_Module(self, node: TypedModule) -> TypedModule:
-        additional_assigns = []
-        for b in PythonBuiltIn:
-            typ = PythonBuiltInTypes[b]
-            if not isinstance(b.value, plt.AST):
-                # skip polymorphic functions
-                continue
-            additional_assigns.append(
-                TypedAssign(
-                    targets=[TypedName(id=b.name, typ=typ, ctx=Store())],
-                    value=RawPlutoExpr(typ=typ, expr=force_params(deepcopy(b.value))),
-                )
-            )
-        md = copy(node)
-        # prepend all builtin definitions
-        md.body = additional_assigns + node.body
-        return md
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteInjectBuiltins -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteInjectBuiltins(CompilingNodeTransformer):
-    step = "Injecting builtin functions"
-
-    def visit_Module(self, node: TypedModule) -> TypedModule:
-        additional_assigns = []
-        for b in PythonBuiltIn:
-            typ = PythonBuiltInTypes[b]
-            if not isinstance(b.value, plt.AST):
-                # skip polymorphic functions
-                continue
-            additional_assigns.append(
-                TypedAssign(
-                    targets=[TypedName(id=b.name, typ=typ, ctx=Store())],
-                    value=RawPlutoExpr(typ=typ, expr=force_params(deepcopy(b.value))),
-                )
-            )
-        md = copy(node)
-        # prepend all builtin definitions
-        md.body = additional_assigns + node.body
-        return md
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Module(self, node: TypedModule) ‑> TypedModule -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_orig_name.html b/docs/opshin/rewrite/rewrite_orig_name.html deleted file mode 100644 index 8e422036..00000000 --- a/docs/opshin/rewrite/rewrite_orig_name.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_orig_name API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_orig_name

-
-
-
- -Expand source code - -
from ast import *
-from copy import copy
-from ..util import CompilingNodeTransformer
-
-"""
-Rewrites all occurrences of names to contain a pointer to the original name for good
-"""
-
-
-class RewriteOrigName(CompilingNodeTransformer):
-    step = "Assigning the orig_id/orig_name field with the variable name"
-
-    def visit_Name(self, node: Name) -> Name:
-        nc = copy(node)
-        nc.orig_id = node.id
-        return nc
-
-    def visit_ClassDef(self, node: ClassDef) -> ClassDef:
-        node_cp = copy(node)
-        node_cp.orig_name = node.name
-        node_cp.body = [self.visit(n) for n in node.body]
-        return node_cp
-
-    def visit_NoneType(self, node: None) -> None:
-        return None
-
-    def visit_FunctionDef(self, node: FunctionDef) -> FunctionDef:
-        node_cp = copy(node)
-        node_cp.orig_name = node.name
-        node_cp.args = copy(node.args)
-        node_cp.args.args = []
-        for a in node.args.args:
-            a_cp = self.visit(a)
-            a_cp.orig_arg = a.arg
-            node_cp.args.args.append(a_cp)
-        node_cp.returns = self.visit(node.returns)
-        node_cp.decorator_list = [self.visit(l) for l in node.decorator_list]
-        node_cp.body = [self.visit(s) for s in node.body]
-        return node_cp
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteOrigName -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteOrigName(CompilingNodeTransformer):
-    step = "Assigning the orig_id/orig_name field with the variable name"
-
-    def visit_Name(self, node: Name) -> Name:
-        nc = copy(node)
-        nc.orig_id = node.id
-        return nc
-
-    def visit_ClassDef(self, node: ClassDef) -> ClassDef:
-        node_cp = copy(node)
-        node_cp.orig_name = node.name
-        node_cp.body = [self.visit(n) for n in node.body]
-        return node_cp
-
-    def visit_NoneType(self, node: None) -> None:
-        return None
-
-    def visit_FunctionDef(self, node: FunctionDef) -> FunctionDef:
-        node_cp = copy(node)
-        node_cp.orig_name = node.name
-        node_cp.args = copy(node.args)
-        node_cp.args.args = []
-        for a in node.args.args:
-            a_cp = self.visit(a)
-            a_cp.orig_arg = a.arg
-            node_cp.args.args.append(a_cp)
-        node_cp.returns = self.visit(node.returns)
-        node_cp.decorator_list = [self.visit(l) for l in node.decorator_list]
-        node_cp.body = [self.visit(s) for s in node.body]
-        return node_cp
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_ClassDef(self, node: ast.ClassDef) ‑> ast.ClassDef -
-
-
-
-
-def visit_FunctionDef(self, node: ast.FunctionDef) ‑> ast.FunctionDef -
-
-
-
-
-def visit_Name(self, node: ast.Name) ‑> ast.Name -
-
-
-
-
-def visit_NoneType(self, node: None) ‑> None -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_remove_type_stuff.html b/docs/opshin/rewrite/rewrite_remove_type_stuff.html deleted file mode 100644 index 28486d80..00000000 --- a/docs/opshin/rewrite/rewrite_remove_type_stuff.html +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_remove_type_stuff API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_remove_type_stuff

-
-
-
- -Expand source code - -
from typing import Optional
-
-from ..typed_ast import (
-    TypedAssign,
-    ClassType,
-    InstanceType,
-    PolymorphicFunctionType,
-    TypeInferenceError,
-)
-from ..util import CompilingNodeTransformer
-
-"""
-Remove class reassignments without constructors and polymorphic function reassignments
-
-Both of these are only present during the type inference and are discarded or generated in-place during compilation.
-"""
-
-
-class RewriteRemoveTypeStuff(CompilingNodeTransformer):
-    step = "Removing class and polymorphic function re-assignments"
-
-    def visit_Assign(self, node: TypedAssign) -> Optional[TypedAssign]:
-        assert (
-            len(node.targets) == 1
-        ), "Assignments to more than one variable not supported yet"
-        try:
-            if isinstance(node.value.typ, ClassType):
-                try:
-                    typ = node.value.typ.constr_type()
-                except TypeInferenceError:
-                    # no constr_type is also fine
-                    return None
-            else:
-                typ = node.value.typ
-            if isinstance(typ, InstanceType) and isinstance(
-                typ.typ, PolymorphicFunctionType
-            ):
-                return None
-        except AttributeError:
-            # untyped attributes are fine too
-            pass
-        return node
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteRemoveTypeStuff -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteRemoveTypeStuff(CompilingNodeTransformer):
-    step = "Removing class and polymorphic function re-assignments"
-
-    def visit_Assign(self, node: TypedAssign) -> Optional[TypedAssign]:
-        assert (
-            len(node.targets) == 1
-        ), "Assignments to more than one variable not supported yet"
-        try:
-            if isinstance(node.value.typ, ClassType):
-                try:
-                    typ = node.value.typ.constr_type()
-                except TypeInferenceError:
-                    # no constr_type is also fine
-                    return None
-            else:
-                typ = node.value.typ
-            if isinstance(typ, InstanceType) and isinstance(
-                typ.typ, PolymorphicFunctionType
-            ):
-                return None
-        except AttributeError:
-            # untyped attributes are fine too
-            pass
-        return node
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Assign(self, node: TypedAssign) ‑> Optional[TypedAssign] -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_scoping.html b/docs/opshin/rewrite/rewrite_scoping.html deleted file mode 100644 index d4054054..00000000 --- a/docs/opshin/rewrite/rewrite_scoping.html +++ /dev/null @@ -1,769 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_scoping API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_scoping

-
-
-
- -Expand source code - -
import typing
-from ast import *
-from copy import copy
-
-from ordered_set import OrderedSet
-
-from .rewrite_forbidden_overwrites import FORBIDDEN_NAMES
-from ..type_inference import INITIAL_SCOPE
-from ..util import CompilingNodeTransformer, CompilingNodeVisitor
-
-"""
-Rewrites all variable names to point to the definition in the nearest enclosing scope
-"""
-
-
-class ShallowNameDefCollector(CompilingNodeVisitor):
-    step = "Collecting defined variable names"
-
-    def __init__(self):
-        self.vars = OrderedSet()
-
-    def visit_Name(self, node: Name) -> None:
-        if isinstance(node.ctx, Store):
-            self.vars.add(node.id)
-
-    def visit_ClassDef(self, node: ClassDef):
-        self.vars.add(node.name)
-        # methods will be put in global scope so add them now
-        for attribute in node.body:
-            if isinstance(attribute, FunctionDef):
-                self.vars.add(attribute.name)
-        # ignore the content (i.e. attribute names) of class definitions
-
-    def visit_FunctionDef(self, node: FunctionDef):
-        self.vars.add(node.name)
-        # ignore the recursive stuff
-
-
-class RewriteScoping(CompilingNodeTransformer):
-    step = "Rewrite all variables to inambiguously point to the definition in the nearest enclosing scope"
-    latest_scope_id: int
-    scopes: typing.List[typing.Tuple[OrderedSet, int]]
-
-    def variable_scope_id(self, name: str) -> int:
-        """find the id of the scope in which this variable is defined (closest to its usage)"""
-        name = name
-        for scope, scope_id in reversed(self.scopes):
-            if name in scope:
-                return scope_id
-        raise NameError(
-            f"free variable '{name}' referenced before assignment in enclosing scope"
-        )
-
-    def enter_scope(self):
-        self.scopes.append((OrderedSet(), self.latest_scope_id))
-        self.latest_scope_id += 1
-
-    def exit_scope(self):
-        self.scopes.pop()
-
-    def set_variable_scope(self, name: str):
-        self.scopes[-1][0].add(name)
-
-    def map_name(self, name: str):
-        scope_id = self.variable_scope_id(name)
-        if scope_id == -1:
-            # do not rewrite Dict, Union, etc
-            return name
-        return f"{name}_{scope_id}"
-
-    def visit_Module(self, node: Module) -> Module:
-        self.latest_scope_id = 0
-        self.scopes = [(OrderedSet(INITIAL_SCOPE.keys() | FORBIDDEN_NAMES), -1)]
-        node_cp = copy(node)
-        self.enter_scope()
-        # vars defined in this scope
-        shallow_node_def_collector = ShallowNameDefCollector()
-        for s in node.body:
-            shallow_node_def_collector.visit(s)
-        vars_def = shallow_node_def_collector.vars
-        for var_name in vars_def:
-            self.set_variable_scope(var_name)
-        node_cp.body = [self.visit(s) for s in node.body]
-        return node_cp
-
-    def visit_Name(self, node: Name) -> Name:
-        nc = copy(node)
-        # setting is handled in either enclosing module or function
-        nc.id = self.map_name(node.id)
-        return nc
-
-    def visit_ClassDef(self, node: ClassDef) -> ClassDef:
-        cp_node = RecordScoper.scope(node, self)
-        for i, attribute in enumerate(cp_node.body):
-            if isinstance(attribute, FunctionDef):
-                cp_node.body[i] = self.visit_FunctionDef(attribute, method=True)
-        return cp_node
-
-    def visit_FunctionDef(self, node: FunctionDef, method: bool = False) -> FunctionDef:
-        node_cp = copy(node)
-        # setting is handled in either enclosing module or function
-        node_cp.name = self.map_name(node.name) if not method else node.name
-        self.enter_scope()
-        node_cp.args = copy(node.args)
-        node_cp.args.args = []
-        # args are defined in this scope
-        for a in node.args.args:
-            a_cp = copy(a)
-            self.set_variable_scope(a.arg)
-            a_cp.arg = self.map_name(a.arg)
-            a_cp.annotation = (
-                self.visit(a.annotation)
-                if not hasattr(a.annotation, "idSelf")
-                else a.annotation
-            )
-            node_cp.args.args.append(a_cp)
-        node_cp.returns = (
-            self.visit(node.returns)
-            if not hasattr(node.returns, "idSelf")
-            else node.returns
-        )
-        # vars defined in this scope
-        shallow_node_def_collector = ShallowNameDefCollector()
-        for s in node.body:
-            shallow_node_def_collector.visit(s)
-        vars_def = shallow_node_def_collector.vars
-        for var_name in vars_def:
-            self.set_variable_scope(var_name)
-        # map all vars and recurse
-        node_cp.body = [self.visit(s) for s in node.body]
-        self.exit_scope()
-        return node_cp
-
-    def visit_NoneType(self, node: None) -> None:
-        return node
-
-
-class RecordScoper(NodeTransformer):
-    _scoper: RewriteScoping
-
-    def __init__(self, scoper: RewriteScoping):
-        self._scoper = scoper
-
-    @classmethod
-    def scope(cls, c: ClassDef, scoper: RewriteScoping) -> ClassDef:
-        f = cls(scoper)
-        return f.visit(c)
-
-    def visit_ClassDef(self, c: ClassDef) -> ClassDef:
-        node_cp = copy(c)
-        node_cp.name = self._scoper.map_name(node_cp.name)
-        return self.generic_visit(node_cp)
-
-    def visit_AnnAssign(self, node: AnnAssign) -> AnnAssign:
-        assert isinstance(
-            node.target, Name
-        ), "Record elements must have named attributes"
-        node_cp = copy(node)
-        node_cp.annotation = self._scoper.visit(node_cp.annotation)
-        return node_cp
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RecordScoper -(scoper: RewriteScoping) -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RecordScoper(NodeTransformer):
-    _scoper: RewriteScoping
-
-    def __init__(self, scoper: RewriteScoping):
-        self._scoper = scoper
-
-    @classmethod
-    def scope(cls, c: ClassDef, scoper: RewriteScoping) -> ClassDef:
-        f = cls(scoper)
-        return f.visit(c)
-
-    def visit_ClassDef(self, c: ClassDef) -> ClassDef:
-        node_cp = copy(c)
-        node_cp.name = self._scoper.map_name(node_cp.name)
-        return self.generic_visit(node_cp)
-
-    def visit_AnnAssign(self, node: AnnAssign) -> AnnAssign:
-        assert isinstance(
-            node.target, Name
-        ), "Record elements must have named attributes"
-        node_cp = copy(node)
-        node_cp.annotation = self._scoper.visit(node_cp.annotation)
-        return node_cp
-
-

Ancestors

-
    -
  • ast.NodeTransformer
  • -
  • ast.NodeVisitor
  • -
-

Static methods

-
-
-def scope(c: ast.ClassDef, scoper: RewriteScoping) ‑> ast.ClassDef -
-
-
-
-
-

Methods

-
-
-def visit_AnnAssign(self, node: ast.AnnAssign) ‑> ast.AnnAssign -
-
-
-
-
-def visit_ClassDef(self, c: ast.ClassDef) ‑> ast.ClassDef -
-
-
-
-
-
-
-class RewriteScoping -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteScoping(CompilingNodeTransformer):
-    step = "Rewrite all variables to inambiguously point to the definition in the nearest enclosing scope"
-    latest_scope_id: int
-    scopes: typing.List[typing.Tuple[OrderedSet, int]]
-
-    def variable_scope_id(self, name: str) -> int:
-        """find the id of the scope in which this variable is defined (closest to its usage)"""
-        name = name
-        for scope, scope_id in reversed(self.scopes):
-            if name in scope:
-                return scope_id
-        raise NameError(
-            f"free variable '{name}' referenced before assignment in enclosing scope"
-        )
-
-    def enter_scope(self):
-        self.scopes.append((OrderedSet(), self.latest_scope_id))
-        self.latest_scope_id += 1
-
-    def exit_scope(self):
-        self.scopes.pop()
-
-    def set_variable_scope(self, name: str):
-        self.scopes[-1][0].add(name)
-
-    def map_name(self, name: str):
-        scope_id = self.variable_scope_id(name)
-        if scope_id == -1:
-            # do not rewrite Dict, Union, etc
-            return name
-        return f"{name}_{scope_id}"
-
-    def visit_Module(self, node: Module) -> Module:
-        self.latest_scope_id = 0
-        self.scopes = [(OrderedSet(INITIAL_SCOPE.keys() | FORBIDDEN_NAMES), -1)]
-        node_cp = copy(node)
-        self.enter_scope()
-        # vars defined in this scope
-        shallow_node_def_collector = ShallowNameDefCollector()
-        for s in node.body:
-            shallow_node_def_collector.visit(s)
-        vars_def = shallow_node_def_collector.vars
-        for var_name in vars_def:
-            self.set_variable_scope(var_name)
-        node_cp.body = [self.visit(s) for s in node.body]
-        return node_cp
-
-    def visit_Name(self, node: Name) -> Name:
-        nc = copy(node)
-        # setting is handled in either enclosing module or function
-        nc.id = self.map_name(node.id)
-        return nc
-
-    def visit_ClassDef(self, node: ClassDef) -> ClassDef:
-        cp_node = RecordScoper.scope(node, self)
-        for i, attribute in enumerate(cp_node.body):
-            if isinstance(attribute, FunctionDef):
-                cp_node.body[i] = self.visit_FunctionDef(attribute, method=True)
-        return cp_node
-
-    def visit_FunctionDef(self, node: FunctionDef, method: bool = False) -> FunctionDef:
-        node_cp = copy(node)
-        # setting is handled in either enclosing module or function
-        node_cp.name = self.map_name(node.name) if not method else node.name
-        self.enter_scope()
-        node_cp.args = copy(node.args)
-        node_cp.args.args = []
-        # args are defined in this scope
-        for a in node.args.args:
-            a_cp = copy(a)
-            self.set_variable_scope(a.arg)
-            a_cp.arg = self.map_name(a.arg)
-            a_cp.annotation = (
-                self.visit(a.annotation)
-                if not hasattr(a.annotation, "idSelf")
-                else a.annotation
-            )
-            node_cp.args.args.append(a_cp)
-        node_cp.returns = (
-            self.visit(node.returns)
-            if not hasattr(node.returns, "idSelf")
-            else node.returns
-        )
-        # vars defined in this scope
-        shallow_node_def_collector = ShallowNameDefCollector()
-        for s in node.body:
-            shallow_node_def_collector.visit(s)
-        vars_def = shallow_node_def_collector.vars
-        for var_name in vars_def:
-            self.set_variable_scope(var_name)
-        # map all vars and recurse
-        node_cp.body = [self.visit(s) for s in node.body]
-        self.exit_scope()
-        return node_cp
-
-    def visit_NoneType(self, node: None) -> None:
-        return node
-
-

Ancestors

- -

Class variables

-
-
var latest_scope_id : int
-
-
-
-
var scopes : List[Tuple[ordered_set.OrderedSet, int]]
-
-
-
-
var step
-
-
-
-
-

Methods

-
-
-def enter_scope(self) -
-
-
-
-
-def exit_scope(self) -
-
-
-
-
-def map_name(self, name: str) -
-
-
-
-
-def set_variable_scope(self, name: str) -
-
-
-
-
-def variable_scope_id(self, name: str) ‑> int -
-
-

find the id of the scope in which this variable is defined (closest to its usage)

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_ClassDef(self, node: ast.ClassDef) ‑> ast.ClassDef -
-
-
-
-
-def visit_FunctionDef(self, node: ast.FunctionDef, method: bool = False) ‑> ast.FunctionDef -
-
-
-
-
-def visit_Module(self, node: ast.Module) ‑> ast.Module -
-
-
-
-
-def visit_Name(self, node: ast.Name) ‑> ast.Name -
-
-
-
-
-def visit_NoneType(self, node: None) ‑> None -
-
-
-
-
-
-
-class ShallowNameDefCollector -
-
-

A node visitor base class that walks the abstract syntax tree and calls a -visitor function for every node found. -This function may return a value -which is forwarded by the visit method.

-

This class is meant to be subclassed, with the subclass adding visitor -methods.

-

Per default the visitor functions for the nodes are 'visit_' + -class name of the node. -So a TryFinally node visit function would -be visit_TryFinally. -This behavior can be changed by overriding -the visit method. -If no visitor function exists for a node -(return value None) the generic_visit visitor is used instead.

-

Don't use the NodeVisitor if you want to apply changes to nodes during -traversing. -For this a special visitor exists (NodeTransformer) that -allows modifications.

-
- -Expand source code - -
class ShallowNameDefCollector(CompilingNodeVisitor):
-    step = "Collecting defined variable names"
-
-    def __init__(self):
-        self.vars = OrderedSet()
-
-    def visit_Name(self, node: Name) -> None:
-        if isinstance(node.ctx, Store):
-            self.vars.add(node.id)
-
-    def visit_ClassDef(self, node: ClassDef):
-        self.vars.add(node.name)
-        # methods will be put in global scope so add them now
-        for attribute in node.body:
-            if isinstance(attribute, FunctionDef):
-                self.vars.add(attribute.name)
-        # ignore the content (i.e. attribute names) of class definitions
-
-    def visit_FunctionDef(self, node: FunctionDef):
-        self.vars.add(node.name)
-        # ignore the recursive stuff
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeVisitor.visit -

-

Visit a node.

-
-
-def visit_ClassDef(self, node: ast.ClassDef) -
-
-
-
-
-def visit_FunctionDef(self, node: ast.FunctionDef) -
-
-
-
-
-def visit_Name(self, node: ast.Name) ‑> None -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_subscript38.html b/docs/opshin/rewrite/rewrite_subscript38.html deleted file mode 100644 index 217ba8da..00000000 --- a/docs/opshin/rewrite/rewrite_subscript38.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_subscript38 API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_subscript38

-
-
-
- -Expand source code - -
from ast import *
-import typing
-
-from ..util import CompilingNodeTransformer
-
-"""
-Rewrites all Index/Slice occurrences such that they look like in Python 3.9 onwards (not like Python 3.8).
-"""
-
-
-class RewriteSubscript38(CompilingNodeTransformer):
-    step = "Rewriting Subscripts"
-
-    def visit_Index(self, node: Index) -> AST:
-        return self.visit(node.value)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteSubscript38 -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteSubscript38(CompilingNodeTransformer):
-    step = "Rewriting Subscripts"
-
-    def visit_Index(self, node: Index) -> AST:
-        return self.visit(node.value)
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Index(self, node: ast.Index) ‑> ast.AST -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/rewrite/rewrite_tuple_assign.html b/docs/opshin/rewrite/rewrite_tuple_assign.html deleted file mode 100644 index 29bbe411..00000000 --- a/docs/opshin/rewrite/rewrite_tuple_assign.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - - -opshin.rewrite.rewrite_tuple_assign API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.rewrite.rewrite_tuple_assign

-
-
-
- -Expand source code - -
from copy import copy
-
-import typing
-from ast import *
-
-from ..util import CompilingNodeTransformer
-
-"""
-Rewrites all occurences of assignments to tuples to assignments to single values
-"""
-
-
-class RewriteTupleAssign(CompilingNodeTransformer):
-    step = "Rewriting tuple deconstruction in assignments"
-
-    unique_id = 0
-
-    def visit_Assign(self, node: Assign) -> typing.List[stmt]:
-        if not isinstance(node.targets[0], Tuple):
-            return [node]
-        uid = self.unique_id
-        self.unique_id += 1
-        assignments = [Assign([Name(f"2_{uid}_tup", Store())], self.visit(node.value))]
-        for i, t in enumerate(node.targets[0].elts):
-            assignments.append(
-                Assign(
-                    [t],
-                    Subscript(
-                        value=Name(f"2_{uid}_tup", Load()),
-                        slice=Constant(i),
-                        ctx=Load(),
-                    ),
-                )
-            )
-        # recursively resolve multiple layers of tuples
-        transformed = sum([self.visit(a) for a in assignments], [])
-        return transformed
-
-    def visit_For(self, node: For) -> For:
-        # rewrite deconstruction in for loops
-        if not isinstance(node.target, Tuple):
-            return self.generic_visit(node)
-        new_for = copy(node)
-        new_for.iter = self.visit(node.iter)
-        uid = self.unique_id
-        self.unique_id += 1
-        # write the tuple into a singleton variable
-        new_for.target = Name(f"2_{uid}_tup", Store())
-        assignments = []
-        # iteratively assign the deconstructed parts to the original variable names
-        for i, t in enumerate(node.target.elts):
-            assignments.append(
-                Assign(
-                    [t],
-                    Subscript(
-                        value=Name(f"2_{uid}_tup", Load()),
-                        slice=Constant(i),
-                        ctx=Load(),
-                    ),
-                )
-            )
-        new_for.body = assignments + node.body
-        # recursively resolve multiple layers of tuples
-        # further layers should be handled by the normal tuple assignment though
-        return self.visit(new_for)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RewriteTupleAssign -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class RewriteTupleAssign(CompilingNodeTransformer):
-    step = "Rewriting tuple deconstruction in assignments"
-
-    unique_id = 0
-
-    def visit_Assign(self, node: Assign) -> typing.List[stmt]:
-        if not isinstance(node.targets[0], Tuple):
-            return [node]
-        uid = self.unique_id
-        self.unique_id += 1
-        assignments = [Assign([Name(f"2_{uid}_tup", Store())], self.visit(node.value))]
-        for i, t in enumerate(node.targets[0].elts):
-            assignments.append(
-                Assign(
-                    [t],
-                    Subscript(
-                        value=Name(f"2_{uid}_tup", Load()),
-                        slice=Constant(i),
-                        ctx=Load(),
-                    ),
-                )
-            )
-        # recursively resolve multiple layers of tuples
-        transformed = sum([self.visit(a) for a in assignments], [])
-        return transformed
-
-    def visit_For(self, node: For) -> For:
-        # rewrite deconstruction in for loops
-        if not isinstance(node.target, Tuple):
-            return self.generic_visit(node)
-        new_for = copy(node)
-        new_for.iter = self.visit(node.iter)
-        uid = self.unique_id
-        self.unique_id += 1
-        # write the tuple into a singleton variable
-        new_for.target = Name(f"2_{uid}_tup", Store())
-        assignments = []
-        # iteratively assign the deconstructed parts to the original variable names
-        for i, t in enumerate(node.target.elts):
-            assignments.append(
-                Assign(
-                    [t],
-                    Subscript(
-                        value=Name(f"2_{uid}_tup", Load()),
-                        slice=Constant(i),
-                        ctx=Load(),
-                    ),
-                )
-            )
-        new_for.body = assignments + node.body
-        # recursively resolve multiple layers of tuples
-        # further layers should be handled by the normal tuple assignment though
-        return self.visit(new_for)
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
var unique_id
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_Assign(self, node: ast.Assign) ‑> List[ast.stmt] -
-
-
-
-
-def visit_For(self, node: ast.For) ‑> ast.For -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/std/bitmap.html b/docs/opshin/std/bitmap.html deleted file mode 100644 index 2bfb8b44..00000000 --- a/docs/opshin/std/bitmap.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - - -opshin.std.bitmap API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.std.bitmap

-
-
-

The BitMap library provides tools to interact with a highly efficient datastructure -that stores boolean values with minimal overhead (1 bit per bool)

-
- -Expand source code - -
"""
-The BitMap library provides tools to interact with a highly efficient datastructure
-that stores boolean values with minimal overhead (1 bit per bool)
-"""
-
-BitMap = bytes
-
-BYTE_SIZE = 8
-POWS = [2**i for i in range(BYTE_SIZE)]
-
-
-def init_bitmap(size: int) -> BitMap:
-    """Creates an empty bitmap with size bits"""
-    return b"\x00" * ((size + BYTE_SIZE - 1) // BYTE_SIZE)
-
-
-def test_bitmap(bmp: BitMap, i: int) -> bool:
-    """Tests if bit at position i has been set to 1"""
-    byte = bmp[i // BYTE_SIZE]
-    bit = (byte // POWS[(BYTE_SIZE - 1) - (i % BYTE_SIZE)]) % 2
-    return bit == 1
-
-
-def _set_bitmap(bmp: BitMap, i: int, v: bool) -> BitMap:
-    """
-    Sets a bit in the bitmap to the specified value
-    i: index of the value to set
-    v: value of the bit to be set (0 or 1)
-    """
-    scaled_i = i // BYTE_SIZE
-    byte = bmp[scaled_i]
-    powi = POWS[(BYTE_SIZE - 1) - (i % BYTE_SIZE)]
-    bit = (byte // powi) % 2
-    if bit == v:
-        new_byte = byte
-    elif not v:
-        # v == 0
-        new_byte = byte - powi
-    else:
-        # v == 1
-        new_byte = byte + powi
-    return bmp[:scaled_i] + bytes([new_byte]) + bmp[scaled_i + 1 :]
-
-
-def set_bitmap(bmp: BitMap, i: int) -> BitMap:
-    """Sets a bit in the bitmap to 1"""
-    return _set_bitmap(bmp, i, True)
-
-
-def reset_bitmap(bmp: BitMap, i: int) -> BitMap:
-    """Sets a bit in the bitmap to 0"""
-    return _set_bitmap(bmp, i, False)
-
-
-def flip_bitmap(bmp: BitMap, i: int) -> BitMap:
-    """Flips a bit in the bitmap"""
-    scaled_i = i // BYTE_SIZE
-    byte = bmp[scaled_i]
-    powi = POWS[(BYTE_SIZE - 1) - (i % BYTE_SIZE)]
-    bit = (byte // powi) % 2
-    if bit == 1:
-        # v == 0
-        new_byte = byte - powi
-    else:
-        # v == 1
-        new_byte = byte + powi
-    return bmp[:scaled_i] + bytes([new_byte]) + bmp[scaled_i + 1 :]
-
-
-def size_bitmap(bmp: BitMap) -> int:
-    """Returns the size of the bitmap in bits"""
-    return len(bmp) * BYTE_SIZE
-
-
-def any_bitmap(b: BitMap) -> bool:
-    """Returns whether any bit was set to 1"""
-    return b != (b"\x00" * len(b))
-
-
-def all_bitmap(b: BitMap) -> bool:
-    """Returns whether all bits were set to 1"""
-    return b == (b"\xFF" * len(b))
-
-
-def none_bitmap(b: BitMap) -> bool:
-    """Returns whether no bits were set to 1"""
-    return b == (b"\x00" * len(b))
-
-
-
-
-
-
-
-

Functions

-
-
-def all_bitmap(b: bytes) ‑> bool -
-
-

Returns whether all bits were set to 1

-
-
-def any_bitmap(b: bytes) ‑> bool -
-
-

Returns whether any bit was set to 1

-
-
-def flip_bitmap(bmp: bytes, i: int) ‑> bytes -
-
-

Flips a bit in the bitmap

-
-
-def init_bitmap(size: int) ‑> bytes -
-
-

Creates an empty bitmap with size bits

-
-
-def none_bitmap(b: bytes) ‑> bool -
-
-

Returns whether no bits were set to 1

-
-
-def reset_bitmap(bmp: bytes, i: int) ‑> bytes -
-
-

Sets a bit in the bitmap to 0

-
-
-def set_bitmap(bmp: bytes, i: int) ‑> bytes -
-
-

Sets a bit in the bitmap to 1

-
-
-def size_bitmap(bmp: bytes) ‑> int -
-
-

Returns the size of the bitmap in bits

-
-
-def test_bitmap(bmp: bytes, i: int) ‑> bool -
-
-

Tests if bit at position i has been set to 1

-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/std/builtins.html b/docs/opshin/std/builtins.html deleted file mode 100644 index f874d317..00000000 --- a/docs/opshin/std/builtins.html +++ /dev/null @@ -1,578 +0,0 @@ - - - - - - - - -opshin.std.builtins API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.std.builtins

-
-
-

A special libary that gives direct access to UPLC built-ins -It is valid code and parts of it may be copied if not all built-ins are required by the user.

-
- -Expand source code - -
"""
-A special libary that gives direct access to UPLC built-ins
-It is valid code and parts of it may be copied if not all built-ins are required by the user.
-"""
-
-from opshin.bridge import wraps_builtin
-from pycardano import Datum as Anything, PlutusData
-from typing import Dict, List, Union
-
-
-@wraps_builtin
-def add_integer(x: int, y: int) -> int:
-    """Adds two integers and returns the result."""
-    pass
-
-
-@wraps_builtin
-def subtract_integer(x: int, y: int) -> int:
-    """Subtract fist integer by second and return the result."""
-    pass
-
-
-@wraps_builtin
-def multiply_integer(x: int, y: int) -> int:
-    """Multiply 2 integers and return the result."""
-    pass
-
-
-@wraps_builtin
-def divide_integer(x: int, y: int) -> int:
-    """Divide first integer by second and return the result."""
-    pass
-
-
-@wraps_builtin
-def quotient_integer(x: int, y: int) -> int:
-    """Quotient of first integer by second and return the result."""
-    pass
-
-
-@wraps_builtin
-def remainder_integer(x: int, y: int) -> int:
-    """Remainder of first integer by second and return the result."""
-    pass
-
-
-@wraps_builtin
-def mod_integer(x: int, y: int) -> int:
-    """Modulus of first integer by second and return the result."""
-    pass
-
-
-@wraps_builtin
-def equals_integer(x: int, y: int) -> bool:
-    """Equality between two integers."""
-    pass
-
-
-@wraps_builtin
-def less_than_integer(x: int, y: int) -> bool:
-    """Returns x < y"""
-    pass
-
-
-@wraps_builtin
-def less_than_equals_integer(x: int, y: int) -> bool:
-    """Returns x <= y."""
-    pass
-
-
-@wraps_builtin
-def append_byte_string(x: bytes, y: bytes) -> bytes:
-    """Concatenate two bytestrings."""
-    pass
-
-
-@wraps_builtin
-def cons_byte_string(x: int, y: bytes) -> bytes:
-    """Prepend a byte, represented by a natural number (Integer), to a bytestring."""
-    pass
-
-
-@wraps_builtin
-def slice_byte_string(x: int, y: int, z: bytes) -> bytes:
-    """
-    Slice a bytestring using given indices (inclusive on both ends).
-    The resulting bytestring is z[x:x+y].
-    """
-    pass
-
-
-@wraps_builtin
-def length_of_byte_string(x: bytes) -> int:
-    """Get the length of a bytestring."""
-    pass
-
-
-@wraps_builtin
-def index_byte_string(x: bytes, y: int) -> int:
-    """Get the byte at given index from a bytestring."""
-    pass
-
-
-@wraps_builtin
-def equals_byte_string(x: bytes, y: bytes) -> bool:
-    """Returns x == y."""
-    pass
-
-
-@wraps_builtin
-def less_than_byte_string(x: bytes, y: bytes) -> bool:
-    """Returns x < y."""
-    pass
-
-
-@wraps_builtin
-def less_than_equals_byte_string(x: bytes, y: bytes) -> bool:
-    """Returns x <= y."""
-    pass
-
-
-@wraps_builtin
-def sha2_256(x: bytes) -> bytes:
-    """Hash a bytestring using SHA-256."""
-    pass
-
-
-@wraps_builtin
-def sha3_256(x: bytes) -> bytes:
-    """Hash a bytestring using SHA3-256."""
-    pass
-
-
-@wraps_builtin
-def blake2b_256(x: bytes) -> bytes:
-    """Hash a bytestring using Blake2B-256."""
-    pass
-
-
-@wraps_builtin
-def verify_ed25519_signature(pk: bytes, m: bytes, s: bytes) -> bool:
-    """Given PubKey, Message, and Signature, verify the Ed25519 signature."""
-    pass
-
-
-@wraps_builtin
-def verify_ecdsa_secp256k1_signature(pk: bytes, m: bytes, s: bytes) -> bool:
-    """Given PubKey, Message, and Signature, verify the ECDSA signature."""
-    pass
-
-
-@wraps_builtin
-def verify_schnorr_secp256k1_signature(pk: bytes, m: bytes, s: bytes) -> bool:
-    """Given PubKey, Message, and Signature, verify the Schnorr signature."""
-    pass
-
-
-@wraps_builtin
-def append_string(x: str, y: str) -> str:
-    """Concatenate two strings/texts."""
-    pass
-
-
-@wraps_builtin
-def equals_string(x: str, y: str) -> str:
-    """Returns x == y."""
-    pass
-
-
-@wraps_builtin
-def encode_utf8(x: str) -> bytes:
-    """Encode a string/text using UTF-8."""
-    pass
-
-
-@wraps_builtin
-def decode_utf8(x: bytes) -> str:
-    """Decode a string/text using UTF-8."""
-    pass
-
-
-@wraps_builtin
-def constr_data(x: int, y: List[Anything]) -> Anything:
-    """Create a datum with constructor id x and fields y."""
-    pass
-
-
-@wraps_builtin
-def equals_data(x: Anything, y: Anything) -> bool:
-    """Equality between two complex classes."""
-    pass
-
-
-@wraps_builtin
-def serialise_data(x: Anything) -> bytes:
-    """Serialize a datum into its CBOR representation."""
-    pass
-
-
-
-
-
-
-
-

Functions

-
-
-def add_integer(x: int, y: int) ‑> int -
-
-

Adds two integers and returns the result.

-
-
-def append_byte_string(x: bytes, y: bytes) ‑> bytes -
-
-

Concatenate two bytestrings.

-
-
-def append_string(x: str, y: str) ‑> str -
-
-

Concatenate two strings/texts.

-
-
-def blake2b_256(x: bytes) ‑> bytes -
-
-

Hash a bytestring using Blake2B-256.

-
-
-def cons_byte_string(x: int, y: bytes) ‑> bytes -
-
-

Prepend a byte, represented by a natural number (Integer), to a bytestring.

-
-
-def constr_data(x: int, y: List[Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]]) ‑> Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData] -
-
-

Create a datum with constructor id x and fields y.

-
-
-def decode_utf8(x: bytes) ‑> str -
-
-

Decode a string/text using UTF-8.

-
-
-def divide_integer(x: int, y: int) ‑> int -
-
-

Divide first integer by second and return the result.

-
-
-def encode_utf8(x: str) ‑> bytes -
-
-

Encode a string/text using UTF-8.

-
-
-def equals_byte_string(x: bytes, y: bytes) ‑> bool -
-
-

Returns x == y.

-
-
-def equals_data(x: Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData], y: Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]) ‑> bool -
-
-

Equality between two complex classes.

-
-
-def equals_integer(x: int, y: int) ‑> bool -
-
-

Equality between two integers.

-
-
-def equals_string(x: str, y: str) ‑> str -
-
-

Returns x == y.

-
-
-def index_byte_string(x: bytes, y: int) ‑> int -
-
-

Get the byte at given index from a bytestring.

-
-
-def length_of_byte_string(x: bytes) ‑> int -
-
-

Get the length of a bytestring.

-
-
-def less_than_byte_string(x: bytes, y: bytes) ‑> bool -
-
-

Returns x < y.

-
-
-def less_than_equals_byte_string(x: bytes, y: bytes) ‑> bool -
-
-

Returns x <= y.

-
-
-def less_than_equals_integer(x: int, y: int) ‑> bool -
-
-

Returns x <= y.

-
-
-def less_than_integer(x: int, y: int) ‑> bool -
-
-

Returns x < y

-
-
-def mod_integer(x: int, y: int) ‑> int -
-
-

Modulus of first integer by second and return the result.

-
-
-def multiply_integer(x: int, y: int) ‑> int -
-
-

Multiply 2 integers and return the result.

-
-
-def quotient_integer(x: int, y: int) ‑> int -
-
-

Quotient of first integer by second and return the result.

-
-
-def remainder_integer(x: int, y: int) ‑> int -
-
-

Remainder of first integer by second and return the result.

-
-
-def serialise_data(x: Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]) ‑> bytes -
-
-

Serialize a datum into its CBOR representation.

-
-
-def sha2_256(x: bytes) ‑> bytes -
-
-

Hash a bytestring using SHA-256.

-
-
-def sha3_256(x: bytes) ‑> bytes -
-
-

Hash a bytestring using SHA3-256.

-
-
-def slice_byte_string(x: int, y: int, z: bytes) ‑> bytes -
-
-

Slice a bytestring using given indices (inclusive on both ends). -The resulting bytestring is z[x:x+y].

-
-
-def subtract_integer(x: int, y: int) ‑> int -
-
-

Subtract fist integer by second and return the result.

-
-
-def verify_ecdsa_secp256k1_signature(pk: bytes, m: bytes, s: bytes) ‑> bool -
-
-

Given PubKey, Message, and Signature, verify the ECDSA signature.

-
-
-def verify_ed25519_signature(pk: bytes, m: bytes, s: bytes) ‑> bool -
-
-

Given PubKey, Message, and Signature, verify the Ed25519 signature.

-
-
-def verify_schnorr_secp256k1_signature(pk: bytes, m: bytes, s: bytes) ‑> bool -
-
-

Given PubKey, Message, and Signature, verify the Schnorr signature.

-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/std/fractions.html b/docs/opshin/std/fractions.html deleted file mode 100644 index 8a7d72d1..00000000 --- a/docs/opshin/std/fractions.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - - -opshin.std.fractions API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.std.fractions

-
-
-

An implementation of fractions in opshin -This does not maintain smallest possible notation invariants for the sake of efficiency -- the user has full control over when to normalize the fractions and should do so using norm_fraction

-
- -Expand source code - -
"""
-An implementation of fractions in opshin
-This does not maintain smallest possible notation invariants for the sake of efficiency
-- the user has full control over when to normalize the fractions and should do so using norm_fraction
-"""
-
-from dataclasses import dataclass
-from pycardano import Datum as Anything, PlutusData
-from typing import Dict, List, Union
-
-from opshin.std.math import *
-
-
-@dataclass(unsafe_hash=True)
-class Fraction(PlutusData):
-    CONSTR_ID = 1
-    numerator: int
-    denominator: int
-
-
-def add_fraction(a: Fraction, b: Fraction) -> Fraction:
-    """returns a + b"""
-    return Fraction(
-        (a.numerator * b.denominator) + (b.numerator * a.denominator),
-        a.denominator * b.denominator,
-    )
-
-
-def neg_fraction(a: Fraction) -> Fraction:
-    """returns -a"""
-    return Fraction(-a.numerator, a.denominator)
-
-
-def sub_fraction(a: Fraction, b: Fraction) -> Fraction:
-    """returns a - b"""
-    return add_fraction(a, neg_fraction(b))
-
-
-def mul_fraction(a: Fraction, b: Fraction) -> Fraction:
-    """returns a * b"""
-    return Fraction(a.numerator * b.numerator, a.denominator * b.denominator)
-
-
-def div_fraction(a: Fraction, b: Fraction) -> Fraction:
-    """returns a / b"""
-    return Fraction(a.numerator * b.denominator, a.denominator * b.numerator)
-
-
-def _norm_signs_fraction(a: Fraction) -> Fraction:
-    """Restores the invariant that the denominator is > 0"""
-    return Fraction(sign(a.denominator) * a.numerator, abs(a.denominator))
-
-
-def _norm_gcd_fraction(a: Fraction) -> Fraction:
-    """Restores the invariant that num/denom are in the smallest possible denomination"""
-    g = gcd(a.numerator, a.denominator)
-    return Fraction(a.numerator // g, a.denominator // g)
-
-
-def norm_fraction(a: Fraction) -> Fraction:
-    """Restores the invariant that num/denom are in the smallest possible denomination and denominator > 0"""
-    return _norm_gcd_fraction(_norm_signs_fraction(a))
-
-
-def ge_fraction(a: Fraction, b: Fraction) -> bool:
-    """returns a >= b"""
-    if a.denominator * b.denominator >= 0:
-        res = a.numerator * b.denominator >= a.denominator * b.numerator
-    else:
-        res = a.numerator * b.denominator <= a.denominator * b.numerator
-    return res
-
-
-def le_fraction(a: Fraction, b: Fraction) -> bool:
-    """returns a <= b"""
-    if a.denominator * b.denominator >= 0:
-        res = a.numerator * b.denominator <= a.denominator * b.numerator
-    else:
-        res = a.numerator * b.denominator >= a.denominator * b.numerator
-    return res
-
-
-def eq_fraction(a: Fraction, b: Fraction) -> bool:
-    """returns a == b"""
-    return a.numerator * b.denominator == a.denominator * b.numerator
-
-
-def lt_fraction(a: Fraction, b: Fraction) -> bool:
-    """returns a < b"""
-    if a.denominator * b.denominator >= 0:
-        res = a.numerator * b.denominator < a.denominator * b.numerator
-    else:
-        res = a.numerator * b.denominator > a.denominator * b.numerator
-    return res
-
-
-def gt_fraction(a: Fraction, b: Fraction) -> bool:
-    """returns a > b"""
-    if a.denominator * b.denominator >= 0:
-        res = a.numerator * b.denominator > a.denominator * b.numerator
-    else:
-        res = a.numerator * b.denominator < a.denominator * b.numerator
-    return res
-
-
-def floor_fraction(a: Fraction) -> int:
-    return a.numerator // a.denominator
-
-
-def ceil_fraction(a: Fraction) -> int:
-    return (a.numerator + a.denominator - sign(a.denominator)) // a.denominator
-
-
-
-
-
-
-
-

Functions

-
-
-def add_fraction(a: Fraction, b: Fraction) ‑> Fraction -
-
-

returns a + b

-
-
-def ceil_fraction(a: Fraction) ‑> int -
-
-
-
-
-def div_fraction(a: Fraction, b: Fraction) ‑> Fraction -
-
-

returns a / b

-
-
-def eq_fraction(a: Fraction, b: Fraction) ‑> bool -
-
-

returns a == b

-
-
-def floor_fraction(a: Fraction) ‑> int -
-
-
-
-
-def ge_fraction(a: Fraction, b: Fraction) ‑> bool -
-
-

returns a >= b

-
-
-def gt_fraction(a: Fraction, b: Fraction) ‑> bool -
-
-

returns a > b

-
-
-def le_fraction(a: Fraction, b: Fraction) ‑> bool -
-
-

returns a <= b

-
-
-def lt_fraction(a: Fraction, b: Fraction) ‑> bool -
-
-

returns a < b

-
-
-def mul_fraction(a: Fraction, b: Fraction) ‑> Fraction -
-
-

returns a * b

-
-
-def neg_fraction(a: Fraction) ‑> Fraction -
-
-

returns -a

-
-
-def norm_fraction(a: Fraction) ‑> Fraction -
-
-

Restores the invariant that num/denom are in the smallest possible denomination and denominator > 0

-
-
-def sub_fraction(a: Fraction, b: Fraction) ‑> Fraction -
-
-

returns a - b

-
-
-
-
-

Classes

-
-
-class Fraction -(numerator: int, denominator: int) -
-
-

Fraction(numerator: int, denominator: int)

-
- -Expand source code - -
@dataclass(unsafe_hash=True)
-class Fraction(PlutusData):
-    CONSTR_ID = 1
-    numerator: int
-    denominator: int
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var denominator : int
-
-
-
-
var numerator : int
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/std/hashlib.html b/docs/opshin/std/hashlib.html deleted file mode 100644 index 0934e247..00000000 --- a/docs/opshin/std/hashlib.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - -opshin.std.hashlib API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.std.hashlib

-
-
-

A std library that imports all valid hash functions from the builtin python hashlib library: -If you want to have all hash functions in scope, simply add from opshin.std.hashlib import * to the top of you python file.

-
- -Expand source code - -
"""
-A std library that imports all valid hash functions from the builtin python hashlib library:
-If you want to have all hash functions in scope, simply add `from opshin.std.hashlib import *` to the top of you python file.
-"""
-
-from hashlib import sha256, sha3_256, blake2b
-
-
-
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/std/index.html b/docs/opshin/std/index.html deleted file mode 100644 index 9e71fbe2..00000000 --- a/docs/opshin/std/index.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - -opshin.std API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.std

-
-
-

OpShin provides a few features in its standard libary. -You can import modules from there (i.e. the opshin.std.fractions module) with

-
from opshin.std.fractions import *
-
-
- -Expand source code - -
"""
-OpShin provides a few features in its standard libary.
-You can import modules from there (i.e. the `fractions` module) with
-
-```python
-from opshin.std.fractions import *
-```
-"""
-
-
-
-

Sub-modules

-
-
opshin.std.bitmap
-
-

The BitMap library provides tools to interact with a highly efficient datastructure -that stores boolean values with minimal overhead (1 bit per bool)

-
-
opshin.std.builtins
-
-

A special libary that gives direct access to UPLC built-ins -It is valid code and parts of it may be copied if not all built-ins are required by the user.

-
-
opshin.std.fractions
-
-

An implementation of fractions in opshin -This does not maintain smallest possible notation invariants for the sake of efficiency -- the user has full …

-
-
opshin.std.hashlib
-
-

A std library that imports all valid hash functions from the builtin python hashlib library: -If you want to have all hash functions in scope, simply …

-
-
opshin.std.integrity
-
-

A special libary that gives access to a function that checks the integrity of PlutusDatum objects.

-
-
opshin.std.math
-
-

An implementation of some math operations in opshin

-
-
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/std/integrity.html b/docs/opshin/std/integrity.html deleted file mode 100644 index 8d8f826c..00000000 --- a/docs/opshin/std/integrity.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - -opshin.std.integrity API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.std.integrity

-
-
-

A special libary that gives access to a function that checks the integrity of PlutusDatum objects.

-
- -Expand source code - -
"""
-A special libary that gives access to a function that checks the integrity of PlutusDatum objects.
-"""
-
-from pycardano import PlutusData
-
-
-def check_integrity(x: PlutusData) -> None:
-    """
-    Checks the integrity of a PlutusDatum object.
-    In particular, it takes an object of any type and checks that
-    - the constructor id matches the id defined in the type
-    - the fields specified in the type are present
-    - no additional fields are present
-
-    This has no equivalent in Python.
-    """
-    pass
-
-
-
-
-
-
-
-

Functions

-
-
-def check_integrity(x: pycardano.plutus.PlutusData) ‑> None -
-
-

Checks the integrity of a PlutusDatum object. -In particular, it takes an object of any type and checks that -- the constructor id matches the id defined in the type -- the fields specified in the type are present -- no additional fields are present

-

This has no equivalent in Python.

-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/std/math.html b/docs/opshin/std/math.html deleted file mode 100644 index 1c10704b..00000000 --- a/docs/opshin/std/math.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - - -opshin.std.math API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.std.math

-
-
-

An implementation of some math operations in opshin

-
- -Expand source code - -
""" An implementation of some math operations in opshin """
-
-
-def gcd(a: int, b: int) -> int:
-    while b != 0:
-        a, b = b, a % b
-    return abs(a)
-
-
-def sign(a: int) -> int:
-    return -1 if a < 0 else 1
-
-
-def unsigned_int_from_bytes_big(b: bytes) -> int:
-    """Converts a bytestring into the corresponding integer, big/network byteorder, unsigned"""
-    acc = 0
-    for i in range(len(b)):
-        acc = acc * 256 + b[i]
-    return acc
-
-
-def bytes_big_from_unsigned_int(b: int) -> bytes:
-    """Converts an integer into the corresponding bytestring, big/network byteorder, unsigned"""
-    assert b >= 0
-    if b == 0:
-        return b"\x00"
-    acc = b""
-    while b > 0:
-        acc = bytes([b % 256]) + acc
-        b //= 256
-    return acc
-
-
-def ceil(a: int, b: int):
-    """Returns a divided by b rounded towards positive infinity"""
-    return (a + b - 1) // b if b > 0 else (a + b + 1) // b
-
-
-def floor(a: int, b: int):
-    """Returns a divided by b rounded towards negative infinity"""
-    return a // b
-
-
-
-
-
-
-
-

Functions

-
-
-def bytes_big_from_unsigned_int(b: int) ‑> bytes -
-
-

Converts an integer into the corresponding bytestring, big/network byteorder, unsigned

-
-
-def ceil(a: int, b: int) -
-
-

Returns a divided by b rounded towards positive infinity

-
-
-def floor(a: int, b: int) -
-
-

Returns a divided by b rounded towards negative infinity

-
-
-def gcd(a: int, b: int) ‑> int -
-
-
-
-
-def sign(a: int) ‑> int -
-
-
-
-
-def unsigned_int_from_bytes_big(b: bytes) ‑> int -
-
-

Converts a bytestring into the corresponding integer, big/network byteorder, unsigned

-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/index.html b/docs/opshin/tests/index.html deleted file mode 100644 index abb731aa..00000000 --- a/docs/opshin/tests/index.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - -opshin.tests API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests

-
-
-
- -Expand source code - -
import datetime
-import hypothesis
-
-PLUTUS_VM_PROFILE = "plutus_vm"
-hypothesis.settings.register_profile(
-    PLUTUS_VM_PROFILE, deadline=datetime.timedelta(seconds=1)
-)
-
-
-
-

Sub-modules

-
-
opshin.tests.test_builtins
-
-
-
-
opshin.tests.test_class_methods
-
-
-
-
opshin.tests.test_hashlib
-
-
-
-
opshin.tests.test_keywords
-
-
-
-
opshin.tests.test_ledger
-
-
-
-
opshin.tests.test_misc
-
-
-
-
opshin.tests.test_ops
-
-
-
-
opshin.tests.test_std
-
-
-
-
opshin.tests.test_stdlib
-
-
-
-
opshin.tests.test_types
-
-
-
-
opshin.tests.utils
-
-
-
-
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_builtins.html b/docs/opshin/tests/test_builtins.html deleted file mode 100644 index 0b47c090..00000000 --- a/docs/opshin/tests/test_builtins.html +++ /dev/null @@ -1,1319 +0,0 @@ - - - - - - - - -opshin.tests.test_builtins API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_builtins

-
-
-
- -Expand source code - -
import hypothesis
-import unittest
-
-from hypothesis import example, given
-from hypothesis import strategies as st
-
-from . import PLUTUS_VM_PROFILE
-from .utils import eval_uplc, eval_uplc_value, Unit
-
-hypothesis.settings.load_profile(PLUTUS_VM_PROFILE)
-
-
-class BuiltinTest(unittest.TestCase):
-    @given(xs=st.lists(st.booleans()))
-    def test_all(self, xs):
-        source_code = """
-def validator(x: List[bool]) -> bool:
-    return all(x)
-            """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(bool(ret), all(xs), "all returned wrong value")
-
-    @given(xs=st.lists(st.booleans()))
-    def test_any(self, xs):
-        source_code = """
-def validator(x: List[bool]) -> bool:
-    return any(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(bool(ret), any(xs), "any returned wrong value")
-
-    @given(i=st.integers())
-    def test_abs(self, i):
-        source_code = """
-def validator(x: int) -> int:
-    return abs(x)
-        """
-        ret = eval_uplc_value(source_code, i)
-        self.assertEqual(ret, abs(i), "abs returned wrong value")
-
-    @given(
-        xs=st.one_of(
-            st.lists(st.integers()), st.lists(st.integers(min_value=0, max_value=255))
-        )
-    )
-    def test_bytes_int_list(self, xs):
-        source_code = """
-def validator(x: List[int]) -> bytes:
-    return bytes(x)
-        """
-        try:
-            exp = bytes(xs)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "bytes (integer list) returned wrong value")
-
-    @given(x=st.integers(min_value=-1000, max_value=1000))
-    def test_bytes_int(self, x):
-        source_code = """
-def validator(x: int) -> bytes:
-    return bytes(x)
-        """
-        try:
-            exp = bytes(x)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "bytes (integer) returned wrong value")
-
-    @given(x=st.binary())
-    def test_bytes_bytes(self, x):
-        source_code = """
-def validator(x: bytes) -> bytes:
-    return bytes(x)
-        """
-        try:
-            exp = bytes(x)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "bytes (bytes) returned wrong value")
-
-    @given(i=st.integers())
-    @example(256)
-    @example(0)
-    def test_chr(self, i):
-        source_code = """
-def validator(x: int) -> str:
-    return chr(x)
-        """
-        # UPLC lambdas may only take one argument at a time, so we evaluate by repeatedly applying
-        try:
-            i_unicode = chr(i).encode("utf8")
-        except (ValueError, OverflowError):
-            i_unicode = None
-        try:
-            ret = eval_uplc_value(source_code, i)
-        except:
-            ret = None
-        self.assertEqual(ret, i_unicode, "chr returned wrong value")
-
-    @given(x=st.integers())
-    @example(0)
-    @example(-1)
-    @example(100)
-    def test_hex(self, x):
-        source_code = """
-def validator(x: int) -> str:
-    return hex(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret.decode("utf8"), hex(x), "hex returned wrong value")
-
-    @given(
-        xs=st.one_of(
-            st.builds(lambda x: str(x), st.integers()),
-            st.from_regex(r"\A(?!\s).*(?<!\s)\Z", fullmatch=True),
-        )
-    )
-    @example("")
-    @example("10_00")
-    @example("_")
-    @example("_1")
-    @example("-")
-    @example("+123")
-    @example("-_")
-    @example("0_")
-    # @example("0\n")  # stripping is broken
-    def test_int_string(self, xs: str):
-        source_code = """
-def validator(x: str) -> int:
-    return int(x)
-        """
-        try:
-            exp = int(xs)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs.encode("utf8"))
-        except Exception as e:
-            ret = None
-        self.assertEqual(ret, exp, "int (str) returned wrong value")
-
-    @given(xs=st.booleans())
-    def test_int_bool(self, xs: bool):
-        source_code = """
-def validator(x: bool) -> int:
-    return int(x)
-        """
-        try:
-            exp = int(xs)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "int (bool) returned wrong value")
-
-    @given(xs=st.integers())
-    def test_int_int(self, xs: int):
-        source_code = """
-def validator(x: int) -> int:
-    return int(x)
-        """
-        try:
-            exp = int(xs)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "int (int) returned wrong value")
-
-    @given(i=st.binary())
-    def test_len_bytestring(self, i):
-        source_code = """
-def validator(x: bytes) -> int:
-    return len(x)
-        """
-        # UPLC lambdas may only take one argument at a time, so we evaluate by repeatedly applying
-        ret = eval_uplc_value(source_code, i)
-        self.assertEqual(ret, len(i), "len (bytestring) returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_len_lists(self, xs):
-        source_code = """
-def validator(x: List[int]) -> int:
-    return len(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, len(xs), "len returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.integers()))
-    def test_len_dicts(self, xs):
-        source_code = """
-def validator(x: Dict[int, int]) -> int:
-    return len(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, len(xs), "len returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_len_tuples(self, xs):
-        source_code = f"""
-def validator(x: None) -> int:
-    return len(({", ".join(map(str, xs))}{"," if len(xs) == 1 else ""}))
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, len(xs), "len returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_max(self, xs):
-        source_code = """
-def validator(x: List[int]) -> int:
-    return max(x)
-        """
-        try:
-            exp = max(xs)
-        except:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "max returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_min(self, xs):
-        source_code = """
-def validator(x: List[int]) -> int:
-    return min(x)
-        """
-        try:
-            exp = min(xs)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "min returned wrong value")
-
-    @given(x=st.integers(), y=st.integers(min_value=0, max_value=20))
-    def test_pow(self, x: int, y: int):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return pow(x, y) % 10000000000
-        """
-        try:
-            exp = pow(x, y) % 10000000000
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "pow returned wrong value")
-
-    @given(x=st.integers(), y=st.integers(min_value=-20, max_value=-1))
-    def test_neg_pow(self, x: int, y: int):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return pow(x, y) % 10000000000
-        """
-        try:
-            eval_uplc_value(source_code, x, y)
-            fail = True
-        except Exception:
-            fail = False
-        self.assertFalse(fail, "pow worked on negative exponent")
-
-    @given(x=st.integers())
-    @example(0)
-    @example(-1)
-    @example(100)
-    def test_oct(self, x):
-        source_code = """
-def validator(x: int) -> str:
-    return oct(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret.decode("utf8"), oct(x), "oct returned wrong value")
-
-    @given(i=st.integers(max_value=100))
-    def test_range(self, i):
-        source_code = """
-def validator(x: int) -> List[int]:
-    return range(x)
-        """
-        ret = eval_uplc_value(source_code, i)
-        self.assertEqual(
-            [x.value for x in ret], list(range(i)), "sum returned wrong value"
-        )
-
-    @given(x=st.integers())
-    @example(0)
-    @example(-1)
-    @example(100)
-    def test_str_int(self, x):
-        source_code = """
-def validator(x: int) -> str:
-    return str(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret.decode("utf8"), str(x), "str returned wrong value")
-
-    @given(x=st.booleans())
-    def test_str_bool(self, x):
-        source_code = """
-def validator(x: bool) -> str:
-    return str(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret.decode("utf8"), str(x), "str returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_sum(self, xs):
-        source_code = """
-def validator(x: List[int]) -> int:
-    return sum(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, sum(xs), "sum returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_reversed(self, xs):
-        source_code = """
-def validator(x: List[int]) -> List[int]:
-    return reversed(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(
-            [r.value for r in ret], list(reversed(xs)), "reversed returned wrong value"
-        )
-
-    @given(x=st.integers())
-    def test_bool_constr_int(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), bool(x), "bool (int) returned wrong value")
-
-    @given(x=st.text())
-    def test_bool_constr_str(self, x):
-        source_code = """
-def validator(x: str) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, x.encode("utf8"))
-        self.assertEqual(bool(ret), bool(x), "bool (str) returned wrong value")
-
-    @given(x=st.binary())
-    def test_bool_constr_bytes(self, x):
-        source_code = """
-def validator(x: bytes) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), bool(x), "bool (bytes) returned wrong value")
-
-    @given(x=st.none())
-    def test_bool_constr_none(self, x):
-        source_code = """
-def validator(x: None) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(bool(ret), bool(x), "bool (none) returned wrong value")
-
-    @given(x=st.booleans())
-    def test_bool_constr_bool(self, x):
-        source_code = """
-def validator(x: bool) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), bool(x), "bool (bool) returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_bool_constr_list(self, xs):
-        source_code = """
-def validator(x: List[int]) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(bool(ret), bool(xs), "bool (list) returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_bool_constr_dict(self, xs):
-        source_code = """
-def validator(x: Dict[int, str]) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(bool(ret), bool(xs), "bool (list) returned wrong value")
-
-    @given(x=st.integers(), y=st.booleans(), z=st.none())
-    def test_print_compile(self, x, y, z):
-        source_code = """
-def validator(x: int, y: bool, z: None) -> None:
-    print(x, y, z)
-        """
-        eval_uplc(source_code, x, y, Unit())
-
-    @given(
-        i=st.one_of(
-            st.from_regex(r"[^\s]*", fullmatch=True),
-            st.builds(lambda x: x.hex(), st.binary()),
-            st.builds(lambda x: x.hex()[:-1], st.binary()),
-            st.builds(lambda x: x.hex().upper(), st.binary()),
-        )
-    )
-    @example("")
-    def test_fromhex(self, i):
-        source_code = """
-def validator(x: str) -> bytes:
-    return b"".fromhex(x)
-        """
-        try:
-            ret = eval_uplc_value(source_code, i.encode("utf8"))
-        except RuntimeError as e:
-            ret = None
-        try:
-            exp = bytes.fromhex(i)
-        except ValueError:
-            exp = None
-        self.assertEqual(ret, exp, "fromhex returned wrong value")
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class BuiltinTest -(methodName='runTest') -
-
-

A class whose instances are single test cases.

-

By default, the test code itself should be placed in a method named -'runTest'.

-

If the fixture may be used for many test cases, create as -many test methods as are needed. When instantiating such a TestCase -subclass, specify in the constructor arguments the name of the test method -that the instance is to execute.

-

Test authors should subclass TestCase for their own tests. Construction -and deconstruction of the test's environment ('fixture') can be -implemented by overriding the 'setUp' and 'tearDown' methods respectively.

-

If it is necessary to override the init method, the base class -init method must always be called. It is important that subclasses -should not change the signature of their init method, since instances -of the classes are instantiated automatically by parts of the framework -in order to be run.

-

When subclassing TestCase, you can set these attributes: -* failureException: determines which exception will be raised when -the instance's assertion methods fail; test methods raising this -exception will be deemed to have 'failed' rather than 'errored'. -* longMessage: determines whether long messages (including repr of -objects used in assert methods) will be printed on failure in addition -to any explicit message passed. -* maxDiff: sets the maximum length of a diff in failure messages -by assert methods using difflib. It is looked up as an instance -attribute so can be configured by individual tests if required.

-

Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

-
- -Expand source code - -
class BuiltinTest(unittest.TestCase):
-    @given(xs=st.lists(st.booleans()))
-    def test_all(self, xs):
-        source_code = """
-def validator(x: List[bool]) -> bool:
-    return all(x)
-            """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(bool(ret), all(xs), "all returned wrong value")
-
-    @given(xs=st.lists(st.booleans()))
-    def test_any(self, xs):
-        source_code = """
-def validator(x: List[bool]) -> bool:
-    return any(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(bool(ret), any(xs), "any returned wrong value")
-
-    @given(i=st.integers())
-    def test_abs(self, i):
-        source_code = """
-def validator(x: int) -> int:
-    return abs(x)
-        """
-        ret = eval_uplc_value(source_code, i)
-        self.assertEqual(ret, abs(i), "abs returned wrong value")
-
-    @given(
-        xs=st.one_of(
-            st.lists(st.integers()), st.lists(st.integers(min_value=0, max_value=255))
-        )
-    )
-    def test_bytes_int_list(self, xs):
-        source_code = """
-def validator(x: List[int]) -> bytes:
-    return bytes(x)
-        """
-        try:
-            exp = bytes(xs)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "bytes (integer list) returned wrong value")
-
-    @given(x=st.integers(min_value=-1000, max_value=1000))
-    def test_bytes_int(self, x):
-        source_code = """
-def validator(x: int) -> bytes:
-    return bytes(x)
-        """
-        try:
-            exp = bytes(x)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "bytes (integer) returned wrong value")
-
-    @given(x=st.binary())
-    def test_bytes_bytes(self, x):
-        source_code = """
-def validator(x: bytes) -> bytes:
-    return bytes(x)
-        """
-        try:
-            exp = bytes(x)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "bytes (bytes) returned wrong value")
-
-    @given(i=st.integers())
-    @example(256)
-    @example(0)
-    def test_chr(self, i):
-        source_code = """
-def validator(x: int) -> str:
-    return chr(x)
-        """
-        # UPLC lambdas may only take one argument at a time, so we evaluate by repeatedly applying
-        try:
-            i_unicode = chr(i).encode("utf8")
-        except (ValueError, OverflowError):
-            i_unicode = None
-        try:
-            ret = eval_uplc_value(source_code, i)
-        except:
-            ret = None
-        self.assertEqual(ret, i_unicode, "chr returned wrong value")
-
-    @given(x=st.integers())
-    @example(0)
-    @example(-1)
-    @example(100)
-    def test_hex(self, x):
-        source_code = """
-def validator(x: int) -> str:
-    return hex(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret.decode("utf8"), hex(x), "hex returned wrong value")
-
-    @given(
-        xs=st.one_of(
-            st.builds(lambda x: str(x), st.integers()),
-            st.from_regex(r"\A(?!\s).*(?<!\s)\Z", fullmatch=True),
-        )
-    )
-    @example("")
-    @example("10_00")
-    @example("_")
-    @example("_1")
-    @example("-")
-    @example("+123")
-    @example("-_")
-    @example("0_")
-    # @example("0\n")  # stripping is broken
-    def test_int_string(self, xs: str):
-        source_code = """
-def validator(x: str) -> int:
-    return int(x)
-        """
-        try:
-            exp = int(xs)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs.encode("utf8"))
-        except Exception as e:
-            ret = None
-        self.assertEqual(ret, exp, "int (str) returned wrong value")
-
-    @given(xs=st.booleans())
-    def test_int_bool(self, xs: bool):
-        source_code = """
-def validator(x: bool) -> int:
-    return int(x)
-        """
-        try:
-            exp = int(xs)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "int (bool) returned wrong value")
-
-    @given(xs=st.integers())
-    def test_int_int(self, xs: int):
-        source_code = """
-def validator(x: int) -> int:
-    return int(x)
-        """
-        try:
-            exp = int(xs)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "int (int) returned wrong value")
-
-    @given(i=st.binary())
-    def test_len_bytestring(self, i):
-        source_code = """
-def validator(x: bytes) -> int:
-    return len(x)
-        """
-        # UPLC lambdas may only take one argument at a time, so we evaluate by repeatedly applying
-        ret = eval_uplc_value(source_code, i)
-        self.assertEqual(ret, len(i), "len (bytestring) returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_len_lists(self, xs):
-        source_code = """
-def validator(x: List[int]) -> int:
-    return len(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, len(xs), "len returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.integers()))
-    def test_len_dicts(self, xs):
-        source_code = """
-def validator(x: Dict[int, int]) -> int:
-    return len(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, len(xs), "len returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_len_tuples(self, xs):
-        source_code = f"""
-def validator(x: None) -> int:
-    return len(({", ".join(map(str, xs))}{"," if len(xs) == 1 else ""}))
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, len(xs), "len returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_max(self, xs):
-        source_code = """
-def validator(x: List[int]) -> int:
-    return max(x)
-        """
-        try:
-            exp = max(xs)
-        except:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "max returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_min(self, xs):
-        source_code = """
-def validator(x: List[int]) -> int:
-    return min(x)
-        """
-        try:
-            exp = min(xs)
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "min returned wrong value")
-
-    @given(x=st.integers(), y=st.integers(min_value=0, max_value=20))
-    def test_pow(self, x: int, y: int):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return pow(x, y) % 10000000000
-        """
-        try:
-            exp = pow(x, y) % 10000000000
-        except ValueError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "pow returned wrong value")
-
-    @given(x=st.integers(), y=st.integers(min_value=-20, max_value=-1))
-    def test_neg_pow(self, x: int, y: int):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return pow(x, y) % 10000000000
-        """
-        try:
-            eval_uplc_value(source_code, x, y)
-            fail = True
-        except Exception:
-            fail = False
-        self.assertFalse(fail, "pow worked on negative exponent")
-
-    @given(x=st.integers())
-    @example(0)
-    @example(-1)
-    @example(100)
-    def test_oct(self, x):
-        source_code = """
-def validator(x: int) -> str:
-    return oct(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret.decode("utf8"), oct(x), "oct returned wrong value")
-
-    @given(i=st.integers(max_value=100))
-    def test_range(self, i):
-        source_code = """
-def validator(x: int) -> List[int]:
-    return range(x)
-        """
-        ret = eval_uplc_value(source_code, i)
-        self.assertEqual(
-            [x.value for x in ret], list(range(i)), "sum returned wrong value"
-        )
-
-    @given(x=st.integers())
-    @example(0)
-    @example(-1)
-    @example(100)
-    def test_str_int(self, x):
-        source_code = """
-def validator(x: int) -> str:
-    return str(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret.decode("utf8"), str(x), "str returned wrong value")
-
-    @given(x=st.booleans())
-    def test_str_bool(self, x):
-        source_code = """
-def validator(x: bool) -> str:
-    return str(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret.decode("utf8"), str(x), "str returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_sum(self, xs):
-        source_code = """
-def validator(x: List[int]) -> int:
-    return sum(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, sum(xs), "sum returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_reversed(self, xs):
-        source_code = """
-def validator(x: List[int]) -> List[int]:
-    return reversed(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(
-            [r.value for r in ret], list(reversed(xs)), "reversed returned wrong value"
-        )
-
-    @given(x=st.integers())
-    def test_bool_constr_int(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), bool(x), "bool (int) returned wrong value")
-
-    @given(x=st.text())
-    def test_bool_constr_str(self, x):
-        source_code = """
-def validator(x: str) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, x.encode("utf8"))
-        self.assertEqual(bool(ret), bool(x), "bool (str) returned wrong value")
-
-    @given(x=st.binary())
-    def test_bool_constr_bytes(self, x):
-        source_code = """
-def validator(x: bytes) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), bool(x), "bool (bytes) returned wrong value")
-
-    @given(x=st.none())
-    def test_bool_constr_none(self, x):
-        source_code = """
-def validator(x: None) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(bool(ret), bool(x), "bool (none) returned wrong value")
-
-    @given(x=st.booleans())
-    def test_bool_constr_bool(self, x):
-        source_code = """
-def validator(x: bool) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), bool(x), "bool (bool) returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    def test_bool_constr_list(self, xs):
-        source_code = """
-def validator(x: List[int]) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(bool(ret), bool(xs), "bool (list) returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_bool_constr_dict(self, xs):
-        source_code = """
-def validator(x: Dict[int, str]) -> bool:
-    return bool(x)
-        """
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(bool(ret), bool(xs), "bool (list) returned wrong value")
-
-    @given(x=st.integers(), y=st.booleans(), z=st.none())
-    def test_print_compile(self, x, y, z):
-        source_code = """
-def validator(x: int, y: bool, z: None) -> None:
-    print(x, y, z)
-        """
-        eval_uplc(source_code, x, y, Unit())
-
-    @given(
-        i=st.one_of(
-            st.from_regex(r"[^\s]*", fullmatch=True),
-            st.builds(lambda x: x.hex(), st.binary()),
-            st.builds(lambda x: x.hex()[:-1], st.binary()),
-            st.builds(lambda x: x.hex().upper(), st.binary()),
-        )
-    )
-    @example("")
-    def test_fromhex(self, i):
-        source_code = """
-def validator(x: str) -> bytes:
-    return b"".fromhex(x)
-        """
-        try:
-            ret = eval_uplc_value(source_code, i.encode("utf8"))
-        except RuntimeError as e:
-            ret = None
-        try:
-            exp = bytes.fromhex(i)
-        except ValueError:
-            exp = None
-        self.assertEqual(ret, exp, "fromhex returned wrong value")
-
-

Ancestors

-
    -
  • unittest.case.TestCase
  • -
-

Methods

-
-
-def test_abs(self) ‑> None -
-
-
-
-
-def test_all(self) ‑> None -
-
-
-
-
-def test_any(self) ‑> None -
-
-
-
-
-def test_bool_constr_bool(self) ‑> None -
-
-
-
-
-def test_bool_constr_bytes(self) ‑> None -
-
-
-
-
-def test_bool_constr_dict(self) ‑> None -
-
-
-
-
-def test_bool_constr_int(self) ‑> None -
-
-
-
-
-def test_bool_constr_list(self) ‑> None -
-
-
-
-
-def test_bool_constr_none(self) ‑> None -
-
-
-
-
-def test_bool_constr_str(self) ‑> None -
-
-
-
-
-def test_bytes_bytes(self) ‑> None -
-
-
-
-
-def test_bytes_int(self) ‑> None -
-
-
-
-
-def test_bytes_int_list(self) ‑> None -
-
-
-
-
-def test_chr(self) ‑> None -
-
-
-
-
-def test_fromhex(self) ‑> None -
-
-
-
-
-def test_hex(self) ‑> None -
-
-
-
-
-def test_int_bool(self) ‑> None -
-
-
-
-
-def test_int_int(self) ‑> None -
-
-
-
-
-def test_int_string(self) ‑> None -
-
-
-
-
-def test_len_bytestring(self) ‑> None -
-
-
-
-
-def test_len_dicts(self) ‑> None -
-
-
-
-
-def test_len_lists(self) ‑> None -
-
-
-
-
-def test_len_tuples(self) ‑> None -
-
-
-
-
-def test_max(self) ‑> None -
-
-
-
-
-def test_min(self) ‑> None -
-
-
-
-
-def test_neg_pow(self) ‑> None -
-
-
-
-
-def test_oct(self) ‑> None -
-
-
-
-
-def test_pow(self) ‑> None -
-
-
-
-
-def test_print_compile(self) ‑> None -
-
-
-
-
-def test_range(self) ‑> None -
-
-
-
-
-def test_reversed(self) ‑> None -
-
-
-
-
-def test_str_bool(self) ‑> None -
-
-
-
-
-def test_str_int(self) ‑> None -
-
-
-
-
-def test_sum(self) ‑> None -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_class_methods.html b/docs/opshin/tests/test_class_methods.html deleted file mode 100644 index 08a197ba..00000000 --- a/docs/opshin/tests/test_class_methods.html +++ /dev/null @@ -1,1438 +0,0 @@ - - - - - - - - -opshin.tests.test_class_methods API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_class_methods

-
-
-
- -Expand source code - -
import unittest
-
-import hypothesis
-from hypothesis import given
-from hypothesis import strategies as st
-from .utils import eval_uplc_value
-from . import PLUTUS_VM_PROFILE
-from opshin.util import CompilerError
-
-hypothesis.settings.load_profile(PLUTUS_VM_PROFILE)
-
-
-class Classmethod_tests(unittest.TestCase):
-    @given(x=st.integers(), y=st.integers())
-    def test_accessible_attributes(self, x: int, y: int):
-        source_code = """
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    b: int
-
-    def sum(self) -> int:
-        return self.a + self.b
-
-def validator(a: int, b: int) -> int:
-    foo = Foo(a, b)
-    return foo.sum()
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x + y)
-
-    def test_instance_method_only(self, x=5, y=6):
-        source_code = """
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    b: int
-
-    def sum(self) -> int:
-        return self.a + self.b
-
-def validator(a: int, b: int) -> int:
-    return Foo.sum()
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, x, y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_le_dunder(self, x: int, y: int):
-        source_code = """
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __le__(self, other:int) -> bool:
-        return self.a <= other
-
-def validator(a: int, b: int) -> bool:
-    foo1 = Foo(a)
-    return foo1 <= b
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x <= y)
-
-    def test_invalid_python(self, x=5, y=6):
-        source_code = """
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __ge__(self, other: Foo) -> bool:
-        return self.a >= other.a
-
-def validator(a: int, b: int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 >= foo2
-"""
-        with self.assertRaises(CompilerError):
-            ret = eval_uplc_value(source_code, x, y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_Self_arguments(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __ge__(self, other: Self) -> bool:
-        return self.a >= other.a
-
-def validator(a: int, b: int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 >= foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x >= y)
-
-    def test_Self_return(self):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def get_me(self) -> Self:
-        return self
-
-def validator(b:int) -> int:
-    foo1 = Foo(b)
-    return foo1.get_me().a
-"""
-        ret = eval_uplc_value(source_code, 5)
-        self.assertEqual(ret, 5)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_externally_bound_variables_scope(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def larger(self, other:Self) -> Self:
-        if self.a>other.a:
-            return self
-        else:
-            return other
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1.larger(foo2).a
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, max(x, y))
-
-    @given(x=st.integers(), y=st.integers())
-    def test_eq_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __eq__(self, other:Self) -> bool:
-        return self.a==other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 == foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_ne_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __ne__(self, other:Self) -> bool:
-        return self.a!=other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 != foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_lt_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __lt__(self, other:Self) -> bool:
-        return self.a<other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 < foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x < y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_le_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __le__(self, other:Self) -> bool:
-        return self.a<=other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 <= foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x <= y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_gt_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __gt__(self, other:Self) -> bool:
-        return self.a>other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 > foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x > y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_ge_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __ge__(self, other:Self) -> bool:
-        return self.a>=other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 >= foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x >= y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_add_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __add__(self, other:Self) -> int:
-        return self.a + other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 + foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x + y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_sub_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __sub__(self, other:Self) -> int:
-        return self.a - other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 - foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x - y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_mul_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __mul__(self, other:Self) -> int:
-        return self.a * other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 * foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x * y)
-
-    @given(x=st.integers(), y=st.integers().filter(lambda x: x != 0))
-    def test_floordiv_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __floordiv__(self, other:Self) -> int:
-        return self.a // other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 // foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x // y)
-
-    @given(x=st.integers(), y=st.integers().filter(lambda x: x != 0))
-    def test_mod_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __mod__(self, other:Self) -> int:
-        return self.a % other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 % foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x % y)
-
-    @given(
-        x=st.integers(min_value=-1000, max_value=1000),
-        y=st.integers(min_value=0, max_value=4),
-    )
-    def test_pow_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __pow__(self, other:Self) -> int:
-        return self.a ** other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 ** foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x**y)
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers(), a=st.integers())
-    def test_matmul_dunder(self, x: int, y: int, z: int, a: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    b: int
-    
-    def __matmul__(self, other:Self) -> int:
-        return self.a * other.a + self.b*other.b
-
-def validator(a:int, b:int, c: int, d:int) -> int:
-    foo1 = Foo(a,b)
-    foo2 = Foo(c,d)
-    return foo1 @ foo2
-"""
-        ret = eval_uplc_value(source_code, x, y, z, a)
-        self.assertEqual(ret, x * z + y * a)
-
-    def test_unsupported_dunder(
-        self,
-    ):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    def __init__(self) -> None:
-        pass
-
-    def __add__(self, other:Self) -> int:
-        return self.a + other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 + foo2
-"""
-        with self.assertRaises(CompilerError):
-            ret = eval_uplc_value(source_code, 5, 6)
-
-    @given(x=st.integers(), y=st.integers().filter(lambda x: x != 0))
-    def test_truediv_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __truediv__(self, other:Self) -> int:
-        #map true div to floordiv
-        return self.a // other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 / foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x // y)
-
-    def test_not_dunder(self):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __bool__(self,) -> bool:
-        return self.a!=0
-
-def validator(a: int) -> bool:
-    foo1 = Foo(a)
-    return not foo1
-"""
-        ret = eval_uplc_value(source_code, 3)
-        self.assertEqual(ret, False)
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, True)
-
-    @given(x=st.integers())
-    def test_neg_dunder(self, x: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __neg__(self,) -> int:
-        return -self.a
-
-def validator(a: int) -> int:
-    foo1 = Foo(a)
-    return -foo1
-"""
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret, -x)
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_in_dunder(self, x: int, y: int, z: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    b: int
-
-    def __contains__(self, c: int) -> bool:
-        return self.a==c or self.b==c
-
-def validator(a: int, b: int, c:int) -> bool:
-    foo1 = Foo(a, b)
-    return c in foo1
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, z in [x, y])
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_Notin_dunder(self, x: int, y: int, z: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    b: int
-
-    def __contains__(self, c: int) -> bool:
-        return self.a==c or self.b==c
-
-def validator(a: int, b: int, c:int) -> bool:
-    foo1 = Foo(a, b)
-    return c not in foo1
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, z not in [x, y])
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Classmethod_tests -(methodName='runTest') -
-
-

A class whose instances are single test cases.

-

By default, the test code itself should be placed in a method named -'runTest'.

-

If the fixture may be used for many test cases, create as -many test methods as are needed. When instantiating such a TestCase -subclass, specify in the constructor arguments the name of the test method -that the instance is to execute.

-

Test authors should subclass TestCase for their own tests. Construction -and deconstruction of the test's environment ('fixture') can be -implemented by overriding the 'setUp' and 'tearDown' methods respectively.

-

If it is necessary to override the init method, the base class -init method must always be called. It is important that subclasses -should not change the signature of their init method, since instances -of the classes are instantiated automatically by parts of the framework -in order to be run.

-

When subclassing TestCase, you can set these attributes: -* failureException: determines which exception will be raised when -the instance's assertion methods fail; test methods raising this -exception will be deemed to have 'failed' rather than 'errored'. -* longMessage: determines whether long messages (including repr of -objects used in assert methods) will be printed on failure in addition -to any explicit message passed. -* maxDiff: sets the maximum length of a diff in failure messages -by assert methods using difflib. It is looked up as an instance -attribute so can be configured by individual tests if required.

-

Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

-
- -Expand source code - -
class Classmethod_tests(unittest.TestCase):
-    @given(x=st.integers(), y=st.integers())
-    def test_accessible_attributes(self, x: int, y: int):
-        source_code = """
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    b: int
-
-    def sum(self) -> int:
-        return self.a + self.b
-
-def validator(a: int, b: int) -> int:
-    foo = Foo(a, b)
-    return foo.sum()
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x + y)
-
-    def test_instance_method_only(self, x=5, y=6):
-        source_code = """
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    b: int
-
-    def sum(self) -> int:
-        return self.a + self.b
-
-def validator(a: int, b: int) -> int:
-    return Foo.sum()
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, x, y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_le_dunder(self, x: int, y: int):
-        source_code = """
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __le__(self, other:int) -> bool:
-        return self.a <= other
-
-def validator(a: int, b: int) -> bool:
-    foo1 = Foo(a)
-    return foo1 <= b
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x <= y)
-
-    def test_invalid_python(self, x=5, y=6):
-        source_code = """
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __ge__(self, other: Foo) -> bool:
-        return self.a >= other.a
-
-def validator(a: int, b: int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 >= foo2
-"""
-        with self.assertRaises(CompilerError):
-            ret = eval_uplc_value(source_code, x, y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_Self_arguments(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __ge__(self, other: Self) -> bool:
-        return self.a >= other.a
-
-def validator(a: int, b: int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 >= foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x >= y)
-
-    def test_Self_return(self):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def get_me(self) -> Self:
-        return self
-
-def validator(b:int) -> int:
-    foo1 = Foo(b)
-    return foo1.get_me().a
-"""
-        ret = eval_uplc_value(source_code, 5)
-        self.assertEqual(ret, 5)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_externally_bound_variables_scope(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def larger(self, other:Self) -> Self:
-        if self.a>other.a:
-            return self
-        else:
-            return other
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1.larger(foo2).a
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, max(x, y))
-
-    @given(x=st.integers(), y=st.integers())
-    def test_eq_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __eq__(self, other:Self) -> bool:
-        return self.a==other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 == foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_ne_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __ne__(self, other:Self) -> bool:
-        return self.a!=other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 != foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_lt_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __lt__(self, other:Self) -> bool:
-        return self.a<other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 < foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x < y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_le_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __le__(self, other:Self) -> bool:
-        return self.a<=other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 <= foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x <= y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_gt_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __gt__(self, other:Self) -> bool:
-        return self.a>other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 > foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x > y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_ge_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __ge__(self, other:Self) -> bool:
-        return self.a>=other.a
-
-def validator(a:int, b:int) -> bool:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 >= foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x >= y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_add_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __add__(self, other:Self) -> int:
-        return self.a + other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 + foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x + y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_sub_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __sub__(self, other:Self) -> int:
-        return self.a - other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 - foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x - y)
-
-    @given(x=st.integers(), y=st.integers())
-    def test_mul_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __mul__(self, other:Self) -> int:
-        return self.a * other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 * foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x * y)
-
-    @given(x=st.integers(), y=st.integers().filter(lambda x: x != 0))
-    def test_floordiv_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __floordiv__(self, other:Self) -> int:
-        return self.a // other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 // foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x // y)
-
-    @given(x=st.integers(), y=st.integers().filter(lambda x: x != 0))
-    def test_mod_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __mod__(self, other:Self) -> int:
-        return self.a % other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 % foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x % y)
-
-    @given(
-        x=st.integers(min_value=-1000, max_value=1000),
-        y=st.integers(min_value=0, max_value=4),
-    )
-    def test_pow_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __pow__(self, other:Self) -> int:
-        return self.a ** other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 ** foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x**y)
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers(), a=st.integers())
-    def test_matmul_dunder(self, x: int, y: int, z: int, a: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    b: int
-    
-    def __matmul__(self, other:Self) -> int:
-        return self.a * other.a + self.b*other.b
-
-def validator(a:int, b:int, c: int, d:int) -> int:
-    foo1 = Foo(a,b)
-    foo2 = Foo(c,d)
-    return foo1 @ foo2
-"""
-        ret = eval_uplc_value(source_code, x, y, z, a)
-        self.assertEqual(ret, x * z + y * a)
-
-    def test_unsupported_dunder(
-        self,
-    ):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    def __init__(self) -> None:
-        pass
-
-    def __add__(self, other:Self) -> int:
-        return self.a + other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 + foo2
-"""
-        with self.assertRaises(CompilerError):
-            ret = eval_uplc_value(source_code, 5, 6)
-
-    @given(x=st.integers(), y=st.integers().filter(lambda x: x != 0))
-    def test_truediv_dunder(self, x: int, y: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __truediv__(self, other:Self) -> int:
-        #map true div to floordiv
-        return self.a // other.a
-
-def validator(a:int, b:int) -> int:
-    foo1 = Foo(a)
-    foo2 = Foo(b)
-    return foo1 / foo2
-"""
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x // y)
-
-    def test_not_dunder(self):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __bool__(self,) -> bool:
-        return self.a!=0
-
-def validator(a: int) -> bool:
-    foo1 = Foo(a)
-    return not foo1
-"""
-        ret = eval_uplc_value(source_code, 3)
-        self.assertEqual(ret, False)
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, True)
-
-    @given(x=st.integers())
-    def test_neg_dunder(self, x: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-
-    def __neg__(self,) -> int:
-        return -self.a
-
-def validator(a: int) -> int:
-    foo1 = Foo(a)
-    return -foo1
-"""
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret, -x)
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_in_dunder(self, x: int, y: int, z: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    b: int
-
-    def __contains__(self, c: int) -> bool:
-        return self.a==c or self.b==c
-
-def validator(a: int, b: int, c:int) -> bool:
-    foo1 = Foo(a, b)
-    return c in foo1
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, z in [x, y])
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_Notin_dunder(self, x: int, y: int, z: int):
-        source_code = """
-from typing import Self
-from opshin.prelude import *
-@dataclass()
-class Foo(PlutusData):
-    a: int
-    b: int
-
-    def __contains__(self, c: int) -> bool:
-        return self.a==c or self.b==c
-
-def validator(a: int, b: int, c:int) -> bool:
-    foo1 = Foo(a, b)
-    return c not in foo1
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, z not in [x, y])
-
-

Ancestors

-
    -
  • unittest.case.TestCase
  • -
-

Methods

-
-
-def test_Notin_dunder(self) ‑> None -
-
-
-
-
-def test_Self_arguments(self) ‑> None -
-
-
-
-
-def test_Self_return(self) -
-
-
-
-
-def test_accessible_attributes(self) ‑> None -
-
-
-
-
-def test_add_dunder(self) ‑> None -
-
-
-
-
-def test_eq_dunder(self) ‑> None -
-
-
-
-
-def test_externally_bound_variables_scope(self) ‑> None -
-
-
-
-
-def test_floordiv_dunder(self) ‑> None -
-
-
-
-
-def test_ge_dunder(self) ‑> None -
-
-
-
-
-def test_gt_dunder(self) ‑> None -
-
-
-
-
-def test_in_dunder(self) ‑> None -
-
-
-
-
-def test_instance_method_only(self, x=5, y=6) -
-
-
-
-
-def test_invalid_python(self, x=5, y=6) -
-
-
-
-
-def test_le_dunder(self) ‑> None -
-
-
-
-
-def test_lt_dunder(self) ‑> None -
-
-
-
-
-def test_matmul_dunder(self) ‑> None -
-
-
-
-
-def test_mod_dunder(self) ‑> None -
-
-
-
-
-def test_mul_dunder(self) ‑> None -
-
-
-
-
-def test_ne_dunder(self) ‑> None -
-
-
-
-
-def test_neg_dunder(self) ‑> None -
-
-
-
-
-def test_not_dunder(self) -
-
-
-
-
-def test_pow_dunder(self) ‑> None -
-
-
-
-
-def test_sub_dunder(self) ‑> None -
-
-
-
-
-def test_truediv_dunder(self) ‑> None -
-
-
-
-
-def test_unsupported_dunder(self) -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_hashlib.html b/docs/opshin/tests/test_hashlib.html deleted file mode 100644 index 90ce33c1..00000000 --- a/docs/opshin/tests/test_hashlib.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - -opshin.tests.test_hashlib API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_hashlib

-
-
-
- -Expand source code - -
import hypothesis
-import hypothesis.strategies as hst
-from hashlib import sha256, sha3_256, blake2b
-
-from .utils import eval_uplc_value
-
-pos_int = hst.integers(min_value=0)
-
-
-@hypothesis.given(hst.binary())
-def test_sha256(b: bytes):
-    source_code = """
-from hashlib import sha256
-def validator(b: bytes) -> bytes:
-    return sha256(b).digest()
-"""
-    res = eval_uplc_value(source_code, b)
-    exp = sha256(b).digest()
-    assert res == exp, "Invalid implementation of sha256"
-
-
-@hypothesis.given(hst.binary())
-def test_sha3_256(b: bytes):
-    source_code = """
-from hashlib import sha3_256
-def validator(b: bytes) -> bytes:
-    return sha3_256(b).digest()
-"""
-    res = eval_uplc_value(source_code, b)
-    exp = sha3_256(b).digest()
-    assert res == exp, "Invalid implementation of sha3_256"
-
-
-@hypothesis.given(hst.binary())
-def test_blake2b(b: bytes):
-    source_code = """
-from hashlib import blake2b
-def validator(b: bytes) -> bytes:
-    return blake2b(b).digest()
-"""
-    res = eval_uplc_value(source_code, b)
-    # TODO this is an error in the semantics, strictly speaking
-    exp = blake2b(b, digest_size=32).digest()
-    assert res == exp, "Invalid implementation of blake2b"
-
-
-
-
-
-
-
-

Functions

-
-
-def test_blake2b() ‑> None -
-
-
-
-
-def test_sha256() ‑> None -
-
-
-
-
-def test_sha3_256() ‑> None -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_keywords.html b/docs/opshin/tests/test_keywords.html deleted file mode 100644 index 7531a199..00000000 --- a/docs/opshin/tests/test_keywords.html +++ /dev/null @@ -1,592 +0,0 @@ - - - - - - - - -opshin.tests.test_keywords API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_keywords

-
-
-
- -Expand source code - -
import unittest
-
-import hypothesis
-from hypothesis import given
-from hypothesis import strategies as st
-from .utils import eval_uplc_value
-from . import PLUTUS_VM_PROFILE
-
-
-hypothesis.settings.load_profile(PLUTUS_VM_PROFILE)
-
-
-class Keyword_tests(unittest.TestCase):
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_all_keywords(self, x: int, y: int, z: int):
-        source_code = """
-def simple_example(x: int, y: int, z: int) -> int:
-    return (x-y)*z
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(x=a, y=b, z=c)
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, (x - y) * z)
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_mixture_args_and_keywords(self, x: int, y: int, z: int):
-        source_code = """
-def simple_example(x: int, y: int, z: int) -> int:
-    return (x-y)*z
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(a, b, z=c)
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, (x - y) * z)
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_keyword_position_independence(self, x: int, y: int, z: int):
-        source_code = """
-def simple_example(x: int, y: int, z:int) -> int:
-    return (x-y)*z
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(z=c, x=a, y=b)
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, (x - y) * z)
-
-    def test_arg_after_keyword_failure(self):
-        source_code = """
-def simple_example(x: int, y: int, z:int) -> int:
-    return (x-y)*z
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(x=a, y=b, c)
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, 1, 2, 3)
-
-    def test_too_many_keywords_failure(self):
-        source_code = """
-def simple_example(x: int, y: int) -> int:
-    return x-y
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(x=a, y=b, z=c)
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, 1, 2, 3)
-
-    def test_incorrect_keywords_failure(self):
-        source_code = """
-def simple_example(x: int, y: int, z: int) -> int:
-    return (x-y)*z
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(x=a, y=b, k=c)
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, 1, 2, 3)
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_correct_scope(self, x: int, y: int, z: int):
-        source_code = """
-def simple_example(x: int, y: int, z: int) -> int:
-    def simple_example(new_x: int, new_z: int) -> int:
-        return new_x-new_z
-    return simple_example(new_x = x, new_z = z) * y
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(x=a, y=b, z=c)
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, (x - z) * y)
-
-    def test_type_mismatch(self):
-        source_code = """
-def simple_example(x: int, y: int, z: int) -> int:
-    return x * y + z
-
-def validator(a: int, b: bytes, c: int) -> int:
-    return simple_example(x=a, y=b, z=c)
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, 1, 2, 3)
-
-    @given(x=st.integers())
-    def test_class_keywords(self, x: int):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass
-class A(PlutusData):
-    x: int
-    y: int
-    z: int
-    
-
-
-def validator(a: int, b: int, c: int) -> int:
-    return A(x=a, y=b, z=c).x
-"""
-        ret = eval_uplc_value(source_code, x, 2, 3)
-        self.assertEqual(ret, x)
-
-    @given(x=st.integers())
-    def test_class_keywords_reorder(self, x: int):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass
-class A(PlutusData):
-    x: int
-    y: int
-    z: int
-
-def validator(a: int, b: int, c: int) -> int:
-    return A(y=a, z=b, x=c).x
-"""
-        ret = eval_uplc_value(source_code, 1, 2, x)
-        self.assertEqual(ret, x)
-
-    def test_class_keywords_invalid(self):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass
-class A(PlutusData):
-    x: int
-    y: int
-    z: int
-
-def validator(a: int, b: bytes, c: int) -> int:
-    return A(x=a, y=b, z=c).x
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, 1, b"2", 3)
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class Keyword_tests -(methodName='runTest') -
-
-

A class whose instances are single test cases.

-

By default, the test code itself should be placed in a method named -'runTest'.

-

If the fixture may be used for many test cases, create as -many test methods as are needed. When instantiating such a TestCase -subclass, specify in the constructor arguments the name of the test method -that the instance is to execute.

-

Test authors should subclass TestCase for their own tests. Construction -and deconstruction of the test's environment ('fixture') can be -implemented by overriding the 'setUp' and 'tearDown' methods respectively.

-

If it is necessary to override the init method, the base class -init method must always be called. It is important that subclasses -should not change the signature of their init method, since instances -of the classes are instantiated automatically by parts of the framework -in order to be run.

-

When subclassing TestCase, you can set these attributes: -* failureException: determines which exception will be raised when -the instance's assertion methods fail; test methods raising this -exception will be deemed to have 'failed' rather than 'errored'. -* longMessage: determines whether long messages (including repr of -objects used in assert methods) will be printed on failure in addition -to any explicit message passed. -* maxDiff: sets the maximum length of a diff in failure messages -by assert methods using difflib. It is looked up as an instance -attribute so can be configured by individual tests if required.

-

Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

-
- -Expand source code - -
class Keyword_tests(unittest.TestCase):
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_all_keywords(self, x: int, y: int, z: int):
-        source_code = """
-def simple_example(x: int, y: int, z: int) -> int:
-    return (x-y)*z
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(x=a, y=b, z=c)
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, (x - y) * z)
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_mixture_args_and_keywords(self, x: int, y: int, z: int):
-        source_code = """
-def simple_example(x: int, y: int, z: int) -> int:
-    return (x-y)*z
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(a, b, z=c)
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, (x - y) * z)
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_keyword_position_independence(self, x: int, y: int, z: int):
-        source_code = """
-def simple_example(x: int, y: int, z:int) -> int:
-    return (x-y)*z
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(z=c, x=a, y=b)
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, (x - y) * z)
-
-    def test_arg_after_keyword_failure(self):
-        source_code = """
-def simple_example(x: int, y: int, z:int) -> int:
-    return (x-y)*z
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(x=a, y=b, c)
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, 1, 2, 3)
-
-    def test_too_many_keywords_failure(self):
-        source_code = """
-def simple_example(x: int, y: int) -> int:
-    return x-y
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(x=a, y=b, z=c)
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, 1, 2, 3)
-
-    def test_incorrect_keywords_failure(self):
-        source_code = """
-def simple_example(x: int, y: int, z: int) -> int:
-    return (x-y)*z
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(x=a, y=b, k=c)
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, 1, 2, 3)
-
-    @given(x=st.integers(), y=st.integers(), z=st.integers())
-    def test_correct_scope(self, x: int, y: int, z: int):
-        source_code = """
-def simple_example(x: int, y: int, z: int) -> int:
-    def simple_example(new_x: int, new_z: int) -> int:
-        return new_x-new_z
-    return simple_example(new_x = x, new_z = z) * y
-
-def validator(a: int, b: int, c: int) -> int:
-    return simple_example(x=a, y=b, z=c)
-"""
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, (x - z) * y)
-
-    def test_type_mismatch(self):
-        source_code = """
-def simple_example(x: int, y: int, z: int) -> int:
-    return x * y + z
-
-def validator(a: int, b: bytes, c: int) -> int:
-    return simple_example(x=a, y=b, z=c)
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, 1, 2, 3)
-
-    @given(x=st.integers())
-    def test_class_keywords(self, x: int):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass
-class A(PlutusData):
-    x: int
-    y: int
-    z: int
-    
-
-
-def validator(a: int, b: int, c: int) -> int:
-    return A(x=a, y=b, z=c).x
-"""
-        ret = eval_uplc_value(source_code, x, 2, 3)
-        self.assertEqual(ret, x)
-
-    @given(x=st.integers())
-    def test_class_keywords_reorder(self, x: int):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass
-class A(PlutusData):
-    x: int
-    y: int
-    z: int
-
-def validator(a: int, b: int, c: int) -> int:
-    return A(y=a, z=b, x=c).x
-"""
-        ret = eval_uplc_value(source_code, 1, 2, x)
-        self.assertEqual(ret, x)
-
-    def test_class_keywords_invalid(self):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass
-class A(PlutusData):
-    x: int
-    y: int
-    z: int
-
-def validator(a: int, b: bytes, c: int) -> int:
-    return A(x=a, y=b, z=c).x
-"""
-        with self.assertRaises(Exception):
-            ret = eval_uplc_value(source_code, 1, b"2", 3)
-
-

Ancestors

-
    -
  • unittest.case.TestCase
  • -
-

Methods

-
-
-def test_all_keywords(self) ‑> None -
-
-
-
-
-def test_arg_after_keyword_failure(self) -
-
-
-
-
-def test_class_keywords(self) ‑> None -
-
-
-
-
-def test_class_keywords_invalid(self) -
-
-
-
-
-def test_class_keywords_reorder(self) ‑> None -
-
-
-
-
-def test_correct_scope(self) ‑> None -
-
-
-
-
-def test_incorrect_keywords_failure(self) -
-
-
-
-
-def test_keyword_position_independence(self) ‑> None -
-
-
-
-
-def test_mixture_args_and_keywords(self) ‑> None -
-
-
-
-
-def test_too_many_keywords_failure(self) -
-
-
-
-
-def test_type_mismatch(self) -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_ledger/index.html b/docs/opshin/tests/test_ledger/index.html deleted file mode 100644 index bc7f8b74..00000000 --- a/docs/opshin/tests/test_ledger/index.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - -opshin.tests.test_ledger API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_ledger

-
-
-
-
-

Sub-modules

-
-
opshin.tests.test_ledger.test_api_v2
-
-
-
-
opshin.tests.test_ledger.test_interval
-
-
-
-
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_ledger/test_api_v2.html b/docs/opshin/tests/test_ledger/test_api_v2.html deleted file mode 100644 index 7750c931..00000000 --- a/docs/opshin/tests/test_ledger/test_api_v2.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - -opshin.tests.test_ledger.test_api_v2 API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_ledger.test_api_v2

-
-
-
- -Expand source code - -
from parameterized import parameterized
-
-from opshin.ledger.api_v2 import *
-
-
-@parameterized.expand(
-    [
-        (
-            "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-        ),
-        (
-            "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820797a1e1720b63621c6b185088184cb8e23af6e46b55bd83e7a91024c823a6c2affffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-        ),
-        (
-            "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a1401a000f4240d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff9f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffa1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820c17c32f6433ae22c2acaebfb796bbfaee3993ff7ebb58a2bac6b4a3bdd2f6d28ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-        ),
-    ]
-)
-def test_script_context_repr_correct(p):
-    # Make sure that this parses correctly and does not throw an error
-    # Note that this was extracted from a PlutusV2 invocation
-    # in increasing complexity...
-    ScriptContext.from_cbor(p)
-
-
-
-
-
-
-
-

Functions

-
-
-def test_script_context_repr_correct_0_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff(*a, **kw) -
-
-
-
-
-def test_script_context_repr_correct_1_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820797a1e1720b63621c6b185088184cb8e23af6e46b55bd83e7a91024c823a6c2affffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff(*a, **kw) -
-
-
-
-
-def test_script_context_repr_correct_2_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a1401a000f4240d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff9f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffa1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820c17c32f6433ae22c2acaebfb796bbfaee3993ff7ebb58a2bac6b4a3bdd2f6d28ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff(*a, **kw) -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_ledger/test_interval.html b/docs/opshin/tests/test_ledger/test_interval.html deleted file mode 100644 index e09d5f82..00000000 --- a/docs/opshin/tests/test_ledger/test_interval.html +++ /dev/null @@ -1,492 +0,0 @@ - - - - - - - - -opshin.tests.test_ledger.test_interval API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_ledger.test_interval

-
-
-
- -Expand source code - -
from hypothesis import given, strategies as st
-
-from opshin.ledger.interval import *
-
-
-@given(a=st.integers(), b=st.integers(), c=st.integers())
-def test_ordering_compare(a: int, b: int, c: int) -> None:
-    left = compare(a, b)
-    right = compare(b, c)
-    outer = compare(a, c)
-    # The 6 permutations will match one of 3 combinations
-    if left == right:
-        assert outer == right, (left, outer, right)
-    elif -left == outer:
-        assert right == outer, (left, outer, right)
-    elif right == -outer:
-        assert left == outer, (left, outer, right)
-
-
-@given(a=st.integers(), b=st.integers())
-def test_commutative_compare_extended(a: int, b: int) -> None:
-    left = compare(a, b)
-    right = compare(b, a)
-    assert left == -right, (left, right)
-
-
-compare_extended_operands = st.one_of(
-    st.builds(FinitePOSIXTime), st.builds(NegInfPOSIXTime), st.builds(PosInfPOSIXTime)
-)
-
-
-@given(
-    a=compare_extended_operands,
-    b=compare_extended_operands,
-    c=compare_extended_operands,
-)
-def test_ordering_compare_extended(
-    a: ExtendedPOSIXTime,
-    b: ExtendedPOSIXTime,
-    c: ExtendedPOSIXTime,
-) -> None:
-    left = compare_extended(a, b)
-    right = compare_extended(b, c)
-    outer = compare_extended(a, c)
-    # The 6 permutations will match one of 3 combinations
-    if left == right:
-        assert outer == right, (left, outer, right)
-    elif -left == outer:
-        assert right == outer, (left, outer, right)
-    elif right == -outer:
-        assert left == outer, (left, outer, right)
-
-
-@given(a=compare_extended_operands, b=compare_extended_operands)
-def test_commutative_compare_extended(
-    a: ExtendedPOSIXTime,
-    b: ExtendedPOSIXTime,
-) -> None:
-    left = compare_extended(a, b)
-    right = compare_extended(b, a)
-    assert left == -right, (left, right)
-
-
-compare_lower_bound_operands = st.builds(LowerBoundPOSIXTime)
-
-
-@given(
-    a=compare_lower_bound_operands,
-    b=compare_lower_bound_operands,
-    c=compare_lower_bound_operands,
-)
-def test_ordering_compare_lower_bound(
-    a: LowerBoundPOSIXTime,
-    b: LowerBoundPOSIXTime,
-    c: LowerBoundPOSIXTime,
-) -> None:
-    left = compare_lower_bound(a, b)
-    right = compare_lower_bound(b, c)
-    outer = compare_lower_bound(a, c)
-    # The 6 permutations will match one of 3 combinations
-    if left == right:
-        assert outer == right, (left, outer, right)
-    elif -left == outer:
-        assert right == outer, (left, outer, right)
-    elif right == -outer:
-        assert left == outer, (left, outer, right)
-
-
-@given(a=compare_lower_bound_operands, b=compare_lower_bound_operands)
-def test_commutative_lower_bound(
-    a: LowerBoundPOSIXTime,
-    b: LowerBoundPOSIXTime,
-) -> None:
-    left = compare_lower_bound(a, b)
-    right = compare_lower_bound(b, a)
-    assert left == -right, (left, right)
-
-
-compare_upper_bound_operands = st.builds(UpperBoundPOSIXTime)
-
-
-@given(
-    a=compare_upper_bound_operands,
-    b=compare_upper_bound_operands,
-    c=compare_upper_bound_operands,
-)
-def test_ordering_compare_upper_bound(
-    a: UpperBoundPOSIXTime,
-    b: UpperBoundPOSIXTime,
-    c: UpperBoundPOSIXTime,
-) -> None:
-    left = compare_upper_bound(a, b)
-    right = compare_upper_bound(b, c)
-    outer = compare_upper_bound(a, c)
-    # The 6 permutations will match one of 3 combinations
-    if left == right:
-        assert outer == right, (left, outer, right)
-    elif -left == outer:
-        assert right == outer, (left, outer, right)
-    elif right == -outer:
-        assert left == outer, (left, outer, right)
-
-
-@given(a=compare_upper_bound_operands, b=compare_upper_bound_operands)
-def test_commutative_compare_upper_bound(
-    a: UpperBoundPOSIXTime,
-    b: UpperBoundPOSIXTime,
-) -> None:
-    left = compare_upper_bound(a, b)
-    right = compare_upper_bound(b, a)
-    assert left == -right, (left, right)
-
-
-contains_operands = st.builds(POSIXTimeRange)
-
-
-@given(a=contains_operands, b=contains_operands)
-def test_contains(a: POSIXTimeRange, b: POSIXTimeRange):
-    lower = compare_lower_bound(a.lower_bound, b.lower_bound)
-    upper = compare_upper_bound(a.upper_bound, b.upper_bound)
-    if contains(a, b):
-        assert lower == 1 or lower == 0
-        assert upper == 0 or upper == -1
-    else:
-        assert lower == -1 or upper == 1
-
-
-@given(
-    lower_bound=st.integers(),
-)
-def test_fuzz_make_from(
-    lower_bound: int,
-) -> None:
-    make_from(lower_bound=lower_bound)
-
-
-@given(
-    lower_bound=st.integers(),
-    upper_bound=st.integers(),
-)
-def test_fuzz_make_range(
-    lower_bound: int,
-    upper_bound: int,
-) -> None:
-    make_range(
-        lower_bound=lower_bound,
-        upper_bound=upper_bound,
-    )
-
-
-@given(
-    upper_bound=st.integers(),
-)
-def test_fuzz_make_to(
-    upper_bound: int,
-) -> None:
-    make_to(upper_bound=upper_bound)
-
-
-@given(
-    time=st.one_of(
-        st.builds(FinitePOSIXTime),
-        st.builds(NegInfPOSIXTime),
-        st.builds(PosInfPOSIXTime),
-    )
-)
-def test_fuzz_compare_extended_helper(time: ExtendedPOSIXTime) -> None:
-    compare_extended_helper(time)
-
-
-@given(b=st.booleans())
-def test_get_bool(b: bool) -> None:
-    if b:
-        bool_data = TrueData()
-    else:
-        bool_data = FalseData()
-    assert get_bool(bool_data) == b
-
-
-@given(
-    lower_bound=st.integers(),
-    upper_bound_1=st.integers(),
-    upper_bound_2=st.integers(),
-)
-def test_make_to_in_make_range(
-    lower_bound: int,
-    upper_bound_1: int,
-    upper_bound_2: int,
-) -> None:
-    assert contains(
-        make_to(upper_bound=upper_bound_1), make_range(lower_bound, upper_bound_2)
-    ) == (upper_bound_1 >= upper_bound_2)
-
-
-@given(
-    lower_bound_1=st.integers(),
-    lower_bound_2=st.integers(),
-    upper_bound=st.integers(),
-)
-def test_make_from_in_make_range(
-    lower_bound_1: int,
-    lower_bound_2: int,
-    upper_bound: int,
-) -> None:
-    assert contains(
-        make_from(lower_bound=lower_bound_1), make_range(lower_bound_2, upper_bound)
-    ) == (lower_bound_1 <= lower_bound_2)
-
-
-
-
-
-
-
-

Functions

-
-
-def test_commutative_compare_extended() ‑> None -
-
-
-
-
-def test_commutative_compare_upper_bound() ‑> None -
-
-
-
-
-def test_commutative_lower_bound() ‑> None -
-
-
-
-
-def test_contains() ‑> None -
-
-
-
-
-def test_fuzz_compare_extended_helper() ‑> None -
-
-
-
-
-def test_fuzz_make_from() ‑> None -
-
-
-
-
-def test_fuzz_make_range() ‑> None -
-
-
-
-
-def test_fuzz_make_to() ‑> None -
-
-
-
-
-def test_get_bool() ‑> None -
-
-
-
-
-def test_make_from_in_make_range() ‑> None -
-
-
-
-
-def test_make_to_in_make_range() ‑> None -
-
-
-
-
-def test_ordering_compare() ‑> None -
-
-
-
-
-def test_ordering_compare_extended() ‑> None -
-
-
-
-
-def test_ordering_compare_lower_bound() ‑> None -
-
-
-
-
-def test_ordering_compare_upper_bound() ‑> None -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_misc.html b/docs/opshin/tests/test_misc.html deleted file mode 100644 index b3848d68..00000000 --- a/docs/opshin/tests/test_misc.html +++ /dev/null @@ -1,7831 +0,0 @@ - - - - - - - - -opshin.tests.test_misc API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_misc

-
-
-
- -Expand source code - -
import os
-
-import pycardano
-import sys
-
-import subprocess
-
-import tempfile
-
-import unittest
-
-import frozendict
-import frozenlist2
-import hypothesis
-from hypothesis import given
-from hypothesis import strategies as st
-from opshin import IndefiniteList
-from parameterized import parameterized
-
-from uplc import ast as uplc, eval as uplc_eval
-
-from . import PLUTUS_VM_PROFILE
-from .. import prelude, builder, Purpose, PlutusContract
-from .utils import eval_uplc_value, Unit, eval_uplc
-from ..bridge import wraps_builtin
-from ..compiler_config import OPT_O2_CONFIG, DEFAULT_CONFIG
-
-hypothesis.settings.load_profile(PLUTUS_VM_PROFILE)
-
-# these imports are required to eval the result of script context dumps
-from ..ledger.api_v2 import *
-from pycardano import RawPlutusData, RawCBOR
-from cbor2 import CBORTag
-
-DEFAULT_CONFIG_FORCE_THREE_PARAMS = DEFAULT_CONFIG.update(force_three_params=True)
-DEFAULT_CONFIG_CONSTANT_FOLDING = DEFAULT_CONFIG.update(constant_folding=True)
-
-ALL_EXAMPLES = [
-    os.path.join(root, f)
-    for root, dirs, files in os.walk("examples")
-    for f in files
-    if f.endswith(".py") and not f.startswith("broken") and not f.startswith("extract")
-]
-
-
-def fib(n):
-    a, b = 0, 1
-    for _ in range(n):
-        a, b = b, a + b
-    return a
-
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-
-a_or_b = st.sampled_from([A(0), B(1, 2)])
-some_output = st.sampled_from([SomeOutputDatum(b"0"), SomeOutputDatumHash(b"1")])
-
-
-class MiscTest(unittest.TestCase):
-    def test_assert_sum_contract_succeed(self):
-        input_file = "examples/smart_contracts/assert_sum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc(
-            source_code,
-            20,
-            22,
-            uplc.data_from_cbor(
-                bytes.fromhex(
-                    "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-                )
-            ),
-            config=DEFAULT_CONFIG.update(OPT_O2_CONFIG),
-        )
-        self.assertEqual(ret, uplc.PlutusConstr(0, []))
-
-    @unittest.expectedFailure
-    def test_assert_sum_contract_fail(self):
-        input_file = "examples/smart_contracts/assert_sum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc(source_code, 0, 22, Unit())
-
-    @given(
-        a=st.integers(min_value=-10, max_value=10),
-        b=st.integers(min_value=0, max_value=10),
-    )
-    def test_mult_for(self, a: int, b: int):
-        input_file = "examples/mult_for.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, a, b)
-        self.assertEqual(ret, a * b)
-
-    @given(
-        a=st.integers(min_value=-10, max_value=10),
-        b=st.integers(min_value=0, max_value=10),
-    )
-    def test_mult_for(self, a: int, b: int):
-        input_file = "examples/mult_for.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, a, b)
-        self.assertEqual(ret, a * b)
-
-    @given(
-        a=st.integers(min_value=-10, max_value=10),
-        b=st.integers(min_value=0, max_value=10),
-    )
-    def test_mult_for_return(self, a: int, b: int):
-        source_code = """
-def validator(a: int, b: int) -> int:
-    c = 0
-    i = 0
-    for i in range(b):
-        c += a
-        if i == 1:
-            return c
-    return c
-"""
-        ret = eval_uplc_value(source_code, a, b)
-        self.assertEqual(ret, a * min(b, 2))
-
-    @given(
-        a=st.integers(min_value=-10, max_value=10),
-        b=st.integers(min_value=0, max_value=10),
-    )
-    def test_mult_while_return(self, a: int, b: int):
-        source_code = """
-def validator(a: int, b: int) -> int:
-    c = 0
-    i = 0
-    while i < b:
-        c += a
-        i += 1
-        if i == 2:
-            return c
-    return c
-"""
-        ret = eval_uplc_value(source_code, a, b)
-        self.assertEqual(ret, a * min(2, b))
-
-    @given(
-        a=st.integers(),
-        b=st.integers(),
-    )
-    def test_sum(self, a: int, b: int):
-        input_file = "examples/sum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, a, b)
-        self.assertEqual(ret, a + b)
-
-    def test_complex_datum_correct_vals(self):
-        input_file = "examples/complex_datum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(
-            source_code,
-            uplc.data_from_cbor(
-                bytes.fromhex(
-                    "d8799fd8799fd8799f581c81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acfffd8799fd8799fd8799f581c145db8343296bd214dde862a64d700c29ed8a71d58bcf865659f5463ffffffffd8799fd8799f581c81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acfffd8799fd8799fd8799f581c145db8343296bd214dde862a64d700c29ed8a71d58bcf865659f5463ffffffffd87a80d8799f1a38220b0bff1a001e84801a001e8480582051176daeee7f2ce62963c50a16f641951e21b8522da262980d4dd361a9bf331b4e4d7565736c69537761705f414d4dff"
-                )
-            ),
-        )
-        self.assertEqual(
-            bytes.fromhex("81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acf"),
-            ret,
-        )
-
-    def test_hello_world(self):
-        input_file = "examples/hello_world.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc(source_code, Unit())
-
-    def test_list_datum_correct_vals(self):
-        input_file = "examples/list_datum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(
-            source_code, uplc.data_from_cbor(bytes.fromhex("d8799f9f41014102ffff"))
-        )
-        self.assertEqual(
-            1,
-            ret,
-        )
-
-    def test_showcase(self):
-        input_file = "examples/showcase.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, 1)
-        self.assertEqual(
-            42,
-            ret,
-        )
-
-    @given(n=st.integers(min_value=0, max_value=5))
-    def test_fib_iter(self, n):
-        input_file = "examples/fib_iter.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, n)
-        self.assertEqual(
-            fib(n),
-            ret,
-        )
-
-    @given(n=st.integers(min_value=0, max_value=5))
-    def test_fib_rec(self, n):
-        input_file = "examples/fib_rec.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, n)
-        self.assertEqual(
-            fib(n),
-            ret,
-        )
-
-    def test_gift_contract_succeed(self):
-        input_file = "examples/smart_contracts/gift.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc(
-            source_code,
-            uplc.PlutusConstr(
-                0,
-                [
-                    uplc.PlutusByteString(
-                        bytes.fromhex(
-                            "dc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2"
-                        )
-                    )
-                ],
-            ),
-            uplc.PlutusConstr(0, []),
-            uplc.data_from_cbor(
-                bytes.fromhex(
-                    (
-                        "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a1401a000f4240d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff9f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffa1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820c17c32f6433ae22c2acaebfb796bbfaee3993ff7ebb58a2bac6b4a3bdd2f6d28ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-                    )
-                )
-            ),
-        )
-        self.assertEqual(ret, uplc.PlutusConstr(0, []))
-
-    @unittest.expectedFailure
-    def test_gift_contract_fail(self):
-        input_file = "examples/smart_contracts/gift.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        # required sig missing int this script context
-        ret = eval_uplc(
-            source_code,
-            uplc.PlutusConstr(
-                0,
-                [
-                    uplc.PlutusByteString(
-                        bytes.fromhex(
-                            "dc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2"
-                        )
-                    )
-                ],
-            ),
-            uplc.PlutusConstr(0, []),
-            uplc.data_from_cbor(
-                bytes.fromhex(
-                    (
-                        "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820797a1e1720b63621c6b185088184cb8e23af6e46b55bd83e7a91024c823a6c2affffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-                    )
-                )
-            ),
-        )
-
-    def test_recursion_simple(self):
-        source_code = """
-def validator(_: None) -> int:
-    def a(n: int) -> int:
-      if n == 0:
-        res = 0
-      else:
-        res = a(n-1)
-      return res
-    return a(1)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(0, ret)
-
-    @unittest.expectedFailure
-    def test_recursion_illegal(self):
-        # this is now an illegal retyping because read variables dont match
-        source_code = """
-def validator(_: None) -> int:
-    def a(n: int) -> int:
-      if n == 0:
-        res = 0
-      else:
-        res = a(n-1)
-      return res
-    b = a
-    def a(x: int) -> int:
-      return 100
-    return b(1)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(100, ret)
-
-    def test_recursion_legal(self):
-        source_code = """
-def validator(_: None) -> int:
-    def a(n: int) -> int:
-      if n == 0:
-        res = 0
-      else:
-        res = a(n-1)
-      return res
-    b = a
-    def a(n: int) -> int:
-      a
-      if 1 == n:
-        pass
-      return 100
-    return b(1)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(100, ret)
-
-    @unittest.expectedFailure
-    def test_uninitialized_access(self):
-        source_code = """
-def validator(_: None) -> int:
-    b = 1
-    def a(n: int) -> int:
-      b += 1
-      if b == 2:
-        return 0
-      else:
-        return a(n-1)
-    return a(1)
-        """
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_illegal_bind(self):
-        source_code = """
-def validator(_: None) -> int:
-    b = 1
-    def a(n: int) -> int:
-      if n == 0:
-        return 100
-      if b == 2:
-        return 0
-      b = 2
-      return a(n-1)
-    return a(2)
-        """
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_type_reassignment_function_bound(self):
-        # changing the type of a variable should be disallowed if the variable is bound by a function
-        # it can be ok if the types can be merged (resulting in union type inside the function) but
-        # generally should be disallowed
-        source_code = """
-def validator(_: None) -> int:
-    b = 1
-    def a(n: int) -> int:
-      return b
-    b = b''
-    return a(1)
-        """
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_illegal_function_retype(self):
-        source_code = """
-def validator(_: None) -> int:
-    def a(n: int) -> int:
-      if n == 0:
-        res = 0
-      else:
-        res = a(n-1)
-      return res
-    b = a
-    def a() -> int:
-      return 100
-    return b(1)
-        """
-        builder._compile(source_code)
-
-    def test_datum_cast(self):
-        input_file = "examples/datum_cast.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(
-            source_code,
-            uplc.data_from_cbor(
-                bytes.fromhex(
-                    "d8799fd8799fd8799f581c81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acfffd8799fd8799fd8799f581c145db8343296bd214dde862a64d700c29ed8a71d58bcf865659f5463ffffffffd8799fd8799f581c81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acfffd8799fd8799fd8799f581c145db8343296bd214dde862a64d700c29ed8a71d58bcf865659f5463ffffffffd87a80d8799f1a38220b0bff1a001e84801a001e8480582051176daeee7f2ce62963c50a16f641951e21b8522da262980d4dd361a9bf331b4e4d7565736c69537761705f414d4dff"
-                )
-            ),
-            uplc.PlutusByteString(b"test"),
-        )
-        self.assertEqual(
-            bytes.fromhex("81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acf")
-            + b"test",
-            ret,
-        )
-
-    def test_wrapping_contract_compile(self):
-        # TODO devise tests for this
-        input_file = "examples/smart_contracts/wrapped_token.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        builder._compile(source_code, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-
-    def test_dual_use_compile(self):
-        # TODO devise tests for this
-        input_file = "examples/smart_contracts/dual_use.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        builder._compile(source_code, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-
-    def test_marketplace_compile(self):
-        # TODO devise tests for this
-        input_file = "examples/smart_contracts/marketplace.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_marketplace_compile_fail(self):
-        input_file = "examples/smart_contracts/marketplace.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        builder._compile(source_code, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-
-    def test_parameterized_compile(self):
-        # TODO devise tests for this
-        input_file = "examples/smart_contracts/parameterized.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        builder._compile(source_code, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-
-    def test_dict_datum(self):
-        input_file = "examples/dict_datum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        d = uplc.PlutusConstr(
-            0,
-            [
-                uplc.PlutusMap(
-                    frozendict.frozendict(
-                        {
-                            uplc.PlutusConstr(
-                                0,
-                                frozenlist2.frozenlist(
-                                    [uplc.PlutusByteString(b"\x01")]
-                                ),
-                            ): uplc.PlutusInteger(2)
-                        }
-                    )
-                )
-            ],
-        )
-        ret = eval_uplc(source_code, d)
-        self.assertTrue(bool(ret))
-
-    def test_dict_datum_wrong(self):
-        input_file = "examples/dict_datum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        d = uplc.PlutusConstr(
-            0,
-            [
-                uplc.PlutusMap(
-                    frozendict.frozendict(
-                        {
-                            uplc.PlutusConstr(
-                                0,
-                                frozenlist2.frozenlist(
-                                    [uplc.PlutusByteString(b"\x02")]
-                                ),
-                            ): uplc.PlutusInteger(2)
-                        }
-                    )
-                )
-            ],
-        )
-        ret = eval_uplc_value(source_code, d)
-        self.assertFalse(bool(ret))
-
-    def test_removedeadvar_noissue(self):
-        source_code = """
-from opshin.prelude import *
-def validator(x: Token) -> bool:
-    b = 4
-    a = b
-    return True
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, True)
-
-    def test_removedeadvar_noissue2(self):
-        source_code = """
-from opshin.prelude import *
-def validator(x: Token) -> bool:
-    def foo(x: Token) -> bool:
-        b = 4
-        a = b
-        return True
-    return foo(x)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, True)
-
-    def test_removedeadvar_noissue3(self):
-        source_code = """
-from opshin.prelude import *
-
-def foo(x: Token) -> bool:
-    b = 4
-    a = b
-    return True
-
-def validator(x: Token) -> bool:
-    return foo(x)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, True)
-
-    @unittest.expectedFailure
-    def test_overopt_removedeadvar(self):
-        source_code = """
-from opshin.prelude import *
-def validator(x: Token) -> bool:
-    a = x.policy_id
-    return True
-        """
-        ret = eval_uplc(source_code, Unit())
-
-    @unittest.expectedFailure
-    def test_opt_shared_var(self):
-        source_code = """
-from opshin.prelude import *
-def validator(x: Token) -> bool:
-    if False:
-        y = x
-    else:
-        a = y
-    return True
-        """
-        ret = eval_uplc(source_code, Unit())
-
-    def test_list_expr(self):
-        # this tests that the list expression is evaluated correctly
-        source_code = """
-def validator(x: None) -> List[int]:
-    return [1, 2, 3, 4, 5]
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        ret = [x.value for x in ret]
-        self.assertEqual(ret, [1, 2, 3, 4, 5], "List expression incorrectly compiled")
-
-    def test_list_expr_not_const(self):
-        # this tests that the list expression is evaluated correctly (for non-constant expressions)
-        source_code = """
-def validator(x: int) -> List[int]:
-    return [x, x+1, x+2, x+3, x+4]
-        """
-        ret = eval_uplc_value(source_code, 1)
-        ret = [x.value for x in ret]
-        self.assertEqual(ret, [1, 2, 3, 4, 5], "List expression incorrectly compiled")
-
-    def test_dict_expr_not_const(self):
-        # this tests that the list expression is evaluated correctly (for non-constant expressions)
-        source_code = """
-def validator(x: int) -> Dict[int, bytes]:
-    return {x: b"a", x+1: b"b"}
-        """
-        ret = eval_uplc_value(source_code, 1)
-        ret = {x.value: y.value for x, y in ret.items()}
-        self.assertEqual(
-            ret, {1: b"a", 2: b"b"}, "Dict expression incorrectly compiled"
-        )
-
-    def test_redefine_poly_constr(self):
-        # this tests that classes defined by assignment inherit constructors
-        source_code = """
-def validator(x: None) -> bytes:
-    a = bytes
-    return a([2, 3])
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, bytes([2, 3]), "Re-assignment of global variable failed")
-
-    @given(st.booleans())
-    def test_redefine_constr(self, x):
-        # this tests that classes defined by assignment inherit constructors
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-    bar: int
-    
-def validator(x: int) -> int:
-    a = A
-    return a(x, 1).foo
-        """
-        ret = eval_uplc_value(source_code, int(x))
-        self.assertEqual(ret, int(x), "Re-assignment of class constr failed")
-
-    def test_wrap_into_generic_data(self):
-        # this tests data is wrapped into Anything if a function accepts Anything
-        source_code = """
-from opshin.prelude import *
-def validator(_: None) -> SomeOutputDatum:
-    return SomeOutputDatum(b"a")
-        """
-        ret = eval_uplc(source_code, Unit())
-        self.assertEqual(
-            ret,
-            uplc.data_from_cbor(prelude.SomeOutputDatum(b"a").to_cbor()),
-            "Wrapping to generic data failed",
-        )
-
-    def test_list_comprehension_even(self):
-        input_file = "examples/list_comprehensions.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, 8, 1)
-        ret = [x.value for x in ret]
-        self.assertEqual(
-            ret,
-            [x * x for x in range(8) if x % 2 == 0],
-            "List comprehension with filter incorrectly evaluated",
-        )
-
-    def test_list_comprehension_all(self):
-        input_file = "examples/list_comprehensions.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, 8, 0)
-        ret = [x.value for x in ret]
-        self.assertEqual(
-            ret,
-            [x * x for x in range(8)],
-            "List comprehension incorrectly evaluated",
-        )
-
-    def test_dict_comprehension_even(self):
-        input_file = "examples/dict_comprehensions.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, 8, 1)
-        ret = {x.value: y.value for x, y in ret.items()}
-        self.assertEqual(
-            ret,
-            {x: x * x for x in range(8) if x % 2 == 0},
-            "Dict comprehension incorrectly evaluated",
-        )
-
-    def test_dict_comprehension_all(self):
-        input_file = "examples/dict_comprehensions.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, 8, 0)
-        ret = {x.value: y.value for x, y in ret.items()}
-        self.assertEqual(
-            ret,
-            {x: x * x for x in range(8)},
-            "Dict comprehension incorrectly evaluated",
-        )
-
-    @hypothesis.given(some_output)
-    def test_union_type_attr_access_all_records(self, x):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: SomeOutputDatumHash
-    
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foo: SomeOutputDatum
-
-def validator(x: Union[A, B]) -> Union[SomeOutputDatumHash, SomeOutputDatum]:
-    return x.foo
-"""
-
-        @dataclass()
-        class A(PlutusData):
-            CONSTR_ID = 0
-            foo: SomeOutputDatumHash
-
-        @dataclass()
-        class B(PlutusData):
-            CONSTR_ID = 1
-            foo: SomeOutputDatum
-
-        x = A(x) if isinstance(x, SomeOutputDatumHash) else B(x)
-
-        ret = eval_uplc(source_code, x)
-        self.assertEqual(ret, uplc.data_from_cbor(x.foo.to_cbor()))
-
-    @hypothesis.given(some_output, st.sampled_from([1, 2, 3]))
-    def test_union_type_attr_access_all_records_diff_pos(self, x, y):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: SomeOutputDatumHash
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foo: SomeOutputDatum
-    
-@dataclass()
-class C(PlutusData):
-    CONSTR_ID = 2
-    bar: int
-    foo: SomeOutputDatum
-    
-@dataclass()
-class D(PlutusData):
-    CONSTR_ID = 3
-    foobar: int
-    bar: int
-    foo: SomeOutputDatum
-
-def validator(x: Union[A, B, C, D]) -> Union[SomeOutputDatumHash, SomeOutputDatum]:
-    return x.foo
-"""
-
-        @dataclass()
-        class A(PlutusData):
-            CONSTR_ID = 0
-            foo: SomeOutputDatumHash
-
-        @dataclass()
-        class B(PlutusData):
-            CONSTR_ID = 1
-            foo: SomeOutputDatum
-
-        @dataclass()
-        class C(PlutusData):
-            CONSTR_ID = 2
-            bar: int
-            foo: SomeOutputDatum
-
-        @dataclass()
-        class D(PlutusData):
-            CONSTR_ID = 3
-            foobar: int
-            bar: int
-            foo: SomeOutputDatum
-
-        x = (
-            A(x)
-            if isinstance(x, SomeOutputDatumHash)
-            else B(x) if y == 1 else C(0, x) if y == 2 else D(0, 0, x)
-        )
-
-        ret = eval_uplc(source_code, x)
-        self.assertEqual(ret, uplc.data_from_cbor(x.foo.to_cbor()))
-
-    @unittest.expectedFailure
-    def test_union_type_all_records_same_constr(self):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: SomeOutputDatumHash
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 0
-    foo: SomeOutputDatum
-
-def validator(x: Union[A, B]) -> Union[SomeOutputDatumHash, SomeOutputDatum]:
-    return x.foo
-"""
-        eval_uplc(source_code, Unit())
-
-    @unittest.expectedFailure
-    def test_union_type_attr_access_all_records_same_constr(self):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: Token
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foo: Address
-
-def validator(x: Union[A, B]) -> int:
-    m = x.foo
-    if isinstance(m, Address):
-        k = 0
-    else:
-        k = 1
-    return k
-"""
-        eval_uplc(source_code, Unit())
-
-    def test_union_type_attr_access_maximum_type(self):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foo: int
-
-def validator(x: Union[A, B]) -> int:
-    return x.foo
-"""
-        ret = eval_uplc_value(
-            source_code, uplc.PlutusConstr(0, [uplc.PlutusInteger(1)])
-        )
-        self.assertEqual(ret, 1)
-
-    def test_union_type_attr_anytype(self):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: bytes
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foo: int
-
-def validator(x: Union[A, B]) -> Anything:
-    return x.foo
-"""
-        ret = eval_uplc_value(
-            source_code, uplc.PlutusConstr(0, [uplc.PlutusByteString(b"")])
-        )
-        self.assertEqual(ret, b"")
-
-    def test_typecast_anything_int(self):
-        source_code = """
-def validator(x: Anything) -> int:
-    b: int = x
-    return b
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 0)
-
-    def test_typecast_int_anything(self):
-        # this should compile, it happens implicitly anyways when calling a function with Any parameters
-        source_code = """
-def validator(x: int) -> Anything:
-    b: Anything = x
-    return b
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 0)
-
-    def test_typecast_int_anything_int(self):
-        source_code = """
-def validator(x: int) -> Anything:
-    b: Anything = x
-    c: int = b
-    return c + 1
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 1)
-
-    def test_typecast_anything_int_anything(self):
-        source_code = """
-def validator(x: Anything) -> Anything:
-    b: int = x
-    c: Anything = b + 1
-    return c
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 1)
-
-    @unittest.expectedFailure
-    def test_typecast_int_str(self):
-        # this should not compile, the two types are unrelated and there is no meaningful way to cast them either direction
-        source_code = """
-def validator(x: int) -> str:
-    b: str = x
-    return b
-"""
-        builder._compile(source_code)
-
-    def test_typecast_int_int(self):
-        source_code = """
-def validator(x: int) -> int:
-    b: int = x
-    return b
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 0)
-
-    def test_zero_ary(self):
-        source_code = """
-def a() -> None:
-    assert False, "Executed a"
-
-def validator(x: None) -> int:
-    b = a
-    if False:
-        b()
-    return 2
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 2, "Invalid return value")
-
-    @unittest.expectedFailure
-    def test_zero_ary_exec(self):
-        source_code = """
-def a() -> None:
-    assert False, "Executed a"
-
-def validator(x: None) -> None:
-    b = a
-    if True:
-        b()
-"""
-        ret = eval_uplc_value(source_code, 0)
-
-    def test_zero_ary_method(self):
-        source_code = """
-def validator(x: None) -> None:
-    b = b"\\xFF".decode
-    if False:
-        b()
-"""
-        eval_uplc(source_code, 0)
-
-    @unittest.expectedFailure
-    def test_zero_ary_method_exec(self):
-        source_code = """
-def validator(x: None) -> None:
-    b = b"\\xFF".decode
-    if True:
-        b()
-"""
-        eval_uplc(source_code, 0)
-
-    def test_zero_ary_method_exec_suc(self):
-        source_code = """
-def validator(x: None) -> str:
-    b = b"\\x32".decode
-    return b()
-"""
-        res = eval_uplc_value(source_code, 0)
-        self.assertEqual(res, b"\x32")
-
-    def test_return_anything(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator() -> Anything:
-    return b""
-"""
-        res = eval_uplc(source_code, 0)
-        self.assertEqual(res, uplc.PlutusByteString(b""))
-
-    def test_no_return_annotation(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator():
-    return b""
-"""
-        res = eval_uplc(source_code, 0)
-        self.assertEqual(res, uplc.PlutusByteString(b""))
-
-    def test_no_parameter_annotation(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(a) -> bytes:
-    b: bytes = a
-    return b
-"""
-        res = eval_uplc(source_code, b"")
-        self.assertEqual(res, uplc.PlutusByteString(b""))
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_dict_items_values_deconstr(self, xs):
-        # asserts that deconstruction of parameters works for for loops too
-        source_code = """
-def validator(xs: Dict[int, bytes]) -> bytes:
-    sum_values = b""
-    for _, x in xs.items():
-        sum_values += x
-    return sum_values
-"""
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(
-            ret,
-            b"".join(xs.values()),
-            "for loop deconstruction did not behave as expected",
-        )
-
-    def test_nested_deconstruction(self):
-        source_code = """
-def validator(xs) -> int:
-    a, ((b, c), d) = (1, ((2, 3), 4))
-    return a + b + c + d
-"""
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(
-            ret,
-            1 + 2 + 3 + 4,
-            "for loop deconstruction did not behave as expected",
-        )
-
-    @given(
-        xs=st.dictionaries(
-            st.binary(),
-            st.dictionaries(st.binary(), st.integers(), max_size=3),
-            max_size=5,
-        )
-    )
-    def test_dict_items_values_deconstr(self, xs):
-        # nested deconstruction with a Value-like object
-        source_code = """
-def validator(xs: Dict[bytes, Dict[bytes, int]]) -> int:
-    sum_values = 0
-    for pid, tk_dict in xs.items():
-        for tk_name, tk_amount in tk_dict.items():
-            sum_values += tk_amount
-    return sum_values
-"""
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(
-            ret,
-            sum(v for pid, d in xs.items() for nam, v in d.items()),
-            "for loop deconstruction did not behave as expected",
-        )
-
-    def test_no_return_annotation_no_return(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(a):
-    pass
-"""
-        res = eval_uplc(source_code, 0)
-        self.assertEqual(res, uplc.PlutusConstr(0, []))
-
-    @unittest.expectedFailure
-    def test_opt_unsafe_cast(self):
-        # test that unsafe casts are not optimized away
-        source_code = """
-from opshin.prelude import *
-def validator(x: Token) -> bool:
-    b: Anything = x
-    a: int = b
-    return True
-        """
-        ret = eval_uplc(source_code, Unit())
-
-    def test_constant_folding(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> bytes:
-    return bytes.fromhex("0011")
-"""
-        res = eval_uplc_value(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertEqual(res, bytes.fromhex("0011"))
-
-    @unittest.expectedFailure
-    def test_constant_folding_disabled(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> bytes:
-    return bytes.fromhex("0011")
-"""
-        eval_uplc(source_code, Unit(), constant_folding=False)
-
-    def test_constant_folding_list(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> List[int]:
-    return list(range(0, 10, 2))
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con (list integer) [0, 2, 4, 6, 8])", code.dumps())
-        res = builder.uplc_eval(code)
-        self.assertEqual(
-            res.result,
-            uplc.PlutusList([uplc.PlutusInteger(i) for i in range(0, 10, 2)]),
-        )
-
-    def test_constant_folding_dict(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> Dict[str, bool]:
-    return {"s": True, "m": False}
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn(
-            "(con (list (pair data data)) [(B #73, I 1), (B #6d, I 0)])", code.dumps()
-        )
-        res = uplc_eval(code).result
-        if isinstance(res, Exception):
-            raise res
-        self.assertEqual(
-            res,
-            uplc.PlutusMap(
-                {
-                    uplc.PlutusByteString("s".encode()): uplc.PlutusInteger(1),
-                    uplc.PlutusByteString("m".encode()): uplc.PlutusInteger(0),
-                }
-            ),
-        )
-
-    def test_constant_folding_complex(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> Dict[str, List[Dict[bytes, int]]]:
-    return {"s": [{b"": 0}, {b"0": 1}]}
-"""
-        res = eval_uplc(source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-        self.assertEqual(
-            res,
-            uplc.PlutusMap(
-                {
-                    uplc.PlutusByteString("s".encode()): uplc.PlutusList(
-                        [
-                            uplc.PlutusMap(
-                                {uplc.PlutusByteString(b""): uplc.PlutusInteger(0)}
-                            ),
-                            uplc.PlutusMap(
-                                {uplc.PlutusByteString(b"0"): uplc.PlutusInteger(1)}
-                            ),
-                        ]
-                    ),
-                }
-            ),
-        )
-
-    def test_constant_folding_plutusdata(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> PubKeyCredential:
-    return PubKeyCredential(bytes.fromhex("0011"))
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con data (Constr 0 [B #0011]))", code.dumps())
-        res = uplc_eval(code)
-        self.assertEqual(
-            res.result,
-            uplc.PlutusConstr(
-                constructor=0, fields=[uplc.PlutusByteString(value=b"\x00\x11")]
-            ),
-        )
-
-    def test_constant_folding_user_def(self):
-        source_code = """
-def fib(i: int) -> int:
-    return i if i < 2 else fib(i-1) + fib(i-2)
-
-def validator(_: None) -> int:
-    return fib(10)
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con integer 55)", code.dumps())
-        res = uplc_eval(code).result
-        if isinstance(res, Exception):
-            raise res
-        self.assertEqual(
-            res.value,
-            55,
-        )
-
-    @unittest.expectedFailure
-    def test_constant_folding_ifelse(self):
-        source_code = """
-def validator(_: None) -> int:
-    if False:
-        a = 10
-    return a
-"""
-        eval_uplc(source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    @unittest.expectedFailure
-    def test_constant_folding_for(self):
-        source_code = """
-def validator(x: List[int]) -> int:
-    for i in x:
-        a = 10
-    return a
-"""
-        eval_uplc(source_code, [], config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    @unittest.expectedFailure
-    def test_constant_folding_for_target(self):
-        source_code = """
-def validator(x: List[int]) -> int:
-    for i in x:
-        a = 10
-    return i
-"""
-        eval_uplc(source_code, [], config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    @unittest.expectedFailure
-    def test_constant_folding_while(self):
-        source_code = """
-def validator(_: None) -> int:
-    while False:
-        a = 10
-    return a
-"""
-        eval_uplc(source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    @unittest.skip("Fine from a guarantee perspective, but needs better inspection")
-    def test_constant_folding_guaranteed_branch(self):
-        source_code = """
-def validator(_: None) -> int:
-    if False:
-        a = 20
-        b = 2 * a
-    else:
-        b = 2
-    return b
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con integer 40)", code.dumps())
-
-    @unittest.skip("Fine from a guarantee perspective, but needs better inspection")
-    def test_constant_folding_scoping(self):
-        source_code = """
-a = 4
-def validator(_: None) -> int:
-    a = 2
-    b = 5 * a
-    return b
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con integer 10)", code.dumps())
-
-    @unittest.skip("Fine from a guarantee perspective, but needs better inspection")
-    def test_constant_folding_no_scoping(self):
-        source_code = """
-def validator(_: None) -> int:
-    a = 4
-    a = 2
-    b = 5 * a
-    return b
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con integer 10)", code.dumps())
-
-    def test_constant_folding_repeated_assign(self):
-        source_code = """
-def validator(i: int) -> int:
-    a = 4
-    for k in range(i):
-        a = 2
-    return a
-"""
-        code = builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-        res = uplc_eval(code, uplc.PlutusInteger(0)).result
-        if isinstance(res, Exception):
-            raise res
-        self.assertEqual(res.value, 4)
-        res = uplc_eval(code, uplc.PlutusInteger(1)).result
-        if isinstance(res, Exception):
-            raise res
-        self.assertEqual(res.value, 2)
-
-    def test_constant_folding_math(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> int:
-    return 2 ** 10
-"""
-        code = builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-        code_src = code.dumps()
-        self.assertIn(f"(con integer {2**10})", code_src)
-
-    def test_reassign_builtin(self):
-        source_code = """
-b = int
-def validator(_: None) -> int:
-    def int(a) -> b:
-        return 2
-    return int(5)
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 2)
-
-    @unittest.expectedFailure
-    def test_reassign_builtin_invalid_type(self):
-        source_code = """
-def validator(_: None) -> int:
-    def int(a) -> int:
-        return 2
-    return int(5)
-"""
-        builder._compile(source_code)
-
-    def test_constant_folding_ignore_reassignment(self):
-        source_code = """
-b = int
-def validator(_: None) -> int:
-    def int(a) -> b:
-        return 2
-    return int(5)
-"""
-        res = eval_uplc_value(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertEqual(res, 2)
-
-    def test_constant_folding_no_print_eval(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> None:
-    return print("hello")
-"""
-        code = builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-        code_src = code.dumps()
-        self.assertIn(f'(con string "hello")', code_src)
-
-    def test_inner_outer_state_functions(self):
-        source_code = """
-a = 2
-def b() -> int:
-    return a
-
-def validator(_: None) -> int:
-    a = 3
-    return b()
-        """
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 2)
-
-    def test_inner_outer_state_functions_nonglobal(self):
-        source_code = """
-
-def validator(_: None) -> int:
-    a = 2
-    def b() -> int:
-        return a
-    def c() -> int:
-        a = 3
-        return b()
-    return c()
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 2)
-
-    def test_outer_state_change_functions(self):
-        source_code = """
-a = 2
-def b() -> int:
-    return a
-a = 3
-
-def validator(_: None) -> int:
-    return b()
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 3)
-
-    @unittest.expectedFailure
-    def test_failing_annotated_type(self):
-        source_code = """
-def c():
-    a = 2
-    def b() -> int:
-        return a
-    return b
-
-def validator(_: None):
-    a = 3
-    return c()
-"""
-        eval_uplc(source_code, Unit())
-
-    @unittest.expectedFailure
-    def test_access_enclosing_variable_before_def(self):
-        # note this is a runtime error, just like it would be in python!
-        source_code = """
-a = "1"
-def validator(_: None) -> None:
-   def d() -> str:
-       return a
-   print(d())
-   a = "2"
-"""
-        eval_uplc(source_code, Unit())
-
-    @unittest.expectedFailure
-    def test_access_local_variable_before_assignment(self):
-        # note this is a runtime error, just like it would be in python!
-        source_code = """
-a = "1"
-def validator(_: None) -> None:
-   print(a)
-   a = "2"
-"""
-        eval_uplc(source_code, Unit())
-
-    def test_warn_bytestring(self):
-        source_code = """
-b = b"0011ff"
-def validator(_: None) -> None:
-    pass
-"""
-        eval_uplc(source_code, Unit())
-
-    @parameterized.expand(
-        [
-            (
-                "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-            ),
-            (
-                "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820797a1e1720b63621c6b185088184cb8e23af6e46b55bd83e7a91024c823a6c2affffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-            ),
-            (
-                "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a1401a000f4240d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff9f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffa1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820c17c32f6433ae22c2acaebfb796bbfaee3993ff7ebb58a2bac6b4a3bdd2f6d28ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-            ),
-        ]
-    )
-    def test_script_context_str_format(self, p: str):
-        context = ScriptContext.from_cbor(bytes.fromhex(p))
-        source_code = """
-from opshin.prelude import *
-
-def validator(c: ScriptContext) -> str:
-    return f"{c}"
-        """
-        res = eval_uplc_value(source_code, context)
-        # should not raise
-        eval(res)
-
-    @hypothesis.given(st.binary(), st.binary())
-    def test_uplc_builtin(self, x, y):
-        source_code = """
-from opshin.std.builtins import *
-def validator(x: bytes, y: bytes) -> bytes:
-    return append_byte_string(x, y)
-"""
-        res = eval_uplc_value(source_code, x, y)
-        self.assertEqual(res, x + y)
-
-    def test_trace_order(self):
-        # TODO can become a proper test once uplc is upgraded to >=1.0.0
-        source_code = """
-from opshin.std.builtins import *
-def validator() -> None:
-    print("test")
-    print("hi")
-    print("there")
-    return None
-"""
-        eval_uplc(source_code, PlutusData())
-
-    def test_print_empty(self):
-        # TODO can become a proper test once uplc is upgraded to >=1.0.0
-        source_code = """
-from opshin.std.builtins import *
-def validator() -> None:
-    print()
-    print()
-    print()
-    print()
-    print()
-    print()
-    return None
-"""
-        eval_uplc(source_code, PlutusData())
-
-    @hypothesis.given(st.integers())
-    def test_cast_bool_ite(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    if x:
-        res = True
-    else:
-        res = False
-    return res
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, bool(x))
-
-    @hypothesis.given(st.integers())
-    def test_cast_bool_ite_expr(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    return True if x else False
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(res), bool(x))
-
-    @hypothesis.given(st.integers())
-    def test_cast_bool_while(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    res = False
-    while x:
-        res = True
-        x = 0
-    return res
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(res), bool(x))
-
-    @hypothesis.given(st.integers())
-    def test_cast_bool_boolops(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    return x and x or (x or x)
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(res), bool(x and x or (x or x)))
-
-    @hypothesis.given(st.integers())
-    def test_cast_bool_ite(self, x):
-        source_code = """
-def validator(x: int) -> None:
-    assert x
-"""
-        try:
-            eval_uplc(source_code, x)
-            res = True
-        except Exception:
-            res = False
-        self.assertEqual(res, bool(x))
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_if(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    if isinstance(x, A):
-        k = x.foo
-    elif isinstance(x, B):
-        k = x.bar
-    return k
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if isinstance(x, A) else x.bar)
-
-    @hypothesis.given(a_or_b, a_or_b)
-    def test_complex_isinstance_cast_if(self, x, y):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B], y: Union[A, B]) -> int:
-    if isinstance(x, A) and isinstance(y, B):
-        k = x.foo + y.bar
-    elif isinstance(x, A) and isinstance(y, A):
-        k = x.foo + y.foo
-    elif isinstance(x, B) and isinstance(y, A):
-        k = x.bar + y.foo
-    elif isinstance(x, B) and isinstance(y, B):
-        k = x.bar + y.bar
-    return k
-"""
-        res = eval_uplc_value(source_code, x, y)
-        self.assertEqual(
-            res,
-            (x.foo if isinstance(x, A) else x.bar)
-            + (y.foo if isinstance(y, A) else y.bar),
-        )
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_ifexpr(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    k = x.foo if isinstance(x, A) else x.bar if isinstance(x, B) else 0
-    return k
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if isinstance(x, A) else x.bar)
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_while(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    foo = 0
-    while isinstance(x, B) and foo != 1:
-        foo = x.bar
-        foo = 1
-    return foo
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, 1 if isinstance(x, B) else 0)
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_random(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> bool:
-    return isinstance(x, A)
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, isinstance(x, A))
-
-    @hypothesis.given(a_or_b, st.integers())
-    @hypothesis.example(A(0), 0)
-    def test_isinstance_cast_shortcut_and(self, x, y):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B], y: int) -> bool:
-    return isinstance(x, A) and x.foo == y or isinstance(x, B) and x.bar == y
-"""
-        res = eval_uplc_value(source_code, x, y)
-        self.assertEqual(
-            res, isinstance(x, A) and x.foo == y or isinstance(x, B) and x.bar == y
-        )
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_assert(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    assert isinstance(x, B), "Wrong type"
-    return x.bar
-"""
-        try:
-            res = eval_uplc_value(source_code, x)
-        except:
-            res = None
-        self.assertEqual(res, x.bar if isinstance(x, B) else None)
-
-    @unittest.expectedFailure
-    def test_isinstance_cast_assert_if(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    if True:
-        assert isinstance(x, B), "Wrong type"
-    return x.bar
-"""
-        builder._compile(source_code)
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_complex_or(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-    
-@dataclass()
-class C(PlutusData):
-    CONSTR_ID = 2
-    foo: int
-
-def validator(x: Union[A, B, C]) -> int:
-    if isinstance(x, A) or isinstance(x, C):
-        res = x.foo
-    else:
-        res = 100
-    return res
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if isinstance(x, A) else 100)
-
-    @unittest.expectedFailure
-    def test_isinstance_cast_complex_or_sameconstr(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-@dataclass()
-class C(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-def validator(x: Union[A, B]) -> int:
-    if isinstance(x, A) or isinstance(x, C):
-        res = x.foo
-    else:
-        res = 100
-    return res
-"""
-        builder._compile(source_code)
-        print("Union of same constructor id was allowed, should be disallowed")
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_complex_not(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-    
-def validator(x: Union[A, B]) -> int:
-    if not isinstance(x, B):
-        res = x.foo
-    else:
-        res = 100
-    return res
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if not isinstance(x, B) else 100)
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_complex_ifelse(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    if isinstance(x, A):
-        res = x.foo
-    else:
-        res = x.bar
-    return res
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if isinstance(x, A) else x.bar)
-
-    @unittest.expectedFailure
-    def test_isinstance_cast_complex_or_else(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    foo = 0
-    if isinstance(x, B) or foo == 0:
-        foo = x.bar
-    else:
-        foo = x.foo
-    return foo
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_isinstance_cast_complex_and_else(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    foo = 0
-    if isinstance(x, B) and foo == 0:
-        foo = x.bar
-    else:
-        foo = x.foo
-    return foo
-"""
-        builder._compile(source_code)
-
-    def test_isinstance_cast_complex_and(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    foo = 0
-    if isinstance(x, B) and foo == 0:
-        foo = x.bar
-    return foo
-"""
-        builder._compile(source_code)
-
-    @hypothesis.given(a_or_b, st.integers())
-    def test_isinstance_cast_shortcut_or(self, x, y):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B], y: int) -> bool:
-    return (isinstance(x, A) or x.bar == y) and (isinstance(x, B) or x.foo == y)
-"""
-        res = eval_uplc_value(source_code, x, y)
-        self.assertEqual(
-            res, (isinstance(x, A) or x.bar == y) and (isinstance(x, B) or x.foo == y)
-        )
-
-    @hypothesis.given(a_or_b)
-    def test_uniontype_if(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> Union[A, B]:
-    if isinstance(x, A):
-        k = B(x.foo, 1)
-    else:
-        k = A(x.bar)
-    return k
-"""
-        res = uplc.plutus_cbor_dumps(eval_uplc(source_code, x))
-        self.assertEqual(res, (B(x.foo, 1) if isinstance(x, A) else A(x.bar)).to_cbor())
-
-    @unittest.expectedFailure
-    def test_if_no_retype_no_plutusdata(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]):
-    if isinstance(x, A):
-        k = B(x.foo, 1)
-    else:
-        k = "hello"
-    return k
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_while_no_retype_no_plutusdata(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]):
-    while isinstance(x, A):
-        k = B(x.foo, 1)
-    else:
-        k = "hello"
-    return k
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    @hypothesis.given(a_or_b)
-    def test_retype_while(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    while isinstance(x, A):
-        x = B(x.foo, 1)
-    return x.foobar
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if isinstance(x, A) else x.foobar)
-
-    @unittest.expectedFailure
-    def test_retype_if_branch_correct(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    if False:
-        x = B(0, 1)
-    return x.foobar
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_retype_while_branch_correct(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    while False:
-        x = B(0, 1)
-    return x.foobar
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_retype_while_wrong_after_iter(self):
-        source_code = """
-def validator(x: int) -> bytes:
-    while True:
-        x += 1
-        x = b''
-    return x
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_retype(self):
-        source_code = """
-def validator(x: int) -> str:
-    x = "hello"
-    return x
-"""
-        res = eval_uplc_value(source_code, 1)
-        self.assertEqual(res, b"hello")
-
-    @unittest.expectedFailure
-    def test_retype_if_primitives(self):
-        source_code = """
-def validator(x: int) -> str:
-    if True:
-        x = "hello"
-    else:
-        x = "hi"
-    return x
-"""
-        res = eval_uplc_value(source_code, 1)
-        self.assertEqual(res, b"hello")
-
-    @unittest.expectedFailure
-    def test_in_list(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(
-    d: Nothing,
-    r: Nothing,
-    context: ScriptContext,
-):
-    assert context.purpose in context.tx_info.signatories
-"""
-        builder._compile(source_code)
-
-    @hypothesis.given(
-        st.lists(
-            st.tuples(
-                st.integers(), st.sampled_from(["<", "<=", "==", ">=", ">", "!="])
-            ),
-            max_size=10,
-            min_size=2,
-        )
-    )
-    @hypothesis.example(
-        [
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-        ],
-    )
-    def test_comparison_chaining(self, xs):
-        param_string = ",".join(f"i{k}: int" for k, _ in enumerate(xs))
-        comp_string = "i0"
-        eval_string = f"{xs[0][0]}"
-        for k, (x, c) in enumerate(xs[1:], start=1):
-            comp_string += f" {c} i{k}"
-            eval_string += f" {c} {x}"
-        source_code = f"""
-def validator({param_string}) -> bool:
-    return {comp_string}
-"""
-        res = eval_uplc_value(source_code, *[x[0] for x in xs])
-        self.assertEqual(bool(res), eval(eval_string))
-
-    def test_double_import_offset(self):
-        source_code = """
-from opshin.ledger.api_v2 import *
-from opshin.prelude import *
-
-def validator(
-    d: Nothing,
-    r: Nothing,
-    context: ScriptContext,
-):
-    house_address = Address(
-        payment_credential=PubKeyCredential(
-            credential_hash=b""
-        ),
-        staking_credential=SomeStakingCredential(
-            staking_credential=StakingHash(
-                value=PubKeyCredential(
-                    credential_hash=b""
-                )
-            )
-        ),
-    )
-"""
-        # would fail because Address is assigned multiple times and then not constant folded
-        # TODO find a better way
-        builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    def test_double_import_direct(self):
-        source_code = """
-from opshin.prelude import *
-from opshin.prelude import *
-
-def validator(
-    d: Nothing,
-    r: Nothing,
-    context: ScriptContext,
-):
-    house_address = Address(
-        payment_credential=PubKeyCredential(
-            credential_hash=b""
-        ),
-        staking_credential=SomeStakingCredential(
-            staking_credential=StakingHash(
-                value=PubKeyCredential(
-                    credential_hash=b""
-                )
-            )
-        ),
-    )
-"""
-        # would fail because Address is assigned multiple times and then not constant folded
-        # TODO find a better way
-        builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    def test_double_import_deep(self):
-        source_code = """
-from opshin.ledger.interval import *
-from opshin.prelude import *
-
-def validator(
-    d: Nothing,
-    r: Nothing,
-    context: ScriptContext,
-):
-    house_address = Address(
-        payment_credential=PubKeyCredential(
-            credential_hash=b""
-        ),
-        staking_credential=SomeStakingCredential(
-            staking_credential=StakingHash(
-                value=PubKeyCredential(
-                    credential_hash=b""
-                )
-            )
-        ),
-    )
-"""
-        # would fail because Address is assigned multiple times and then not constant folded
-        # TODO find a better way
-        builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    def test_bytearray_alternative(self):
-        source_code = """
-def validator(
-    d: bytearray,
-) -> bytes:
-    return d
-"""
-        eval_uplc(source_code, bytearray(b"hello"))
-
-    # TODO enable when pycardano version is fixed s.t. import of ByteString works
-    @unittest.expectedFailure
-    def test_ByteString_alternative(self):
-        source_code = """
-def validator(
-    d: ByteString,
-) -> bytes:
-    return d
-"""
-        eval_uplc(source_code, bytearray(b"hello"))
-
-    @hypothesis.given(
-        st.lists(
-            st.tuples(st.booleans(), st.sampled_from(["and", "or"])),
-            max_size=10,
-            min_size=2,
-        )
-    )
-    def test_boolop_chaining(self, xs):
-        param_string = ",".join(f"i{k}: bool" for k, _ in enumerate(xs))
-        comp_string = "i0"
-        eval_string = f"{xs[0][0]}"
-        for k, (x, c) in enumerate(xs[1:], start=1):
-            comp_string += f" {c} i{k}"
-            eval_string += f" {c} {x}"
-        source_code = f"""
-def validator({param_string}) -> bool:
-    return {comp_string}
-"""
-        res = eval_uplc_value(source_code, *[x[0] for x in xs])
-        self.assertEqual(bool(res), eval(eval_string))
-
-    def test_wrapping_contract_apply(self):
-        # TODO devise tests for this
-        input_file = "examples/smart_contracts/wrapped_token.py"
-        contract = builder.build(input_file, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-        artifacts = PlutusContract(
-            contract,
-            datum_type=("datum", prelude.Nothing),
-            redeemer_type=("redeemer", prelude.Nothing),
-            parameter_types=[
-                ("token_policy_id", bytes),
-                ("token_name", bytes),
-                ("wrapping_factor", int),
-            ],
-            purpose=[Purpose.spending, Purpose.minting],
-        )
-        applied = artifacts.apply_parameter(b"", b"")
-        assert len(applied.parameter_types) == 1
-        assert applied.parameter_types[0][0] == "wrapping_factor"
-        assert applied.datum_type == ("datum", prelude.Nothing)
-
-    def test_wrapping_contract_dump_load(self):
-        input_file = "examples/smart_contracts/wrapped_token.py"
-        contract = builder.build(input_file, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-        artifacts = PlutusContract(
-            contract,
-            datum_type=("datum", prelude.Nothing),
-            redeemer_type=("redeemer", prelude.ScriptContext),
-            parameter_types=[
-                ("token_policy_id", bytes),
-                ("token_name", bytes),
-                ("wrapping_factor", int),
-            ],
-            purpose=[Purpose.spending, Purpose.minting],
-            description="Wrapped token contract",
-            license="MIT",
-        )
-        target_dir = tempfile.TemporaryDirectory()
-        artifacts.dump(target_dir.name)
-        loaded = builder.load(target_dir.name)
-        assert len(loaded.parameter_types) == len(artifacts.parameter_types)
-        assert loaded.datum_type[1].__name__ == artifacts.datum_type[1].__name__
-        assert loaded.datum_type[0] == artifacts.datum_type[0]
-        assert loaded.datum_type[1].CONSTR_ID == artifacts.datum_type[1].CONSTR_ID
-        assert loaded.redeemer_type[1].__name__ == artifacts.redeemer_type[1].__name__
-        assert loaded.redeemer_type[0] == artifacts.redeemer_type[0]
-        assert loaded.redeemer_type[1].CONSTR_ID == artifacts.redeemer_type[1].CONSTR_ID
-        assert loaded.purpose == artifacts.purpose
-        assert loaded.description == artifacts.description
-        assert loaded.license == artifacts.license
-        assert loaded.title == artifacts.title
-        assert loaded.version == artifacts.version
-
-    def test_bridge(self):
-        @wraps_builtin
-        def add_integer(x: int, y: int) -> int:
-            return x + y
-
-        assert add_integer(1, 2) == 3
-
-        @wraps_builtin
-        def append_byte_string(x: bytes, y: bytes) -> bytes:
-            return x + y
-
-        assert append_byte_string(b"hello", b"world") == b"helloworld"
-
-    @unittest.expectedFailure
-    def test_forbidden_overwrite(self):
-        source_code = """
-def validator(
-    d: int
-):
-    PlutusData = d
-    return d
-"""
-        builder._compile(source_code)
-
-    @parameterized.expand(ALL_EXAMPLES)
-    def test_compilation_deterministic_local(self, input_file):
-        with open(input_file) as fp:
-            source_code = fp.read()
-        code = builder._compile(source_code)
-        for i in range(10):
-            code_2 = builder._compile(source_code)
-            self.assertEqual(code.dumps(), code_2.dumps())
-
-    @parameterized.expand(ALL_EXAMPLES)
-    def test_compilation_deterministic_external(self, input_file):
-        code = subprocess.run(
-            [
-                sys.executable,
-                "-m",
-                "opshin",
-                "compile",
-                "any",
-                input_file,
-            ],
-            capture_output=True,
-        )
-        for i in range(10):
-            code_2 = subprocess.run(
-                [
-                    sys.executable,
-                    "-m",
-                    "opshin",
-                    "compile",
-                    "any",
-                    input_file,
-                ],
-                capture_output=True,
-            )
-            self.assertEqual(code.stdout, code_2.stdout)
-
-    @unittest.expectedFailure
-    def test_return_illegal(self):
-        # this is now an illegal retyping because read variables dont match
-        source_code = """
-return 1
-def validator(_: None) -> int:
-    return 0
-        """
-        builder._compile(source_code)
-
-    def test_return_in_loop(self):
-        source_code = """
-def validator(_: None) -> int:
-    i = 0
-    while i < 10:
-        i += 1
-        if i == 5:
-          return i
-    return 0
-        """
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 5, "Invalid return break")
-
-    def test_return_in_for(self):
-        source_code = """
-def validator(_: None) -> int:
-    i = 0
-    for i in range(10):
-        i += 1
-        if i == 5:
-          return i
-    return 0
-        """
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 5, "Invalid return break")
-
-    def test_return_in_if(self):
-        source_code = """
-def validator(_: None) -> int:
-    i = 0
-    if i == 1:
-        return 0
-    else:
-        return 1
-        """
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 1, "Invalid return")
-
-    @unittest.expectedFailure
-    def test_return_in_if_same_type(self):
-        source_code = """
-def validator(_: None) -> str:
-    i = 0
-    if i == 1:
-        return "a"
-    else:
-        return 1
-        """
-        builder._compile(source_code)
-
-    def test_isinstance_cast_if2(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(_: None) -> Union[A, B]:
-    x = 0
-    if x == 1:
-        return A(1)
-    else:
-        return B(2, 1)
-"""
-        res = eval_uplc(source_code, Unit())
-        self.assertEqual(
-            res,
-            uplc.PlutusConstr(1, [uplc.PlutusInteger(2), uplc.PlutusInteger(1)]),
-            "Invalid return",
-        )
-
-    @unittest.expectedFailure
-    def test_return_in_if_missing_return(self):
-        source_code = """
-def validator(_: None) -> str:
-    i = 0
-    if i == 1:
-        return "a"
-    else:
-        pass
-        """
-        builder._compile(source_code)
-
-    def test_different_return_types_anything(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(a: int) -> Anything:
-    if a > 0:
-        return b""
-    else:
-        return 0
-"""
-        res = eval_uplc(source_code, 1)
-        self.assertEqual(res, uplc.PlutusByteString(b""))
-        res = eval_uplc(source_code, -1)
-        self.assertEqual(res, uplc.PlutusInteger(0))
-
-    @unittest.expectedFailure
-    def test_different_return_types_while_loop(self):
-        source_code = """
-def validator(a: int) -> str:
-    while a > 0:
-        return b""
-    return 0
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_different_return_types_for_loop(self):
-        source_code = """
-def validator(a: int) -> str:
-    for i in range(a):
-        return b""
-    return 0
-"""
-        builder._compile(source_code)
-
-    def test_return_else_loop_while(self):
-        source_code = """
-def validator(a: int) -> int:
-    while a > 0:
-        a -= 1
-    else:
-        return 0
-"""
-        res = eval_uplc_value(source_code, 1)
-        self.assertEqual(res, 0, "Invalid return")
-
-    def test_return_else_loop_for(self):
-        source_code = """
-def validator(a: int) -> int:
-    for _ in range(a):
-        a -= 1
-    else:
-        return 0
-"""
-        res = eval_uplc_value(source_code, 1)
-        self.assertEqual(res, 0, "Invalid return")
-
-    def test_empty_list_int(self):
-        source_code = """
-def validator(_: None) -> List[int]:
-    a: List[int] = []
-    return a + [1]
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, [uplc.PlutusInteger(1)])
-
-    def test_empty_list_data(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> List[Token]:
-    a: List[Token] = []
-    return a + [Token(b"", b"")]
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(
-            res,
-            [
-                uplc.PlutusConstr(
-                    0, [uplc.PlutusByteString(b""), uplc.PlutusByteString(b"")]
-                )
-            ],
-        )
-
-    def test_empty_list_int_constant_folding(self):
-        source_code = """
-def validator(_: None) -> List[int]:
-    a: List[int] = []
-    return a
-"""
-        res = eval_uplc_value(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertEqual(res, [])
-
-    def test_empty_dict_int_int(self):
-        source_code = """
-def validator(_: None) -> Dict[int, int]:
-    a: Dict[int, int] = {}
-    return a
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, {})
-
-    def test_empty_dict_int_int_constant_folding(self):
-        source_code = """
-def validator(_: None) -> Dict[int, int]:
-    a: Dict[int, int] = {}
-    return a
-"""
-        res = eval_uplc_value(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertEqual(res, {})
-
-    def test_empty_dict_displaced_constant_folding(self):
-        source_code = """
-from typing import Dict, List, Union
-
-VAR: Dict[bytes, int] = {}
-
-def validator(b: Dict[int, Dict[bytes, int]]) -> Dict[bytes, int]:
-    a = b.get(0, VAR)
-    return a
-        """
-        res = eval_uplc_value(
-            source_code, {1: {b"": 0}}, config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertEqual(res, {})
-
-    def test_union_subset_call(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    bar: int
-
-@dataclass()
-class C(PlutusData):
-    CONSTR_ID = 2
-    foobar: int
-
-def fun(x: Union[A, B, C]) -> int:
-    return 0
-
-
-def validator(x: Union[A, B]) -> int:
-    return fun(x)
-        """
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_union_superset_call(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    bar: int
-
-@dataclass()
-class C(PlutusData):
-    CONSTR_ID = 2
-    foobar: int
-
-def fun(x: Union[A, B]) -> int:
-    return 0
-
-
-def validator(x: Union[A, B, C]) -> int:
-    return fun(x)
-        """
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_merge_function_same_capture_different_type(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    bar: int
-
-def validator(x: bool) -> int:
-    if x:
-        y = A(0)
-        def foo() -> int:
-            return y.foo
-    else:
-        y = B(0)
-        def foo() -> int:
-            return y.bar
-    y = A(0)
-    return foo()
-        """
-        builder._compile(source_code)
-
-    def test_merge_function_same_capture_same_type(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    bar: int
-
-def validator(x: bool) -> int:
-    if x:
-        y = A(0)
-        def foo() -> int:
-            print(2)
-            return y.foo
-    else:
-        y = A(0) if x else B(0)
-        def foo() -> int:
-            print(y)
-            return 2
-    y = A(0)
-    return foo()
-        """
-        res_true = eval_uplc_value(source_code, 1)
-        res_false = eval_uplc_value(source_code, 0)
-        self.assertEqual(res_true, 0)
-        self.assertEqual(res_false, 2)
-
-    def test_merge_print(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-def validator(x: bool) -> None:
-    if x:
-        a = print
-    else:
-        b = print
-        a = b
-    return a(x)
-        """
-        res_true = eval_uplc(source_code, 1)
-        res_false = eval_uplc(source_code, 0)
-
-    def test_print_reassign(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-def validator(x: bool) -> None:
-    a = print
-    return a(x)
-        """
-        res_true = eval_uplc(source_code, 1)
-        res_false = eval_uplc(source_code, 0)
-
-    def test_str_constr_reassign(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-def validator(x: bool) -> str:
-    a = str
-    return a(x)
-        """
-        res_true = eval_uplc_value(source_code, 1)
-        res_false = eval_uplc_value(source_code, 0)
-
-    @unittest.expectedFailure
-    def test_class_attribute_access(self):
-        source_code = """
-from dataclasses import dataclass
-from pycardano import Datum as Anything, PlutusData
-from typing import Dict, List, Union
-
-@dataclass
-class A(PlutusData):
-    CONSTR_ID = 0
-    a: int
-    b: bytes
-    d: List[int]
-
-def validator(_: None) -> int:
-    return A.CONSTR_ID
-    """
-        builder._compile(source_code)
-
-    def test_constr_id_access(self):
-        source_code = """
-from dataclasses import dataclass
-from pycardano import Datum as Anything, PlutusData
-from typing import Dict, List, Union
-
-@dataclass
-class A(PlutusData):
-    CONSTR_ID = 15
-    a: int
-    b: bytes
-    d: List[int]
-
-def validator(_: None) -> int:
-    return A(0, b"", [1,2]).CONSTR_ID
-    """
-        res = eval_uplc_value(source_code, Unit())
-
-        self.assertEqual(15, res, "Invalid constr id")
-
-    def test_id_map_equals_pycardano(self):
-        @dataclass
-        class A(PlutusData):
-            CONSTR_ID = 0
-            a: int
-            b: bytes
-            d: List[int]
-
-        @dataclass
-        class C(PlutusData):
-            z: Anything
-
-        @dataclass
-        class B(PlutusData):
-            a: int
-            c: A
-            d: Dict[bytes, C]
-            e: Union[A, C]
-
-        source_code = """
-from dataclasses import dataclass
-from pycardano import Datum as Anything, PlutusData
-from typing import Dict, List, Union
-
-@dataclass
-class Nothing(PlutusData):
-    CONSTR_ID = 0
-    
-
-@dataclass
-class A(PlutusData):
-    CONSTR_ID = 0
-    a: int
-    b: bytes
-    d: List[int]
-
-@dataclass
-class C(PlutusData):
-    z: Anything
-
-@dataclass
-class B(PlutusData):
-    a: int
-    c: A
-    d: Dict[bytes, C]
-    e: Union[A, C]
-
-def validator(_: None) -> int:
-    return B(1, A(1, b"", [1, 2]), {b"": C(Nothing())}, C(Nothing())).CONSTR_ID
-    """
-        res = eval_uplc_value(source_code, Unit())
-
-        self.assertEqual(
-            B.CONSTR_ID, res, "Invalid constr id generation (does not match pycardano)"
-        )
-
-    def test_empty_return(self):
-        source_code = """
-def validator(_: None) -> None:
-    return
-"""
-        res = eval_uplc(source_code, Unit())
-        self.assertEqual(res, uplc.PlutusConstr(0, []), "Invalid return")
-
-
-
-
-
-
-
-

Functions

-
-
-def fib(n) -
-
-
-
-
-
-
-

Classes

-
-
-class A -(foo: int) -
-
-

A(foo: int)

-
- -Expand source code - -
@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var foo : int
-
-
-
-
-
-
-class B -(foobar: int, bar: int) -
-
-

B(foobar: int, bar: int)

-
- -Expand source code - -
@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
var bar : int
-
-
-
-
var foobar : int
-
-
-
-
-
-
-class MiscTest -(methodName='runTest') -
-
-

A class whose instances are single test cases.

-

By default, the test code itself should be placed in a method named -'runTest'.

-

If the fixture may be used for many test cases, create as -many test methods as are needed. When instantiating such a TestCase -subclass, specify in the constructor arguments the name of the test method -that the instance is to execute.

-

Test authors should subclass TestCase for their own tests. Construction -and deconstruction of the test's environment ('fixture') can be -implemented by overriding the 'setUp' and 'tearDown' methods respectively.

-

If it is necessary to override the init method, the base class -init method must always be called. It is important that subclasses -should not change the signature of their init method, since instances -of the classes are instantiated automatically by parts of the framework -in order to be run.

-

When subclassing TestCase, you can set these attributes: -* failureException: determines which exception will be raised when -the instance's assertion methods fail; test methods raising this -exception will be deemed to have 'failed' rather than 'errored'. -* longMessage: determines whether long messages (including repr of -objects used in assert methods) will be printed on failure in addition -to any explicit message passed. -* maxDiff: sets the maximum length of a diff in failure messages -by assert methods using difflib. It is looked up as an instance -attribute so can be configured by individual tests if required.

-

Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

-
- -Expand source code - -
class MiscTest(unittest.TestCase):
-    def test_assert_sum_contract_succeed(self):
-        input_file = "examples/smart_contracts/assert_sum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc(
-            source_code,
-            20,
-            22,
-            uplc.data_from_cbor(
-                bytes.fromhex(
-                    "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-                )
-            ),
-            config=DEFAULT_CONFIG.update(OPT_O2_CONFIG),
-        )
-        self.assertEqual(ret, uplc.PlutusConstr(0, []))
-
-    @unittest.expectedFailure
-    def test_assert_sum_contract_fail(self):
-        input_file = "examples/smart_contracts/assert_sum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc(source_code, 0, 22, Unit())
-
-    @given(
-        a=st.integers(min_value=-10, max_value=10),
-        b=st.integers(min_value=0, max_value=10),
-    )
-    def test_mult_for(self, a: int, b: int):
-        input_file = "examples/mult_for.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, a, b)
-        self.assertEqual(ret, a * b)
-
-    @given(
-        a=st.integers(min_value=-10, max_value=10),
-        b=st.integers(min_value=0, max_value=10),
-    )
-    def test_mult_for(self, a: int, b: int):
-        input_file = "examples/mult_for.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, a, b)
-        self.assertEqual(ret, a * b)
-
-    @given(
-        a=st.integers(min_value=-10, max_value=10),
-        b=st.integers(min_value=0, max_value=10),
-    )
-    def test_mult_for_return(self, a: int, b: int):
-        source_code = """
-def validator(a: int, b: int) -> int:
-    c = 0
-    i = 0
-    for i in range(b):
-        c += a
-        if i == 1:
-            return c
-    return c
-"""
-        ret = eval_uplc_value(source_code, a, b)
-        self.assertEqual(ret, a * min(b, 2))
-
-    @given(
-        a=st.integers(min_value=-10, max_value=10),
-        b=st.integers(min_value=0, max_value=10),
-    )
-    def test_mult_while_return(self, a: int, b: int):
-        source_code = """
-def validator(a: int, b: int) -> int:
-    c = 0
-    i = 0
-    while i < b:
-        c += a
-        i += 1
-        if i == 2:
-            return c
-    return c
-"""
-        ret = eval_uplc_value(source_code, a, b)
-        self.assertEqual(ret, a * min(2, b))
-
-    @given(
-        a=st.integers(),
-        b=st.integers(),
-    )
-    def test_sum(self, a: int, b: int):
-        input_file = "examples/sum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, a, b)
-        self.assertEqual(ret, a + b)
-
-    def test_complex_datum_correct_vals(self):
-        input_file = "examples/complex_datum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(
-            source_code,
-            uplc.data_from_cbor(
-                bytes.fromhex(
-                    "d8799fd8799fd8799f581c81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acfffd8799fd8799fd8799f581c145db8343296bd214dde862a64d700c29ed8a71d58bcf865659f5463ffffffffd8799fd8799f581c81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acfffd8799fd8799fd8799f581c145db8343296bd214dde862a64d700c29ed8a71d58bcf865659f5463ffffffffd87a80d8799f1a38220b0bff1a001e84801a001e8480582051176daeee7f2ce62963c50a16f641951e21b8522da262980d4dd361a9bf331b4e4d7565736c69537761705f414d4dff"
-                )
-            ),
-        )
-        self.assertEqual(
-            bytes.fromhex("81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acf"),
-            ret,
-        )
-
-    def test_hello_world(self):
-        input_file = "examples/hello_world.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc(source_code, Unit())
-
-    def test_list_datum_correct_vals(self):
-        input_file = "examples/list_datum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(
-            source_code, uplc.data_from_cbor(bytes.fromhex("d8799f9f41014102ffff"))
-        )
-        self.assertEqual(
-            1,
-            ret,
-        )
-
-    def test_showcase(self):
-        input_file = "examples/showcase.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, 1)
-        self.assertEqual(
-            42,
-            ret,
-        )
-
-    @given(n=st.integers(min_value=0, max_value=5))
-    def test_fib_iter(self, n):
-        input_file = "examples/fib_iter.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, n)
-        self.assertEqual(
-            fib(n),
-            ret,
-        )
-
-    @given(n=st.integers(min_value=0, max_value=5))
-    def test_fib_rec(self, n):
-        input_file = "examples/fib_rec.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, n)
-        self.assertEqual(
-            fib(n),
-            ret,
-        )
-
-    def test_gift_contract_succeed(self):
-        input_file = "examples/smart_contracts/gift.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc(
-            source_code,
-            uplc.PlutusConstr(
-                0,
-                [
-                    uplc.PlutusByteString(
-                        bytes.fromhex(
-                            "dc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2"
-                        )
-                    )
-                ],
-            ),
-            uplc.PlutusConstr(0, []),
-            uplc.data_from_cbor(
-                bytes.fromhex(
-                    (
-                        "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a1401a000f4240d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff9f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffa1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820c17c32f6433ae22c2acaebfb796bbfaee3993ff7ebb58a2bac6b4a3bdd2f6d28ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-                    )
-                )
-            ),
-        )
-        self.assertEqual(ret, uplc.PlutusConstr(0, []))
-
-    @unittest.expectedFailure
-    def test_gift_contract_fail(self):
-        input_file = "examples/smart_contracts/gift.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        # required sig missing int this script context
-        ret = eval_uplc(
-            source_code,
-            uplc.PlutusConstr(
-                0,
-                [
-                    uplc.PlutusByteString(
-                        bytes.fromhex(
-                            "dc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2"
-                        )
-                    )
-                ],
-            ),
-            uplc.PlutusConstr(0, []),
-            uplc.data_from_cbor(
-                bytes.fromhex(
-                    (
-                        "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820797a1e1720b63621c6b185088184cb8e23af6e46b55bd83e7a91024c823a6c2affffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-                    )
-                )
-            ),
-        )
-
-    def test_recursion_simple(self):
-        source_code = """
-def validator(_: None) -> int:
-    def a(n: int) -> int:
-      if n == 0:
-        res = 0
-      else:
-        res = a(n-1)
-      return res
-    return a(1)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(0, ret)
-
-    @unittest.expectedFailure
-    def test_recursion_illegal(self):
-        # this is now an illegal retyping because read variables dont match
-        source_code = """
-def validator(_: None) -> int:
-    def a(n: int) -> int:
-      if n == 0:
-        res = 0
-      else:
-        res = a(n-1)
-      return res
-    b = a
-    def a(x: int) -> int:
-      return 100
-    return b(1)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(100, ret)
-
-    def test_recursion_legal(self):
-        source_code = """
-def validator(_: None) -> int:
-    def a(n: int) -> int:
-      if n == 0:
-        res = 0
-      else:
-        res = a(n-1)
-      return res
-    b = a
-    def a(n: int) -> int:
-      a
-      if 1 == n:
-        pass
-      return 100
-    return b(1)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(100, ret)
-
-    @unittest.expectedFailure
-    def test_uninitialized_access(self):
-        source_code = """
-def validator(_: None) -> int:
-    b = 1
-    def a(n: int) -> int:
-      b += 1
-      if b == 2:
-        return 0
-      else:
-        return a(n-1)
-    return a(1)
-        """
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_illegal_bind(self):
-        source_code = """
-def validator(_: None) -> int:
-    b = 1
-    def a(n: int) -> int:
-      if n == 0:
-        return 100
-      if b == 2:
-        return 0
-      b = 2
-      return a(n-1)
-    return a(2)
-        """
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_type_reassignment_function_bound(self):
-        # changing the type of a variable should be disallowed if the variable is bound by a function
-        # it can be ok if the types can be merged (resulting in union type inside the function) but
-        # generally should be disallowed
-        source_code = """
-def validator(_: None) -> int:
-    b = 1
-    def a(n: int) -> int:
-      return b
-    b = b''
-    return a(1)
-        """
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_illegal_function_retype(self):
-        source_code = """
-def validator(_: None) -> int:
-    def a(n: int) -> int:
-      if n == 0:
-        res = 0
-      else:
-        res = a(n-1)
-      return res
-    b = a
-    def a() -> int:
-      return 100
-    return b(1)
-        """
-        builder._compile(source_code)
-
-    def test_datum_cast(self):
-        input_file = "examples/datum_cast.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(
-            source_code,
-            uplc.data_from_cbor(
-                bytes.fromhex(
-                    "d8799fd8799fd8799f581c81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acfffd8799fd8799fd8799f581c145db8343296bd214dde862a64d700c29ed8a71d58bcf865659f5463ffffffffd8799fd8799f581c81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acfffd8799fd8799fd8799f581c145db8343296bd214dde862a64d700c29ed8a71d58bcf865659f5463ffffffffd87a80d8799f1a38220b0bff1a001e84801a001e8480582051176daeee7f2ce62963c50a16f641951e21b8522da262980d4dd361a9bf331b4e4d7565736c69537761705f414d4dff"
-                )
-            ),
-            uplc.PlutusByteString(b"test"),
-        )
-        self.assertEqual(
-            bytes.fromhex("81aab0790f33d26bad68a6a13ae98562aa1366da48cdce20dec21acf")
-            + b"test",
-            ret,
-        )
-
-    def test_wrapping_contract_compile(self):
-        # TODO devise tests for this
-        input_file = "examples/smart_contracts/wrapped_token.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        builder._compile(source_code, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-
-    def test_dual_use_compile(self):
-        # TODO devise tests for this
-        input_file = "examples/smart_contracts/dual_use.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        builder._compile(source_code, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-
-    def test_marketplace_compile(self):
-        # TODO devise tests for this
-        input_file = "examples/smart_contracts/marketplace.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_marketplace_compile_fail(self):
-        input_file = "examples/smart_contracts/marketplace.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        builder._compile(source_code, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-
-    def test_parameterized_compile(self):
-        # TODO devise tests for this
-        input_file = "examples/smart_contracts/parameterized.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        builder._compile(source_code, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-
-    def test_dict_datum(self):
-        input_file = "examples/dict_datum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        d = uplc.PlutusConstr(
-            0,
-            [
-                uplc.PlutusMap(
-                    frozendict.frozendict(
-                        {
-                            uplc.PlutusConstr(
-                                0,
-                                frozenlist2.frozenlist(
-                                    [uplc.PlutusByteString(b"\x01")]
-                                ),
-                            ): uplc.PlutusInteger(2)
-                        }
-                    )
-                )
-            ],
-        )
-        ret = eval_uplc(source_code, d)
-        self.assertTrue(bool(ret))
-
-    def test_dict_datum_wrong(self):
-        input_file = "examples/dict_datum.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        d = uplc.PlutusConstr(
-            0,
-            [
-                uplc.PlutusMap(
-                    frozendict.frozendict(
-                        {
-                            uplc.PlutusConstr(
-                                0,
-                                frozenlist2.frozenlist(
-                                    [uplc.PlutusByteString(b"\x02")]
-                                ),
-                            ): uplc.PlutusInteger(2)
-                        }
-                    )
-                )
-            ],
-        )
-        ret = eval_uplc_value(source_code, d)
-        self.assertFalse(bool(ret))
-
-    def test_removedeadvar_noissue(self):
-        source_code = """
-from opshin.prelude import *
-def validator(x: Token) -> bool:
-    b = 4
-    a = b
-    return True
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, True)
-
-    def test_removedeadvar_noissue2(self):
-        source_code = """
-from opshin.prelude import *
-def validator(x: Token) -> bool:
-    def foo(x: Token) -> bool:
-        b = 4
-        a = b
-        return True
-    return foo(x)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, True)
-
-    def test_removedeadvar_noissue3(self):
-        source_code = """
-from opshin.prelude import *
-
-def foo(x: Token) -> bool:
-    b = 4
-    a = b
-    return True
-
-def validator(x: Token) -> bool:
-    return foo(x)
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, True)
-
-    @unittest.expectedFailure
-    def test_overopt_removedeadvar(self):
-        source_code = """
-from opshin.prelude import *
-def validator(x: Token) -> bool:
-    a = x.policy_id
-    return True
-        """
-        ret = eval_uplc(source_code, Unit())
-
-    @unittest.expectedFailure
-    def test_opt_shared_var(self):
-        source_code = """
-from opshin.prelude import *
-def validator(x: Token) -> bool:
-    if False:
-        y = x
-    else:
-        a = y
-    return True
-        """
-        ret = eval_uplc(source_code, Unit())
-
-    def test_list_expr(self):
-        # this tests that the list expression is evaluated correctly
-        source_code = """
-def validator(x: None) -> List[int]:
-    return [1, 2, 3, 4, 5]
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        ret = [x.value for x in ret]
-        self.assertEqual(ret, [1, 2, 3, 4, 5], "List expression incorrectly compiled")
-
-    def test_list_expr_not_const(self):
-        # this tests that the list expression is evaluated correctly (for non-constant expressions)
-        source_code = """
-def validator(x: int) -> List[int]:
-    return [x, x+1, x+2, x+3, x+4]
-        """
-        ret = eval_uplc_value(source_code, 1)
-        ret = [x.value for x in ret]
-        self.assertEqual(ret, [1, 2, 3, 4, 5], "List expression incorrectly compiled")
-
-    def test_dict_expr_not_const(self):
-        # this tests that the list expression is evaluated correctly (for non-constant expressions)
-        source_code = """
-def validator(x: int) -> Dict[int, bytes]:
-    return {x: b"a", x+1: b"b"}
-        """
-        ret = eval_uplc_value(source_code, 1)
-        ret = {x.value: y.value for x, y in ret.items()}
-        self.assertEqual(
-            ret, {1: b"a", 2: b"b"}, "Dict expression incorrectly compiled"
-        )
-
-    def test_redefine_poly_constr(self):
-        # this tests that classes defined by assignment inherit constructors
-        source_code = """
-def validator(x: None) -> bytes:
-    a = bytes
-    return a([2, 3])
-        """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, bytes([2, 3]), "Re-assignment of global variable failed")
-
-    @given(st.booleans())
-    def test_redefine_constr(self, x):
-        # this tests that classes defined by assignment inherit constructors
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-    bar: int
-    
-def validator(x: int) -> int:
-    a = A
-    return a(x, 1).foo
-        """
-        ret = eval_uplc_value(source_code, int(x))
-        self.assertEqual(ret, int(x), "Re-assignment of class constr failed")
-
-    def test_wrap_into_generic_data(self):
-        # this tests data is wrapped into Anything if a function accepts Anything
-        source_code = """
-from opshin.prelude import *
-def validator(_: None) -> SomeOutputDatum:
-    return SomeOutputDatum(b"a")
-        """
-        ret = eval_uplc(source_code, Unit())
-        self.assertEqual(
-            ret,
-            uplc.data_from_cbor(prelude.SomeOutputDatum(b"a").to_cbor()),
-            "Wrapping to generic data failed",
-        )
-
-    def test_list_comprehension_even(self):
-        input_file = "examples/list_comprehensions.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, 8, 1)
-        ret = [x.value for x in ret]
-        self.assertEqual(
-            ret,
-            [x * x for x in range(8) if x % 2 == 0],
-            "List comprehension with filter incorrectly evaluated",
-        )
-
-    def test_list_comprehension_all(self):
-        input_file = "examples/list_comprehensions.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, 8, 0)
-        ret = [x.value for x in ret]
-        self.assertEqual(
-            ret,
-            [x * x for x in range(8)],
-            "List comprehension incorrectly evaluated",
-        )
-
-    def test_dict_comprehension_even(self):
-        input_file = "examples/dict_comprehensions.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, 8, 1)
-        ret = {x.value: y.value for x, y in ret.items()}
-        self.assertEqual(
-            ret,
-            {x: x * x for x in range(8) if x % 2 == 0},
-            "Dict comprehension incorrectly evaluated",
-        )
-
-    def test_dict_comprehension_all(self):
-        input_file = "examples/dict_comprehensions.py"
-        with open(input_file) as fp:
-            source_code = fp.read()
-        ret = eval_uplc_value(source_code, 8, 0)
-        ret = {x.value: y.value for x, y in ret.items()}
-        self.assertEqual(
-            ret,
-            {x: x * x for x in range(8)},
-            "Dict comprehension incorrectly evaluated",
-        )
-
-    @hypothesis.given(some_output)
-    def test_union_type_attr_access_all_records(self, x):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: SomeOutputDatumHash
-    
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foo: SomeOutputDatum
-
-def validator(x: Union[A, B]) -> Union[SomeOutputDatumHash, SomeOutputDatum]:
-    return x.foo
-"""
-
-        @dataclass()
-        class A(PlutusData):
-            CONSTR_ID = 0
-            foo: SomeOutputDatumHash
-
-        @dataclass()
-        class B(PlutusData):
-            CONSTR_ID = 1
-            foo: SomeOutputDatum
-
-        x = A(x) if isinstance(x, SomeOutputDatumHash) else B(x)
-
-        ret = eval_uplc(source_code, x)
-        self.assertEqual(ret, uplc.data_from_cbor(x.foo.to_cbor()))
-
-    @hypothesis.given(some_output, st.sampled_from([1, 2, 3]))
-    def test_union_type_attr_access_all_records_diff_pos(self, x, y):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: SomeOutputDatumHash
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foo: SomeOutputDatum
-    
-@dataclass()
-class C(PlutusData):
-    CONSTR_ID = 2
-    bar: int
-    foo: SomeOutputDatum
-    
-@dataclass()
-class D(PlutusData):
-    CONSTR_ID = 3
-    foobar: int
-    bar: int
-    foo: SomeOutputDatum
-
-def validator(x: Union[A, B, C, D]) -> Union[SomeOutputDatumHash, SomeOutputDatum]:
-    return x.foo
-"""
-
-        @dataclass()
-        class A(PlutusData):
-            CONSTR_ID = 0
-            foo: SomeOutputDatumHash
-
-        @dataclass()
-        class B(PlutusData):
-            CONSTR_ID = 1
-            foo: SomeOutputDatum
-
-        @dataclass()
-        class C(PlutusData):
-            CONSTR_ID = 2
-            bar: int
-            foo: SomeOutputDatum
-
-        @dataclass()
-        class D(PlutusData):
-            CONSTR_ID = 3
-            foobar: int
-            bar: int
-            foo: SomeOutputDatum
-
-        x = (
-            A(x)
-            if isinstance(x, SomeOutputDatumHash)
-            else B(x) if y == 1 else C(0, x) if y == 2 else D(0, 0, x)
-        )
-
-        ret = eval_uplc(source_code, x)
-        self.assertEqual(ret, uplc.data_from_cbor(x.foo.to_cbor()))
-
-    @unittest.expectedFailure
-    def test_union_type_all_records_same_constr(self):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: SomeOutputDatumHash
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 0
-    foo: SomeOutputDatum
-
-def validator(x: Union[A, B]) -> Union[SomeOutputDatumHash, SomeOutputDatum]:
-    return x.foo
-"""
-        eval_uplc(source_code, Unit())
-
-    @unittest.expectedFailure
-    def test_union_type_attr_access_all_records_same_constr(self):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: Token
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foo: Address
-
-def validator(x: Union[A, B]) -> int:
-    m = x.foo
-    if isinstance(m, Address):
-        k = 0
-    else:
-        k = 1
-    return k
-"""
-        eval_uplc(source_code, Unit())
-
-    def test_union_type_attr_access_maximum_type(self):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foo: int
-
-def validator(x: Union[A, B]) -> int:
-    return x.foo
-"""
-        ret = eval_uplc_value(
-            source_code, uplc.PlutusConstr(0, [uplc.PlutusInteger(1)])
-        )
-        self.assertEqual(ret, 1)
-
-    def test_union_type_attr_anytype(self):
-        source_code = """
-from opshin.prelude import *
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: bytes
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foo: int
-
-def validator(x: Union[A, B]) -> Anything:
-    return x.foo
-"""
-        ret = eval_uplc_value(
-            source_code, uplc.PlutusConstr(0, [uplc.PlutusByteString(b"")])
-        )
-        self.assertEqual(ret, b"")
-
-    def test_typecast_anything_int(self):
-        source_code = """
-def validator(x: Anything) -> int:
-    b: int = x
-    return b
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 0)
-
-    def test_typecast_int_anything(self):
-        # this should compile, it happens implicitly anyways when calling a function with Any parameters
-        source_code = """
-def validator(x: int) -> Anything:
-    b: Anything = x
-    return b
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 0)
-
-    def test_typecast_int_anything_int(self):
-        source_code = """
-def validator(x: int) -> Anything:
-    b: Anything = x
-    c: int = b
-    return c + 1
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 1)
-
-    def test_typecast_anything_int_anything(self):
-        source_code = """
-def validator(x: Anything) -> Anything:
-    b: int = x
-    c: Anything = b + 1
-    return c
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 1)
-
-    @unittest.expectedFailure
-    def test_typecast_int_str(self):
-        # this should not compile, the two types are unrelated and there is no meaningful way to cast them either direction
-        source_code = """
-def validator(x: int) -> str:
-    b: str = x
-    return b
-"""
-        builder._compile(source_code)
-
-    def test_typecast_int_int(self):
-        source_code = """
-def validator(x: int) -> int:
-    b: int = x
-    return b
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 0)
-
-    def test_zero_ary(self):
-        source_code = """
-def a() -> None:
-    assert False, "Executed a"
-
-def validator(x: None) -> int:
-    b = a
-    if False:
-        b()
-    return 2
-"""
-        ret = eval_uplc_value(source_code, 0)
-        self.assertEqual(ret, 2, "Invalid return value")
-
-    @unittest.expectedFailure
-    def test_zero_ary_exec(self):
-        source_code = """
-def a() -> None:
-    assert False, "Executed a"
-
-def validator(x: None) -> None:
-    b = a
-    if True:
-        b()
-"""
-        ret = eval_uplc_value(source_code, 0)
-
-    def test_zero_ary_method(self):
-        source_code = """
-def validator(x: None) -> None:
-    b = b"\\xFF".decode
-    if False:
-        b()
-"""
-        eval_uplc(source_code, 0)
-
-    @unittest.expectedFailure
-    def test_zero_ary_method_exec(self):
-        source_code = """
-def validator(x: None) -> None:
-    b = b"\\xFF".decode
-    if True:
-        b()
-"""
-        eval_uplc(source_code, 0)
-
-    def test_zero_ary_method_exec_suc(self):
-        source_code = """
-def validator(x: None) -> str:
-    b = b"\\x32".decode
-    return b()
-"""
-        res = eval_uplc_value(source_code, 0)
-        self.assertEqual(res, b"\x32")
-
-    def test_return_anything(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator() -> Anything:
-    return b""
-"""
-        res = eval_uplc(source_code, 0)
-        self.assertEqual(res, uplc.PlutusByteString(b""))
-
-    def test_no_return_annotation(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator():
-    return b""
-"""
-        res = eval_uplc(source_code, 0)
-        self.assertEqual(res, uplc.PlutusByteString(b""))
-
-    def test_no_parameter_annotation(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(a) -> bytes:
-    b: bytes = a
-    return b
-"""
-        res = eval_uplc(source_code, b"")
-        self.assertEqual(res, uplc.PlutusByteString(b""))
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_dict_items_values_deconstr(self, xs):
-        # asserts that deconstruction of parameters works for for loops too
-        source_code = """
-def validator(xs: Dict[int, bytes]) -> bytes:
-    sum_values = b""
-    for _, x in xs.items():
-        sum_values += x
-    return sum_values
-"""
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(
-            ret,
-            b"".join(xs.values()),
-            "for loop deconstruction did not behave as expected",
-        )
-
-    def test_nested_deconstruction(self):
-        source_code = """
-def validator(xs) -> int:
-    a, ((b, c), d) = (1, ((2, 3), 4))
-    return a + b + c + d
-"""
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(
-            ret,
-            1 + 2 + 3 + 4,
-            "for loop deconstruction did not behave as expected",
-        )
-
-    @given(
-        xs=st.dictionaries(
-            st.binary(),
-            st.dictionaries(st.binary(), st.integers(), max_size=3),
-            max_size=5,
-        )
-    )
-    def test_dict_items_values_deconstr(self, xs):
-        # nested deconstruction with a Value-like object
-        source_code = """
-def validator(xs: Dict[bytes, Dict[bytes, int]]) -> int:
-    sum_values = 0
-    for pid, tk_dict in xs.items():
-        for tk_name, tk_amount in tk_dict.items():
-            sum_values += tk_amount
-    return sum_values
-"""
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(
-            ret,
-            sum(v for pid, d in xs.items() for nam, v in d.items()),
-            "for loop deconstruction did not behave as expected",
-        )
-
-    def test_no_return_annotation_no_return(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(a):
-    pass
-"""
-        res = eval_uplc(source_code, 0)
-        self.assertEqual(res, uplc.PlutusConstr(0, []))
-
-    @unittest.expectedFailure
-    def test_opt_unsafe_cast(self):
-        # test that unsafe casts are not optimized away
-        source_code = """
-from opshin.prelude import *
-def validator(x: Token) -> bool:
-    b: Anything = x
-    a: int = b
-    return True
-        """
-        ret = eval_uplc(source_code, Unit())
-
-    def test_constant_folding(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> bytes:
-    return bytes.fromhex("0011")
-"""
-        res = eval_uplc_value(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertEqual(res, bytes.fromhex("0011"))
-
-    @unittest.expectedFailure
-    def test_constant_folding_disabled(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> bytes:
-    return bytes.fromhex("0011")
-"""
-        eval_uplc(source_code, Unit(), constant_folding=False)
-
-    def test_constant_folding_list(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> List[int]:
-    return list(range(0, 10, 2))
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con (list integer) [0, 2, 4, 6, 8])", code.dumps())
-        res = builder.uplc_eval(code)
-        self.assertEqual(
-            res.result,
-            uplc.PlutusList([uplc.PlutusInteger(i) for i in range(0, 10, 2)]),
-        )
-
-    def test_constant_folding_dict(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> Dict[str, bool]:
-    return {"s": True, "m": False}
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn(
-            "(con (list (pair data data)) [(B #73, I 1), (B #6d, I 0)])", code.dumps()
-        )
-        res = uplc_eval(code).result
-        if isinstance(res, Exception):
-            raise res
-        self.assertEqual(
-            res,
-            uplc.PlutusMap(
-                {
-                    uplc.PlutusByteString("s".encode()): uplc.PlutusInteger(1),
-                    uplc.PlutusByteString("m".encode()): uplc.PlutusInteger(0),
-                }
-            ),
-        )
-
-    def test_constant_folding_complex(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> Dict[str, List[Dict[bytes, int]]]:
-    return {"s": [{b"": 0}, {b"0": 1}]}
-"""
-        res = eval_uplc(source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-        self.assertEqual(
-            res,
-            uplc.PlutusMap(
-                {
-                    uplc.PlutusByteString("s".encode()): uplc.PlutusList(
-                        [
-                            uplc.PlutusMap(
-                                {uplc.PlutusByteString(b""): uplc.PlutusInteger(0)}
-                            ),
-                            uplc.PlutusMap(
-                                {uplc.PlutusByteString(b"0"): uplc.PlutusInteger(1)}
-                            ),
-                        ]
-                    ),
-                }
-            ),
-        )
-
-    def test_constant_folding_plutusdata(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> PubKeyCredential:
-    return PubKeyCredential(bytes.fromhex("0011"))
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con data (Constr 0 [B #0011]))", code.dumps())
-        res = uplc_eval(code)
-        self.assertEqual(
-            res.result,
-            uplc.PlutusConstr(
-                constructor=0, fields=[uplc.PlutusByteString(value=b"\x00\x11")]
-            ),
-        )
-
-    def test_constant_folding_user_def(self):
-        source_code = """
-def fib(i: int) -> int:
-    return i if i < 2 else fib(i-1) + fib(i-2)
-
-def validator(_: None) -> int:
-    return fib(10)
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con integer 55)", code.dumps())
-        res = uplc_eval(code).result
-        if isinstance(res, Exception):
-            raise res
-        self.assertEqual(
-            res.value,
-            55,
-        )
-
-    @unittest.expectedFailure
-    def test_constant_folding_ifelse(self):
-        source_code = """
-def validator(_: None) -> int:
-    if False:
-        a = 10
-    return a
-"""
-        eval_uplc(source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    @unittest.expectedFailure
-    def test_constant_folding_for(self):
-        source_code = """
-def validator(x: List[int]) -> int:
-    for i in x:
-        a = 10
-    return a
-"""
-        eval_uplc(source_code, [], config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    @unittest.expectedFailure
-    def test_constant_folding_for_target(self):
-        source_code = """
-def validator(x: List[int]) -> int:
-    for i in x:
-        a = 10
-    return i
-"""
-        eval_uplc(source_code, [], config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    @unittest.expectedFailure
-    def test_constant_folding_while(self):
-        source_code = """
-def validator(_: None) -> int:
-    while False:
-        a = 10
-    return a
-"""
-        eval_uplc(source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    @unittest.skip("Fine from a guarantee perspective, but needs better inspection")
-    def test_constant_folding_guaranteed_branch(self):
-        source_code = """
-def validator(_: None) -> int:
-    if False:
-        a = 20
-        b = 2 * a
-    else:
-        b = 2
-    return b
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con integer 40)", code.dumps())
-
-    @unittest.skip("Fine from a guarantee perspective, but needs better inspection")
-    def test_constant_folding_scoping(self):
-        source_code = """
-a = 4
-def validator(_: None) -> int:
-    a = 2
-    b = 5 * a
-    return b
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con integer 10)", code.dumps())
-
-    @unittest.skip("Fine from a guarantee perspective, but needs better inspection")
-    def test_constant_folding_no_scoping(self):
-        source_code = """
-def validator(_: None) -> int:
-    a = 4
-    a = 2
-    b = 5 * a
-    return b
-"""
-        code = builder._compile(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertIn("(con integer 10)", code.dumps())
-
-    def test_constant_folding_repeated_assign(self):
-        source_code = """
-def validator(i: int) -> int:
-    a = 4
-    for k in range(i):
-        a = 2
-    return a
-"""
-        code = builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-        res = uplc_eval(code, uplc.PlutusInteger(0)).result
-        if isinstance(res, Exception):
-            raise res
-        self.assertEqual(res.value, 4)
-        res = uplc_eval(code, uplc.PlutusInteger(1)).result
-        if isinstance(res, Exception):
-            raise res
-        self.assertEqual(res.value, 2)
-
-    def test_constant_folding_math(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> int:
-    return 2 ** 10
-"""
-        code = builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-        code_src = code.dumps()
-        self.assertIn(f"(con integer {2**10})", code_src)
-
-    def test_reassign_builtin(self):
-        source_code = """
-b = int
-def validator(_: None) -> int:
-    def int(a) -> b:
-        return 2
-    return int(5)
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 2)
-
-    @unittest.expectedFailure
-    def test_reassign_builtin_invalid_type(self):
-        source_code = """
-def validator(_: None) -> int:
-    def int(a) -> int:
-        return 2
-    return int(5)
-"""
-        builder._compile(source_code)
-
-    def test_constant_folding_ignore_reassignment(self):
-        source_code = """
-b = int
-def validator(_: None) -> int:
-    def int(a) -> b:
-        return 2
-    return int(5)
-"""
-        res = eval_uplc_value(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertEqual(res, 2)
-
-    def test_constant_folding_no_print_eval(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> None:
-    return print("hello")
-"""
-        code = builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-        code_src = code.dumps()
-        self.assertIn(f'(con string "hello")', code_src)
-
-    def test_inner_outer_state_functions(self):
-        source_code = """
-a = 2
-def b() -> int:
-    return a
-
-def validator(_: None) -> int:
-    a = 3
-    return b()
-        """
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 2)
-
-    def test_inner_outer_state_functions_nonglobal(self):
-        source_code = """
-
-def validator(_: None) -> int:
-    a = 2
-    def b() -> int:
-        return a
-    def c() -> int:
-        a = 3
-        return b()
-    return c()
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 2)
-
-    def test_outer_state_change_functions(self):
-        source_code = """
-a = 2
-def b() -> int:
-    return a
-a = 3
-
-def validator(_: None) -> int:
-    return b()
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 3)
-
-    @unittest.expectedFailure
-    def test_failing_annotated_type(self):
-        source_code = """
-def c():
-    a = 2
-    def b() -> int:
-        return a
-    return b
-
-def validator(_: None):
-    a = 3
-    return c()
-"""
-        eval_uplc(source_code, Unit())
-
-    @unittest.expectedFailure
-    def test_access_enclosing_variable_before_def(self):
-        # note this is a runtime error, just like it would be in python!
-        source_code = """
-a = "1"
-def validator(_: None) -> None:
-   def d() -> str:
-       return a
-   print(d())
-   a = "2"
-"""
-        eval_uplc(source_code, Unit())
-
-    @unittest.expectedFailure
-    def test_access_local_variable_before_assignment(self):
-        # note this is a runtime error, just like it would be in python!
-        source_code = """
-a = "1"
-def validator(_: None) -> None:
-   print(a)
-   a = "2"
-"""
-        eval_uplc(source_code, Unit())
-
-    def test_warn_bytestring(self):
-        source_code = """
-b = b"0011ff"
-def validator(_: None) -> None:
-    pass
-"""
-        eval_uplc(source_code, Unit())
-
-    @parameterized.expand(
-        [
-            (
-                "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-            ),
-            (
-                "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820797a1e1720b63621c6b185088184cb8e23af6e46b55bd83e7a91024c823a6c2affffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-            ),
-            (
-                "d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a1401a000f4240d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff9f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffa1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820c17c32f6433ae22c2acaebfb796bbfaee3993ff7ebb58a2bac6b4a3bdd2f6d28ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff"
-            ),
-        ]
-    )
-    def test_script_context_str_format(self, p: str):
-        context = ScriptContext.from_cbor(bytes.fromhex(p))
-        source_code = """
-from opshin.prelude import *
-
-def validator(c: ScriptContext) -> str:
-    return f"{c}"
-        """
-        res = eval_uplc_value(source_code, context)
-        # should not raise
-        eval(res)
-
-    @hypothesis.given(st.binary(), st.binary())
-    def test_uplc_builtin(self, x, y):
-        source_code = """
-from opshin.std.builtins import *
-def validator(x: bytes, y: bytes) -> bytes:
-    return append_byte_string(x, y)
-"""
-        res = eval_uplc_value(source_code, x, y)
-        self.assertEqual(res, x + y)
-
-    def test_trace_order(self):
-        # TODO can become a proper test once uplc is upgraded to >=1.0.0
-        source_code = """
-from opshin.std.builtins import *
-def validator() -> None:
-    print("test")
-    print("hi")
-    print("there")
-    return None
-"""
-        eval_uplc(source_code, PlutusData())
-
-    def test_print_empty(self):
-        # TODO can become a proper test once uplc is upgraded to >=1.0.0
-        source_code = """
-from opshin.std.builtins import *
-def validator() -> None:
-    print()
-    print()
-    print()
-    print()
-    print()
-    print()
-    return None
-"""
-        eval_uplc(source_code, PlutusData())
-
-    @hypothesis.given(st.integers())
-    def test_cast_bool_ite(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    if x:
-        res = True
-    else:
-        res = False
-    return res
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, bool(x))
-
-    @hypothesis.given(st.integers())
-    def test_cast_bool_ite_expr(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    return True if x else False
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(res), bool(x))
-
-    @hypothesis.given(st.integers())
-    def test_cast_bool_while(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    res = False
-    while x:
-        res = True
-        x = 0
-    return res
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(res), bool(x))
-
-    @hypothesis.given(st.integers())
-    def test_cast_bool_boolops(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    return x and x or (x or x)
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(res), bool(x and x or (x or x)))
-
-    @hypothesis.given(st.integers())
-    def test_cast_bool_ite(self, x):
-        source_code = """
-def validator(x: int) -> None:
-    assert x
-"""
-        try:
-            eval_uplc(source_code, x)
-            res = True
-        except Exception:
-            res = False
-        self.assertEqual(res, bool(x))
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_if(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    if isinstance(x, A):
-        k = x.foo
-    elif isinstance(x, B):
-        k = x.bar
-    return k
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if isinstance(x, A) else x.bar)
-
-    @hypothesis.given(a_or_b, a_or_b)
-    def test_complex_isinstance_cast_if(self, x, y):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B], y: Union[A, B]) -> int:
-    if isinstance(x, A) and isinstance(y, B):
-        k = x.foo + y.bar
-    elif isinstance(x, A) and isinstance(y, A):
-        k = x.foo + y.foo
-    elif isinstance(x, B) and isinstance(y, A):
-        k = x.bar + y.foo
-    elif isinstance(x, B) and isinstance(y, B):
-        k = x.bar + y.bar
-    return k
-"""
-        res = eval_uplc_value(source_code, x, y)
-        self.assertEqual(
-            res,
-            (x.foo if isinstance(x, A) else x.bar)
-            + (y.foo if isinstance(y, A) else y.bar),
-        )
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_ifexpr(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    k = x.foo if isinstance(x, A) else x.bar if isinstance(x, B) else 0
-    return k
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if isinstance(x, A) else x.bar)
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_while(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    foo = 0
-    while isinstance(x, B) and foo != 1:
-        foo = x.bar
-        foo = 1
-    return foo
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, 1 if isinstance(x, B) else 0)
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_random(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> bool:
-    return isinstance(x, A)
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, isinstance(x, A))
-
-    @hypothesis.given(a_or_b, st.integers())
-    @hypothesis.example(A(0), 0)
-    def test_isinstance_cast_shortcut_and(self, x, y):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B], y: int) -> bool:
-    return isinstance(x, A) and x.foo == y or isinstance(x, B) and x.bar == y
-"""
-        res = eval_uplc_value(source_code, x, y)
-        self.assertEqual(
-            res, isinstance(x, A) and x.foo == y or isinstance(x, B) and x.bar == y
-        )
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_assert(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    assert isinstance(x, B), "Wrong type"
-    return x.bar
-"""
-        try:
-            res = eval_uplc_value(source_code, x)
-        except:
-            res = None
-        self.assertEqual(res, x.bar if isinstance(x, B) else None)
-
-    @unittest.expectedFailure
-    def test_isinstance_cast_assert_if(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    if True:
-        assert isinstance(x, B), "Wrong type"
-    return x.bar
-"""
-        builder._compile(source_code)
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_complex_or(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-    
-@dataclass()
-class C(PlutusData):
-    CONSTR_ID = 2
-    foo: int
-
-def validator(x: Union[A, B, C]) -> int:
-    if isinstance(x, A) or isinstance(x, C):
-        res = x.foo
-    else:
-        res = 100
-    return res
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if isinstance(x, A) else 100)
-
-    @unittest.expectedFailure
-    def test_isinstance_cast_complex_or_sameconstr(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-@dataclass()
-class C(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-def validator(x: Union[A, B]) -> int:
-    if isinstance(x, A) or isinstance(x, C):
-        res = x.foo
-    else:
-        res = 100
-    return res
-"""
-        builder._compile(source_code)
-        print("Union of same constructor id was allowed, should be disallowed")
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_complex_not(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-    
-def validator(x: Union[A, B]) -> int:
-    if not isinstance(x, B):
-        res = x.foo
-    else:
-        res = 100
-    return res
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if not isinstance(x, B) else 100)
-
-    @hypothesis.given(a_or_b)
-    def test_isinstance_cast_complex_ifelse(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    if isinstance(x, A):
-        res = x.foo
-    else:
-        res = x.bar
-    return res
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if isinstance(x, A) else x.bar)
-
-    @unittest.expectedFailure
-    def test_isinstance_cast_complex_or_else(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    foo = 0
-    if isinstance(x, B) or foo == 0:
-        foo = x.bar
-    else:
-        foo = x.foo
-    return foo
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_isinstance_cast_complex_and_else(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    foo = 0
-    if isinstance(x, B) and foo == 0:
-        foo = x.bar
-    else:
-        foo = x.foo
-    return foo
-"""
-        builder._compile(source_code)
-
-    def test_isinstance_cast_complex_and(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    foo = 0
-    if isinstance(x, B) and foo == 0:
-        foo = x.bar
-    return foo
-"""
-        builder._compile(source_code)
-
-    @hypothesis.given(a_or_b, st.integers())
-    def test_isinstance_cast_shortcut_or(self, x, y):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B], y: int) -> bool:
-    return (isinstance(x, A) or x.bar == y) and (isinstance(x, B) or x.foo == y)
-"""
-        res = eval_uplc_value(source_code, x, y)
-        self.assertEqual(
-            res, (isinstance(x, A) or x.bar == y) and (isinstance(x, B) or x.foo == y)
-        )
-
-    @hypothesis.given(a_or_b)
-    def test_uniontype_if(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> Union[A, B]:
-    if isinstance(x, A):
-        k = B(x.foo, 1)
-    else:
-        k = A(x.bar)
-    return k
-"""
-        res = uplc.plutus_cbor_dumps(eval_uplc(source_code, x))
-        self.assertEqual(res, (B(x.foo, 1) if isinstance(x, A) else A(x.bar)).to_cbor())
-
-    @unittest.expectedFailure
-    def test_if_no_retype_no_plutusdata(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]):
-    if isinstance(x, A):
-        k = B(x.foo, 1)
-    else:
-        k = "hello"
-    return k
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_while_no_retype_no_plutusdata(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]):
-    while isinstance(x, A):
-        k = B(x.foo, 1)
-    else:
-        k = "hello"
-    return k
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    @hypothesis.given(a_or_b)
-    def test_retype_while(self, x):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    while isinstance(x, A):
-        x = B(x.foo, 1)
-    return x.foobar
-"""
-        res = eval_uplc_value(source_code, x)
-        self.assertEqual(res, x.foo if isinstance(x, A) else x.foobar)
-
-    @unittest.expectedFailure
-    def test_retype_if_branch_correct(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    if False:
-        x = B(0, 1)
-    return x.foobar
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_retype_while_branch_correct(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: Union[A, B]) -> int:
-    while False:
-        x = B(0, 1)
-    return x.foobar
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_retype_while_wrong_after_iter(self):
-        source_code = """
-def validator(x: int) -> bytes:
-    while True:
-        x += 1
-        x = b''
-    return x
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_retype(self):
-        source_code = """
-def validator(x: int) -> str:
-    x = "hello"
-    return x
-"""
-        res = eval_uplc_value(source_code, 1)
-        self.assertEqual(res, b"hello")
-
-    @unittest.expectedFailure
-    def test_retype_if_primitives(self):
-        source_code = """
-def validator(x: int) -> str:
-    if True:
-        x = "hello"
-    else:
-        x = "hi"
-    return x
-"""
-        res = eval_uplc_value(source_code, 1)
-        self.assertEqual(res, b"hello")
-
-    @unittest.expectedFailure
-    def test_in_list(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(
-    d: Nothing,
-    r: Nothing,
-    context: ScriptContext,
-):
-    assert context.purpose in context.tx_info.signatories
-"""
-        builder._compile(source_code)
-
-    @hypothesis.given(
-        st.lists(
-            st.tuples(
-                st.integers(), st.sampled_from(["<", "<=", "==", ">=", ">", "!="])
-            ),
-            max_size=10,
-            min_size=2,
-        )
-    )
-    @hypothesis.example(
-        [
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-            (0, "<"),
-        ],
-    )
-    def test_comparison_chaining(self, xs):
-        param_string = ",".join(f"i{k}: int" for k, _ in enumerate(xs))
-        comp_string = "i0"
-        eval_string = f"{xs[0][0]}"
-        for k, (x, c) in enumerate(xs[1:], start=1):
-            comp_string += f" {c} i{k}"
-            eval_string += f" {c} {x}"
-        source_code = f"""
-def validator({param_string}) -> bool:
-    return {comp_string}
-"""
-        res = eval_uplc_value(source_code, *[x[0] for x in xs])
-        self.assertEqual(bool(res), eval(eval_string))
-
-    def test_double_import_offset(self):
-        source_code = """
-from opshin.ledger.api_v2 import *
-from opshin.prelude import *
-
-def validator(
-    d: Nothing,
-    r: Nothing,
-    context: ScriptContext,
-):
-    house_address = Address(
-        payment_credential=PubKeyCredential(
-            credential_hash=b""
-        ),
-        staking_credential=SomeStakingCredential(
-            staking_credential=StakingHash(
-                value=PubKeyCredential(
-                    credential_hash=b""
-                )
-            )
-        ),
-    )
-"""
-        # would fail because Address is assigned multiple times and then not constant folded
-        # TODO find a better way
-        builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    def test_double_import_direct(self):
-        source_code = """
-from opshin.prelude import *
-from opshin.prelude import *
-
-def validator(
-    d: Nothing,
-    r: Nothing,
-    context: ScriptContext,
-):
-    house_address = Address(
-        payment_credential=PubKeyCredential(
-            credential_hash=b""
-        ),
-        staking_credential=SomeStakingCredential(
-            staking_credential=StakingHash(
-                value=PubKeyCredential(
-                    credential_hash=b""
-                )
-            )
-        ),
-    )
-"""
-        # would fail because Address is assigned multiple times and then not constant folded
-        # TODO find a better way
-        builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    def test_double_import_deep(self):
-        source_code = """
-from opshin.ledger.interval import *
-from opshin.prelude import *
-
-def validator(
-    d: Nothing,
-    r: Nothing,
-    context: ScriptContext,
-):
-    house_address = Address(
-        payment_credential=PubKeyCredential(
-            credential_hash=b""
-        ),
-        staking_credential=SomeStakingCredential(
-            staking_credential=StakingHash(
-                value=PubKeyCredential(
-                    credential_hash=b""
-                )
-            )
-        ),
-    )
-"""
-        # would fail because Address is assigned multiple times and then not constant folded
-        # TODO find a better way
-        builder._compile(source_code, config=DEFAULT_CONFIG_CONSTANT_FOLDING)
-
-    def test_bytearray_alternative(self):
-        source_code = """
-def validator(
-    d: bytearray,
-) -> bytes:
-    return d
-"""
-        eval_uplc(source_code, bytearray(b"hello"))
-
-    # TODO enable when pycardano version is fixed s.t. import of ByteString works
-    @unittest.expectedFailure
-    def test_ByteString_alternative(self):
-        source_code = """
-def validator(
-    d: ByteString,
-) -> bytes:
-    return d
-"""
-        eval_uplc(source_code, bytearray(b"hello"))
-
-    @hypothesis.given(
-        st.lists(
-            st.tuples(st.booleans(), st.sampled_from(["and", "or"])),
-            max_size=10,
-            min_size=2,
-        )
-    )
-    def test_boolop_chaining(self, xs):
-        param_string = ",".join(f"i{k}: bool" for k, _ in enumerate(xs))
-        comp_string = "i0"
-        eval_string = f"{xs[0][0]}"
-        for k, (x, c) in enumerate(xs[1:], start=1):
-            comp_string += f" {c} i{k}"
-            eval_string += f" {c} {x}"
-        source_code = f"""
-def validator({param_string}) -> bool:
-    return {comp_string}
-"""
-        res = eval_uplc_value(source_code, *[x[0] for x in xs])
-        self.assertEqual(bool(res), eval(eval_string))
-
-    def test_wrapping_contract_apply(self):
-        # TODO devise tests for this
-        input_file = "examples/smart_contracts/wrapped_token.py"
-        contract = builder.build(input_file, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-        artifacts = PlutusContract(
-            contract,
-            datum_type=("datum", prelude.Nothing),
-            redeemer_type=("redeemer", prelude.Nothing),
-            parameter_types=[
-                ("token_policy_id", bytes),
-                ("token_name", bytes),
-                ("wrapping_factor", int),
-            ],
-            purpose=[Purpose.spending, Purpose.minting],
-        )
-        applied = artifacts.apply_parameter(b"", b"")
-        assert len(applied.parameter_types) == 1
-        assert applied.parameter_types[0][0] == "wrapping_factor"
-        assert applied.datum_type == ("datum", prelude.Nothing)
-
-    def test_wrapping_contract_dump_load(self):
-        input_file = "examples/smart_contracts/wrapped_token.py"
-        contract = builder.build(input_file, config=DEFAULT_CONFIG_FORCE_THREE_PARAMS)
-        artifacts = PlutusContract(
-            contract,
-            datum_type=("datum", prelude.Nothing),
-            redeemer_type=("redeemer", prelude.ScriptContext),
-            parameter_types=[
-                ("token_policy_id", bytes),
-                ("token_name", bytes),
-                ("wrapping_factor", int),
-            ],
-            purpose=[Purpose.spending, Purpose.minting],
-            description="Wrapped token contract",
-            license="MIT",
-        )
-        target_dir = tempfile.TemporaryDirectory()
-        artifacts.dump(target_dir.name)
-        loaded = builder.load(target_dir.name)
-        assert len(loaded.parameter_types) == len(artifacts.parameter_types)
-        assert loaded.datum_type[1].__name__ == artifacts.datum_type[1].__name__
-        assert loaded.datum_type[0] == artifacts.datum_type[0]
-        assert loaded.datum_type[1].CONSTR_ID == artifacts.datum_type[1].CONSTR_ID
-        assert loaded.redeemer_type[1].__name__ == artifacts.redeemer_type[1].__name__
-        assert loaded.redeemer_type[0] == artifacts.redeemer_type[0]
-        assert loaded.redeemer_type[1].CONSTR_ID == artifacts.redeemer_type[1].CONSTR_ID
-        assert loaded.purpose == artifacts.purpose
-        assert loaded.description == artifacts.description
-        assert loaded.license == artifacts.license
-        assert loaded.title == artifacts.title
-        assert loaded.version == artifacts.version
-
-    def test_bridge(self):
-        @wraps_builtin
-        def add_integer(x: int, y: int) -> int:
-            return x + y
-
-        assert add_integer(1, 2) == 3
-
-        @wraps_builtin
-        def append_byte_string(x: bytes, y: bytes) -> bytes:
-            return x + y
-
-        assert append_byte_string(b"hello", b"world") == b"helloworld"
-
-    @unittest.expectedFailure
-    def test_forbidden_overwrite(self):
-        source_code = """
-def validator(
-    d: int
-):
-    PlutusData = d
-    return d
-"""
-        builder._compile(source_code)
-
-    @parameterized.expand(ALL_EXAMPLES)
-    def test_compilation_deterministic_local(self, input_file):
-        with open(input_file) as fp:
-            source_code = fp.read()
-        code = builder._compile(source_code)
-        for i in range(10):
-            code_2 = builder._compile(source_code)
-            self.assertEqual(code.dumps(), code_2.dumps())
-
-    @parameterized.expand(ALL_EXAMPLES)
-    def test_compilation_deterministic_external(self, input_file):
-        code = subprocess.run(
-            [
-                sys.executable,
-                "-m",
-                "opshin",
-                "compile",
-                "any",
-                input_file,
-            ],
-            capture_output=True,
-        )
-        for i in range(10):
-            code_2 = subprocess.run(
-                [
-                    sys.executable,
-                    "-m",
-                    "opshin",
-                    "compile",
-                    "any",
-                    input_file,
-                ],
-                capture_output=True,
-            )
-            self.assertEqual(code.stdout, code_2.stdout)
-
-    @unittest.expectedFailure
-    def test_return_illegal(self):
-        # this is now an illegal retyping because read variables dont match
-        source_code = """
-return 1
-def validator(_: None) -> int:
-    return 0
-        """
-        builder._compile(source_code)
-
-    def test_return_in_loop(self):
-        source_code = """
-def validator(_: None) -> int:
-    i = 0
-    while i < 10:
-        i += 1
-        if i == 5:
-          return i
-    return 0
-        """
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 5, "Invalid return break")
-
-    def test_return_in_for(self):
-        source_code = """
-def validator(_: None) -> int:
-    i = 0
-    for i in range(10):
-        i += 1
-        if i == 5:
-          return i
-    return 0
-        """
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 5, "Invalid return break")
-
-    def test_return_in_if(self):
-        source_code = """
-def validator(_: None) -> int:
-    i = 0
-    if i == 1:
-        return 0
-    else:
-        return 1
-        """
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, 1, "Invalid return")
-
-    @unittest.expectedFailure
-    def test_return_in_if_same_type(self):
-        source_code = """
-def validator(_: None) -> str:
-    i = 0
-    if i == 1:
-        return "a"
-    else:
-        return 1
-        """
-        builder._compile(source_code)
-
-    def test_isinstance_cast_if2(self):
-        source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(_: None) -> Union[A, B]:
-    x = 0
-    if x == 1:
-        return A(1)
-    else:
-        return B(2, 1)
-"""
-        res = eval_uplc(source_code, Unit())
-        self.assertEqual(
-            res,
-            uplc.PlutusConstr(1, [uplc.PlutusInteger(2), uplc.PlutusInteger(1)]),
-            "Invalid return",
-        )
-
-    @unittest.expectedFailure
-    def test_return_in_if_missing_return(self):
-        source_code = """
-def validator(_: None) -> str:
-    i = 0
-    if i == 1:
-        return "a"
-    else:
-        pass
-        """
-        builder._compile(source_code)
-
-    def test_different_return_types_anything(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(a: int) -> Anything:
-    if a > 0:
-        return b""
-    else:
-        return 0
-"""
-        res = eval_uplc(source_code, 1)
-        self.assertEqual(res, uplc.PlutusByteString(b""))
-        res = eval_uplc(source_code, -1)
-        self.assertEqual(res, uplc.PlutusInteger(0))
-
-    @unittest.expectedFailure
-    def test_different_return_types_while_loop(self):
-        source_code = """
-def validator(a: int) -> str:
-    while a > 0:
-        return b""
-    return 0
-"""
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_different_return_types_for_loop(self):
-        source_code = """
-def validator(a: int) -> str:
-    for i in range(a):
-        return b""
-    return 0
-"""
-        builder._compile(source_code)
-
-    def test_return_else_loop_while(self):
-        source_code = """
-def validator(a: int) -> int:
-    while a > 0:
-        a -= 1
-    else:
-        return 0
-"""
-        res = eval_uplc_value(source_code, 1)
-        self.assertEqual(res, 0, "Invalid return")
-
-    def test_return_else_loop_for(self):
-        source_code = """
-def validator(a: int) -> int:
-    for _ in range(a):
-        a -= 1
-    else:
-        return 0
-"""
-        res = eval_uplc_value(source_code, 1)
-        self.assertEqual(res, 0, "Invalid return")
-
-    def test_empty_list_int(self):
-        source_code = """
-def validator(_: None) -> List[int]:
-    a: List[int] = []
-    return a + [1]
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, [uplc.PlutusInteger(1)])
-
-    def test_empty_list_data(self):
-        source_code = """
-from opshin.prelude import *
-
-def validator(_: None) -> List[Token]:
-    a: List[Token] = []
-    return a + [Token(b"", b"")]
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(
-            res,
-            [
-                uplc.PlutusConstr(
-                    0, [uplc.PlutusByteString(b""), uplc.PlutusByteString(b"")]
-                )
-            ],
-        )
-
-    def test_empty_list_int_constant_folding(self):
-        source_code = """
-def validator(_: None) -> List[int]:
-    a: List[int] = []
-    return a
-"""
-        res = eval_uplc_value(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertEqual(res, [])
-
-    def test_empty_dict_int_int(self):
-        source_code = """
-def validator(_: None) -> Dict[int, int]:
-    a: Dict[int, int] = {}
-    return a
-"""
-        res = eval_uplc_value(source_code, Unit())
-        self.assertEqual(res, {})
-
-    def test_empty_dict_int_int_constant_folding(self):
-        source_code = """
-def validator(_: None) -> Dict[int, int]:
-    a: Dict[int, int] = {}
-    return a
-"""
-        res = eval_uplc_value(
-            source_code, Unit(), config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertEqual(res, {})
-
-    def test_empty_dict_displaced_constant_folding(self):
-        source_code = """
-from typing import Dict, List, Union
-
-VAR: Dict[bytes, int] = {}
-
-def validator(b: Dict[int, Dict[bytes, int]]) -> Dict[bytes, int]:
-    a = b.get(0, VAR)
-    return a
-        """
-        res = eval_uplc_value(
-            source_code, {1: {b"": 0}}, config=DEFAULT_CONFIG_CONSTANT_FOLDING
-        )
-        self.assertEqual(res, {})
-
-    def test_union_subset_call(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    bar: int
-
-@dataclass()
-class C(PlutusData):
-    CONSTR_ID = 2
-    foobar: int
-
-def fun(x: Union[A, B, C]) -> int:
-    return 0
-
-
-def validator(x: Union[A, B]) -> int:
-    return fun(x)
-        """
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_union_superset_call(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    bar: int
-
-@dataclass()
-class C(PlutusData):
-    CONSTR_ID = 2
-    foobar: int
-
-def fun(x: Union[A, B]) -> int:
-    return 0
-
-
-def validator(x: Union[A, B, C]) -> int:
-    return fun(x)
-        """
-        builder._compile(source_code)
-
-    @unittest.expectedFailure
-    def test_merge_function_same_capture_different_type(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    bar: int
-
-def validator(x: bool) -> int:
-    if x:
-        y = A(0)
-        def foo() -> int:
-            return y.foo
-    else:
-        y = B(0)
-        def foo() -> int:
-            return y.bar
-    y = A(0)
-    return foo()
-        """
-        builder._compile(source_code)
-
-    def test_merge_function_same_capture_same_type(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 0
-    foo: int
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    bar: int
-
-def validator(x: bool) -> int:
-    if x:
-        y = A(0)
-        def foo() -> int:
-            print(2)
-            return y.foo
-    else:
-        y = A(0) if x else B(0)
-        def foo() -> int:
-            print(y)
-            return 2
-    y = A(0)
-    return foo()
-        """
-        res_true = eval_uplc_value(source_code, 1)
-        res_false = eval_uplc_value(source_code, 0)
-        self.assertEqual(res_true, 0)
-        self.assertEqual(res_false, 2)
-
-    def test_merge_print(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-def validator(x: bool) -> None:
-    if x:
-        a = print
-    else:
-        b = print
-        a = b
-    return a(x)
-        """
-        res_true = eval_uplc(source_code, 1)
-        res_false = eval_uplc(source_code, 0)
-
-    def test_print_reassign(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-def validator(x: bool) -> None:
-    a = print
-    return a(x)
-        """
-        res_true = eval_uplc(source_code, 1)
-        res_false = eval_uplc(source_code, 0)
-
-    def test_str_constr_reassign(self):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from dataclasses import dataclass
-
-def validator(x: bool) -> str:
-    a = str
-    return a(x)
-        """
-        res_true = eval_uplc_value(source_code, 1)
-        res_false = eval_uplc_value(source_code, 0)
-
-    @unittest.expectedFailure
-    def test_class_attribute_access(self):
-        source_code = """
-from dataclasses import dataclass
-from pycardano import Datum as Anything, PlutusData
-from typing import Dict, List, Union
-
-@dataclass
-class A(PlutusData):
-    CONSTR_ID = 0
-    a: int
-    b: bytes
-    d: List[int]
-
-def validator(_: None) -> int:
-    return A.CONSTR_ID
-    """
-        builder._compile(source_code)
-
-    def test_constr_id_access(self):
-        source_code = """
-from dataclasses import dataclass
-from pycardano import Datum as Anything, PlutusData
-from typing import Dict, List, Union
-
-@dataclass
-class A(PlutusData):
-    CONSTR_ID = 15
-    a: int
-    b: bytes
-    d: List[int]
-
-def validator(_: None) -> int:
-    return A(0, b"", [1,2]).CONSTR_ID
-    """
-        res = eval_uplc_value(source_code, Unit())
-
-        self.assertEqual(15, res, "Invalid constr id")
-
-    def test_id_map_equals_pycardano(self):
-        @dataclass
-        class A(PlutusData):
-            CONSTR_ID = 0
-            a: int
-            b: bytes
-            d: List[int]
-
-        @dataclass
-        class C(PlutusData):
-            z: Anything
-
-        @dataclass
-        class B(PlutusData):
-            a: int
-            c: A
-            d: Dict[bytes, C]
-            e: Union[A, C]
-
-        source_code = """
-from dataclasses import dataclass
-from pycardano import Datum as Anything, PlutusData
-from typing import Dict, List, Union
-
-@dataclass
-class Nothing(PlutusData):
-    CONSTR_ID = 0
-    
-
-@dataclass
-class A(PlutusData):
-    CONSTR_ID = 0
-    a: int
-    b: bytes
-    d: List[int]
-
-@dataclass
-class C(PlutusData):
-    z: Anything
-
-@dataclass
-class B(PlutusData):
-    a: int
-    c: A
-    d: Dict[bytes, C]
-    e: Union[A, C]
-
-def validator(_: None) -> int:
-    return B(1, A(1, b"", [1, 2]), {b"": C(Nothing())}, C(Nothing())).CONSTR_ID
-    """
-        res = eval_uplc_value(source_code, Unit())
-
-        self.assertEqual(
-            B.CONSTR_ID, res, "Invalid constr id generation (does not match pycardano)"
-        )
-
-    def test_empty_return(self):
-        source_code = """
-def validator(_: None) -> None:
-    return
-"""
-        res = eval_uplc(source_code, Unit())
-        self.assertEqual(res, uplc.PlutusConstr(0, []), "Invalid return")
-
-

Ancestors

-
    -
  • unittest.case.TestCase
  • -
-

Class variables

-
-
var test_compilation_deterministic_external
-
-
-
-
var test_compilation_deterministic_local
-
-
-
-
var test_script_context_str_format
-
-
-
-
-

Methods

-
-
-def test_ByteString_alternative(self) -
-
-
-
-
-def test_access_enclosing_variable_before_def(self) -
-
-
-
-
-def test_access_local_variable_before_assignment(self) -
-
-
-
-
-def test_assert_sum_contract_fail(self) -
-
-
-
-
-def test_assert_sum_contract_succeed(self) -
-
-
-
-
-def test_boolop_chaining(self) ‑> None -
-
-
-
-
-def test_bridge(self) -
-
-
-
-
-def test_bytearray_alternative(self) -
-
-
-
-
-def test_cast_bool_boolops(self) ‑> None -
-
-
-
-
-def test_cast_bool_ite(self) ‑> None -
-
-
-
-
-def test_cast_bool_ite_expr(self) ‑> None -
-
-
-
-
-def test_cast_bool_while(self) ‑> None -
-
-
-
-
-def test_class_attribute_access(self) -
-
-
-
-
-def test_comparison_chaining(self) ‑> None -
-
-
-
-
-def test_compilation_deterministic_external_00_examples_list_comprehensions_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_01_examples_fib_rec_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_02_examples_hello_world_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_03_examples_dict_comprehensions_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_04_examples_mult_for_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_05_examples_inspect_script_context_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_06_examples_showcase_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_07_examples_dict_datum_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_08_examples_datum_cast_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_09_examples_complex_datum_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_10_examples_sum_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_11_examples_mult_while_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_12_examples_fib_iter_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_13_examples_list_datum_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_14_examples_smart_contracts_micropayments_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_15_examples_smart_contracts_assert_sum_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_16_examples_smart_contracts_wrapped_token_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_17_examples_smart_contracts_simple_script_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_18_examples_smart_contracts_marketplace_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_19_examples_smart_contracts_gift_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_20_examples_smart_contracts_parameterized_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_21_examples_smart_contracts_always_true_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_external_22_examples_smart_contracts_dual_use_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_00_examples_list_comprehensions_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_01_examples_fib_rec_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_02_examples_hello_world_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_03_examples_dict_comprehensions_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_04_examples_mult_for_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_05_examples_inspect_script_context_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_06_examples_showcase_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_07_examples_dict_datum_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_08_examples_datum_cast_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_09_examples_complex_datum_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_10_examples_sum_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_11_examples_mult_while_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_12_examples_fib_iter_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_13_examples_list_datum_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_14_examples_smart_contracts_micropayments_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_15_examples_smart_contracts_assert_sum_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_16_examples_smart_contracts_wrapped_token_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_17_examples_smart_contracts_simple_script_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_18_examples_smart_contracts_marketplace_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_19_examples_smart_contracts_gift_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_20_examples_smart_contracts_parameterized_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_21_examples_smart_contracts_always_true_py(*a, **kw) -
-
-
-
-
-def test_compilation_deterministic_local_22_examples_smart_contracts_dual_use_py(*a, **kw) -
-
-
-
-
-def test_complex_datum_correct_vals(self) -
-
-
-
-
-def test_complex_isinstance_cast_if(self) ‑> None -
-
-
-
-
-def test_constant_folding(self) -
-
-
-
-
-def test_constant_folding_complex(self) -
-
-
-
-
-def test_constant_folding_dict(self) -
-
-
-
-
-def test_constant_folding_disabled(self) -
-
-
-
-
-def test_constant_folding_for(self) -
-
-
-
-
-def test_constant_folding_for_target(self) -
-
-
-
-
-def test_constant_folding_guaranteed_branch(self) -
-
-
-
-
-def test_constant_folding_ifelse(self) -
-
-
-
-
-def test_constant_folding_ignore_reassignment(self) -
-
-
-
-
-def test_constant_folding_list(self) -
-
-
-
-
-def test_constant_folding_math(self) -
-
-
-
-
-def test_constant_folding_no_print_eval(self) -
-
-
-
-
-def test_constant_folding_no_scoping(self) -
-
-
-
-
-def test_constant_folding_plutusdata(self) -
-
-
-
-
-def test_constant_folding_repeated_assign(self) -
-
-
-
-
-def test_constant_folding_scoping(self) -
-
-
-
-
-def test_constant_folding_user_def(self) -
-
-
-
-
-def test_constant_folding_while(self) -
-
-
-
-
-def test_constr_id_access(self) -
-
-
-
-
-def test_datum_cast(self) -
-
-
-
-
-def test_dict_comprehension_all(self) -
-
-
-
-
-def test_dict_comprehension_even(self) -
-
-
-
-
-def test_dict_datum(self) -
-
-
-
-
-def test_dict_datum_wrong(self) -
-
-
-
-
-def test_dict_expr_not_const(self) -
-
-
-
-
-def test_dict_items_values_deconstr(self) ‑> None -
-
-
-
-
-def test_different_return_types_anything(self) -
-
-
-
-
-def test_different_return_types_for_loop(self) -
-
-
-
-
-def test_different_return_types_while_loop(self) -
-
-
-
-
-def test_double_import_deep(self) -
-
-
-
-
-def test_double_import_direct(self) -
-
-
-
-
-def test_double_import_offset(self) -
-
-
-
-
-def test_dual_use_compile(self) -
-
-
-
-
-def test_empty_dict_displaced_constant_folding(self) -
-
-
-
-
-def test_empty_dict_int_int(self) -
-
-
-
-
-def test_empty_dict_int_int_constant_folding(self) -
-
-
-
-
-def test_empty_list_data(self) -
-
-
-
-
-def test_empty_list_int(self) -
-
-
-
-
-def test_empty_list_int_constant_folding(self) -
-
-
-
-
-def test_empty_return(self) -
-
-
-
-
-def test_failing_annotated_type(self) -
-
-
-
-
-def test_fib_iter(self) ‑> None -
-
-
-
-
-def test_fib_rec(self) ‑> None -
-
-
-
-
-def test_forbidden_overwrite(self) -
-
-
-
-
-def test_gift_contract_fail(self) -
-
-
-
-
-def test_gift_contract_succeed(self) -
-
-
-
-
-def test_hello_world(self) -
-
-
-
-
-def test_id_map_equals_pycardano(self) -
-
-
-
-
-def test_if_no_retype_no_plutusdata(self) -
-
-
-
-
-def test_illegal_bind(self) -
-
-
-
-
-def test_illegal_function_retype(self) -
-
-
-
-
-def test_in_list(self) -
-
-
-
-
-def test_inner_outer_state_functions(self) -
-
-
-
-
-def test_inner_outer_state_functions_nonglobal(self) -
-
-
-
-
-def test_isinstance_cast_assert(self) ‑> None -
-
-
-
-
-def test_isinstance_cast_assert_if(self) -
-
-
-
-
-def test_isinstance_cast_complex_and(self) -
-
-
-
-
-def test_isinstance_cast_complex_and_else(self) -
-
-
-
-
-def test_isinstance_cast_complex_ifelse(self) ‑> None -
-
-
-
-
-def test_isinstance_cast_complex_not(self) ‑> None -
-
-
-
-
-def test_isinstance_cast_complex_or(self) ‑> None -
-
-
-
-
-def test_isinstance_cast_complex_or_else(self) -
-
-
-
-
-def test_isinstance_cast_complex_or_sameconstr(self) -
-
-
-
-
-def test_isinstance_cast_if(self) ‑> None -
-
-
-
-
-def test_isinstance_cast_if2(self) -
-
-
-
-
-def test_isinstance_cast_ifexpr(self) ‑> None -
-
-
-
-
-def test_isinstance_cast_random(self) ‑> None -
-
-
-
-
-def test_isinstance_cast_shortcut_and(self) ‑> None -
-
-
-
-
-def test_isinstance_cast_shortcut_or(self) ‑> None -
-
-
-
-
-def test_isinstance_cast_while(self) ‑> None -
-
-
-
-
-def test_list_comprehension_all(self) -
-
-
-
-
-def test_list_comprehension_even(self) -
-
-
-
-
-def test_list_datum_correct_vals(self) -
-
-
-
-
-def test_list_expr(self) -
-
-
-
-
-def test_list_expr_not_const(self) -
-
-
-
-
-def test_marketplace_compile(self) -
-
-
-
-
-def test_marketplace_compile_fail(self) -
-
-
-
-
-def test_merge_function_same_capture_different_type(self) -
-
-
-
-
-def test_merge_function_same_capture_same_type(self) -
-
-
-
-
-def test_merge_print(self) -
-
-
-
-
-def test_mult_for(self) ‑> None -
-
-
-
-
-def test_mult_for_return(self) ‑> None -
-
-
-
-
-def test_mult_while_return(self) ‑> None -
-
-
-
-
-def test_nested_deconstruction(self) -
-
-
-
-
-def test_no_parameter_annotation(self) -
-
-
-
-
-def test_no_return_annotation(self) -
-
-
-
-
-def test_no_return_annotation_no_return(self) -
-
-
-
-
-def test_opt_shared_var(self) -
-
-
-
-
-def test_opt_unsafe_cast(self) -
-
-
-
-
-def test_outer_state_change_functions(self) -
-
-
-
-
-def test_overopt_removedeadvar(self) -
-
-
-
-
-def test_parameterized_compile(self) -
-
-
-
-
-def test_print_empty(self) -
-
-
-
-
-def test_print_reassign(self) -
-
-
-
-
-def test_reassign_builtin(self) -
-
-
-
-
-def test_reassign_builtin_invalid_type(self) -
-
-
-
-
-def test_recursion_illegal(self) -
-
-
-
- -
-
-
-
-def test_recursion_simple(self) -
-
-
-
-
-def test_redefine_constr(self) ‑> None -
-
-
-
-
-def test_redefine_poly_constr(self) -
-
-
-
-
-def test_removedeadvar_noissue(self) -
-
-
-
-
-def test_removedeadvar_noissue2(self) -
-
-
-
-
-def test_removedeadvar_noissue3(self) -
-
-
-
-
-def test_return_anything(self) -
-
-
-
-
-def test_return_else_loop_for(self) -
-
-
-
-
-def test_return_else_loop_while(self) -
-
-
-
-
-def test_return_illegal(self) -
-
-
-
-
-def test_return_in_for(self) -
-
-
-
-
-def test_return_in_if(self) -
-
-
-
-
-def test_return_in_if_missing_return(self) -
-
-
-
-
-def test_return_in_if_same_type(self) -
-
-
-
-
-def test_return_in_loop(self) -
-
-
-
-
-def test_retype(self) -
-
-
-
-
-def test_retype_if_branch_correct(self) -
-
-
-
-
-def test_retype_if_primitives(self) -
-
-
-
-
-def test_retype_while(self) ‑> None -
-
-
-
-
-def test_retype_while_branch_correct(self) -
-
-
-
-
-def test_retype_while_wrong_after_iter(self) -
-
-
-
-
-def test_script_context_str_format_0_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87980d87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820746957f0eb57f2b11119684e611a98f373afea93473fefbb7632d579af2f6259ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff(*a, **kw) -
-
-
-
-
-def test_script_context_str_format_1_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff80a1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820797a1e1720b63621c6b185088184cb8e23af6e46b55bd83e7a91024c823a6c2affffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff(*a, **kw) -
-
-
-
-
-def test_script_context_str_format_2_d8799fd8799f9fd8799fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffd8799fd8799fd87a9f581cdbe769758f26efb21f008dc097bb194cffc622acc37fcefc5372eee3ffd87a80ffa140a1401a00989680d87a9f5820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dffd87a80ffffff809fd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a14000d87980d87a80ffd8799fd8799fd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd87a80ffa140a1401a000f4240d87980d87a80ffffa140a14000a140a1400080a0d8799fd8799fd87a9f1b000001836ac117d8ffd87a80ffd8799fd87b80d87a80ffff9f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffa1d87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffd87980a15820dfab81872ce2bbe6ee5af9bbfee4047f91c1f57db5e30da727d5fef1e7f02f4dd8799f581cdc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2ffd8799f5820c17c32f6433ae22c2acaebfb796bbfaee3993ff7ebb58a2bac6b4a3bdd2f6d28ffffd87a9fd8799fd8799f582055d353acacaab6460b37ed0f0e3a1a0aabf056df4a7fa1e265d21149ccacc527ff01ffffff(*a, **kw) -
-
-
-
-
-def test_showcase(self) -
-
-
-
-
-def test_str_constr_reassign(self) -
-
-
-
-
-def test_sum(self) ‑> None -
-
-
-
-
-def test_trace_order(self) -
-
-
-
-
-def test_type_reassignment_function_bound(self) -
-
-
-
-
-def test_typecast_anything_int(self) -
-
-
-
-
-def test_typecast_anything_int_anything(self) -
-
-
-
-
-def test_typecast_int_anything(self) -
-
-
-
-
-def test_typecast_int_anything_int(self) -
-
-
-
-
-def test_typecast_int_int(self) -
-
-
-
-
-def test_typecast_int_str(self) -
-
-
-
-
-def test_uninitialized_access(self) -
-
-
-
-
-def test_union_subset_call(self) -
-
-
-
-
-def test_union_superset_call(self) -
-
-
-
-
-def test_union_type_all_records_same_constr(self) -
-
-
-
-
-def test_union_type_attr_access_all_records(self) ‑> None -
-
-
-
-
-def test_union_type_attr_access_all_records_diff_pos(self) ‑> None -
-
-
-
-
-def test_union_type_attr_access_all_records_same_constr(self) -
-
-
-
-
-def test_union_type_attr_access_maximum_type(self) -
-
-
-
-
-def test_union_type_attr_anytype(self) -
-
-
-
-
-def test_uniontype_if(self) ‑> None -
-
-
-
-
-def test_uplc_builtin(self) ‑> None -
-
-
-
-
-def test_warn_bytestring(self) -
-
-
-
-
-def test_while_no_retype_no_plutusdata(self) -
-
-
-
-
-def test_wrap_into_generic_data(self) -
-
-
-
-
-def test_wrapping_contract_apply(self) -
-
-
-
-
-def test_wrapping_contract_compile(self) -
-
-
-
-
-def test_wrapping_contract_dump_load(self) -
-
-
-
-
-def test_zero_ary(self) -
-
-
-
-
-def test_zero_ary_exec(self) -
-
-
-
-
-def test_zero_ary_method(self) -
-
-
-
-
-def test_zero_ary_method_exec(self) -
-
-
-
-
-def test_zero_ary_method_exec_suc(self) -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_ops.html b/docs/opshin/tests/test_ops.html deleted file mode 100644 index 3e099a54..00000000 --- a/docs/opshin/tests/test_ops.html +++ /dev/null @@ -1,2623 +0,0 @@ - - - - - - - - -opshin.tests.test_ops API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_ops

-
-
-
- -Expand source code - -
import unittest
-
-import cbor2
-import hypothesis
-import pycardano
-from frozendict import frozendict
-import frozenlist as fl
-from hypothesis import example, given
-from hypothesis import strategies as st
-
-from uplc import ast as uplc, eval as uplc_eval
-from uplc.ast import (
-    PlutusMap,
-    PlutusConstr,
-    PlutusList,
-    PlutusInteger,
-    PlutusByteString,
-)
-
-from . import PLUTUS_VM_PROFILE
-from .utils import eval_uplc, eval_uplc_value, Unit
-from .. import compiler
-
-hypothesis.settings.load_profile(PLUTUS_VM_PROFILE)
-
-from opshin.ledger.api_v2 import (
-    FinitePOSIXTime,
-    PosInfPOSIXTime,
-    UpperBoundPOSIXTime,
-    FalseData,
-    TrueData,
-)
-
-
-def frozenlist(l):
-    l = fl.FrozenList(l)
-    l.freeze()
-    return l
-
-
-pos_int = st.integers(min_value=0, max_value=2**64 - 1)
-
-
-uplc_data_integer = st.builds(PlutusInteger, st.integers())
-uplc_data_bytestring = st.builds(PlutusByteString, st.binary())
-
-
-def rec_data_strategies(uplc_data):
-    uplc_data_list = st.builds(lambda x: PlutusList(frozenlist(x)), st.lists(uplc_data))
-    uplc_data_constr = st.builds(
-        lambda x, y: PlutusConstr(x, frozenlist(y)),
-        pos_int,
-        st.lists(uplc_data),
-    )
-    uplc_data_map = st.builds(
-        PlutusMap,
-        st.dictionaries(
-            st.one_of(
-                uplc_data_integer, uplc_data_bytestring
-            ),  # TODO technically constr is legal too, but causes hashing error
-            uplc_data,
-            dict_class=frozendict,
-        ),
-    )
-    return st.one_of(uplc_data_map, uplc_data_list, uplc_data_constr)
-
-
-uplc_data = st.recursive(
-    st.one_of(uplc_data_bytestring, uplc_data_integer),
-    rec_data_strategies,
-    max_leaves=4,
-)
-uplc_data_list = st.builds(lambda x: PlutusList(frozenlist(x)), st.lists(uplc_data))
-
-# TODO fix handling of these strings
-formattable_text = st.from_regex(r"\A((?!['\\])[ -~])*\Z")
-
-
-class OpTest(unittest.TestCase):
-    @given(x=st.booleans(), y=st.booleans())
-    def test_and_bool(self, x, y):
-        source_code = """
-def validator(x: bool, y: bool) -> bool:
-    return x and y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(bool(ret), x and y, "and returned wrong value")
-
-    @given(x=st.booleans(), y=st.booleans())
-    def test_or_bool(self, x, y):
-        source_code = """
-def validator(x: bool, y: bool) -> bool:
-    return x or y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(bool(ret), x or y, "or returned wrong value")
-
-    @given(x=st.booleans())
-    def test_not_bool(self, x):
-        source_code = """
-def validator(x: bool) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    @given(x=st.integers())
-    def test_usub_int(self, x):
-        source_code = """
-def validator(x: int) -> int:
-    return -x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret, -x, "not returned wrong value")
-
-    @given(x=st.integers())
-    def test_uadd_int(self, x):
-        source_code = """
-def validator(x: int) -> int:
-    return +x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret, +x, "not returned wrong value")
-
-    @given(x=st.integers())
-    def test_not_int(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_add_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x + y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x + y, "+ returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_sub_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x - y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x - y, "- returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_mul_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x * y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x * y, "* returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_div_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x // y
-            """
-        try:
-            exp = x // y
-        except ZeroDivisionError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except Exception:
-            ret = None
-        self.assertEqual(ret, exp, "// returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_mod_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x % y
-            """
-        try:
-            exp = x % y
-        except ZeroDivisionError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except Exception:
-            ret = None
-        self.assertEqual(ret, exp, "% returned wrong value")
-
-    @given(x=st.integers(), y=st.integers(min_value=0, max_value=20))
-    def test_pow_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x ** y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x**y, "** returned wrong value")
-
-    @given(x=st.integers(), y=st.integers(min_value=-20, max_value=-1))
-    def test_neg_pow_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x ** y
-            """
-        try:
-            eval_uplc_value(source_code, x, y)
-            fail = True
-        except Exception:
-            fail = False
-        self.assertFalse(fail, "** worked with negative exponent")
-
-    @given(x=st.binary(), y=st.binary())
-    def test_add_bytes(self, x, y):
-        source_code = """
-def validator(x: bytes, y: bytes) -> bytes:
-    return x + y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x + y, "+ returned wrong value")
-
-    @given(x=st.text(), y=st.text())
-    def test_add_str(self, x, y):
-        source_code = """
-def validator(x: str, y: str) -> str:
-    return x + y
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"), y.encode("utf8")).decode(
-            "utf8"
-        )
-        self.assertEqual(ret, x + y, "+ returned wrong value")
-
-    @given(x=st.binary(), y=st.integers(), z=st.integers())
-    @example(b"\x00", -2, 0)
-    @example(b"1234", 1, 2)
-    @example(b"1234", 2, 4)
-    @example(b"1234", 2, 2)
-    @example(b"1234", 3, 3)
-    @example(b"1234", 3, 1)
-    def test_slice_bytes(self, x, y, z):
-        source_code = """
-def validator(x: bytes, y: int, z: int) -> bytes:
-    return x[y:z]
-            """
-        try:
-            exp = x[y:z]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y, z)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "byte slice returned wrong value")
-
-    @given(x=st.binary(), y=st.integers())
-    @example(b"\x00", -2)
-    @example(b"1234", 1)
-    @example(b"1234", 2)
-    @example(b"1234", 2)
-    @example(b"1234", 3)
-    @example(b"1234", 3)
-    def test_slice_bytes_lower(self, x, y):
-        source_code = """
-def validator(x: bytes, y: int) -> bytes:
-    return x[y:]
-            """
-        try:
-            exp = x[y:]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "byte slice returned wrong value")
-
-    @given(x=st.binary(), y=st.integers())
-    @example(b"\x00", 0)
-    @example(b"1234", 2)
-    @example(b"1234", 4)
-    @example(b"1234", 2)
-    @example(b"1234", 3)
-    @example(b"1234", 1)
-    def test_slice_bytes_upper(self, x, y):
-        source_code = """
-def validator(x: bytes, y: int) -> bytes:
-    return x[:y]
-            """
-        try:
-            exp = x[:y]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "byte slice returned wrong value")
-
-    @given(x=st.binary())
-    @example(b"\x00")
-    @example(b"1234")
-    @example(b"1234")
-    @example(b"1234")
-    @example(b"1234")
-    @example(b"1234")
-    def test_slice_bytes_full(self, x):
-        source_code = """
-def validator(x: bytes) -> bytes:
-    return x[:]
-            """
-        try:
-            exp = x[:]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "byte slice returned wrong value")
-
-    @given(x=st.binary(), y=st.integers())
-    @example(b"1234", 0)
-    @example(b"1234", 1)
-    @example(b"1234", -1)
-    def test_index_bytes(self, x, y):
-        source_code = """
-def validator(x: bytes, y: int) -> int:
-    return x[y]
-            """
-        try:
-            exp = x[y]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "byte index returned wrong value")
-
-    @given(xs=st.lists(st.integers()), y=st.integers())
-    @example(xs=[0], y=-1)
-    @example(xs=[0], y=0)
-    def test_index_list(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: List[int], y: int) -> int:
-    return x[y]
-            """
-        try:
-            exp = xs[y]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs, y)
-        except Exception as e:
-            ret = None
-        self.assertEqual(ret, exp, "list index returned wrong value")
-
-    @given(x=st.lists(st.integers(), max_size=20), y=st.integers(), z=st.integers())
-    @example([0], -2, 0)
-    @example([1, 2, 3, 4], 1, 2)
-    @example([1, 2, 3, 4], 2, 4)
-    @example([1, 2, 3, 4], 2, 2)
-    @example([1, 2, 3, 4], 3, 3)
-    @example([1, 2, 3, 4], 3, 1)
-    def test_slice_list(self, x, y, z):
-        source_code = """
-def validator(x: List[int], y: int, z: int) -> List[int]:
-    return x[y:z]
-            """
-        try:
-            exp = x[y:z]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y, z)
-        except:
-            ret = None
-        self.assertEqual(
-            ret,
-            [PlutusInteger(x) for x in exp] if exp is not None else exp,
-            "list slice returned wrong value",
-        )
-
-    @given(x=st.lists(st.integers(), max_size=20), y=st.integers())
-    @example([0], -2)
-    @example([1, 2, 3, 4], 1)
-    @example([1, 2, 3, 4], 2)
-    @example([1, 2, 3, 4], 2)
-    @example([1, 2, 3, 4], 3)
-    @example([1, 2, 3, 4], 3)
-    def test_slice_list_lower(self, x, y):
-        source_code = """
-def validator(x: List[int], y: int) -> List[int]:
-    return x[y:]
-            """
-        try:
-            exp = x[y:]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(
-            ret,
-            [PlutusInteger(x) for x in exp] if exp is not None else exp,
-            "list slice returned wrong value",
-        )
-
-    @given(x=st.lists(st.integers(), max_size=20), y=st.integers())
-    @example([0], 0)
-    @example([1, 2, 3, 4], 2)
-    @example([1, 2, 3, 4], 4)
-    @example([1, 2, 3, 4], 2)
-    @example([1, 2, 3, 4], 3)
-    @example([1, 2, 3, 4], 1)
-    def test_slice_list_upper(self, x, y):
-        source_code = """
-def validator(x: List[int], y: int) -> List[int]:
-    return x[:y]
-            """
-        try:
-            exp = x[:y]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(
-            ret,
-            [PlutusInteger(x) for x in exp] if exp is not None else exp,
-            "list slice returned wrong value",
-        )
-
-    @given(x=st.lists(st.integers(), max_size=20))
-    @example([0])
-    @example([1, 2, 3, 4])
-    @example([1, 2, 3, 4])
-    @example([1, 2, 3, 4])
-    @example([1, 2, 3, 4])
-    @example([1, 2, 3, 4])
-    def test_slice_list_full(self, x):
-        source_code = """
-def validator(x: List[int]) -> List[int]:
-    return x[:]
-            """
-        try:
-            exp = x[:]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x)
-        except:
-            ret = None
-        self.assertEqual(
-            ret,
-            [PlutusInteger(x) for x in exp] if exp is not None else exp,
-            "list slice returned wrong value",
-        )
-
-    @given(xs=st.lists(st.integers()), y=st.integers())
-    @example(xs=[0, 1], y=-1)
-    @example(xs=[0, 1], y=0)
-    def test_in_list_int(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: List[int], y: int) -> bool:
-    return y in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y in xs, "list in returned wrong value")
-
-    @given(xs=st.lists(st.binary()), y=st.binary())
-    def test_in_list_bytes(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: List[bytes], y: bytes) -> bool:
-    return y in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y in xs, "list in returned wrong value")
-
-    @given(xs=uplc_data_list, y=uplc_data)
-    def test_in_list_data(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-def validator(x: List[Anything], y: Anything) -> bool:
-    return y in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y in xs.value, "list in returned wrong value")
-
-    @given(xs=uplc_data_list, y=uplc_data)
-    def test_not_in_list_data(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-def validator(x: List[Anything], y: Anything) -> bool:
-    return y not in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y not in xs.value, "list not in returned wrong value")
-
-    @given(xs=st.lists(st.integers()), y=st.integers())
-    @example(xs=[0, 1], y=-1)
-    @example(xs=[0, 1], y=0)
-    def test_not_in_list_int(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: List[int], y: int) -> bool:
-    return y not in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y not in xs, "list not in returned wrong value")
-
-    @given(xs=st.lists(st.binary()), y=st.binary())
-    def test_not_in_list_bytes(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: List[bytes], y: bytes) -> bool:
-    return y not in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y not in xs, "list not in returned wrong value")
-
-    @given(x=st.lists(st.integers()))
-    def test_not_list(self, x):
-        source_code = """
-def validator(x: List[int]) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    @given(x=st.binary(), y=st.binary())
-    def test_eq_bytes(self, x, y):
-        source_code = """
-def validator(x: bytes, y: bytes) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y, "bytes eq returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_eq_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y, "int eq returned wrong value")
-
-    @given(x=st.text(), y=st.text())
-    def test_eq_str(self, x, y):
-        source_code = """
-def validator(x: str, y: str) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"), y.encode("utf8"))
-        self.assertEqual(ret, x == y, "str eq returned wrong value")
-
-    @given(x=st.booleans(), y=st.booleans())
-    def test_eq_bool(self, x, y):
-        source_code = """
-def validator(x: bool, y: bool) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y, "bool eq returned wrong value")
-
-    @given(x=uplc_data, y=uplc_data)
-    def test_eq_data(self, x, y):
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: Anything, y: Anything) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y, "any eq returned wrong value")
-
-    @given(x=st.booleans(), y=st.integers())
-    def test_eq_bool_int(self, x, y):
-        source_code = """
-def validator(x: bool, y: int) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y, "bool eq int returned wrong value")
-
-    @given(x=st.text(), y=st.text())
-    def test_neq_str(self, x, y):
-        source_code = """
-def validator(x: str, y: str) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"), y.encode("utf8"))
-        self.assertEqual(ret, x != y, "str neq returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_neq_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y, "int neq returned wrong value")
-
-    @given(x=st.binary(), y=st.binary())
-    def test_neq_bytes(self, x, y):
-        source_code = """
-def validator(x: bytes, y: bytes) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y, "bytes neq returned wrong value")
-
-    @given(x=st.booleans(), y=st.booleans())
-    def test_neq_bool(self, x, y):
-        source_code = """
-def validator(x: bool, y: bool) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y, "bool neq returned wrong value")
-
-    @given(x=st.booleans(), y=st.integers())
-    def test_neq_bool_int(self, x, y):
-        source_code = """
-def validator(x: bool, y: int) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y, "bool neq int returned wrong value")
-
-    @given(x=uplc_data, y=uplc_data)
-    def test_neq_data(self, x, y):
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: Anything, y: Anything) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y, "any neq returned wrong value")
-
-    @given(x=st.integers(min_value=0, max_value=150), y=st.text())
-    def test_mul_int_str(self, x, y):
-        source_code = """
-def validator(x: int, y: str) -> str:
-    return x * y
-            """
-        ret = eval_uplc_value(source_code, x, y.encode("utf8"))
-        self.assertEqual(ret.decode("utf8"), x * y, "* returned wrong value")
-
-    @given(x=st.text(), y=st.integers(min_value=0, max_value=150))
-    def test_mul_str_int(self, x, y):
-        source_code = """
-def validator(x: str, y: int) -> str:
-    return x * y
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"), y)
-        self.assertEqual(ret.decode("utf8"), x * y, "* returned wrong value")
-
-    @given(x=st.integers(min_value=0, max_value=150), y=st.binary())
-    def test_mul_int_bytes(self, x, y):
-        source_code = """
-def validator(x: int, y: bytes) -> bytes:
-    return x * y
-        """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x * y, "bytes int multiplication returned wrong value")
-
-    @given(x=st.binary(), y=st.integers(min_value=0, max_value=150))
-    def test_mul_bytes_int(self, x, y):
-        source_code = """
-def validator(x: bytes, y: int) -> bytes:
-    return x * y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x * y, "* returned wrong value")
-
-    @given(
-        xs=st.lists(st.integers(), max_size=20), ys=st.lists(st.integers(), max_size=20)
-    )
-    def test_add_list(self, xs, ys):
-        source_code = """
-def validator(x: List[int], y: List[int]) -> List[int]:
-    return x + y
-            """
-        ret = eval_uplc_value(source_code, xs, ys)
-        self.assertEqual(
-            ret,
-            [PlutusInteger(x) for x in xs] + [PlutusInteger(y) for y in ys],
-            "+ returned wrong value",
-        )
-
-    @given(x=st.integers())
-    def test_fmt_int(self, x):
-        source_code = """
-def validator(x: int) -> str:
-    return f"{x}"
-    """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(
-            ret.decode("utf8"), f"{x}", "int string formatting returned wrong value"
-        )
-
-    @given(x=st.booleans())
-    def test_fmt_bool(self, x):
-        source_code = """
-def validator(x: bool) -> str:
-    return f"{x}"
-    """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(
-            ret.decode("utf8"), f"{x}", "bool string formatting returned wrong value"
-        )
-
-    @given(x=st.text())
-    def test_fmt_str(self, x):
-        source_code = """
-def validator(x: str) -> str:
-    return f"{x}"
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"))
-        self.assertEqual(
-            ret.decode("utf8"), f"{x}", "string string formatting returned wrong value"
-        )
-
-    @given(x=st.binary())
-    @example(b"'")
-    @example(b'"')
-    @example(b"\\")
-    @example(b"\r")
-    @example(b"\n")
-    @example(b"\t")
-    @example(b"\x7f")
-    def test_fmt_bytes(self, x):
-        source_code = """
-def validator(x: bytes) -> str:
-    return f"{x}"
-        """
-        ret = eval_uplc_value(source_code, x).decode("utf8")
-        if b"'" not in x:
-            self.assertEqual(
-                ret, f"{x}", "bytes string formatting returned wrong value"
-            )
-        else:
-            # NOTE: formally this is a bug where we do not have the same semantics as python
-            # specifically when ' is contained in the string we do not change the quotation marks
-            self.assertEqual(
-                eval(ret), x, "bytes string formatting returned wrong value"
-            )
-
-    @given(x=st.none())
-    def test_fmt_none(self, x):
-        source_code = """
-def validator(x: None) -> str:
-    return f"{x}"
-            """
-        ret = eval_uplc_value(source_code, Unit()).decode("utf8")
-        self.assertEqual(ret, f"{x}", "none string formatting returned wrong value")
-
-    @given(
-        x=st.builds(
-            UpperBoundPOSIXTime,
-            st.one_of(
-                st.builds(FinitePOSIXTime, st.integers()), st.builds(PosInfPOSIXTime)
-            ),
-            st.one_of(st.builds(TrueData), st.builds(FalseData)),
-        )
-    )
-    @example(UpperBoundPOSIXTime(PosInfPOSIXTime(), TrueData()))
-    def test_fmt_dataclass(self, x: UpperBoundPOSIXTime):
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: UpperBoundPOSIXTime) -> str:
-    return f"{x}"
-            """
-
-        ret = eval_uplc_value(source_code, x).decode("utf8")
-        self.assertEqual(
-            ret, f"{x}", "several element string formatting returned wrong value"
-        )
-
-    @given(x=st.integers(), y=st.integers())
-    def test_fmt_multiple(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> str:
-    return f"a{x}b{y}c"
-            """
-        ret = eval_uplc_value(source_code, x, y).decode("utf8")
-        self.assertEqual(
-            ret, f"a{x}b{y}c", "several element string formatting returned wrong value"
-        )
-
-    @given(x=st.lists(st.integers()))
-    @example([])
-    @example([0])
-    def test_fmt_tuple_int(self, x):
-        params = [f"a{i}" for i in range(len(x))]
-        source_code = f"""
-def validator({",".join(p + ": int" for p in params)}) -> str:
-    return f"{{({"".join(p + "," for p in params)})}}"
-            """
-        ret = eval_uplc_value(source_code, *x if x else [0]).decode("utf8")
-        exp = f"{tuple(x)}"
-        self.assertEqual(
-            ret, exp, "integer tuple string formatting returned wrong value"
-        )
-
-    @given(xs=st.lists(formattable_text))
-    def test_fmt_tuple_str(self, xs):
-        # TODO strings are not properly escaped here
-        params = [f"a{i}" for i in range(len(xs))]
-        source_code = f"""
-def validator({",".join(p + ": str" for p in params)}) -> str:
-    return f"{{({"".join(p + "," for p in params)})}}"
-            """
-        ret = eval_uplc_value(
-            source_code, *(x.encode("utf8") for x in xs) if xs else [0]
-        ).decode("utf8")
-        exp = f"{tuple(xs)}"
-        self.assertEqual(ret, exp, "tuple string formatting returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_fmt_pair_int(self, x, y):
-        source_code = f"""
-def validator(x: int, y: int) -> str:
-    a = ""
-    for p in {{x:y}}.items():
-        a = f"{{p}}"
-    return a
-            """
-        exp = f"{(x, y)}"
-        ret = eval_uplc_value(source_code, x, y).decode("utf8")
-        self.assertEqual(
-            ret, exp, "integer tuple string formatting returned wrong value"
-        )
-
-    @given(x=formattable_text, y=formattable_text)
-    def test_fmt_pair_str(self, x, y):
-        # TODO strings are not properly escaped here
-        source_code = f"""
-def validator(x: str, y: str) -> str:
-    a = ""
-    for p in {{x:y}}.items():
-        a = f"{{p}}"
-    return a
-            """
-        exp = f"{(x, y)}"
-        ret = eval_uplc_value(source_code, x.encode("utf8"), y.encode("utf8")).decode(
-            "utf8"
-        )
-        self.assertEqual(
-            ret, exp, "string tuple string formatting returned wrong value"
-        )
-
-    @given(xs=st.lists(formattable_text))
-    @example([])
-    @example(["x"])
-    def test_fmt_list_str(self, xs):
-        # TODO strings are not properly escaped here
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: List[str]) -> str:
-    return f"{x}"
-            """
-        exp = f"{list(xs)}"
-        ret = eval_uplc_value(source_code, [x.encode("utf8") for x in xs]).decode(
-            "utf8"
-        )
-        self.assertEqual(ret, exp, "string list string formatting returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    @example([])
-    @example([0])
-    def test_fmt_list_int(self, xs):
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: List[int]) -> str:
-    return f"{x}"
-            """
-        exp = f"{list(xs)}"
-        ret = eval_uplc_value(source_code, xs).decode("utf8")
-        self.assertEqual(
-            ret, exp, "integer list string formatting returned wrong value"
-        )
-
-    @given(x=st.dictionaries(st.integers(), st.integers()))
-    def test_not_dict(self, x):
-        source_code = """
-def validator(x: Dict[int, int]) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.integers()), y=st.integers())
-    def test_index_dict(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: Dict[int, int], y: int) -> int:
-    return x[y]
-            """
-        try:
-            exp = xs[y]
-        except KeyError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs, y)
-        except Exception as e:
-            ret = None
-        self.assertEqual(ret, exp, "list index returned wrong value")
-
-    @given(xs=st.dictionaries(formattable_text, st.integers()))
-    @example(dict())
-    @example({"": 0})
-    def test_fmt_dict_int(self, xs):
-        # TODO strings are not properly escaped here
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: Dict[str, int]) -> str:
-    return f"{x}"
-            """
-        exp = f"{dict(xs)}"
-        ret = eval_uplc_value(
-            source_code, {k.encode("utf8"): v for k, v in xs.items()}
-        ).decode("utf8")
-        self.assertEqual(ret, exp, "dict string formatting returned wrong value")
-
-    @given(x=uplc_data)
-    @example(PlutusByteString(b""))
-    @example(PlutusConstr(0, [PlutusByteString(b"'")]))
-    @example(
-        PlutusMap({PlutusInteger(1): PlutusMap({}), PlutusInteger(0): PlutusMap({})})
-    )
-    def test_fmt_any(self, x):
-        x_cbor = uplc.plutus_cbor_dumps(x)
-        x_data = pycardano.RawPlutusData(cbor2.loads(x_cbor))
-        source_code = """
-def validator(x: Anything) -> str:
-    return f"{x}"
-            """
-        # NOTE: this is technically a deviation from the semantics of pycardano but I expect the pycardano semantics to change soon
-        exp = f"RawPlutusData(data={repr(x_data.data)})"
-        ret = eval_uplc_value(source_code, pycardano.RawCBOR(x_cbor)).decode("utf8")
-        if "\\'" in ret:
-            RawPlutusData = pycardano.RawPlutusData
-            CBORTag = cbor2.CBORTag
-            self.assertEqual(
-                eval(ret), x_data, "raw cbor string formatting returned wrong value"
-            )
-        else:
-            self.assertEqual(
-                ret, exp, "raw cbor string formatting returned wrong value"
-            )
-
-    @given(x=st.text())
-    def test_not_string(self, x):
-        source_code = """
-def validator(x: str) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"))
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    @given(x=st.binary())
-    def test_not_bytes(self, x):
-        source_code = """
-def validator(x: bytes) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    def test_not_unit(self):
-        source_code = """
-def validator(x: None) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, uplc.BuiltinUnit())
-        self.assertEqual(bool(ret), not None, "not returned wrong value")
-
-
-
-
-
-
-
-

Functions

-
-
-def frozenlist(l) -
-
-
-
-
-def rec_data_strategies(uplc_data) -
-
-
-
-
-
-
-

Classes

-
-
-class OpTest -(methodName='runTest') -
-
-

A class whose instances are single test cases.

-

By default, the test code itself should be placed in a method named -'runTest'.

-

If the fixture may be used for many test cases, create as -many test methods as are needed. When instantiating such a TestCase -subclass, specify in the constructor arguments the name of the test method -that the instance is to execute.

-

Test authors should subclass TestCase for their own tests. Construction -and deconstruction of the test's environment ('fixture') can be -implemented by overriding the 'setUp' and 'tearDown' methods respectively.

-

If it is necessary to override the init method, the base class -init method must always be called. It is important that subclasses -should not change the signature of their init method, since instances -of the classes are instantiated automatically by parts of the framework -in order to be run.

-

When subclassing TestCase, you can set these attributes: -* failureException: determines which exception will be raised when -the instance's assertion methods fail; test methods raising this -exception will be deemed to have 'failed' rather than 'errored'. -* longMessage: determines whether long messages (including repr of -objects used in assert methods) will be printed on failure in addition -to any explicit message passed. -* maxDiff: sets the maximum length of a diff in failure messages -by assert methods using difflib. It is looked up as an instance -attribute so can be configured by individual tests if required.

-

Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

-
- -Expand source code - -
class OpTest(unittest.TestCase):
-    @given(x=st.booleans(), y=st.booleans())
-    def test_and_bool(self, x, y):
-        source_code = """
-def validator(x: bool, y: bool) -> bool:
-    return x and y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(bool(ret), x and y, "and returned wrong value")
-
-    @given(x=st.booleans(), y=st.booleans())
-    def test_or_bool(self, x, y):
-        source_code = """
-def validator(x: bool, y: bool) -> bool:
-    return x or y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(bool(ret), x or y, "or returned wrong value")
-
-    @given(x=st.booleans())
-    def test_not_bool(self, x):
-        source_code = """
-def validator(x: bool) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    @given(x=st.integers())
-    def test_usub_int(self, x):
-        source_code = """
-def validator(x: int) -> int:
-    return -x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret, -x, "not returned wrong value")
-
-    @given(x=st.integers())
-    def test_uadd_int(self, x):
-        source_code = """
-def validator(x: int) -> int:
-    return +x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(ret, +x, "not returned wrong value")
-
-    @given(x=st.integers())
-    def test_not_int(self, x):
-        source_code = """
-def validator(x: int) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_add_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x + y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x + y, "+ returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_sub_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x - y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x - y, "- returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_mul_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x * y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x * y, "* returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_div_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x // y
-            """
-        try:
-            exp = x // y
-        except ZeroDivisionError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except Exception:
-            ret = None
-        self.assertEqual(ret, exp, "// returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_mod_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x % y
-            """
-        try:
-            exp = x % y
-        except ZeroDivisionError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except Exception:
-            ret = None
-        self.assertEqual(ret, exp, "% returned wrong value")
-
-    @given(x=st.integers(), y=st.integers(min_value=0, max_value=20))
-    def test_pow_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x ** y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x**y, "** returned wrong value")
-
-    @given(x=st.integers(), y=st.integers(min_value=-20, max_value=-1))
-    def test_neg_pow_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> int:
-    return x ** y
-            """
-        try:
-            eval_uplc_value(source_code, x, y)
-            fail = True
-        except Exception:
-            fail = False
-        self.assertFalse(fail, "** worked with negative exponent")
-
-    @given(x=st.binary(), y=st.binary())
-    def test_add_bytes(self, x, y):
-        source_code = """
-def validator(x: bytes, y: bytes) -> bytes:
-    return x + y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x + y, "+ returned wrong value")
-
-    @given(x=st.text(), y=st.text())
-    def test_add_str(self, x, y):
-        source_code = """
-def validator(x: str, y: str) -> str:
-    return x + y
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"), y.encode("utf8")).decode(
-            "utf8"
-        )
-        self.assertEqual(ret, x + y, "+ returned wrong value")
-
-    @given(x=st.binary(), y=st.integers(), z=st.integers())
-    @example(b"\x00", -2, 0)
-    @example(b"1234", 1, 2)
-    @example(b"1234", 2, 4)
-    @example(b"1234", 2, 2)
-    @example(b"1234", 3, 3)
-    @example(b"1234", 3, 1)
-    def test_slice_bytes(self, x, y, z):
-        source_code = """
-def validator(x: bytes, y: int, z: int) -> bytes:
-    return x[y:z]
-            """
-        try:
-            exp = x[y:z]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y, z)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "byte slice returned wrong value")
-
-    @given(x=st.binary(), y=st.integers())
-    @example(b"\x00", -2)
-    @example(b"1234", 1)
-    @example(b"1234", 2)
-    @example(b"1234", 2)
-    @example(b"1234", 3)
-    @example(b"1234", 3)
-    def test_slice_bytes_lower(self, x, y):
-        source_code = """
-def validator(x: bytes, y: int) -> bytes:
-    return x[y:]
-            """
-        try:
-            exp = x[y:]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "byte slice returned wrong value")
-
-    @given(x=st.binary(), y=st.integers())
-    @example(b"\x00", 0)
-    @example(b"1234", 2)
-    @example(b"1234", 4)
-    @example(b"1234", 2)
-    @example(b"1234", 3)
-    @example(b"1234", 1)
-    def test_slice_bytes_upper(self, x, y):
-        source_code = """
-def validator(x: bytes, y: int) -> bytes:
-    return x[:y]
-            """
-        try:
-            exp = x[:y]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "byte slice returned wrong value")
-
-    @given(x=st.binary())
-    @example(b"\x00")
-    @example(b"1234")
-    @example(b"1234")
-    @example(b"1234")
-    @example(b"1234")
-    @example(b"1234")
-    def test_slice_bytes_full(self, x):
-        source_code = """
-def validator(x: bytes) -> bytes:
-    return x[:]
-            """
-        try:
-            exp = x[:]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "byte slice returned wrong value")
-
-    @given(x=st.binary(), y=st.integers())
-    @example(b"1234", 0)
-    @example(b"1234", 1)
-    @example(b"1234", -1)
-    def test_index_bytes(self, x, y):
-        source_code = """
-def validator(x: bytes, y: int) -> int:
-    return x[y]
-            """
-        try:
-            exp = x[y]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(ret, exp, "byte index returned wrong value")
-
-    @given(xs=st.lists(st.integers()), y=st.integers())
-    @example(xs=[0], y=-1)
-    @example(xs=[0], y=0)
-    def test_index_list(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: List[int], y: int) -> int:
-    return x[y]
-            """
-        try:
-            exp = xs[y]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs, y)
-        except Exception as e:
-            ret = None
-        self.assertEqual(ret, exp, "list index returned wrong value")
-
-    @given(x=st.lists(st.integers(), max_size=20), y=st.integers(), z=st.integers())
-    @example([0], -2, 0)
-    @example([1, 2, 3, 4], 1, 2)
-    @example([1, 2, 3, 4], 2, 4)
-    @example([1, 2, 3, 4], 2, 2)
-    @example([1, 2, 3, 4], 3, 3)
-    @example([1, 2, 3, 4], 3, 1)
-    def test_slice_list(self, x, y, z):
-        source_code = """
-def validator(x: List[int], y: int, z: int) -> List[int]:
-    return x[y:z]
-            """
-        try:
-            exp = x[y:z]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y, z)
-        except:
-            ret = None
-        self.assertEqual(
-            ret,
-            [PlutusInteger(x) for x in exp] if exp is not None else exp,
-            "list slice returned wrong value",
-        )
-
-    @given(x=st.lists(st.integers(), max_size=20), y=st.integers())
-    @example([0], -2)
-    @example([1, 2, 3, 4], 1)
-    @example([1, 2, 3, 4], 2)
-    @example([1, 2, 3, 4], 2)
-    @example([1, 2, 3, 4], 3)
-    @example([1, 2, 3, 4], 3)
-    def test_slice_list_lower(self, x, y):
-        source_code = """
-def validator(x: List[int], y: int) -> List[int]:
-    return x[y:]
-            """
-        try:
-            exp = x[y:]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(
-            ret,
-            [PlutusInteger(x) for x in exp] if exp is not None else exp,
-            "list slice returned wrong value",
-        )
-
-    @given(x=st.lists(st.integers(), max_size=20), y=st.integers())
-    @example([0], 0)
-    @example([1, 2, 3, 4], 2)
-    @example([1, 2, 3, 4], 4)
-    @example([1, 2, 3, 4], 2)
-    @example([1, 2, 3, 4], 3)
-    @example([1, 2, 3, 4], 1)
-    def test_slice_list_upper(self, x, y):
-        source_code = """
-def validator(x: List[int], y: int) -> List[int]:
-    return x[:y]
-            """
-        try:
-            exp = x[:y]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except:
-            ret = None
-        self.assertEqual(
-            ret,
-            [PlutusInteger(x) for x in exp] if exp is not None else exp,
-            "list slice returned wrong value",
-        )
-
-    @given(x=st.lists(st.integers(), max_size=20))
-    @example([0])
-    @example([1, 2, 3, 4])
-    @example([1, 2, 3, 4])
-    @example([1, 2, 3, 4])
-    @example([1, 2, 3, 4])
-    @example([1, 2, 3, 4])
-    def test_slice_list_full(self, x):
-        source_code = """
-def validator(x: List[int]) -> List[int]:
-    return x[:]
-            """
-        try:
-            exp = x[:]
-        except IndexError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, x)
-        except:
-            ret = None
-        self.assertEqual(
-            ret,
-            [PlutusInteger(x) for x in exp] if exp is not None else exp,
-            "list slice returned wrong value",
-        )
-
-    @given(xs=st.lists(st.integers()), y=st.integers())
-    @example(xs=[0, 1], y=-1)
-    @example(xs=[0, 1], y=0)
-    def test_in_list_int(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: List[int], y: int) -> bool:
-    return y in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y in xs, "list in returned wrong value")
-
-    @given(xs=st.lists(st.binary()), y=st.binary())
-    def test_in_list_bytes(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: List[bytes], y: bytes) -> bool:
-    return y in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y in xs, "list in returned wrong value")
-
-    @given(xs=uplc_data_list, y=uplc_data)
-    def test_in_list_data(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-def validator(x: List[Anything], y: Anything) -> bool:
-    return y in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y in xs.value, "list in returned wrong value")
-
-    @given(xs=uplc_data_list, y=uplc_data)
-    def test_not_in_list_data(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-def validator(x: List[Anything], y: Anything) -> bool:
-    return y not in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y not in xs.value, "list not in returned wrong value")
-
-    @given(xs=st.lists(st.integers()), y=st.integers())
-    @example(xs=[0, 1], y=-1)
-    @example(xs=[0, 1], y=0)
-    def test_not_in_list_int(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: List[int], y: int) -> bool:
-    return y not in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y not in xs, "list not in returned wrong value")
-
-    @given(xs=st.lists(st.binary()), y=st.binary())
-    def test_not_in_list_bytes(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: List[bytes], y: bytes) -> bool:
-    return y not in x
-            """
-        ret = eval_uplc_value(source_code, xs, y)
-        self.assertEqual(ret, y not in xs, "list not in returned wrong value")
-
-    @given(x=st.lists(st.integers()))
-    def test_not_list(self, x):
-        source_code = """
-def validator(x: List[int]) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    @given(x=st.binary(), y=st.binary())
-    def test_eq_bytes(self, x, y):
-        source_code = """
-def validator(x: bytes, y: bytes) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y, "bytes eq returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_eq_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y, "int eq returned wrong value")
-
-    @given(x=st.text(), y=st.text())
-    def test_eq_str(self, x, y):
-        source_code = """
-def validator(x: str, y: str) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"), y.encode("utf8"))
-        self.assertEqual(ret, x == y, "str eq returned wrong value")
-
-    @given(x=st.booleans(), y=st.booleans())
-    def test_eq_bool(self, x, y):
-        source_code = """
-def validator(x: bool, y: bool) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y, "bool eq returned wrong value")
-
-    @given(x=uplc_data, y=uplc_data)
-    def test_eq_data(self, x, y):
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: Anything, y: Anything) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y, "any eq returned wrong value")
-
-    @given(x=st.booleans(), y=st.integers())
-    def test_eq_bool_int(self, x, y):
-        source_code = """
-def validator(x: bool, y: int) -> bool:
-    return x == y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x == y, "bool eq int returned wrong value")
-
-    @given(x=st.text(), y=st.text())
-    def test_neq_str(self, x, y):
-        source_code = """
-def validator(x: str, y: str) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"), y.encode("utf8"))
-        self.assertEqual(ret, x != y, "str neq returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_neq_int(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y, "int neq returned wrong value")
-
-    @given(x=st.binary(), y=st.binary())
-    def test_neq_bytes(self, x, y):
-        source_code = """
-def validator(x: bytes, y: bytes) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y, "bytes neq returned wrong value")
-
-    @given(x=st.booleans(), y=st.booleans())
-    def test_neq_bool(self, x, y):
-        source_code = """
-def validator(x: bool, y: bool) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y, "bool neq returned wrong value")
-
-    @given(x=st.booleans(), y=st.integers())
-    def test_neq_bool_int(self, x, y):
-        source_code = """
-def validator(x: bool, y: int) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y, "bool neq int returned wrong value")
-
-    @given(x=uplc_data, y=uplc_data)
-    def test_neq_data(self, x, y):
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: Anything, y: Anything) -> bool:
-    return x != y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x != y, "any neq returned wrong value")
-
-    @given(x=st.integers(min_value=0, max_value=150), y=st.text())
-    def test_mul_int_str(self, x, y):
-        source_code = """
-def validator(x: int, y: str) -> str:
-    return x * y
-            """
-        ret = eval_uplc_value(source_code, x, y.encode("utf8"))
-        self.assertEqual(ret.decode("utf8"), x * y, "* returned wrong value")
-
-    @given(x=st.text(), y=st.integers(min_value=0, max_value=150))
-    def test_mul_str_int(self, x, y):
-        source_code = """
-def validator(x: str, y: int) -> str:
-    return x * y
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"), y)
-        self.assertEqual(ret.decode("utf8"), x * y, "* returned wrong value")
-
-    @given(x=st.integers(min_value=0, max_value=150), y=st.binary())
-    def test_mul_int_bytes(self, x, y):
-        source_code = """
-def validator(x: int, y: bytes) -> bytes:
-    return x * y
-        """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x * y, "bytes int multiplication returned wrong value")
-
-    @given(x=st.binary(), y=st.integers(min_value=0, max_value=150))
-    def test_mul_bytes_int(self, x, y):
-        source_code = """
-def validator(x: bytes, y: int) -> bytes:
-    return x * y
-            """
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, x * y, "* returned wrong value")
-
-    @given(
-        xs=st.lists(st.integers(), max_size=20), ys=st.lists(st.integers(), max_size=20)
-    )
-    def test_add_list(self, xs, ys):
-        source_code = """
-def validator(x: List[int], y: List[int]) -> List[int]:
-    return x + y
-            """
-        ret = eval_uplc_value(source_code, xs, ys)
-        self.assertEqual(
-            ret,
-            [PlutusInteger(x) for x in xs] + [PlutusInteger(y) for y in ys],
-            "+ returned wrong value",
-        )
-
-    @given(x=st.integers())
-    def test_fmt_int(self, x):
-        source_code = """
-def validator(x: int) -> str:
-    return f"{x}"
-    """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(
-            ret.decode("utf8"), f"{x}", "int string formatting returned wrong value"
-        )
-
-    @given(x=st.booleans())
-    def test_fmt_bool(self, x):
-        source_code = """
-def validator(x: bool) -> str:
-    return f"{x}"
-    """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(
-            ret.decode("utf8"), f"{x}", "bool string formatting returned wrong value"
-        )
-
-    @given(x=st.text())
-    def test_fmt_str(self, x):
-        source_code = """
-def validator(x: str) -> str:
-    return f"{x}"
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"))
-        self.assertEqual(
-            ret.decode("utf8"), f"{x}", "string string formatting returned wrong value"
-        )
-
-    @given(x=st.binary())
-    @example(b"'")
-    @example(b'"')
-    @example(b"\\")
-    @example(b"\r")
-    @example(b"\n")
-    @example(b"\t")
-    @example(b"\x7f")
-    def test_fmt_bytes(self, x):
-        source_code = """
-def validator(x: bytes) -> str:
-    return f"{x}"
-        """
-        ret = eval_uplc_value(source_code, x).decode("utf8")
-        if b"'" not in x:
-            self.assertEqual(
-                ret, f"{x}", "bytes string formatting returned wrong value"
-            )
-        else:
-            # NOTE: formally this is a bug where we do not have the same semantics as python
-            # specifically when ' is contained in the string we do not change the quotation marks
-            self.assertEqual(
-                eval(ret), x, "bytes string formatting returned wrong value"
-            )
-
-    @given(x=st.none())
-    def test_fmt_none(self, x):
-        source_code = """
-def validator(x: None) -> str:
-    return f"{x}"
-            """
-        ret = eval_uplc_value(source_code, Unit()).decode("utf8")
-        self.assertEqual(ret, f"{x}", "none string formatting returned wrong value")
-
-    @given(
-        x=st.builds(
-            UpperBoundPOSIXTime,
-            st.one_of(
-                st.builds(FinitePOSIXTime, st.integers()), st.builds(PosInfPOSIXTime)
-            ),
-            st.one_of(st.builds(TrueData), st.builds(FalseData)),
-        )
-    )
-    @example(UpperBoundPOSIXTime(PosInfPOSIXTime(), TrueData()))
-    def test_fmt_dataclass(self, x: UpperBoundPOSIXTime):
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: UpperBoundPOSIXTime) -> str:
-    return f"{x}"
-            """
-
-        ret = eval_uplc_value(source_code, x).decode("utf8")
-        self.assertEqual(
-            ret, f"{x}", "several element string formatting returned wrong value"
-        )
-
-    @given(x=st.integers(), y=st.integers())
-    def test_fmt_multiple(self, x, y):
-        source_code = """
-def validator(x: int, y: int) -> str:
-    return f"a{x}b{y}c"
-            """
-        ret = eval_uplc_value(source_code, x, y).decode("utf8")
-        self.assertEqual(
-            ret, f"a{x}b{y}c", "several element string formatting returned wrong value"
-        )
-
-    @given(x=st.lists(st.integers()))
-    @example([])
-    @example([0])
-    def test_fmt_tuple_int(self, x):
-        params = [f"a{i}" for i in range(len(x))]
-        source_code = f"""
-def validator({",".join(p + ": int" for p in params)}) -> str:
-    return f"{{({"".join(p + "," for p in params)})}}"
-            """
-        ret = eval_uplc_value(source_code, *x if x else [0]).decode("utf8")
-        exp = f"{tuple(x)}"
-        self.assertEqual(
-            ret, exp, "integer tuple string formatting returned wrong value"
-        )
-
-    @given(xs=st.lists(formattable_text))
-    def test_fmt_tuple_str(self, xs):
-        # TODO strings are not properly escaped here
-        params = [f"a{i}" for i in range(len(xs))]
-        source_code = f"""
-def validator({",".join(p + ": str" for p in params)}) -> str:
-    return f"{{({"".join(p + "," for p in params)})}}"
-            """
-        ret = eval_uplc_value(
-            source_code, *(x.encode("utf8") for x in xs) if xs else [0]
-        ).decode("utf8")
-        exp = f"{tuple(xs)}"
-        self.assertEqual(ret, exp, "tuple string formatting returned wrong value")
-
-    @given(x=st.integers(), y=st.integers())
-    def test_fmt_pair_int(self, x, y):
-        source_code = f"""
-def validator(x: int, y: int) -> str:
-    a = ""
-    for p in {{x:y}}.items():
-        a = f"{{p}}"
-    return a
-            """
-        exp = f"{(x, y)}"
-        ret = eval_uplc_value(source_code, x, y).decode("utf8")
-        self.assertEqual(
-            ret, exp, "integer tuple string formatting returned wrong value"
-        )
-
-    @given(x=formattable_text, y=formattable_text)
-    def test_fmt_pair_str(self, x, y):
-        # TODO strings are not properly escaped here
-        source_code = f"""
-def validator(x: str, y: str) -> str:
-    a = ""
-    for p in {{x:y}}.items():
-        a = f"{{p}}"
-    return a
-            """
-        exp = f"{(x, y)}"
-        ret = eval_uplc_value(source_code, x.encode("utf8"), y.encode("utf8")).decode(
-            "utf8"
-        )
-        self.assertEqual(
-            ret, exp, "string tuple string formatting returned wrong value"
-        )
-
-    @given(xs=st.lists(formattable_text))
-    @example([])
-    @example(["x"])
-    def test_fmt_list_str(self, xs):
-        # TODO strings are not properly escaped here
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: List[str]) -> str:
-    return f"{x}"
-            """
-        exp = f"{list(xs)}"
-        ret = eval_uplc_value(source_code, [x.encode("utf8") for x in xs]).decode(
-            "utf8"
-        )
-        self.assertEqual(ret, exp, "string list string formatting returned wrong value")
-
-    @given(xs=st.lists(st.integers()))
-    @example([])
-    @example([0])
-    def test_fmt_list_int(self, xs):
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: List[int]) -> str:
-    return f"{x}"
-            """
-        exp = f"{list(xs)}"
-        ret = eval_uplc_value(source_code, xs).decode("utf8")
-        self.assertEqual(
-            ret, exp, "integer list string formatting returned wrong value"
-        )
-
-    @given(x=st.dictionaries(st.integers(), st.integers()))
-    def test_not_dict(self, x):
-        source_code = """
-def validator(x: Dict[int, int]) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.integers()), y=st.integers())
-    def test_index_dict(self, xs, y):
-        source_code = """
-from typing import Dict, List, Union
-def validator(x: Dict[int, int], y: int) -> int:
-    return x[y]
-            """
-        try:
-            exp = xs[y]
-        except KeyError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs, y)
-        except Exception as e:
-            ret = None
-        self.assertEqual(ret, exp, "list index returned wrong value")
-
-    @given(xs=st.dictionaries(formattable_text, st.integers()))
-    @example(dict())
-    @example({"": 0})
-    def test_fmt_dict_int(self, xs):
-        # TODO strings are not properly escaped here
-        source_code = """
-from opshin.prelude import *
-
-def validator(x: Dict[str, int]) -> str:
-    return f"{x}"
-            """
-        exp = f"{dict(xs)}"
-        ret = eval_uplc_value(
-            source_code, {k.encode("utf8"): v for k, v in xs.items()}
-        ).decode("utf8")
-        self.assertEqual(ret, exp, "dict string formatting returned wrong value")
-
-    @given(x=uplc_data)
-    @example(PlutusByteString(b""))
-    @example(PlutusConstr(0, [PlutusByteString(b"'")]))
-    @example(
-        PlutusMap({PlutusInteger(1): PlutusMap({}), PlutusInteger(0): PlutusMap({})})
-    )
-    def test_fmt_any(self, x):
-        x_cbor = uplc.plutus_cbor_dumps(x)
-        x_data = pycardano.RawPlutusData(cbor2.loads(x_cbor))
-        source_code = """
-def validator(x: Anything) -> str:
-    return f"{x}"
-            """
-        # NOTE: this is technically a deviation from the semantics of pycardano but I expect the pycardano semantics to change soon
-        exp = f"RawPlutusData(data={repr(x_data.data)})"
-        ret = eval_uplc_value(source_code, pycardano.RawCBOR(x_cbor)).decode("utf8")
-        if "\\'" in ret:
-            RawPlutusData = pycardano.RawPlutusData
-            CBORTag = cbor2.CBORTag
-            self.assertEqual(
-                eval(ret), x_data, "raw cbor string formatting returned wrong value"
-            )
-        else:
-            self.assertEqual(
-                ret, exp, "raw cbor string formatting returned wrong value"
-            )
-
-    @given(x=st.text())
-    def test_not_string(self, x):
-        source_code = """
-def validator(x: str) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x.encode("utf8"))
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    @given(x=st.binary())
-    def test_not_bytes(self, x):
-        source_code = """
-def validator(x: bytes) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, x)
-        self.assertEqual(bool(ret), not x, "not returned wrong value")
-
-    def test_not_unit(self):
-        source_code = """
-def validator(x: None) -> bool:
-    return not x
-            """
-        ret = eval_uplc_value(source_code, uplc.BuiltinUnit())
-        self.assertEqual(bool(ret), not None, "not returned wrong value")
-
-

Ancestors

-
    -
  • unittest.case.TestCase
  • -
-

Methods

-
-
-def test_add_bytes(self) ‑> None -
-
-
-
-
-def test_add_int(self) ‑> None -
-
-
-
-
-def test_add_list(self) ‑> None -
-
-
-
-
-def test_add_str(self) ‑> None -
-
-
-
-
-def test_and_bool(self) ‑> None -
-
-
-
-
-def test_div_int(self) ‑> None -
-
-
-
-
-def test_eq_bool(self) ‑> None -
-
-
-
-
-def test_eq_bool_int(self) ‑> None -
-
-
-
-
-def test_eq_bytes(self) ‑> None -
-
-
-
-
-def test_eq_data(self) ‑> None -
-
-
-
-
-def test_eq_int(self) ‑> None -
-
-
-
-
-def test_eq_str(self) ‑> None -
-
-
-
-
-def test_fmt_any(self) ‑> None -
-
-
-
-
-def test_fmt_bool(self) ‑> None -
-
-
-
-
-def test_fmt_bytes(self) ‑> None -
-
-
-
-
-def test_fmt_dataclass(self) ‑> None -
-
-
-
-
-def test_fmt_dict_int(self) ‑> None -
-
-
-
-
-def test_fmt_int(self) ‑> None -
-
-
-
-
-def test_fmt_list_int(self) ‑> None -
-
-
-
-
-def test_fmt_list_str(self) ‑> None -
-
-
-
-
-def test_fmt_multiple(self) ‑> None -
-
-
-
-
-def test_fmt_none(self) ‑> None -
-
-
-
-
-def test_fmt_pair_int(self) ‑> None -
-
-
-
-
-def test_fmt_pair_str(self) ‑> None -
-
-
-
-
-def test_fmt_str(self) ‑> None -
-
-
-
-
-def test_fmt_tuple_int(self) ‑> None -
-
-
-
-
-def test_fmt_tuple_str(self) ‑> None -
-
-
-
-
-def test_in_list_bytes(self) ‑> None -
-
-
-
-
-def test_in_list_data(self) ‑> None -
-
-
-
-
-def test_in_list_int(self) ‑> None -
-
-
-
-
-def test_index_bytes(self) ‑> None -
-
-
-
-
-def test_index_dict(self) ‑> None -
-
-
-
-
-def test_index_list(self) ‑> None -
-
-
-
-
-def test_mod_int(self) ‑> None -
-
-
-
-
-def test_mul_bytes_int(self) ‑> None -
-
-
-
-
-def test_mul_int(self) ‑> None -
-
-
-
-
-def test_mul_int_bytes(self) ‑> None -
-
-
-
-
-def test_mul_int_str(self) ‑> None -
-
-
-
-
-def test_mul_str_int(self) ‑> None -
-
-
-
-
-def test_neg_pow_int(self) ‑> None -
-
-
-
-
-def test_neq_bool(self) ‑> None -
-
-
-
-
-def test_neq_bool_int(self) ‑> None -
-
-
-
-
-def test_neq_bytes(self) ‑> None -
-
-
-
-
-def test_neq_data(self) ‑> None -
-
-
-
-
-def test_neq_int(self) ‑> None -
-
-
-
-
-def test_neq_str(self) ‑> None -
-
-
-
-
-def test_not_bool(self) ‑> None -
-
-
-
-
-def test_not_bytes(self) ‑> None -
-
-
-
-
-def test_not_dict(self) ‑> None -
-
-
-
-
-def test_not_in_list_bytes(self) ‑> None -
-
-
-
-
-def test_not_in_list_data(self) ‑> None -
-
-
-
-
-def test_not_in_list_int(self) ‑> None -
-
-
-
-
-def test_not_int(self) ‑> None -
-
-
-
-
-def test_not_list(self) ‑> None -
-
-
-
-
-def test_not_string(self) ‑> None -
-
-
-
-
-def test_not_unit(self) -
-
-
-
-
-def test_or_bool(self) ‑> None -
-
-
-
-
-def test_pow_int(self) ‑> None -
-
-
-
-
-def test_slice_bytes(self) ‑> None -
-
-
-
-
-def test_slice_bytes_full(self) ‑> None -
-
-
-
-
-def test_slice_bytes_lower(self) ‑> None -
-
-
-
-
-def test_slice_bytes_upper(self) ‑> None -
-
-
-
-
-def test_slice_list(self) ‑> None -
-
-
-
-
-def test_slice_list_full(self) ‑> None -
-
-
-
-
-def test_slice_list_lower(self) ‑> None -
-
-
-
-
-def test_slice_list_upper(self) ‑> None -
-
-
-
-
-def test_sub_int(self) ‑> None -
-
-
-
-
-def test_uadd_int(self) ‑> None -
-
-
-
-
-def test_usub_int(self) ‑> None -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_std/index.html b/docs/opshin/tests/test_std/index.html deleted file mode 100644 index 315714db..00000000 --- a/docs/opshin/tests/test_std/index.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - -opshin.tests.test_std API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_std

-
-
-
-
-

Sub-modules

-
-
opshin.tests.test_std.test_bitmap
-
-
-
-
opshin.tests.test_std.test_fractions
-
-
-
-
opshin.tests.test_std.test_integrity
-
-
-
-
opshin.tests.test_std.test_math
-
-
-
-
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_std/test_bitmap.html b/docs/opshin/tests/test_std/test_bitmap.html deleted file mode 100644 index a7004eff..00000000 --- a/docs/opshin/tests/test_std/test_bitmap.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - - -opshin.tests.test_std.test_bitmap API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_std.test_bitmap

-
-
-
- -Expand source code - -
from typing import Tuple
-
-import hypothesis
-import hypothesis.strategies as hst
-
-from opshin.std import bitmap as oc_bitmap
-
-
-@hypothesis.given(hst.integers(min_value=0, max_value=1000))
-def test_init_bitmap(x: int):
-    assert (
-        len(oc_bitmap.init_bitmap(x)) * 8 >= x
-    ), "Insufficient size of initialized bitmap"
-
-
-@hst.composite
-def bytes_and_index(draw):
-    xs = draw(hst.binary(min_size=1))
-    i = draw(hst.integers(min_value=0, max_value=len(xs)))
-    return (xs, i)
-
-
-@hypothesis.given(bytes_and_index())
-def test_test_bitmap(p: Tuple[bytes, int]):
-    a, i = p
-    ith_bit = int.from_bytes(a, "big") & (1 << ((len(a) * 8) - i - 1))
-    assert oc_bitmap.test_bitmap(a, i) == (ith_bit != 0), "Invalid isset check"
-
-
-@hypothesis.given(bytes_and_index(), hst.booleans())
-def test__set_bitmap(p: Tuple[bytes, int], v: bool):
-    a, i = p
-    if v:
-        set_bit = int.from_bytes(a, "big") | (1 << ((len(a) * 8) - i - 1))
-    else:
-        set_bit = int.from_bytes(a, "big") & (~(1 << ((len(a) * 8) - i - 1)))
-    set_bit = set_bit.to_bytes(len(a), byteorder="big")
-    assert oc_bitmap._set_bitmap(a, i, v) == set_bit, "Set bit incorrectly"
-
-
-@hypothesis.given(bytes_and_index())
-def test_set_bitmap(p: Tuple[bytes, int]):
-    a, i = p
-    set_bit = int.from_bytes(a, "big") | (1 << ((len(a) * 8) - i - 1))
-    set_bit = set_bit.to_bytes(len(a), byteorder="big")
-    assert oc_bitmap.set_bitmap(a, i) == set_bit, "Set bit incorrectly"
-
-
-@hypothesis.given(bytes_and_index())
-def test_reset_bitmap(p: Tuple[bytes, int]):
-    a, i = p
-    set_bit = int.from_bytes(a, "big") & (~(1 << ((len(a) * 8) - i - 1)))
-    set_bit = set_bit.to_bytes(len(a), byteorder="big")
-    assert oc_bitmap.reset_bitmap(a, i) == set_bit, "Reset bit incorrectly"
-
-
-@hypothesis.given(bytes_and_index())
-def test_flip_bitmap(p: Tuple[bytes, int]):
-    a, i = p
-    set_bit = int.from_bytes(a, "big") ^ (1 << ((len(a) * 8) - i - 1))
-    set_bit = set_bit.to_bytes(len(a), byteorder="big")
-    assert oc_bitmap.flip_bitmap(a, i) == set_bit, "Flipped bit incorrectly"
-
-
-@hypothesis.given(hst.binary())
-def test_size_bitmap(x: bytes):
-    assert len(x) * 8 == oc_bitmap.size_bitmap(x), "Incorrect size of bitmap"
-
-
-@hypothesis.given(hst.binary())
-def test_all_bitmap(x: bytes):
-    assert oc_bitmap.all_bitmap(x) == all(
-        b == 0xFF for b in x
-    ), "All is incorrect for bitmap"
-
-
-@hypothesis.given(hst.binary())
-def test_any_bitmap(x: bytes):
-    assert oc_bitmap.any_bitmap(x) == any(
-        b != 0x00 for b in x
-    ), "Any is incorrect for bitmap"
-
-
-@hypothesis.given(hst.binary())
-def test_none_bitmap(x: bytes):
-    assert oc_bitmap.none_bitmap(x) == all(
-        b == 0x00 for b in x
-    ), "None is incorrect for bitmap"
-
-
-@hypothesis.given(bytes_and_index())
-def test_flip_roundtrip(p: Tuple[bytes, int]):
-    a, i = p
-    assert (
-        oc_bitmap.flip_bitmap(oc_bitmap.flip_bitmap(a, i), i) == a
-    ), "Flipped bit incorrectly"
-
-
-@hypothesis.given(bytes_and_index())
-def test_set_test(p: Tuple[bytes, int]):
-    a, i = p
-    assert oc_bitmap.test_bitmap(oc_bitmap.set_bitmap(a, i), i), "Set bit incorrectly"
-
-
-@hypothesis.given(bytes_and_index())
-def test_reset_test(p: Tuple[bytes, int]):
-    a, i = p
-    assert not oc_bitmap.test_bitmap(
-        oc_bitmap.reset_bitmap(a, i), i
-    ), "Reset bit incorrectly"
-
-
-
-
-
-
-
-

Functions

-
-
-def bytes_and_index() ‑> hypothesis.strategies.SearchStrategy -
-
-
-
-
-def test__set_bitmap() ‑> None -
-
-
-
-
-def test_all_bitmap() ‑> None -
-
-
-
-
-def test_any_bitmap() ‑> None -
-
-
-
-
-def test_flip_bitmap() ‑> None -
-
-
-
-
-def test_flip_roundtrip() ‑> None -
-
-
-
-
-def test_init_bitmap() ‑> None -
-
-
-
-
-def test_none_bitmap() ‑> None -
-
-
-
-
-def test_reset_bitmap() ‑> None -
-
-
-
-
-def test_reset_test() ‑> None -
-
-
-
-
-def test_set_bitmap() ‑> None -
-
-
-
-
-def test_set_test() ‑> None -
-
-
-
-
-def test_size_bitmap() ‑> None -
-
-
-
-
-def test_test_bitmap() ‑> None -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_std/test_fractions.html b/docs/opshin/tests/test_std/test_fractions.html deleted file mode 100644 index 6a6ab6a6..00000000 --- a/docs/opshin/tests/test_std/test_fractions.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - - - -opshin.tests.test_std.test_fractions API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_std.test_fractions

-
-
-
- -Expand source code - -
import hypothesis
-import hypothesis.strategies as hst
-
-from opshin.std import fractions as oc_fractions
-
-import fractions as native_fractions
-import math as native_math
-
-non_null = hst.one_of(hst.integers(min_value=1), hst.integers(max_value=-1))
-denormalized_fractions = hst.builds(oc_fractions.Fraction, hst.integers(), non_null)
-denormalized_fractions_non_null = hst.builds(oc_fractions.Fraction, non_null, non_null)
-
-
-def native_fraction_from_oc_fraction(f: oc_fractions.Fraction):
-    return native_fractions.Fraction(f.numerator, f.denominator)
-
-
-@hypothesis.given(denormalized_fractions, denormalized_fractions)
-def test_add(a: oc_fractions.Fraction, b: oc_fractions.Fraction):
-    oc_added = oc_fractions.add_fraction(a, b)
-    oc_normalized = native_fraction_from_oc_fraction(oc_added)
-    assert oc_normalized == (
-        native_fraction_from_oc_fraction(a) + native_fraction_from_oc_fraction(b)
-    ), "Invalid add"
-
-
-@hypothesis.given(denormalized_fractions, denormalized_fractions)
-def test_sub(a: oc_fractions.Fraction, b: oc_fractions.Fraction):
-    oc_subbed = oc_fractions.sub_fraction(a, b)
-    oc_normalized = native_fraction_from_oc_fraction(oc_subbed)
-    assert oc_normalized == (
-        native_fraction_from_oc_fraction(a) - native_fraction_from_oc_fraction(b)
-    ), "Invalid sub"
-
-
-@hypothesis.given(denormalized_fractions)
-def test_neg(a: oc_fractions.Fraction):
-    oc_negged = oc_fractions.neg_fraction(a)
-    oc_normalized = native_fraction_from_oc_fraction(oc_negged)
-    assert oc_normalized == -native_fraction_from_oc_fraction(a), "Invalid neg"
-
-
-@hypothesis.given(denormalized_fractions, denormalized_fractions)
-def test_mul(a: oc_fractions.Fraction, b: oc_fractions.Fraction):
-    oc_mulled = oc_fractions.mul_fraction(a, b)
-    oc_normalized = native_fraction_from_oc_fraction(oc_mulled)
-    assert oc_normalized == (
-        native_fraction_from_oc_fraction(a) * native_fraction_from_oc_fraction(b)
-    ), "Invalid mul"
-
-
-@hypothesis.given(denormalized_fractions, denormalized_fractions_non_null)
-def test_div(a: oc_fractions.Fraction, b: oc_fractions.Fraction):
-    oc_divved = oc_fractions.div_fraction(a, b)
-    oc_normalized = native_fraction_from_oc_fraction(oc_divved)
-    assert oc_normalized == (
-        native_fraction_from_oc_fraction(a) / native_fraction_from_oc_fraction(b)
-    ), "Invalid div"
-
-
-@hypothesis.given(denormalized_fractions)
-def test_norm_sign(a: oc_fractions.Fraction):
-    oc_normed = oc_fractions._norm_signs_fraction(a)
-    assert oc_normed.denominator > 0, "invalid norm_signs"
-    oc_normalized = native_fraction_from_oc_fraction(oc_normed)
-    oc_a_normalized = native_fraction_from_oc_fraction(a)
-    assert oc_normalized == oc_a_normalized, "invalid norm_signs"
-
-
-@hypothesis.given(denormalized_fractions)
-@hypothesis.example(oc_fractions.Fraction(0, -1))
-def test_norm(a: oc_fractions.Fraction):
-    oc_normed = oc_fractions.norm_fraction(a)
-    oc_normalized = native_fraction_from_oc_fraction(a)
-    assert oc_normed.numerator == oc_normalized.numerator, "Invalid norm"
-    assert oc_normed.denominator == oc_normalized.denominator, "Invalid norm"
-
-
-@hypothesis.given(denormalized_fractions, denormalized_fractions)
-def test_ge(a: oc_fractions.Fraction, b: oc_fractions.Fraction):
-    oc_ge = oc_fractions.ge_fraction(a, b)
-    ge = native_fraction_from_oc_fraction(a) >= native_fraction_from_oc_fraction(b)
-    assert oc_ge == ge, "Invalid ge"
-
-
-@hypothesis.given(denormalized_fractions, denormalized_fractions)
-def test_le(a: oc_fractions.Fraction, b: oc_fractions.Fraction):
-    oc_le = oc_fractions.le_fraction(a, b)
-    le = native_fraction_from_oc_fraction(a) <= native_fraction_from_oc_fraction(b)
-    assert oc_le == le, "Invalid le"
-
-
-@hypothesis.given(denormalized_fractions, denormalized_fractions)
-def test_lt(a: oc_fractions.Fraction, b: oc_fractions.Fraction):
-    oc_lt = oc_fractions.lt_fraction(a, b)
-    lt = native_fraction_from_oc_fraction(a) < native_fraction_from_oc_fraction(b)
-    assert oc_lt == lt, "Invalid lt"
-
-
-@hypothesis.given(denormalized_fractions, denormalized_fractions)
-def test_gt(a: oc_fractions.Fraction, b: oc_fractions.Fraction):
-    oc_gt = oc_fractions.gt_fraction(a, b)
-    gt = native_fraction_from_oc_fraction(a) > native_fraction_from_oc_fraction(b)
-    assert oc_gt == gt, "Invalid gt"
-
-
-@hypothesis.given(denormalized_fractions, denormalized_fractions)
-def test_eq(a: oc_fractions.Fraction, b: oc_fractions.Fraction):
-    oc_eq = oc_fractions.eq_fraction(a, b)
-    eq = native_fraction_from_oc_fraction(a) == native_fraction_from_oc_fraction(b)
-    assert oc_eq == eq, "Invalid eq"
-
-
-@hypothesis.given(denormalized_fractions)
-def test_floor(a: oc_fractions.Fraction):
-    oc_floor = oc_fractions.floor_fraction(a)
-    assert (
-        native_math.floor(native_fraction_from_oc_fraction(a)) == oc_floor
-    ), "Invalid floor"
-
-
-@hypothesis.given(denormalized_fractions)
-def test_ceil(a: oc_fractions.Fraction):
-    oc_ceil = oc_fractions.ceil_fraction(a)
-    assert (
-        native_math.ceil(native_fraction_from_oc_fraction(a)) == oc_ceil
-    ), "Invalid ceil"
-
-
-
-
-
-
-
-

Functions

-
-
-def native_fraction_from_oc_fraction(f: Fraction) -
-
-
-
-
-def test_add() ‑> None -
-
-
-
-
-def test_ceil() ‑> None -
-
-
-
-
-def test_div() ‑> None -
-
-
-
-
-def test_eq() ‑> None -
-
-
-
-
-def test_floor() ‑> None -
-
-
-
-
-def test_ge() ‑> None -
-
-
-
-
-def test_gt() ‑> None -
-
-
-
-
-def test_le() ‑> None -
-
-
-
-
-def test_lt() ‑> None -
-
-
-
-
-def test_mul() ‑> None -
-
-
-
-
-def test_neg() ‑> None -
-
-
-
-
-def test_norm() ‑> None -
-
-
-
-
-def test_norm_sign() ‑> None -
-
-
-
-
-def test_sub() ‑> None -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_std/test_integrity.html b/docs/opshin/tests/test_std/test_integrity.html deleted file mode 100644 index 2f6cf7e3..00000000 --- a/docs/opshin/tests/test_std/test_integrity.html +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - -opshin.tests.test_std.test_integrity API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_std.test_integrity

-
-
-
- -Expand source code - -
from parameterized import parameterized
-
-from uplc import ast as uplc, eval as uplc_eval
-from ..utils import eval_uplc
-
-
-@parameterized.expand(
-    [
-        [[0, 1]],
-        [[0]],
-        [[0, 1, 2]],
-        [[b"hello", 0]],
-    ]
-)
-def test_integrity_check(xs):
-    source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from opshin.std.integrity import check_integrity
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-    bar: int
-
-def validator(x: B) -> None:
-    check_integrity(x)
-"""
-    obj = uplc.PlutusConstr(
-        1,
-        [
-            uplc.PlutusInteger(x) if isinstance(x, int) else uplc.PlutusByteString(x)
-            for x in xs
-        ],
-    )
-    try:
-        eval_uplc(source_code, obj)
-    except Exception as e:
-        print(e)
-        res = False
-    else:
-        res = True
-    assert res == (len(xs) == 2 and all(isinstance(x, int) for x in xs))
-
-
-@parameterized.expand(
-    [
-        [0],
-        [1],
-        [2],
-    ]
-)
-def test_integrity_check_list(bar_constr):
-    source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from opshin.std.integrity import check_integrity
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 1
-    
-@dataclass()
-class C(PlutusData):
-    CONSTR_ID = 0
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    bar: Union[A, C]
-
-def validator(x: B) -> None:
-    check_integrity(x)
-"""
-    obj = uplc.PlutusConstr(
-        1,
-        [uplc.PlutusConstr(bar_constr, [])],
-    )
-    try:
-        eval_uplc(source_code, obj)
-    except:
-        res = False
-    else:
-        res = True
-    assert res == (bar_constr in (0, 1))
-
-
-@parameterized.expand(
-    [
-        [[0, 1], [1, 1, 1]],
-        [[b"hello"], [1, 1]],
-        [[0, 1, 2], [1, 0]],
-    ]
-)
-def test_integrity_check_list(foobar, bar_constrs):
-    source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from opshin.std.integrity import check_integrity
-
-@dataclass()
-class A(PlutusData):
-    CONSTR_ID = 1
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: List[int]
-    bar: List[A]
-
-def validator(x: B) -> None:
-    check_integrity(x)
-"""
-    obj = uplc.PlutusConstr(
-        1,
-        [
-            uplc.PlutusList(
-                [
-                    (
-                        uplc.PlutusInteger(x)
-                        if isinstance(x, int)
-                        else uplc.PlutusByteString(x)
-                    )
-                    for x in foobar
-                ]
-            ),
-            uplc.PlutusList([uplc.PlutusConstr(c, []) for c in bar_constrs]),
-        ],
-    )
-    try:
-        eval_uplc(source_code, obj)
-    except:
-        res = False
-    else:
-        res = True
-    assert res == (
-        all(isinstance(x, int) for x in foobar) and all(c == 1 for c in bar_constrs)
-    )
-
-
-@parameterized.expand(
-    [
-        [[0, 1, 2], [1, 1, 1]],
-        # check for incorrect type in keys
-        [[b"hello", 1], [1, 1]],
-        # check for incorrect type in values
-        [[1, 2], [1, b"hello"]],
-    ]
-)
-def test_integrity_check_dict(keys, values):
-    source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from opshin.std.integrity import check_integrity
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: Dict[int, int]
-
-def validator(x: B) -> None:
-    check_integrity(x)
-"""
-    obj = uplc.PlutusConstr(
-        1,
-        [
-            uplc.PlutusMap(
-                {
-                    (
-                        uplc.PlutusInteger(x)
-                        if isinstance(x, int)
-                        else uplc.PlutusByteString(x)
-                    ): (
-                        uplc.PlutusInteger(y)
-                        if isinstance(y, int)
-                        else uplc.PlutusByteString(y)
-                    )
-                    for x, y in zip(keys, values)
-                },
-            ),
-        ],
-    )
-    try:
-        eval_uplc(source_code, obj)
-    except:
-        res = False
-    else:
-        res = True
-    assert res == (
-        all(isinstance(x, int) for x in keys + values) and len(set(keys)) == len(keys)
-    )
-
-
-def test_integrity_check_rename():
-    source_code = """
-from dataclasses import dataclass
-from typing import Dict, List, Union
-from pycardano import Datum as Anything, PlutusData
-from opshin.std.integrity import check_integrity as integ
-
-@dataclass()
-class B(PlutusData):
-    CONSTR_ID = 1
-    foobar: int
-
-def validator(x: B) -> None:
-    integ(x)
-"""
-    obj = uplc.PlutusConstr(
-        1,
-        [uplc.PlutusInteger(1)],
-    )
-    eval_uplc(source_code, obj)
-
-
-# TODO implement better way to check for uniqueness test in dict keys
-
-
-
-
-
-
-
-

Functions

-
-
-def test_integrity_check_0(*a, **kw) -
-
-
-
-
-def test_integrity_check_1(*a, **kw) -
-
-
-
-
-def test_integrity_check_2(*a, **kw) -
-
-
-
-
-def test_integrity_check_3(*a, **kw) -
-
-
-
-
-def test_integrity_check_dict_0(*a, **kw) -
-
-
-
-
-def test_integrity_check_dict_1(*a, **kw) -
-
-
-
-
-def test_integrity_check_dict_2(*a, **kw) -
-
-
-
-
-def test_integrity_check_list_0(*a, **kw) -
-
-
-
-
-def test_integrity_check_list_1(*a, **kw) -
-
-
-
-
-def test_integrity_check_list_2(*a, **kw) -
-
-
-
-
-def test_integrity_check_rename() -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_std/test_math.html b/docs/opshin/tests/test_std/test_math.html deleted file mode 100644 index 12895c98..00000000 --- a/docs/opshin/tests/test_std/test_math.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - - -opshin.tests.test_std.test_math API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_std.test_math

-
-
-
- -Expand source code - -
import fractions
-
-import hypothesis
-import hypothesis.strategies as hst
-
-from opshin.std import math as oc_math
-
-import math
-
-pos_int = hst.integers(min_value=0)
-
-
-@hypothesis.given(pos_int, pos_int)
-def test_gcd(a: int, b: int):
-    assert oc_math.gcd(a, b) == math.gcd(a, b), "Invalid gcd"
-
-
-@hypothesis.given(hst.integers())
-def test_sign(a: int):
-    assert oc_math.sign(a) == math.copysign(1, a), "Invalid sign"
-
-
-@hypothesis.given(hst.binary())
-def test_unsigned_int_from_bytes_big(b: bytes):
-    assert oc_math.unsigned_int_from_bytes_big(b) == int.from_bytes(
-        b, byteorder="big", signed=False
-    ), "Invalid from bytes"
-
-
-@hypothesis.given(hst.integers())
-@hypothesis.example(1000)
-def test_bytes_big_from_unsigned_int(b: int):
-    try:
-        res = oc_math.bytes_big_from_unsigned_int(b)
-    except AssertionError:
-        res = None
-    try:
-        exp = b.to_bytes(
-            max(1, (b.bit_length() + 7) // 8), byteorder="big", signed=False
-        )
-    except OverflowError:
-        exp = None
-    assert res == exp, "Invalid to bytes"
-
-
-@hypothesis.given(hst.integers(), hst.integers())
-def test_ceil(a: int, b: int):
-    hypothesis.assume(b != 0)
-    assert oc_math.ceil(a, b) == math.ceil(fractions.Fraction(a, b)), "Invalid ceil"
-
-
-@hypothesis.given(hst.integers(), hst.integers())
-def test_floor(a: int, b: int):
-    hypothesis.assume(b != 0)
-    assert oc_math.floor(a, b) == math.floor(fractions.Fraction(a, b)), "Invalid floor"
-
-
-
-
-
-
-
-

Functions

-
-
-def test_bytes_big_from_unsigned_int() ‑> None -
-
-
-
-
-def test_ceil() ‑> None -
-
-
-
-
-def test_floor() ‑> None -
-
-
-
-
-def test_gcd() ‑> None -
-
-
-
-
-def test_sign() ‑> None -
-
-
-
-
-def test_unsigned_int_from_bytes_big() ‑> None -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_stdlib.html b/docs/opshin/tests/test_stdlib.html deleted file mode 100644 index 12fb2423..00000000 --- a/docs/opshin/tests/test_stdlib.html +++ /dev/null @@ -1,829 +0,0 @@ - - - - - - - - -opshin.tests.test_stdlib API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_stdlib

-
-
-
- -Expand source code - -
from dataclasses import dataclass
-import unittest
-
-from hypothesis import example, given, settings
-from hypothesis import strategies as st
-from uplc import ast as uplc, eval as uplc_eval
-from pycardano import PlutusData
-
-from . import PLUTUS_VM_PROFILE
-from .utils import eval_uplc, eval_uplc_value, Unit
-from .. import compiler, builder
-
-settings.load_profile(PLUTUS_VM_PROFILE)
-
-
-class StdlibTest(unittest.TestCase):
-    @given(st.data())
-    def test_dict_get(self, data):
-        source_code = """
-def validator(x: Dict[int, bytes], y: int, z: bytes) -> bytes:
-    return x.get(y, z)
-            """
-        x = data.draw(st.dictionaries(st.integers(), st.binary()))
-        y = data.draw(st.one_of(st.sampled_from(sorted(x.keys()) + [0]), st.integers()))
-        z = data.draw(st.binary())
-        # UPLC lambdas may only take one argument at a time, so we evaluate by repeatedly applying
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, x.get(y, z), "dict.get returned wrong value")
-
-    @given(st.data())
-    def test_dict_subscript(self, data):
-        source_code = """
-def validator(x: Dict[int, bytes], y: int) -> bytes:
-    return x[y]
-            """
-        x = data.draw(st.dictionaries(st.integers(), st.binary()))
-        y = data.draw(st.one_of(st.sampled_from(sorted(x.keys()) + [0]), st.integers()))
-        # UPLC lambdas may only take one argument at a time, so we evaluate by repeatedly applying
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except RuntimeError:
-            ret = None
-        try:
-            exp = x[y]
-        except KeyError:
-            exp = None
-        self.assertEqual(ret, exp, "dict[] returned wrong value")
-
-    @given(st.data())
-    def test_list_index(self, data):
-        source_code = """
-def validator(x: List[int], z: int) -> int:
-    return x.index(z)
-            """
-        xs = data.draw(st.lists(st.integers()))
-        z = data.draw(
-            st.one_of(st.sampled_from(xs), st.integers())
-            if len(xs) > 0
-            else st.integers()
-        )
-        try:
-            ret = eval_uplc_value(source_code, xs, z)
-        except RuntimeError as e:
-            ret = None
-        try:
-            exp = xs.index(z)
-        except ValueError:
-            exp = None
-        self.assertEqual(ret, exp, "list.index returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_dict_keys(self, xs):
-        source_code = """
-def validator(x: Dict[int, bytes]) -> List[int]:
-    return x.keys()
-            """
-        ret = eval_uplc(source_code, xs)
-        ret = [x.value for x in ret.value]
-        self.assertEqual(ret, list(xs.keys()), "dict.keys returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_dict_values(self, xs):
-        source_code = """
-def validator(x: Dict[int, bytes]) -> List[bytes]:
-    return x.values()
-            """
-        ret = eval_uplc(source_code, xs)
-        ret = [x.value for x in ret.value]
-        self.assertEqual(ret, list(xs.values()), "dict.keys returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_dict_items_keys_sum(self, xs):
-        source_code = """
-def validator(xs: Dict[int, bytes]) -> int:
-    sum_keys = 0
-    for x in xs.items():
-        sum_keys += x[0]
-    return sum_keys
-"""
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, sum(xs.keys()), "dict.items returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_dict_items_values_sum(self, xs):
-        source_code = """
-def validator(xs: Dict[int, bytes]) -> bytes:
-    sum_values = b""
-    for x in xs.items():
-        sum_values += x[1]
-    return sum_values
-"""
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, b"".join(xs.values()), "dict.items returned wrong value")
-
-    @given(xs=st.text())
-    def test_str_encode(self, xs):
-        source_code = """
-def validator(x: str) -> bytes:
-    return x.encode()
-            """
-        ret = eval_uplc_value(source_code, xs.encode("utf8"))
-        self.assertEqual(ret, xs.encode(), "str.encode returned wrong value")
-
-    @given(xs=st.binary())
-    def test_bytes_decode(self, xs):
-        source_code = """
-def validator(x: bytes) -> str:
-    return x.decode()
-            """
-        try:
-            exp = xs.decode()
-        except UnicodeDecodeError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs).decode()
-        except UnicodeDecodeError:
-            ret = None
-        self.assertEqual(ret, exp, "bytes.decode returned wrong value")
-
-    @given(xs=st.binary())
-    def test_bytes_hex(self, xs):
-        source_code = """
-def validator(x: bytes) -> str:
-    return x.hex()
-            """
-        ret = eval_uplc_value(source_code, xs).decode()
-        self.assertEqual(ret, xs.hex(), "bytes.hex returned wrong value")
-
-    @given(xs=st.binary())
-    @example(b"dc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2")
-    def test_constant_bytestring(self, xs):
-        source_code = f"""
-def validator(x: None) -> bytes:
-    return {repr(xs)}
-            """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, xs, "literal bytes returned wrong value")
-
-    @given(xs=st.integers())
-    def test_constant_integer(self, xs):
-        source_code = f"""
-def validator(x: None) -> int:
-    return {repr(xs)}
-            """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, xs, "literal integer returned wrong value")
-
-    @given(xs=st.text())
-    def test_constant_string(self, xs):
-        source_code = f"""
-def validator(x: None) -> str:
-    return {repr(xs)}
-            """
-        ret = eval_uplc_value(source_code, Unit()).decode()
-        self.assertEqual(ret, xs, "literal string returned wrong value")
-
-    def test_constant_unit(self):
-        source_code = f"""
-def validator(x: None) -> None:
-    return None
-            """
-        ret = eval_uplc(source_code, Unit())
-        self.assertEqual(
-            ret, uplc.PlutusConstr(0, []), "literal None returned wrong value"
-        )
-
-    @given(st.booleans())
-    def test_constant_bool(self, x: bool):
-        source_code = f"""
-def validator(x: None) -> bool:
-    return {repr(x)}
-            """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(bool(ret), x, "literal bool returned wrong value")
-
-    @given(st.integers(), st.binary())
-    def test_plutusdata_to_cbor(self, x: int, y: bytes):
-        source_code = f"""
-from opshin.prelude import *
-
-@dataclass
-class Test(PlutusData):
-    CONSTR_ID = 0
-    x: int
-    y: bytes
-
-def validator(x: int, y: bytes) -> bytes:
-    return Test(x, y).to_cbor()
-            """
-
-        @dataclass
-        class Test(PlutusData):
-            CONSTR_ID = 0
-            x: int
-            y: bytes
-
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, Test(x, y).to_cbor(), "to_cbor returned wrong value")
-
-    @given(st.integers(), st.booleans())
-    def test_union_to_cbor(self, x: int, z: bool):
-        source_code = f"""
-from opshin.prelude import *
-
-@dataclass
-class Test(PlutusData):
-    CONSTR_ID = 1
-    x: int
-    y: bytes
-
-@dataclass
-class Test2(PlutusData):
-    CONSTR_ID = 0
-    x: int
-
-def validator(x: int, z: bool) -> bytes:
-    y: Union[Test, Test2] = Test2(x) if z else Test(x, b'')
-    return y.to_cbor()
-        """
-
-        @dataclass
-        class Test(PlutusData):
-            CONSTR_ID = 1
-            x: int
-            y: bytes
-
-        @dataclass
-        class Test2(PlutusData):
-            CONSTR_ID = 0
-            x: int
-
-        ret = eval_uplc_value(source_code, x, z)
-        self.assertEqual(
-            ret,
-            Test2(x).to_cbor() if z else Test(x, b"").to_cbor(),
-            "to_cbor returned wrong value",
-        )
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class StdlibTest -(methodName='runTest') -
-
-

A class whose instances are single test cases.

-

By default, the test code itself should be placed in a method named -'runTest'.

-

If the fixture may be used for many test cases, create as -many test methods as are needed. When instantiating such a TestCase -subclass, specify in the constructor arguments the name of the test method -that the instance is to execute.

-

Test authors should subclass TestCase for their own tests. Construction -and deconstruction of the test's environment ('fixture') can be -implemented by overriding the 'setUp' and 'tearDown' methods respectively.

-

If it is necessary to override the init method, the base class -init method must always be called. It is important that subclasses -should not change the signature of their init method, since instances -of the classes are instantiated automatically by parts of the framework -in order to be run.

-

When subclassing TestCase, you can set these attributes: -* failureException: determines which exception will be raised when -the instance's assertion methods fail; test methods raising this -exception will be deemed to have 'failed' rather than 'errored'. -* longMessage: determines whether long messages (including repr of -objects used in assert methods) will be printed on failure in addition -to any explicit message passed. -* maxDiff: sets the maximum length of a diff in failure messages -by assert methods using difflib. It is looked up as an instance -attribute so can be configured by individual tests if required.

-

Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

-
- -Expand source code - -
class StdlibTest(unittest.TestCase):
-    @given(st.data())
-    def test_dict_get(self, data):
-        source_code = """
-def validator(x: Dict[int, bytes], y: int, z: bytes) -> bytes:
-    return x.get(y, z)
-            """
-        x = data.draw(st.dictionaries(st.integers(), st.binary()))
-        y = data.draw(st.one_of(st.sampled_from(sorted(x.keys()) + [0]), st.integers()))
-        z = data.draw(st.binary())
-        # UPLC lambdas may only take one argument at a time, so we evaluate by repeatedly applying
-        ret = eval_uplc_value(source_code, x, y, z)
-        self.assertEqual(ret, x.get(y, z), "dict.get returned wrong value")
-
-    @given(st.data())
-    def test_dict_subscript(self, data):
-        source_code = """
-def validator(x: Dict[int, bytes], y: int) -> bytes:
-    return x[y]
-            """
-        x = data.draw(st.dictionaries(st.integers(), st.binary()))
-        y = data.draw(st.one_of(st.sampled_from(sorted(x.keys()) + [0]), st.integers()))
-        # UPLC lambdas may only take one argument at a time, so we evaluate by repeatedly applying
-        try:
-            ret = eval_uplc_value(source_code, x, y)
-        except RuntimeError:
-            ret = None
-        try:
-            exp = x[y]
-        except KeyError:
-            exp = None
-        self.assertEqual(ret, exp, "dict[] returned wrong value")
-
-    @given(st.data())
-    def test_list_index(self, data):
-        source_code = """
-def validator(x: List[int], z: int) -> int:
-    return x.index(z)
-            """
-        xs = data.draw(st.lists(st.integers()))
-        z = data.draw(
-            st.one_of(st.sampled_from(xs), st.integers())
-            if len(xs) > 0
-            else st.integers()
-        )
-        try:
-            ret = eval_uplc_value(source_code, xs, z)
-        except RuntimeError as e:
-            ret = None
-        try:
-            exp = xs.index(z)
-        except ValueError:
-            exp = None
-        self.assertEqual(ret, exp, "list.index returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_dict_keys(self, xs):
-        source_code = """
-def validator(x: Dict[int, bytes]) -> List[int]:
-    return x.keys()
-            """
-        ret = eval_uplc(source_code, xs)
-        ret = [x.value for x in ret.value]
-        self.assertEqual(ret, list(xs.keys()), "dict.keys returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_dict_values(self, xs):
-        source_code = """
-def validator(x: Dict[int, bytes]) -> List[bytes]:
-    return x.values()
-            """
-        ret = eval_uplc(source_code, xs)
-        ret = [x.value for x in ret.value]
-        self.assertEqual(ret, list(xs.values()), "dict.keys returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_dict_items_keys_sum(self, xs):
-        source_code = """
-def validator(xs: Dict[int, bytes]) -> int:
-    sum_keys = 0
-    for x in xs.items():
-        sum_keys += x[0]
-    return sum_keys
-"""
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, sum(xs.keys()), "dict.items returned wrong value")
-
-    @given(xs=st.dictionaries(st.integers(), st.binary()))
-    def test_dict_items_values_sum(self, xs):
-        source_code = """
-def validator(xs: Dict[int, bytes]) -> bytes:
-    sum_values = b""
-    for x in xs.items():
-        sum_values += x[1]
-    return sum_values
-"""
-        ret = eval_uplc_value(source_code, xs)
-        self.assertEqual(ret, b"".join(xs.values()), "dict.items returned wrong value")
-
-    @given(xs=st.text())
-    def test_str_encode(self, xs):
-        source_code = """
-def validator(x: str) -> bytes:
-    return x.encode()
-            """
-        ret = eval_uplc_value(source_code, xs.encode("utf8"))
-        self.assertEqual(ret, xs.encode(), "str.encode returned wrong value")
-
-    @given(xs=st.binary())
-    def test_bytes_decode(self, xs):
-        source_code = """
-def validator(x: bytes) -> str:
-    return x.decode()
-            """
-        try:
-            exp = xs.decode()
-        except UnicodeDecodeError:
-            exp = None
-        try:
-            ret = eval_uplc_value(source_code, xs).decode()
-        except UnicodeDecodeError:
-            ret = None
-        self.assertEqual(ret, exp, "bytes.decode returned wrong value")
-
-    @given(xs=st.binary())
-    def test_bytes_hex(self, xs):
-        source_code = """
-def validator(x: bytes) -> str:
-    return x.hex()
-            """
-        ret = eval_uplc_value(source_code, xs).decode()
-        self.assertEqual(ret, xs.hex(), "bytes.hex returned wrong value")
-
-    @given(xs=st.binary())
-    @example(b"dc315c289fee4484eda07038393f21dc4e572aff292d7926018725c2")
-    def test_constant_bytestring(self, xs):
-        source_code = f"""
-def validator(x: None) -> bytes:
-    return {repr(xs)}
-            """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, xs, "literal bytes returned wrong value")
-
-    @given(xs=st.integers())
-    def test_constant_integer(self, xs):
-        source_code = f"""
-def validator(x: None) -> int:
-    return {repr(xs)}
-            """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(ret, xs, "literal integer returned wrong value")
-
-    @given(xs=st.text())
-    def test_constant_string(self, xs):
-        source_code = f"""
-def validator(x: None) -> str:
-    return {repr(xs)}
-            """
-        ret = eval_uplc_value(source_code, Unit()).decode()
-        self.assertEqual(ret, xs, "literal string returned wrong value")
-
-    def test_constant_unit(self):
-        source_code = f"""
-def validator(x: None) -> None:
-    return None
-            """
-        ret = eval_uplc(source_code, Unit())
-        self.assertEqual(
-            ret, uplc.PlutusConstr(0, []), "literal None returned wrong value"
-        )
-
-    @given(st.booleans())
-    def test_constant_bool(self, x: bool):
-        source_code = f"""
-def validator(x: None) -> bool:
-    return {repr(x)}
-            """
-        ret = eval_uplc_value(source_code, Unit())
-        self.assertEqual(bool(ret), x, "literal bool returned wrong value")
-
-    @given(st.integers(), st.binary())
-    def test_plutusdata_to_cbor(self, x: int, y: bytes):
-        source_code = f"""
-from opshin.prelude import *
-
-@dataclass
-class Test(PlutusData):
-    CONSTR_ID = 0
-    x: int
-    y: bytes
-
-def validator(x: int, y: bytes) -> bytes:
-    return Test(x, y).to_cbor()
-            """
-
-        @dataclass
-        class Test(PlutusData):
-            CONSTR_ID = 0
-            x: int
-            y: bytes
-
-        ret = eval_uplc_value(source_code, x, y)
-        self.assertEqual(ret, Test(x, y).to_cbor(), "to_cbor returned wrong value")
-
-    @given(st.integers(), st.booleans())
-    def test_union_to_cbor(self, x: int, z: bool):
-        source_code = f"""
-from opshin.prelude import *
-
-@dataclass
-class Test(PlutusData):
-    CONSTR_ID = 1
-    x: int
-    y: bytes
-
-@dataclass
-class Test2(PlutusData):
-    CONSTR_ID = 0
-    x: int
-
-def validator(x: int, z: bool) -> bytes:
-    y: Union[Test, Test2] = Test2(x) if z else Test(x, b'')
-    return y.to_cbor()
-        """
-
-        @dataclass
-        class Test(PlutusData):
-            CONSTR_ID = 1
-            x: int
-            y: bytes
-
-        @dataclass
-        class Test2(PlutusData):
-            CONSTR_ID = 0
-            x: int
-
-        ret = eval_uplc_value(source_code, x, z)
-        self.assertEqual(
-            ret,
-            Test2(x).to_cbor() if z else Test(x, b"").to_cbor(),
-            "to_cbor returned wrong value",
-        )
-
-

Ancestors

-
    -
  • unittest.case.TestCase
  • -
-

Methods

-
-
-def test_bytes_decode(self) ‑> None -
-
-
-
-
-def test_bytes_hex(self) ‑> None -
-
-
-
-
-def test_constant_bool(self) ‑> None -
-
-
-
-
-def test_constant_bytestring(self) ‑> None -
-
-
-
-
-def test_constant_integer(self) ‑> None -
-
-
-
-
-def test_constant_string(self) ‑> None -
-
-
-
-
-def test_constant_unit(self) -
-
-
-
-
-def test_dict_get(self) ‑> None -
-
-
-
-
-def test_dict_items_keys_sum(self) ‑> None -
-
-
-
-
-def test_dict_items_values_sum(self) ‑> None -
-
-
-
-
-def test_dict_keys(self) ‑> None -
-
-
-
-
-def test_dict_subscript(self) ‑> None -
-
-
-
-
-def test_dict_values(self) ‑> None -
-
-
-
-
-def test_list_index(self) ‑> None -
-
-
-
-
-def test_plutusdata_to_cbor(self) ‑> None -
-
-
-
-
-def test_str_encode(self) ‑> None -
-
-
-
-
-def test_union_to_cbor(self) ‑> None -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/test_types.html b/docs/opshin/tests/test_types.html deleted file mode 100644 index 627f6b6b..00000000 --- a/docs/opshin/tests/test_types.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - -opshin.tests.test_types API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.test_types

-
-
-
- -Expand source code - -
from ..type_impls import *
-
-
-def test_record_type_order():
-    A = RecordType(Record("A", "A", 0, [("foo", IntegerInstanceType)]))
-    B = RecordType(Record("B", "B", 1, [("bar", IntegerInstanceType)]))
-    C = RecordType(Record("C", "C", 2, [("baz", IntegerInstanceType)]))
-    a = A
-    b = B
-    c = C
-
-    assert a >= a
-    assert not a >= b
-    assert not b >= a
-    assert not a >= c
-    assert not c >= a
-    assert not b >= c
-    assert not c >= b
-
-    A = RecordType(Record("A", "A", 0, [("foo", IntegerInstanceType)]))
-    B = RecordType(
-        Record(
-            "B", "B", 0, [("foo", IntegerInstanceType), ("bar", IntegerInstanceType)]
-        )
-    )
-    C = RecordType(Record("C", "C", 0, [("foo", InstanceType(AnyType()))]))
-    assert not A >= B
-    assert not C >= B
-    assert C >= A
-
-
-def test_union_type_order():
-    A = RecordType(Record("A", "A", 0, [("foo", IntegerInstanceType)]))
-    B = RecordType(Record("B", "B", 1, [("bar", IntegerInstanceType)]))
-    C = RecordType(Record("C", "C", 2, [("baz", IntegerInstanceType)]))
-    abc = UnionType([A, B, C])
-    ab = UnionType([A, B])
-    a = A
-    c = C
-
-    assert a >= a
-    assert ab >= a
-    assert not a >= ab
-    assert abc >= ab
-    assert not ab >= abc
-    assert not c >= a
-    assert not a >= c
-    assert abc >= c
-    assert not ab >= c
-
-
-
-
-
-
-
-

Functions

-
-
-def test_record_type_order() -
-
-
-
-
-def test_union_type_order() -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/tests/utils.html b/docs/opshin/tests/utils.html deleted file mode 100644 index 2550d99d..00000000 --- a/docs/opshin/tests/utils.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - - -opshin.tests.utils API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.tests.utils

-
-
-
- -Expand source code - -
import dataclasses
-import functools
-import typing
-
-import pycardano
-import uplc.ast as uplc_ast
-from pycardano import PlutusData
-from uplc import eval as uplc_eval
-
-from .. import DEFAULT_CONFIG
-from ..builder import _compile
-
-
-@dataclasses.dataclass
-class Unit(PlutusData):
-    CONSTR_ID = 0
-
-
-def eval_uplc(
-    source_code: str,
-    *args: typing.Union[pycardano.Datum, uplc_ast.Constant],
-    contract_file: str = "<unknown>",
-    validator_function_name="validator",
-    config=DEFAULT_CONFIG,
-):
-    code = _compile(
-        source_code,
-        *args,
-        contract_file=contract_file,
-        validator_function_name=validator_function_name,
-        config=config,
-    )
-    ret = uplc_eval(code).result
-    if isinstance(ret, Exception):
-        raise ret
-    return ret
-
-
-def eval_uplc_value(
-    source_code: str,
-    *args: typing.Union[pycardano.Datum, uplc_ast.Constant],
-    contract_file: str = "<unknown>",
-    validator_function_name="validator",
-    config=DEFAULT_CONFIG,
-):
-    return eval_uplc(
-        source_code,
-        *args,
-        contract_file=contract_file,
-        validator_function_name=validator_function_name,
-        config=config,
-    ).value
-
-
-
-
-
-
-
-

Functions

-
-
-def eval_uplc(source_code: str, *args: Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData, uplc.ast.Constant], contract_file: str = '<unknown>', validator_function_name='validator', config=CompilationConfig(compress_patterns=True, iterative_unfold_patterns=False, constant_index_access_list=True, constant_folding=False, allow_isinstance_anything=False, force_three_params=False, remove_dead_code=True)) -
-
-
-
-
-def eval_uplc_value(source_code: str, *args: Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData, uplc.ast.Constant], contract_file: str = '<unknown>', validator_function_name='validator', config=CompilationConfig(compress_patterns=True, iterative_unfold_patterns=False, constant_index_access_list=True, constant_folding=False, allow_isinstance_anything=False, force_three_params=False, remove_dead_code=True)) -
-
-
-
-
-
-
-

Classes

-
-
-class Unit -
-
-

Unit()

-
- -Expand source code - -
@dataclasses.dataclass
-class Unit(PlutusData):
-    CONSTR_ID = 0
-
-

Ancestors

-
    -
  • pycardano.plutus.PlutusData
  • -
  • pycardano.serialization.ArrayCBORSerializable
  • -
  • pycardano.serialization.CBORSerializable
  • -
-

Class variables

-
-
var CONSTR_ID
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/type_impls.html b/docs/opshin/type_impls.html deleted file mode 100644 index a9dcae4f..00000000 --- a/docs/opshin/type_impls.html +++ /dev/null @@ -1,9142 +0,0 @@ - - - - - - - - -opshin.type_impls API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.type_impls

-
-
-
- -Expand source code - -
import dataclasses
-from typing import Callable
-
-import logging
-from ast import *
-
-import itertools
-from ordered_set import OrderedSet
-
-import uplc.ast
-
-from .util import *
-
-
-class TypeInferenceError(AssertionError):
-    pass
-
-
-class Type:
-    def __new__(meta, *args, **kwargs):
-        klass = super().__new__(meta)
-
-        for key in ["constr", "attribute", "cmp", "stringify", "copy_only_attributes"]:
-            value = getattr(klass, key)
-            wrapped = patternize(value)
-            object.__setattr__(klass, key, wrapped)
-
-        return klass
-
-    def constr_type(self) -> "InstanceType":
-        """The type of the constructor for this class"""
-        raise TypeInferenceError(
-            f"Object of type {self.__class__} does not have a constructor"
-        )
-
-    def constr(self) -> plt.AST:
-        """The constructor for this class"""
-        raise NotImplementedError(
-            f"Constructor of {type(self).__name__} not implemented"
-        )
-
-    def attribute_type(self, attr) -> "Type":
-        """The types of the named attributes of this class"""
-        raise TypeInferenceError(
-            f"Object of type {type(self).__name__} does not have attribute {attr}"
-        )
-
-    def attribute(self, attr) -> plt.AST:
-        """The attributes of this class. Needs to be a lambda that expects as first argument the object itself"""
-        raise NotImplementedError(f"Attribute {attr} not implemented for type {self}")
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        raise NotImplementedError(
-            f"Comparison {type(op).__name__} for {self.__class__.__name__} and {o.__class__.__name__} is not implemented. This is likely intended because it would always evaluate to False."
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        """
-        Returns a stringified version of the object
-
-        The recursive parameter informs the method whether it was invoked recursively from another invokation
-        """
-        raise NotImplementedError(f"{type(self).__name__} can not be stringified")
-
-    def copy_only_attributes(self) -> plt.AST:
-        """
-        Pluthon function that returns a copy of only the attributes of the object
-        """
-        raise NotImplementedError(f"{type(self).__name__} can not be copied")
-
-    def binop_type(self, binop: operator, other: "Type") -> "Type":
-        """
-        Type of a binary operation between self and other.
-        """
-        return FunctionType(
-            [InstanceType(self), InstanceType(other)],
-            InstanceType(self._binop_return_type(binop, other)),
-        )
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        """
-        Return the type of a binary operation between self and other
-        """
-        raise NotImplementedError(
-            f"{type(self).__name__} does not implement {binop.__class__.__name__}"
-        )
-
-    def binop(self, binop: operator, other: AST) -> plt.AST:
-        """
-        Implements a binary operation between self and other
-        """
-        return OLambda(
-            ["self", "other"],
-            self._binop_bin_fun(binop, other)(OVar("self"), OVar("other")),
-        )
-
-    def _binop_bin_fun(
-        self, binop: operator, other: AST
-    ) -> Callable[[plt.AST, plt.AST], plt.AST]:
-        """
-        Returns a binary function that implements the binary operation between self and other.
-        """
-        raise NotImplementedError(
-            f"{type(self).__name__} can not be used with operation {binop.__class__.__name__}"
-        )
-
-    def unop_type(self, unop: unaryop) -> "Type":
-        """
-        Type of a unary operation on self.
-        """
-        return FunctionType(
-            [InstanceType(self)],
-            InstanceType(self._unop_return_type(unop)),
-        )
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        """
-        Return the type of a binary operation between self and other
-        """
-        raise NotImplementedError(
-            f"{type(self).__name__} does not implement {unop.__class__.__name__}"
-        )
-
-    def unop(self, unop: unaryop) -> plt.AST:
-        """
-        Implements a unary operation on self
-        """
-        return OLambda(
-            ["self"],
-            self._unop_fun(unop)(OVar("self")),
-        )
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        """
-        Returns a unary function that implements the unary operation on self.
-        """
-        raise NotImplementedError(
-            f"{type(self).__name__} can not be used with operation {unop.__class__.__name__}"
-        )
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        """
-        Returns a map from the constructor id to a descriptive typestring
-        """
-        raise NotImplementedError(f"Type {type(self).__name__} does not have a id map")
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class Record:
-    name: str
-    orig_name: str
-    constructor: int
-    fields: typing.Union[typing.List[typing.Tuple[str, Type]], frozenlist]
-
-    def __post_init__(self):
-        object.__setattr__(self, "fields", frozenlist(self.fields))
-
-    def __ge__(self, other):
-        if not isinstance(other, Record):
-            return False
-        return (
-            self.constructor == other.constructor
-            and len(self.fields) == len(other.fields)
-            and all(a >= b for a, b in zip(self.fields, other.fields))
-        )
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class ClassType(Type):
-    def __ge__(self, other):
-        """
-        Returns whether other can be substituted for this type.
-        In other words this returns whether the interface of this type is a subset of the interface of other.
-        Note that this is usually <= and not >=, but this needs to be fixed later.
-        Produces a partial order on types.
-        The top element is the most generic type and can not substitute for anything.
-        The bottom element is the most specific type and can be substituted for anything.
-        """
-        raise NotImplementedError("Comparison between raw classtypes impossible")
-
-    def copy_only_attributes(self) -> plt.AST:
-        """
-        Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too).
-        For anything but record types and union types, this is the identity function.
-        """
-        return OLambda(["self"], OVar("self"))
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class AnyType(ClassType):
-    """The top element in the partial order on types (excluding FunctionTypes, which do not compare to anything)"""
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "any"
-
-    def attribute_type(self, attr: str) -> Type:
-        """The types of the named attributes of this class"""
-        if attr == "CONSTR_ID":
-            return IntegerInstanceType
-        return super().attribute_type(attr)
-
-    def attribute(self, attr: str) -> plt.AST:
-        """The attributes of this class. Need to be a lambda that expects as first argument the object itself"""
-        if attr == "CONSTR_ID":
-            # access to constructor
-            return OLambda(
-                ["self"],
-                plt.Constructor(OVar("self")),
-            )
-        return super().attribute(attr)
-
-    def __ge__(self, other):
-        return (
-            isinstance(other, ClassType)
-            and not isinstance(other, FunctionType)
-            and not isinstance(other, PolymorphicFunctionType)
-        )
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        # this will reject comparisons that will always be false - most likely due to faults during programming
-        if (
-            (isinstance(o, RecordType))
-            or isinstance(o, UnionType)
-            or isinstance(o, AnyType)
-        ):
-            # Note that comparison with Record and UnionType is actually fine because both are Data
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsData)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                            OVar("y"),
-                        )
-                    ),
-                )
-        if (
-            isinstance(o, ListType)
-            and isinstance(o.typ, InstanceType)
-            and (o.typ.typ >= self or self >= o.typ.typ)
-        ):
-            if isinstance(op, In):
-                return OLambda(
-                    ["x", "y"],
-                    plt.AnyList(
-                        OVar("y"),
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                        ),
-                    ),
-                )
-            if isinstance(op, NotIn):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("y"),
-                            plt.Apply(
-                                plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                                OVar("x"),
-                            ),
-                        ),
-                    ),
-                )
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        OPSHIN_LOGGER.warning(
-            "Serializing AnyType will result in RawPlutusData (CBOR representation) to be printed without additional type information. Annotate types where possible to avoid this warning."
-        )
-        return OLambda(
-            ["self"],
-            OLet(
-                [
-                    (
-                        "joinMapList",
-                        OLambda(
-                            ["m", "l", "start", "end"],
-                            OLet(
-                                [
-                                    (
-                                        "g",
-                                        plt.RecFun(
-                                            OLambda(
-                                                ["f", "l"],
-                                                plt.AppendString(
-                                                    plt.Apply(
-                                                        OVar("m"),
-                                                        plt.HeadList(OVar("l")),
-                                                    ),
-                                                    OLet(
-                                                        [
-                                                            (
-                                                                "t",
-                                                                plt.TailList(OVar("l")),
-                                                            )
-                                                        ],
-                                                        plt.IteNullList(
-                                                            OVar("t"),
-                                                            OVar("end"),
-                                                            plt.AppendString(
-                                                                plt.Text(", "),
-                                                                plt.Apply(
-                                                                    OVar("f"),
-                                                                    OVar("f"),
-                                                                    OVar("t"),
-                                                                ),
-                                                            ),
-                                                        ),
-                                                    ),
-                                                ),
-                                            )
-                                        ),
-                                    )
-                                ],
-                                plt.AppendString(
-                                    OVar("start"),
-                                    plt.IteNullList(
-                                        OVar("l"),
-                                        OVar("end"),
-                                        plt.Apply(
-                                            OVar("g"),
-                                            OVar("l"),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                    ),
-                    (
-                        "stringifyPlutusData",
-                        plt.RecFun(
-                            OLambda(
-                                ["f", "d"],
-                                plt.DelayedChooseData(
-                                    OVar("d"),
-                                    OLet(
-                                        [
-                                            (
-                                                "constructor",
-                                                plt.FstPair(
-                                                    plt.UnConstrData(OVar("d"))
-                                                ),
-                                            )
-                                        ],
-                                        plt.Ite(
-                                            plt.LessThanInteger(
-                                                OVar("constructor"),
-                                                plt.Integer(128),
-                                            ),
-                                            plt.ConcatString(
-                                                plt.Text("CBORTag("),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.IData(
-                                                        plt.AddInteger(
-                                                            OVar("constructor"),
-                                                            plt.Ite(
-                                                                plt.LessThanInteger(
-                                                                    OVar("constructor"),
-                                                                    plt.Integer(7),
-                                                                ),
-                                                                plt.Integer(121),
-                                                                plt.Integer(1280 - 7),
-                                                            ),
-                                                        )
-                                                    ),
-                                                ),
-                                                plt.Text(", "),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.ListData(
-                                                        plt.SndPair(
-                                                            plt.UnConstrData(OVar("d"))
-                                                        )
-                                                    ),
-                                                ),
-                                                plt.Text(")"),
-                                            ),
-                                            plt.ConcatString(
-                                                plt.Text("CBORTag(102, "),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.ListData(
-                                                        plt.MkCons(
-                                                            plt.IData(
-                                                                OVar("constructor")
-                                                            ),
-                                                            plt.MkCons(
-                                                                plt.ListData(
-                                                                    plt.SndPair(
-                                                                        plt.UnConstrData(
-                                                                            OVar("d")
-                                                                        )
-                                                                    )
-                                                                ),
-                                                                plt.EmptyDataList(),
-                                                            ),
-                                                        )
-                                                    ),
-                                                ),
-                                                plt.Text(")"),
-                                            ),
-                                        ),
-                                    ),
-                                    plt.Apply(
-                                        OVar("joinMapList"),
-                                        OLambda(
-                                            ["x"],
-                                            plt.ConcatString(
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.FstPair(OVar("x")),
-                                                ),
-                                                plt.Text(": "),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.SndPair(OVar("x")),
-                                                ),
-                                            ),
-                                        ),
-                                        plt.UnMapData(OVar("d")),
-                                        plt.Text("{"),
-                                        plt.Text("}"),
-                                    ),
-                                    plt.Apply(
-                                        OVar("joinMapList"),
-                                        OLambda(
-                                            ["x"],
-                                            plt.Apply(
-                                                OVar("f"),
-                                                OVar("f"),
-                                                OVar("x"),
-                                            ),
-                                        ),
-                                        plt.UnListData(OVar("d")),
-                                        plt.Text("["),
-                                        plt.Text("]"),
-                                    ),
-                                    plt.Apply(
-                                        IntegerInstanceType.stringify(recursive=True),
-                                        plt.UnIData(OVar("d")),
-                                    ),
-                                    plt.Apply(
-                                        ByteStringInstanceType.stringify(
-                                            recursive=True
-                                        ),
-                                        plt.UnBData(OVar("d")),
-                                    ),
-                                ),
-                            )
-                        ),
-                    ),
-                ],
-                plt.ConcatString(
-                    plt.Text("RawPlutusData(data="),
-                    plt.Apply(OVar("stringifyPlutusData"), OVar("self")),
-                    plt.Text(")"),
-                ),
-            ),
-        )
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class AtomicType(ClassType):
-    def __ge__(self, other):
-        # Can only substitute for its own type (also subtypes)
-        return isinstance(other, self.__class__)
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class RecordType(ClassType):
-    record: Record
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return (
-            "cons["
-            + self.record.orig_name
-            + "]("
-            + (str(self.record.constructor) if not skip_constructor else "_")
-            + ";"
-            + ",".join(name + ":" + type.id_map() for name, type in self.record.fields)
-            + ")"
-        )
-
-    def constr_type(self) -> "InstanceType":
-        return InstanceType(
-            FunctionType(
-                frozenlist([f[1] for f in self.record.fields]), InstanceType(self)
-            )
-        )
-
-    def constr(self) -> plt.AST:
-        # wrap all constructor values to PlutusData
-        build_constr_params = plt.EmptyDataList()
-        for n, t in reversed(self.record.fields):
-            build_constr_params = plt.MkCons(
-                transform_output_map(t)(plt.Force(OVar(n))), build_constr_params
-            )
-        # then build a constr type with this PlutusData
-        return SafeOLambda(
-            [n for n, _ in self.record.fields],
-            plt.ConstrData(plt.Integer(self.record.constructor), build_constr_params),
-        )
-
-    def attribute_type(self, attr: str) -> Type:
-        """The types of the named attributes of this class"""
-        if attr == "CONSTR_ID":
-            return IntegerInstanceType
-        for n, t in self.record.fields:
-            if n == attr:
-                return t
-        if attr == "to_cbor":
-            return InstanceType(FunctionType(frozenlist([]), ByteStringInstanceType))
-        raise TypeInferenceError(
-            f"Type {self.record.name} does not have attribute {attr}"
-        )
-
-    def attribute(self, attr: str) -> plt.AST:
-        """The attributes of this class. Need to be a lambda that expects as first argument the object itself"""
-        if attr == "CONSTR_ID":
-            # access to constructor
-            return OLambda(
-                ["self"],
-                plt.Constructor(OVar("self")),
-            )
-        if attr in (n for n, t in self.record.fields):
-            attr_typ = self.attribute_type(attr)
-            pos = next(i for i, (n, _) in enumerate(self.record.fields) if n == attr)
-            # access to normal fields
-            return OLambda(
-                ["self"],
-                transform_ext_params_map(attr_typ)(
-                    plt.ConstantNthField(
-                        OVar("self"),
-                        pos,
-                    ),
-                ),
-            )
-        if attr == "to_cbor":
-            return OLambda(
-                ["self", "_"],
-                plt.SerialiseData(
-                    OVar("self"),
-                ),
-            )
-        raise NotImplementedError(f"Attribute {attr} not implemented for type {self}")
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        # this will reject comparisons that will always be false - most likely due to faults during programming
-        if (
-            (
-                isinstance(o, RecordType)
-                and (self.record >= o.record or o.record >= self.record)
-            )
-            or (
-                isinstance(o, UnionType) and any(self >= o or self >= o for o in o.typs)
-            )
-            or isinstance(o, AnyType)
-        ):
-            # Note that comparison with AnyType is actually fine because both are Data
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsData)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                            OVar("y"),
-                        )
-                    ),
-                )
-        if (
-            isinstance(o, ListType)
-            and isinstance(o.typ, InstanceType)
-            and (o.typ.typ >= self or self >= o.typ.typ)
-        ):
-            if isinstance(op, In):
-                return OLambda(
-                    ["x", "y"],
-                    plt.AnyList(
-                        OVar("y"),
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                        ),
-                    ),
-                )
-            if isinstance(op, NotIn):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("y"),
-                            plt.Apply(
-                                plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                                OVar("x"),
-                            ),
-                        ),
-                    ),
-                )
-        return super().cmp(op, o)
-
-    def __ge__(self, other):
-        # Can only substitute for its own type, records need to be equal
-        # if someone wants to be funny, they can implement <= to be true if all fields match up to some point
-        return isinstance(other, self.__class__) and self.record >= other.record
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        """Returns a stringified version of the object"""
-        map_fields = plt.Text(")")
-        if self.record.fields:
-            # TODO access to fields is a bit inefficient but this is debugging stuff only anyways
-            pos = len(self.record.fields) - 1
-            for field_name, field_type in reversed(self.record.fields[1:]):
-                map_fields = plt.ConcatString(
-                    plt.Text(f", {field_name}="),
-                    plt.Apply(
-                        field_type.stringify(recursive=True),
-                        transform_ext_params_map(field_type)(
-                            plt.ConstantNthField(OVar("self"), pos)
-                        ),
-                    ),
-                    map_fields,
-                )
-                pos -= 1
-            map_fields = plt.ConcatString(
-                plt.Text(f"{self.record.fields[0][0]}="),
-                plt.Apply(
-                    self.record.fields[0][1].stringify(recursive=True),
-                    transform_ext_params_map(self.record.fields[0][1])(
-                        plt.ConstantNthField(OVar("self"), pos)
-                    ),
-                ),
-                map_fields,
-            )
-        return OLambda(
-            ["self"],
-            plt.AppendString(plt.Text(f"{self.record.orig_name}("), map_fields),
-        )
-
-    def copy_only_attributes(self) -> plt.AST:
-        copied_attributes = plt.EmptyDataList()
-        for attr_name, attr_type in reversed(self.record.fields):
-            copied_attributes = OLet(
-                [
-                    ("f", plt.HeadList(OVar("fs"))),
-                    ("fs", plt.TailList(OVar("fs"))),
-                ],
-                plt.MkCons(
-                    transform_output_map(attr_type)(
-                        plt.Apply(
-                            attr_type.copy_only_attributes(),
-                            transform_ext_params_map(attr_type)(
-                                OVar("f"),
-                            ),
-                        )
-                    ),
-                    copied_attributes,
-                ),
-            )
-        copied_attributes = OLet(
-            [("fs", plt.Fields(OVar("self")))],
-            copied_attributes,
-        )
-        return OLambda(
-            ["self"],
-            plt.ConstrData(
-                plt.Integer(self.record.constructor),
-                copied_attributes,
-            ),
-        )
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class UnionType(ClassType):
-    typs: typing.List[RecordType]
-
-    def __post_init__(self):
-        object.__setattr__(self, "typs", frozenlist(self.typs))
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "union<" + ",".join(t.id_map() for t in self.typs) + ">"
-
-    def attribute_type(self, attr) -> "Type":
-        if attr == "CONSTR_ID":
-            return IntegerInstanceType
-        # need to have a common field with the same name
-        if all(attr in (n for n, t in x.record.fields) for x in self.typs):
-            attr_types = OrderedSet(
-                t for x in self.typs for n, t in x.record.fields if n == attr
-            )
-            for at in attr_types:
-                # return the maximum element if there is one
-                if all(at >= at2 for at2 in attr_types):
-                    return at
-            # return the union type of all possible instantiations if all possible values are record types
-            if all(
-                isinstance(at, InstanceType) and isinstance(at.typ, RecordType)
-                for at in attr_types
-            ) and distinct([at.typ.record.constructor for at in attr_types]):
-                return InstanceType(
-                    UnionType(frozenlist([at.typ for at in attr_types]))
-                )
-            # return Anytype
-            return InstanceType(AnyType())
-        if attr == "to_cbor":
-            return InstanceType(FunctionType(frozenlist([]), ByteStringInstanceType))
-        raise TypeInferenceError(
-            f"Can not access attribute {attr} of Union type. Cast to desired type with an 'if isinstance(_, _):' branch."
-        )
-
-    def attribute(self, attr: str) -> plt.AST:
-        if attr == "CONSTR_ID":
-            # access to constructor
-            return OLambda(
-                ["self"],
-                plt.Constructor(OVar("self")),
-            )
-        # iterate through all names/types of the unioned records by position
-        if any(attr in (n for n, t in r.record.fields) for r in self.typs):
-            attr_typ = self.attribute_type(attr)
-            pos_constrs = [
-                (i, x.record.constructor)
-                for x in self.typs
-                for i, (n, t) in enumerate(x.record.fields)
-                if n == attr
-            ]
-            pos_constrs = sorted(pos_constrs, key=lambda x: x[0])
-            pos_constrs = [
-                (pos, [c[1] for c in constrs])
-                for (pos, constrs) in itertools.groupby(pos_constrs, key=lambda x: x[0])
-            ]
-            # largest group last so we save the comparisons for that
-            pos_constrs = sorted(pos_constrs, key=lambda x: len(x[1]))
-            # access to normal fields
-            if not pos_constrs:
-                pos_decisor = plt.TraceError("Invalid constructor")
-            else:
-                pos_decisor = plt.Integer(pos_constrs[-1][0])
-                pos_constrs = pos_constrs[:-1]
-            for pos, constrs in pos_constrs:
-                assert constrs, "Found empty constructors for a position"
-                constr_check = plt.EqualsInteger(
-                    OVar("constr"), plt.Integer(constrs[0])
-                )
-                for constr in constrs[1:]:
-                    constr_check = plt.Or(
-                        plt.EqualsInteger(OVar("constr"), plt.Integer(constr)),
-                        constr_check,
-                    )
-                pos_decisor = plt.Ite(
-                    constr_check,
-                    plt.Integer(pos),
-                    pos_decisor,
-                )
-            return OLambda(
-                ["self"],
-                transform_ext_params_map(attr_typ)(
-                    plt.NthField(
-                        OVar("self"),
-                        OLet(
-                            [("constr", plt.Constructor(OVar("self")))],
-                            pos_decisor,
-                        ),
-                    ),
-                ),
-            )
-        if attr == "to_cbor":
-            return OLambda(
-                ["self", "_"],
-                plt.SerialiseData(
-                    OVar("self"),
-                ),
-            )
-        raise NotImplementedError(f"Attribute {attr} not implemented for type {self}")
-
-    def __ge__(self, other):
-        if isinstance(other, UnionType):
-            return all(self >= ot for ot in other.typs)
-        return any(t >= other for t in self.typs)
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        # this will reject comparisons that will always be false - most likely due to faults during programming
-        # note we require that there is an overlapt between the possible types for unions
-        if (isinstance(o, RecordType) and any(t >= o or o >= t for t in self.typs)) or (
-            isinstance(o, UnionType)
-            and any(t >= ot or t >= ot for t in self.typs for ot in o.typs)
-        ):
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsData)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                            OVar("y"),
-                        )
-                    ),
-                )
-        if (
-            isinstance(o, ListType)
-            and isinstance(o.typ, InstanceType)
-            and any(o.typ.typ >= t or t >= o.typ.typ for t in self.typs)
-        ):
-            if isinstance(op, In):
-                return OLambda(
-                    ["x", "y"],
-                    plt.AnyList(
-                        OVar("y"),
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                        ),
-                    ),
-                )
-            if isinstance(op, NotIn):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("y"),
-                            plt.Apply(
-                                plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                                OVar("x"),
-                            ),
-                        ),
-                    ),
-                )
-        raise NotImplementedError(
-            f"Can not compare {o} and {self} with operation {op.__class__}. Note that comparisons that always return false are also rejected."
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        decide_string_func = plt.TraceError("Invalid constructor id in Union")
-        for t in self.typs:
-            decide_string_func = plt.Ite(
-                plt.EqualsInteger(OVar("c"), plt.Integer(t.record.constructor)),
-                t.stringify(recursive=True),
-                decide_string_func,
-            )
-        return OLambda(
-            ["self"],
-            OLet(
-                [("c", plt.Constructor(OVar("self")))],
-                plt.Apply(decide_string_func, OVar("self")),
-            ),
-        )
-
-    def copy_only_attributes(self) -> plt.AST:
-        copied_attributes = plt.TraceError(
-            f"Invalid CONSTR_ID for instance of Union[{', '.join(type(typ).__name__ for typ in self.typs)}]"
-        )
-        for typ in self.typs:
-            copied_attributes = plt.Ite(
-                plt.EqualsInteger(OVar("constr"), plt.Integer(typ.record.constructor)),
-                plt.Apply(typ.copy_only_attributes(), OVar("self")),
-                copied_attributes,
-            )
-        return OLambda(
-            ["self"],
-            OLet(
-                [("constr", plt.Constructor(OVar("self")))],
-                copied_attributes,
-            ),
-        )
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class TupleType(ClassType):
-    typs: typing.List[Type]
-
-    def __ge__(self, other):
-        return isinstance(other, TupleType) and all(
-            t >= ot for t, ot in zip(self.typs, other.typs)
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        if not self.typs:
-            return OLambda(
-                ["self"],
-                plt.Text("()"),
-            )
-        elif len(self.typs) == 1:
-            tuple_content = plt.ConcatString(
-                plt.Apply(
-                    self.typs[0].stringify(recursive=True),
-                    plt.FunctionalTupleAccess(OVar("self"), 0, len(self.typs)),
-                ),
-                plt.Text(","),
-            )
-        else:
-            tuple_content = plt.ConcatString(
-                plt.Apply(
-                    self.typs[0].stringify(recursive=True),
-                    plt.FunctionalTupleAccess(OVar("self"), 0, len(self.typs)),
-                ),
-            )
-            for i, t in enumerate(self.typs[1:], start=1):
-                tuple_content = plt.ConcatString(
-                    tuple_content,
-                    plt.Text(", "),
-                    plt.Apply(
-                        t.stringify(recursive=True),
-                        plt.FunctionalTupleAccess(OVar("self"), i, len(self.typs)),
-                    ),
-                )
-        return OLambda(
-            ["self"],
-            plt.ConcatString(plt.Text("("), tuple_content, plt.Text(")")),
-        )
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        if isinstance(binop, Add):
-            if isinstance(other, TupleType):
-                return TupleType(self.typs + other.typs)
-        return super()._binop_return_type(binop, other)
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class PairType(ClassType):
-    """An internal type representing built-in PlutusData pairs"""
-
-    l_typ: Type
-    r_typ: Type
-
-    def __ge__(self, other):
-        return isinstance(other, PairType) and all(
-            t >= ot
-            for t, ot in zip((self.l_typ, self.r_typ), (other.l_typ, other.r_typ))
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        tuple_content = plt.ConcatString(
-            plt.Apply(
-                self.l_typ.stringify(recursive=True),
-                transform_ext_params_map(self.l_typ)(plt.FstPair(OVar("self"))),
-            ),
-            plt.Text(", "),
-            plt.Apply(
-                self.r_typ.stringify(recursive=True),
-                transform_ext_params_map(self.r_typ)(plt.SndPair(OVar("self"))),
-            ),
-        )
-        return OLambda(
-            ["self"],
-            plt.ConcatString(plt.Text("("), tuple_content, plt.Text(")")),
-        )
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class ListType(ClassType):
-    typ: Type
-
-    def __ge__(self, other):
-        return isinstance(other, ListType) and self.typ >= other.typ
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "list<" + self.typ.id_map() + ">"
-
-    def attribute_type(self, attr) -> "Type":
-        if attr == "index":
-            return InstanceType(
-                FunctionType(frozenlist([self.typ]), IntegerInstanceType)
-            )
-        super().attribute_type(attr)
-
-    def attribute(self, attr) -> plt.AST:
-        if attr == "index":
-            return OLambda(
-                ["self", "x"],
-                OLet(
-                    [("x", plt.Force(OVar("x")))],
-                    plt.Apply(
-                        plt.RecFun(
-                            OLambda(
-                                ["index", "xs", "a"],
-                                plt.IteNullList(
-                                    OVar("xs"),
-                                    plt.TraceError("Did not find element in list"),
-                                    plt.Ite(
-                                        plt.EqualsInteger(
-                                            OVar("x"), plt.HeadList(OVar("xs"))
-                                        ),
-                                        OVar("a"),
-                                        plt.Apply(
-                                            OVar("index"),
-                                            OVar("index"),
-                                            plt.TailList(OVar("xs")),
-                                            plt.AddInteger(OVar("a"), plt.Integer(1)),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        OVar("self"),
-                        plt.Integer(0),
-                    ),
-                ),
-            )
-        super().attribute(attr)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(
-            ["self"],
-            OLet(
-                [
-                    (
-                        "g",
-                        plt.RecFun(
-                            OLambda(
-                                ["f", "l"],
-                                plt.AppendString(
-                                    plt.Apply(
-                                        self.typ.stringify(recursive=True),
-                                        plt.HeadList(OVar("l")),
-                                    ),
-                                    OLet(
-                                        [("t", plt.TailList(OVar("l")))],
-                                        plt.IteNullList(
-                                            OVar("t"),
-                                            plt.Text("]"),
-                                            plt.AppendString(
-                                                plt.Text(", "),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    OVar("t"),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            )
-                        ),
-                    )
-                ],
-                plt.AppendString(
-                    plt.Text("["),
-                    plt.IteNullList(
-                        OVar("self"),
-                        plt.Text("]"),
-                        plt.Apply(
-                            OVar("g"),
-                            OVar("self"),
-                        ),
-                    ),
-                ),
-            ),
-        )
-
-    def copy_only_attributes(self) -> plt.AST:
-        mapped_attrs = plt.MapList(
-            OVar("self"),
-            OLambda(
-                ["v"],
-                transform_ext_params_map(self.typ)(
-                    plt.Apply(
-                        self.typ.copy_only_attributes(),
-                        transform_output_map(self.typ)(OVar("v")),
-                    )
-                ),
-            ),
-            empty_list(self.typ),
-        )
-        return OLambda(["self"], mapped_attrs)
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        if isinstance(binop, Add):
-            if isinstance(other, InstanceType) and isinstance(other.typ, ListType):
-                other_typ = other.typ
-                assert (
-                    self.typ >= other_typ.typ or other_typ.typ >= self.typ
-                ), f"Types of lists {self.typ} and {other_typ.typ} are not compatible"
-                return ListType(
-                    self.typ if self.typ >= other_typ.typ else other_typ.typ
-                )
-        return super()._binop_return_type(binop, other)
-
-    def _binop_bin_fun(self, binop: operator, other: AST):
-        if isinstance(binop, Add):
-            if isinstance(other.typ, InstanceType) and isinstance(
-                other.typ.typ, ListType
-            ):
-                return plt.AppendList
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return lambda x: plt.IteNullList(x, plt.Bool(True), plt.Bool(False))
-        return super()._unop_fun(unop)
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class DictType(ClassType):
-    key_typ: Type
-    value_typ: Type
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "map<" + self.key_typ.id_map() + "," + self.value_typ.id_map() + ">"
-
-    def attribute_type(self, attr) -> "Type":
-        if attr == "get":
-            return InstanceType(
-                FunctionType(frozenlist([self.key_typ, self.value_typ]), self.value_typ)
-            )
-        if attr == "keys":
-            return InstanceType(
-                FunctionType(frozenlist([]), InstanceType(ListType(self.key_typ)))
-            )
-        if attr == "values":
-            return InstanceType(
-                FunctionType(frozenlist([]), InstanceType(ListType(self.value_typ)))
-            )
-        if attr == "items":
-            return InstanceType(
-                FunctionType(
-                    frozenlist([]),
-                    InstanceType(
-                        ListType(InstanceType(PairType(self.key_typ, self.value_typ)))
-                    ),
-                )
-            )
-        raise TypeInferenceError(
-            f"Type of attribute '{attr}' is unknown for type Dict."
-        )
-
-    def attribute(self, attr) -> plt.AST:
-        if attr == "get":
-            return OLambda(
-                ["self", "key", "default"],
-                transform_ext_params_map(self.value_typ)(
-                    OLet(
-                        [
-                            (
-                                "key_mapped",
-                                transform_output_map(self.key_typ)(
-                                    plt.Force(OVar("key"))
-                                ),
-                            )
-                        ],
-                        plt.SndPair(
-                            plt.FindList(
-                                OVar("self"),
-                                OLambda(
-                                    ["x"],
-                                    plt.EqualsData(
-                                        OVar("key_mapped"),
-                                        plt.FstPair(OVar("x")),
-                                    ),
-                                ),
-                                # this is a bit ugly... we wrap - only to later unwrap again
-                                plt.MkPairData(
-                                    OVar("key_mapped"),
-                                    transform_output_map(self.value_typ)(
-                                        plt.Force(OVar("default"))
-                                    ),
-                                ),
-                            ),
-                        ),
-                    ),
-                ),
-            )
-        if attr == "keys":
-            return OLambda(
-                ["self", "_"],
-                plt.MapList(
-                    OVar("self"),
-                    OLambda(
-                        ["x"],
-                        transform_ext_params_map(self.key_typ)(plt.FstPair(OVar("x"))),
-                    ),
-                    empty_list(self.key_typ),
-                ),
-            )
-        if attr == "values":
-            return OLambda(
-                ["self", "_"],
-                plt.MapList(
-                    OVar("self"),
-                    OLambda(
-                        ["x"],
-                        transform_ext_params_map(self.value_typ)(
-                            plt.SndPair(OVar("x"))
-                        ),
-                    ),
-                    empty_list(self.value_typ),
-                ),
-            )
-        if attr == "items":
-            return OLambda(
-                ["self", "_"],
-                OVar("self"),
-            )
-        raise NotImplementedError(f"Attribute '{attr}' of Dict is unknown.")
-
-    def __ge__(self, other):
-        return (
-            isinstance(other, DictType)
-            and self.key_typ >= other.key_typ
-            and self.value_typ >= other.value_typ
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(
-            ["self"],
-            OLet(
-                [
-                    (
-                        "g",
-                        plt.RecFun(
-                            OLambda(
-                                ["f", "l"],
-                                OLet(
-                                    [
-                                        ("h", plt.HeadList(OVar("l"))),
-                                        ("t", plt.TailList(OVar("l"))),
-                                    ],
-                                    plt.ConcatString(
-                                        plt.Apply(
-                                            self.key_typ.stringify(recursive=True),
-                                            transform_ext_params_map(self.key_typ)(
-                                                plt.FstPair(OVar("h"))
-                                            ),
-                                        ),
-                                        plt.Text(": "),
-                                        plt.Apply(
-                                            self.value_typ.stringify(recursive=True),
-                                            transform_ext_params_map(self.value_typ)(
-                                                plt.SndPair(OVar("h"))
-                                            ),
-                                        ),
-                                        plt.IteNullList(
-                                            OVar("t"),
-                                            plt.Text("}"),
-                                            plt.AppendString(
-                                                plt.Text(", "),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    OVar("t"),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            )
-                        ),
-                    )
-                ],
-                plt.AppendString(
-                    plt.Text("{"),
-                    plt.IteNullList(
-                        OVar("self"),
-                        plt.Text("}"),
-                        plt.Apply(
-                            OVar("g"),
-                            OVar("self"),
-                        ),
-                    ),
-                ),
-            ),
-        )
-
-    def copy_only_attributes(self) -> plt.AST:
-        def CustomMapFilterList(
-            l: plt.AST,
-            filter_op: plt.AST,
-            map_op: plt.AST,
-            empty_list=plt.EmptyDataList(),
-        ):
-            from pluthon import (
-                Apply,
-                Lambda as PLambda,
-                RecFun,
-                IteNullList,
-                Var as PVar,
-                HeadList,
-                Ite,
-                TailList,
-                PrependList,
-                Let as PLet,
-            )
-
-            """
-            Apply a filter and a map function on each element in a list (throws out all that evaluate to false)
-            Performs only a single pass and is hence much more efficient than filter + map
-            """
-            return Apply(
-                PLambda(
-                    ["filter", "map"],
-                    RecFun(
-                        PLambda(
-                            ["filtermap", "xs"],
-                            IteNullList(
-                                PVar("xs"),
-                                empty_list,
-                                PLet(
-                                    [
-                                        ("head", HeadList(PVar("xs"))),
-                                        ("tail", TailList(PVar("xs"))),
-                                    ],
-                                    Ite(
-                                        Apply(
-                                            PVar("filter"), PVar("head"), PVar("tail")
-                                        ),
-                                        PrependList(
-                                            Apply(PVar("map"), PVar("head")),
-                                            Apply(
-                                                PVar("filtermap"),
-                                                PVar("filtermap"),
-                                                PVar("tail"),
-                                            ),
-                                        ),
-                                        Apply(
-                                            PVar("filtermap"),
-                                            PVar("filtermap"),
-                                            PVar("tail"),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                    ),
-                ),
-                filter_op,
-                map_op,
-                l,
-            )
-
-        mapped_attrs = CustomMapFilterList(
-            OVar("self"),
-            OLambda(
-                ["h", "t"],
-                OLet(
-                    [
-                        ("hfst", plt.FstPair(OVar("h"))),
-                    ],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("t"),
-                            OLambda(
-                                ["e"],
-                                plt.EqualsData(OVar("hfst"), plt.FstPair(OVar("e"))),
-                            ),
-                        )
-                    ),
-                ),
-            ),
-            OLambda(
-                ["v"],
-                plt.MkPairData(
-                    transform_output_map(self.key_typ)(
-                        plt.Apply(
-                            self.key_typ.copy_only_attributes(),
-                            transform_ext_params_map(self.key_typ)(
-                                plt.FstPair(OVar("v"))
-                            ),
-                        )
-                    ),
-                    transform_output_map(self.value_typ)(
-                        plt.Apply(
-                            self.value_typ.copy_only_attributes(),
-                            transform_ext_params_map(self.value_typ)(
-                                plt.SndPair(OVar("v"))
-                            ),
-                        )
-                    ),
-                ),
-            ),
-            plt.EmptyDataPairList(),
-        )
-        return OLambda(["self"], mapped_attrs)
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return lambda x: plt.IteNullList(x, plt.Bool(True), plt.Bool(False))
-        return super()._unop_fun(unop)
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class FunctionType(ClassType):
-    argtyps: typing.List[Type]
-    rettyp: Type
-    # A map from external variable names to their types when the function is defined
-    bound_vars: typing.Dict[str, Type] = dataclasses.field(default_factory=frozendict)
-    # Whether and under which name the function binds itself
-    # The type of this variable is "self"
-    bind_self: typing.Optional[str] = None
-
-    def __post_init__(self):
-        object.__setattr__(self, "argtyps", frozenlist(self.argtyps))
-        object.__setattr__(self, "bound_vars", frozendict(self.bound_vars))
-
-    def __ge__(self, other):
-        return (
-            isinstance(other, FunctionType)
-            and len(self.argtyps) == len(other.argtyps)
-            and all(a >= oa for a, oa in zip(self.argtyps, other.argtyps))
-            and self.bound_vars.keys() == other.bound_vars.keys()
-            and all(sbv >= other.bound_vars[k] for k, sbv in self.bound_vars.items())
-            and self.bind_self == other.bind_self
-            and other.rettyp >= self.rettyp
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(["x"], plt.Text("<function>"))
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class InstanceType(Type):
-    typ: ClassType
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return self.typ.id_map(skip_constructor=skip_constructor)
-
-    def constr_type(self) -> FunctionType:
-        raise TypeInferenceError(f"Can not construct an instance {self}")
-
-    def constr(self) -> plt.AST:
-        raise NotImplementedError(f"Can not construct an instance {self}")
-
-    def attribute_type(self, attr) -> Type:
-        return self.typ.attribute_type(attr)
-
-    def attribute(self, attr) -> plt.AST:
-        return self.typ.attribute(attr)
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        if isinstance(o, InstanceType):
-            return self.typ.cmp(op, o.typ)
-        return super().cmp(op, o)
-
-    def __ge__(self, other):
-        return isinstance(other, InstanceType) and self.typ >= other.typ
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return self.typ.stringify(recursive=recursive)
-
-    def copy_only_attributes(self) -> plt.AST:
-        return self.typ.copy_only_attributes()
-
-    def binop_type(self, binop: operator, other: "Type") -> "Type":
-        return self.typ.binop_type(binop, other)
-
-    def binop(self, binop: operator, other: AST) -> plt.AST:
-        return self.typ.binop(binop, other)
-
-    def unop_type(self, unop: unaryop) -> "Type":
-        return self.typ.unop_type(unop)
-
-    def unop(self, unop: unaryop) -> plt.AST:
-        return self.typ.unop(unop)
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class IntegerType(AtomicType):
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "int"
-
-    def constr_type(self) -> InstanceType:
-        return InstanceType(PolymorphicFunctionType(IntImpl()))
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        if isinstance(o, BoolType):
-            if isinstance(op, Eq):
-                # 1 == True
-                # 0 == False
-                # all other comparisons are False
-                return OLambda(
-                    ["x", "y"],
-                    plt.Ite(
-                        OVar("y"),
-                        plt.EqualsInteger(OVar("x"), plt.Integer(1)),
-                        plt.EqualsInteger(OVar("x"), plt.Integer(0)),
-                    ),
-                )
-        if isinstance(o, IntegerType):
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsInteger)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsInteger),
-                            OVar("y"),
-                            OVar("x"),
-                        )
-                    ),
-                )
-            if isinstance(op, LtE):
-                return plt.BuiltIn(uplc.BuiltInFun.LessThanEqualsInteger)
-            if isinstance(op, Lt):
-                return plt.BuiltIn(uplc.BuiltInFun.LessThanInteger)
-            if isinstance(op, Gt):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Apply(
-                        plt.BuiltIn(uplc.BuiltInFun.LessThanInteger),
-                        OVar("y"),
-                        OVar("x"),
-                    ),
-                )
-            if isinstance(op, GtE):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Apply(
-                        plt.BuiltIn(uplc.BuiltInFun.LessThanEqualsInteger),
-                        OVar("y"),
-                        OVar("x"),
-                    ),
-                )
-        if (
-            isinstance(o, ListType)
-            and isinstance(o.typ, InstanceType)
-            and isinstance(o.typ.typ, IntegerType)
-        ):
-            if isinstance(op, In):
-                return OLambda(
-                    ["x", "y"],
-                    plt.AnyList(
-                        OVar("y"),
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsInteger), OVar("x")
-                        ),
-                    ),
-                )
-            if isinstance(op, NotIn):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("y"),
-                            plt.Apply(
-                                plt.BuiltIn(uplc.BuiltInFun.EqualsInteger), OVar("x")
-                            ),
-                        ),
-                    ),
-                )
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(
-            ["x"],
-            plt.DecodeUtf8(
-                OLet(
-                    [
-                        (
-                            "strlist",
-                            plt.RecFun(
-                                OLambda(
-                                    ["f", "i"],
-                                    plt.Ite(
-                                        plt.LessThanEqualsInteger(
-                                            OVar("i"), plt.Integer(0)
-                                        ),
-                                        plt.EmptyIntegerList(),
-                                        plt.MkCons(
-                                            plt.AddInteger(
-                                                plt.ModInteger(
-                                                    OVar("i"), plt.Integer(10)
-                                                ),
-                                                plt.Integer(ord("0")),
-                                            ),
-                                            plt.Apply(
-                                                OVar("f"),
-                                                OVar("f"),
-                                                plt.DivideInteger(
-                                                    OVar("i"), plt.Integer(10)
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        (
-                            "mkstr",
-                            OLambda(
-                                ["i"],
-                                plt.FoldList(
-                                    plt.Apply(OVar("strlist"), OVar("i")),
-                                    OLambda(
-                                        ["b", "i"],
-                                        plt.ConsByteString(OVar("i"), OVar("b")),
-                                    ),
-                                    plt.ByteString(b""),
-                                ),
-                            ),
-                        ),
-                    ],
-                    plt.Ite(
-                        plt.EqualsInteger(OVar("x"), plt.Integer(0)),
-                        plt.ByteString(b"0"),
-                        plt.Ite(
-                            plt.LessThanInteger(OVar("x"), plt.Integer(0)),
-                            plt.ConsByteString(
-                                plt.Integer(ord("-")),
-                                plt.Apply(OVar("mkstr"), plt.Negate(OVar("x"))),
-                            ),
-                            plt.Apply(OVar("mkstr"), OVar("x")),
-                        ),
-                    ),
-                )
-            ),
-        )
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        if (
-            isinstance(binop, Add)
-            or isinstance(binop, Sub)
-            or isinstance(binop, FloorDiv)
-            or isinstance(binop, Mod)
-            or isinstance(binop, Div)
-            or isinstance(binop, Pow)
-        ):
-            if other == IntegerInstanceType:
-                return IntegerType()
-        if isinstance(binop, Mult):
-            if other == IntegerInstanceType:
-                return IntegerType()
-            elif other == ByteStringInstanceType:
-                return ByteStringType()
-            elif other == StringInstanceType:
-                return StringType()
-        return super().binop_type(binop, other)
-
-    def _binop_bin_fun(self, binop: operator, other: AST):
-        if other.typ == IntegerInstanceType:
-            if isinstance(binop, Add):
-                return plt.AddInteger
-            elif isinstance(binop, Sub):
-                return plt.SubtractInteger
-            elif isinstance(binop, FloorDiv):
-                return plt.DivideInteger
-            elif isinstance(binop, Mod):
-                return plt.ModInteger
-            elif isinstance(binop, Pow):
-                return lambda x, y: OLet(
-                    [("y", y)],
-                    plt.Ite(
-                        plt.LessThanInteger(OVar("y"), plt.Integer(0)),
-                        plt.TraceError("Negative exponentiation is not supported"),
-                        PowImpl(x, OVar("y")),
-                    ),
-                )
-
-        if isinstance(binop, Mult):
-            if other.typ == IntegerInstanceType:
-                return plt.MultiplyInteger
-            elif other.typ == ByteStringInstanceType:
-                return lambda x, y: ByteStrIntMulImpl(y, x)
-            elif other.typ == StringInstanceType:
-                return lambda x, y: StrIntMulImpl(y, x)
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, USub):
-            return IntegerType()
-        elif isinstance(unop, UAdd):
-            return IntegerType()
-        elif isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, USub):
-            return lambda x: plt.SubtractInteger(plt.Integer(0), x)
-        if isinstance(unop, UAdd):
-            return lambda x: x
-        if isinstance(unop, Not):
-            return lambda x: plt.EqualsInteger(x, plt.Integer(0))
-        return super()._unop_fun(unop)
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class StringType(AtomicType):
-    def constr_type(self) -> InstanceType:
-        return InstanceType(PolymorphicFunctionType(StrImpl()))
-
-    def attribute_type(self, attr) -> Type:
-        if attr == "encode":
-            return InstanceType(FunctionType(frozenlist([]), ByteStringInstanceType))
-        return super().attribute_type(attr)
-
-    def attribute(self, attr) -> plt.AST:
-        if attr == "encode":
-            # No codec -> only the default (utf8) is allowed
-            return OLambda(["x", "_"], plt.EncodeUtf8(OVar("x")))
-        return super().attribute(attr)
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        if isinstance(o, StringType):
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsString)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"], plt.Not(plt.EqualsString(OVar("x"), OVar("y")))
-                )
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        if recursive:
-            # TODO this is not correct, as the string is not properly escaped
-            return OLambda(
-                ["self"],
-                plt.ConcatString(plt.Text("'"), OVar("self"), plt.Text("'")),
-            )
-        else:
-            return OLambda(["self"], OVar("self"))
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        if isinstance(binop, Add):
-            if other == StringInstanceType:
-                return StringType()
-        if isinstance(binop, Mult):
-            if other == IntegerInstanceType:
-                return StringType()
-        return super().binop_type(binop, other)
-
-    def _binop_bin_fun(self, binop: operator, other: AST):
-        if isinstance(binop, Add):
-            if other.typ == StringInstanceType:
-                return plt.AppendString
-        if isinstance(binop, Mult):
-            if other.typ == IntegerInstanceType:
-                return StrIntMulImpl
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return lambda x: plt.EqualsInteger(
-                plt.LengthOfByteString(plt.EncodeUtf8(x)), plt.Integer(0)
-            )
-        return super()._unop_fun(unop)
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class ByteStringType(AtomicType):
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "bytes"
-
-    def constr_type(self) -> InstanceType:
-        return InstanceType(PolymorphicFunctionType(BytesImpl()))
-
-    def attribute_type(self, attr) -> Type:
-        if attr == "decode":
-            return InstanceType(FunctionType(frozenlist([]), StringInstanceType))
-        if attr == "hex":
-            return InstanceType(FunctionType(frozenlist([]), StringInstanceType))
-        if attr == "fromhex":
-            return InstanceType(
-                FunctionType(
-                    frozenlist([StringInstanceType]),
-                    ByteStringInstanceType,
-                )
-            )
-        return super().attribute_type(attr)
-
-    def attribute(self, attr) -> plt.AST:
-        if attr == "decode":
-            # No codec -> only the default (utf8) is allowed
-            return OLambda(["x", "_"], plt.DecodeUtf8(OVar("x")))
-        if attr == "hex":
-            return OLambda(
-                ["x", "_"],
-                plt.DecodeUtf8(
-                    OLet(
-                        [
-                            (
-                                "hexlist",
-                                plt.RecFun(
-                                    OLambda(
-                                        ["f", "i"],
-                                        plt.Ite(
-                                            plt.LessThanInteger(
-                                                OVar("i"), plt.Integer(0)
-                                            ),
-                                            plt.EmptyIntegerList(),
-                                            plt.MkCons(
-                                                plt.IndexByteString(
-                                                    OVar("x"), OVar("i")
-                                                ),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.SubtractInteger(
-                                                        OVar("i"), plt.Integer(1)
-                                                    ),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                            (
-                                "map_str",
-                                OLambda(
-                                    ["i"],
-                                    plt.AddInteger(
-                                        OVar("i"),
-                                        plt.IfThenElse(
-                                            plt.LessThanInteger(
-                                                OVar("i"), plt.Integer(10)
-                                            ),
-                                            plt.Integer(ord("0")),
-                                            plt.Integer(ord("a") - 10),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                            (
-                                "mkstr",
-                                OLambda(
-                                    ["i"],
-                                    plt.FoldList(
-                                        plt.Apply(OVar("hexlist"), OVar("i")),
-                                        OLambda(
-                                            ["b", "i"],
-                                            plt.ConsByteString(
-                                                plt.Apply(
-                                                    OVar("map_str"),
-                                                    plt.DivideInteger(
-                                                        OVar("i"), plt.Integer(16)
-                                                    ),
-                                                ),
-                                                plt.ConsByteString(
-                                                    plt.Apply(
-                                                        OVar("map_str"),
-                                                        plt.ModInteger(
-                                                            OVar("i"),
-                                                            plt.Integer(16),
-                                                        ),
-                                                    ),
-                                                    OVar("b"),
-                                                ),
-                                            ),
-                                        ),
-                                        plt.ByteString(b""),
-                                    ),
-                                ),
-                            ),
-                        ],
-                        plt.Apply(
-                            OVar("mkstr"),
-                            plt.SubtractInteger(
-                                plt.LengthOfByteString(OVar("x")), plt.Integer(1)
-                            ),
-                        ),
-                    ),
-                ),
-            )
-        if attr == "fromhex":
-            return OLambda(
-                ["_", "x"],
-                OLet(
-                    [
-                        (
-                            "bytestr",
-                            plt.EncodeUtf8(plt.Force(OVar("x"))),
-                        ),
-                        (
-                            "bytestr_len",
-                            plt.LengthOfByteString(OVar("bytestr")),
-                        ),
-                        (
-                            "char_to_int",
-                            OLambda(
-                                ["c"],
-                                plt.Ite(
-                                    plt.And(
-                                        plt.LessThanEqualsInteger(
-                                            plt.Integer(ord("a")), OVar("c")
-                                        ),
-                                        plt.LessThanEqualsInteger(
-                                            OVar("c"), plt.Integer(ord("f"))
-                                        ),
-                                    ),
-                                    plt.AddInteger(
-                                        plt.SubtractInteger(
-                                            OVar("c"), plt.Integer(ord("a"))
-                                        ),
-                                        plt.Integer(10),
-                                    ),
-                                    plt.Ite(
-                                        plt.And(
-                                            plt.LessThanEqualsInteger(
-                                                plt.Integer(ord("0")), OVar("c")
-                                            ),
-                                            plt.LessThanEqualsInteger(
-                                                OVar("c"), plt.Integer(ord("9"))
-                                            ),
-                                        ),
-                                        plt.SubtractInteger(
-                                            OVar("c"), plt.Integer(ord("0"))
-                                        ),
-                                        plt.Ite(
-                                            plt.And(
-                                                plt.LessThanEqualsInteger(
-                                                    plt.Integer(ord("A")), OVar("c")
-                                                ),
-                                                plt.LessThanEqualsInteger(
-                                                    OVar("c"), plt.Integer(ord("F"))
-                                                ),
-                                            ),
-                                            plt.AddInteger(
-                                                plt.SubtractInteger(
-                                                    OVar("c"), plt.Integer(ord("A"))
-                                                ),
-                                                plt.Integer(10),
-                                            ),
-                                            plt.TraceError("Invalid hex character"),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        (
-                            "splitlist",
-                            plt.RecFun(
-                                OLambda(
-                                    ["f", "i"],
-                                    plt.Ite(
-                                        plt.LessThanInteger(
-                                            OVar("bytestr_len"),
-                                            plt.AddInteger(OVar("i"), plt.Integer(1)),
-                                        ),
-                                        plt.ByteString(b""),
-                                        plt.Ite(
-                                            plt.LessThanInteger(
-                                                OVar("bytestr_len"),
-                                                plt.AddInteger(
-                                                    OVar("i"), plt.Integer(2)
-                                                ),
-                                            ),
-                                            plt.TraceError("Invalid hex string"),
-                                            OLet(
-                                                [
-                                                    (
-                                                        "char_at_i",
-                                                        plt.IndexByteString(
-                                                            OVar("bytestr"),
-                                                            OVar("i"),
-                                                        ),
-                                                    ),
-                                                    (
-                                                        "char_at_ip1",
-                                                        plt.IndexByteString(
-                                                            OVar("bytestr"),
-                                                            plt.AddInteger(
-                                                                OVar("i"),
-                                                                plt.Integer(1),
-                                                            ),
-                                                        ),
-                                                    ),
-                                                ],
-                                                plt.ConsByteString(
-                                                    plt.AddInteger(
-                                                        plt.MultiplyInteger(
-                                                            plt.Apply(
-                                                                OVar("char_to_int"),
-                                                                OVar("char_at_i"),
-                                                            ),
-                                                            plt.Integer(16),
-                                                        ),
-                                                        plt.Apply(
-                                                            OVar("char_to_int"),
-                                                            OVar("char_at_ip1"),
-                                                        ),
-                                                    ),
-                                                    plt.Apply(
-                                                        OVar("f"),
-                                                        OVar("f"),
-                                                        plt.AddInteger(
-                                                            OVar("i"),
-                                                            plt.Integer(2),
-                                                        ),
-                                                    ),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                )
-                            ),
-                        ),
-                    ],
-                    plt.Apply(OVar("splitlist"), plt.Integer(0)),
-                ),
-            )
-        return super().attribute(attr)
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        if isinstance(o, ByteStringType):
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsByteString)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsByteString),
-                            OVar("y"),
-                            OVar("x"),
-                        )
-                    ),
-                )
-            if isinstance(op, Lt):
-                return plt.BuiltIn(uplc.BuiltInFun.LessThanByteString)
-            if isinstance(op, LtE):
-                return plt.BuiltIn(uplc.BuiltInFun.LessThanEqualsByteString)
-            if isinstance(op, Gt):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Apply(
-                        plt.BuiltIn(uplc.BuiltInFun.LessThanByteString),
-                        OVar("y"),
-                        OVar("x"),
-                    ),
-                )
-            if isinstance(op, GtE):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Apply(
-                        plt.BuiltIn(uplc.BuiltInFun.LessThanEqualsByteString),
-                        OVar("y"),
-                        OVar("x"),
-                    ),
-                )
-        if (
-            isinstance(o, ListType)
-            and isinstance(o.typ, InstanceType)
-            and isinstance(o.typ.typ, ByteStringType)
-        ):
-            if isinstance(op, In):
-                return OLambda(
-                    ["x", "y"],
-                    plt.AnyList(
-                        OVar("y"),
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsByteString),
-                            OVar("x"),
-                        ),
-                    ),
-                )
-            if isinstance(op, NotIn):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("y"),
-                            plt.Apply(
-                                plt.BuiltIn(uplc.BuiltInFun.EqualsByteString),
-                                OVar("x"),
-                            ),
-                        ),
-                    ),
-                )
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(
-            ["x"],
-            plt.DecodeUtf8(
-                OLet(
-                    [
-                        (
-                            "hexlist",
-                            plt.RecFun(
-                                OLambda(
-                                    ["f", "i"],
-                                    plt.Ite(
-                                        plt.LessThanInteger(OVar("i"), plt.Integer(0)),
-                                        plt.EmptyIntegerList(),
-                                        plt.MkCons(
-                                            plt.IndexByteString(OVar("x"), OVar("i")),
-                                            plt.Apply(
-                                                OVar("f"),
-                                                OVar("f"),
-                                                plt.SubtractInteger(
-                                                    OVar("i"), plt.Integer(1)
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        (
-                            "map_str",
-                            OLambda(
-                                ["i"],
-                                plt.AddInteger(
-                                    OVar("i"),
-                                    plt.IfThenElse(
-                                        plt.LessThanInteger(OVar("i"), plt.Integer(10)),
-                                        plt.Integer(ord("0")),
-                                        plt.Integer(ord("a") - 10),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        (
-                            "mkstr",
-                            OLambda(
-                                ["i"],
-                                plt.FoldList(
-                                    plt.Apply(OVar("hexlist"), OVar("i")),
-                                    OLambda(
-                                        ["b", "i"],
-                                        plt.Ite(
-                                            # ascii printable characters are kept unmodified
-                                            plt.And(
-                                                plt.LessThanEqualsInteger(
-                                                    plt.Integer(0x20), OVar("i")
-                                                ),
-                                                plt.LessThanEqualsInteger(
-                                                    OVar("i"), plt.Integer(0x7E)
-                                                ),
-                                            ),
-                                            plt.Ite(
-                                                plt.EqualsInteger(
-                                                    OVar("i"),
-                                                    plt.Integer(ord("\\")),
-                                                ),
-                                                plt.AppendByteString(
-                                                    plt.ByteString(b"\\\\"),
-                                                    OVar("b"),
-                                                ),
-                                                plt.Ite(
-                                                    plt.EqualsInteger(
-                                                        OVar("i"),
-                                                        plt.Integer(ord("'")),
-                                                    ),
-                                                    plt.AppendByteString(
-                                                        plt.ByteString(b"\\'"),
-                                                        OVar("b"),
-                                                    ),
-                                                    plt.ConsByteString(
-                                                        OVar("i"), OVar("b")
-                                                    ),
-                                                ),
-                                            ),
-                                            plt.Ite(
-                                                plt.EqualsInteger(
-                                                    OVar("i"), plt.Integer(ord("\t"))
-                                                ),
-                                                plt.AppendByteString(
-                                                    plt.ByteString(b"\\t"), OVar("b")
-                                                ),
-                                                plt.Ite(
-                                                    plt.EqualsInteger(
-                                                        OVar("i"),
-                                                        plt.Integer(ord("\n")),
-                                                    ),
-                                                    plt.AppendByteString(
-                                                        plt.ByteString(b"\\n"),
-                                                        OVar("b"),
-                                                    ),
-                                                    plt.Ite(
-                                                        plt.EqualsInteger(
-                                                            OVar("i"),
-                                                            plt.Integer(ord("\r")),
-                                                        ),
-                                                        plt.AppendByteString(
-                                                            plt.ByteString(b"\\r"),
-                                                            OVar("b"),
-                                                        ),
-                                                        plt.AppendByteString(
-                                                            plt.ByteString(b"\\x"),
-                                                            plt.ConsByteString(
-                                                                plt.Apply(
-                                                                    OVar("map_str"),
-                                                                    plt.DivideInteger(
-                                                                        OVar("i"),
-                                                                        plt.Integer(16),
-                                                                    ),
-                                                                ),
-                                                                plt.ConsByteString(
-                                                                    plt.Apply(
-                                                                        OVar("map_str"),
-                                                                        plt.ModInteger(
-                                                                            OVar("i"),
-                                                                            plt.Integer(
-                                                                                16
-                                                                            ),
-                                                                        ),
-                                                                    ),
-                                                                    OVar("b"),
-                                                                ),
-                                                            ),
-                                                        ),
-                                                    ),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                    plt.ByteString(b""),
-                                ),
-                            ),
-                        ),
-                    ],
-                    plt.ConcatByteString(
-                        plt.ByteString(b"b'"),
-                        plt.Apply(
-                            OVar("mkstr"),
-                            plt.SubtractInteger(
-                                plt.LengthOfByteString(OVar("x")), plt.Integer(1)
-                            ),
-                        ),
-                        plt.ByteString(b"'"),
-                    ),
-                ),
-            ),
-        )
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        if isinstance(binop, Add):
-            if other == ByteStringInstanceType:
-                return ByteStringType()
-        if isinstance(binop, Mult):
-            if other == IntegerInstanceType:
-                return ByteStringType()
-        return super().binop_type(binop, other)
-
-    def _binop_bin_fun(self, binop: operator, other: AST):
-        if isinstance(binop, Add):
-            if other.typ == ByteStringInstanceType:
-                return plt.AppendByteString
-        if isinstance(binop, Mult):
-            if other.typ == IntegerInstanceType:
-                return ByteStrIntMulImpl
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return lambda x: plt.EqualsInteger(
-                plt.LengthOfByteString(x), plt.Integer(0)
-            )
-        return super()._unop_fun(unop)
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class BoolType(AtomicType):
-    def constr_type(self) -> "InstanceType":
-        return InstanceType(PolymorphicFunctionType(BoolImpl()))
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        if isinstance(o, IntegerType):
-            if isinstance(op, Eq):
-                # 1 == True
-                # 0 == False
-                # all other comparisons are False
-                return OLambda(
-                    ["y", "x"],
-                    plt.Ite(
-                        OVar("y"),
-                        plt.EqualsInteger(OVar("x"), plt.Integer(1)),
-                        plt.EqualsInteger(OVar("x"), plt.Integer(0)),
-                    ),
-                )
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["y", "x"],
-                    plt.Ite(
-                        OVar("y"),
-                        plt.NotEqualsInteger(OVar("x"), plt.Integer(1)),
-                        plt.NotEqualsInteger(OVar("x"), plt.Integer(0)),
-                    ),
-                )
-        if isinstance(o, BoolType):
-            if isinstance(op, Eq):
-                return OLambda(["x", "y"], plt.Iff(OVar("x"), OVar("y")))
-            if isinstance(op, NotEq):
-                return OLambda(["x", "y"], plt.Not(plt.Iff(OVar("x"), OVar("y"))))
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(
-            ["self"],
-            plt.Ite(
-                OVar("self"),
-                plt.Text("True"),
-                plt.Text("False"),
-            ),
-        )
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return plt.Not
-        return super()._unop_fun(unop)
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class UnitType(AtomicType):
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        if isinstance(o, UnitType):
-            if isinstance(op, Eq):
-                return OLambda(["x", "y"], plt.Bool(True))
-            if isinstance(op, NotEq):
-                return OLambda(["x", "y"], plt.Bool(False))
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(["self"], plt.Text("None"))
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return lambda x: plt.Bool(True)
-        return super()._unop_fun(unop)
-
-
-IntegerInstanceType = InstanceType(IntegerType())
-StringInstanceType = InstanceType(StringType())
-ByteStringInstanceType = InstanceType(ByteStringType())
-BoolInstanceType = InstanceType(BoolType())
-UnitInstanceType = InstanceType(UnitType())
-
-ATOMIC_TYPES = {
-    int.__name__: IntegerType(),
-    str.__name__: StringType(),
-    bytes.__name__: ByteStringType(),
-    bytearray.__name__: ByteStringType(),
-    type(None).__name__: UnitType(),
-    bool.__name__: BoolType(),
-}
-
-
-NoneInstanceType = UnitInstanceType
-
-
-class InaccessibleType(ClassType):
-    """A type that blocks overwriting of a function"""
-
-    pass
-
-
-def repeated_addition(zero, add):
-    # this is optimized for logarithmic complexity by exponentiation by squaring
-    # it follows the implementation described here: https://en.wikipedia.org/wiki/Exponentiation_by_squaring#With_constant_auxiliary_memory
-    def RepeatedAdd(x: plt.AST, y: plt.AST):
-        return plt.Apply(
-            plt.RecFun(
-                OLambda(
-                    ["f", "y", "x", "n"],
-                    plt.Ite(
-                        plt.LessThanEqualsInteger(OVar("n"), plt.Integer(0)),
-                        OVar("y"),
-                        OLet(
-                            [
-                                (
-                                    "n_half",
-                                    plt.DivideInteger(OVar("n"), plt.Integer(2)),
-                                )
-                            ],
-                            plt.Ite(
-                                # tests whether (x//2)*2 == x which is True iff x is even
-                                plt.EqualsInteger(
-                                    plt.AddInteger(OVar("n_half"), OVar("n_half")),
-                                    OVar("n"),
-                                ),
-                                plt.Apply(
-                                    OVar("f"),
-                                    OVar("f"),
-                                    OVar("y"),
-                                    add(OVar("x"), OVar("x")),
-                                    OVar("n_half"),
-                                ),
-                                plt.Apply(
-                                    OVar("f"),
-                                    OVar("f"),
-                                    add(OVar("y"), OVar("x")),
-                                    add(OVar("x"), OVar("x")),
-                                    OVar("n_half"),
-                                ),
-                            ),
-                        ),
-                    ),
-                ),
-            ),
-            zero,
-            x,
-            y,
-        )
-
-    return RepeatedAdd
-
-
-PowImpl = repeated_addition(plt.Integer(1), plt.MultiplyInteger)
-ByteStrIntMulImpl = repeated_addition(plt.ByteString(b""), plt.AppendByteString)
-StrIntMulImpl = repeated_addition(plt.Text(""), plt.AppendString)
-
-
-class PolymorphicFunction:
-    def __new__(meta, *args, **kwargs):
-        klass = super().__new__(meta)
-
-        for key in ["impl_from_args"]:
-            value = getattr(klass, key)
-            wrapped = patternize(value)
-            object.__setattr__(klass, key, wrapped)
-
-        return klass
-
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        raise NotImplementedError()
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        raise NotImplementedError()
-
-
-class StrImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'str' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only stringify instances"
-        return FunctionType(args, StringInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only stringify instances"
-        return arg.typ.stringify()
-
-
-class IntImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'int' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only create ints from instances"
-        assert any(
-            isinstance(typ.typ, t) for t in (IntegerType, StringType, BoolType)
-        ), "Can only create integers from int, str or bool"
-        return FunctionType(args, IntegerInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only create ints from instances"
-        if isinstance(arg.typ, IntegerType):
-            return OLambda(["x"], OVar("x"))
-        elif isinstance(arg.typ, BoolType):
-            return OLambda(
-                ["x"], plt.IfThenElse(OVar("x"), plt.Integer(1), plt.Integer(0))
-            )
-        elif isinstance(arg.typ, StringType):
-            return OLambda(
-                ["x"],
-                OLet(
-                    [
-                        ("e", plt.EncodeUtf8(OVar("x"))),
-                        ("len", plt.LengthOfByteString(OVar("e"))),
-                        (
-                            "first_int",
-                            plt.Ite(
-                                plt.LessThanInteger(plt.Integer(0), OVar("len")),
-                                plt.IndexByteString(OVar("e"), plt.Integer(0)),
-                                plt.Integer(ord("_")),
-                            ),
-                        ),
-                        (
-                            "last_int",
-                            plt.IndexByteString(
-                                OVar("e"),
-                                plt.SubtractInteger(OVar("len"), plt.Integer(1)),
-                            ),
-                        ),
-                        (
-                            "fold_start",
-                            OLambda(
-                                ["start"],
-                                plt.FoldList(
-                                    plt.Range(OVar("len"), OVar("start")),
-                                    OLambda(
-                                        ["s", "i"],
-                                        OLet(
-                                            [
-                                                (
-                                                    "b",
-                                                    plt.IndexByteString(
-                                                        OVar("e"), OVar("i")
-                                                    ),
-                                                )
-                                            ],
-                                            plt.Ite(
-                                                plt.EqualsInteger(
-                                                    OVar("b"), plt.Integer(ord("_"))
-                                                ),
-                                                OVar("s"),
-                                                plt.Ite(
-                                                    plt.Or(
-                                                        plt.LessThanInteger(
-                                                            OVar("b"),
-                                                            plt.Integer(ord("0")),
-                                                        ),
-                                                        plt.LessThanInteger(
-                                                            plt.Integer(ord("9")),
-                                                            OVar("b"),
-                                                        ),
-                                                    ),
-                                                    plt.TraceError(
-                                                        "ValueError: invalid literal for int() with base 10"
-                                                    ),
-                                                    plt.AddInteger(
-                                                        plt.SubtractInteger(
-                                                            OVar("b"),
-                                                            plt.Integer(ord("0")),
-                                                        ),
-                                                        plt.MultiplyInteger(
-                                                            OVar("s"),
-                                                            plt.Integer(10),
-                                                        ),
-                                                    ),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                    plt.Integer(0),
-                                ),
-                            ),
-                        ),
-                    ],
-                    plt.Ite(
-                        plt.Or(
-                            plt.Or(
-                                plt.EqualsInteger(
-                                    OVar("first_int"),
-                                    plt.Integer(ord("_")),
-                                ),
-                                plt.EqualsInteger(
-                                    OVar("last_int"),
-                                    plt.Integer(ord("_")),
-                                ),
-                            ),
-                            plt.And(
-                                plt.EqualsInteger(OVar("len"), plt.Integer(1)),
-                                plt.Or(
-                                    plt.EqualsInteger(
-                                        OVar("first_int"),
-                                        plt.Integer(ord("-")),
-                                    ),
-                                    plt.EqualsInteger(
-                                        OVar("first_int"),
-                                        plt.Integer(ord("+")),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        plt.TraceError(
-                            "ValueError: invalid literal for int() with base 10"
-                        ),
-                        plt.Ite(
-                            plt.EqualsInteger(
-                                OVar("first_int"),
-                                plt.Integer(ord("-")),
-                            ),
-                            plt.Negate(
-                                plt.Apply(OVar("fold_start"), plt.Integer(1)),
-                            ),
-                            plt.Ite(
-                                plt.EqualsInteger(
-                                    OVar("first_int"),
-                                    plt.Integer(ord("+")),
-                                ),
-                                plt.Apply(OVar("fold_start"), plt.Integer(1)),
-                                plt.Apply(OVar("fold_start"), plt.Integer(0)),
-                            ),
-                        ),
-                    ),
-                ),
-            )
-        else:
-            raise NotImplementedError(
-                f"Can not derive integer from type {arg.typ.__name__}"
-            )
-
-
-class BoolImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'bool' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only create bools from instances"
-        assert any(
-            isinstance(typ.typ, t)
-            for t in (
-                IntegerType,
-                StringType,
-                ByteStringType,
-                BoolType,
-                UnitType,
-                ListType,
-                DictType,
-            )
-        ), "Can only create bools from int, str, bool, bytes, None, list or dict"
-        return FunctionType(args, BoolInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only create bools from instances"
-        if isinstance(arg.typ, BoolType):
-            return OLambda(["x"], OVar("x"))
-        elif isinstance(arg.typ, IntegerType):
-            return OLambda(["x"], plt.NotEqualsInteger(OVar("x"), plt.Integer(0)))
-        elif isinstance(arg.typ, StringType):
-            return OLambda(
-                ["x"],
-                plt.NotEqualsInteger(
-                    plt.LengthOfByteString(plt.EncodeUtf8(OVar("x"))), plt.Integer(0)
-                ),
-            )
-        elif isinstance(arg.typ, ByteStringType):
-            return OLambda(
-                ["x"],
-                plt.NotEqualsInteger(plt.LengthOfByteString(OVar("x")), plt.Integer(0)),
-            )
-        elif isinstance(arg.typ, ListType) or isinstance(arg.typ, DictType):
-            return OLambda(["x"], plt.Not(plt.NullList(OVar("x"))))
-        elif isinstance(arg.typ, UnitType):
-            return OLambda(["x"], plt.Bool(False))
-        else:
-            raise NotImplementedError(
-                f"Can not derive bool from type {arg.typ.__name__}"
-            )
-
-
-class BytesImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'bytes' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only create bools from instances"
-        assert any(
-            isinstance(typ.typ, t)
-            for t in (
-                IntegerType,
-                ByteStringType,
-                ListType,
-            )
-        ), "Can only create bytes from int, bytes or integer lists"
-        if isinstance(typ.typ, ListType):
-            assert (
-                typ.typ.typ == IntegerInstanceType
-            ), "Can only create bytes from integer lists but got a list with another type"
-        return FunctionType(args, ByteStringInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only create bytes from instances"
-        if isinstance(arg.typ, ByteStringType):
-            return OLambda(["x"], OVar("x"))
-        elif isinstance(arg.typ, IntegerType):
-            return OLambda(
-                ["x"],
-                plt.Ite(
-                    plt.LessThanInteger(OVar("x"), plt.Integer(0)),
-                    plt.TraceError("ValueError: negative count"),
-                    ByteStrIntMulImpl(plt.ByteString(b"\x00"), OVar("x")),
-                ),
-            )
-        elif isinstance(arg.typ, ListType):
-            return OLambda(
-                ["xs"],
-                plt.RFoldList(
-                    OVar("xs"),
-                    OLambda(["a", "x"], plt.ConsByteString(OVar("x"), OVar("a"))),
-                    plt.ByteString(b""),
-                ),
-            )
-        else:
-            raise NotImplementedError(
-                f"Can not derive bytes from type {arg.typ.__name__}"
-            )
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class PolymorphicFunctionType(ClassType):
-    """A special type of builtin that may act differently on different parameters"""
-
-    polymorphic_function: PolymorphicFunction
-
-    def __ge__(self, other):
-        return (
-            isinstance(other, PolymorphicFunctionType)
-            and self.polymorphic_function == other.polymorphic_function
-        )
-
-
-@dataclass(frozen=True, unsafe_hash=True)
-class PolymorphicFunctionInstanceType(InstanceType):
-    typ: FunctionType
-    polymorphic_function: PolymorphicFunction
-
-
-EmptyListMap = {
-    IntegerInstanceType: plt.EmptyIntegerList(),
-    ByteStringInstanceType: plt.EmptyByteStringList(),
-    StringInstanceType: plt.EmptyTextList(),
-    UnitInstanceType: plt.EmptyUnitList(),
-    BoolInstanceType: plt.EmptyBoolList(),
-}
-
-
-def empty_list(p: Type):
-    if p in EmptyListMap:
-        return EmptyListMap[p]
-    assert isinstance(p, InstanceType), "Can only create lists of instances"
-    if isinstance(p.typ, ListType):
-        el = empty_list(p.typ.typ)
-        return plt.EmptyListList(uplc.BuiltinList([], el.sample_value))
-    if isinstance(p.typ, DictType):
-        return plt.EmptyListList(
-            uplc.BuiltinList(
-                [],
-                uplc.BuiltinPair(
-                    uplc.PlutusConstr(0, frozenlist([])),
-                    uplc.PlutusConstr(0, frozenlist([])),
-                ),
-            )
-        )
-    if (
-        isinstance(p.typ, RecordType)
-        or isinstance(p.typ, AnyType)
-        or isinstance(p.typ, UnionType)
-    ):
-        return plt.EmptyDataList()
-    raise NotImplementedError(f"Empty lists of type {p} can't be constructed yet")
-
-
-TransformExtParamsMap = {
-    IntegerInstanceType: lambda x: plt.UnIData(x),
-    ByteStringInstanceType: lambda x: plt.UnBData(x),
-    StringInstanceType: lambda x: plt.DecodeUtf8(plt.UnBData(x)),
-    UnitInstanceType: lambda x: plt.Apply(OLambda(["_"], plt.Unit())),
-    BoolInstanceType: lambda x: plt.NotEqualsInteger(plt.UnIData(x), plt.Integer(0)),
-}
-
-
-def transform_ext_params_map(p: Type):
-    assert isinstance(
-        p, InstanceType
-    ), "Can only transform instances, not classes as input"
-    if p in TransformExtParamsMap:
-        return TransformExtParamsMap[p]
-    if isinstance(p.typ, ListType):
-        list_int_typ = p.typ.typ
-        return lambda x: plt.MapList(
-            plt.UnListData(x),
-            OLambda(["x"], transform_ext_params_map(list_int_typ)(OVar("x"))),
-            empty_list(p.typ.typ),
-        )
-    if isinstance(p.typ, DictType):
-        # there doesn't appear to be a constructor function to make Pair a b for any types
-        # so pairs will always contain Data
-        return lambda x: plt.UnMapData(x)
-    return lambda x: x
-
-
-TransformOutputMap = {
-    StringInstanceType: lambda x: plt.BData(plt.EncodeUtf8(x)),
-    IntegerInstanceType: lambda x: plt.IData(x),
-    ByteStringInstanceType: lambda x: plt.BData(x),
-    UnitInstanceType: lambda x: plt.Apply(
-        OLambda(["_"], plt.ConstrData(plt.Integer(0), plt.EmptyDataList())), x
-    ),
-    BoolInstanceType: lambda x: plt.IData(
-        plt.IfThenElse(x, plt.Integer(1), plt.Integer(0))
-    ),
-}
-
-
-def transform_output_map(p: Type):
-    assert isinstance(
-        p, InstanceType
-    ), "Can only transform instances, not classes as input"
-    if isinstance(p.typ, FunctionType) or isinstance(p.typ, PolymorphicFunction):
-        raise NotImplementedError(
-            "Can not map functions into PlutusData and hence not return them from a function as Anything"
-        )
-    if p in TransformOutputMap:
-        return TransformOutputMap[p]
-    if isinstance(p.typ, ListType):
-        list_int_typ = p.typ.typ
-        return lambda x: plt.ListData(
-            plt.MapList(
-                x,
-                OLambda(["x"], transform_output_map(list_int_typ)(OVar("x"))),
-            ),
-        )
-    if isinstance(p.typ, DictType):
-        # there doesn't appear to be a constructor function to make Pair a b for any types
-        # so pairs will always contain Data
-        return lambda x: plt.MapData(x)
-    return lambda x: x
-
-
-
-
-
-
-
-

Functions

-
-
-def ByteStrIntMulImpl(x: pluthon.pluthon_ast.AST, y: pluthon.pluthon_ast.AST) -
-
-
-
-
-def PowImpl(x: pluthon.pluthon_ast.AST, y: pluthon.pluthon_ast.AST) -
-
-
-
-
-def StrIntMulImpl(x: pluthon.pluthon_ast.AST, y: pluthon.pluthon_ast.AST) -
-
-
-
-
-def empty_list(p: Type) -
-
-
-
-
-def repeated_addition(zero, add) -
-
-
-
-
-def transform_ext_params_map(p: Type) -
-
-
-
-
-def transform_output_map(p: Type) -
-
-
-
-
-
-
-

Classes

-
-
-class AnyType -
-
-

The top element in the partial order on types (excluding FunctionTypes, which do not compare to anything)

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class AnyType(ClassType):
-    """The top element in the partial order on types (excluding FunctionTypes, which do not compare to anything)"""
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "any"
-
-    def attribute_type(self, attr: str) -> Type:
-        """The types of the named attributes of this class"""
-        if attr == "CONSTR_ID":
-            return IntegerInstanceType
-        return super().attribute_type(attr)
-
-    def attribute(self, attr: str) -> plt.AST:
-        """The attributes of this class. Need to be a lambda that expects as first argument the object itself"""
-        if attr == "CONSTR_ID":
-            # access to constructor
-            return OLambda(
-                ["self"],
-                plt.Constructor(OVar("self")),
-            )
-        return super().attribute(attr)
-
-    def __ge__(self, other):
-        return (
-            isinstance(other, ClassType)
-            and not isinstance(other, FunctionType)
-            and not isinstance(other, PolymorphicFunctionType)
-        )
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        # this will reject comparisons that will always be false - most likely due to faults during programming
-        if (
-            (isinstance(o, RecordType))
-            or isinstance(o, UnionType)
-            or isinstance(o, AnyType)
-        ):
-            # Note that comparison with Record and UnionType is actually fine because both are Data
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsData)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                            OVar("y"),
-                        )
-                    ),
-                )
-        if (
-            isinstance(o, ListType)
-            and isinstance(o.typ, InstanceType)
-            and (o.typ.typ >= self or self >= o.typ.typ)
-        ):
-            if isinstance(op, In):
-                return OLambda(
-                    ["x", "y"],
-                    plt.AnyList(
-                        OVar("y"),
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                        ),
-                    ),
-                )
-            if isinstance(op, NotIn):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("y"),
-                            plt.Apply(
-                                plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                                OVar("x"),
-                            ),
-                        ),
-                    ),
-                )
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        OPSHIN_LOGGER.warning(
-            "Serializing AnyType will result in RawPlutusData (CBOR representation) to be printed without additional type information. Annotate types where possible to avoid this warning."
-        )
-        return OLambda(
-            ["self"],
-            OLet(
-                [
-                    (
-                        "joinMapList",
-                        OLambda(
-                            ["m", "l", "start", "end"],
-                            OLet(
-                                [
-                                    (
-                                        "g",
-                                        plt.RecFun(
-                                            OLambda(
-                                                ["f", "l"],
-                                                plt.AppendString(
-                                                    plt.Apply(
-                                                        OVar("m"),
-                                                        plt.HeadList(OVar("l")),
-                                                    ),
-                                                    OLet(
-                                                        [
-                                                            (
-                                                                "t",
-                                                                plt.TailList(OVar("l")),
-                                                            )
-                                                        ],
-                                                        plt.IteNullList(
-                                                            OVar("t"),
-                                                            OVar("end"),
-                                                            plt.AppendString(
-                                                                plt.Text(", "),
-                                                                plt.Apply(
-                                                                    OVar("f"),
-                                                                    OVar("f"),
-                                                                    OVar("t"),
-                                                                ),
-                                                            ),
-                                                        ),
-                                                    ),
-                                                ),
-                                            )
-                                        ),
-                                    )
-                                ],
-                                plt.AppendString(
-                                    OVar("start"),
-                                    plt.IteNullList(
-                                        OVar("l"),
-                                        OVar("end"),
-                                        plt.Apply(
-                                            OVar("g"),
-                                            OVar("l"),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                    ),
-                    (
-                        "stringifyPlutusData",
-                        plt.RecFun(
-                            OLambda(
-                                ["f", "d"],
-                                plt.DelayedChooseData(
-                                    OVar("d"),
-                                    OLet(
-                                        [
-                                            (
-                                                "constructor",
-                                                plt.FstPair(
-                                                    plt.UnConstrData(OVar("d"))
-                                                ),
-                                            )
-                                        ],
-                                        plt.Ite(
-                                            plt.LessThanInteger(
-                                                OVar("constructor"),
-                                                plt.Integer(128),
-                                            ),
-                                            plt.ConcatString(
-                                                plt.Text("CBORTag("),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.IData(
-                                                        plt.AddInteger(
-                                                            OVar("constructor"),
-                                                            plt.Ite(
-                                                                plt.LessThanInteger(
-                                                                    OVar("constructor"),
-                                                                    plt.Integer(7),
-                                                                ),
-                                                                plt.Integer(121),
-                                                                plt.Integer(1280 - 7),
-                                                            ),
-                                                        )
-                                                    ),
-                                                ),
-                                                plt.Text(", "),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.ListData(
-                                                        plt.SndPair(
-                                                            plt.UnConstrData(OVar("d"))
-                                                        )
-                                                    ),
-                                                ),
-                                                plt.Text(")"),
-                                            ),
-                                            plt.ConcatString(
-                                                plt.Text("CBORTag(102, "),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.ListData(
-                                                        plt.MkCons(
-                                                            plt.IData(
-                                                                OVar("constructor")
-                                                            ),
-                                                            plt.MkCons(
-                                                                plt.ListData(
-                                                                    plt.SndPair(
-                                                                        plt.UnConstrData(
-                                                                            OVar("d")
-                                                                        )
-                                                                    )
-                                                                ),
-                                                                plt.EmptyDataList(),
-                                                            ),
-                                                        )
-                                                    ),
-                                                ),
-                                                plt.Text(")"),
-                                            ),
-                                        ),
-                                    ),
-                                    plt.Apply(
-                                        OVar("joinMapList"),
-                                        OLambda(
-                                            ["x"],
-                                            plt.ConcatString(
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.FstPair(OVar("x")),
-                                                ),
-                                                plt.Text(": "),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.SndPair(OVar("x")),
-                                                ),
-                                            ),
-                                        ),
-                                        plt.UnMapData(OVar("d")),
-                                        plt.Text("{"),
-                                        plt.Text("}"),
-                                    ),
-                                    plt.Apply(
-                                        OVar("joinMapList"),
-                                        OLambda(
-                                            ["x"],
-                                            plt.Apply(
-                                                OVar("f"),
-                                                OVar("f"),
-                                                OVar("x"),
-                                            ),
-                                        ),
-                                        plt.UnListData(OVar("d")),
-                                        plt.Text("["),
-                                        plt.Text("]"),
-                                    ),
-                                    plt.Apply(
-                                        IntegerInstanceType.stringify(recursive=True),
-                                        plt.UnIData(OVar("d")),
-                                    ),
-                                    plt.Apply(
-                                        ByteStringInstanceType.stringify(
-                                            recursive=True
-                                        ),
-                                        plt.UnBData(OVar("d")),
-                                    ),
-                                ),
-                            )
-                        ),
-                    ),
-                ],
-                plt.ConcatString(
-                    plt.Text("RawPlutusData(data="),
-                    plt.Apply(OVar("stringifyPlutusData"), OVar("self")),
-                    plt.Text(")"),
-                ),
-            ),
-        )
-
-

Ancestors

- -

Methods

-
-
-def attribute(self, attr: str) ‑> pluthon.pluthon_ast.AST -
-
-

The attributes of this class. Need to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr: str) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class AtomicType -
-
-

AtomicType()

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class AtomicType(ClassType):
-    def __ge__(self, other):
-        # Can only substitute for its own type (also subtypes)
-        return isinstance(other, self.__class__)
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class BoolImpl -(*args, **kwargs) -
-
-
-
- -Expand source code - -
class BoolImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'bool' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only create bools from instances"
-        assert any(
-            isinstance(typ.typ, t)
-            for t in (
-                IntegerType,
-                StringType,
-                ByteStringType,
-                BoolType,
-                UnitType,
-                ListType,
-                DictType,
-            )
-        ), "Can only create bools from int, str, bool, bytes, None, list or dict"
-        return FunctionType(args, BoolInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only create bools from instances"
-        if isinstance(arg.typ, BoolType):
-            return OLambda(["x"], OVar("x"))
-        elif isinstance(arg.typ, IntegerType):
-            return OLambda(["x"], plt.NotEqualsInteger(OVar("x"), plt.Integer(0)))
-        elif isinstance(arg.typ, StringType):
-            return OLambda(
-                ["x"],
-                plt.NotEqualsInteger(
-                    plt.LengthOfByteString(plt.EncodeUtf8(OVar("x"))), plt.Integer(0)
-                ),
-            )
-        elif isinstance(arg.typ, ByteStringType):
-            return OLambda(
-                ["x"],
-                plt.NotEqualsInteger(plt.LengthOfByteString(OVar("x")), plt.Integer(0)),
-            )
-        elif isinstance(arg.typ, ListType) or isinstance(arg.typ, DictType):
-            return OLambda(["x"], plt.Not(plt.NullList(OVar("x"))))
-        elif isinstance(arg.typ, UnitType):
-            return OLambda(["x"], plt.Bool(False))
-        else:
-            raise NotImplementedError(
-                f"Can not derive bool from type {arg.typ.__name__}"
-            )
-
-

Ancestors

- -

Methods

-
-
-def impl_from_args(self, args: List[Type]) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def type_from_args(self, args: List[Type]) ‑> FunctionType -
-
-
-
-
-
-
-class BoolType -
-
-

BoolType()

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class BoolType(AtomicType):
-    def constr_type(self) -> "InstanceType":
-        return InstanceType(PolymorphicFunctionType(BoolImpl()))
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        if isinstance(o, IntegerType):
-            if isinstance(op, Eq):
-                # 1 == True
-                # 0 == False
-                # all other comparisons are False
-                return OLambda(
-                    ["y", "x"],
-                    plt.Ite(
-                        OVar("y"),
-                        plt.EqualsInteger(OVar("x"), plt.Integer(1)),
-                        plt.EqualsInteger(OVar("x"), plt.Integer(0)),
-                    ),
-                )
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["y", "x"],
-                    plt.Ite(
-                        OVar("y"),
-                        plt.NotEqualsInteger(OVar("x"), plt.Integer(1)),
-                        plt.NotEqualsInteger(OVar("x"), plt.Integer(0)),
-                    ),
-                )
-        if isinstance(o, BoolType):
-            if isinstance(op, Eq):
-                return OLambda(["x", "y"], plt.Iff(OVar("x"), OVar("y")))
-            if isinstance(op, NotEq):
-                return OLambda(["x", "y"], plt.Not(plt.Iff(OVar("x"), OVar("y"))))
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(
-            ["self"],
-            plt.Ite(
-                OVar("self"),
-                plt.Text("True"),
-                plt.Text("False"),
-            ),
-        )
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return plt.Not
-        return super()._unop_fun(unop)
-
-

Ancestors

- -

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -AtomicType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -AtomicType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -AtomicType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -AtomicType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -AtomicType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class ByteStringType -
-
-

ByteStringType()

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class ByteStringType(AtomicType):
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "bytes"
-
-    def constr_type(self) -> InstanceType:
-        return InstanceType(PolymorphicFunctionType(BytesImpl()))
-
-    def attribute_type(self, attr) -> Type:
-        if attr == "decode":
-            return InstanceType(FunctionType(frozenlist([]), StringInstanceType))
-        if attr == "hex":
-            return InstanceType(FunctionType(frozenlist([]), StringInstanceType))
-        if attr == "fromhex":
-            return InstanceType(
-                FunctionType(
-                    frozenlist([StringInstanceType]),
-                    ByteStringInstanceType,
-                )
-            )
-        return super().attribute_type(attr)
-
-    def attribute(self, attr) -> plt.AST:
-        if attr == "decode":
-            # No codec -> only the default (utf8) is allowed
-            return OLambda(["x", "_"], plt.DecodeUtf8(OVar("x")))
-        if attr == "hex":
-            return OLambda(
-                ["x", "_"],
-                plt.DecodeUtf8(
-                    OLet(
-                        [
-                            (
-                                "hexlist",
-                                plt.RecFun(
-                                    OLambda(
-                                        ["f", "i"],
-                                        plt.Ite(
-                                            plt.LessThanInteger(
-                                                OVar("i"), plt.Integer(0)
-                                            ),
-                                            plt.EmptyIntegerList(),
-                                            plt.MkCons(
-                                                plt.IndexByteString(
-                                                    OVar("x"), OVar("i")
-                                                ),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    plt.SubtractInteger(
-                                                        OVar("i"), plt.Integer(1)
-                                                    ),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                            (
-                                "map_str",
-                                OLambda(
-                                    ["i"],
-                                    plt.AddInteger(
-                                        OVar("i"),
-                                        plt.IfThenElse(
-                                            plt.LessThanInteger(
-                                                OVar("i"), plt.Integer(10)
-                                            ),
-                                            plt.Integer(ord("0")),
-                                            plt.Integer(ord("a") - 10),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                            (
-                                "mkstr",
-                                OLambda(
-                                    ["i"],
-                                    plt.FoldList(
-                                        plt.Apply(OVar("hexlist"), OVar("i")),
-                                        OLambda(
-                                            ["b", "i"],
-                                            plt.ConsByteString(
-                                                plt.Apply(
-                                                    OVar("map_str"),
-                                                    plt.DivideInteger(
-                                                        OVar("i"), plt.Integer(16)
-                                                    ),
-                                                ),
-                                                plt.ConsByteString(
-                                                    plt.Apply(
-                                                        OVar("map_str"),
-                                                        plt.ModInteger(
-                                                            OVar("i"),
-                                                            plt.Integer(16),
-                                                        ),
-                                                    ),
-                                                    OVar("b"),
-                                                ),
-                                            ),
-                                        ),
-                                        plt.ByteString(b""),
-                                    ),
-                                ),
-                            ),
-                        ],
-                        plt.Apply(
-                            OVar("mkstr"),
-                            plt.SubtractInteger(
-                                plt.LengthOfByteString(OVar("x")), plt.Integer(1)
-                            ),
-                        ),
-                    ),
-                ),
-            )
-        if attr == "fromhex":
-            return OLambda(
-                ["_", "x"],
-                OLet(
-                    [
-                        (
-                            "bytestr",
-                            plt.EncodeUtf8(plt.Force(OVar("x"))),
-                        ),
-                        (
-                            "bytestr_len",
-                            plt.LengthOfByteString(OVar("bytestr")),
-                        ),
-                        (
-                            "char_to_int",
-                            OLambda(
-                                ["c"],
-                                plt.Ite(
-                                    plt.And(
-                                        plt.LessThanEqualsInteger(
-                                            plt.Integer(ord("a")), OVar("c")
-                                        ),
-                                        plt.LessThanEqualsInteger(
-                                            OVar("c"), plt.Integer(ord("f"))
-                                        ),
-                                    ),
-                                    plt.AddInteger(
-                                        plt.SubtractInteger(
-                                            OVar("c"), plt.Integer(ord("a"))
-                                        ),
-                                        plt.Integer(10),
-                                    ),
-                                    plt.Ite(
-                                        plt.And(
-                                            plt.LessThanEqualsInteger(
-                                                plt.Integer(ord("0")), OVar("c")
-                                            ),
-                                            plt.LessThanEqualsInteger(
-                                                OVar("c"), plt.Integer(ord("9"))
-                                            ),
-                                        ),
-                                        plt.SubtractInteger(
-                                            OVar("c"), plt.Integer(ord("0"))
-                                        ),
-                                        plt.Ite(
-                                            plt.And(
-                                                plt.LessThanEqualsInteger(
-                                                    plt.Integer(ord("A")), OVar("c")
-                                                ),
-                                                plt.LessThanEqualsInteger(
-                                                    OVar("c"), plt.Integer(ord("F"))
-                                                ),
-                                            ),
-                                            plt.AddInteger(
-                                                plt.SubtractInteger(
-                                                    OVar("c"), plt.Integer(ord("A"))
-                                                ),
-                                                plt.Integer(10),
-                                            ),
-                                            plt.TraceError("Invalid hex character"),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        (
-                            "splitlist",
-                            plt.RecFun(
-                                OLambda(
-                                    ["f", "i"],
-                                    plt.Ite(
-                                        plt.LessThanInteger(
-                                            OVar("bytestr_len"),
-                                            plt.AddInteger(OVar("i"), plt.Integer(1)),
-                                        ),
-                                        plt.ByteString(b""),
-                                        plt.Ite(
-                                            plt.LessThanInteger(
-                                                OVar("bytestr_len"),
-                                                plt.AddInteger(
-                                                    OVar("i"), plt.Integer(2)
-                                                ),
-                                            ),
-                                            plt.TraceError("Invalid hex string"),
-                                            OLet(
-                                                [
-                                                    (
-                                                        "char_at_i",
-                                                        plt.IndexByteString(
-                                                            OVar("bytestr"),
-                                                            OVar("i"),
-                                                        ),
-                                                    ),
-                                                    (
-                                                        "char_at_ip1",
-                                                        plt.IndexByteString(
-                                                            OVar("bytestr"),
-                                                            plt.AddInteger(
-                                                                OVar("i"),
-                                                                plt.Integer(1),
-                                                            ),
-                                                        ),
-                                                    ),
-                                                ],
-                                                plt.ConsByteString(
-                                                    plt.AddInteger(
-                                                        plt.MultiplyInteger(
-                                                            plt.Apply(
-                                                                OVar("char_to_int"),
-                                                                OVar("char_at_i"),
-                                                            ),
-                                                            plt.Integer(16),
-                                                        ),
-                                                        plt.Apply(
-                                                            OVar("char_to_int"),
-                                                            OVar("char_at_ip1"),
-                                                        ),
-                                                    ),
-                                                    plt.Apply(
-                                                        OVar("f"),
-                                                        OVar("f"),
-                                                        plt.AddInteger(
-                                                            OVar("i"),
-                                                            plt.Integer(2),
-                                                        ),
-                                                    ),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                )
-                            ),
-                        ),
-                    ],
-                    plt.Apply(OVar("splitlist"), plt.Integer(0)),
-                ),
-            )
-        return super().attribute(attr)
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        if isinstance(o, ByteStringType):
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsByteString)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsByteString),
-                            OVar("y"),
-                            OVar("x"),
-                        )
-                    ),
-                )
-            if isinstance(op, Lt):
-                return plt.BuiltIn(uplc.BuiltInFun.LessThanByteString)
-            if isinstance(op, LtE):
-                return plt.BuiltIn(uplc.BuiltInFun.LessThanEqualsByteString)
-            if isinstance(op, Gt):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Apply(
-                        plt.BuiltIn(uplc.BuiltInFun.LessThanByteString),
-                        OVar("y"),
-                        OVar("x"),
-                    ),
-                )
-            if isinstance(op, GtE):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Apply(
-                        plt.BuiltIn(uplc.BuiltInFun.LessThanEqualsByteString),
-                        OVar("y"),
-                        OVar("x"),
-                    ),
-                )
-        if (
-            isinstance(o, ListType)
-            and isinstance(o.typ, InstanceType)
-            and isinstance(o.typ.typ, ByteStringType)
-        ):
-            if isinstance(op, In):
-                return OLambda(
-                    ["x", "y"],
-                    plt.AnyList(
-                        OVar("y"),
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsByteString),
-                            OVar("x"),
-                        ),
-                    ),
-                )
-            if isinstance(op, NotIn):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("y"),
-                            plt.Apply(
-                                plt.BuiltIn(uplc.BuiltInFun.EqualsByteString),
-                                OVar("x"),
-                            ),
-                        ),
-                    ),
-                )
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(
-            ["x"],
-            plt.DecodeUtf8(
-                OLet(
-                    [
-                        (
-                            "hexlist",
-                            plt.RecFun(
-                                OLambda(
-                                    ["f", "i"],
-                                    plt.Ite(
-                                        plt.LessThanInteger(OVar("i"), plt.Integer(0)),
-                                        plt.EmptyIntegerList(),
-                                        plt.MkCons(
-                                            plt.IndexByteString(OVar("x"), OVar("i")),
-                                            plt.Apply(
-                                                OVar("f"),
-                                                OVar("f"),
-                                                plt.SubtractInteger(
-                                                    OVar("i"), plt.Integer(1)
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        (
-                            "map_str",
-                            OLambda(
-                                ["i"],
-                                plt.AddInteger(
-                                    OVar("i"),
-                                    plt.IfThenElse(
-                                        plt.LessThanInteger(OVar("i"), plt.Integer(10)),
-                                        plt.Integer(ord("0")),
-                                        plt.Integer(ord("a") - 10),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        (
-                            "mkstr",
-                            OLambda(
-                                ["i"],
-                                plt.FoldList(
-                                    plt.Apply(OVar("hexlist"), OVar("i")),
-                                    OLambda(
-                                        ["b", "i"],
-                                        plt.Ite(
-                                            # ascii printable characters are kept unmodified
-                                            plt.And(
-                                                plt.LessThanEqualsInteger(
-                                                    plt.Integer(0x20), OVar("i")
-                                                ),
-                                                plt.LessThanEqualsInteger(
-                                                    OVar("i"), plt.Integer(0x7E)
-                                                ),
-                                            ),
-                                            plt.Ite(
-                                                plt.EqualsInteger(
-                                                    OVar("i"),
-                                                    plt.Integer(ord("\\")),
-                                                ),
-                                                plt.AppendByteString(
-                                                    plt.ByteString(b"\\\\"),
-                                                    OVar("b"),
-                                                ),
-                                                plt.Ite(
-                                                    plt.EqualsInteger(
-                                                        OVar("i"),
-                                                        plt.Integer(ord("'")),
-                                                    ),
-                                                    plt.AppendByteString(
-                                                        plt.ByteString(b"\\'"),
-                                                        OVar("b"),
-                                                    ),
-                                                    plt.ConsByteString(
-                                                        OVar("i"), OVar("b")
-                                                    ),
-                                                ),
-                                            ),
-                                            plt.Ite(
-                                                plt.EqualsInteger(
-                                                    OVar("i"), plt.Integer(ord("\t"))
-                                                ),
-                                                plt.AppendByteString(
-                                                    plt.ByteString(b"\\t"), OVar("b")
-                                                ),
-                                                plt.Ite(
-                                                    plt.EqualsInteger(
-                                                        OVar("i"),
-                                                        plt.Integer(ord("\n")),
-                                                    ),
-                                                    plt.AppendByteString(
-                                                        plt.ByteString(b"\\n"),
-                                                        OVar("b"),
-                                                    ),
-                                                    plt.Ite(
-                                                        plt.EqualsInteger(
-                                                            OVar("i"),
-                                                            plt.Integer(ord("\r")),
-                                                        ),
-                                                        plt.AppendByteString(
-                                                            plt.ByteString(b"\\r"),
-                                                            OVar("b"),
-                                                        ),
-                                                        plt.AppendByteString(
-                                                            plt.ByteString(b"\\x"),
-                                                            plt.ConsByteString(
-                                                                plt.Apply(
-                                                                    OVar("map_str"),
-                                                                    plt.DivideInteger(
-                                                                        OVar("i"),
-                                                                        plt.Integer(16),
-                                                                    ),
-                                                                ),
-                                                                plt.ConsByteString(
-                                                                    plt.Apply(
-                                                                        OVar("map_str"),
-                                                                        plt.ModInteger(
-                                                                            OVar("i"),
-                                                                            plt.Integer(
-                                                                                16
-                                                                            ),
-                                                                        ),
-                                                                    ),
-                                                                    OVar("b"),
-                                                                ),
-                                                            ),
-                                                        ),
-                                                    ),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                    plt.ByteString(b""),
-                                ),
-                            ),
-                        ),
-                    ],
-                    plt.ConcatByteString(
-                        plt.ByteString(b"b'"),
-                        plt.Apply(
-                            OVar("mkstr"),
-                            plt.SubtractInteger(
-                                plt.LengthOfByteString(OVar("x")), plt.Integer(1)
-                            ),
-                        ),
-                        plt.ByteString(b"'"),
-                    ),
-                ),
-            ),
-        )
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        if isinstance(binop, Add):
-            if other == ByteStringInstanceType:
-                return ByteStringType()
-        if isinstance(binop, Mult):
-            if other == IntegerInstanceType:
-                return ByteStringType()
-        return super().binop_type(binop, other)
-
-    def _binop_bin_fun(self, binop: operator, other: AST):
-        if isinstance(binop, Add):
-            if other.typ == ByteStringInstanceType:
-                return plt.AppendByteString
-        if isinstance(binop, Mult):
-            if other.typ == IntegerInstanceType:
-                return ByteStrIntMulImpl
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return lambda x: plt.EqualsInteger(
-                plt.LengthOfByteString(x), plt.Integer(0)
-            )
-        return super()._unop_fun(unop)
-
-

Ancestors

- -

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -AtomicType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -AtomicType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -AtomicType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -AtomicType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -AtomicType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class BytesImpl -(*args, **kwargs) -
-
-
-
- -Expand source code - -
class BytesImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'bytes' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only create bools from instances"
-        assert any(
-            isinstance(typ.typ, t)
-            for t in (
-                IntegerType,
-                ByteStringType,
-                ListType,
-            )
-        ), "Can only create bytes from int, bytes or integer lists"
-        if isinstance(typ.typ, ListType):
-            assert (
-                typ.typ.typ == IntegerInstanceType
-            ), "Can only create bytes from integer lists but got a list with another type"
-        return FunctionType(args, ByteStringInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only create bytes from instances"
-        if isinstance(arg.typ, ByteStringType):
-            return OLambda(["x"], OVar("x"))
-        elif isinstance(arg.typ, IntegerType):
-            return OLambda(
-                ["x"],
-                plt.Ite(
-                    plt.LessThanInteger(OVar("x"), plt.Integer(0)),
-                    plt.TraceError("ValueError: negative count"),
-                    ByteStrIntMulImpl(plt.ByteString(b"\x00"), OVar("x")),
-                ),
-            )
-        elif isinstance(arg.typ, ListType):
-            return OLambda(
-                ["xs"],
-                plt.RFoldList(
-                    OVar("xs"),
-                    OLambda(["a", "x"], plt.ConsByteString(OVar("x"), OVar("a"))),
-                    plt.ByteString(b""),
-                ),
-            )
-        else:
-            raise NotImplementedError(
-                f"Can not derive bytes from type {arg.typ.__name__}"
-            )
-
-

Ancestors

- -

Methods

-
-
-def impl_from_args(self, args: List[Type]) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def type_from_args(self, args: List[Type]) ‑> FunctionType -
-
-
-
-
-
-
-class ClassType -
-
-

ClassType()

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class ClassType(Type):
-    def __ge__(self, other):
-        """
-        Returns whether other can be substituted for this type.
-        In other words this returns whether the interface of this type is a subset of the interface of other.
-        Note that this is usually <= and not >=, but this needs to be fixed later.
-        Produces a partial order on types.
-        The top element is the most generic type and can not substitute for anything.
-        The bottom element is the most specific type and can be substituted for anything.
-        """
-        raise NotImplementedError("Comparison between raw classtypes impossible")
-
-    def copy_only_attributes(self) -> plt.AST:
-        """
-        Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too).
-        For anything but record types and union types, this is the identity function.
-        """
-        return OLambda(["self"], OVar("self"))
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -Type.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -Type.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -Type.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record types and union types, this is the identity function.

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -Type.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -Type.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class DictType -(key_typ: Type, value_typ: Type) -
-
-

DictType(key_typ: opshin.type_impls.Type, value_typ: opshin.type_impls.Type)

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class DictType(ClassType):
-    key_typ: Type
-    value_typ: Type
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "map<" + self.key_typ.id_map() + "," + self.value_typ.id_map() + ">"
-
-    def attribute_type(self, attr) -> "Type":
-        if attr == "get":
-            return InstanceType(
-                FunctionType(frozenlist([self.key_typ, self.value_typ]), self.value_typ)
-            )
-        if attr == "keys":
-            return InstanceType(
-                FunctionType(frozenlist([]), InstanceType(ListType(self.key_typ)))
-            )
-        if attr == "values":
-            return InstanceType(
-                FunctionType(frozenlist([]), InstanceType(ListType(self.value_typ)))
-            )
-        if attr == "items":
-            return InstanceType(
-                FunctionType(
-                    frozenlist([]),
-                    InstanceType(
-                        ListType(InstanceType(PairType(self.key_typ, self.value_typ)))
-                    ),
-                )
-            )
-        raise TypeInferenceError(
-            f"Type of attribute '{attr}' is unknown for type Dict."
-        )
-
-    def attribute(self, attr) -> plt.AST:
-        if attr == "get":
-            return OLambda(
-                ["self", "key", "default"],
-                transform_ext_params_map(self.value_typ)(
-                    OLet(
-                        [
-                            (
-                                "key_mapped",
-                                transform_output_map(self.key_typ)(
-                                    plt.Force(OVar("key"))
-                                ),
-                            )
-                        ],
-                        plt.SndPair(
-                            plt.FindList(
-                                OVar("self"),
-                                OLambda(
-                                    ["x"],
-                                    plt.EqualsData(
-                                        OVar("key_mapped"),
-                                        plt.FstPair(OVar("x")),
-                                    ),
-                                ),
-                                # this is a bit ugly... we wrap - only to later unwrap again
-                                plt.MkPairData(
-                                    OVar("key_mapped"),
-                                    transform_output_map(self.value_typ)(
-                                        plt.Force(OVar("default"))
-                                    ),
-                                ),
-                            ),
-                        ),
-                    ),
-                ),
-            )
-        if attr == "keys":
-            return OLambda(
-                ["self", "_"],
-                plt.MapList(
-                    OVar("self"),
-                    OLambda(
-                        ["x"],
-                        transform_ext_params_map(self.key_typ)(plt.FstPair(OVar("x"))),
-                    ),
-                    empty_list(self.key_typ),
-                ),
-            )
-        if attr == "values":
-            return OLambda(
-                ["self", "_"],
-                plt.MapList(
-                    OVar("self"),
-                    OLambda(
-                        ["x"],
-                        transform_ext_params_map(self.value_typ)(
-                            plt.SndPair(OVar("x"))
-                        ),
-                    ),
-                    empty_list(self.value_typ),
-                ),
-            )
-        if attr == "items":
-            return OLambda(
-                ["self", "_"],
-                OVar("self"),
-            )
-        raise NotImplementedError(f"Attribute '{attr}' of Dict is unknown.")
-
-    def __ge__(self, other):
-        return (
-            isinstance(other, DictType)
-            and self.key_typ >= other.key_typ
-            and self.value_typ >= other.value_typ
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(
-            ["self"],
-            OLet(
-                [
-                    (
-                        "g",
-                        plt.RecFun(
-                            OLambda(
-                                ["f", "l"],
-                                OLet(
-                                    [
-                                        ("h", plt.HeadList(OVar("l"))),
-                                        ("t", plt.TailList(OVar("l"))),
-                                    ],
-                                    plt.ConcatString(
-                                        plt.Apply(
-                                            self.key_typ.stringify(recursive=True),
-                                            transform_ext_params_map(self.key_typ)(
-                                                plt.FstPair(OVar("h"))
-                                            ),
-                                        ),
-                                        plt.Text(": "),
-                                        plt.Apply(
-                                            self.value_typ.stringify(recursive=True),
-                                            transform_ext_params_map(self.value_typ)(
-                                                plt.SndPair(OVar("h"))
-                                            ),
-                                        ),
-                                        plt.IteNullList(
-                                            OVar("t"),
-                                            plt.Text("}"),
-                                            plt.AppendString(
-                                                plt.Text(", "),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    OVar("t"),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            )
-                        ),
-                    )
-                ],
-                plt.AppendString(
-                    plt.Text("{"),
-                    plt.IteNullList(
-                        OVar("self"),
-                        plt.Text("}"),
-                        plt.Apply(
-                            OVar("g"),
-                            OVar("self"),
-                        ),
-                    ),
-                ),
-            ),
-        )
-
-    def copy_only_attributes(self) -> plt.AST:
-        def CustomMapFilterList(
-            l: plt.AST,
-            filter_op: plt.AST,
-            map_op: plt.AST,
-            empty_list=plt.EmptyDataList(),
-        ):
-            from pluthon import (
-                Apply,
-                Lambda as PLambda,
-                RecFun,
-                IteNullList,
-                Var as PVar,
-                HeadList,
-                Ite,
-                TailList,
-                PrependList,
-                Let as PLet,
-            )
-
-            """
-            Apply a filter and a map function on each element in a list (throws out all that evaluate to false)
-            Performs only a single pass and is hence much more efficient than filter + map
-            """
-            return Apply(
-                PLambda(
-                    ["filter", "map"],
-                    RecFun(
-                        PLambda(
-                            ["filtermap", "xs"],
-                            IteNullList(
-                                PVar("xs"),
-                                empty_list,
-                                PLet(
-                                    [
-                                        ("head", HeadList(PVar("xs"))),
-                                        ("tail", TailList(PVar("xs"))),
-                                    ],
-                                    Ite(
-                                        Apply(
-                                            PVar("filter"), PVar("head"), PVar("tail")
-                                        ),
-                                        PrependList(
-                                            Apply(PVar("map"), PVar("head")),
-                                            Apply(
-                                                PVar("filtermap"),
-                                                PVar("filtermap"),
-                                                PVar("tail"),
-                                            ),
-                                        ),
-                                        Apply(
-                                            PVar("filtermap"),
-                                            PVar("filtermap"),
-                                            PVar("tail"),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                    ),
-                ),
-                filter_op,
-                map_op,
-                l,
-            )
-
-        mapped_attrs = CustomMapFilterList(
-            OVar("self"),
-            OLambda(
-                ["h", "t"],
-                OLet(
-                    [
-                        ("hfst", plt.FstPair(OVar("h"))),
-                    ],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("t"),
-                            OLambda(
-                                ["e"],
-                                plt.EqualsData(OVar("hfst"), plt.FstPair(OVar("e"))),
-                            ),
-                        )
-                    ),
-                ),
-            ),
-            OLambda(
-                ["v"],
-                plt.MkPairData(
-                    transform_output_map(self.key_typ)(
-                        plt.Apply(
-                            self.key_typ.copy_only_attributes(),
-                            transform_ext_params_map(self.key_typ)(
-                                plt.FstPair(OVar("v"))
-                            ),
-                        )
-                    ),
-                    transform_output_map(self.value_typ)(
-                        plt.Apply(
-                            self.value_typ.copy_only_attributes(),
-                            transform_ext_params_map(self.value_typ)(
-                                plt.SndPair(OVar("v"))
-                            ),
-                        )
-                    ),
-                ),
-            ),
-            plt.EmptyDataPairList(),
-        )
-        return OLambda(["self"], mapped_attrs)
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return lambda x: plt.IteNullList(x, plt.Bool(True), plt.Bool(False))
-        return super()._unop_fun(unop)
-
-

Ancestors

- -

Class variables

-
-
var key_typType
-
-
-
-
var value_typType
-
-
-
-
-

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class FunctionType -(argtyps: List[Type], rettyp: Type, bound_vars: Dict[str, Type] = <factory>, bind_self: Optional[str] = None) -
-
-

FunctionType(argtyps: List[opshin.type_impls.Type], rettyp: opshin.type_impls.Type, bound_vars: Dict[str, opshin.type_impls.Type] = , bind_self: Optional[str] = None)

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class FunctionType(ClassType):
-    argtyps: typing.List[Type]
-    rettyp: Type
-    # A map from external variable names to their types when the function is defined
-    bound_vars: typing.Dict[str, Type] = dataclasses.field(default_factory=frozendict)
-    # Whether and under which name the function binds itself
-    # The type of this variable is "self"
-    bind_self: typing.Optional[str] = None
-
-    def __post_init__(self):
-        object.__setattr__(self, "argtyps", frozenlist(self.argtyps))
-        object.__setattr__(self, "bound_vars", frozendict(self.bound_vars))
-
-    def __ge__(self, other):
-        return (
-            isinstance(other, FunctionType)
-            and len(self.argtyps) == len(other.argtyps)
-            and all(a >= oa for a, oa in zip(self.argtyps, other.argtyps))
-            and self.bound_vars.keys() == other.bound_vars.keys()
-            and all(sbv >= other.bound_vars[k] for k, sbv in self.bound_vars.items())
-            and self.bind_self == other.bind_self
-            and other.rettyp >= self.rettyp
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(["x"], plt.Text("<function>"))
-
-

Ancestors

- -

Class variables

-
-
var argtyps : List[Type]
-
-
-
-
var bind_self : Optional[str]
-
-
-
-
var bound_vars : Dict[str, Type]
-
-
-
-
var rettypType
-
-
-
-
-

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class InaccessibleType -
-
-

A type that blocks overwriting of a function

-
- -Expand source code - -
class InaccessibleType(ClassType):
-    """A type that blocks overwriting of a function"""
-
-    pass
-
-

Ancestors

- -

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class InstanceType -(typ: ClassType) -
-
-

InstanceType(typ: opshin.type_impls.ClassType)

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class InstanceType(Type):
-    typ: ClassType
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return self.typ.id_map(skip_constructor=skip_constructor)
-
-    def constr_type(self) -> FunctionType:
-        raise TypeInferenceError(f"Can not construct an instance {self}")
-
-    def constr(self) -> plt.AST:
-        raise NotImplementedError(f"Can not construct an instance {self}")
-
-    def attribute_type(self, attr) -> Type:
-        return self.typ.attribute_type(attr)
-
-    def attribute(self, attr) -> plt.AST:
-        return self.typ.attribute(attr)
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        if isinstance(o, InstanceType):
-            return self.typ.cmp(op, o.typ)
-        return super().cmp(op, o)
-
-    def __ge__(self, other):
-        return isinstance(other, InstanceType) and self.typ >= other.typ
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return self.typ.stringify(recursive=recursive)
-
-    def copy_only_attributes(self) -> plt.AST:
-        return self.typ.copy_only_attributes()
-
-    def binop_type(self, binop: operator, other: "Type") -> "Type":
-        return self.typ.binop_type(binop, other)
-
-    def binop(self, binop: operator, other: AST) -> plt.AST:
-        return self.typ.binop(binop, other)
-
-    def unop_type(self, unop: unaryop) -> "Type":
-        return self.typ.unop_type(unop)
-
-    def unop(self, unop: unaryop) -> plt.AST:
-        return self.typ.unop(unop)
-
-

Ancestors

- -

Subclasses

- -

Class variables

-
-
var typClassType
-
-
-
-
-

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -Type.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -Type.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> FunctionType -
-
-

-Inherited from: -Type.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.copy_only_attributes -

-

Pluthon function that returns a copy of only the attributes of the object

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -Type.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -Type.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -Type.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class IntImpl -(*args, **kwargs) -
-
-
-
- -Expand source code - -
class IntImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'int' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only create ints from instances"
-        assert any(
-            isinstance(typ.typ, t) for t in (IntegerType, StringType, BoolType)
-        ), "Can only create integers from int, str or bool"
-        return FunctionType(args, IntegerInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only create ints from instances"
-        if isinstance(arg.typ, IntegerType):
-            return OLambda(["x"], OVar("x"))
-        elif isinstance(arg.typ, BoolType):
-            return OLambda(
-                ["x"], plt.IfThenElse(OVar("x"), plt.Integer(1), plt.Integer(0))
-            )
-        elif isinstance(arg.typ, StringType):
-            return OLambda(
-                ["x"],
-                OLet(
-                    [
-                        ("e", plt.EncodeUtf8(OVar("x"))),
-                        ("len", plt.LengthOfByteString(OVar("e"))),
-                        (
-                            "first_int",
-                            plt.Ite(
-                                plt.LessThanInteger(plt.Integer(0), OVar("len")),
-                                plt.IndexByteString(OVar("e"), plt.Integer(0)),
-                                plt.Integer(ord("_")),
-                            ),
-                        ),
-                        (
-                            "last_int",
-                            plt.IndexByteString(
-                                OVar("e"),
-                                plt.SubtractInteger(OVar("len"), plt.Integer(1)),
-                            ),
-                        ),
-                        (
-                            "fold_start",
-                            OLambda(
-                                ["start"],
-                                plt.FoldList(
-                                    plt.Range(OVar("len"), OVar("start")),
-                                    OLambda(
-                                        ["s", "i"],
-                                        OLet(
-                                            [
-                                                (
-                                                    "b",
-                                                    plt.IndexByteString(
-                                                        OVar("e"), OVar("i")
-                                                    ),
-                                                )
-                                            ],
-                                            plt.Ite(
-                                                plt.EqualsInteger(
-                                                    OVar("b"), plt.Integer(ord("_"))
-                                                ),
-                                                OVar("s"),
-                                                plt.Ite(
-                                                    plt.Or(
-                                                        plt.LessThanInteger(
-                                                            OVar("b"),
-                                                            plt.Integer(ord("0")),
-                                                        ),
-                                                        plt.LessThanInteger(
-                                                            plt.Integer(ord("9")),
-                                                            OVar("b"),
-                                                        ),
-                                                    ),
-                                                    plt.TraceError(
-                                                        "ValueError: invalid literal for int() with base 10"
-                                                    ),
-                                                    plt.AddInteger(
-                                                        plt.SubtractInteger(
-                                                            OVar("b"),
-                                                            plt.Integer(ord("0")),
-                                                        ),
-                                                        plt.MultiplyInteger(
-                                                            OVar("s"),
-                                                            plt.Integer(10),
-                                                        ),
-                                                    ),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                    plt.Integer(0),
-                                ),
-                            ),
-                        ),
-                    ],
-                    plt.Ite(
-                        plt.Or(
-                            plt.Or(
-                                plt.EqualsInteger(
-                                    OVar("first_int"),
-                                    plt.Integer(ord("_")),
-                                ),
-                                plt.EqualsInteger(
-                                    OVar("last_int"),
-                                    plt.Integer(ord("_")),
-                                ),
-                            ),
-                            plt.And(
-                                plt.EqualsInteger(OVar("len"), plt.Integer(1)),
-                                plt.Or(
-                                    plt.EqualsInteger(
-                                        OVar("first_int"),
-                                        plt.Integer(ord("-")),
-                                    ),
-                                    plt.EqualsInteger(
-                                        OVar("first_int"),
-                                        plt.Integer(ord("+")),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        plt.TraceError(
-                            "ValueError: invalid literal for int() with base 10"
-                        ),
-                        plt.Ite(
-                            plt.EqualsInteger(
-                                OVar("first_int"),
-                                plt.Integer(ord("-")),
-                            ),
-                            plt.Negate(
-                                plt.Apply(OVar("fold_start"), plt.Integer(1)),
-                            ),
-                            plt.Ite(
-                                plt.EqualsInteger(
-                                    OVar("first_int"),
-                                    plt.Integer(ord("+")),
-                                ),
-                                plt.Apply(OVar("fold_start"), plt.Integer(1)),
-                                plt.Apply(OVar("fold_start"), plt.Integer(0)),
-                            ),
-                        ),
-                    ),
-                ),
-            )
-        else:
-            raise NotImplementedError(
-                f"Can not derive integer from type {arg.typ.__name__}"
-            )
-
-

Ancestors

- -

Methods

-
-
-def impl_from_args(self, args: List[Type]) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def type_from_args(self, args: List[Type]) ‑> FunctionType -
-
-
-
-
-
-
-class IntegerType -
-
-

IntegerType()

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class IntegerType(AtomicType):
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "int"
-
-    def constr_type(self) -> InstanceType:
-        return InstanceType(PolymorphicFunctionType(IntImpl()))
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        if isinstance(o, BoolType):
-            if isinstance(op, Eq):
-                # 1 == True
-                # 0 == False
-                # all other comparisons are False
-                return OLambda(
-                    ["x", "y"],
-                    plt.Ite(
-                        OVar("y"),
-                        plt.EqualsInteger(OVar("x"), plt.Integer(1)),
-                        plt.EqualsInteger(OVar("x"), plt.Integer(0)),
-                    ),
-                )
-        if isinstance(o, IntegerType):
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsInteger)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsInteger),
-                            OVar("y"),
-                            OVar("x"),
-                        )
-                    ),
-                )
-            if isinstance(op, LtE):
-                return plt.BuiltIn(uplc.BuiltInFun.LessThanEqualsInteger)
-            if isinstance(op, Lt):
-                return plt.BuiltIn(uplc.BuiltInFun.LessThanInteger)
-            if isinstance(op, Gt):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Apply(
-                        plt.BuiltIn(uplc.BuiltInFun.LessThanInteger),
-                        OVar("y"),
-                        OVar("x"),
-                    ),
-                )
-            if isinstance(op, GtE):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Apply(
-                        plt.BuiltIn(uplc.BuiltInFun.LessThanEqualsInteger),
-                        OVar("y"),
-                        OVar("x"),
-                    ),
-                )
-        if (
-            isinstance(o, ListType)
-            and isinstance(o.typ, InstanceType)
-            and isinstance(o.typ.typ, IntegerType)
-        ):
-            if isinstance(op, In):
-                return OLambda(
-                    ["x", "y"],
-                    plt.AnyList(
-                        OVar("y"),
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsInteger), OVar("x")
-                        ),
-                    ),
-                )
-            if isinstance(op, NotIn):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("y"),
-                            plt.Apply(
-                                plt.BuiltIn(uplc.BuiltInFun.EqualsInteger), OVar("x")
-                            ),
-                        ),
-                    ),
-                )
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(
-            ["x"],
-            plt.DecodeUtf8(
-                OLet(
-                    [
-                        (
-                            "strlist",
-                            plt.RecFun(
-                                OLambda(
-                                    ["f", "i"],
-                                    plt.Ite(
-                                        plt.LessThanEqualsInteger(
-                                            OVar("i"), plt.Integer(0)
-                                        ),
-                                        plt.EmptyIntegerList(),
-                                        plt.MkCons(
-                                            plt.AddInteger(
-                                                plt.ModInteger(
-                                                    OVar("i"), plt.Integer(10)
-                                                ),
-                                                plt.Integer(ord("0")),
-                                            ),
-                                            plt.Apply(
-                                                OVar("f"),
-                                                OVar("f"),
-                                                plt.DivideInteger(
-                                                    OVar("i"), plt.Integer(10)
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        (
-                            "mkstr",
-                            OLambda(
-                                ["i"],
-                                plt.FoldList(
-                                    plt.Apply(OVar("strlist"), OVar("i")),
-                                    OLambda(
-                                        ["b", "i"],
-                                        plt.ConsByteString(OVar("i"), OVar("b")),
-                                    ),
-                                    plt.ByteString(b""),
-                                ),
-                            ),
-                        ),
-                    ],
-                    plt.Ite(
-                        plt.EqualsInteger(OVar("x"), plt.Integer(0)),
-                        plt.ByteString(b"0"),
-                        plt.Ite(
-                            plt.LessThanInteger(OVar("x"), plt.Integer(0)),
-                            plt.ConsByteString(
-                                plt.Integer(ord("-")),
-                                plt.Apply(OVar("mkstr"), plt.Negate(OVar("x"))),
-                            ),
-                            plt.Apply(OVar("mkstr"), OVar("x")),
-                        ),
-                    ),
-                )
-            ),
-        )
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        if (
-            isinstance(binop, Add)
-            or isinstance(binop, Sub)
-            or isinstance(binop, FloorDiv)
-            or isinstance(binop, Mod)
-            or isinstance(binop, Div)
-            or isinstance(binop, Pow)
-        ):
-            if other == IntegerInstanceType:
-                return IntegerType()
-        if isinstance(binop, Mult):
-            if other == IntegerInstanceType:
-                return IntegerType()
-            elif other == ByteStringInstanceType:
-                return ByteStringType()
-            elif other == StringInstanceType:
-                return StringType()
-        return super().binop_type(binop, other)
-
-    def _binop_bin_fun(self, binop: operator, other: AST):
-        if other.typ == IntegerInstanceType:
-            if isinstance(binop, Add):
-                return plt.AddInteger
-            elif isinstance(binop, Sub):
-                return plt.SubtractInteger
-            elif isinstance(binop, FloorDiv):
-                return plt.DivideInteger
-            elif isinstance(binop, Mod):
-                return plt.ModInteger
-            elif isinstance(binop, Pow):
-                return lambda x, y: OLet(
-                    [("y", y)],
-                    plt.Ite(
-                        plt.LessThanInteger(OVar("y"), plt.Integer(0)),
-                        plt.TraceError("Negative exponentiation is not supported"),
-                        PowImpl(x, OVar("y")),
-                    ),
-                )
-
-        if isinstance(binop, Mult):
-            if other.typ == IntegerInstanceType:
-                return plt.MultiplyInteger
-            elif other.typ == ByteStringInstanceType:
-                return lambda x, y: ByteStrIntMulImpl(y, x)
-            elif other.typ == StringInstanceType:
-                return lambda x, y: StrIntMulImpl(y, x)
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, USub):
-            return IntegerType()
-        elif isinstance(unop, UAdd):
-            return IntegerType()
-        elif isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, USub):
-            return lambda x: plt.SubtractInteger(plt.Integer(0), x)
-        if isinstance(unop, UAdd):
-            return lambda x: x
-        if isinstance(unop, Not):
-            return lambda x: plt.EqualsInteger(x, plt.Integer(0))
-        return super()._unop_fun(unop)
-
-

Ancestors

- -

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -AtomicType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -AtomicType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -AtomicType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -AtomicType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -AtomicType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class ListType -(typ: Type) -
-
-

ListType(typ: opshin.type_impls.Type)

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class ListType(ClassType):
-    typ: Type
-
-    def __ge__(self, other):
-        return isinstance(other, ListType) and self.typ >= other.typ
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "list<" + self.typ.id_map() + ">"
-
-    def attribute_type(self, attr) -> "Type":
-        if attr == "index":
-            return InstanceType(
-                FunctionType(frozenlist([self.typ]), IntegerInstanceType)
-            )
-        super().attribute_type(attr)
-
-    def attribute(self, attr) -> plt.AST:
-        if attr == "index":
-            return OLambda(
-                ["self", "x"],
-                OLet(
-                    [("x", plt.Force(OVar("x")))],
-                    plt.Apply(
-                        plt.RecFun(
-                            OLambda(
-                                ["index", "xs", "a"],
-                                plt.IteNullList(
-                                    OVar("xs"),
-                                    plt.TraceError("Did not find element in list"),
-                                    plt.Ite(
-                                        plt.EqualsInteger(
-                                            OVar("x"), plt.HeadList(OVar("xs"))
-                                        ),
-                                        OVar("a"),
-                                        plt.Apply(
-                                            OVar("index"),
-                                            OVar("index"),
-                                            plt.TailList(OVar("xs")),
-                                            plt.AddInteger(OVar("a"), plt.Integer(1)),
-                                        ),
-                                    ),
-                                ),
-                            ),
-                        ),
-                        OVar("self"),
-                        plt.Integer(0),
-                    ),
-                ),
-            )
-        super().attribute(attr)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(
-            ["self"],
-            OLet(
-                [
-                    (
-                        "g",
-                        plt.RecFun(
-                            OLambda(
-                                ["f", "l"],
-                                plt.AppendString(
-                                    plt.Apply(
-                                        self.typ.stringify(recursive=True),
-                                        plt.HeadList(OVar("l")),
-                                    ),
-                                    OLet(
-                                        [("t", plt.TailList(OVar("l")))],
-                                        plt.IteNullList(
-                                            OVar("t"),
-                                            plt.Text("]"),
-                                            plt.AppendString(
-                                                plt.Text(", "),
-                                                plt.Apply(
-                                                    OVar("f"),
-                                                    OVar("f"),
-                                                    OVar("t"),
-                                                ),
-                                            ),
-                                        ),
-                                    ),
-                                ),
-                            )
-                        ),
-                    )
-                ],
-                plt.AppendString(
-                    plt.Text("["),
-                    plt.IteNullList(
-                        OVar("self"),
-                        plt.Text("]"),
-                        plt.Apply(
-                            OVar("g"),
-                            OVar("self"),
-                        ),
-                    ),
-                ),
-            ),
-        )
-
-    def copy_only_attributes(self) -> plt.AST:
-        mapped_attrs = plt.MapList(
-            OVar("self"),
-            OLambda(
-                ["v"],
-                transform_ext_params_map(self.typ)(
-                    plt.Apply(
-                        self.typ.copy_only_attributes(),
-                        transform_output_map(self.typ)(OVar("v")),
-                    )
-                ),
-            ),
-            empty_list(self.typ),
-        )
-        return OLambda(["self"], mapped_attrs)
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        if isinstance(binop, Add):
-            if isinstance(other, InstanceType) and isinstance(other.typ, ListType):
-                other_typ = other.typ
-                assert (
-                    self.typ >= other_typ.typ or other_typ.typ >= self.typ
-                ), f"Types of lists {self.typ} and {other_typ.typ} are not compatible"
-                return ListType(
-                    self.typ if self.typ >= other_typ.typ else other_typ.typ
-                )
-        return super()._binop_return_type(binop, other)
-
-    def _binop_bin_fun(self, binop: operator, other: AST):
-        if isinstance(binop, Add):
-            if isinstance(other.typ, InstanceType) and isinstance(
-                other.typ.typ, ListType
-            ):
-                return plt.AppendList
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return lambda x: plt.IteNullList(x, plt.Bool(True), plt.Bool(False))
-        return super()._unop_fun(unop)
-
-

Ancestors

- -

Class variables

-
-
var typType
-
-
-
-
-

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class PairType -(l_typ: Type, r_typ: Type) -
-
-

An internal type representing built-in PlutusData pairs

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class PairType(ClassType):
-    """An internal type representing built-in PlutusData pairs"""
-
-    l_typ: Type
-    r_typ: Type
-
-    def __ge__(self, other):
-        return isinstance(other, PairType) and all(
-            t >= ot
-            for t, ot in zip((self.l_typ, self.r_typ), (other.l_typ, other.r_typ))
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        tuple_content = plt.ConcatString(
-            plt.Apply(
-                self.l_typ.stringify(recursive=True),
-                transform_ext_params_map(self.l_typ)(plt.FstPair(OVar("self"))),
-            ),
-            plt.Text(", "),
-            plt.Apply(
-                self.r_typ.stringify(recursive=True),
-                transform_ext_params_map(self.r_typ)(plt.SndPair(OVar("self"))),
-            ),
-        )
-        return OLambda(
-            ["self"],
-            plt.ConcatString(plt.Text("("), tuple_content, plt.Text(")")),
-        )
-
-

Ancestors

- -

Class variables

-
-
var l_typType
-
-
-
-
var r_typType
-
-
-
-
-

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class PolymorphicFunction -(*args, **kwargs) -
-
-
-
- -Expand source code - -
class PolymorphicFunction:
-    def __new__(meta, *args, **kwargs):
-        klass = super().__new__(meta)
-
-        for key in ["impl_from_args"]:
-            value = getattr(klass, key)
-            wrapped = patternize(value)
-            object.__setattr__(klass, key, wrapped)
-
-        return klass
-
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        raise NotImplementedError()
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        raise NotImplementedError()
-
-

Subclasses

- -

Methods

-
-
-def impl_from_args(self, args: List[Type]) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def type_from_args(self, args: List[Type]) ‑> FunctionType -
-
-
-
-
-
-
-class PolymorphicFunctionInstanceType -(typ: FunctionType, polymorphic_function: PolymorphicFunction) -
-
-

PolymorphicFunctionInstanceType(typ: opshin.type_impls.FunctionType, polymorphic_function: opshin.type_impls.PolymorphicFunction)

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class PolymorphicFunctionInstanceType(InstanceType):
-    typ: FunctionType
-    polymorphic_function: PolymorphicFunction
-
-

Ancestors

- -

Class variables

-
-
var polymorphic_functionPolymorphicFunction
-
-
-
-
var typFunctionType
-
-
-
-
-

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -InstanceType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -InstanceType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -InstanceType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -InstanceType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -InstanceType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -InstanceType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> FunctionType -
-
-

-Inherited from: -InstanceType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -InstanceType.copy_only_attributes -

-

Pluthon function that returns a copy of only the attributes of the object

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -InstanceType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -InstanceType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -InstanceType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -InstanceType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class PolymorphicFunctionType -(polymorphic_function: PolymorphicFunction) -
-
-

A special type of builtin that may act differently on different parameters

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class PolymorphicFunctionType(ClassType):
-    """A special type of builtin that may act differently on different parameters"""
-
-    polymorphic_function: PolymorphicFunction
-
-    def __ge__(self, other):
-        return (
-            isinstance(other, PolymorphicFunctionType)
-            and self.polymorphic_function == other.polymorphic_function
-        )
-
-

Ancestors

- -

Class variables

-
-
var polymorphic_functionPolymorphicFunction
-
-
-
-
-

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class Record -(name: str, orig_name: str, constructor: int, fields: Union[List[Tuple[str, Type]], frozenlist2.frozenlist]) -
-
-

Record(name: str, orig_name: str, constructor: int, fields: Union[List[Tuple[str, opshin.type_impls.Type]], frozenlist2.frozenlist])

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class Record:
-    name: str
-    orig_name: str
-    constructor: int
-    fields: typing.Union[typing.List[typing.Tuple[str, Type]], frozenlist]
-
-    def __post_init__(self):
-        object.__setattr__(self, "fields", frozenlist(self.fields))
-
-    def __ge__(self, other):
-        if not isinstance(other, Record):
-            return False
-        return (
-            self.constructor == other.constructor
-            and len(self.fields) == len(other.fields)
-            and all(a >= b for a, b in zip(self.fields, other.fields))
-        )
-
-

Class variables

-
-
var constructor : int
-
-
-
-
var fields : Union[List[Tuple[str, Type]], frozenlist2.frozenlist]
-
-
-
-
var name : str
-
-
-
-
var orig_name : str
-
-
-
-
-
-
-class RecordType -(record: Record) -
-
-

RecordType(record: opshin.type_impls.Record)

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class RecordType(ClassType):
-    record: Record
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return (
-            "cons["
-            + self.record.orig_name
-            + "]("
-            + (str(self.record.constructor) if not skip_constructor else "_")
-            + ";"
-            + ",".join(name + ":" + type.id_map() for name, type in self.record.fields)
-            + ")"
-        )
-
-    def constr_type(self) -> "InstanceType":
-        return InstanceType(
-            FunctionType(
-                frozenlist([f[1] for f in self.record.fields]), InstanceType(self)
-            )
-        )
-
-    def constr(self) -> plt.AST:
-        # wrap all constructor values to PlutusData
-        build_constr_params = plt.EmptyDataList()
-        for n, t in reversed(self.record.fields):
-            build_constr_params = plt.MkCons(
-                transform_output_map(t)(plt.Force(OVar(n))), build_constr_params
-            )
-        # then build a constr type with this PlutusData
-        return SafeOLambda(
-            [n for n, _ in self.record.fields],
-            plt.ConstrData(plt.Integer(self.record.constructor), build_constr_params),
-        )
-
-    def attribute_type(self, attr: str) -> Type:
-        """The types of the named attributes of this class"""
-        if attr == "CONSTR_ID":
-            return IntegerInstanceType
-        for n, t in self.record.fields:
-            if n == attr:
-                return t
-        if attr == "to_cbor":
-            return InstanceType(FunctionType(frozenlist([]), ByteStringInstanceType))
-        raise TypeInferenceError(
-            f"Type {self.record.name} does not have attribute {attr}"
-        )
-
-    def attribute(self, attr: str) -> plt.AST:
-        """The attributes of this class. Need to be a lambda that expects as first argument the object itself"""
-        if attr == "CONSTR_ID":
-            # access to constructor
-            return OLambda(
-                ["self"],
-                plt.Constructor(OVar("self")),
-            )
-        if attr in (n for n, t in self.record.fields):
-            attr_typ = self.attribute_type(attr)
-            pos = next(i for i, (n, _) in enumerate(self.record.fields) if n == attr)
-            # access to normal fields
-            return OLambda(
-                ["self"],
-                transform_ext_params_map(attr_typ)(
-                    plt.ConstantNthField(
-                        OVar("self"),
-                        pos,
-                    ),
-                ),
-            )
-        if attr == "to_cbor":
-            return OLambda(
-                ["self", "_"],
-                plt.SerialiseData(
-                    OVar("self"),
-                ),
-            )
-        raise NotImplementedError(f"Attribute {attr} not implemented for type {self}")
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        # this will reject comparisons that will always be false - most likely due to faults during programming
-        if (
-            (
-                isinstance(o, RecordType)
-                and (self.record >= o.record or o.record >= self.record)
-            )
-            or (
-                isinstance(o, UnionType) and any(self >= o or self >= o for o in o.typs)
-            )
-            or isinstance(o, AnyType)
-        ):
-            # Note that comparison with AnyType is actually fine because both are Data
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsData)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                            OVar("y"),
-                        )
-                    ),
-                )
-        if (
-            isinstance(o, ListType)
-            and isinstance(o.typ, InstanceType)
-            and (o.typ.typ >= self or self >= o.typ.typ)
-        ):
-            if isinstance(op, In):
-                return OLambda(
-                    ["x", "y"],
-                    plt.AnyList(
-                        OVar("y"),
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                        ),
-                    ),
-                )
-            if isinstance(op, NotIn):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("y"),
-                            plt.Apply(
-                                plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                                OVar("x"),
-                            ),
-                        ),
-                    ),
-                )
-        return super().cmp(op, o)
-
-    def __ge__(self, other):
-        # Can only substitute for its own type, records need to be equal
-        # if someone wants to be funny, they can implement <= to be true if all fields match up to some point
-        return isinstance(other, self.__class__) and self.record >= other.record
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        """Returns a stringified version of the object"""
-        map_fields = plt.Text(")")
-        if self.record.fields:
-            # TODO access to fields is a bit inefficient but this is debugging stuff only anyways
-            pos = len(self.record.fields) - 1
-            for field_name, field_type in reversed(self.record.fields[1:]):
-                map_fields = plt.ConcatString(
-                    plt.Text(f", {field_name}="),
-                    plt.Apply(
-                        field_type.stringify(recursive=True),
-                        transform_ext_params_map(field_type)(
-                            plt.ConstantNthField(OVar("self"), pos)
-                        ),
-                    ),
-                    map_fields,
-                )
-                pos -= 1
-            map_fields = plt.ConcatString(
-                plt.Text(f"{self.record.fields[0][0]}="),
-                plt.Apply(
-                    self.record.fields[0][1].stringify(recursive=True),
-                    transform_ext_params_map(self.record.fields[0][1])(
-                        plt.ConstantNthField(OVar("self"), pos)
-                    ),
-                ),
-                map_fields,
-            )
-        return OLambda(
-            ["self"],
-            plt.AppendString(plt.Text(f"{self.record.orig_name}("), map_fields),
-        )
-
-    def copy_only_attributes(self) -> plt.AST:
-        copied_attributes = plt.EmptyDataList()
-        for attr_name, attr_type in reversed(self.record.fields):
-            copied_attributes = OLet(
-                [
-                    ("f", plt.HeadList(OVar("fs"))),
-                    ("fs", plt.TailList(OVar("fs"))),
-                ],
-                plt.MkCons(
-                    transform_output_map(attr_type)(
-                        plt.Apply(
-                            attr_type.copy_only_attributes(),
-                            transform_ext_params_map(attr_type)(
-                                OVar("f"),
-                            ),
-                        )
-                    ),
-                    copied_attributes,
-                ),
-            )
-        copied_attributes = OLet(
-            [("fs", plt.Fields(OVar("self")))],
-            copied_attributes,
-        )
-        return OLambda(
-            ["self"],
-            plt.ConstrData(
-                plt.Integer(self.record.constructor),
-                copied_attributes,
-            ),
-        )
-
-

Ancestors

- -

Class variables

-
-
var recordRecord
-
-
-
-
-

Methods

-
-
-def attribute(self, attr: str) ‑> pluthon.pluthon_ast.AST -
-
-

The attributes of this class. Need to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr: str) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

Returns a stringified version of the object

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class StrImpl -(*args, **kwargs) -
-
-
-
- -Expand source code - -
class StrImpl(PolymorphicFunction):
-    def type_from_args(self, args: typing.List[Type]) -> FunctionType:
-        assert (
-            len(args) == 1
-        ), f"'str' takes only one argument, but {len(args)} were given"
-        typ = args[0]
-        assert isinstance(typ, InstanceType), "Can only stringify instances"
-        return FunctionType(args, StringInstanceType)
-
-    def impl_from_args(self, args: typing.List[Type]) -> plt.AST:
-        arg = args[0]
-        assert isinstance(arg, InstanceType), "Can only stringify instances"
-        return arg.typ.stringify()
-
-

Ancestors

- -

Methods

-
-
-def impl_from_args(self, args: List[Type]) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-def type_from_args(self, args: List[Type]) ‑> FunctionType -
-
-
-
-
-
-
-class StringType -
-
-

StringType()

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class StringType(AtomicType):
-    def constr_type(self) -> InstanceType:
-        return InstanceType(PolymorphicFunctionType(StrImpl()))
-
-    def attribute_type(self, attr) -> Type:
-        if attr == "encode":
-            return InstanceType(FunctionType(frozenlist([]), ByteStringInstanceType))
-        return super().attribute_type(attr)
-
-    def attribute(self, attr) -> plt.AST:
-        if attr == "encode":
-            # No codec -> only the default (utf8) is allowed
-            return OLambda(["x", "_"], plt.EncodeUtf8(OVar("x")))
-        return super().attribute(attr)
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        if isinstance(o, StringType):
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsString)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"], plt.Not(plt.EqualsString(OVar("x"), OVar("y")))
-                )
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        if recursive:
-            # TODO this is not correct, as the string is not properly escaped
-            return OLambda(
-                ["self"],
-                plt.ConcatString(plt.Text("'"), OVar("self"), plt.Text("'")),
-            )
-        else:
-            return OLambda(["self"], OVar("self"))
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        if isinstance(binop, Add):
-            if other == StringInstanceType:
-                return StringType()
-        if isinstance(binop, Mult):
-            if other == IntegerInstanceType:
-                return StringType()
-        return super().binop_type(binop, other)
-
-    def _binop_bin_fun(self, binop: operator, other: AST):
-        if isinstance(binop, Add):
-            if other.typ == StringInstanceType:
-                return plt.AppendString
-        if isinstance(binop, Mult):
-            if other.typ == IntegerInstanceType:
-                return StrIntMulImpl
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return lambda x: plt.EqualsInteger(
-                plt.LengthOfByteString(plt.EncodeUtf8(x)), plt.Integer(0)
-            )
-        return super()._unop_fun(unop)
-
-

Ancestors

- -

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -AtomicType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -AtomicType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -AtomicType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -AtomicType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -AtomicType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class TupleType -(typs: List[Type]) -
-
-

TupleType(typs: List[opshin.type_impls.Type])

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class TupleType(ClassType):
-    typs: typing.List[Type]
-
-    def __ge__(self, other):
-        return isinstance(other, TupleType) and all(
-            t >= ot for t, ot in zip(self.typs, other.typs)
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        if not self.typs:
-            return OLambda(
-                ["self"],
-                plt.Text("()"),
-            )
-        elif len(self.typs) == 1:
-            tuple_content = plt.ConcatString(
-                plt.Apply(
-                    self.typs[0].stringify(recursive=True),
-                    plt.FunctionalTupleAccess(OVar("self"), 0, len(self.typs)),
-                ),
-                plt.Text(","),
-            )
-        else:
-            tuple_content = plt.ConcatString(
-                plt.Apply(
-                    self.typs[0].stringify(recursive=True),
-                    plt.FunctionalTupleAccess(OVar("self"), 0, len(self.typs)),
-                ),
-            )
-            for i, t in enumerate(self.typs[1:], start=1):
-                tuple_content = plt.ConcatString(
-                    tuple_content,
-                    plt.Text(", "),
-                    plt.Apply(
-                        t.stringify(recursive=True),
-                        plt.FunctionalTupleAccess(OVar("self"), i, len(self.typs)),
-                    ),
-                )
-        return OLambda(
-            ["self"],
-            plt.ConcatString(plt.Text("("), tuple_content, plt.Text(")")),
-        )
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        if isinstance(binop, Add):
-            if isinstance(other, TupleType):
-                return TupleType(self.typs + other.typs)
-        return super()._binop_return_type(binop, other)
-
-

Ancestors

- -

Class variables

-
-
var typs : List[Type]
-
-
-
-
-

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class Type -(*args, **kwargs) -
-
-
-
- -Expand source code - -
class Type:
-    def __new__(meta, *args, **kwargs):
-        klass = super().__new__(meta)
-
-        for key in ["constr", "attribute", "cmp", "stringify", "copy_only_attributes"]:
-            value = getattr(klass, key)
-            wrapped = patternize(value)
-            object.__setattr__(klass, key, wrapped)
-
-        return klass
-
-    def constr_type(self) -> "InstanceType":
-        """The type of the constructor for this class"""
-        raise TypeInferenceError(
-            f"Object of type {self.__class__} does not have a constructor"
-        )
-
-    def constr(self) -> plt.AST:
-        """The constructor for this class"""
-        raise NotImplementedError(
-            f"Constructor of {type(self).__name__} not implemented"
-        )
-
-    def attribute_type(self, attr) -> "Type":
-        """The types of the named attributes of this class"""
-        raise TypeInferenceError(
-            f"Object of type {type(self).__name__} does not have attribute {attr}"
-        )
-
-    def attribute(self, attr) -> plt.AST:
-        """The attributes of this class. Needs to be a lambda that expects as first argument the object itself"""
-        raise NotImplementedError(f"Attribute {attr} not implemented for type {self}")
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        raise NotImplementedError(
-            f"Comparison {type(op).__name__} for {self.__class__.__name__} and {o.__class__.__name__} is not implemented. This is likely intended because it would always evaluate to False."
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        """
-        Returns a stringified version of the object
-
-        The recursive parameter informs the method whether it was invoked recursively from another invokation
-        """
-        raise NotImplementedError(f"{type(self).__name__} can not be stringified")
-
-    def copy_only_attributes(self) -> plt.AST:
-        """
-        Pluthon function that returns a copy of only the attributes of the object
-        """
-        raise NotImplementedError(f"{type(self).__name__} can not be copied")
-
-    def binop_type(self, binop: operator, other: "Type") -> "Type":
-        """
-        Type of a binary operation between self and other.
-        """
-        return FunctionType(
-            [InstanceType(self), InstanceType(other)],
-            InstanceType(self._binop_return_type(binop, other)),
-        )
-
-    def _binop_return_type(self, binop: operator, other: "Type") -> "Type":
-        """
-        Return the type of a binary operation between self and other
-        """
-        raise NotImplementedError(
-            f"{type(self).__name__} does not implement {binop.__class__.__name__}"
-        )
-
-    def binop(self, binop: operator, other: AST) -> plt.AST:
-        """
-        Implements a binary operation between self and other
-        """
-        return OLambda(
-            ["self", "other"],
-            self._binop_bin_fun(binop, other)(OVar("self"), OVar("other")),
-        )
-
-    def _binop_bin_fun(
-        self, binop: operator, other: AST
-    ) -> Callable[[plt.AST, plt.AST], plt.AST]:
-        """
-        Returns a binary function that implements the binary operation between self and other.
-        """
-        raise NotImplementedError(
-            f"{type(self).__name__} can not be used with operation {binop.__class__.__name__}"
-        )
-
-    def unop_type(self, unop: unaryop) -> "Type":
-        """
-        Type of a unary operation on self.
-        """
-        return FunctionType(
-            [InstanceType(self)],
-            InstanceType(self._unop_return_type(unop)),
-        )
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        """
-        Return the type of a binary operation between self and other
-        """
-        raise NotImplementedError(
-            f"{type(self).__name__} does not implement {unop.__class__.__name__}"
-        )
-
-    def unop(self, unop: unaryop) -> plt.AST:
-        """
-        Implements a unary operation on self
-        """
-        return OLambda(
-            ["self"],
-            self._unop_fun(unop)(OVar("self")),
-        )
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        """
-        Returns a unary function that implements the unary operation on self.
-        """
-        raise NotImplementedError(
-            f"{type(self).__name__} can not be used with operation {unop.__class__.__name__}"
-        )
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        """
-        Returns a map from the constructor id to a descriptive typestring
-        """
-        raise NotImplementedError(f"Type {type(self).__name__} does not have a id map")
-
-

Subclasses

- -

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison.

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

Pluthon function that returns a copy of only the attributes of the object

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

Returns a stringified version of the object

-

The recursive parameter informs the method whether it was invoked recursively from another invokation

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

Type of a unary operation on self.

-
-
-
-
-class TypeInferenceError -(*args, **kwargs) -
-
-

Assertion failed.

-
- -Expand source code - -
class TypeInferenceError(AssertionError):
-    pass
-
-

Ancestors

-
    -
  • builtins.AssertionError
  • -
  • builtins.Exception
  • -
  • builtins.BaseException
  • -
-
-
-class UnionType -(typs: List[RecordType]) -
-
-

UnionType(typs: List[opshin.type_impls.RecordType])

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class UnionType(ClassType):
-    typs: typing.List[RecordType]
-
-    def __post_init__(self):
-        object.__setattr__(self, "typs", frozenlist(self.typs))
-
-    def id_map(self, skip_constructor: bool = False) -> str:
-        return "union<" + ",".join(t.id_map() for t in self.typs) + ">"
-
-    def attribute_type(self, attr) -> "Type":
-        if attr == "CONSTR_ID":
-            return IntegerInstanceType
-        # need to have a common field with the same name
-        if all(attr in (n for n, t in x.record.fields) for x in self.typs):
-            attr_types = OrderedSet(
-                t for x in self.typs for n, t in x.record.fields if n == attr
-            )
-            for at in attr_types:
-                # return the maximum element if there is one
-                if all(at >= at2 for at2 in attr_types):
-                    return at
-            # return the union type of all possible instantiations if all possible values are record types
-            if all(
-                isinstance(at, InstanceType) and isinstance(at.typ, RecordType)
-                for at in attr_types
-            ) and distinct([at.typ.record.constructor for at in attr_types]):
-                return InstanceType(
-                    UnionType(frozenlist([at.typ for at in attr_types]))
-                )
-            # return Anytype
-            return InstanceType(AnyType())
-        if attr == "to_cbor":
-            return InstanceType(FunctionType(frozenlist([]), ByteStringInstanceType))
-        raise TypeInferenceError(
-            f"Can not access attribute {attr} of Union type. Cast to desired type with an 'if isinstance(_, _):' branch."
-        )
-
-    def attribute(self, attr: str) -> plt.AST:
-        if attr == "CONSTR_ID":
-            # access to constructor
-            return OLambda(
-                ["self"],
-                plt.Constructor(OVar("self")),
-            )
-        # iterate through all names/types of the unioned records by position
-        if any(attr in (n for n, t in r.record.fields) for r in self.typs):
-            attr_typ = self.attribute_type(attr)
-            pos_constrs = [
-                (i, x.record.constructor)
-                for x in self.typs
-                for i, (n, t) in enumerate(x.record.fields)
-                if n == attr
-            ]
-            pos_constrs = sorted(pos_constrs, key=lambda x: x[0])
-            pos_constrs = [
-                (pos, [c[1] for c in constrs])
-                for (pos, constrs) in itertools.groupby(pos_constrs, key=lambda x: x[0])
-            ]
-            # largest group last so we save the comparisons for that
-            pos_constrs = sorted(pos_constrs, key=lambda x: len(x[1]))
-            # access to normal fields
-            if not pos_constrs:
-                pos_decisor = plt.TraceError("Invalid constructor")
-            else:
-                pos_decisor = plt.Integer(pos_constrs[-1][0])
-                pos_constrs = pos_constrs[:-1]
-            for pos, constrs in pos_constrs:
-                assert constrs, "Found empty constructors for a position"
-                constr_check = plt.EqualsInteger(
-                    OVar("constr"), plt.Integer(constrs[0])
-                )
-                for constr in constrs[1:]:
-                    constr_check = plt.Or(
-                        plt.EqualsInteger(OVar("constr"), plt.Integer(constr)),
-                        constr_check,
-                    )
-                pos_decisor = plt.Ite(
-                    constr_check,
-                    plt.Integer(pos),
-                    pos_decisor,
-                )
-            return OLambda(
-                ["self"],
-                transform_ext_params_map(attr_typ)(
-                    plt.NthField(
-                        OVar("self"),
-                        OLet(
-                            [("constr", plt.Constructor(OVar("self")))],
-                            pos_decisor,
-                        ),
-                    ),
-                ),
-            )
-        if attr == "to_cbor":
-            return OLambda(
-                ["self", "_"],
-                plt.SerialiseData(
-                    OVar("self"),
-                ),
-            )
-        raise NotImplementedError(f"Attribute {attr} not implemented for type {self}")
-
-    def __ge__(self, other):
-        if isinstance(other, UnionType):
-            return all(self >= ot for ot in other.typs)
-        return any(t >= other for t in self.typs)
-
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        """The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second the comparison."""
-        # this will reject comparisons that will always be false - most likely due to faults during programming
-        # note we require that there is an overlapt between the possible types for unions
-        if (isinstance(o, RecordType) and any(t >= o or o >= t for t in self.typs)) or (
-            isinstance(o, UnionType)
-            and any(t >= ot or t >= ot for t in self.typs for ot in o.typs)
-        ):
-            if isinstance(op, Eq):
-                return plt.BuiltIn(uplc.BuiltInFun.EqualsData)
-            if isinstance(op, NotEq):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                            OVar("y"),
-                        )
-                    ),
-                )
-        if (
-            isinstance(o, ListType)
-            and isinstance(o.typ, InstanceType)
-            and any(o.typ.typ >= t or t >= o.typ.typ for t in self.typs)
-        ):
-            if isinstance(op, In):
-                return OLambda(
-                    ["x", "y"],
-                    plt.AnyList(
-                        OVar("y"),
-                        plt.Apply(
-                            plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                            OVar("x"),
-                        ),
-                    ),
-                )
-            if isinstance(op, NotIn):
-                return OLambda(
-                    ["x", "y"],
-                    plt.Not(
-                        plt.AnyList(
-                            OVar("y"),
-                            plt.Apply(
-                                plt.BuiltIn(uplc.BuiltInFun.EqualsData),
-                                OVar("x"),
-                            ),
-                        ),
-                    ),
-                )
-        raise NotImplementedError(
-            f"Can not compare {o} and {self} with operation {op.__class__}. Note that comparisons that always return false are also rejected."
-        )
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        decide_string_func = plt.TraceError("Invalid constructor id in Union")
-        for t in self.typs:
-            decide_string_func = plt.Ite(
-                plt.EqualsInteger(OVar("c"), plt.Integer(t.record.constructor)),
-                t.stringify(recursive=True),
-                decide_string_func,
-            )
-        return OLambda(
-            ["self"],
-            OLet(
-                [("c", plt.Constructor(OVar("self")))],
-                plt.Apply(decide_string_func, OVar("self")),
-            ),
-        )
-
-    def copy_only_attributes(self) -> plt.AST:
-        copied_attributes = plt.TraceError(
-            f"Invalid CONSTR_ID for instance of Union[{', '.join(type(typ).__name__ for typ in self.typs)}]"
-        )
-        for typ in self.typs:
-            copied_attributes = plt.Ite(
-                plt.EqualsInteger(OVar("constr"), plt.Integer(typ.record.constructor)),
-                plt.Apply(typ.copy_only_attributes(), OVar("self")),
-                copied_attributes,
-            )
-        return OLambda(
-            ["self"],
-            OLet(
-                [("constr", plt.Constructor(OVar("self")))],
-                copied_attributes,
-            ),
-        )
-
-

Ancestors

- -

Class variables

-
-
var typs : List[RecordType]
-
-
-
-
-

Methods

-
-
-def attribute(self, attr: str) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -ClassType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -ClassType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -ClassType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -ClassType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -ClassType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -ClassType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-class UnitType -
-
-

UnitType()

-
- -Expand source code - -
@dataclass(frozen=True, unsafe_hash=True)
-class UnitType(AtomicType):
-    def cmp(self, op: cmpop, o: "Type") -> plt.AST:
-        if isinstance(o, UnitType):
-            if isinstance(op, Eq):
-                return OLambda(["x", "y"], plt.Bool(True))
-            if isinstance(op, NotEq):
-                return OLambda(["x", "y"], plt.Bool(False))
-        return super().cmp(op, o)
-
-    def stringify(self, recursive: bool = False) -> plt.AST:
-        return OLambda(["self"], plt.Text("None"))
-
-    def _unop_return_type(self, unop: unaryop) -> "Type":
-        if isinstance(unop, Not):
-            return BoolType()
-        return super()._unop_return_type(unop)
-
-    def _unop_fun(self, unop: unaryop) -> Callable[[plt.AST], plt.AST]:
-        if isinstance(unop, Not):
-            return lambda x: plt.Bool(True)
-        return super()._unop_fun(unop)
-
-

Ancestors

- -

Methods

-
-
-def attribute(self, attr) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.attribute -

-

The attributes of this class. Needs to be a lambda that expects as first argument the object itself

-
-
-def attribute_type(self, attr) ‑> Type -
-
-

-Inherited from: -AtomicType.attribute_type -

-

The types of the named attributes of this class

-
-
-def binop(self, binop: ast.operator, other: ast.AST) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.binop -

-

Implements a binary operation between self and other

-
-
-def binop_type(self, binop: ast.operator, other: Type) ‑> Type -
-
-

-Inherited from: -AtomicType.binop_type -

-

Type of a binary operation between self and other.

-
-
-def cmp(self, op: ast.cmpop, o: Type) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.cmp -

-

The implementation of comparing this type to type o via operator op. Returns a lambda that expects as first argument the object itself and as second …

-
-
-def constr(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.constr -

-

The constructor for this class

-
-
-def constr_type(self) ‑> InstanceType -
-
-

-Inherited from: -AtomicType.constr_type -

-

The type of the constructor for this class

-
-
-def copy_only_attributes(self) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.copy_only_attributes -

-

Returns a copy of this type with only the declared attributes (mapped to builtin values, thus checking atomic types too). -For anything but record …

-
-
-def id_map(self, skip_constructor: bool = False) ‑> str -
-
-

-Inherited from: -AtomicType.id_map -

-

Returns a map from the constructor id to a descriptive typestring

-
-
-def stringify(self, recursive: bool = False) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.stringify -

-

Returns a stringified version of the object …

-
-
-def unop(self, unop: ast.unaryop) ‑> pluthon.pluthon_ast.AST -
-
-

-Inherited from: -AtomicType.unop -

-

Implements a unary operation on self

-
-
-def unop_type(self, unop: ast.unaryop) ‑> Type -
-
-

-Inherited from: -AtomicType.unop_type -

-

Type of a unary operation on self.

-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/type_inference.html b/docs/opshin/type_inference.html deleted file mode 100644 index fc32c2fe..00000000 --- a/docs/opshin/type_inference.html +++ /dev/null @@ -1,3266 +0,0 @@ - - - - - - - - -opshin.type_inference API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.type_inference

-
-
-

An aggressive type inference based on the work of Aycock 1. -It only allows a subset of legal python operations which -allow us to infer the type of all involved variables -statically. -Using this we can resolve overloaded functions when translating Python -into UPLC where there is no dynamic type checking. -Additionally, this conveniently implements an additional layer of -security into the Smart Contract by checking type correctness.

-
- -Expand source code - -
"""
-An aggressive type inference based on the work of Aycock [1].
-It only allows a subset of legal python operations which
-allow us to infer the type of all involved variables
-statically.
-Using this we can resolve overloaded functions when translating Python
-into UPLC where there is no dynamic type checking.
-Additionally, this conveniently implements an additional layer of
-security into the Smart Contract by checking type correctness.
-
-
-[1]: https://legacy.python.org/workshops/2000-01/proceedings/papers/aycock/aycock.html
-"""
-
-import re
-
-from pycardano import PlutusData
-from typing import Union
-from .typed_ast import *
-from .util import CompilingNodeTransformer
-from .fun_impls import PythonBuiltInTypes
-from .rewrite.rewrite_cast_condition import SPECIAL_BOOL
-
-# from frozendict import frozendict
-
-
-INITIAL_SCOPE = {
-    # class annotations
-    "bytes": ByteStringType(),
-    "bytearray": ByteStringType(),
-    "int": IntegerType(),
-    "bool": BoolType(),
-    "str": StringType(),
-    "Anything": AnyType(),
-}
-
-INITIAL_SCOPE.update(
-    {
-        name.name: typ
-        for name, typ in PythonBuiltInTypes.items()
-        if isinstance(typ.typ, PolymorphicFunctionType)
-    }
-)
-
-DUNDER_MAP = {
-    # ast.Compare:
-    ast.Eq: "__eq__",
-    ast.NotEq: "__ne__",
-    ast.Lt: "__lt__",
-    ast.LtE: "__le__",
-    ast.Gt: "__gt__",
-    ast.GtE: "__ge__",
-    # ast.Is # no dunder
-    # ast.IsNot # no dunder
-    ast.In: "__contains__",
-    ast.NotIn: "__contains__",
-    # ast.Binop:
-    ast.Add: "__add__",
-    ast.Sub: "__sub__",
-    ast.Mult: "__mul__",
-    ast.Div: "__truediv__",
-    ast.FloorDiv: "__floordiv__",
-    ast.Mod: "__mod__",
-    ast.Pow: "__pow__",
-    ast.MatMult: "__matmul__",
-    # ast.UnaryOp:
-    # ast.UAdd
-    ast.USub: "__neg__",
-    ast.Not: "__bool__",
-    ast.Invert: "__invert__",
-    # ast.BoolOp
-    ast.And: "__and__",
-    ast.Or: "__or__",
-}
-
-
-def record_from_plutusdata(c: PlutusData):
-    return Record(
-        name=c.__class__.__name__,
-        orig_name=c.__class__.__name__,
-        constructor=c.CONSTR_ID,
-        fields=frozenlist([(k, constant_type(v)) for k, v in c.__dict__.items()]),
-    )
-
-
-def constant_type(c):
-    if isinstance(c, bool):
-        return BoolInstanceType
-    if isinstance(c, int):
-        return IntegerInstanceType
-    if isinstance(c, type(None)):
-        return UnitInstanceType
-    if isinstance(c, bytes):
-        return ByteStringInstanceType
-    if isinstance(c, str):
-        return StringInstanceType
-    if isinstance(c, list):
-        assert len(c) > 0, "Lists must be non-empty"
-        first_typ = constant_type(c[0])
-        assert all(
-            constant_type(ce) == first_typ for ce in c[1:]
-        ), "Constant lists must contain elements of a single type only"
-        return InstanceType(ListType(first_typ))
-    if isinstance(c, dict):
-        assert len(c) > 0, "Dicts must be non-empty"
-        first_key_typ = constant_type(next(iter(c.keys())))
-        first_value_typ = constant_type(next(iter(c.values())))
-        assert all(
-            constant_type(ce) == first_key_typ for ce in c.keys()
-        ), "Constant dicts must contain keys of a single type only"
-        assert all(
-            constant_type(ce) == first_value_typ for ce in c.values()
-        ), "Constant dicts must contain values of a single type only"
-        return InstanceType(DictType(first_key_typ, first_value_typ))
-    if isinstance(c, PlutusData):
-        return InstanceType(RecordType(record=record_from_plutusdata(c)))
-    raise NotImplementedError(f"Type {type(c)} not supported")
-
-
-TypeMap = typing.Dict[str, Type]
-TypeMapPair = typing.Tuple[TypeMap, TypeMap]
-
-
-def union_types(*ts: Type):
-    ts = OrderedSet(ts)
-    # If all types are the same, just return the type
-    if len(ts) == 1:
-        return ts[0]
-    # If there is a type that is compatible with all other types, choose the maximum
-    for t in ts:
-        if all(t >= tp for tp in ts):
-            return t
-    assert ts, "Union must combine multiple classes"
-    ts = [t if isinstance(t, UnionType) else UnionType(frozenlist([t])) for t in ts]
-    for e in ts:
-        for e2 in e.typs:
-            assert isinstance(
-                e2, RecordType
-            ), f"Union must combine multiple PlutusData classes but found {e2.__class__.__name__}"
-    union_set = OrderedSet()
-    for t in ts:
-        union_set.update(t.typs)
-    assert distinct(
-        [e.record.constructor for e in union_set]
-    ), "Union must combine PlutusData classes with unique constructors"
-    return UnionType(frozenlist(union_set))
-
-
-def intersection_types(*ts: Type):
-    ts = OrderedSet(ts)
-    if len(ts) == 1:
-        return ts[0]
-    ts = [t if isinstance(t, UnionType) else UnionType(frozenlist([t])) for t in ts]
-    assert ts, "Must have at least one type to intersect"
-    intersection_set = OrderedSet(ts[0].typs)
-    for t in ts[1:]:
-        intersection_set.intersection_update(t.typs)
-    return UnionType(frozenlist(intersection_set))
-
-
-class TypeCheckVisitor(TypedNodeVisitor):
-    """
-    Generates the types to which objects are cast due to a boolean expression
-    It returns a tuple of dictionaries which are a name -> type mapping
-    for variable names that are assured to have a specific type if this expression
-    is True/False respectively
-    """
-
-    def __init__(self, allow_isinstance_anything=False):
-        self.allow_isinstance_anything = allow_isinstance_anything
-
-    def generic_visit(self, node: AST) -> TypeMapPair:
-        return getattr(node, "typechecks", ({}, {}))
-
-    def visit_Call(self, node: Call) -> TypeMapPair:
-        if isinstance(node.func, Name) and node.func.orig_id == SPECIAL_BOOL:
-            return self.visit(node.args[0])
-        if not (isinstance(node.func, Name) and node.func.orig_id == "isinstance"):
-            return ({}, {})
-        # special case for Union
-        if not isinstance(node.args[0], Name):
-            OPSHIN_LOGGER.warning(
-                "Target 0 of an isinstance cast must be a variable name for type casting to work. You can still proceed, but the inferred type of the isinstance cast will not be accurate."
-            )
-            return ({}, {})
-        assert isinstance(
-            node.args[1], Name
-        ), "Target 1 of an isinstance cast must be a class name"
-        target_class: RecordType = node.args[1].typ
-        inst = node.args[0]
-        inst_class = inst.typ
-        assert isinstance(
-            inst_class, InstanceType
-        ), "Can only cast instances, not classes"
-        assert isinstance(target_class, RecordType), "Can only cast to PlutusData"
-        if isinstance(inst_class.typ, UnionType):
-            assert (
-                target_class in inst_class.typ.typs
-            ), f"Trying to cast an instance of Union type to non-instance of union type"
-            union_without_target_class = union_types(
-                *(x for x in inst_class.typ.typs if x != target_class)
-            )
-        elif isinstance(inst_class.typ, AnyType) and self.allow_isinstance_anything:
-            union_without_target_class = AnyType()
-        else:
-            assert (
-                inst_class.typ == target_class
-            ), "Can only cast instances of Union types of PlutusData or cast the same class. If you know what you are doing, enable the flag '--allow-isinstance-anything'"
-            union_without_target_class = target_class
-        varname = node.args[0].id
-        return ({varname: target_class}, {varname: union_without_target_class})
-
-    def visit_BoolOp(self, node: BoolOp) -> PairType:
-        res = {}
-        inv_res = {}
-        checks = [self.visit(v) for v in node.values]
-        checked_types = defaultdict(list)
-        inv_checked_types = defaultdict(list)
-        for c, inv_c in checks:
-            for v, t in c.items():
-                checked_types[v].append(t)
-            for v, t in inv_c.items():
-                inv_checked_types[v].append(t)
-        if isinstance(node.op, And):
-            # a conjunction is just the intersection
-            for v, ts in checked_types.items():
-                res[v] = intersection_types(*ts)
-            # if the conjunction fails, its any of the respective reverses, but only if the type is checked in every conjunction
-            for v, ts in inv_checked_types.items():
-                if len(ts) < len(checks):
-                    continue
-                inv_res[v] = union_types(*ts)
-        if isinstance(node.op, Or):
-            # a disjunction is just the union, but some type must be checked in every disjunction
-            for v, ts in checked_types.items():
-                if len(ts) < len(checks):
-                    continue
-                res[v] = union_types(*ts)
-            # if the disjunction fails, then it must be in the intersection of the inverses
-            for v, ts in inv_checked_types.items():
-                inv_res[v] = intersection_types(*ts)
-        return (res, inv_res)
-
-    def visit_UnaryOp(self, node: UnaryOp) -> PairType:
-        (res, inv_res) = self.visit(node.operand)
-        if isinstance(node.op, Not):
-            return (inv_res, res)
-        return (res, inv_res)
-
-
-def merge_scope(s1: typing.Dict[str, Type], s2: typing.Dict[str, Type]):
-    keys = OrderedSet(s1.keys()).union(s2.keys())
-    merged = {}
-    for k in keys:
-        if k not in s1.keys():
-            merged[k] = s2[k]
-        elif k not in s2.keys():
-            merged[k] = s1[k]
-        else:
-            try:
-                assert isinstance(s1[k], InstanceType) and isinstance(
-                    s2[k], InstanceType
-                ), "Can only merge instance types"
-                merged[k] = InstanceType(union_types(s1[k].typ, s2[k].typ))
-            except AssertionError as e:
-                raise AssertionError(
-                    f"Can not merge scopes after branching, conflicting types for {k}: {e}"
-                )
-    return merged
-
-
-class AggressiveTypeInferencer(CompilingNodeTransformer):
-    step = "Static Type Inference"
-
-    def __init__(self, allow_isinstance_anything=False):
-        self.allow_isinstance_anything = allow_isinstance_anything
-        self.FUNCTION_ARGUMENT_REGISTRY = {}
-
-        # A stack of dictionaries for storing scoped knowledge of variable types
-        self.scopes = [INITIAL_SCOPE]
-
-    # Obtain the type of a variable name in the current scope
-    def variable_type(self, name: str) -> Type:
-        name = name
-        for scope in reversed(self.scopes):
-            if name in scope:
-                return scope[name]
-        raise TypeInferenceError(
-            f"Variable {map_to_orig_name(name)} not initialized at access"
-        )
-
-    def enter_scope(self):
-        self.scopes.append({})
-
-    def exit_scope(self):
-        self.scopes.pop()
-
-    def set_variable_type(self, name: str, typ: Type, force=False):
-        if not force and name in self.scopes[-1] and self.scopes[-1][name] != typ:
-            if self.scopes[-1][name] >= typ:
-                # the specified type is broader, we pass on this
-                return
-            raise TypeInferenceError(
-                f"Type {self.scopes[-1][name]} of variable {map_to_orig_name(name)} in local scope does not match inferred type {typ}"
-            )
-        self.scopes[-1][name] = typ
-
-    def implement_typechecks(self, typchecks: TypeMap):
-        prevtyps = {}
-        for n, t in typchecks.items():
-            prevtyps[n] = self.variable_type(n).typ
-            self.set_variable_type(n, InstanceType(t), force=True)
-        return prevtyps
-
-    def dunder_override(self, node: Union[BinOp, Compare, UnaryOp]):
-        # Check for potential dunder_method override
-        operand = None
-        operation = None
-        args = []
-        if isinstance(node, UnaryOp):
-            operand = node.operand
-            operation = node.op
-        elif isinstance(node, BinOp):
-            operand = node.left
-            operation = node.op
-            args.append(node.right)
-        elif isinstance(node, Compare):
-            operation = node.ops[0]
-            if any([isinstance(operation, x) for x in [ast.In, ast.NotIn]]):
-                operand = node.comparators[0]
-                args = [node.left]
-            else:
-                operand = node.left
-                args = node.comparators
-            assert len(node.ops) == 1, "Only support one op at a time"
-        if operand is not None and hasattr(operand, "id"):
-            operand_type = self.variable_type(operand.id)
-            if (
-                operation.__class__ in DUNDER_MAP
-                and isinstance(operand_type, InstanceType)
-                and isinstance(operand_type.typ, RecordType)
-            ):
-                dunder = DUNDER_MAP[operation.__class__]
-                operand_class_name = operand_type.typ.record.name
-                method_name = f"{operand_class_name}_{dunder}"
-                if any([method_name in scope for scope in self.scopes]):
-                    call = ast.Call(
-                        func=ast.Attribute(
-                            value=operand,
-                            attr=dunder,
-                            ctx=ast.Load(),
-                        ),
-                        args=args,
-                        keywords=[],
-                    )
-                    call.func.orig_id = None
-                    call.func.id = method_name
-                    return self.visit_Call(call)
-        return None
-
-    def type_from_annotation(self, ann: expr):
-        if isinstance(ann, Constant):
-            if ann.value is None:
-                return UnitType()
-        if isinstance(ann, Name):
-            if ann.id in ATOMIC_TYPES:
-                return ATOMIC_TYPES[ann.id]
-            v_t = self.variable_type(ann.id)
-            if isinstance(v_t, ClassType):
-                return v_t
-            raise TypeInferenceError(
-                f"Class name {ann.orig_id} not initialized before annotating variable"
-            )
-        if isinstance(ann, Subscript):
-            assert isinstance(
-                ann.value, Name
-            ), "Only Union, Dict and List are allowed as Generic types"
-            if ann.value.orig_id == "Union":
-                ann_types = frozenlist(
-                    [self.type_from_annotation(e) for e in ann.slice.elts]
-                )
-                return union_types(*ann_types)
-            if ann.value.orig_id == "List":
-                ann_type = self.type_from_annotation(ann.slice)
-                assert isinstance(
-                    ann_type, ClassType
-                ), "List must have a single type as parameter"
-                assert not isinstance(
-                    ann_type, TupleType
-                ), "List can currently not hold tuples"
-                return ListType(InstanceType(ann_type))
-            if ann.value.orig_id == "Dict":
-                assert isinstance(ann.slice, Tuple), "Dict must combine two classes"
-                assert len(ann.slice.elts) == 2, "Dict must combine two classes"
-                ann_types = self.type_from_annotation(
-                    ann.slice.elts[0]
-                ), self.type_from_annotation(ann.slice.elts[1])
-                assert all(
-                    isinstance(e, ClassType) for e in ann_types
-                ), "Dict must combine two classes"
-                assert not any(
-                    isinstance(e, TupleType) for e in ann_types
-                ), "Dict can currently not hold tuples"
-                return DictType(*(InstanceType(a) for a in ann_types))
-            if ann.value.orig_id == "Tuple":
-                assert isinstance(
-                    ann.slice, Tuple
-                ), "Tuple must combine several classes"
-                ann_types = [self.type_from_annotation(e) for e in ann.slice.elts]
-                assert all(
-                    isinstance(e, ClassType) for e in ann_types
-                ), "Tuple must combine classes"
-                return TupleType(frozenlist([InstanceType(a) for a in ann_types]))
-            raise NotImplementedError(
-                "Only Union, Dict and List are allowed as Generic types"
-            )
-        if ann is None:
-            return AnyType()
-        raise NotImplementedError(f"Annotation type {ann.__class__} is not supported")
-
-    def visit_sequence(self, node_seq: typing.List[stmt]) -> plt.AST:
-        additional_functions = []
-        for n in node_seq:
-            if not isinstance(n, ast.ClassDef):
-                continue
-            non_method_attributes = []
-            for attribute in n.body:
-                if not isinstance(attribute, ast.FunctionDef):
-                    non_method_attributes.append(attribute)
-                    continue
-                func = copy(attribute)
-                if func.name[0:2] == "__" and func.name[-2:] == "__":
-                    assert any(
-                        [func.name == value for key, value in DUNDER_MAP.items()]
-                    ), f"The following Dunder methods are supported {list(DUNDER_MAP.values())}. Received {func.name} which is not supported"
-                func.name = f"{n.name}_{attribute.name}"
-                for arg in func.args.args:
-                    assert (
-                        arg.annotation is None or arg.annotation.id != n.name
-                    ), "Invalid Python, class name is undefined at this stage."
-                assert (
-                    func.returns is None or func.returns.id != n.name
-                ), "Invalid Python, class name is undefined at this stage"
-                func.args.args[0].annotation = ast.Name(id=n.name, ctx=ast.Load())
-                additional_functions.append(func)
-            n.body = non_method_attributes
-        if additional_functions:
-            last = node_seq.pop()
-            node_seq.extend(additional_functions)
-            node_seq.append(last)
-
-        stmts = []
-        prevtyps = {}
-        for n in node_seq:
-            stmt = self.visit(n)
-            stmts.append(stmt)
-            # if an assert is amng the statements apply the isinstance cast
-            if isinstance(stmt, Assert):
-                typchecks, _ = TypeCheckVisitor(self.allow_isinstance_anything).visit(
-                    stmt.test
-                )
-                # for the time after this assert, the variable has the specialized type
-                prevtyps.update(self.implement_typechecks(typchecks))
-        self.implement_typechecks(prevtyps)
-        return stmts
-
-    def visit_ClassDef(self, node: ClassDef) -> TypedClassDef:
-        class_record = RecordReader.extract(node, self)
-        typ = RecordType(class_record)
-        self.set_variable_type(node.name, typ)
-        self.FUNCTION_ARGUMENT_REGISTRY[node.name] = [
-            typedarg(arg=field, typ=field_typ, orig_arg=field)
-            for field, field_typ in class_record.fields
-        ]
-        typed_node = copy(node)
-        typed_node.class_typ = typ
-        return typed_node
-
-    def visit_Constant(self, node: Constant) -> TypedConstant:
-        tc = copy(node)
-        assert type(node.value) not in [
-            float,
-            complex,
-            type(...),
-        ], "Float, complex numbers and ellipsis currently not supported"
-        tc.typ = constant_type(node.value)
-        return tc
-
-    def visit_NoneType(self, node: None) -> TypedConstant:
-        tc = Constant(value=None)
-        tc.typ = constant_type(tc.value)
-        return tc
-
-    def visit_Tuple(self, node: Tuple) -> TypedTuple:
-        tt = copy(node)
-        tt.elts = [self.visit(e) for e in node.elts]
-        tt.typ = InstanceType(TupleType(frozenlist([e.typ for e in tt.elts])))
-        return tt
-
-    def visit_List(self, node: List) -> TypedList:
-        tt = copy(node)
-        tt.elts = [self.visit(e) for e in node.elts]
-        l_typ = tt.elts[0].typ
-        assert all(
-            l_typ >= e.typ for e in tt.elts
-        ), "All elements of a list must have the same type"
-        tt.typ = InstanceType(ListType(l_typ))
-        return tt
-
-    def visit_Dict(self, node: Dict) -> TypedDict:
-        tt = copy(node)
-        tt.keys = [self.visit(k) for k in node.keys]
-        tt.values = [self.visit(v) for v in node.values]
-        k_typ = tt.keys[0].typ
-        assert all(k_typ >= k.typ for k in tt.keys), "All keys must have the same type"
-        v_typ = tt.values[0].typ
-        assert all(
-            v_typ >= v.typ for v in tt.values
-        ), "All values must have the same type"
-        tt.typ = InstanceType(DictType(k_typ, v_typ))
-        return tt
-
-    def visit_Assign(self, node: Assign) -> TypedAssign:
-        typed_ass = copy(node)
-        typed_ass.value: TypedExpression = self.visit(node.value)
-        # Make sure to first set the type of each target name so we can load it when visiting it
-        for t in node.targets:
-            assert isinstance(
-                t, Name
-            ), "Can only assign to variable names, no type deconstruction"
-            # Check compatability to previous types -> variable can be bound in a function before and needs to maintain type
-            self.set_variable_type(t.id, typed_ass.value.typ)
-        typed_ass.targets = [self.visit(t) for t in node.targets]
-        return typed_ass
-
-    def visit_AnnAssign(self, node: AnnAssign) -> TypedAnnAssign:
-        typed_ass = copy(node)
-        typed_ass.annotation = self.type_from_annotation(node.annotation)
-        if isinstance(typed_ass.annotation, ListType) and (
-            (isinstance(node.value, Constant) and node.value.value == [])
-            or (isinstance(node.value, List) and node.value.elts == [])
-        ):
-            # Empty lists are only allowed in annotated assignments
-            typed_ass.value: TypedExpression = copy(node.value)
-            typed_ass.value.typ = InstanceType(typed_ass.annotation)
-        elif isinstance(typed_ass.annotation, DictType) and (
-            (isinstance(node.value, Constant) and node.value.value == {})
-            or (
-                isinstance(node.value, Dict)
-                and node.value.keys == []
-                and node.value.values == []
-            )
-        ):
-            # Empty lists are only allowed in annotated assignments
-            typed_ass.value: TypedExpression = copy(node.value)
-            typed_ass.value.typ = InstanceType(typed_ass.annotation)
-        else:
-            typed_ass.value: TypedExpression = self.visit(node.value)
-        assert isinstance(
-            node.target, Name
-        ), "Can only assign to variable names, no type deconstruction"
-        # Check compatability to previous types -> variable can be bound in a function before and needs to maintain type
-        self.set_variable_type(node.target.id, InstanceType(typed_ass.annotation))
-        typed_ass.target = self.visit(node.target)
-        assert (
-            typed_ass.value.typ >= InstanceType(typed_ass.annotation)
-            or InstanceType(typed_ass.annotation) >= typed_ass.value.typ
-        ), "Can only cast between related types"
-        return typed_ass
-
-    def visit_If(self, node: If) -> TypedIf:
-        typed_if = copy(node)
-        typed_if.test = self.visit(node.test)
-        assert (
-            typed_if.test.typ == BoolInstanceType
-        ), "Branching condition must have boolean type"
-        typchecks, inv_typchecks = TypeCheckVisitor(
-            self.allow_isinstance_anything
-        ).visit(typed_if.test)
-        # for the time of the branch, these types are cast
-        initial_scope = copy(self.scopes[-1])
-        self.implement_typechecks(typchecks)
-        typed_if.body = self.visit_sequence(node.body)
-        # save resulting types
-        final_scope_body = copy(self.scopes[-1])
-        # reverse typechecks and remove typing of one branch
-        self.scopes[-1] = initial_scope
-        # for the time of the else branch, the inverse types hold
-        self.implement_typechecks(inv_typchecks)
-        typed_if.orelse = self.visit_sequence(node.orelse)
-        final_scope_else = self.scopes[-1]
-        # unify the resulting branch scopes
-        self.scopes[-1] = merge_scope(final_scope_body, final_scope_else)
-        return typed_if
-
-    def visit_While(self, node: While) -> TypedWhile:
-        typed_while = copy(node)
-        typed_while.test = self.visit(node.test)
-        assert (
-            typed_while.test.typ == BoolInstanceType
-        ), "Branching condition must have boolean type"
-        typchecks, inv_typchecks = TypeCheckVisitor(
-            self.allow_isinstance_anything
-        ).visit(typed_while.test)
-        # for the time of the branch, these types are cast
-        initial_scope = copy(self.scopes[-1])
-        self.implement_typechecks(typchecks)
-        typed_while.body = self.visit_sequence(node.body)
-        final_scope_body = copy(self.scopes[-1])
-        # revert changes
-        self.scopes[-1] = initial_scope
-        # for the time of the else branch, the inverse types hold
-        self.implement_typechecks(inv_typchecks)
-        typed_while.orelse = self.visit_sequence(node.orelse)
-        final_scope_else = self.scopes[-1]
-        self.scopes[-1] = merge_scope(final_scope_body, final_scope_else)
-        return typed_while
-
-    def visit_For(self, node: For) -> TypedFor:
-        typed_for = copy(node)
-        typed_for.iter = self.visit(node.iter)
-        if isinstance(node.target, Tuple):
-            raise NotImplementedError(
-                "Tuple deconstruction in for loops is not supported yet"
-            )
-        vartyp = None
-        itertyp = typed_for.iter.typ
-        assert isinstance(
-            itertyp, InstanceType
-        ), "Can only iterate over instances, not classes"
-        if isinstance(itertyp.typ, TupleType):
-            assert itertyp.typ.typs, "Iterating over an empty tuple is not allowed"
-            vartyp = itertyp.typ.typs[0]
-            assert all(
-                itertyp.typ.typs[0] == t for t in typed_for.iter.typ.typs
-            ), "Iterating through a tuple requires the same type for each element"
-        elif isinstance(itertyp.typ, ListType):
-            vartyp = itertyp.typ.typ
-        else:
-            raise NotImplementedError(
-                "Type inference for loops over non-list objects is not supported"
-            )
-        self.set_variable_type(node.target.id, vartyp)
-        typed_for.target = self.visit(node.target)
-        typed_for.body = self.visit_sequence(node.body)
-        typed_for.orelse = self.visit_sequence(node.orelse)
-        return typed_for
-
-    def visit_Name(self, node: Name) -> TypedName:
-        tn = copy(node)
-        # Make sure that the rhs of an assign is evaluated first
-        tn.typ = self.variable_type(node.id)
-        return tn
-
-    def visit_keyword(self, node: keyword) -> Typedkeyword:
-        tk = copy(node)
-        tk.value = self.visit(node.value)
-        return tk
-
-    def visit_Compare(self, node: Compare) -> Union[TypedCompare, TypedCall]:
-        dunder_node = self.dunder_override(node)
-        if dunder_node is not None:
-            if isinstance(node.ops[0], ast.NotIn):
-                return self.visit(ast.UnaryOp(op=ast.Not(), operand=dunder_node))
-            return dunder_node
-        typed_cmp = copy(node)
-        typed_cmp.left = self.visit(node.left)
-        typed_cmp.comparators = [self.visit(s) for s in node.comparators]
-        typed_cmp.typ = BoolInstanceType
-
-        return typed_cmp
-
-    def visit_arg(self, node: arg) -> typedarg:
-        ta = copy(node)
-        ta.typ = InstanceType(self.type_from_annotation(node.annotation))
-        self.set_variable_type(ta.arg, ta.typ)
-        return ta
-
-    def visit_arguments(self, node: arguments) -> typedarguments:
-        if node.kw_defaults or node.kwarg or node.kwonlyargs or node.defaults:
-            raise NotImplementedError(
-                "Keyword arguments and defaults not supported yet"
-            )
-        ta = copy(node)
-        ta.args = [self.visit(a) for a in node.args]
-        return ta
-
-    def visit_FunctionDef(self, node: FunctionDef) -> TypedFunctionDef:
-        tfd = copy(node)
-        wraps_builtin = (
-            all(
-                isinstance(o, Name) and o.orig_id == "wraps_builtin"
-                for o in node.decorator_list
-            )
-            and node.decorator_list
-        )
-        assert (
-            not node.decorator_list or wraps_builtin
-        ), "Functions may not have decorators other than wraps_builtin"
-        for i, arg in enumerate(node.args.args):
-            if hasattr(arg.annotation, "idSelf"):
-                tfd.args.args[i].annotation.id = tfd.args.args[0].annotation.id
-        if hasattr(node.returns, "idSelf"):
-            tfd.returns.id = tfd.args.args[0].annotation.id
-
-        self.enter_scope()
-        tfd.args = self.visit(node.args)
-        functyp = FunctionType(
-            frozenlist([t.typ for t in tfd.args.args]),
-            InstanceType(self.type_from_annotation(tfd.returns)),
-            bound_vars={v: self.variable_type(v) for v in externally_bound_vars(node)},
-            bind_self=node.name if node.name in read_vars(node) else None,
-        )
-        tfd.typ = InstanceType(functyp)
-        if wraps_builtin:
-            # the body of wrapping builtin functions is fully ignored
-            pass
-        else:
-            # We need the function type inside for recursion
-            self.set_variable_type(node.name, tfd.typ)
-            tfd.body = self.visit_sequence(node.body)
-            # Check that return type and annotated return type match
-            rets_extractor = ReturnExtractor(functyp.rettyp)
-            rets_extractor.check_fulfills(tfd)
-
-        self.exit_scope()
-        # We need the function type outside for usage
-        self.set_variable_type(node.name, tfd.typ)
-        self.FUNCTION_ARGUMENT_REGISTRY[node.name] = node.args.args
-        return tfd
-
-    def visit_Module(self, node: Module) -> TypedModule:
-        self.enter_scope()
-        tm = copy(node)
-        tm.body = self.visit_sequence(node.body)
-        self.exit_scope()
-        return tm
-
-    def visit_Expr(self, node: Expr) -> TypedExpr:
-        tn = copy(node)
-        tn.value = self.visit(node.value)
-        return tn
-
-    def visit_BinOp(self, node: BinOp) -> Union[TypedBinOp, TypedCall]:
-        dunder_node = self.dunder_override(node)
-        if dunder_node is not None:
-            return dunder_node
-        tb = copy(node)
-        tb.left = self.visit(node.left)
-        tb.right = self.visit(node.right)
-        binop_fun_typ: FunctionType = tb.left.typ.binop_type(tb.op, tb.right.typ)
-        tb.typ = binop_fun_typ.rettyp
-
-        return tb
-
-    def visit_BoolOp(self, node: BoolOp) -> TypedBoolOp:
-        tt = copy(node)
-        if isinstance(node.op, And):
-            values = []
-            prevtyps = {}
-            for e in node.values:
-                values.append(self.visit(e))
-                typchecks, _ = TypeCheckVisitor(self.allow_isinstance_anything).visit(
-                    values[-1]
-                )
-                # for the time after the shortcut and the variable type to the specialized type
-                prevtyps.update(self.implement_typechecks(typchecks))
-            self.implement_typechecks(prevtyps)
-            tt.values = values
-        elif isinstance(node.op, Or):
-            values = []
-            prevtyps = {}
-            for e in node.values:
-                values.append(self.visit(e))
-                _, inv_typechecks = TypeCheckVisitor(
-                    self.allow_isinstance_anything
-                ).visit(values[-1])
-                # for the time after the shortcut or the variable type is *not* the specialized type
-                prevtyps.update(self.implement_typechecks(inv_typechecks))
-            self.implement_typechecks(prevtyps)
-            tt.values = values
-        else:
-            tt.values = [self.visit(e) for e in node.values]
-        tt.typ = BoolInstanceType
-        assert all(
-            BoolInstanceType >= e.typ for e in tt.values
-        ), "All values compared must be bools"
-        return tt
-
-    def visit_UnaryOp(self, node: UnaryOp) -> TypedUnaryOp:
-        dunder_node = self.dunder_override(node)
-        if dunder_node is not None:
-            if isinstance(node.op, ast.Not):
-                node.operand = dunder_node
-            else:
-                return dunder_node
-        tu = copy(node)
-        tu.operand = self.visit(node.operand)
-        tu.typ = tu.operand.typ.typ.unop_type(node.op).rettyp
-        return tu
-
-    def visit_Subscript(self, node: Subscript) -> TypedSubscript:
-        ts = copy(node)
-        # special case: Subscript of Union / Dict / List and atomic types
-        if isinstance(ts.value, Name) and ts.value.orig_id in [
-            "Union",
-            "Dict",
-            "List",
-        ]:
-            ts.value = ts.typ = self.type_from_annotation(ts)
-            return ts
-
-        ts.value = self.visit(node.value)
-        assert isinstance(ts.value.typ, InstanceType), "Can only subscript instances"
-        if isinstance(ts.value.typ.typ, TupleType):
-            assert (
-                ts.value.typ.typ.typs
-            ), "Accessing elements from the empty tuple is not allowed"
-            if all(ts.value.typ.typ.typs[0] == t for t in ts.value.typ.typ.typs):
-                ts.typ = ts.value.typ.typ.typs[0]
-            elif isinstance(ts.slice, Constant) and isinstance(ts.slice.value, int):
-                ts.typ = ts.value.typ.typ.typs[ts.slice.value]
-            else:
-                raise TypeInferenceError(
-                    f"Could not infer type of subscript of typ {ts.value.typ.typ.__class__}"
-                )
-        elif isinstance(ts.value.typ.typ, PairType):
-            if isinstance(ts.slice, Constant) and isinstance(ts.slice.value, int):
-                ts.typ = (
-                    ts.value.typ.typ.l_typ
-                    if ts.slice.value == 0
-                    else ts.value.typ.typ.r_typ
-                )
-            else:
-                raise TypeInferenceError(
-                    f"Could not infer type of subscript of typ {ts.value.typ.typ.__class__}"
-                )
-        elif isinstance(ts.value.typ.typ, ListType):
-            if not isinstance(ts.slice, Slice):
-                ts.typ = ts.value.typ.typ.typ
-                ts.slice = self.visit(node.slice)
-                assert (
-                    ts.slice.typ == IntegerInstanceType
-                ), "List indices must be integers"
-            else:
-                ts.typ = ts.value.typ
-                if ts.slice.lower is None:
-                    ts.slice.lower = Constant(0)
-                ts.slice.lower = self.visit(node.slice.lower)
-                assert (
-                    ts.slice.lower.typ == IntegerInstanceType
-                ), "lower slice indices for lists must be integers"
-                if ts.slice.upper is None:
-                    ts.slice.upper = Call(
-                        func=Name(id="len", ctx=Load()), args=[ts.value], keywords=[]
-                    )
-                    ts.slice.upper.func.orig_id = "len"
-                ts.slice.upper = self.visit(node.slice.upper)
-                assert (
-                    ts.slice.upper.typ == IntegerInstanceType
-                ), "upper slice indices for lists must be integers"
-        elif isinstance(ts.value.typ.typ, ByteStringType):
-            if not isinstance(ts.slice, Slice):
-                ts.typ = IntegerInstanceType
-                ts.slice = self.visit(node.slice)
-                assert (
-                    ts.slice.typ == IntegerInstanceType
-                ), "bytes indices must be integers"
-            else:
-                ts.typ = ByteStringInstanceType
-                if ts.slice.lower is None:
-                    ts.slice.lower = Constant(0)
-                ts.slice.lower = self.visit(node.slice.lower)
-                assert (
-                    ts.slice.lower.typ == IntegerInstanceType
-                ), "lower slice indices for bytes must be integers"
-                if ts.slice.upper is None:
-                    ts.slice.upper = Call(
-                        func=Name(id="len", ctx=Load()), args=[ts.value], keywords=[]
-                    )
-                    ts.slice.upper.func.orig_id = "len"
-                ts.slice.upper = self.visit(node.slice.upper)
-                assert (
-                    ts.slice.upper.typ == IntegerInstanceType
-                ), "upper slice indices for bytes must be integers"
-        elif isinstance(ts.value.typ.typ, DictType):
-            if not isinstance(ts.slice, Slice):
-                ts.slice = self.visit(node.slice)
-                assert (
-                    ts.slice.typ == ts.value.typ.typ.key_typ
-                ), f"Dict subscript must have dict key type {ts.value.typ.typ.key_typ} but has type {ts.slice.typ}"
-                ts.typ = ts.value.typ.typ.value_typ
-            else:
-                raise TypeInferenceError(
-                    f"Could not infer type of subscript of dict with a slice."
-                )
-        else:
-            raise TypeInferenceError(
-                f"Could not infer type of subscript of typ {ts.value.typ.__class__}"
-            )
-        return ts
-
-    def visit_Call(self, node: Call) -> TypedCall:
-        tc = copy(node)
-        if node.keywords:
-            assert (
-                node.func.id in self.FUNCTION_ARGUMENT_REGISTRY
-            ), "Keyword arguments can only be used with user defined functions"
-            keywords = copy(node.keywords)
-            reg_args = self.FUNCTION_ARGUMENT_REGISTRY[node.func.id]
-            args = []
-            for i, a in enumerate(reg_args):
-                if len(node.args) > i:
-                    args.append(self.visit(node.args[i]))
-                else:
-                    candidates = [
-                        (idx, keyword)
-                        for idx, keyword in enumerate(keywords)
-                        if keyword.arg == a.orig_arg
-                    ]
-                    assert (
-                        len(candidates) == 1
-                    ), f"There should be one keyword or positional argument for the arg {a.orig_arg} but found {len(candidates)}"
-                    args.append(self.visit(candidates[0][1].value))
-                    keywords.pop(candidates[0][0])
-            assert (
-                len(keywords) == 0
-            ), f"Could not match the keywords {[keyword.arg for keyword in keywords]} to any argument"
-            tc.args = args
-            tc.keywords = []
-        else:
-            tc.args = [self.visit(a) for a in node.args]
-
-        # might be isinstance
-        if isinstance(tc.func, Name) and tc.func.orig_id == "isinstance":
-            target_class = tc.args[1].typ
-            if (
-                isinstance(tc.args[0].typ, InstanceType)
-                and isinstance(tc.args[0].typ.typ, AnyType)
-                and not self.allow_isinstance_anything
-            ):
-                raise AssertionError(
-                    "OpShin does not permit checking the instance of raw Anything/Datum objects as this only checks the equality of the constructor id and nothing more. "
-                    "If you are certain of what you are doing, please use the flag '--allow-isinstance-anything'."
-                )
-            ntc = Compare(
-                left=Attribute(tc.args[0], "CONSTR_ID"),
-                ops=[Eq()],
-                comparators=[Constant(target_class.record.constructor)],
-            )
-            custom_fix_missing_locations(ntc, node)
-            ntc = self.visit(ntc)
-            ntc.typ = BoolInstanceType
-            ntc.typechecks = TypeCheckVisitor(self.allow_isinstance_anything).visit(tc)
-            return ntc
-        try:
-            tc.func = self.visit(node.func)
-        except Exception as e:
-            # might be a method, duck test for class_name, method_name should
-            try:
-                func_variable_type = self.variable_type(tc.func.value.id)
-                class_name = func_variable_type.typ.record.name
-                method_name = f"{class_name}_{tc.func.attr}"
-                # If method_name found then use this.
-                self.variable_type(method_name)
-            except Exception:
-                # if this fails raise original error
-                raise e
-            tc.func = self.visit(ast.Name(id=method_name, ctx=ast.Load()))
-            tc.func.orig_id = node.func.attr
-            c_self = ast.Name(id=node.func.value.id, ctx=ast.Load())
-            tc.args.insert(0, self.visit(c_self))
-
-        # might be a class
-        if isinstance(tc.func.typ, ClassType):
-            tc.func.typ = tc.func.typ.constr_type()
-        # type might only turn out after the initialization (note the constr could be polymorphic)
-        if isinstance(tc.func.typ, InstanceType) and isinstance(
-            tc.func.typ.typ, PolymorphicFunctionType
-        ):
-            tc.func.typ = PolymorphicFunctionInstanceType(
-                tc.func.typ.typ.polymorphic_function.type_from_args(
-                    [a.typ for a in tc.args]
-                ),
-                tc.func.typ.typ.polymorphic_function,
-            )
-        if isinstance(tc.func.typ, InstanceType) and isinstance(
-            tc.func.typ.typ, FunctionType
-        ):
-            functyp = tc.func.typ.typ
-            assert len(tc.args) == len(
-                functyp.argtyps
-            ), f"Signature of function does not match number of arguments. Expected {len(functyp.argtyps)} arguments with these types: {functyp.argtyps} but got {len(tc.args)} arguments."
-            # all arguments need to be subtypes of the parameter type
-            for i, (a, ap) in enumerate(zip(tc.args, functyp.argtyps)):
-                assert (
-                    ap >= a.typ
-                ), f"Signature of function does not match arguments in argument {i}. Expected this type: {ap} but got {a.typ}."
-            tc.typ = functyp.rettyp
-            return tc
-        raise TypeInferenceError("Could not infer type of call")
-
-    def visit_Pass(self, node: Pass) -> TypedPass:
-        tp = copy(node)
-        return tp
-
-    def visit_Return(self, node: Return) -> TypedReturn:
-        tp = copy(node)
-        tp.value = self.visit(node.value)
-        tp.typ = tp.value.typ
-        return tp
-
-    def visit_Attribute(self, node: Attribute) -> TypedAttribute:
-        tp = copy(node)
-        tp.value = self.visit(node.value)
-        owner = tp.value.typ
-        # accesses to field
-        tp.typ = owner.attribute_type(node.attr)
-        return tp
-
-    def visit_Assert(self, node: Assert) -> TypedAssert:
-        ta = copy(node)
-        ta.test = self.visit(node.test)
-        assert (
-            ta.test.typ == BoolInstanceType
-        ), "Assertions must result in a boolean type"
-        if ta.msg is not None:
-            ta.msg = self.visit(node.msg)
-            assert (
-                ta.msg.typ == StringInstanceType
-            ), "Assertions must has a string message (or None)"
-        return ta
-
-    def visit_RawPlutoExpr(self, node: RawPlutoExpr) -> RawPlutoExpr:
-        assert node.typ is not None, "Raw Pluto Expression is missing type annotation"
-        return node
-
-    def visit_IfExp(self, node: IfExp) -> TypedIfExp:
-        node_cp = copy(node)
-        node_cp.test = self.visit(node.test)
-        assert node_cp.test.typ == BoolInstanceType, "Comparison must have type boolean"
-        typchecks, inv_typchecks = TypeCheckVisitor(
-            self.allow_isinstance_anything
-        ).visit(node_cp.test)
-        prevtyps = self.implement_typechecks(typchecks)
-        node_cp.body = self.visit(node.body)
-        self.implement_typechecks(prevtyps)
-        prevtyps = self.implement_typechecks(inv_typchecks)
-        node_cp.orelse = self.visit(node.orelse)
-        self.implement_typechecks(prevtyps)
-        if node_cp.body.typ >= node_cp.orelse.typ:
-            node_cp.typ = node_cp.body.typ
-        elif node_cp.orelse.typ >= node_cp.body.typ:
-            node_cp.typ = node_cp.orelse.typ
-        else:
-            try:
-                assert isinstance(node_cp.body.typ, InstanceType) and isinstance(
-                    node_cp.orelse.typ, InstanceType
-                )
-                node_cp.typ = InstanceType(
-                    union_types(node_cp.body.typ.typ, node_cp.orelse.typ.typ)
-                )
-            except AssertionError:
-                raise TypeInferenceError(
-                    "Branches of if-expression must return compatible types."
-                )
-        return node_cp
-
-    def visit_comprehension(self, g: comprehension) -> typedcomprehension:
-        new_g = copy(g)
-        if isinstance(g.target, Tuple):
-            raise NotImplementedError(
-                "Type deconstruction in for loops is not supported yet"
-            )
-        new_g.iter = self.visit(g.iter)
-        itertyp = new_g.iter.typ
-        assert isinstance(
-            itertyp, InstanceType
-        ), "Can only iterate over instances, not classes"
-        if isinstance(itertyp.typ, TupleType):
-            assert itertyp.typ.typs, "Iterating over an empty tuple is not allowed"
-            vartyp = itertyp.typ.typs[0]
-            assert all(
-                itertyp.typ.typs[0] == t for t in new_g.iter.typ.typs
-            ), "Iterating through a tuple requires the same type for each element"
-        elif isinstance(itertyp.typ, ListType):
-            vartyp = itertyp.typ.typ
-        else:
-            raise NotImplementedError(
-                "Type inference for loops over non-list objects is not supported"
-            )
-        self.set_variable_type(g.target.id, vartyp)
-        new_g.target = self.visit(g.target)
-        new_g.ifs = [self.visit(i) for i in g.ifs]
-        return new_g
-
-    def visit_ListComp(self, node: ListComp) -> TypedListComp:
-        typed_listcomp = copy(node)
-        # inside the comprehension is a seperate scope
-        self.enter_scope()
-        # first evaluate generators for assigned variables
-        typed_listcomp.generators = [self.visit(s) for s in node.generators]
-        # then evaluate elements
-        typed_listcomp.elt = self.visit(node.elt)
-        self.exit_scope()
-        typed_listcomp.typ = InstanceType(ListType(typed_listcomp.elt.typ))
-        return typed_listcomp
-
-    def visit_DictComp(self, node: DictComp) -> TypedDictComp:
-        typed_dictcomp = copy(node)
-        # inside the comprehension is a seperate scope
-        self.enter_scope()
-        # first evaluate generators for assigned variables
-        typed_dictcomp.generators = [self.visit(s) for s in node.generators]
-        # then evaluate elements
-        typed_dictcomp.key = self.visit(node.key)
-        typed_dictcomp.value = self.visit(node.value)
-        self.exit_scope()
-        typed_dictcomp.typ = InstanceType(
-            DictType(typed_dictcomp.key.typ, typed_dictcomp.value.typ)
-        )
-        return typed_dictcomp
-
-    def visit_FormattedValue(self, node: FormattedValue) -> TypedFormattedValue:
-        typed_node = copy(node)
-        typed_node.value = self.visit(node.value)
-        assert node.conversion in (
-            -1,
-            115,
-        ), "Only string formatting is allowed but got repr or ascii formatting."
-        assert (
-            node.format_spec is None
-        ), "No format specification is allowed but got formatting specifiers (i.e. decimals)."
-        typed_node.typ = StringInstanceType
-        return typed_node
-
-    def visit_JoinedStr(self, node: JoinedStr) -> TypedJoinedStr:
-        typed_node = copy(node)
-        typed_node.values = [self.visit(v) for v in node.values]
-        typed_node.typ = StringInstanceType
-        return typed_node
-
-    def visit_ImportFrom(self, node: ImportFrom) -> ImportFrom:
-        assert node.module == "opshin.bridge", "Trying to import from invalid location"
-        return node
-
-    def generic_visit(self, node: AST) -> TypedAST:
-        raise NotImplementedError(
-            f"Cannot infer type of non-implemented node {node.__class__}"
-        )
-
-
-class RecordReader(NodeVisitor):
-    name: str
-    orig_name: str
-    constructor: typing.Optional[int]
-    attributes: typing.List[typing.Tuple[str, Type]]
-    _type_inferencer: AggressiveTypeInferencer
-
-    def __init__(self, type_inferencer: AggressiveTypeInferencer):
-        self.constructor = None
-        self.attributes = []
-        self._type_inferencer = type_inferencer
-
-    @classmethod
-    def extract(cls, c: ClassDef, type_inferencer: AggressiveTypeInferencer) -> Record:
-        f = cls(type_inferencer)
-        f.visit(c)
-        if f.constructor is None:
-            det_string = RecordType(
-                Record(f.name, f.orig_name, 0, frozenlist(f.attributes))
-            ).id_map(skip_constructor=True)
-            det_hash = sha256(str(det_string).encode("utf8")).hexdigest()
-            f.constructor = int(det_hash, 16) % 2**32
-        return Record(f.name, f.orig_name, f.constructor, frozenlist(f.attributes))
-
-    def visit_AnnAssign(self, node: AnnAssign) -> None:
-        assert isinstance(
-            node.target, Name
-        ), "Record elements must have named attributes"
-        typ = self._type_inferencer.type_from_annotation(node.annotation)
-        if node.target.id != "CONSTR_ID":
-            assert (
-                node.value is None
-            ), f"PlutusData attribute {node.target.id} may not have a default value"
-            assert not isinstance(
-                typ, TupleType
-            ), "Records can currently not hold tuples"
-            self.attributes.append(
-                (
-                    node.target.id,
-                    InstanceType(typ),
-                )
-            )
-            return
-        assert typ == IntegerType, "CONSTR_ID must be assigned an integer"
-        assert isinstance(
-            node.value, Constant
-        ), "CONSTR_ID must be assigned a constant integer"
-        assert isinstance(
-            node.value.value, int
-        ), "CONSTR_ID must be assigned an integer"
-        self.constructor = node.value.value
-
-    def visit_ClassDef(self, node: ClassDef) -> None:
-        self.name = node.name
-        self.orig_name = node.orig_name
-        for s in node.body:
-            self.visit(s)
-
-    def visit_Pass(self, node: Pass) -> None:
-        pass
-
-    def visit_Assign(self, node: Assign) -> None:
-        assert len(node.targets) == 1, "Record elements must be assigned one by one"
-        target = node.targets[0]
-        assert isinstance(target, Name), "Record elements must have named attributes"
-        assert (
-            target.id == "CONSTR_ID"
-        ), "Type annotations may only be omitted for CONSTR_ID"
-        assert isinstance(
-            node.value, Constant
-        ), "CONSTR_ID must be assigned a constant integer"
-        assert isinstance(
-            node.value.value, int
-        ), "CONSTR_ID must be assigned an integer"
-        self.constructor = node.value.value
-
-    def visit_Expr(self, node: Expr) -> None:
-        assert isinstance(
-            node.value, Constant
-        ), "Only comments are allowed inside classes"
-        return None
-
-    def generic_visit(self, node: AST) -> None:
-        raise NotImplementedError(f"Can not compile {ast.dump(node)} inside of a class")
-
-
-def typed_ast(ast: AST):
-    return AggressiveTypeInferencer().visit(ast)
-
-
-def map_to_orig_name(name: str):
-    return re.sub(r"_\d+$", "", name)
-
-
-class ReturnExtractor(TypedNodeVisitor):
-    """
-    Utility to check that all paths end in Return statements with the proper type
-
-    Returns whether there is no remaining path
-    """
-
-    def __init__(self, func_rettyp: Type):
-        self.func_rettyp = func_rettyp
-
-    def visit_sequence(self, nodes: typing.List[TypedAST]) -> bool:
-        all_paths_covered = False
-        for node in nodes:
-            all_paths_covered = self.visit(node)
-            if all_paths_covered:
-                break
-        return all_paths_covered
-
-    def visit_If(self, node: If) -> bool:
-        return self.visit_sequence(node.body) and self.visit_sequence(node.orelse)
-
-    def visit_For(self, node: For) -> bool:
-        # The body simply has to be checked but has no influence on whether all paths are covered
-        # because it might never be visited
-        self.visit_sequence(node.body)
-        # the else path is always visited
-        return self.visit_sequence(node.orelse)
-
-    def visit_While(self, node: For) -> bool:
-        # The body simply has to be checked but has no influence on whether all paths are covered
-        # because it might never be visited
-        self.visit_sequence(node.body)
-        # the else path is always visited
-        return self.visit_sequence(node.orelse)
-
-    def visit_Return(self, node: Return) -> bool:
-        assert (
-            self.func_rettyp >= node.typ
-        ), f"Function annotated return type does not match actual return type"
-        return True
-
-    def check_fulfills(self, node: FunctionDef):
-        all_paths_covered = self.visit_sequence(node.body)
-        if not all_paths_covered:
-            assert (
-                self.func_rettyp >= NoneInstanceType
-            ), f"Function '{node.name}' has no return statement but is supposed to return not-None value"
-
-
-
-
-
-
-
-

Functions

-
-
-def constant_type(c) -
-
-
-
-
-def intersection_types(*ts: Type) -
-
-
-
-
-def map_to_orig_name(name: str) -
-
-
-
-
-def merge_scope(s1: Dict[str, Type], s2: Dict[str, Type]) -
-
-
-
-
-def record_from_plutusdata(c: pycardano.plutus.PlutusData) -
-
-
-
-
-def typed_ast(ast: ast.AST) -
-
-
-
-
-def union_types(*ts: Type) -
-
-
-
-
-
-
-

Classes

-
-
-class AggressiveTypeInferencer -(allow_isinstance_anything=False) -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class AggressiveTypeInferencer(CompilingNodeTransformer):
-    step = "Static Type Inference"
-
-    def __init__(self, allow_isinstance_anything=False):
-        self.allow_isinstance_anything = allow_isinstance_anything
-        self.FUNCTION_ARGUMENT_REGISTRY = {}
-
-        # A stack of dictionaries for storing scoped knowledge of variable types
-        self.scopes = [INITIAL_SCOPE]
-
-    # Obtain the type of a variable name in the current scope
-    def variable_type(self, name: str) -> Type:
-        name = name
-        for scope in reversed(self.scopes):
-            if name in scope:
-                return scope[name]
-        raise TypeInferenceError(
-            f"Variable {map_to_orig_name(name)} not initialized at access"
-        )
-
-    def enter_scope(self):
-        self.scopes.append({})
-
-    def exit_scope(self):
-        self.scopes.pop()
-
-    def set_variable_type(self, name: str, typ: Type, force=False):
-        if not force and name in self.scopes[-1] and self.scopes[-1][name] != typ:
-            if self.scopes[-1][name] >= typ:
-                # the specified type is broader, we pass on this
-                return
-            raise TypeInferenceError(
-                f"Type {self.scopes[-1][name]} of variable {map_to_orig_name(name)} in local scope does not match inferred type {typ}"
-            )
-        self.scopes[-1][name] = typ
-
-    def implement_typechecks(self, typchecks: TypeMap):
-        prevtyps = {}
-        for n, t in typchecks.items():
-            prevtyps[n] = self.variable_type(n).typ
-            self.set_variable_type(n, InstanceType(t), force=True)
-        return prevtyps
-
-    def dunder_override(self, node: Union[BinOp, Compare, UnaryOp]):
-        # Check for potential dunder_method override
-        operand = None
-        operation = None
-        args = []
-        if isinstance(node, UnaryOp):
-            operand = node.operand
-            operation = node.op
-        elif isinstance(node, BinOp):
-            operand = node.left
-            operation = node.op
-            args.append(node.right)
-        elif isinstance(node, Compare):
-            operation = node.ops[0]
-            if any([isinstance(operation, x) for x in [ast.In, ast.NotIn]]):
-                operand = node.comparators[0]
-                args = [node.left]
-            else:
-                operand = node.left
-                args = node.comparators
-            assert len(node.ops) == 1, "Only support one op at a time"
-        if operand is not None and hasattr(operand, "id"):
-            operand_type = self.variable_type(operand.id)
-            if (
-                operation.__class__ in DUNDER_MAP
-                and isinstance(operand_type, InstanceType)
-                and isinstance(operand_type.typ, RecordType)
-            ):
-                dunder = DUNDER_MAP[operation.__class__]
-                operand_class_name = operand_type.typ.record.name
-                method_name = f"{operand_class_name}_{dunder}"
-                if any([method_name in scope for scope in self.scopes]):
-                    call = ast.Call(
-                        func=ast.Attribute(
-                            value=operand,
-                            attr=dunder,
-                            ctx=ast.Load(),
-                        ),
-                        args=args,
-                        keywords=[],
-                    )
-                    call.func.orig_id = None
-                    call.func.id = method_name
-                    return self.visit_Call(call)
-        return None
-
-    def type_from_annotation(self, ann: expr):
-        if isinstance(ann, Constant):
-            if ann.value is None:
-                return UnitType()
-        if isinstance(ann, Name):
-            if ann.id in ATOMIC_TYPES:
-                return ATOMIC_TYPES[ann.id]
-            v_t = self.variable_type(ann.id)
-            if isinstance(v_t, ClassType):
-                return v_t
-            raise TypeInferenceError(
-                f"Class name {ann.orig_id} not initialized before annotating variable"
-            )
-        if isinstance(ann, Subscript):
-            assert isinstance(
-                ann.value, Name
-            ), "Only Union, Dict and List are allowed as Generic types"
-            if ann.value.orig_id == "Union":
-                ann_types = frozenlist(
-                    [self.type_from_annotation(e) for e in ann.slice.elts]
-                )
-                return union_types(*ann_types)
-            if ann.value.orig_id == "List":
-                ann_type = self.type_from_annotation(ann.slice)
-                assert isinstance(
-                    ann_type, ClassType
-                ), "List must have a single type as parameter"
-                assert not isinstance(
-                    ann_type, TupleType
-                ), "List can currently not hold tuples"
-                return ListType(InstanceType(ann_type))
-            if ann.value.orig_id == "Dict":
-                assert isinstance(ann.slice, Tuple), "Dict must combine two classes"
-                assert len(ann.slice.elts) == 2, "Dict must combine two classes"
-                ann_types = self.type_from_annotation(
-                    ann.slice.elts[0]
-                ), self.type_from_annotation(ann.slice.elts[1])
-                assert all(
-                    isinstance(e, ClassType) for e in ann_types
-                ), "Dict must combine two classes"
-                assert not any(
-                    isinstance(e, TupleType) for e in ann_types
-                ), "Dict can currently not hold tuples"
-                return DictType(*(InstanceType(a) for a in ann_types))
-            if ann.value.orig_id == "Tuple":
-                assert isinstance(
-                    ann.slice, Tuple
-                ), "Tuple must combine several classes"
-                ann_types = [self.type_from_annotation(e) for e in ann.slice.elts]
-                assert all(
-                    isinstance(e, ClassType) for e in ann_types
-                ), "Tuple must combine classes"
-                return TupleType(frozenlist([InstanceType(a) for a in ann_types]))
-            raise NotImplementedError(
-                "Only Union, Dict and List are allowed as Generic types"
-            )
-        if ann is None:
-            return AnyType()
-        raise NotImplementedError(f"Annotation type {ann.__class__} is not supported")
-
-    def visit_sequence(self, node_seq: typing.List[stmt]) -> plt.AST:
-        additional_functions = []
-        for n in node_seq:
-            if not isinstance(n, ast.ClassDef):
-                continue
-            non_method_attributes = []
-            for attribute in n.body:
-                if not isinstance(attribute, ast.FunctionDef):
-                    non_method_attributes.append(attribute)
-                    continue
-                func = copy(attribute)
-                if func.name[0:2] == "__" and func.name[-2:] == "__":
-                    assert any(
-                        [func.name == value for key, value in DUNDER_MAP.items()]
-                    ), f"The following Dunder methods are supported {list(DUNDER_MAP.values())}. Received {func.name} which is not supported"
-                func.name = f"{n.name}_{attribute.name}"
-                for arg in func.args.args:
-                    assert (
-                        arg.annotation is None or arg.annotation.id != n.name
-                    ), "Invalid Python, class name is undefined at this stage."
-                assert (
-                    func.returns is None or func.returns.id != n.name
-                ), "Invalid Python, class name is undefined at this stage"
-                func.args.args[0].annotation = ast.Name(id=n.name, ctx=ast.Load())
-                additional_functions.append(func)
-            n.body = non_method_attributes
-        if additional_functions:
-            last = node_seq.pop()
-            node_seq.extend(additional_functions)
-            node_seq.append(last)
-
-        stmts = []
-        prevtyps = {}
-        for n in node_seq:
-            stmt = self.visit(n)
-            stmts.append(stmt)
-            # if an assert is amng the statements apply the isinstance cast
-            if isinstance(stmt, Assert):
-                typchecks, _ = TypeCheckVisitor(self.allow_isinstance_anything).visit(
-                    stmt.test
-                )
-                # for the time after this assert, the variable has the specialized type
-                prevtyps.update(self.implement_typechecks(typchecks))
-        self.implement_typechecks(prevtyps)
-        return stmts
-
-    def visit_ClassDef(self, node: ClassDef) -> TypedClassDef:
-        class_record = RecordReader.extract(node, self)
-        typ = RecordType(class_record)
-        self.set_variable_type(node.name, typ)
-        self.FUNCTION_ARGUMENT_REGISTRY[node.name] = [
-            typedarg(arg=field, typ=field_typ, orig_arg=field)
-            for field, field_typ in class_record.fields
-        ]
-        typed_node = copy(node)
-        typed_node.class_typ = typ
-        return typed_node
-
-    def visit_Constant(self, node: Constant) -> TypedConstant:
-        tc = copy(node)
-        assert type(node.value) not in [
-            float,
-            complex,
-            type(...),
-        ], "Float, complex numbers and ellipsis currently not supported"
-        tc.typ = constant_type(node.value)
-        return tc
-
-    def visit_NoneType(self, node: None) -> TypedConstant:
-        tc = Constant(value=None)
-        tc.typ = constant_type(tc.value)
-        return tc
-
-    def visit_Tuple(self, node: Tuple) -> TypedTuple:
-        tt = copy(node)
-        tt.elts = [self.visit(e) for e in node.elts]
-        tt.typ = InstanceType(TupleType(frozenlist([e.typ for e in tt.elts])))
-        return tt
-
-    def visit_List(self, node: List) -> TypedList:
-        tt = copy(node)
-        tt.elts = [self.visit(e) for e in node.elts]
-        l_typ = tt.elts[0].typ
-        assert all(
-            l_typ >= e.typ for e in tt.elts
-        ), "All elements of a list must have the same type"
-        tt.typ = InstanceType(ListType(l_typ))
-        return tt
-
-    def visit_Dict(self, node: Dict) -> TypedDict:
-        tt = copy(node)
-        tt.keys = [self.visit(k) for k in node.keys]
-        tt.values = [self.visit(v) for v in node.values]
-        k_typ = tt.keys[0].typ
-        assert all(k_typ >= k.typ for k in tt.keys), "All keys must have the same type"
-        v_typ = tt.values[0].typ
-        assert all(
-            v_typ >= v.typ for v in tt.values
-        ), "All values must have the same type"
-        tt.typ = InstanceType(DictType(k_typ, v_typ))
-        return tt
-
-    def visit_Assign(self, node: Assign) -> TypedAssign:
-        typed_ass = copy(node)
-        typed_ass.value: TypedExpression = self.visit(node.value)
-        # Make sure to first set the type of each target name so we can load it when visiting it
-        for t in node.targets:
-            assert isinstance(
-                t, Name
-            ), "Can only assign to variable names, no type deconstruction"
-            # Check compatability to previous types -> variable can be bound in a function before and needs to maintain type
-            self.set_variable_type(t.id, typed_ass.value.typ)
-        typed_ass.targets = [self.visit(t) for t in node.targets]
-        return typed_ass
-
-    def visit_AnnAssign(self, node: AnnAssign) -> TypedAnnAssign:
-        typed_ass = copy(node)
-        typed_ass.annotation = self.type_from_annotation(node.annotation)
-        if isinstance(typed_ass.annotation, ListType) and (
-            (isinstance(node.value, Constant) and node.value.value == [])
-            or (isinstance(node.value, List) and node.value.elts == [])
-        ):
-            # Empty lists are only allowed in annotated assignments
-            typed_ass.value: TypedExpression = copy(node.value)
-            typed_ass.value.typ = InstanceType(typed_ass.annotation)
-        elif isinstance(typed_ass.annotation, DictType) and (
-            (isinstance(node.value, Constant) and node.value.value == {})
-            or (
-                isinstance(node.value, Dict)
-                and node.value.keys == []
-                and node.value.values == []
-            )
-        ):
-            # Empty lists are only allowed in annotated assignments
-            typed_ass.value: TypedExpression = copy(node.value)
-            typed_ass.value.typ = InstanceType(typed_ass.annotation)
-        else:
-            typed_ass.value: TypedExpression = self.visit(node.value)
-        assert isinstance(
-            node.target, Name
-        ), "Can only assign to variable names, no type deconstruction"
-        # Check compatability to previous types -> variable can be bound in a function before and needs to maintain type
-        self.set_variable_type(node.target.id, InstanceType(typed_ass.annotation))
-        typed_ass.target = self.visit(node.target)
-        assert (
-            typed_ass.value.typ >= InstanceType(typed_ass.annotation)
-            or InstanceType(typed_ass.annotation) >= typed_ass.value.typ
-        ), "Can only cast between related types"
-        return typed_ass
-
-    def visit_If(self, node: If) -> TypedIf:
-        typed_if = copy(node)
-        typed_if.test = self.visit(node.test)
-        assert (
-            typed_if.test.typ == BoolInstanceType
-        ), "Branching condition must have boolean type"
-        typchecks, inv_typchecks = TypeCheckVisitor(
-            self.allow_isinstance_anything
-        ).visit(typed_if.test)
-        # for the time of the branch, these types are cast
-        initial_scope = copy(self.scopes[-1])
-        self.implement_typechecks(typchecks)
-        typed_if.body = self.visit_sequence(node.body)
-        # save resulting types
-        final_scope_body = copy(self.scopes[-1])
-        # reverse typechecks and remove typing of one branch
-        self.scopes[-1] = initial_scope
-        # for the time of the else branch, the inverse types hold
-        self.implement_typechecks(inv_typchecks)
-        typed_if.orelse = self.visit_sequence(node.orelse)
-        final_scope_else = self.scopes[-1]
-        # unify the resulting branch scopes
-        self.scopes[-1] = merge_scope(final_scope_body, final_scope_else)
-        return typed_if
-
-    def visit_While(self, node: While) -> TypedWhile:
-        typed_while = copy(node)
-        typed_while.test = self.visit(node.test)
-        assert (
-            typed_while.test.typ == BoolInstanceType
-        ), "Branching condition must have boolean type"
-        typchecks, inv_typchecks = TypeCheckVisitor(
-            self.allow_isinstance_anything
-        ).visit(typed_while.test)
-        # for the time of the branch, these types are cast
-        initial_scope = copy(self.scopes[-1])
-        self.implement_typechecks(typchecks)
-        typed_while.body = self.visit_sequence(node.body)
-        final_scope_body = copy(self.scopes[-1])
-        # revert changes
-        self.scopes[-1] = initial_scope
-        # for the time of the else branch, the inverse types hold
-        self.implement_typechecks(inv_typchecks)
-        typed_while.orelse = self.visit_sequence(node.orelse)
-        final_scope_else = self.scopes[-1]
-        self.scopes[-1] = merge_scope(final_scope_body, final_scope_else)
-        return typed_while
-
-    def visit_For(self, node: For) -> TypedFor:
-        typed_for = copy(node)
-        typed_for.iter = self.visit(node.iter)
-        if isinstance(node.target, Tuple):
-            raise NotImplementedError(
-                "Tuple deconstruction in for loops is not supported yet"
-            )
-        vartyp = None
-        itertyp = typed_for.iter.typ
-        assert isinstance(
-            itertyp, InstanceType
-        ), "Can only iterate over instances, not classes"
-        if isinstance(itertyp.typ, TupleType):
-            assert itertyp.typ.typs, "Iterating over an empty tuple is not allowed"
-            vartyp = itertyp.typ.typs[0]
-            assert all(
-                itertyp.typ.typs[0] == t for t in typed_for.iter.typ.typs
-            ), "Iterating through a tuple requires the same type for each element"
-        elif isinstance(itertyp.typ, ListType):
-            vartyp = itertyp.typ.typ
-        else:
-            raise NotImplementedError(
-                "Type inference for loops over non-list objects is not supported"
-            )
-        self.set_variable_type(node.target.id, vartyp)
-        typed_for.target = self.visit(node.target)
-        typed_for.body = self.visit_sequence(node.body)
-        typed_for.orelse = self.visit_sequence(node.orelse)
-        return typed_for
-
-    def visit_Name(self, node: Name) -> TypedName:
-        tn = copy(node)
-        # Make sure that the rhs of an assign is evaluated first
-        tn.typ = self.variable_type(node.id)
-        return tn
-
-    def visit_keyword(self, node: keyword) -> Typedkeyword:
-        tk = copy(node)
-        tk.value = self.visit(node.value)
-        return tk
-
-    def visit_Compare(self, node: Compare) -> Union[TypedCompare, TypedCall]:
-        dunder_node = self.dunder_override(node)
-        if dunder_node is not None:
-            if isinstance(node.ops[0], ast.NotIn):
-                return self.visit(ast.UnaryOp(op=ast.Not(), operand=dunder_node))
-            return dunder_node
-        typed_cmp = copy(node)
-        typed_cmp.left = self.visit(node.left)
-        typed_cmp.comparators = [self.visit(s) for s in node.comparators]
-        typed_cmp.typ = BoolInstanceType
-
-        return typed_cmp
-
-    def visit_arg(self, node: arg) -> typedarg:
-        ta = copy(node)
-        ta.typ = InstanceType(self.type_from_annotation(node.annotation))
-        self.set_variable_type(ta.arg, ta.typ)
-        return ta
-
-    def visit_arguments(self, node: arguments) -> typedarguments:
-        if node.kw_defaults or node.kwarg or node.kwonlyargs or node.defaults:
-            raise NotImplementedError(
-                "Keyword arguments and defaults not supported yet"
-            )
-        ta = copy(node)
-        ta.args = [self.visit(a) for a in node.args]
-        return ta
-
-    def visit_FunctionDef(self, node: FunctionDef) -> TypedFunctionDef:
-        tfd = copy(node)
-        wraps_builtin = (
-            all(
-                isinstance(o, Name) and o.orig_id == "wraps_builtin"
-                for o in node.decorator_list
-            )
-            and node.decorator_list
-        )
-        assert (
-            not node.decorator_list or wraps_builtin
-        ), "Functions may not have decorators other than wraps_builtin"
-        for i, arg in enumerate(node.args.args):
-            if hasattr(arg.annotation, "idSelf"):
-                tfd.args.args[i].annotation.id = tfd.args.args[0].annotation.id
-        if hasattr(node.returns, "idSelf"):
-            tfd.returns.id = tfd.args.args[0].annotation.id
-
-        self.enter_scope()
-        tfd.args = self.visit(node.args)
-        functyp = FunctionType(
-            frozenlist([t.typ for t in tfd.args.args]),
-            InstanceType(self.type_from_annotation(tfd.returns)),
-            bound_vars={v: self.variable_type(v) for v in externally_bound_vars(node)},
-            bind_self=node.name if node.name in read_vars(node) else None,
-        )
-        tfd.typ = InstanceType(functyp)
-        if wraps_builtin:
-            # the body of wrapping builtin functions is fully ignored
-            pass
-        else:
-            # We need the function type inside for recursion
-            self.set_variable_type(node.name, tfd.typ)
-            tfd.body = self.visit_sequence(node.body)
-            # Check that return type and annotated return type match
-            rets_extractor = ReturnExtractor(functyp.rettyp)
-            rets_extractor.check_fulfills(tfd)
-
-        self.exit_scope()
-        # We need the function type outside for usage
-        self.set_variable_type(node.name, tfd.typ)
-        self.FUNCTION_ARGUMENT_REGISTRY[node.name] = node.args.args
-        return tfd
-
-    def visit_Module(self, node: Module) -> TypedModule:
-        self.enter_scope()
-        tm = copy(node)
-        tm.body = self.visit_sequence(node.body)
-        self.exit_scope()
-        return tm
-
-    def visit_Expr(self, node: Expr) -> TypedExpr:
-        tn = copy(node)
-        tn.value = self.visit(node.value)
-        return tn
-
-    def visit_BinOp(self, node: BinOp) -> Union[TypedBinOp, TypedCall]:
-        dunder_node = self.dunder_override(node)
-        if dunder_node is not None:
-            return dunder_node
-        tb = copy(node)
-        tb.left = self.visit(node.left)
-        tb.right = self.visit(node.right)
-        binop_fun_typ: FunctionType = tb.left.typ.binop_type(tb.op, tb.right.typ)
-        tb.typ = binop_fun_typ.rettyp
-
-        return tb
-
-    def visit_BoolOp(self, node: BoolOp) -> TypedBoolOp:
-        tt = copy(node)
-        if isinstance(node.op, And):
-            values = []
-            prevtyps = {}
-            for e in node.values:
-                values.append(self.visit(e))
-                typchecks, _ = TypeCheckVisitor(self.allow_isinstance_anything).visit(
-                    values[-1]
-                )
-                # for the time after the shortcut and the variable type to the specialized type
-                prevtyps.update(self.implement_typechecks(typchecks))
-            self.implement_typechecks(prevtyps)
-            tt.values = values
-        elif isinstance(node.op, Or):
-            values = []
-            prevtyps = {}
-            for e in node.values:
-                values.append(self.visit(e))
-                _, inv_typechecks = TypeCheckVisitor(
-                    self.allow_isinstance_anything
-                ).visit(values[-1])
-                # for the time after the shortcut or the variable type is *not* the specialized type
-                prevtyps.update(self.implement_typechecks(inv_typechecks))
-            self.implement_typechecks(prevtyps)
-            tt.values = values
-        else:
-            tt.values = [self.visit(e) for e in node.values]
-        tt.typ = BoolInstanceType
-        assert all(
-            BoolInstanceType >= e.typ for e in tt.values
-        ), "All values compared must be bools"
-        return tt
-
-    def visit_UnaryOp(self, node: UnaryOp) -> TypedUnaryOp:
-        dunder_node = self.dunder_override(node)
-        if dunder_node is not None:
-            if isinstance(node.op, ast.Not):
-                node.operand = dunder_node
-            else:
-                return dunder_node
-        tu = copy(node)
-        tu.operand = self.visit(node.operand)
-        tu.typ = tu.operand.typ.typ.unop_type(node.op).rettyp
-        return tu
-
-    def visit_Subscript(self, node: Subscript) -> TypedSubscript:
-        ts = copy(node)
-        # special case: Subscript of Union / Dict / List and atomic types
-        if isinstance(ts.value, Name) and ts.value.orig_id in [
-            "Union",
-            "Dict",
-            "List",
-        ]:
-            ts.value = ts.typ = self.type_from_annotation(ts)
-            return ts
-
-        ts.value = self.visit(node.value)
-        assert isinstance(ts.value.typ, InstanceType), "Can only subscript instances"
-        if isinstance(ts.value.typ.typ, TupleType):
-            assert (
-                ts.value.typ.typ.typs
-            ), "Accessing elements from the empty tuple is not allowed"
-            if all(ts.value.typ.typ.typs[0] == t for t in ts.value.typ.typ.typs):
-                ts.typ = ts.value.typ.typ.typs[0]
-            elif isinstance(ts.slice, Constant) and isinstance(ts.slice.value, int):
-                ts.typ = ts.value.typ.typ.typs[ts.slice.value]
-            else:
-                raise TypeInferenceError(
-                    f"Could not infer type of subscript of typ {ts.value.typ.typ.__class__}"
-                )
-        elif isinstance(ts.value.typ.typ, PairType):
-            if isinstance(ts.slice, Constant) and isinstance(ts.slice.value, int):
-                ts.typ = (
-                    ts.value.typ.typ.l_typ
-                    if ts.slice.value == 0
-                    else ts.value.typ.typ.r_typ
-                )
-            else:
-                raise TypeInferenceError(
-                    f"Could not infer type of subscript of typ {ts.value.typ.typ.__class__}"
-                )
-        elif isinstance(ts.value.typ.typ, ListType):
-            if not isinstance(ts.slice, Slice):
-                ts.typ = ts.value.typ.typ.typ
-                ts.slice = self.visit(node.slice)
-                assert (
-                    ts.slice.typ == IntegerInstanceType
-                ), "List indices must be integers"
-            else:
-                ts.typ = ts.value.typ
-                if ts.slice.lower is None:
-                    ts.slice.lower = Constant(0)
-                ts.slice.lower = self.visit(node.slice.lower)
-                assert (
-                    ts.slice.lower.typ == IntegerInstanceType
-                ), "lower slice indices for lists must be integers"
-                if ts.slice.upper is None:
-                    ts.slice.upper = Call(
-                        func=Name(id="len", ctx=Load()), args=[ts.value], keywords=[]
-                    )
-                    ts.slice.upper.func.orig_id = "len"
-                ts.slice.upper = self.visit(node.slice.upper)
-                assert (
-                    ts.slice.upper.typ == IntegerInstanceType
-                ), "upper slice indices for lists must be integers"
-        elif isinstance(ts.value.typ.typ, ByteStringType):
-            if not isinstance(ts.slice, Slice):
-                ts.typ = IntegerInstanceType
-                ts.slice = self.visit(node.slice)
-                assert (
-                    ts.slice.typ == IntegerInstanceType
-                ), "bytes indices must be integers"
-            else:
-                ts.typ = ByteStringInstanceType
-                if ts.slice.lower is None:
-                    ts.slice.lower = Constant(0)
-                ts.slice.lower = self.visit(node.slice.lower)
-                assert (
-                    ts.slice.lower.typ == IntegerInstanceType
-                ), "lower slice indices for bytes must be integers"
-                if ts.slice.upper is None:
-                    ts.slice.upper = Call(
-                        func=Name(id="len", ctx=Load()), args=[ts.value], keywords=[]
-                    )
-                    ts.slice.upper.func.orig_id = "len"
-                ts.slice.upper = self.visit(node.slice.upper)
-                assert (
-                    ts.slice.upper.typ == IntegerInstanceType
-                ), "upper slice indices for bytes must be integers"
-        elif isinstance(ts.value.typ.typ, DictType):
-            if not isinstance(ts.slice, Slice):
-                ts.slice = self.visit(node.slice)
-                assert (
-                    ts.slice.typ == ts.value.typ.typ.key_typ
-                ), f"Dict subscript must have dict key type {ts.value.typ.typ.key_typ} but has type {ts.slice.typ}"
-                ts.typ = ts.value.typ.typ.value_typ
-            else:
-                raise TypeInferenceError(
-                    f"Could not infer type of subscript of dict with a slice."
-                )
-        else:
-            raise TypeInferenceError(
-                f"Could not infer type of subscript of typ {ts.value.typ.__class__}"
-            )
-        return ts
-
-    def visit_Call(self, node: Call) -> TypedCall:
-        tc = copy(node)
-        if node.keywords:
-            assert (
-                node.func.id in self.FUNCTION_ARGUMENT_REGISTRY
-            ), "Keyword arguments can only be used with user defined functions"
-            keywords = copy(node.keywords)
-            reg_args = self.FUNCTION_ARGUMENT_REGISTRY[node.func.id]
-            args = []
-            for i, a in enumerate(reg_args):
-                if len(node.args) > i:
-                    args.append(self.visit(node.args[i]))
-                else:
-                    candidates = [
-                        (idx, keyword)
-                        for idx, keyword in enumerate(keywords)
-                        if keyword.arg == a.orig_arg
-                    ]
-                    assert (
-                        len(candidates) == 1
-                    ), f"There should be one keyword or positional argument for the arg {a.orig_arg} but found {len(candidates)}"
-                    args.append(self.visit(candidates[0][1].value))
-                    keywords.pop(candidates[0][0])
-            assert (
-                len(keywords) == 0
-            ), f"Could not match the keywords {[keyword.arg for keyword in keywords]} to any argument"
-            tc.args = args
-            tc.keywords = []
-        else:
-            tc.args = [self.visit(a) for a in node.args]
-
-        # might be isinstance
-        if isinstance(tc.func, Name) and tc.func.orig_id == "isinstance":
-            target_class = tc.args[1].typ
-            if (
-                isinstance(tc.args[0].typ, InstanceType)
-                and isinstance(tc.args[0].typ.typ, AnyType)
-                and not self.allow_isinstance_anything
-            ):
-                raise AssertionError(
-                    "OpShin does not permit checking the instance of raw Anything/Datum objects as this only checks the equality of the constructor id and nothing more. "
-                    "If you are certain of what you are doing, please use the flag '--allow-isinstance-anything'."
-                )
-            ntc = Compare(
-                left=Attribute(tc.args[0], "CONSTR_ID"),
-                ops=[Eq()],
-                comparators=[Constant(target_class.record.constructor)],
-            )
-            custom_fix_missing_locations(ntc, node)
-            ntc = self.visit(ntc)
-            ntc.typ = BoolInstanceType
-            ntc.typechecks = TypeCheckVisitor(self.allow_isinstance_anything).visit(tc)
-            return ntc
-        try:
-            tc.func = self.visit(node.func)
-        except Exception as e:
-            # might be a method, duck test for class_name, method_name should
-            try:
-                func_variable_type = self.variable_type(tc.func.value.id)
-                class_name = func_variable_type.typ.record.name
-                method_name = f"{class_name}_{tc.func.attr}"
-                # If method_name found then use this.
-                self.variable_type(method_name)
-            except Exception:
-                # if this fails raise original error
-                raise e
-            tc.func = self.visit(ast.Name(id=method_name, ctx=ast.Load()))
-            tc.func.orig_id = node.func.attr
-            c_self = ast.Name(id=node.func.value.id, ctx=ast.Load())
-            tc.args.insert(0, self.visit(c_self))
-
-        # might be a class
-        if isinstance(tc.func.typ, ClassType):
-            tc.func.typ = tc.func.typ.constr_type()
-        # type might only turn out after the initialization (note the constr could be polymorphic)
-        if isinstance(tc.func.typ, InstanceType) and isinstance(
-            tc.func.typ.typ, PolymorphicFunctionType
-        ):
-            tc.func.typ = PolymorphicFunctionInstanceType(
-                tc.func.typ.typ.polymorphic_function.type_from_args(
-                    [a.typ for a in tc.args]
-                ),
-                tc.func.typ.typ.polymorphic_function,
-            )
-        if isinstance(tc.func.typ, InstanceType) and isinstance(
-            tc.func.typ.typ, FunctionType
-        ):
-            functyp = tc.func.typ.typ
-            assert len(tc.args) == len(
-                functyp.argtyps
-            ), f"Signature of function does not match number of arguments. Expected {len(functyp.argtyps)} arguments with these types: {functyp.argtyps} but got {len(tc.args)} arguments."
-            # all arguments need to be subtypes of the parameter type
-            for i, (a, ap) in enumerate(zip(tc.args, functyp.argtyps)):
-                assert (
-                    ap >= a.typ
-                ), f"Signature of function does not match arguments in argument {i}. Expected this type: {ap} but got {a.typ}."
-            tc.typ = functyp.rettyp
-            return tc
-        raise TypeInferenceError("Could not infer type of call")
-
-    def visit_Pass(self, node: Pass) -> TypedPass:
-        tp = copy(node)
-        return tp
-
-    def visit_Return(self, node: Return) -> TypedReturn:
-        tp = copy(node)
-        tp.value = self.visit(node.value)
-        tp.typ = tp.value.typ
-        return tp
-
-    def visit_Attribute(self, node: Attribute) -> TypedAttribute:
-        tp = copy(node)
-        tp.value = self.visit(node.value)
-        owner = tp.value.typ
-        # accesses to field
-        tp.typ = owner.attribute_type(node.attr)
-        return tp
-
-    def visit_Assert(self, node: Assert) -> TypedAssert:
-        ta = copy(node)
-        ta.test = self.visit(node.test)
-        assert (
-            ta.test.typ == BoolInstanceType
-        ), "Assertions must result in a boolean type"
-        if ta.msg is not None:
-            ta.msg = self.visit(node.msg)
-            assert (
-                ta.msg.typ == StringInstanceType
-            ), "Assertions must has a string message (or None)"
-        return ta
-
-    def visit_RawPlutoExpr(self, node: RawPlutoExpr) -> RawPlutoExpr:
-        assert node.typ is not None, "Raw Pluto Expression is missing type annotation"
-        return node
-
-    def visit_IfExp(self, node: IfExp) -> TypedIfExp:
-        node_cp = copy(node)
-        node_cp.test = self.visit(node.test)
-        assert node_cp.test.typ == BoolInstanceType, "Comparison must have type boolean"
-        typchecks, inv_typchecks = TypeCheckVisitor(
-            self.allow_isinstance_anything
-        ).visit(node_cp.test)
-        prevtyps = self.implement_typechecks(typchecks)
-        node_cp.body = self.visit(node.body)
-        self.implement_typechecks(prevtyps)
-        prevtyps = self.implement_typechecks(inv_typchecks)
-        node_cp.orelse = self.visit(node.orelse)
-        self.implement_typechecks(prevtyps)
-        if node_cp.body.typ >= node_cp.orelse.typ:
-            node_cp.typ = node_cp.body.typ
-        elif node_cp.orelse.typ >= node_cp.body.typ:
-            node_cp.typ = node_cp.orelse.typ
-        else:
-            try:
-                assert isinstance(node_cp.body.typ, InstanceType) and isinstance(
-                    node_cp.orelse.typ, InstanceType
-                )
-                node_cp.typ = InstanceType(
-                    union_types(node_cp.body.typ.typ, node_cp.orelse.typ.typ)
-                )
-            except AssertionError:
-                raise TypeInferenceError(
-                    "Branches of if-expression must return compatible types."
-                )
-        return node_cp
-
-    def visit_comprehension(self, g: comprehension) -> typedcomprehension:
-        new_g = copy(g)
-        if isinstance(g.target, Tuple):
-            raise NotImplementedError(
-                "Type deconstruction in for loops is not supported yet"
-            )
-        new_g.iter = self.visit(g.iter)
-        itertyp = new_g.iter.typ
-        assert isinstance(
-            itertyp, InstanceType
-        ), "Can only iterate over instances, not classes"
-        if isinstance(itertyp.typ, TupleType):
-            assert itertyp.typ.typs, "Iterating over an empty tuple is not allowed"
-            vartyp = itertyp.typ.typs[0]
-            assert all(
-                itertyp.typ.typs[0] == t for t in new_g.iter.typ.typs
-            ), "Iterating through a tuple requires the same type for each element"
-        elif isinstance(itertyp.typ, ListType):
-            vartyp = itertyp.typ.typ
-        else:
-            raise NotImplementedError(
-                "Type inference for loops over non-list objects is not supported"
-            )
-        self.set_variable_type(g.target.id, vartyp)
-        new_g.target = self.visit(g.target)
-        new_g.ifs = [self.visit(i) for i in g.ifs]
-        return new_g
-
-    def visit_ListComp(self, node: ListComp) -> TypedListComp:
-        typed_listcomp = copy(node)
-        # inside the comprehension is a seperate scope
-        self.enter_scope()
-        # first evaluate generators for assigned variables
-        typed_listcomp.generators = [self.visit(s) for s in node.generators]
-        # then evaluate elements
-        typed_listcomp.elt = self.visit(node.elt)
-        self.exit_scope()
-        typed_listcomp.typ = InstanceType(ListType(typed_listcomp.elt.typ))
-        return typed_listcomp
-
-    def visit_DictComp(self, node: DictComp) -> TypedDictComp:
-        typed_dictcomp = copy(node)
-        # inside the comprehension is a seperate scope
-        self.enter_scope()
-        # first evaluate generators for assigned variables
-        typed_dictcomp.generators = [self.visit(s) for s in node.generators]
-        # then evaluate elements
-        typed_dictcomp.key = self.visit(node.key)
-        typed_dictcomp.value = self.visit(node.value)
-        self.exit_scope()
-        typed_dictcomp.typ = InstanceType(
-            DictType(typed_dictcomp.key.typ, typed_dictcomp.value.typ)
-        )
-        return typed_dictcomp
-
-    def visit_FormattedValue(self, node: FormattedValue) -> TypedFormattedValue:
-        typed_node = copy(node)
-        typed_node.value = self.visit(node.value)
-        assert node.conversion in (
-            -1,
-            115,
-        ), "Only string formatting is allowed but got repr or ascii formatting."
-        assert (
-            node.format_spec is None
-        ), "No format specification is allowed but got formatting specifiers (i.e. decimals)."
-        typed_node.typ = StringInstanceType
-        return typed_node
-
-    def visit_JoinedStr(self, node: JoinedStr) -> TypedJoinedStr:
-        typed_node = copy(node)
-        typed_node.values = [self.visit(v) for v in node.values]
-        typed_node.typ = StringInstanceType
-        return typed_node
-
-    def visit_ImportFrom(self, node: ImportFrom) -> ImportFrom:
-        assert node.module == "opshin.bridge", "Trying to import from invalid location"
-        return node
-
-    def generic_visit(self, node: AST) -> TypedAST:
-        raise NotImplementedError(
-            f"Cannot infer type of non-implemented node {node.__class__}"
-        )
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def dunder_override(self, node: Union[ast.BinOp, ast.Compare, ast.UnaryOp]) -
-
-
-
-
-def enter_scope(self) -
-
-
-
-
-def exit_scope(self) -
-
-
-
-
-def generic_visit(self, node: ast.AST) ‑> TypedAST -
-
-

Called if no explicit visitor function exists for a node.

-
-
-def implement_typechecks(self, typchecks: Dict[str, Type]) -
-
-
-
-
-def set_variable_type(self, name: str, typ: Type, force=False) -
-
-
-
-
-def type_from_annotation(self, ann: ast.expr) -
-
-
-
-
-def variable_type(self, name: str) ‑> Type -
-
-
-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-def visit_AnnAssign(self, node: ast.AnnAssign) ‑> TypedAnnAssign -
-
-
-
-
-def visit_Assert(self, node: ast.Assert) ‑> TypedAssert -
-
-
-
-
-def visit_Assign(self, node: ast.Assign) ‑> TypedAssign -
-
-
-
-
-def visit_Attribute(self, node: ast.Attribute) ‑> TypedAttribute -
-
-
-
-
-def visit_BinOp(self, node: ast.BinOp) ‑> Union[TypedBinOpTypedCall] -
-
-
-
-
-def visit_BoolOp(self, node: ast.BoolOp) ‑> TypedBoolOp -
-
-
-
-
-def visit_Call(self, node: ast.Call) ‑> TypedCall -
-
-
-
-
-def visit_ClassDef(self, node: ast.ClassDef) ‑> TypedClassDef -
-
-
-
-
-def visit_Compare(self, node: ast.Compare) ‑> Union[TypedCompareTypedCall] -
-
-
-
-
-def visit_Constant(self, node: ast.Constant) ‑> TypedConstant -
-
-
-
-
-def visit_Dict(self, node: ast.Dict) ‑> TypedDict -
-
-
-
-
-def visit_DictComp(self, node: ast.DictComp) ‑> TypedDictComp -
-
-
-
-
-def visit_Expr(self, node: ast.Expr) ‑> TypedExpr -
-
-
-
-
-def visit_For(self, node: ast.For) ‑> TypedFor -
-
-
-
-
-def visit_FormattedValue(self, node: ast.FormattedValue) ‑> TypedFormattedValue -
-
-
-
-
-def visit_FunctionDef(self, node: ast.FunctionDef) ‑> TypedFunctionDef -
-
-
-
-
-def visit_If(self, node: ast.If) ‑> TypedIf -
-
-
-
-
-def visit_IfExp(self, node: ast.IfExp) ‑> TypedIfExp -
-
-
-
-
-def visit_ImportFrom(self, node: ast.ImportFrom) ‑> ast.ImportFrom -
-
-
-
-
-def visit_JoinedStr(self, node: ast.JoinedStr) ‑> TypedJoinedStr -
-
-
-
-
-def visit_List(self, node: ast.List) ‑> TypedList -
-
-
-
-
-def visit_ListComp(self, node: ast.ListComp) ‑> TypedListComp -
-
-
-
-
-def visit_Module(self, node: ast.Module) ‑> TypedModule -
-
-
-
-
-def visit_Name(self, node: ast.Name) ‑> TypedName -
-
-
-
-
-def visit_NoneType(self, node: None) ‑> TypedConstant -
-
-
-
-
-def visit_Pass(self, node: ast.Pass) ‑> TypedPass -
-
-
-
-
-def visit_RawPlutoExpr(self, node: RawPlutoExpr) ‑> RawPlutoExpr -
-
-
-
-
-def visit_Return(self, node: ast.Return) ‑> TypedReturn -
-
-
-
-
-def visit_Subscript(self, node: ast.Subscript) ‑> TypedSubscript -
-
-
-
-
-def visit_Tuple(self, node: ast.Tuple) ‑> TypedTuple -
-
-
-
-
-def visit_UnaryOp(self, node: ast.UnaryOp) ‑> TypedUnaryOp -
-
-
-
-
-def visit_While(self, node: ast.While) ‑> TypedWhile -
-
-
-
-
-def visit_arg(self, node: ast.arg) ‑> typedarg -
-
-
-
-
-def visit_arguments(self, node: ast.arguments) ‑> typedarguments -
-
-
-
-
-def visit_comprehension(self, g: ast.comprehension) ‑> typedcomprehension -
-
-
-
-
-def visit_keyword(self, node: ast.keyword) ‑> Typedkeyword -
-
-
-
-
-def visit_sequence(self, node_seq: List[ast.stmt]) ‑> pluthon.pluthon_ast.AST -
-
-
-
-
-
-
-class RecordReader -(type_inferencer: AggressiveTypeInferencer) -
-
-

A node visitor base class that walks the abstract syntax tree and calls a -visitor function for every node found. -This function may return a value -which is forwarded by the visit method.

-

This class is meant to be subclassed, with the subclass adding visitor -methods.

-

Per default the visitor functions for the nodes are 'visit_' + -class name of the node. -So a TryFinally node visit function would -be visit_TryFinally. -This behavior can be changed by overriding -the visit method. -If no visitor function exists for a node -(return value None) the generic_visit visitor is used instead.

-

Don't use the NodeVisitor if you want to apply changes to nodes during -traversing. -For this a special visitor exists (NodeTransformer) that -allows modifications.

-
- -Expand source code - -
class RecordReader(NodeVisitor):
-    name: str
-    orig_name: str
-    constructor: typing.Optional[int]
-    attributes: typing.List[typing.Tuple[str, Type]]
-    _type_inferencer: AggressiveTypeInferencer
-
-    def __init__(self, type_inferencer: AggressiveTypeInferencer):
-        self.constructor = None
-        self.attributes = []
-        self._type_inferencer = type_inferencer
-
-    @classmethod
-    def extract(cls, c: ClassDef, type_inferencer: AggressiveTypeInferencer) -> Record:
-        f = cls(type_inferencer)
-        f.visit(c)
-        if f.constructor is None:
-            det_string = RecordType(
-                Record(f.name, f.orig_name, 0, frozenlist(f.attributes))
-            ).id_map(skip_constructor=True)
-            det_hash = sha256(str(det_string).encode("utf8")).hexdigest()
-            f.constructor = int(det_hash, 16) % 2**32
-        return Record(f.name, f.orig_name, f.constructor, frozenlist(f.attributes))
-
-    def visit_AnnAssign(self, node: AnnAssign) -> None:
-        assert isinstance(
-            node.target, Name
-        ), "Record elements must have named attributes"
-        typ = self._type_inferencer.type_from_annotation(node.annotation)
-        if node.target.id != "CONSTR_ID":
-            assert (
-                node.value is None
-            ), f"PlutusData attribute {node.target.id} may not have a default value"
-            assert not isinstance(
-                typ, TupleType
-            ), "Records can currently not hold tuples"
-            self.attributes.append(
-                (
-                    node.target.id,
-                    InstanceType(typ),
-                )
-            )
-            return
-        assert typ == IntegerType, "CONSTR_ID must be assigned an integer"
-        assert isinstance(
-            node.value, Constant
-        ), "CONSTR_ID must be assigned a constant integer"
-        assert isinstance(
-            node.value.value, int
-        ), "CONSTR_ID must be assigned an integer"
-        self.constructor = node.value.value
-
-    def visit_ClassDef(self, node: ClassDef) -> None:
-        self.name = node.name
-        self.orig_name = node.orig_name
-        for s in node.body:
-            self.visit(s)
-
-    def visit_Pass(self, node: Pass) -> None:
-        pass
-
-    def visit_Assign(self, node: Assign) -> None:
-        assert len(node.targets) == 1, "Record elements must be assigned one by one"
-        target = node.targets[0]
-        assert isinstance(target, Name), "Record elements must have named attributes"
-        assert (
-            target.id == "CONSTR_ID"
-        ), "Type annotations may only be omitted for CONSTR_ID"
-        assert isinstance(
-            node.value, Constant
-        ), "CONSTR_ID must be assigned a constant integer"
-        assert isinstance(
-            node.value.value, int
-        ), "CONSTR_ID must be assigned an integer"
-        self.constructor = node.value.value
-
-    def visit_Expr(self, node: Expr) -> None:
-        assert isinstance(
-            node.value, Constant
-        ), "Only comments are allowed inside classes"
-        return None
-
-    def generic_visit(self, node: AST) -> None:
-        raise NotImplementedError(f"Can not compile {ast.dump(node)} inside of a class")
-
-

Ancestors

-
    -
  • ast.NodeVisitor
  • -
-

Class variables

-
-
var attributes : List[Tuple[str, Type]]
-
-
-
-
var constructor : Optional[int]
-
-
-
-
var name : str
-
-
-
-
var orig_name : str
-
-
-
-
-

Static methods

-
-
-def extract(c: ast.ClassDef, type_inferencer: AggressiveTypeInferencer) ‑> Record -
-
-
-
-
-

Methods

-
-
-def generic_visit(self, node: ast.AST) ‑> None -
-
-

Called if no explicit visitor function exists for a node.

-
-
-def visit_AnnAssign(self, node: ast.AnnAssign) ‑> None -
-
-
-
-
-def visit_Assign(self, node: ast.Assign) ‑> None -
-
-
-
-
-def visit_ClassDef(self, node: ast.ClassDef) ‑> None -
-
-
-
-
-def visit_Expr(self, node: ast.Expr) ‑> None -
-
-
-
-
-def visit_Pass(self, node: ast.Pass) ‑> None -
-
-
-
-
-
-
-class ReturnExtractor -(func_rettyp: Type) -
-
-

Utility to check that all paths end in Return statements with the proper type

-

Returns whether there is no remaining path

-
- -Expand source code - -
class ReturnExtractor(TypedNodeVisitor):
-    """
-    Utility to check that all paths end in Return statements with the proper type
-
-    Returns whether there is no remaining path
-    """
-
-    def __init__(self, func_rettyp: Type):
-        self.func_rettyp = func_rettyp
-
-    def visit_sequence(self, nodes: typing.List[TypedAST]) -> bool:
-        all_paths_covered = False
-        for node in nodes:
-            all_paths_covered = self.visit(node)
-            if all_paths_covered:
-                break
-        return all_paths_covered
-
-    def visit_If(self, node: If) -> bool:
-        return self.visit_sequence(node.body) and self.visit_sequence(node.orelse)
-
-    def visit_For(self, node: For) -> bool:
-        # The body simply has to be checked but has no influence on whether all paths are covered
-        # because it might never be visited
-        self.visit_sequence(node.body)
-        # the else path is always visited
-        return self.visit_sequence(node.orelse)
-
-    def visit_While(self, node: For) -> bool:
-        # The body simply has to be checked but has no influence on whether all paths are covered
-        # because it might never be visited
-        self.visit_sequence(node.body)
-        # the else path is always visited
-        return self.visit_sequence(node.orelse)
-
-    def visit_Return(self, node: Return) -> bool:
-        assert (
-            self.func_rettyp >= node.typ
-        ), f"Function annotated return type does not match actual return type"
-        return True
-
-    def check_fulfills(self, node: FunctionDef):
-        all_paths_covered = self.visit_sequence(node.body)
-        if not all_paths_covered:
-            assert (
-                self.func_rettyp >= NoneInstanceType
-            ), f"Function '{node.name}' has no return statement but is supposed to return not-None value"
-
-

Ancestors

- -

Methods

-
-
-def check_fulfills(self, node: ast.FunctionDef) -
-
-
-
-
-def visit(self, node) -
-
-

-Inherited from: -TypedNodeVisitor.visit -

-

Visit a node.

-
-
-def visit_For(self, node: ast.For) ‑> bool -
-
-
-
-
-def visit_If(self, node: ast.If) ‑> bool -
-
-
-
-
-def visit_Return(self, node: ast.Return) ‑> bool -
-
-
-
-
-def visit_While(self, node: ast.For) ‑> bool -
-
-
-
-
-def visit_sequence(self, nodes: List[TypedAST]) ‑> bool -
-
-
-
-
-
-
-class TypeCheckVisitor -(allow_isinstance_anything=False) -
-
-

Generates the types to which objects are cast due to a boolean expression -It returns a tuple of dictionaries which are a name -> type mapping -for variable names that are assured to have a specific type if this expression -is True/False respectively

-
- -Expand source code - -
class TypeCheckVisitor(TypedNodeVisitor):
-    """
-    Generates the types to which objects are cast due to a boolean expression
-    It returns a tuple of dictionaries which are a name -> type mapping
-    for variable names that are assured to have a specific type if this expression
-    is True/False respectively
-    """
-
-    def __init__(self, allow_isinstance_anything=False):
-        self.allow_isinstance_anything = allow_isinstance_anything
-
-    def generic_visit(self, node: AST) -> TypeMapPair:
-        return getattr(node, "typechecks", ({}, {}))
-
-    def visit_Call(self, node: Call) -> TypeMapPair:
-        if isinstance(node.func, Name) and node.func.orig_id == SPECIAL_BOOL:
-            return self.visit(node.args[0])
-        if not (isinstance(node.func, Name) and node.func.orig_id == "isinstance"):
-            return ({}, {})
-        # special case for Union
-        if not isinstance(node.args[0], Name):
-            OPSHIN_LOGGER.warning(
-                "Target 0 of an isinstance cast must be a variable name for type casting to work. You can still proceed, but the inferred type of the isinstance cast will not be accurate."
-            )
-            return ({}, {})
-        assert isinstance(
-            node.args[1], Name
-        ), "Target 1 of an isinstance cast must be a class name"
-        target_class: RecordType = node.args[1].typ
-        inst = node.args[0]
-        inst_class = inst.typ
-        assert isinstance(
-            inst_class, InstanceType
-        ), "Can only cast instances, not classes"
-        assert isinstance(target_class, RecordType), "Can only cast to PlutusData"
-        if isinstance(inst_class.typ, UnionType):
-            assert (
-                target_class in inst_class.typ.typs
-            ), f"Trying to cast an instance of Union type to non-instance of union type"
-            union_without_target_class = union_types(
-                *(x for x in inst_class.typ.typs if x != target_class)
-            )
-        elif isinstance(inst_class.typ, AnyType) and self.allow_isinstance_anything:
-            union_without_target_class = AnyType()
-        else:
-            assert (
-                inst_class.typ == target_class
-            ), "Can only cast instances of Union types of PlutusData or cast the same class. If you know what you are doing, enable the flag '--allow-isinstance-anything'"
-            union_without_target_class = target_class
-        varname = node.args[0].id
-        return ({varname: target_class}, {varname: union_without_target_class})
-
-    def visit_BoolOp(self, node: BoolOp) -> PairType:
-        res = {}
-        inv_res = {}
-        checks = [self.visit(v) for v in node.values]
-        checked_types = defaultdict(list)
-        inv_checked_types = defaultdict(list)
-        for c, inv_c in checks:
-            for v, t in c.items():
-                checked_types[v].append(t)
-            for v, t in inv_c.items():
-                inv_checked_types[v].append(t)
-        if isinstance(node.op, And):
-            # a conjunction is just the intersection
-            for v, ts in checked_types.items():
-                res[v] = intersection_types(*ts)
-            # if the conjunction fails, its any of the respective reverses, but only if the type is checked in every conjunction
-            for v, ts in inv_checked_types.items():
-                if len(ts) < len(checks):
-                    continue
-                inv_res[v] = union_types(*ts)
-        if isinstance(node.op, Or):
-            # a disjunction is just the union, but some type must be checked in every disjunction
-            for v, ts in checked_types.items():
-                if len(ts) < len(checks):
-                    continue
-                res[v] = union_types(*ts)
-            # if the disjunction fails, then it must be in the intersection of the inverses
-            for v, ts in inv_checked_types.items():
-                inv_res[v] = intersection_types(*ts)
-        return (res, inv_res)
-
-    def visit_UnaryOp(self, node: UnaryOp) -> PairType:
-        (res, inv_res) = self.visit(node.operand)
-        if isinstance(node.op, Not):
-            return (inv_res, res)
-        return (res, inv_res)
-
-

Ancestors

- -

Methods

-
-
-def generic_visit(self, node: ast.AST) ‑> Tuple[Dict[str, Type], Dict[str, Type]] -
-
-

Called if no explicit visitor function exists for a node.

-
-
-def visit(self, node) -
-
-

-Inherited from: -TypedNodeVisitor.visit -

-

Visit a node.

-
-
-def visit_BoolOp(self, node: ast.BoolOp) ‑> PairType -
-
-
-
-
-def visit_Call(self, node: ast.Call) ‑> Tuple[Dict[str, Type], Dict[str, Type]] -
-
-
-
-
-def visit_UnaryOp(self, node: ast.UnaryOp) ‑> PairType -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/typed_ast.html b/docs/opshin/typed_ast.html deleted file mode 100644 index 851074e8..00000000 --- a/docs/opshin/typed_ast.html +++ /dev/null @@ -1,2279 +0,0 @@ - - - - - - - - -opshin.typed_ast API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.typed_ast

-
-
-
- -Expand source code - -
from .type_impls import *
-
-
-class TypedAST(AST):
-    typ: Type
-
-
-class typedexpr(TypedAST, expr):
-    def typechecks(self) -> typing.Dict[str, Type]:
-        """Successful typechecks if this expression evaluates to True"""
-        return {}
-
-
-class typedstmt(TypedAST, stmt):
-    # Statements always have type None
-    typ = NoneInstanceType
-
-
-class typedarg(TypedAST, arg):
-    pass
-
-
-class typedarguments(TypedAST, arguments):
-    args: typing.List[typedarg]
-    vararg: typing.Union[typedarg, None]
-    kwonlyargs: typing.List[typedarg]
-    kw_defaults: typing.List[typing.Union[typedexpr, None]]
-    kwarg: typing.Union[typedarg, None]
-    defaults: typing.List[typedexpr]
-
-
-class TypedModule(typedstmt, Module):
-    body: typing.List[typedstmt]
-
-
-class TypedFunctionDef(typedstmt, FunctionDef):
-    body: typing.List[typedstmt]
-    args: typedarguments
-
-
-class TypedIf(typedstmt, If):
-    test: typedexpr
-    body: typing.List[typedstmt]
-    orelse: typing.List[typedstmt]
-
-
-class TypedReturn(typedstmt, Return):
-    value: typedexpr
-
-
-class TypedExpression(typedstmt, Expression):
-    body: typedexpr
-
-
-class TypedCall(typedexpr, Call):
-    func: typedexpr
-    args: typing.List[typedexpr]
-
-
-class TypedExpr(typedstmt, Expr):
-    value: typedexpr
-
-
-class TypedAssign(typedstmt, Assign):
-    targets: typing.List[typedexpr]
-    value: typedexpr
-
-
-class TypedClassDef(typedstmt, ClassDef):
-    class_typ: Type
-
-
-class TypedAnnAssign(typedstmt, AnnAssign):
-    target: typedexpr
-    annotation: Type
-    value: typedexpr
-
-
-class TypedWhile(typedstmt, While):
-    test: typedexpr
-    body: typing.List[typedstmt]
-    orelse: typing.List[typedstmt]
-
-
-class TypedFor(typedstmt, For):
-    target: typedexpr
-    iter: typedexpr
-    body: typing.List[typedstmt]
-    orelse: typing.List[typedstmt]
-
-
-class TypedPass(typedstmt, Pass):
-    pass
-
-
-class TypedName(typedexpr, Name):
-    pass
-
-
-class Typedkeyword(TypedAST, keyword):
-    arg: typedexpr
-    value: typedexpr
-
-
-class TypedConstant(TypedAST, Constant):
-    pass
-
-
-class TypedTuple(typedexpr, Tuple):
-    pass
-
-
-class TypedList(typedexpr, List):
-    pass
-
-
-class typedcomprehension(typedexpr, comprehension):
-    target: typedexpr
-    iter: typedexpr
-    ifs: typing.List[typedexpr]
-
-
-class TypedListComp(typedexpr, ListComp):
-    elt: typedexpr
-    generators: typing.List[typedcomprehension]
-
-
-class TypedDictComp(typedexpr, DictComp):
-    key: typedexpr
-    value: typedexpr
-    generators: typing.List[typedcomprehension]
-
-
-class TypedFormattedValue(typedexpr, FormattedValue):
-    value: typedexpr
-    conversion: int
-    format_spec: typing.Optional[JoinedStr]
-
-
-class TypedJoinedStr(typedexpr, JoinedStr):
-    values: typing.List[typedexpr]
-
-
-class TypedDict(typedexpr, Dict):
-    pass
-
-
-class TypedIfExp(typedstmt, IfExp):
-    test: typedexpr
-    body: typedexpr
-    orelse: typedexpr
-
-
-class TypedCompare(typedexpr, Compare):
-    left: typedexpr
-    ops: typing.List[cmpop]
-    comparators: typing.List[typedexpr]
-
-
-class TypedBinOp(typedexpr, BinOp):
-    left: typedexpr
-    right: typedexpr
-
-
-class TypedBoolOp(typedexpr, BoolOp):
-    values: typing.List[typedexpr]
-
-
-class TypedUnaryOp(typedexpr, UnaryOp):
-    operand: typedexpr
-
-
-class TypedSubscript(typedexpr, Subscript):
-    value: typedexpr
-
-
-class TypedAttribute(typedexpr, Attribute):
-    value: typedexpr
-    pos: int
-
-
-class TypedAssert(typedstmt, Assert):
-    test: typedexpr
-    msg: typedexpr
-
-
-class RawPlutoExpr(typedexpr):
-    typ: Type
-    expr: plt.AST
-
-    _attributes = ["lineno", "col_offset", "end_lineno", "end_col_offset"]
-    _fields = []
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class RawPlutoExpr -(*args, **kwargs) -
-
-

expr = BoolOp(boolop op, expr values) -| NamedExpr(expr target, expr value) -| BinOp(expr left, operator op, expr right) -| UnaryOp(unaryop op, expr operand) -| Lambda(arguments args, expr body) -| IfExp(expr test, expr body, expr orelse) -| Dict(expr keys, expr values) -| Set(expr elts) -| ListComp(expr elt, comprehension generators) -| SetComp(expr elt, comprehension generators) -| DictComp(expr key, expr value, comprehension generators) -| GeneratorExp(expr elt, comprehension generators) -| Await(expr value) -| Yield(expr? value) -| YieldFrom(expr value) -| Compare(expr left, cmpop ops, expr comparators) -| Call(expr func, expr args, keyword keywords) -| FormattedValue(expr value, int conversion, expr? format_spec) -| JoinedStr(expr values) -| Constant(constant value, string? kind) -| Attribute(expr value, identifier attr, expr_context ctx) -| Subscript(expr value, expr slice, expr_context ctx) -| Starred(expr value, expr_context ctx) -| Name(identifier id, expr_context ctx) -| List(expr elts, expr_context ctx) -| Tuple(expr* elts, expr_context ctx) -| Slice(expr? lower, expr? upper, expr? step)

-
- -Expand source code - -
class RawPlutoExpr(typedexpr):
-    typ: Type
-    expr: plt.AST
-
-    _attributes = ["lineno", "col_offset", "end_lineno", "end_col_offset"]
-    _fields = []
-
-

Ancestors

- -

Class variables

-
-
var expr : pluthon.pluthon_ast.AST
-
-
-
-
var typType
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedAST -(*args, **kwargs) -
-
-
-
- -Expand source code - -
class TypedAST(AST):
-    typ: Type
-
-

Ancestors

-
    -
  • ast.AST
  • -
-

Subclasses

- -

Class variables

-
-
var typType
-
-
-
-
-
-
-class TypedAnnAssign -(*args, **kwargs) -
-
-

AnnAssign(expr target, expr annotation, expr? value, int simple)

-
- -Expand source code - -
class TypedAnnAssign(typedstmt, AnnAssign):
-    target: typedexpr
-    annotation: Type
-    value: typedexpr
-
-

Ancestors

- -

Class variables

-
-
var annotationType
-
-
-
-
var targettypedexpr
-
-
-
-
var valuetypedexpr
-
-
-
-
-
-
-class TypedAssert -(*args, **kwargs) -
-
-

Assert(expr test, expr? msg)

-
- -Expand source code - -
class TypedAssert(typedstmt, Assert):
-    test: typedexpr
-    msg: typedexpr
-
-

Ancestors

- -

Class variables

-
-
var msgtypedexpr
-
-
-
-
var testtypedexpr
-
-
-
-
-
-
-class TypedAssign -(*args, **kwargs) -
-
-

Assign(expr* targets, expr value, string? type_comment)

-
- -Expand source code - -
class TypedAssign(typedstmt, Assign):
-    targets: typing.List[typedexpr]
-    value: typedexpr
-
-

Ancestors

- -

Class variables

-
-
var targets : List[typedexpr]
-
-
-
-
var valuetypedexpr
-
-
-
-
-
-
-class TypedAttribute -(*args, **kwargs) -
-
-

Attribute(expr value, identifier attr, expr_context ctx)

-
- -Expand source code - -
class TypedAttribute(typedexpr, Attribute):
-    value: typedexpr
-    pos: int
-
-

Ancestors

- -

Class variables

-
-
var pos : int
-
-
-
-
var valuetypedexpr
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedBinOp -(*args, **kwargs) -
-
-

BinOp(expr left, operator op, expr right)

-
- -Expand source code - -
class TypedBinOp(typedexpr, BinOp):
-    left: typedexpr
-    right: typedexpr
-
-

Ancestors

- -

Class variables

-
-
var lefttypedexpr
-
-
-
-
var righttypedexpr
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedBoolOp -(*args, **kwargs) -
-
-

BoolOp(boolop op, expr* values)

-
- -Expand source code - -
class TypedBoolOp(typedexpr, BoolOp):
-    values: typing.List[typedexpr]
-
-

Ancestors

- -

Class variables

-
-
var values : List[typedexpr]
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedCall -(*args, **kwargs) -
-
-

Call(expr func, expr args, keyword keywords)

-
- -Expand source code - -
class TypedCall(typedexpr, Call):
-    func: typedexpr
-    args: typing.List[typedexpr]
-
-

Ancestors

- -

Class variables

-
-
var args : List[typedexpr]
-
-
-
-
var functypedexpr
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedClassDef -(*args, **kwargs) -
-
-

ClassDef(identifier name, expr bases, keyword keywords, stmt body, expr decorator_list)

-
- -Expand source code - -
class TypedClassDef(typedstmt, ClassDef):
-    class_typ: Type
-
-

Ancestors

- -

Class variables

-
-
var class_typType
-
-
-
-
-
-
-class TypedCompare -(*args, **kwargs) -
-
-

Compare(expr left, cmpop ops, expr comparators)

-
- -Expand source code - -
class TypedCompare(typedexpr, Compare):
-    left: typedexpr
-    ops: typing.List[cmpop]
-    comparators: typing.List[typedexpr]
-
-

Ancestors

- -

Class variables

-
-
var comparators : List[typedexpr]
-
-
-
-
var lefttypedexpr
-
-
-
-
var ops : List[ast.cmpop]
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedConstant -(*args, **kwargs) -
-
-

Constant(constant value, string? kind)

-
- -Expand source code - -
class TypedConstant(TypedAST, Constant):
-    pass
-
-

Ancestors

-
    -
  • TypedAST
  • -
  • ast.Constant
  • -
  • ast.expr
  • -
  • ast.AST
  • -
-
-
-class TypedDict -(*args, **kwargs) -
-
-

Dict(expr keys, expr values)

-
- -Expand source code - -
class TypedDict(typedexpr, Dict):
-    pass
-
-

Ancestors

- -

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedDictComp -(*args, **kwargs) -
-
-

DictComp(expr key, expr value, comprehension* generators)

-
- -Expand source code - -
class TypedDictComp(typedexpr, DictComp):
-    key: typedexpr
-    value: typedexpr
-    generators: typing.List[typedcomprehension]
-
-

Ancestors

- -

Class variables

-
-
var generators : List[typedcomprehension]
-
-
-
-
var keytypedexpr
-
-
-
-
var valuetypedexpr
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedExpr -(*args, **kwargs) -
-
-

Expr(expr value)

-
- -Expand source code - -
class TypedExpr(typedstmt, Expr):
-    value: typedexpr
-
-

Ancestors

- -

Class variables

-
-
var valuetypedexpr
-
-
-
-
-
-
-class TypedExpression -(*args, **kwargs) -
-
-

stmt = FunctionDef(identifier name, arguments args, stmt body, expr decorator_list, expr? returns, string? type_comment) -| AsyncFunctionDef(identifier name, arguments args, stmt body, expr decorator_list, expr? returns, string? type_comment) -| ClassDef(identifier name, expr bases, keyword keywords, stmt body, expr decorator_list) -| Return(expr? value) -| Delete(expr targets) -| Assign(expr targets, expr value, string? type_comment) -| AugAssign(expr target, operator op, expr value) -| AnnAssign(expr target, expr annotation, expr? value, int simple) -| For(expr target, expr iter, stmt body, stmt orelse, string? type_comment) -| AsyncFor(expr target, expr iter, stmt body, stmt orelse, string? type_comment) -| While(expr test, stmt body, stmt orelse) -| If(expr test, stmt body, stmt orelse) -| With(withitem items, stmt body, string? type_comment) -| AsyncWith(withitem items, stmt body, string? type_comment) -| Match(expr subject, match_case cases) -| Raise(expr? exc, expr? cause) -| Try(stmt body, excepthandler handlers, stmt orelse, stmt finalbody) -| TryStar(stmt body, excepthandler handlers, stmt orelse, stmt finalbody) -| Assert(expr test, expr? msg) -| Import(alias names) -| ImportFrom(identifier? module, alias names, int? level) -| Global(identifier names) -| Nonlocal(identifier* names) -| Expr(expr value) -| Pass -| Break -| Continue

-
- -Expand source code - -
class TypedExpression(typedstmt, Expression):
-    body: typedexpr
-
-

Ancestors

- -

Class variables

-
-
var bodytypedexpr
-
-
-
-
-
-
-class TypedFor -(*args, **kwargs) -
-
-

For(expr target, expr iter, stmt body, stmt orelse, string? type_comment)

-
- -Expand source code - -
class TypedFor(typedstmt, For):
-    target: typedexpr
-    iter: typedexpr
-    body: typing.List[typedstmt]
-    orelse: typing.List[typedstmt]
-
-

Ancestors

- -

Class variables

-
-
var body : List[typedstmt]
-
-
-
-
var itertypedexpr
-
-
-
-
var orelse : List[typedstmt]
-
-
-
-
var targettypedexpr
-
-
-
-
-
-
-class TypedFormattedValue -(*args, **kwargs) -
-
-

FormattedValue(expr value, int conversion, expr? format_spec)

-
- -Expand source code - -
class TypedFormattedValue(typedexpr, FormattedValue):
-    value: typedexpr
-    conversion: int
-    format_spec: typing.Optional[JoinedStr]
-
-

Ancestors

- -

Class variables

-
-
var conversion : int
-
-
-
-
var format_spec : Optional[ast.JoinedStr]
-
-
-
-
var valuetypedexpr
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedFunctionDef -(*args, **kwargs) -
-
-

FunctionDef(identifier name, arguments args, stmt body, expr decorator_list, expr? returns, string? type_comment)

-
- -Expand source code - -
class TypedFunctionDef(typedstmt, FunctionDef):
-    body: typing.List[typedstmt]
-    args: typedarguments
-
-

Ancestors

- -

Class variables

-
-
var argstypedarguments
-
-
-
-
var body : List[typedstmt]
-
-
-
-
-
-
-class TypedIf -(*args, **kwargs) -
-
-

If(expr test, stmt body, stmt orelse)

-
- -Expand source code - -
class TypedIf(typedstmt, If):
-    test: typedexpr
-    body: typing.List[typedstmt]
-    orelse: typing.List[typedstmt]
-
-

Ancestors

- -

Class variables

-
-
var body : List[typedstmt]
-
-
-
-
var orelse : List[typedstmt]
-
-
-
-
var testtypedexpr
-
-
-
-
-
-
-class TypedIfExp -(*args, **kwargs) -
-
-

stmt = FunctionDef(identifier name, arguments args, stmt body, expr decorator_list, expr? returns, string? type_comment) -| AsyncFunctionDef(identifier name, arguments args, stmt body, expr decorator_list, expr? returns, string? type_comment) -| ClassDef(identifier name, expr bases, keyword keywords, stmt body, expr decorator_list) -| Return(expr? value) -| Delete(expr targets) -| Assign(expr targets, expr value, string? type_comment) -| AugAssign(expr target, operator op, expr value) -| AnnAssign(expr target, expr annotation, expr? value, int simple) -| For(expr target, expr iter, stmt body, stmt orelse, string? type_comment) -| AsyncFor(expr target, expr iter, stmt body, stmt orelse, string? type_comment) -| While(expr test, stmt body, stmt orelse) -| If(expr test, stmt body, stmt orelse) -| With(withitem items, stmt body, string? type_comment) -| AsyncWith(withitem items, stmt body, string? type_comment) -| Match(expr subject, match_case cases) -| Raise(expr? exc, expr? cause) -| Try(stmt body, excepthandler handlers, stmt orelse, stmt finalbody) -| TryStar(stmt body, excepthandler handlers, stmt orelse, stmt finalbody) -| Assert(expr test, expr? msg) -| Import(alias names) -| ImportFrom(identifier? module, alias names, int? level) -| Global(identifier names) -| Nonlocal(identifier* names) -| Expr(expr value) -| Pass -| Break -| Continue

-
- -Expand source code - -
class TypedIfExp(typedstmt, IfExp):
-    test: typedexpr
-    body: typedexpr
-    orelse: typedexpr
-
-

Ancestors

- -

Class variables

-
-
var bodytypedexpr
-
-
-
-
var orelsetypedexpr
-
-
-
-
var testtypedexpr
-
-
-
-
-
-
-class TypedJoinedStr -(*args, **kwargs) -
-
-

JoinedStr(expr* values)

-
- -Expand source code - -
class TypedJoinedStr(typedexpr, JoinedStr):
-    values: typing.List[typedexpr]
-
-

Ancestors

- -

Class variables

-
-
var values : List[typedexpr]
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedList -(*args, **kwargs) -
-
-

List(expr* elts, expr_context ctx)

-
- -Expand source code - -
class TypedList(typedexpr, List):
-    pass
-
-

Ancestors

- -

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedListComp -(*args, **kwargs) -
-
-

ListComp(expr elt, comprehension* generators)

-
- -Expand source code - -
class TypedListComp(typedexpr, ListComp):
-    elt: typedexpr
-    generators: typing.List[typedcomprehension]
-
-

Ancestors

- -

Class variables

-
-
var elttypedexpr
-
-
-
-
var generators : List[typedcomprehension]
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedModule -(*args, **kwargs) -
-
-

stmt = FunctionDef(identifier name, arguments args, stmt body, expr decorator_list, expr? returns, string? type_comment) -| AsyncFunctionDef(identifier name, arguments args, stmt body, expr decorator_list, expr? returns, string? type_comment) -| ClassDef(identifier name, expr bases, keyword keywords, stmt body, expr decorator_list) -| Return(expr? value) -| Delete(expr targets) -| Assign(expr targets, expr value, string? type_comment) -| AugAssign(expr target, operator op, expr value) -| AnnAssign(expr target, expr annotation, expr? value, int simple) -| For(expr target, expr iter, stmt body, stmt orelse, string? type_comment) -| AsyncFor(expr target, expr iter, stmt body, stmt orelse, string? type_comment) -| While(expr test, stmt body, stmt orelse) -| If(expr test, stmt body, stmt orelse) -| With(withitem items, stmt body, string? type_comment) -| AsyncWith(withitem items, stmt body, string? type_comment) -| Match(expr subject, match_case cases) -| Raise(expr? exc, expr? cause) -| Try(stmt body, excepthandler handlers, stmt orelse, stmt finalbody) -| TryStar(stmt body, excepthandler handlers, stmt orelse, stmt finalbody) -| Assert(expr test, expr? msg) -| Import(alias names) -| ImportFrom(identifier? module, alias names, int? level) -| Global(identifier names) -| Nonlocal(identifier* names) -| Expr(expr value) -| Pass -| Break -| Continue

-
- -Expand source code - -
class TypedModule(typedstmt, Module):
-    body: typing.List[typedstmt]
-
-

Ancestors

- -

Class variables

-
-
var body : List[typedstmt]
-
-
-
-
-
-
-class TypedName -(*args, **kwargs) -
-
-

Name(identifier id, expr_context ctx)

-
- -Expand source code - -
class TypedName(typedexpr, Name):
-    pass
-
-

Ancestors

- -

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedPass -(*args, **kwargs) -
-
-

Pass

-
- -Expand source code - -
class TypedPass(typedstmt, Pass):
-    pass
-
-

Ancestors

- -
-
-class TypedReturn -(*args, **kwargs) -
-
-

Return(expr? value)

-
- -Expand source code - -
class TypedReturn(typedstmt, Return):
-    value: typedexpr
-
-

Ancestors

- -

Class variables

-
-
var valuetypedexpr
-
-
-
-
-
-
-class TypedSubscript -(*args, **kwargs) -
-
-

Subscript(expr value, expr slice, expr_context ctx)

-
- -Expand source code - -
class TypedSubscript(typedexpr, Subscript):
-    value: typedexpr
-
-

Ancestors

- -

Class variables

-
-
var valuetypedexpr
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedTuple -(*args, **kwargs) -
-
-

Tuple(expr* elts, expr_context ctx)

-
- -Expand source code - -
class TypedTuple(typedexpr, Tuple):
-    pass
-
-

Ancestors

- -

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedUnaryOp -(*args, **kwargs) -
-
-

UnaryOp(unaryop op, expr operand)

-
- -Expand source code - -
class TypedUnaryOp(typedexpr, UnaryOp):
-    operand: typedexpr
-
-

Ancestors

- -

Class variables

-
-
var operandtypedexpr
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class TypedWhile -(*args, **kwargs) -
-
-

While(expr test, stmt body, stmt orelse)

-
- -Expand source code - -
class TypedWhile(typedstmt, While):
-    test: typedexpr
-    body: typing.List[typedstmt]
-    orelse: typing.List[typedstmt]
-
-

Ancestors

- -

Class variables

-
-
var body : List[typedstmt]
-
-
-
-
var orelse : List[typedstmt]
-
-
-
-
var testtypedexpr
-
-
-
-
-
-
-class Typedkeyword -(*args, **kwargs) -
-
-

keyword(identifier? arg, expr value)

-
- -Expand source code - -
class Typedkeyword(TypedAST, keyword):
-    arg: typedexpr
-    value: typedexpr
-
-

Ancestors

- -

Class variables

-
-
var argtypedexpr
-
-
-
-
var valuetypedexpr
-
-
-
-
-
-
-class typedarg -(*args, **kwargs) -
-
-

arg(identifier arg, expr? annotation, string? type_comment)

-
- -Expand source code - -
class typedarg(TypedAST, arg):
-    pass
-
-

Ancestors

- -
-
-class typedarguments -(*args, **kwargs) -
-
-

arguments(arg posonlyargs, arg args, arg? vararg, arg kwonlyargs, expr kw_defaults, arg? kwarg, expr* defaults)

-
- -Expand source code - -
class typedarguments(TypedAST, arguments):
-    args: typing.List[typedarg]
-    vararg: typing.Union[typedarg, None]
-    kwonlyargs: typing.List[typedarg]
-    kw_defaults: typing.List[typing.Union[typedexpr, None]]
-    kwarg: typing.Union[typedarg, None]
-    defaults: typing.List[typedexpr]
-
-

Ancestors

- -

Class variables

-
-
var args : List[typedarg]
-
-
-
-
var defaults : List[typedexpr]
-
-
-
-
var kw_defaults : List[Optional[typedexpr]]
-
-
-
-
var kwarg : Optional[typedarg]
-
-
-
-
var kwonlyargs : List[typedarg]
-
-
-
-
var vararg : Optional[typedarg]
-
-
-
-
-
-
-class typedcomprehension -(*args, **kwargs) -
-
-

expr = BoolOp(boolop op, expr values) -| NamedExpr(expr target, expr value) -| BinOp(expr left, operator op, expr right) -| UnaryOp(unaryop op, expr operand) -| Lambda(arguments args, expr body) -| IfExp(expr test, expr body, expr orelse) -| Dict(expr keys, expr values) -| Set(expr elts) -| ListComp(expr elt, comprehension generators) -| SetComp(expr elt, comprehension generators) -| DictComp(expr key, expr value, comprehension generators) -| GeneratorExp(expr elt, comprehension generators) -| Await(expr value) -| Yield(expr? value) -| YieldFrom(expr value) -| Compare(expr left, cmpop ops, expr comparators) -| Call(expr func, expr args, keyword keywords) -| FormattedValue(expr value, int conversion, expr? format_spec) -| JoinedStr(expr values) -| Constant(constant value, string? kind) -| Attribute(expr value, identifier attr, expr_context ctx) -| Subscript(expr value, expr slice, expr_context ctx) -| Starred(expr value, expr_context ctx) -| Name(identifier id, expr_context ctx) -| List(expr elts, expr_context ctx) -| Tuple(expr* elts, expr_context ctx) -| Slice(expr? lower, expr? upper, expr? step)

-
- -Expand source code - -
class typedcomprehension(typedexpr, comprehension):
-    target: typedexpr
-    iter: typedexpr
-    ifs: typing.List[typedexpr]
-
-

Ancestors

- -

Class variables

-
-
var ifs : List[typedexpr]
-
-
-
-
var itertypedexpr
-
-
-
-
var targettypedexpr
-
-
-
-
-

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

-Inherited from: -typedexpr.typechecks -

-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class typedexpr -(*args, **kwargs) -
-
-

expr = BoolOp(boolop op, expr values) -| NamedExpr(expr target, expr value) -| BinOp(expr left, operator op, expr right) -| UnaryOp(unaryop op, expr operand) -| Lambda(arguments args, expr body) -| IfExp(expr test, expr body, expr orelse) -| Dict(expr keys, expr values) -| Set(expr elts) -| ListComp(expr elt, comprehension generators) -| SetComp(expr elt, comprehension generators) -| DictComp(expr key, expr value, comprehension generators) -| GeneratorExp(expr elt, comprehension generators) -| Await(expr value) -| Yield(expr? value) -| YieldFrom(expr value) -| Compare(expr left, cmpop ops, expr comparators) -| Call(expr func, expr args, keyword keywords) -| FormattedValue(expr value, int conversion, expr? format_spec) -| JoinedStr(expr values) -| Constant(constant value, string? kind) -| Attribute(expr value, identifier attr, expr_context ctx) -| Subscript(expr value, expr slice, expr_context ctx) -| Starred(expr value, expr_context ctx) -| Name(identifier id, expr_context ctx) -| List(expr elts, expr_context ctx) -| Tuple(expr* elts, expr_context ctx) -| Slice(expr? lower, expr? upper, expr? step)

-
- -Expand source code - -
class typedexpr(TypedAST, expr):
-    def typechecks(self) -> typing.Dict[str, Type]:
-        """Successful typechecks if this expression evaluates to True"""
-        return {}
-
-

Ancestors

- -

Subclasses

- -

Methods

-
-
-def typechecks(self) ‑> Dict[str, Type] -
-
-

Successful typechecks if this expression evaluates to True

-
-
-
-
-class typedstmt -(*args, **kwargs) -
-
-

stmt = FunctionDef(identifier name, arguments args, stmt body, expr decorator_list, expr? returns, string? type_comment) -| AsyncFunctionDef(identifier name, arguments args, stmt body, expr decorator_list, expr? returns, string? type_comment) -| ClassDef(identifier name, expr bases, keyword keywords, stmt body, expr decorator_list) -| Return(expr? value) -| Delete(expr targets) -| Assign(expr targets, expr value, string? type_comment) -| AugAssign(expr target, operator op, expr value) -| AnnAssign(expr target, expr annotation, expr? value, int simple) -| For(expr target, expr iter, stmt body, stmt orelse, string? type_comment) -| AsyncFor(expr target, expr iter, stmt body, stmt orelse, string? type_comment) -| While(expr test, stmt body, stmt orelse) -| If(expr test, stmt body, stmt orelse) -| With(withitem items, stmt body, string? type_comment) -| AsyncWith(withitem items, stmt body, string? type_comment) -| Match(expr subject, match_case cases) -| Raise(expr? exc, expr? cause) -| Try(stmt body, excepthandler handlers, stmt orelse, stmt finalbody) -| TryStar(stmt body, excepthandler handlers, stmt orelse, stmt finalbody) -| Assert(expr test, expr? msg) -| Import(alias names) -| ImportFrom(identifier? module, alias names, int? level) -| Global(identifier names) -| Nonlocal(identifier* names) -| Expr(expr value) -| Pass -| Break -| Continue

-
- -Expand source code - -
class typedstmt(TypedAST, stmt):
-    # Statements always have type None
-    typ = NoneInstanceType
-
-

Ancestors

- -

Subclasses

- -

Class variables

-
-
var typType
-
-
-
-
-
-
-
-
- -
- - - diff --git a/docs/opshin/util.html b/docs/opshin/util.html deleted file mode 100644 index e5b4490f..00000000 --- a/docs/opshin/util.html +++ /dev/null @@ -1,1315 +0,0 @@ - - - - - - - - -opshin.util API documentation - - - - - - - - - - - -
- - - - -
-
-

Module opshin.util

-
-
-
- -Expand source code - -
from _ast import Name, Store, ClassDef, FunctionDef, Load
-from collections import defaultdict
-from copy import copy, deepcopy
-import logging
-
-import typing
-
-import ast
-from dataclasses import dataclass
-
-import pycardano
-from frozendict import frozendict
-from frozenlist2 import frozenlist
-
-import uplc.ast as uplc
-import pluthon as plt
-from hashlib import sha256
-
-OPSHIN_LOGGER = logging.getLogger("opshin")
-OPSHIN_LOG_HANDLER = logging.StreamHandler()
-OPSHIN_LOGGER.addHandler(OPSHIN_LOG_HANDLER)
-
-
-class FileContextFilter(logging.Filter):
-    """
-    This is a filter which injects contextual information into the log.
-
-    The information is about the currently inspected AST node.
-    The information needs to be updated inside the NodeTransformer and NodeVisitor classes.
-    """
-
-    file_name = "unknown"
-    node: ast.AST = None
-
-    def filter(self, record):
-        if self.node is None:
-            record.lineno = 1
-            record.col_offset = 0
-            record.end_lineno = 1
-            record.end_col_offset = 0
-        else:
-            record.lineno = self.node.lineno
-            record.col_offset = self.node.col_offset
-            record.end_lineno = self.node.end_lineno
-            record.end_col_offset = self.node.end_col_offset
-        return True
-
-
-OPSHIN_LOG_CONTEXT_FILTER = FileContextFilter()
-OPSHIN_LOG_HANDLER.addFilter(OPSHIN_LOG_CONTEXT_FILTER)
-
-
-def distinct(xs: list):
-    """Returns true iff the list consists of distinct elements"""
-    return len(xs) == len(set(xs))
-
-
-class TypedNodeTransformer(ast.NodeTransformer):
-    def visit(self, node):
-        """Visit a node."""
-        OPSHIN_LOG_CONTEXT_FILTER.node = node
-        node_class_name = node.__class__.__name__
-        if node_class_name.startswith("Typed"):
-            node_class_name = node_class_name[len("Typed") :]
-        method = "visit_" + node_class_name
-        visitor = getattr(self, method, self.generic_visit)
-        return visitor(node)
-
-
-class TypedNodeVisitor(ast.NodeVisitor):
-    def visit(self, node):
-        """Visit a node."""
-        OPSHIN_LOG_CONTEXT_FILTER.node = node
-        node_class_name = node.__class__.__name__
-        if node_class_name.startswith("Typed"):
-            node_class_name = node_class_name[len("Typed") :]
-        method = "visit_" + node_class_name
-        visitor = getattr(self, method, self.generic_visit)
-        return visitor(node)
-
-
-class CompilerError(Exception):
-    def __init__(self, orig_err: Exception, node: ast.AST, compilation_step: str):
-        self.orig_err = orig_err
-        self.node = node
-        self.compilation_step = compilation_step
-
-
-class CompilingNodeTransformer(TypedNodeTransformer):
-    step = "Node transformation"
-
-    def visit(self, node):
-        OPSHIN_LOG_CONTEXT_FILTER.node = node
-        try:
-            return super().visit(node)
-        except Exception as e:
-            if isinstance(e, CompilerError):
-                raise e
-            raise CompilerError(e, node, self.step)
-
-
-class NoOp(CompilingNodeTransformer):
-    """A variation of the Compiling Node transformer that performs no changes"""
-
-    pass
-
-
-class CompilingNodeVisitor(TypedNodeVisitor):
-    step = "Node visiting"
-
-    def visit(self, node):
-        try:
-            return super().visit(node)
-        except Exception as e:
-            if isinstance(e, CompilerError):
-                raise e
-            raise CompilerError(e, node, self.step)
-
-
-def data_from_json(j: typing.Dict[str, typing.Any]) -> uplc.PlutusData:
-    if "bytes" in j:
-        return uplc.PlutusByteString(bytes.fromhex(j["bytes"]))
-    if "int" in j:
-        return uplc.PlutusInteger(int(j["int"]))
-    if "list" in j:
-        return uplc.PlutusList(frozenlist(list(map(data_from_json, j["list"]))))
-    if "map" in j:
-        return uplc.PlutusMap(
-            frozendict(
-                {data_from_json(d["k"]): data_from_json(d["v"]) for d in j["map"]}
-            )
-        )
-    if "constructor" in j and "fields" in j:
-        return uplc.PlutusConstr(
-            j["constructor"], frozenlist(list(map(data_from_json, j["fields"])))
-        )
-    raise NotImplementedError(f"Unknown datum representation {j}")
-
-
-def datum_to_cbor(d: pycardano.Datum) -> bytes:
-    return pycardano.PlutusData.to_cbor(d)
-
-
-def datum_to_json(d: pycardano.Datum) -> str:
-    return pycardano.PlutusData.to_json(d)
-
-
-def custom_fix_missing_locations(node, parent=None):
-    """
-    Works like ast.fix_missing_location but forces it onto everything
-    """
-
-    def _fix(node, lineno, col_offset, end_lineno, end_col_offset):
-        if getattr(node, "lineno", None) is None:
-            node.lineno = lineno
-        else:
-            lineno = node.lineno
-        if getattr(node, "end_lineno", None) is None:
-            node.end_lineno = end_lineno
-        else:
-            end_lineno = node.end_lineno
-        if getattr(node, "col_offset", None) is None:
-            node.col_offset = col_offset
-        else:
-            col_offset = node.col_offset
-        if getattr(node, "end_col_offset", None) is None:
-            node.end_col_offset = end_col_offset
-        else:
-            end_col_offset = node.end_col_offset
-        for child in ast.iter_child_nodes(node):
-            _fix(child, lineno, col_offset, end_lineno, end_col_offset)
-
-    lineno, col_offset, end_lineno, end_col_offset = (
-        getattr(parent, "lineno", 1),
-        getattr(parent, "col_offset", 0),
-        getattr(parent, "end_lineno", 1),
-        getattr(parent, "end_col_offset", 0),
-    )
-    _fix(node, lineno, col_offset, end_lineno, end_col_offset)
-    return node
-
-
-_patterns_cached = {}
-
-
-def make_pattern(structure: plt.AST) -> plt.Pattern:
-    """Creates a shared pattern from the given lambda, cached so that it is re-used in subsequent calls"""
-    structure_serialized = structure.dumps()
-    if _patterns_cached.get(structure_serialized) is None:
-        # @dataclass
-        # class AdHocPattern(plt.Pattern):
-
-        #     def compose(self):
-        #         return structure
-        AdHocPattern = type(
-            f"AdHocPattern_{sha256(structure_serialized.encode()).digest().hex()}",
-            (plt.Pattern,),
-            {"compose": lambda self: deepcopy(structure)},
-        )
-        AdHocPattern = dataclass(AdHocPattern)
-
-        _patterns_cached[structure_serialized] = AdHocPattern()
-    return deepcopy(_patterns_cached[structure_serialized])
-
-
-def patternize(method):
-    def wrapped(*args, **kwargs):
-        return make_pattern(method(*args, **kwargs))
-
-    return wrapped
-
-
-def force_params(lmd: plt.Lambda) -> plt.Lambda:
-    if isinstance(lmd, plt.Lambda):
-        return plt.Lambda(
-            lmd.vars, plt.Let([(v, plt.Force(plt.Var(v))) for v in lmd.vars], lmd.term)
-        )
-    if isinstance(lmd, plt.Pattern):
-        return make_pattern(force_params(lmd.compose()))
-
-
-class NameWriteCollector(CompilingNodeVisitor):
-    step = "Collecting variables that are written"
-
-    def __init__(self):
-        self.written = defaultdict(int)
-
-    def visit_Name(self, node: Name) -> None:
-        if isinstance(node.ctx, Store):
-            self.written[node.id] += 1
-
-    def visit_ClassDef(self, node: ClassDef):
-        # ignore the content (i.e. attribute names) of class definitions
-        self.written[node.name] += 1
-        pass
-
-    def visit_FunctionDef(self, node: FunctionDef):
-        # ignore the type hints of function arguments
-        self.written[node.name] += 1
-        for a in node.args.args:
-            self.written[a.arg] += 1
-        for s in node.body:
-            self.visit(s)
-
-
-def written_vars(node):
-    """
-    Returns all variable names written to in this node
-    """
-    collector = NameWriteCollector()
-    collector.visit(node)
-    return sorted(collector.written.keys())
-
-
-class NameReadCollector(CompilingNodeVisitor):
-    step = "Collecting variables that are read"
-
-    def __init__(self):
-        self.read = defaultdict(int)
-
-    def visit_AnnAssign(self, node) -> None:
-        # ignore annotations of variables
-        self.visit(node.value)
-        self.visit(node.target)
-
-    def visit_FunctionDef(self, node) -> None:
-        # ignore annotations of paramters and return
-        for b in node.body:
-            self.visit(b)
-
-    def visit_Name(self, node: Name) -> None:
-        if isinstance(node.ctx, Load):
-            self.read[node.id] += 1
-
-    def visit_ClassDef(self, node: ClassDef):
-        # ignore the content (i.e. attribute names) of class definitions
-        pass
-
-
-def read_vars(node):
-    """
-    Returns all variable names read to in this node
-    """
-    collector = NameReadCollector()
-    collector.visit(node)
-    return sorted(collector.read.keys())
-
-
-def all_vars(node):
-    return sorted(set(read_vars(node) + written_vars(node)))
-
-
-def externally_bound_vars(node: FunctionDef):
-    """A superset of the variables bound from an outer scope"""
-    return sorted(set(read_vars(node)) - set(written_vars(node)) - {"isinstance"})
-
-
-def opshin_name_scheme_compatible_varname(n: str):
-    return f"1{n}"
-
-
-def OVar(name: str):
-    return plt.Var(opshin_name_scheme_compatible_varname(name))
-
-
-def OLambda(names: typing.List[str], term: plt.AST):
-    return plt.Lambda([opshin_name_scheme_compatible_varname(x) for x in names], term)
-
-
-def OLet(bindings: typing.List[typing.Tuple[str, plt.AST]], term: plt.AST):
-    return plt.Let(
-        [(opshin_name_scheme_compatible_varname(n), t) for n, t in bindings], term
-    )
-
-
-def SafeLambda(vars: typing.List[str], term: plt.AST) -> plt.Lambda:
-    if not vars:
-        return plt.Lambda(["0_"], term)
-    return plt.Lambda(vars, term)
-
-
-def SafeOLambda(vars: typing.List[str], term: plt.AST) -> plt.Lambda:
-    if not vars:
-        return OLambda(["0_"], term)
-    return OLambda(vars, term)
-
-
-def SafeApply(term: plt.AST, *vars: typing.List[plt.AST]) -> plt.Apply:
-    if not vars:
-        return plt.Apply(term, plt.Delay(plt.Unit()))
-    return plt.Apply(term, *vars)
-
-
-
-
-
-
-
-

Functions

-
-
-def OLambda(names: List[str], term: pluthon.pluthon_ast.AST) -
-
-
-
-
-def OLet(bindings: List[Tuple[str, pluthon.pluthon_ast.AST]], term: pluthon.pluthon_ast.AST) -
-
-
-
-
-def OVar(name: str) -
-
-
-
-
-def SafeApply(term: pluthon.pluthon_ast.AST, *vars: List[pluthon.pluthon_ast.AST]) ‑> pluthon.pluthon_ast.Apply -
-
-
-
-
-def SafeLambda(vars: List[str], term: pluthon.pluthon_ast.AST) ‑> pluthon.pluthon_ast.Lambda -
-
-
-
-
-def SafeOLambda(vars: List[str], term: pluthon.pluthon_ast.AST) ‑> pluthon.pluthon_ast.Lambda -
-
-
-
-
-def all_vars(node) -
-
-
-
-
-def custom_fix_missing_locations(node, parent=None) -
-
-

Works like ast.fix_missing_location but forces it onto everything

-
-
-def data_from_json(j: Dict[str, Any]) ‑> uplc.ast.PlutusData -
-
-
-
-
-def datum_to_cbor(d: Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]) ‑> bytes -
-
-
-
-
-def datum_to_json(d: Union[pycardano.plutus.PlutusData, dict, int, bytes, pycardano.serialization.IndefiniteList, pycardano.serialization.RawCBOR, pycardano.plutus.RawPlutusData]) ‑> str -
-
-
-
-
-def distinct(xs: list) -
-
-

Returns true iff the list consists of distinct elements

-
-
-def externally_bound_vars(node: ast.FunctionDef) -
-
-

A superset of the variables bound from an outer scope

-
-
-def force_params(lmd: pluthon.pluthon_ast.Lambda) ‑> pluthon.pluthon_ast.Lambda -
-
-
-
-
-def make_pattern(structure: pluthon.pluthon_ast.AST) ‑> pluthon.pluthon_ast.Pattern -
-
-

Creates a shared pattern from the given lambda, cached so that it is re-used in subsequent calls

-
-
-def opshin_name_scheme_compatible_varname(n: str) -
-
-
-
-
-def patternize(method) -
-
-
-
-
-def read_vars(node) -
-
-

Returns all variable names read to in this node

-
-
-def written_vars(node) -
-
-

Returns all variable names written to in this node

-
-
-
-
-

Classes

-
-
-class CompilerError -(orig_err: Exception, node: ast.AST, compilation_step: str) -
-
-

Common base class for all non-exit exceptions.

-
- -Expand source code - -
class CompilerError(Exception):
-    def __init__(self, orig_err: Exception, node: ast.AST, compilation_step: str):
-        self.orig_err = orig_err
-        self.node = node
-        self.compilation_step = compilation_step
-
-

Ancestors

-
    -
  • builtins.Exception
  • -
  • builtins.BaseException
  • -
-
-
-class CompilingNodeTransformer -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class CompilingNodeTransformer(TypedNodeTransformer):
-    step = "Node transformation"
-
-    def visit(self, node):
-        OPSHIN_LOG_CONTEXT_FILTER.node = node
-        try:
-            return super().visit(node)
-        except Exception as e:
-            if isinstance(e, CompilerError):
-                raise e
-            raise CompilerError(e, node, self.step)
-
-

Ancestors

- -

Subclasses

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -TypedNodeTransformer.visit -

-

Visit a node.

-
-
-
-
-class CompilingNodeVisitor -
-
-

A node visitor base class that walks the abstract syntax tree and calls a -visitor function for every node found. -This function may return a value -which is forwarded by the visit method.

-

This class is meant to be subclassed, with the subclass adding visitor -methods.

-

Per default the visitor functions for the nodes are 'visit_' + -class name of the node. -So a TryFinally node visit function would -be visit_TryFinally. -This behavior can be changed by overriding -the visit method. -If no visitor function exists for a node -(return value None) the generic_visit visitor is used instead.

-

Don't use the NodeVisitor if you want to apply changes to nodes during -traversing. -For this a special visitor exists (NodeTransformer) that -allows modifications.

-
- -Expand source code - -
class CompilingNodeVisitor(TypedNodeVisitor):
-    step = "Node visiting"
-
-    def visit(self, node):
-        try:
-            return super().visit(node)
-        except Exception as e:
-            if isinstance(e, CompilerError):
-                raise e
-            raise CompilerError(e, node, self.step)
-
-

Ancestors

- -

Subclasses

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -TypedNodeVisitor.visit -

-

Visit a node.

-
-
-
-
-class FileContextFilter -(name='') -
-
-

This is a filter which injects contextual information into the log.

-

The information is about the currently inspected AST node. -The information needs to be updated inside the NodeTransformer and NodeVisitor classes.

-

Initialize a filter.

-

Initialize with the name of the logger which, together with its -children, will have its events allowed through the filter. If no -name is specified, allow every event.

-
- -Expand source code - -
class FileContextFilter(logging.Filter):
-    """
-    This is a filter which injects contextual information into the log.
-
-    The information is about the currently inspected AST node.
-    The information needs to be updated inside the NodeTransformer and NodeVisitor classes.
-    """
-
-    file_name = "unknown"
-    node: ast.AST = None
-
-    def filter(self, record):
-        if self.node is None:
-            record.lineno = 1
-            record.col_offset = 0
-            record.end_lineno = 1
-            record.end_col_offset = 0
-        else:
-            record.lineno = self.node.lineno
-            record.col_offset = self.node.col_offset
-            record.end_lineno = self.node.end_lineno
-            record.end_col_offset = self.node.end_col_offset
-        return True
-
-

Ancestors

-
    -
  • logging.Filter
  • -
-

Class variables

-
-
var file_name
-
-
-
-
var node : ast.AST
-
-
-
-
-

Methods

-
-
-def filter(self, record) -
-
-

Determine if the specified record is to be logged.

-

Returns True if the record should be logged, or False otherwise. -If deemed appropriate, the record may be modified in-place.

-
-
-
-
-class NameReadCollector -
-
-

A node visitor base class that walks the abstract syntax tree and calls a -visitor function for every node found. -This function may return a value -which is forwarded by the visit method.

-

This class is meant to be subclassed, with the subclass adding visitor -methods.

-

Per default the visitor functions for the nodes are 'visit_' + -class name of the node. -So a TryFinally node visit function would -be visit_TryFinally. -This behavior can be changed by overriding -the visit method. -If no visitor function exists for a node -(return value None) the generic_visit visitor is used instead.

-

Don't use the NodeVisitor if you want to apply changes to nodes during -traversing. -For this a special visitor exists (NodeTransformer) that -allows modifications.

-
- -Expand source code - -
class NameReadCollector(CompilingNodeVisitor):
-    step = "Collecting variables that are read"
-
-    def __init__(self):
-        self.read = defaultdict(int)
-
-    def visit_AnnAssign(self, node) -> None:
-        # ignore annotations of variables
-        self.visit(node.value)
-        self.visit(node.target)
-
-    def visit_FunctionDef(self, node) -> None:
-        # ignore annotations of paramters and return
-        for b in node.body:
-            self.visit(b)
-
-    def visit_Name(self, node: Name) -> None:
-        if isinstance(node.ctx, Load):
-            self.read[node.id] += 1
-
-    def visit_ClassDef(self, node: ClassDef):
-        # ignore the content (i.e. attribute names) of class definitions
-        pass
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeVisitor.visit -

-

Visit a node.

-
-
-def visit_AnnAssign(self, node) ‑> None -
-
-
-
-
-def visit_ClassDef(self, node: ast.ClassDef) -
-
-
-
-
-def visit_FunctionDef(self, node) ‑> None -
-
-
-
-
-def visit_Name(self, node: ast.Name) ‑> None -
-
-
-
-
-
-
-class NameWriteCollector -
-
-

A node visitor base class that walks the abstract syntax tree and calls a -visitor function for every node found. -This function may return a value -which is forwarded by the visit method.

-

This class is meant to be subclassed, with the subclass adding visitor -methods.

-

Per default the visitor functions for the nodes are 'visit_' + -class name of the node. -So a TryFinally node visit function would -be visit_TryFinally. -This behavior can be changed by overriding -the visit method. -If no visitor function exists for a node -(return value None) the generic_visit visitor is used instead.

-

Don't use the NodeVisitor if you want to apply changes to nodes during -traversing. -For this a special visitor exists (NodeTransformer) that -allows modifications.

-
- -Expand source code - -
class NameWriteCollector(CompilingNodeVisitor):
-    step = "Collecting variables that are written"
-
-    def __init__(self):
-        self.written = defaultdict(int)
-
-    def visit_Name(self, node: Name) -> None:
-        if isinstance(node.ctx, Store):
-            self.written[node.id] += 1
-
-    def visit_ClassDef(self, node: ClassDef):
-        # ignore the content (i.e. attribute names) of class definitions
-        self.written[node.name] += 1
-        pass
-
-    def visit_FunctionDef(self, node: FunctionDef):
-        # ignore the type hints of function arguments
-        self.written[node.name] += 1
-        for a in node.args.args:
-            self.written[a.arg] += 1
-        for s in node.body:
-            self.visit(s)
-
-

Ancestors

- -

Class variables

-
-
var step
-
-
-
-
-

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeVisitor.visit -

-

Visit a node.

-
-
-def visit_ClassDef(self, node: ast.ClassDef) -
-
-
-
-
-def visit_FunctionDef(self, node: ast.FunctionDef) -
-
-
-
-
-def visit_Name(self, node: ast.Name) ‑> None -
-
-
-
-
-
-
-class NoOp -
-
-

A variation of the Compiling Node transformer that performs no changes

-
- -Expand source code - -
class NoOp(CompilingNodeTransformer):
-    """A variation of the Compiling Node transformer that performs no changes"""
-
-    pass
-
-

Ancestors

- -

Methods

-
-
-def visit(self, node) -
-
-

-Inherited from: -CompilingNodeTransformer.visit -

-

Visit a node.

-
-
-
-
-class TypedNodeTransformer -
-
-

A :class:NodeVisitor subclass that walks the abstract syntax tree and -allows modification of nodes.

-

The NodeTransformer will walk the AST and use the return value of the -visitor methods to replace or remove the old node. -If the return value of -the visitor method is None, the node will be removed from its location, -otherwise it is replaced with the return value. -The return value may be the -original node in which case no replacement takes place.

-

Here is an example transformer that rewrites all occurrences of name lookups -(foo) to data['foo']::

-

class RewriteName(NodeTransformer):

-
   def visit_Name(self, node):
-       return Subscript(
-           value=Name(id='data', ctx=Load()),
-           slice=Constant(value=node.id),
-           ctx=node.ctx
-       )
-
-

Keep in mind that if the node you're operating on has child nodes you must -either transform the child nodes yourself or call the :meth:generic_visit -method for the node first.

-

For nodes that were part of a collection of statements (that applies to all -statement nodes), the visitor may also return a list of nodes rather than -just a single node.

-

Usually you use the transformer like this::

-

node = YourTransformer().visit(node)

-
- -Expand source code - -
class TypedNodeTransformer(ast.NodeTransformer):
-    def visit(self, node):
-        """Visit a node."""
-        OPSHIN_LOG_CONTEXT_FILTER.node = node
-        node_class_name = node.__class__.__name__
-        if node_class_name.startswith("Typed"):
-            node_class_name = node_class_name[len("Typed") :]
-        method = "visit_" + node_class_name
-        visitor = getattr(self, method, self.generic_visit)
-        return visitor(node)
-
-

Ancestors

-
    -
  • ast.NodeTransformer
  • -
  • ast.NodeVisitor
  • -
-

Subclasses

- -

Methods

-
-
-def visit(self, node) -
-
-

Visit a node.

-
-
-
-
-class TypedNodeVisitor -
-
-

A node visitor base class that walks the abstract syntax tree and calls a -visitor function for every node found. -This function may return a value -which is forwarded by the visit method.

-

This class is meant to be subclassed, with the subclass adding visitor -methods.

-

Per default the visitor functions for the nodes are 'visit_' + -class name of the node. -So a TryFinally node visit function would -be visit_TryFinally. -This behavior can be changed by overriding -the visit method. -If no visitor function exists for a node -(return value None) the generic_visit visitor is used instead.

-

Don't use the NodeVisitor if you want to apply changes to nodes during -traversing. -For this a special visitor exists (NodeTransformer) that -allows modifications.

-
- -Expand source code - -
class TypedNodeVisitor(ast.NodeVisitor):
-    def visit(self, node):
-        """Visit a node."""
-        OPSHIN_LOG_CONTEXT_FILTER.node = node
-        node_class_name = node.__class__.__name__
-        if node_class_name.startswith("Typed"):
-            node_class_name = node_class_name[len("Typed") :]
-        method = "visit_" + node_class_name
-        visitor = getattr(self, method, self.generic_visit)
-        return visitor(node)
-
-

Ancestors

-
    -
  • ast.NodeVisitor
  • -
-

Subclasses

- -

Methods

-
-
-def visit(self, node) -
-
-

Visit a node.

-
-
-
-
-
-
- -
- - -