Esempio n. 1
0
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values.builtin_mutvalues import *
from pytropos.internals.values.python_values.wrappers import *
from pytropos.internals.values.python_values.python_values import PythonValue, PT

exitcode = 1

a = pv.list([pv.int(2), pv.int(12)])

store = {
    'a': a,
    '_': pv.Top,
    'b': a.val.get_attrs()['append'],
}
Esempio n. 2
0
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values import PythonValue as PV

exitcode = 0

store = {
    'either': pv.Top,
    'a': pv.list([]),
    'b': pv.int(),
    'c': pv.list([pv.int(2), pv.int(3)]),
}
Esempio n. 3
0
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values.builtin_mutvalues import *
from pytropos.internals.values.python_values.wrappers import *
from pytropos.internals.values.python_values.python_values import PythonValue, PT

exitcode = 1

b_ = pv.list([pv.float(5.0), pv.none()])
a = pv.list([pv.int(9), b_])
b_.val.children['index', 1] = a

store = {
    'a': a,
    'b': a.val.get_attrs()['append'],
    'c': b_.val.get_attrs()['append'],
}
Esempio n. 4
0
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values.builtin_mutvalues import *
from pytropos.internals.values.python_values.wrappers import *
from pytropos.internals.values.python_values.python_values import PythonValue, PT
from pytropos.libs_checking.numpy import *

exitcode = 1

store = {'_': pv.Top, 'a': pv.list([pv.int(2)])}
    'b':
    pv.tuple(pv.int(2), pv.int(3)),
    'c':
    pv.tuple(pv.int(2)),
    'd':
    pv.tuple(pv.int(2), pv.int(3)),
    # TODO(helq): fix np.array, 'e' should be the commented tuple below
    # 'e': PythonValue(Tuple([pv.int(2)], size=(1,3))),  # THIS IS THE RIGHT ANSWER
    'e':
    PythonValue(Tuple([pv.int(2)], size=(1, inf))),
    'f':
    pv.tuple(pv.int(3)),
    'g':
    PythonValue(Tuple([pv.int(2)], size=(1, inf))),
    'ls':
    pv.list([
        pv.list([pv.int(i) for i in [1, 2, 3, 4, 5]]),
        pv.list([pv.int(i) for i in [3, 4, 0, 0, 1]])
    ]),
    'h':
    pv.tuple(pv.int(3), pv.int(2), pv.int(5)),
    'i':
    PythonValue(Tuple([pv.int(3)], size=(1, inf))),
    'j':
    PythonValue(Tuple([pv.int(3)], size=(1, inf))),
    'k':
    PythonValue(Tuple([pv.int(1), pv.int(3)], size=(2, inf))),
    'l':
    pv.tuple(pv.int(2), pv.int(3)),
}
Esempio n. 6
0
import pytropos.internals.values as pv
from pytropos.internals.values.python_values import PythonValue as PV

exitcode = 1

store = {
    'a': PV.top(),
    'l': pv.list([PV.top(), pv.int(21), PV.top()]),
    'n': PV.top(),
    'm': PV.top(),
}
Esempio n. 7
0
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values.builtin_mutvalues import *
from pytropos.internals.values.python_values import PythonValue as PV

exitcode = 1

store = {
    '_': PV.top(),
    'a': PV(List([pv.list([PV(Int.top())]), PV.top()], size=(1, 2))),
    'b': PV(Int.top()),
    'c': PV(List([PV.top(), PV.top()])),
}
store['c'].val.children[('index', 1)] = store['a']
# similar to c[1] = a
Esempio n. 8
0
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values import PythonValue as PV

exitcode = 0

a = pv.list([None, pv.int(2)])
a.val.children['index', 0] = a

store = {
    'either': pv.int(),
    'a': a,
}
Esempio n. 9
0
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values.builtin_mutvalues import *
from pytropos.internals.values.python_values.wrappers import *
from pytropos.internals.values.python_values.python_values import PythonValue, PT

exitcode = 1

store = {
    'a': pv.list(),
    '_': pv.Top,
}
Esempio n. 10
0
def list_int(*lst):
    return pv.list([pv.int(i) for i in lst])
Esempio n. 11
0
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values.builtin_mutvalues import *
from pytropos.internals.values.python_values.wrappers import *
from pytropos.internals.values.python_values.python_values import PythonValue, PT
from pytropos.libs_checking.numpy import *

exitcode = 1


def ndarray_(*lst):
    return PythonValue(NdArray(pv.tuple(*(pv.int(i) for i in lst))))


def list_int(*lst):
    return pv.list([pv.int(i) for i in lst])


store = {
    'np': numpy_module,
    'lst': pv.list([list_int(1, 3, 4), list_int(2, 8, 9)]),
    'a': pv.int(6),
    'a_': pv.int(6),
    'b': pv.tuple(pv.int(2), pv.int(3)),
    'b_': pv.tuple(pv.int(2), pv.int(3)),
    'c': pv.int(2),
    'c_': pv.int(2),
    'd': pv.Top,
    'd_': pv.Top,
}
Esempio n. 12
0
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values.builtin_mutvalues import *
from pytropos.internals.values.python_values.wrappers import *
from pytropos.internals.values.python_values.python_values import PythonValue, PT
from pytropos.libs_checking.numpy import *

exitcode = 0

shape_l = pv.list([pv.int(i) for i in (2, 5, 8, 11, 14, 17, 20, 23, 26, 29)])
shape = pv.tuple(*[pv.int(i) for i in (2, 5, 8, 11, 14, 17, 20, 23, 26, 29)])

store = {
    'np': numpy_module,
    'shape': shape_l,
    'i': pv.int(10),
    'newarray': PythonValue(NdArray(shape)),
}
Esempio n. 13
0
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values.builtin_mutvalues import *
from pytropos.internals.values.python_values.wrappers import *
from pytropos.internals.values.python_values.python_values import PythonValue, PT

exitcode = 1

store = {
    'a': pv.list([pv.int(2), pv.float(3.0),
                  pv.tuple()]),
}
Esempio n. 14
0
import pytropos.internals.values as pv
from pytropos.internals.values.builtin_values import *
from pytropos.internals.values.python_values.builtin_mutvalues import *
from pytropos.internals.values.python_values.wrappers import *
from pytropos.internals.values.python_values.python_values import PythonValue, PT

exitcode = 1

store = {
  'p': pv.list(),
  'i': pv.int(10),
  'a': pv.Top
}