Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
remyhaemmerle-da committed Nov 24, 2021
1 parent 0d922c8 commit ea3000e
Showing 1 changed file with 28 additions and 25 deletions.
53 changes: 28 additions & 25 deletions daml-lf/spec/daml-lf-1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ Then we define *well-formed expressions*. ::
——————————————————————————————————————————————————————————————— ExpFromAnyException [Daml-LF ≥ 1.14]
Γ ⊢ 'from_any_exception' @τ e : 'Optional' τ

τ ↠ τ' Γ ⊢ τ' : ⋆ Γ ⊢ e : τ'
τ ↠ τ' Γ ⊢ τ' : ⋆ Γ ⊢ e : τ'
——————————————————————————————————————————————————————————————— UpdPure
Γ ⊢ 'pure' @τ e : 'Update' τ'

Expand Down Expand Up @@ -1297,7 +1297,7 @@ Then we define *well-formed expressions*. ::

Γ ⊢ τ : ⋆ Γ ⊢ e : τ
——————————————————————————————————————————————————————————————— ScnPure
Γ ⊢ 'spure' e : 'Scenario' τ
Γ ⊢ 'spure' e : 'Scenario' τ

τ₁ ↠ τ₁' Γ ⊢ τ₁' : ⋆ Γ ⊢ e₁ : 'Scenario' τ₁'
x₁ : τ₁' · Γ ⊢ e₂ : 'Scenario' τ₂
Expand Down Expand Up @@ -1929,7 +1929,7 @@ need to be evaluated further. ::
Update Values │ ⊢ᵥᵤ u │
└────────┘

ᵥᵤ e
e
——————————————————————————————————————————————————— ValUpdatePure
⊢ᵥᵤ 'pure' @τ e

Expand Down Expand Up @@ -2794,7 +2794,7 @@ as described by the ledger model::
└──────────────┘

—————————————————————————————————————————————————————————————————————— EvUpdPure
'pure' v ‖ (st, keys) ⇓ᵤ (Ok v, ε) ‖ (st, keys)
'pure' v ‖ (st, keys) ⇓ᵤ (Ok v, ε) ‖ (st, keys)

u₁ ‖ S₀ ⇓ᵤ (Err E, tr)
—————————————————————————————————————————————————————————————————————— EvUpdBindErr1
Expand Down Expand Up @@ -2973,17 +2973,7 @@ as described by the ledger model::
'tpl' (x : T)
↦ { 'choices' { …, 'choice' ChKind Ch (y : 'ContractId' Mod:T) (z : τ) : σ 'by' eₚ 'observers' eₒ ↦ eₐ, … }, … } ∈ 〚Ξ〛Mod
cid ∈ dom(st₀)
st(cid) = (Mod':T', vₜ, 'inactive')
Mod:T ≠ Mod':T'
—————————————————————————————————————————————————————————————————————— EvUpdExercWrongTemplate
'exercise' Mod:T.Ch cid v₁ ‖ (st; keys₀)
⇓ᵤ
(Err (Fatal "Exercise on contract of wrong template"), ε)

'tpl' (x : T)
↦ { 'choices' { …, 'choice' ChKind Ch (y : 'ContractId' Mod:T) (z : τ) : σ 'by' eₚ 'observers' eₒ ↦ eₐ, … }, … } ∈ 〚Ξ〛Mod
cid ∈ dom(st₀)
st₀(cid) = (Mod:T, vₜ, 'inactive')
st₀(cid) = (Mod':T', vₜ, 'inactive')
—————————————————————————————————————————————————————————————————————— EvUpdExercInactive
'exercise' Mod:T.Ch cid v₁ ‖ (st₀; keys₀)
⇓ᵤ
Expand All @@ -2992,15 +2982,15 @@ as described by the ledger model::
'tpl' (x : T)
↦ { 'choices' { …, 'choice' ChKind Ch (y : 'ContractId' Mod:T) (z : τ) : σ 'by' eₚ 'observers' eₒ ↦ eₐ, … }, … } ∈ 〚Ξ〛Mod
cid ∈ dom(st₀)
st₀(cid) = (Mod:T, vₜ, 'active')
st₀(cid) = (Mod':T', vₜ, 'active')
eₚ[x ↦ vₜ, z ↦ v₁] ⇓ Err E
—————————————————————————————————————————————————————————————————————— EvUpdExercActorEvalErr
'exercise' Mod:T.Ch cid v₁ ‖ (st₀, keys₀) ⇓ᵤ (Err E, ε)

'tpl' (x : T)
↦ { 'choices' { …, 'choice' ChKind Ch (y : 'ContractId' Mod:T) (z : τ) : σ 'by' eₚ 'observers' eₒ ↦ …, … }, … } ∈ 〚Ξ〛Mod
cid ∈ dom(st₀)
st₀(cid) = (Mod:T, vₜ, 'active')
st₀(cid) = (Mod':T', vₜ, 'active')
eₚ[x ↦ vₜ, z ↦ v₁] ⇓ Ok vₚ
eₒ[x ↦ vₜ, z ↦ v₁] ⇓ Err E
—————————————————————————————————————————————————————————————————————— EvUpdExercObserversErr
Expand All @@ -3011,7 +3001,7 @@ as described by the ledger model::
'tpl' (x : T)
↦ { 'choices' { …, 'choice' ChKind Ch (y : 'ContractId' Mod:T) (z : τ) : σ 'by' eₚ 'observers' eₒ ↦ eₐ, … }, … } ∈ 〚Ξ〛Mod
cid ∈ dom(st₀)
st₀(cid) = (Mod:T, vₜ, 'active')
st₀(cid) = (Mod':T', vₜ, 'active')
eₚ[x ↦ vₜ, z ↦ v₁] ⇓ Ok vₚ
eₒ[x ↦ vₜ, z ↦ v₁] ⇓ Ok vₒ
|v₁| > 100
Expand All @@ -3020,6 +3010,19 @@ as described by the ledger model::
⇓ᵤ
(Err (Fatal "Value exceeds maximum nesting value"), ε)

'tpl' (x : T)
↦ { 'choices' { …, 'choice' ChKind Ch (y : 'ContractId' Mod:T) (z : τ) : σ 'by' eₚ 'observers' eₒ ↦ eₐ, … }, … } ∈ 〚Ξ〛Mod
cid ∈ dom(st₀)
st₀(cid) = (Mod':T', vₜ, 'active')
eₚ[x ↦ vₜ, z ↦ v₁] ⇓ Ok vₚ
eₒ[x ↦ vₜ, z ↦ v₁] ⇓ Ok vₒ
|v₁| ≤ 100
Mod:T ≠ Mod':T'
—————————————————————————————————————————————————————————————————————— EvUpdExercWrongTemplate
'exercise' Mod:T.Ch cid v₁ ‖ (st; keys₀)
⇓ᵤ
(Err (Fatal "Exercise on contract of wrong template"), ε)

'tpl' (x : T)
↦ { 'choices' { …, 'choice' ChKind Ch (y : 'ContractId' Mod:T) (z : τ) : σ 'by' eₚ 'observers' eₒ ↦ eₐ, … }, … } ∈ 〚Ξ〛Mod
cid ∈ dom(st₀)
Expand Down Expand Up @@ -3134,20 +3137,20 @@ as described by the ledger model::

'tpl' (x : T) ↦ … ∈ 〚Ξ〛Mod
cid ∈ dom(st)
st(cid) = (Mod':T', vₜ, 'inactive')
Mod:T ≠ Mod':T'
—————————————————————————————————————————————————————————————————————— EvUpdFetchWrongTemplate
st(cid) = (Mod:T', vₜ, 'inactive')
—————————————————————————————————————————————————————————————————————— EvUpdFetchInactive
'fetch' @Mod:T cid ‖ (st; keys)
⇓ᵤ
(Err (Fatal "Fetch on contract of wrong template"), ε)
(Err (Fatal "Fetch on inactive contract"), ε)

'tpl' (x : T) ↦ … ∈ 〚Ξ〛Mod
cid ∈ dom(st)
st(cid) = (Mod:T, vₜ, 'inactive')
—————————————————————————————————————————————————————————————————————— EvUpdFetchInactive
st(cid) = (Mod':T', vₜ, 'inactive')
Mod:T ≠ Mod':T'
—————————————————————————————————————————————————————————————————————— EvUpdFetchWrongTemplate
'fetch' @Mod:T cid ‖ (st; keys)
⇓ᵤ
(Err (Fatal "Fetch on inactive contract"), ε)
(Err (Fatal "Fetch on contract of wrong template"), ε)

'tpl' (x : T) ↦ … ∈ 〚Ξ〛Mod
cid ∈ dom(st)
Expand Down

0 comments on commit ea3000e

Please sign in to comment.