Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic Blackbox Testing #249

Merged
merged 196 commits into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from 184 commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
9e2bc7d
start with more test cases
Mar 3, 2022
3f6d775
This shall morph into the guardrails PR
Mar 4, 2022
27d708c
ignore vscode as well
Mar 5, 2022
75e24c6
explicit teal version in test functions
Mar 5, 2022
cc1d581
refactor to separate old from new
Mar 5, 2022
b404552
Merge remote-tracking branch 'origin' into recursive-pass-by-ref-guar…
Mar 6, 2022
b68fb85
wip
Mar 7, 2022
8a62325
why is pyteal compilation flakey?
Mar 9, 2022
d37a5d9
Merge branch 'master' of github.com:algorand/pyteal into recursive-pa…
Mar 9, 2022
5195a3f
inline comment per issue #242
Mar 13, 2022
2a75511
wip... but will need to clean up these experiments
Mar 13, 2022
f8e2055
subroutine input_types
Mar 14, 2022
60f0458
semantic tests starter. next: call dryryn
Mar 14, 2022
03d60c7
dry run working - next up assertions
Mar 14, 2022
5a9c94f
passing local tests
Mar 14, 2022
0bed137
wip
Mar 15, 2022
06d83b5
getting read for CSV
Mar 15, 2022
cfc068d
if error, use it instead of teal in the last trace line
Mar 15, 2022
c926518
ignore CSV's
Mar 17, 2022
6a6410e
adding a Makefile with pytest coverate command
Mar 17, 2022
6147636
part 1. refactor to use pysdk as much as possible
Mar 18, 2022
b275ad1
Update .gitignore
tzaffi Mar 18, 2022
da5e026
Update Makefile
tzaffi Mar 18, 2022
e3e439d
Update pyteal/compiler/scratchslots.py
tzaffi Mar 18, 2022
836249e
Update tests/semantic_test.py
tzaffi Mar 18, 2022
db5836d
try installing git on github!!!
Mar 18, 2022
b4aca8b
rm sudo
Mar 18, 2022
e824211
apt -y
Mar 18, 2022
f63d9f5
refactor github actions into Makefile
Mar 18, 2022
bdf8c45
mypy
Mar 18, 2022
8562bdf
make on circle also
Mar 18, 2022
686cebe
Update pyteal/ast/scratchvar.py
tzaffi Mar 18, 2022
10d74e7
don't reinvent the num_app_args wheel
Mar 18, 2022
9131753
tabulate needed for algosdk's teal blackbox
Mar 18, 2022
04f120f
Merge branch 'subr-blackbox' of github.com:algorand/pyteal into subr-…
Mar 18, 2022
9f6c17d
Update tests/semantic_test.py
tzaffi Mar 18, 2022
7882191
make explicit running of blackbox tests
Mar 18, 2022
af8ef10
Update Makefile
tzaffi Mar 18, 2022
23c03ed
detailed comment with usage example and unit tests of e2e_pyteal()
Mar 18, 2022
1bcd37d
Merge branch 'subr-blackbox' of github.com:algorand/pyteal into subr-…
Mar 18, 2022
13edd8e
DryRunTransactionResult not DryRunResults
Mar 18, 2022
323e690
rework the API in the comment
Mar 18, 2022
035bbf3
api in comment
Mar 18, 2022
ed130fe
bring in pysdk's refactorings
Mar 20, 2022
39177c2
fix the e2e_pyteal in-line example
Mar 20, 2022
7ca309e
Merge remote-tracking branch 'origin' into subr-blackbox
Mar 21, 2022
ddaeaec
3 doc'able and tested examples
Mar 21, 2022
3a28ff8
ready for review
Mar 21, 2022
4c40923
test user guide as well using ALGOD
Mar 21, 2022
79459fc
don't actually require ALGOD
Mar 21, 2022
eee391f
itob
Mar 21, 2022
c357319
typos
Mar 21, 2022
39d4c80
oops - redundant tests passed by luck
Mar 21, 2022
489b6d4
simplify as constant assertion
Mar 21, 2022
52cb1d9
remove unused functions
Mar 21, 2022
57cc356
remove space
Mar 21, 2022
f955ff8
simplify
Mar 21, 2022
fafb702
Update tests/semantic_asserts.py
tzaffi Mar 21, 2022
104076f
Update tests/semantic_asserts.py
tzaffi Mar 21, 2022
c9d9efc
Update tests/semantic_asserts.py
tzaffi Mar 23, 2022
936de2c
Migrate from DryRunProperty.noError to DryRunProperty.errorMessage (#…
michaeldiamant Mar 23, 2022
005f72e
Standardize terminology from semantic E2E to blackbox (#259)
michaeldiamant Mar 23, 2022
a137758
change the doc'able comment too
Mar 23, 2022
227bbc8
Merge branch 'subr-blackbox' of github.com:algorand/pyteal into subr-…
Mar 23, 2022
c0568e2
unneeded import in example
Mar 23, 2022
eaf5724
adding comment to SubroutineDefinition, including one suggested in CR
Mar 23, 2022
2c6cc4f
per CR suggestion: Pop(Int(1)) --> Seq() for Noop PyTEAL Expr
Mar 23, 2022
f13520a
trying fat python per CR suggestion
Mar 23, 2022
9f74f26
explain how pass-by-ref works in the blackbox_pyteal generator
Mar 23, 2022
9c618a7
not really a pure DFS
Mar 24, 2022
370cc82
bug in my subroutine, not in PyTEAL (x <--> y)
Mar 28, 2022
897b3ad
assume going forward that the algod is available in PyTEAL's environment
Mar 28, 2022
a5b90ee
pip install still not working on graviton
Mar 29, 2022
6b3e234
get the pip install working on graviton
Mar 29, 2022
b051e75
Merge remote-tracking branch 'origin' into subr-blackbox
Mar 30, 2022
dc0626d
pin to graviton tag and remove requirements.txt
Mar 30, 2022
280df39
Merge remote-tracking branch 'origin' into subr-blackbox
Apr 8, 2022
ff48131
adding flake for unused imports, but not enforcing
Apr 8, 2022
a9e9171
adding flake for unused imports, but not enforcing
Apr 8, 2022
dcac885
re-org tests
Apr 8, 2022
a4560f8
stop supporting 3.6 and 3.7
Apr 8, 2022
76a993d
get further on in github actions
Apr 9, 2022
cf02620
hide more docs detritus
Apr 9, 2022
16ddda7
bring as most of gitub actions into Makefile
Apr 9, 2022
f55b807
mypy
Apr 9, 2022
4611508
flake8 everything
Apr 9, 2022
cfc1b70
gry gin
Apr 9, 2022
20fb2bd
try gin
Apr 9, 2022
80eca75
fix pytest parametrize params
Apr 10, 2022
b3989c3
intevration tests (py 3.10 only)
Apr 10, 2022
a1f91f1
integration tests (py 3.10 only)
Apr 10, 2022
2d29dea
ditributed blackbox/integration tests
Apr 10, 2022
7779b98
black/flake8 everything but be specific about it (so don't lint sandb…
Apr 10, 2022
d2586a1
turn off multi-thread in integration tests for now (need to update #1…
Apr 10, 2022
94ffe22
typo
Apr 10, 2022
e4160bc
3.6/7 back on
Apr 10, 2022
cff290b
misleading comment formatting
Apr 10, 2022
77df1ab
separate the integration portion of the build
Apr 10, 2022
a254f52
not sure this is better, but have deparate integration dependencies i…
Apr 10, 2022
8fe32a5
3.6 is hopeless
Apr 10, 2022
478ef13
factorizer_test working for hardcoded (1,5,7) inputs and invariants
Apr 10, 2022
d3247cc
507 attempted contracts - 156 successful - 15,600 dryrun validations …
Apr 12, 2022
0485a7f
Merge remote-tracking branch 'origin' into subr-blackbox
Apr 12, 2022
a8fc52d
Merge remote-tracking branch 'origin' into subr-blackbox
Apr 20, 2022
5675364
revert dependency to graviton@🦙
Apr 20, 2022
1c360e3
user_guid_test.py is now an integration test
Apr 20, 2022
62b23ec
merge in all the changes
Apr 21, 2022
1354ffd
cleanup
Apr 21, 2022
75acb9b
delete unused test teals
Apr 21, 2022
d290290
improve test granularity
Apr 21, 2022
3b5c103
delete unused test teals and csv
Apr 21, 2022
0d752e6
Update pyteal/ast/ternaryexpr.py
tzaffi Apr 21, 2022
eb16cc0
build, unit, integation in a single command
Apr 21, 2022
d841d44
remove the logic sig demo
Apr 21, 2022
f59aabe
type
Apr 21, 2022
7760bb6
Please be faster than 35 minutes
tzaffi Apr 21, 2022
0303d57
Trigger build 9:30 central
tzaffi Apr 21, 2022
0b4210a
add local act simulation command
Apr 21, 2022
10a518b
Merge branch 'subr-blackbox' of github.com:algorand/pyteal into subr-…
Apr 21, 2022
2cb26c0
hack the cache key and try again
Apr 21, 2022
96939a7
try gin
Apr 21, 2022
6ef133d
revert
Apr 21, 2022
50a6713
comment out restore-keys
Apr 21, 2022
52bbba7
make restore keys look more like key
Apr 21, 2022
03a55b0
try path for cache
Apr 21, 2022
fe42233
trigger build
tzaffi Apr 21, 2022
0ead79b
try a prebuilt image
Apr 22, 2022
81cce15
explain how to run tests and handle dockerized algod
Apr 22, 2022
aa456bf
typo
Apr 22, 2022
307e83a
cleanup
Apr 22, 2022
7ae6fa4
Merge remote-tracking branch 'origin' into subr-blackbox
Apr 22, 2022
9c27bd9
Update setup.py
tzaffi Apr 22, 2022
2057166
Update setup.py
tzaffi Apr 22, 2022
190b21c
refactor blackbox_asserts.py -> utils/blackbox.py
Apr 22, 2022
a5972be
revert
Apr 22, 2022
eea2460
typo
Apr 22, 2022
5dc6f25
cleanup
Apr 22, 2022
505005a
woops - I wasn't actually running the integration tests on github
Apr 22, 2022
b83365c
flake8
Apr 22, 2022
d4afbcc
clarifications
Apr 23, 2022
e39ec25
better grammar
Apr 23, 2022
a8f9321
small fix
Apr 23, 2022
b75c194
better comment
Apr 23, 2022
d14321f
refactor into _validate_and_set_param_info
Apr 23, 2022
6b7f994
use better py310 typing practices
Apr 23, 2022
7ddf7f1
revert import sorting - carve out to PR #296
Apr 25, 2022
08dc236
remove dead code
Apr 25, 2022
94594c5
unneeded fixture
Apr 25, 2022
505c48f
cleanup
Apr 25, 2022
a044fa6
bring user_guide_test.py in sync with docs
Apr 25, 2022
acd05ad
Update pyteal/ast/subroutine.py
tzaffi Apr 25, 2022
50f59c9
test against different dockerhub image
Apr 25, 2022
fae5663
Update tests/integration/user_guide_test.py
tzaffi Apr 25, 2022
01202cd
Update utils/blackbox.py
tzaffi Apr 25, 2022
ab8b0ff
Update utils/blackbox.py
tzaffi Apr 25, 2022
6f18e29
Update tests/integration/user_guide_test.py
tzaffi Apr 25, 2022
76517e9
Update utils/blackbox.py
tzaffi Apr 25, 2022
ec7cf96
Update tests/integration/user_guide_test.py
tzaffi Apr 25, 2022
5d91ff7
Update tests/integration/user_guide_test.py
tzaffi Apr 25, 2022
01f681b
privatize the unchecked `algod_client()`
Apr 25, 2022
4ff4cc2
Merge branch 'subr-blackbox' of github.com:algorand/pyteal into subr-…
Apr 25, 2022
560d02b
per CR suggestion
Apr 25, 2022
5520d71
move fixtures under `utils/test/teal` per CR suggestion
Apr 25, 2022
e351b4f
revert unintentionally added fixtures
Apr 25, 2022
d56772f
remove caching on github
Apr 25, 2022
f2f7c09
do I even need nodejs now?
Apr 25, 2022
0a958e1
how bout git?
Apr 25, 2022
8ca7895
I can't haz a subr
Apr 26, 2022
ac5004e
should failr circle
Apr 26, 2022
e0c1c27
use makerxau docker
Apr 26, 2022
66d4f28
yes, we do need docker.list => gpg => curl
Apr 26, 2022
04794f9
refactor user_guid_test
Apr 26, 2022
1f23a39
no more error-prone repetition of the comment
Apr 26, 2022
33fdee3
the comments aren't markdown
Apr 26, 2022
6afe1af
better comment
Apr 26, 2022
a426ff1
Merge remote-tracking branch 'origin' into subr-blackbox
Apr 26, 2022
baac729
Blackbox Decorator (#297)
tzaffi Apr 26, 2022
8adec26
Partition act-specific steps for run-integration-tests (#299)
michaeldiamant Apr 27, 2022
d64005c
Make build-docset act-compatible (#302)
michaeldiamant Apr 27, 2022
ae6e6ed
begin SubroutineDefinition.validate() unit test
Apr 27, 2022
bb18f3f
__eq__ takes Any
Apr 27, 2022
a11e5d3
1/2 way thru unit test
Apr 27, 2022
d0d024b
pass unit test after discovering bug
Apr 27, 2022
bca1a5f
final checks
Apr 27, 2022
ae9067a
per CR comment + pytest xdist n=auto
Apr 28, 2022
06529ac
multithread as many units as possible as well
Apr 28, 2022
6cc99b3
revert per CR comment
Apr 28, 2022
1679ba4
per CR suggestion
Apr 28, 2022
853d7c0
per CR suggestion: sayonara utils - you're just a bunch of tests
Apr 28, 2022
d5cb493
privatize validate & BlackboxWrapper + typehints in validate()
Apr 28, 2022
c14e919
Update Makefile
tzaffi Apr 28, 2022
7935fae
modern union
tzaffi Apr 28, 2022
bc9d5dd
Update tests/unit/blackbox_test.py
tzaffi Apr 28, 2022
843ed96
no underscore for BlackboxWrapper
Apr 28, 2022
7619773
Merge remote-tracking branch 'origin' into subr-blackbox
Apr 28, 2022
cd1654b
as CR suggested, tabulate comes for free with graviton
Apr 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 51 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
container: python:${{ matrix.python }}
strategy:
matrix:
python: ['3.10']
python: ["3.10"]
steps:
- run: python3 --version
- name: Check out code
Expand All @@ -25,19 +25,68 @@ jobs:
- name: Build and Test
run: make build-and-test

run-integration-tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python: [ "3.10" ]
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v3
with:
python-version: "${{ matrix.python }}"
- name: Test Python version
run: |
installed="$(python --version)"
expected="${{ matrix.python }}"
echo $installed
[[ $installed =~ "Python ${expected}" ]] && echo "Configured Python" || (echo "Failed to configure Python" && exit 1)
- name: Local ACT Only - Install required os level applications
if: ${{ env.ACT }}
run: |
sudo apt update -y
sudo apt install -y curl
sudo apt -y install ca-certificates curl gnupg lsb-release
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
sudo echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt -y install docker-ce docker-ce-cli containerd.io
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version
- name: Create sandbox
run: make sandbox-dev-up
- name: Install python dependencies
run: make setup-development
- name: Build, Unit Tests and Integration Tests
run: make all-tests
- name: Stop running images
run: make sandbox-dev-stop

build-docset:
runs-on: ubuntu-20.04
container: python:3.10 # Needs `make`, can't be slim
strategy:
matrix:
python: [ "3.10" ]
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v3
with:
python-version: "${{ matrix.python }}"
- name: Install python dependencies
run: make setup-docs
- name: Make docs
run: make bundle-docs
- name: Archive docset
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v2
with:
name: pyteal.docset
Expand Down
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ coverage.xml
.hypothesis/
.pytest_cache/

# Tests generating TEAL output to compared against an expected example.
tests/**/*.teal
!tests/**/*_expected.teal
# Generated by unit tests - usually for diffs against expected:
**/generated

# Translations
*.mo
Expand Down Expand Up @@ -133,5 +132,9 @@ dmypy.json
.idea
.vscode

# comma seperated vals report files
*.csv
!tests/**/*_example.csv

# mac OS
.DS_Store
51 changes: 45 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ---- Setup ---- #

setup-development:
pip install -e.[development]
pip install -e .[development]

setup-docs: setup-development
pip install -r docs/requirements.txt
Expand All @@ -8,6 +10,11 @@ setup-docs: setup-development
setup-wheel:
pip install wheel

generate-init:
python -m scripts.generate_init

# ---- Docs and Distribution ---- #

bdist-wheel:
python setup.py sdist bdist_wheel

Expand All @@ -20,30 +27,62 @@ bundle-docs: bundle-docs-clean
doc2dash --name pyteal --index-page index.html --online-redirect-url https://pyteal.readthedocs.io/en/ _build/html && \
tar -czvf pyteal.docset.tar.gz pyteal.docset

generate-init:
python -m scripts.generate_init
# ---- Code Quality ---- #

check-generate-init:
python -m scripts.generate_init --check

ALLPY = docs examples pyteal scripts tests *.py
ALLPY = docs examples pyteal scripts tests utils *.py
black:
black --check $(ALLPY)

flake8:
flake8 $(ALLPY)

# TODO: add `tests` and `utils` to $MYPY when graviton respects mypy (version 🐗)
MYPY = pyteal scripts
mypy:
mypy $(MYPY)

lint: black flake8 mypy

# ---- Unit Tests (no algod) ---- #

UNIT = pyteal tests/unit utils
test-unit:
pytest
pytest $(UNIT)

build-and-test: check-generate-init lint test-unit

# Extras:
# ---- Integration Test (algod required) ---- #

sandbox-dev-up:
docker-compose up -d algod

sandbox-dev-stop:
docker-compose stop algod

# TODO: set NUM_PROCS = auto when the following issue has been fixed https://github.com/algorand/pyteal/issues/199
NUM_PROCS = 1
integration-run:
pytest -n $(NUM_PROCS) --durations=10 -sv tests/integration

test-integration: integration-run

all-tests: build-and-test test-integration

# ---- Local Github Actions Simulation via `act` ---- #
# assumes act is installed, e.g. via `brew install act`

ACT_JOB = run-integration-tests
local-gh-job:
act -j $(ACT_JOB)

local-gh-simulate:
act


# ---- Extras ---- #

coverage:
pytest --cov-report html --cov=pyteal
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,30 @@ Pip install PyTeal in editable state with dependencies:
* `pip install -e.[development]`
* Note, that if you're using `zsh` you'll need to escape the brackets: `pip install -e.\[development\]`

Format code:

* `black .`

Lint using flake8:

* `flake8 docs examples pyteal scripts tests utils *.py`

Type checking using mypy:

* `mypy pyteal`
* `mypy pyteal scripts`

Run tests:
Run unit tests:

* `pytest`
* `pytest pyteal tests/unit utils`

Format code:
Run integration tests (assumes a developer-mode `algod` is available on port 4001):

* `black .`
* `pytest tests/integration`

Lint using flake8:
Stand up developer-mode algod on ports 4001, 4002 and `tealdbg` on port 9392 (assumes [Docker](https://www.docker.com/) is available on your system):

* `docker-compose up -d`

Tear down and clean up resources for the developer-mode algod stood up above:

* `flake8 docs examples pyteal scripts tests *.py`
* `docker-compose down`
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3'

services:
algod:
image: makerxau/algorand-sandbox-dev:latest
ports:
- "4001:4001"
- "4002:4002"
- "9392:9392"
2 changes: 1 addition & 1 deletion docs/opup.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _opup:

OpUp: Budget Increase Utility
========================
=================================

Some opcode budget is consumed during execution of every Algorand Smart Contract because every TEAL
instruction has a corresponding cost. In order for the evaluation to succeed, the budget consumed must not
Expand Down
86 changes: 86 additions & 0 deletions examples/signature/factorizer_game.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# WARNING: this logic sig is for demo purposes only

from pyteal import (
And,
Arg,
Btoi,
Bytes,
Expr,
Global,
If,
Int,
Pop,
ScratchVar,
Seq,
Subroutine,
TealType,
Txn,
TxnType,
)

ONE_ALGO = Int(1_000_000)


@Subroutine(TealType.uint64)
def root_closeness(A, B, C, X):
left = ScratchVar(TealType.uint64)
right = ScratchVar(TealType.uint64)
return Seq(
left.store(A * X * X + C),
right.store(B * X),
If(left.load() < right.load())
.Then(right.load() - left.load())
.Else(left.load() - right.load()),
)


@Subroutine(TealType.uint64)
def calculate_prize(closeness):
return (
If(closeness + Int(1) < Int(20))
.Then(ONE_ALGO * (Int(10) - (closeness + Int(1)) / Int(2)))
.Else(Int(0))
)


def logicsig(a: int, p: int, q: int) -> Expr:
"""
Choices
* (a, p, q) = (1, 5, 7)
* compiling on TEAL version 5 and
* with assembleConstants = True
results in Logic-Sig Contract Account Address:
WO3TQD3WBSDKB6WEHUMSEBFH53GZVVXYGPWYDWKUZCKEXTVCDNDHJGG6II
"""
assert all(
isinstance(x, int) and p < q and a > 0 and x >= 0 for x in (a, p, q)
), f"require non-negative ints a, p, q with p < q but got {a, p, q}"

b, c = a * (p + q), a * p * q
msg = Bytes(f"Can you factor {a} * x^2 - {b} * x + {c} ?")

A, B, C = Int(a), Int(b), Int(c)
X1 = Btoi(Arg(0))
X2 = Btoi(Arg(1))
C1 = ScratchVar(TealType.uint64)
C2 = ScratchVar(TealType.uint64)
SUM = ScratchVar(TealType.uint64)
PRIZE = ScratchVar(TealType.uint64)
return Seq(
Pop(msg),
C1.store(root_closeness(A, B, C, X1)),
C2.store(root_closeness(A, B, C, X2)),
SUM.store(C1.load() + C2.load()),
PRIZE.store(calculate_prize(SUM.load())),
And(
Txn.type_enum() == TxnType.Payment,
Txn.close_remainder_to() == Global.zero_address(),
X1 != X2,
PRIZE.load(),
Txn.amount() == PRIZE.load(),
),
)


def create(a, b, c):
return logicsig(*map(lambda x: int(str(x)), (a, b, c)))
Loading