Examples of asAppl()


Examples of org.openquark.cal.compiler.Expression.asAppl()

        // Where e<n> are the argument expressions

        // Check for an application node spine, and count the number of arguments         
        Expression spineNode = e;    
        int nArguments = 0;            
        for (Expression.Appl applNode = e.asAppl (); applNode != null; applNode = spineNode.asAppl ())
        {
            if (applNode.getE2 () == null) {
                throw new IllegalArgumentException("Programming error. The argument 'e' is not a valid application node.");             
            }
           
View Full Code Here

Examples of org.openquark.cal.compiler.Expression.asAppl()

 
        Expression[] argumentExpressions = new Expression [nArguments];
        spineNode = e;
        for (int argN = nArguments - 1; argN >= 0; --argN)
        {
            Expression.Appl applNode = spineNode.asAppl();
            argumentExpressions[argN] = applNode.getE2 ();          
            spineNode = applNode.getE1 ();
        }
       
        return new ConstructorOpTuple (var, argumentExpressions);
View Full Code Here

Examples of org.openquark.cal.compiler.Expression.asAppl()

        boolean canIgnoreLaziness = canIgnoreLaziness(let.getDefn().getExpr(), variableContext);
        if (!canIgnoreLaziness) {
            // Check to see if the def is a call to a lifted var definition
            Expression defExpr = let.getDefn().getExpr();
            Expression.Var defVar = defExpr.asVar();
            if (defVar == null && defExpr.asAppl() != null) {
                Expression[] chain = appChain(defExpr.asAppl());
                defVar = chain[0].asVar();
            }
            if (defVar != null) {
                MachineFunction mf = module.getFunction(defVar.getName());
View Full Code Here

Examples of org.openquark.cal.compiler.Expression.asAppl()

        if (!canIgnoreLaziness) {
            // Check to see if the def is a call to a lifted var definition
            Expression defExpr = let.getDefn().getExpr();
            Expression.Var defVar = defExpr.asVar();
            if (defVar == null && defExpr.asAppl() != null) {
                Expression[] chain = appChain(defExpr.asAppl());
                defVar = chain[0].asVar();
            }
            if (defVar != null) {
                MachineFunction mf = module.getFunction(defVar.getName());
                if (mf != null && mf instanceof LECCLiftedLetVarMachineFunction) {
View Full Code Here

Examples of org.openquark.cal.compiler.Expression.asAppl()

                                                                      Scheme scheme,
                                                                      VariableContext variableContext) throws CodeGenerationException {
        Expression fsRoot = e;
        int diff = appChain.length - 1 - calledArity;
        for (int i = 0; i < diff; ++i) {
            fsRoot = fsRoot.asAppl().getE1();
        }

        ExpressionContextPair fsRootECP = null;
        if (scheme == Scheme.E_SCHEME || scheme == Scheme.R_SCHEME) {
            fsRootECP = genS_E(fsRoot, variableContext);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.