mirror of
https://github.com/ProgramSnail/pass_strategy_synthesis.git
synced 2026-04-30 17:52:41 +00:00
structures: context initialization in analyzer
This commit is contained in:
parent
1d28d01c17
commit
1c7f676a54
2 changed files with 23 additions and 2 deletions
|
|
@ -756,7 +756,7 @@ $s in stmt, f in X, x in X, a in X$
|
|||
// expect well typed program
|
||||
|
||||
$vals, mu texpre e eqmu v$,
|
||||
$types texprt e : t'$,
|
||||
// $types texprt e : t'$,
|
||||
$mu xarrowSquiggly(v)_#[add] cl l, mu' cr$,
|
||||
|
||||
$cl types, vals, mu cr xarrowSquiggly("var" x : t = e)_init cl types[x <- t], vals[x <- l], mu' cr$
|
||||
|
|
@ -770,9 +770,11 @@ $s in stmt, f in X, x in X, a in X$
|
|||
rule(
|
||||
name: [ add function declaration],
|
||||
|
||||
$mu xarrowSquiggly(lambda space [[x_1, ... x_n] s])_#[add] cl l, mu' cr$,
|
||||
|
||||
$cl types, vals, mu cr
|
||||
xarrowSquiggly("fun" f (x_1 space : space m_1 t_1, ... space x_n space : space m_n t_n) space = space s)_init
|
||||
cl types[f <- lambda space [t_1, ... t_n]], vals[f <- lambda space [[x_1, ... x_n] s], mu cr$
|
||||
cl types[f <- lambda space [t_1, ... t_n]], vals[f <- l], mu' cr$
|
||||
)
|
||||
))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue