Examples of AdjunctSource


Examples of org.openquark.cal.compiler.AdjunctSource


    public void testInvalidCoercion_lecc ()  {
        if (leccCALServices != null) {
            CompilerMessageLogger logger = new MessageLogger();
            AdjunctSource as = new AdjunctSource.FromText("testRunTarget = jObjectToInteger (unsafeCoerce (1 :: Int));");
            EntryPoint entryPoint =
                leccCALServices.getCompiler().getEntryPoint(
                    as,
                    EntryPointSpec.make(QualifiedName.make(CALPlatformTestModuleNames.RuntimeRegression, "testRunTarget")),
                    CALPlatformTestModuleNames.RuntimeRegression,
View Full Code Here

Examples of org.openquark.cal.compiler.AdjunctSource

       
        // Create the adjunct source.
        SourceModel.Expr funcArg = SourceModel.Expr.makeBooleanValue(false);
        SourceModel.Expr funcExpr = SourceModel.Expr.makeGemCall(qualifiedDependeeFunctionName, funcArg);
       
        AdjunctSource source = new AdjunctSource.FromSourceModel(
                SourceModel.FunctionDefn.Algebraic.make(adjunctUnqualifiedName, Scope.PUBLIC, null, funcExpr));
       

        WorkspaceManager workspaceManager = leccCALServices.getWorkspaceManager();
        CompilerMessageLogger logger = new MessageLogger();
View Full Code Here

Examples of org.openquark.cal.compiler.AdjunctSource

     * @param moduleName the name of the module in which the graph exists
     * @param typeChecker TypeChecker the type checker to use to generate the type
     * @return TypeExpr a new TypeExpr for the target sc.
     */
    protected static final TypeExpr getNewTargetTypeExpr(Target target, ModuleName moduleName, TypeChecker typeChecker) {
        AdjunctSource scDefinition = target.getTargetDef(null, typeChecker.getTypeCheckInfo(moduleName).getModuleTypeInfo());
        CompilerMessageLogger logger = new MessageLogger ();
        return typeChecker.checkFunction(scDefinition, moduleName, logger);
    }
View Full Code Here

Examples of org.openquark.cal.compiler.AdjunctSource

        if (inputPolicies == null) {
            inputPolicies = new InputPolicy[0];
        }
        // Get supercombinator defined at the current target and its name
        ModuleTypeInfo currentModuleTypeInfo = getWorkspaceManager().getWorkspace().getMetaModule(getTargetModule()).getTypeInfo();
        AdjunctSource scDef = target.getTargetDef(null, currentModuleTypeInfo);

        CompilerMessageLogger logger = new MessageLogger ();
        TypeExpr targetTypeExpr = getTypeChecker().checkFunction(scDef, targetModule, logger);
       
        if (targetTypeExpr == null) {
View Full Code Here

Examples of org.openquark.cal.compiler.AdjunctSource

            return false;
        }
       
        Target expressionTarget = new Target.SimpleTarget(expressionSourceModel);
        ModuleName expressionModule = expression.getModuleContext();
        AdjunctSource expressionDef = expressionTarget.getTargetDef(null, owner.getTypeChecker().getTypeCheckInfo(expressionModule).getModuleTypeInfo());
       
        TypeExpr resultType = owner.getTypeChecker().checkFunction(expressionDef, expressionModule, messageLogger);

        if (resultType == null) {
            // The type checker couldn't figure out the type.
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.