neurolang.type_system package

Implementation of the type system based on Siek and Vachharajani, “Gradual Typing with Unification-based Inference”, DLS 2008.

exception neurolang.type_system.NeuroLangTypeException

Bases: NeuroLangException

class neurolang.type_system.Unknown

Bases: _Final, _Immutable

Special type indicating an unknown type.

  • Unknown is compatible with every type.

  • Unknown is less informative than all types.

Methods

__call__(*args, **kwds)

Call self as a function.

neurolang.type_system.get_args(type_)
neurolang.type_system.get_generic_type(typ)
neurolang.type_system.infer_type(value, deep=False, recursive_callback=None)
neurolang.type_system.infer_type_builtins(builtin)
neurolang.type_system.infer_type_iterables(value, deep=True, recursive_callback=<function infer_type>)
neurolang.type_system.infer_type_mapping(value, deep=True, recursive_callback=<function infer_type>)
neurolang.type_system.is_consistent(type1, type2)
neurolang.type_system.is_leq_informative(left, right)
neurolang.type_system.is_leq_informative_parameterized_right(left, right)
neurolang.type_system.is_leq_informative_union(left, right)
neurolang.type_system.is_parameterized(type_)
neurolang.type_system.is_parametrical(type_)
neurolang.type_system.is_type(type_)
neurolang.type_system.replace_type_variable(type_, type_hint, type_var=None)
neurolang.type_system.replace_type_variable_fix_python36_37(type_hint, new_args)
neurolang.type_system.typing_callable_from_annotated_function(function)

Get typing.Callable type representing the annotated function type.

neurolang.type_system.unify_types(t1, t2)

Subpackages