-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Structured Contracts Framework #657
base: master
Are you sure you want to change the base?
Conversation
The CI failure here is because you don't import the newly added file anywhere. You can just add them to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this needs to be a literate Agda file, unless you want it to go into an appendix of the spec.
∙ (Γ , tx , u) ~ᵉ (tt , i′) | ||
∙ u ~ˢ s | ||
──────────────────────────────── | ||
∃ λ s′ → u′ ~ˢ s′ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
∃ λ s′ → u′ ~ˢ s′ | |
∃[ s′ ] u′ ~ˢ s′ |
You may need a parenthesis as well, I'm not sure.
|
||
-- only for PlutusV3 | ||
_~ᵉ_ : LEnv × Tx × LState → ⊤ × I → Type | ||
_~ᵉ_ = λ (le , tx , u) (tt , i) → πⁱ (txInfo PlutusV3 (le .LEnv.pparams) (u .LState.utxoSt .UTxOState.utxo) tx) ≡ i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_~ᵉ_ = λ (le , tx , u) (tt , i) → πⁱ (txInfo PlutusV3 (le .LEnv.pparams) (u .LState.utxoSt .UTxOState.utxo) tx) ≡ i | |
(le , tx , u) ~ᵉ (tt , i) = πⁱ (txInfo PlutusV3 (le .LEnv.pparams) (u .LState.utxoSt .UTxOState.utxo) tx) ≡ i |
field | ||
πˢ : LState → Maybe S | ||
πⁱ : TxInfo → I | ||
extraAssmp : LEnv → LState → Tx → Type -- extra assumptions about ledger state, env, and transaction that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is incomplete
open import Ledger.ScriptValidation txs abs | ||
open import Ledger.Utxo txs abs | ||
\end{code} | ||
-- open import Prelude hiding (id; _~ˢ_; _~ᵉ_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-- open import Prelude hiding (id; _~ˢ_; _~ᵉ_) |
simulates : ∀ Γ s u tx i′ u′ → extraAssmp Γ u tx → | ||
∙ Γ ⊢ u ⇀⦇ tx ,LEDGER⦈ u′ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simulates : ∀ Γ s u tx i′ u′ → extraAssmp Γ u tx → | |
∙ Γ ⊢ u ⇀⦇ tx ,LEDGER⦈ u′ | |
simulates : ∀ Γ s u tx i′ u′ → | |
∙ extraAssmp Γ u tx | |
∙ Γ ⊢ u ⇀⦇ tx ,LEDGER⦈ u′ |
Description
Adding the Structured Contracts framework for smart contract (and possibly ledger behaviour) verification. For full discussion of framework, see the paper
Checklist
CHANGELOG.md