Skip to content

Latest commit

 

History

History

coq

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Refactoring the AST

  1. Remove mutual recursion where possible
  • Put env into its own module
  • Get rid of DeclarationStatements
  • make lvalue index have type nat, rather than Value [Ryan]
  1. Remove dependencies on Types AST
  • turn @optional annotations into a boolean in Parameter [Ryan]
  • remove Annotation from AST and only define it in OCaml [Ryan]
  • Types.Expression in Parameter default values [Ryan]
  1. Assert_* functions from Prog should be monadic functions in their own module [Molly]
  1. Get the OCaml to build with the current Coq AST [Ryan]
  • PPX annotations have to be added
  1. Fix representation of environments

  2. Use control-plane names for controllable entities

  3. Provide "arbitrary annotations" rather than having annotations and info on every syntax node.

    • Go from this:

      Inductive AST := | Add : AST -> AST -> AST | Var : string -> AST

    • To this:

      Inductive AST (X:Type) := | Add : X -> AST -> AST -> AST | Var : X -> string -> AST

    • then we have

      Definition AST_with_info := AST Info.t Definition AST_with_info_and_type := AST (Info.t * Typed.Type.t)

  4. Better names (e.g., Stat_BlockStatement should be StmtBlock and let's not mix CamelCase and underscore_separated_words) [Molly]

  5. Stratify types into 3 parts [Ryan]

  6. Make externs nominal [Ryan]

  7. Stratify values into 3 parts [Molly]

Refactoring the interpreter

  • Repair evaluator to handle indirect storage of packets
  • Parametrize over targets with typeclasses the way the OCaml version uses modules

Other things

  1. Don't bother with type syntactic equality functions, leave them to OCaml since they're only used in the typechecker
    • Maybe revisiting the typing of table entries can fix this
    • better representation for contents of tables?

Questions

  1. Can we avoid having info in our Coq code while still having it in OCaml