@@ -16,7 +16,7 @@ module KMIR-SYNTAX
16
16
imports INT-SYNTAX
17
17
imports FLOAT-SYNTAX
18
18
19
- syntax KItem ::= #init( Pgm, Symbol )
19
+ syntax KItem ::= #init( Pgm )
20
20
21
21
////////////////////////////////////////////
22
22
// FIXME things below related to memory and
@@ -73,7 +73,7 @@ module KMIR-CONFIGURATION
73
73
locals:List) // return val, args, local variables
74
74
75
75
configuration <kmir>
76
- <k> #init($PGM:Pgm, symbol("main") ) </k>
76
+ <k> #init($PGM:Pgm) </k>
77
77
<retVal> NoValue </retVal>
78
78
<currentFunc> ty(-1) </currentFunc> // to retrieve caller
79
79
// unpacking the top frame to avoid frequent stack read/write operations
@@ -92,6 +92,7 @@ module KMIR-CONFIGURATION
92
92
// heap
93
93
<memory> .Map </memory> // FIXME unclear how to model
94
94
// FIXME where do we put the "GlobalAllocs"? in the heap, presumably?
95
+ <start-symbol> $STARTSYM:String </start-symbol>
95
96
</kmir>
96
97
endmodule
97
98
```
@@ -116,11 +117,12 @@ function map and the initial memory have to be set up.
116
117
117
118
``` k
118
119
// #init step, assuming a singleton in the K cell
119
- rule <k> #init(_Name:Symbol _Allocs:GlobalAllocs Functions:FunctionNames Items:MonoItems, FuncName )
120
+ rule <k> #init(_Name:Symbol _Allocs:GlobalAllocs Functions:FunctionNames Items:MonoItems)
120
121
=>
121
- #execFunction(#findItem(Items, FuncName), Functions)
122
+ #execFunction(#findItem(Items, symbol( FuncName) ), Functions)
122
123
</k>
123
124
<functions> _ => #mkFunctionMap(Functions, Items) </functions>
125
+ <start-symbol> FuncName </start-symbol>
124
126
```
125
127
126
128
The ` Map ` of ` functions ` is constructed from the lookup table of ` FunctionNames ` ,
0 commit comments