lthms / FreeSpec

A framework for implementing and certifying impure computations in Coq

Home Page:https://lthms.github.io/FreeSpec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A useless test?

yurug opened this issue · comments

Well, before this test, the type of the instruction is unknown. Currently, the Console.i is the sole and only instruction that we support, so if the type of the instruction is different, we can raise an exception accordingly. In the future, we will hopefully change that state of things, and probably have some kind of map to associate type of interfaces with collection of effects semantics.

I guess we could only look at the constructor, but it felt more natural to start from the type first.

I slept on this question, and I think it might be less surprising if the code was presented slightly differently, something like (in pseudo-code)

match instr_type with
| Console_I_constant => console_i_handlers instr_term
| _ => raise NotYetSupported

Would that make it more straightforward for you?

This will be solved by modifying FreeSpec.Exec in order to be more extensible.