tschrijv / AutBound

Code voor Abstract Syntax Tree Code Generator for Haskell-based Com- and Transpilers
1 stars 0 forks source link

String representation of xyzVarReplace and xyzabcSubstitute contains calls to non existent functions #13

Closed LorenNuyts closed 4 years ago

LorenNuyts commented 4 years ago

The string representation of the functions xyzVarReplace and xyzabcSubstitute contains function calls to non existent functions. These non existent functions are freeVariablescde and cdeVarReplace, they aren't created because cde doesn't have access to variables. A concrete example where the bug occurs:

namespace TermVar: Term

sort Term
    inh ctx TermVar
    | Var (x@ctx)
    | Lam (ty: Type) (t: Term) [x: TermVar]
        t.ctx = lhs.ctx, x
    | App (t1: Term) (t2: Term)
    | TmTrue
    | TmFalse
    | TmIf (t1: Term) (t2: Term) (t3: Term)

sort Type
    | TyBool
    | TyFunc (dom: Type) (codom: Type)

The string representation of this specifications contains the above mentioned problem and doesn't compile.