Package litil.tc

Examples of litil.tc.HMTypeChecker


        Program ast = p.program();

        System.out.println(ast.repr(1));

        ExplicitTypeChecker exTc = new ExplicitTypeChecker();
        HMTypeChecker hmTc = new HMTypeChecker();
        TypeScope tenv = trootScope().child();
        for (Instruction instr : ast.instructions) {
            System.out.println(instr.repr(0));

            System.out.println(":: " + hmTc.analyze(instr, tenv));
            System.out.println("--------------");
        }

        System.out.println(tenv);
View Full Code Here


public class BytecodeGen {
    public byte[] gen(Program p) {


        HMTypeChecker hm = new HMTypeChecker();
        TypeScope tenv = Prelude.trootScope().child();
        Names names = new Names();

        List<BcNode> bc = new ArrayList<BcNode>();
        for (Instruction inst : p.instructions) {
View Full Code Here

        if (tc) {
            System.out.println("Type checking ...");
            try {
                TypeScope typeEnv = trootScope().child();
                new HMTypeChecker().analyze(node, typeEnv);
                System.out.println("All is good");
            } catch (TypeError e) {
                System.err.println(e.getMessage());
                return;
            }
View Full Code Here

        AstNode node = parseFile("emb-list.ltl");
        System.out.println(node);
        System.out.println("=============");
        ev.dbgAp = false;
        TypeScope typeEnv = Prelude.trootScope().child();
        new HMTypeChecker().analyze(node, typeEnv);
        System.out.println("-------------------");
        System.out.println(typeEnv);
        ValScope valScope = Prelude.rootScope().child();
        System.out.println("--" + ev.eval(node, valScope));
        System.out.println(valScope);
View Full Code Here

TOP

Related Classes of litil.tc.HMTypeChecker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.