From a3a8a44b4bc0d60164452826645066a5ffed5bc5 Mon Sep 17 00:00:00 2001 From: Chloe Brown Date: Wed, 28 Jul 2021 16:56:07 +0100 Subject: Complete Section 3 - Validation. --- src/Wasm/Validation/Context.agda | 63 +++++++++++ src/Wasm/Validation/Instructions.agda | 197 ++++++++++++++++++++++++++++++++++ src/Wasm/Validation/Modules.agda | 191 ++++++++++++++++++++++++++++++++ src/Wasm/Validation/Types.agda | 95 ++++++++++++++++ 4 files changed, 546 insertions(+) create mode 100644 src/Wasm/Validation/Context.agda create mode 100644 src/Wasm/Validation/Instructions.agda create mode 100644 src/Wasm/Validation/Modules.agda create mode 100644 src/Wasm/Validation/Types.agda (limited to 'src/Wasm') diff --git a/src/Wasm/Validation/Context.agda b/src/Wasm/Validation/Context.agda new file mode 100644 index 0000000..f7c2564 --- /dev/null +++ b/src/Wasm/Validation/Context.agda @@ -0,0 +1,63 @@ +{-# OPTIONS --without-K --safe #-} + +------------------------------------------------------------------------ +-- Type Context + +module Wasm.Validation.Context where + +open import Data.Fin using (Fin; toℕ; fromℕ<) +open import Data.List using (List; length; lookup) +open import Data.Maybe using (Maybe; just; nothing) +open import Data.Nat using (_