Пример #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
from pytropos.libs_checking.numpy import *

exitcode = 1

store = {
    'np': numpy_module,
    'c': pv.Top,
    '_': pv.Top,
    'a': PythonValue(NdArray(pv.tuple(pv.int(2), pv.int()))),
    'nonexistent': PythonValue(BuiltinModule()),
    'b': PythonValue(Tuple((pv.int(2), pv.int()), size=(2, 2))),
}
Пример #2
0
def ndarray_(*lst):
    return PythonValue(NdArray(pv.tuple(*(pv.int(i) for i in lst))))
Пример #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
from pytropos.libs_checking.numpy import *

exitcode = 0

store = {
    'np': numpy_module,
    'arr': PythonValue(NdArray(pv.tuple(pv.int(2), pv.int(4)))),
}
Пример #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 = {
    'np': numpy_module,
    'a': PythonValue(NdArray(pv.tuple(pv.int(12)))),
}
store = {
    'np':
    numpy_module,
    'm':
    pv.Top,
    'n':
    pv.Top,
    '_':
    pv.tuple(),
    '__':
    pv.tuple(pv.int(1)),
    'a':
    pv.tuple(pv.int(2)),
    'b_':
    PythonValue(NdArray(pv.tuple(pv.int(2), pv.int(3)))),
    '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':
Пример #6
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

store = {
    'np': numpy_module,
    'arr': PythonValue(NdArray(pv.tuple())),
}
Пример #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.wrappers import *
from pytropos.internals.values.python_values.python_values import PythonValue, PT
from pytropos.libs_checking.numpy import *

exitcode = 1


def to_pv_Tuple(*ints):
    return pv.tuple(*(pv.int(i) for i in ints))


store = {
    'np': numpy_module,
    'a': to_pv_Tuple(2, 3, 4),
    'b': PythonValue(Tuple.top()),
    'c': to_pv_Tuple(2, 2, 4),
    'd': to_pv_Tuple(7, 1, 8),
    'e': PythonValue(Tuple.top()),
    'f': to_pv_Tuple(5, 3, 1),

    # This shouldn't exists, with more precise NdArrays should be possible to dectect that
    # lists cannot be `mod` to floats
    'g': to_pv_Tuple(5, 1, 3),
    'h': to_pv_Tuple(5, 1, 3),
}
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


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


store = {
    'np': numpy_module,
    'Top': pv.Top,
    'NdArray': PythonValue(NdArrayAnnotation()),
    'a': pv.int(160),
    'b': pv.int(),
    'c': ndarray_(2),
}
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 = {
    'np': numpy_module,
    'nonexistent': PythonValue(BuiltinModule()),
    'a': PythonValue(NdArray(pv.tuple(pv.int(2), pv.int()))),
    'b': pv.Top,
    'c': pv.Top,
    'd': PythonValue(NdArray(pv.tuple())),
    'e': pv.Top,
    'f': PythonValue(NdArray(pv.tuple(pv.int(2), pv.int()))),
}
Пример #10
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

store = {
    'array': PythonValue(array),
    'zeros': PythonValue(zeros),
    'x': PythonValue(NdArray(pv.tuple(pv.int(3)))),
    'y': PythonValue(NdArray(pv.tuple(pv.int(2), pv.int(3), pv.int(4)))),
    'xn': pv.int(1),
    'yn': pv.int(3),
}
Пример #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))))


store = {
    'np': numpy_module,
    'a': ndarray_(10, 6),
    'm': pv.int(4),
    'n': pv.int(2),
    'b': ndarray_(3, 11),
    'res': PythonValue(NdArray.top()),
    'var': pv.bool(True),
}
Пример #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 = 1


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


store = {
    'zeros': PythonValue(zeros),
    'ones': PythonValue(ones),
    'Top': pv.Top,
    'NdArray': PythonValue(NdArrayAnnotation()),
    'a': PythonValue(NdArray.top()),
    'b': ndarray_(),
    'c': ndarray_(None),
    'd': ndarray_(None),
    'f': PythonValue(NdArray.top()),
    'g': PythonValue(NdArray.top()),
    'h': ndarray_(12, 1),
    'i': ndarray_(1, 2),
    'j': ndarray_(2, 3),
    'k': PythonValue(NdArray.top()),
    'l': ndarray_(2, 3, 1, 6),
    'm': PythonValue(NdArray.top()),
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

r = List([pv.int(21)], size=(1, 1))

store = {
  '_': PythonValue(PT.Top),
  'f': r.get_attrs()['append'],
  'r': PythonValue(r),
}
Пример #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
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)),
}
Пример #15
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 = {
    'np': numpy_module,
    'a': PythonValue(NdArray(pv.tuple(pv.int(1)))),
    'b': PythonValue(NdArray(pv.tuple(pv.int(2), pv.int(2)))),
    'c': PythonValue(NdArray(pv.tuple(pv.int(2), pv.int(2)))),
    '_': pv.Top,
}
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

t = pv.tuple(pv.int(2), pv.int())

store = {
  'np': numpy_module,
  'nonexistent': PythonValue(BuiltinModule()),
  'a': PythonValue(NdArray(t)),
  'b': t,
  'c': pv.Top,
  '_': pv.Top,
}