nac3-spec/toy-impl
pca006132 3f4f23c0ab fix some variable inference 2020-12-23 15:39:39 +08:00
..
examples fixed type guard 2020-12-23 11:54:48 +08:00
README.md type guard 2020-12-23 11:22:17 +08:00
helper.py main script 2020-12-23 10:34:56 +08:00
inference.py type guard 2020-12-23 11:22:17 +08:00
inheritance.py fixed inheritance check 2020-12-23 13:43:34 +08:00
main.py fixed inheritance check 2020-12-23 13:43:34 +08:00
parse_expr.py fix some variable inference 2020-12-23 15:39:39 +08:00
parse_stmt.py fix some variable inference 2020-12-23 15:39:39 +08:00
primitives.py added len and range 2020-12-23 10:42:57 +08:00
test_expr.py added name clash check 2020-12-21 15:08:55 +08:00
test_inference.py fixed variables 2020-12-18 13:09:15 +08:00
test_stmt.py implemented basic statements 2020-12-22 15:14:34 +08:00
test_subst.py implementing function call check 2020-12-18 13:03:36 +08:00
test_top_level.py implementing function call check 2020-12-18 13:03:36 +08:00
top_level.py fix some variable inference 2020-12-23 15:39:39 +08:00
type_def.py fixed inheritance check 2020-12-23 13:43:34 +08:00

README.md

Toy Implementation

Currently the rough implementation is done, works remain are the code for checking a real python script, getting the type variables, some implementation details etc.

These features are considered in the proposal, but would not be implemented here for simplicity reasons:

  • Referencing Python Variables.
  • Most of the types, only the following types are implemented:
    • int32
    • int64
    • float
    • bool
    • list[T]
    • tuple[T1,...]
    • virtual[T]
  • Storing large constants as uint32, int64 or uint64.
  • AugAssign, a += b etc.
  • with, try except, etc.
  • const indexing with tuple.
  • method override check modulo variable renaming.
  • more complicated type guard

Type Check Implementation

Variable Scoping

Operator Override