summaryrefslogtreecommitdiff
path: root/fp2/week45/mart/RefactorX.dcl
blob: 393c097d543ce46189e1fd4f15e7415d69d9d6b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Mart Lubbers s4109503, Camil Staps s4498062

definition module RefactorX

from StdClass import class toString
import StdEnv

:: Expr = NR Int | VAR Name | OP Expr Operator Expr | LET Name Expr Expr
:: Name :== String
:: Operator = PLUS | MIN | MUL | DIV
:: Val = Result Int | Undef


instance toString Expr
free :: Expr -> [Name]
remove_unused_lets :: Expr -> Expr
eval :: Expr -> Val