No description
Find a file
2024-04-21 18:00:12 +03:00
include better test formatting, etc. 2024-04-21 18:00:12 +03:00
src better test formatting, etc. 2024-04-21 18:00:12 +03:00
tests typecheck (without modes), unique mode 2024-04-21 14:09:38 +03:00
.gitignore day1 progress: typecheck template, mode check for unique 2024-04-21 07:33:23 +03:00
CMakeLists.txt typecheck (without modes), unique mode 2024-04-21 14:09:38 +03:00
compile_commands.json day1 progress: typecheck template, mode check for unique 2024-04-21 07:33:23 +03:00
README.md typecheck with modes done, better testing organizations 2024-04-21 16:54:20 +03:00

Check of modes correctness

Info

https://blog.janestreet.com/oxidizing-ocaml-locality/

https://blog.janestreet.com/oxidizing-ocaml-ownership/

  • locality: global (default) or local (value should not be passed out of context, can be allocated on stach)

  • uniqueness: shared (default), unique (used only once, consumed), exclusive (used only once in the same time)

  • linearity: many (default), once (result value can be used by caller only once), separated (result value can be used by caller only once in the same time)

Done

  • unique check +
  • exclusive check
  • local check
  • once check
  • separated check
  • type check +

Examples

  • unique: let f (unique x) = x * x in f;; -> error

bad design decisions:

  • shared_ptr instead of unique_ptr
  • using namespace std
  • use of indicies instead of visitor for std::variant

going to fix later (?)