Skip to content

Commit

Permalink
Initialize shell execution state and evaluate programs with it
Browse files Browse the repository at this point in the history
  • Loading branch information
Balletie committed Jun 2, 2016
1 parent 2acb488 commit eff57b9
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions simpl/trans/simpl.ds
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ imports
trans/runtime/runtime

signature
sorts
ShellInit

constructors
NumV: Int -> V
ShellInit : ShellInit

arrows
Exp --> V
Expand All @@ -20,7 +24,8 @@ signature
signature
arrows
Prog -init-> V
Prog -shell_init-> V
ShellInit -init-> Env
Prog -shell-> V
Shell -shell-> V

rules
Expand All @@ -29,9 +34,12 @@ rules
where
Env {} |- e :: Heap {} --> v :: Heap _.

Program(e) :: E -shell_init-> v
where
E |- e :: Heap {} --> v :: Heap _.
// Initialization of shell state: an empty environment and an empty heap.
ShellInit() -init-> {} :: Heap {}.

Program(e) :: E -shell-> v
where
E |- e :: Heap {} --> v :: Heap _.

Let(x, e) :: E -shell-> v :: E'
where
Expand Down

0 comments on commit eff57b9

Please sign in to comment.