Package org.openquark.cal.compiler.io

Examples of org.openquark.cal.compiler.io.EntryPoint


    private Object runCAF(QualifiedName funcName, BasicCALServices calServices, ExecutionContext context)
        throws CALExecutorException {
        CompilerMessageLogger ml = new MessageLogger ();

        // Compile it, indicating that this is an adjunct
        EntryPoint targetEntryPoint =
            calServices.getWorkspaceManager().getCompiler().getEntryPoint(
                EntryPointSpec.make(funcName), funcName.getModuleName(), ml);

        if (targetEntryPoint == null) {
            return null;
View Full Code Here


        if (test_lecc_machine) {
            WorkspaceManager workspaceManager = leccCALServices.getWorkspaceManager();
            Compiler compiler = leccCALServices.getCompiler();

            CompilerMessageLogger messageLogger = new MessageLogger();
            EntryPoint entryPoint = compiler.getEntryPoint(
                EntryPointSpec.make(QualifiedName.make(CALPlatformTestModuleNames.RuntimeRegression, "nonCAFEntryPoint")),
                CALPlatformTestModuleNames.RuntimeRegression, messageLogger);
            if (messageLogger.getNMessages() > 0) {
                System.err.println(messageLogger.toString());
            }
View Full Code Here

        if (test_g_machine) {
            WorkspaceManager workspaceManager = gCALServices.getWorkspaceManager();
            Compiler compiler = gCALServices.getCompiler();

            CompilerMessageLogger messageLogger = new MessageLogger();
            EntryPoint entryPoint = compiler.getEntryPoint(
                EntryPointSpec.make(QualifiedName.make(CALPlatformTestModuleNames.RuntimeRegression, "nonCAFEntryPoint")),
                CALPlatformTestModuleNames.RuntimeRegression, messageLogger);
            if (messageLogger.getNMessages() > 0) {
                System.err.println(messageLogger.toString());
            }
View Full Code Here

    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,
                    logger);
View Full Code Here

    private void help_testCAF_Cacheing (BasicCALServices calServices) throws CALExecutorException {
        CompilerMessageLogger ml = new MessageLogger ();

        // Compile it, indicating that this is an adjunct
        EntryPoint targetEntryPoint =
            calServices.getWorkspaceManager().getCompiler().getEntryPoint(
                EntryPointSpec.make(QualifiedName.make(CALPlatformTestModuleNames.RuntimeRegression, "getCallCountCAF")),
                CALPlatformTestModuleNames.RuntimeRegression, ml);

        if (targetEntryPoint == null) {
View Full Code Here

        ExecutionContextProperties.Builder propBuilder = new ExecutionContextProperties.Builder();
        propBuilder.setProperty("hook", hook);
        ExecutionContextProperties properties = propBuilder.toProperties();
        ExecutionContext executionContext = calServices.getWorkspaceManager().makeExecutionContext(properties);
       
        EntryPoint entryPoint = calServices.getCompiler().getEntryPoint(
            new AdjunctSource.FromText("private tempFunc = System.registerCleanable ((input (System.getProperty \"hook\")) :: Cleanable);"),
            EntryPointSpec.make(QualifiedName.make(CAL_System.MODULE_NAME, "tempFunc")),
            CAL_System.MODULE_NAME,
            new MessageLogger());
       
View Full Code Here

    private void help_testProgramEvaluatorEval_OutputPrimitiveArray(BasicCALServices calServices) throws CALExecutorException {
        String functionName = "tempFunc";
       
        CompilerMessageLogger logger = new MessageLogger();
       
        EntryPoint entryPoint = calServices.getCompiler().getEntryPoint(
            new AdjunctSource.FromSourceModel(SourceModel.FunctionDefn.Algebraic.make(
            functionName, Scope.PRIVATE, null,
            SourceModel.Expr.makeGemCall(CAL_Array.Functions.outputPrimitive,
                SourceModel.Expr.makeGemCall(CAL_Array.Functions.subscript,
                    SourceModel.Expr.makeGemCall(QualifiedName.make(CALPlatformTestModuleNames.Array_Tests, "multiDimArray")),
View Full Code Here

   
    private void help_testProgramEvaluatorEval_OutputNonPrimitiveArray(BasicCALServices calServices) throws CALExecutorException {
        String functionName = "tempFunc";
               
        CompilerMessageLogger logger = new MessageLogger();
        EntryPoint entryPoint = calServices.getCompiler().getEntryPoint(
            new AdjunctSource.FromSourceModel(
                SourceModel.FunctionDefn.Algebraic.make(
                    functionName, Scope.PRIVATE, null,
                    SourceModel.Expr.makeGemCall(CAL_Array.Functions.subscript,
                        SourceModel.Expr.makeGemCall(QualifiedName.make(CALPlatformTestModuleNames.Array_Tests, "multiDimArray")),
View Full Code Here

    /**
     * Tests the executor's handling of an entry point based on an enumeration data cons.
     * @throws CALExecutorException
     */
    public void testEnumDataConsEntryPoint() {
        final EntryPoint gt = new EntryPointImpl(CAL_Prelude.DataConstructors.GT);
        final CALExecutor executor = leccCALServices.getWorkspaceManager().makeExecutorWithNewContextAndDefaultProperties();
       
        try {
            executor.exec(gt, new Object[0]);
        } catch (CALExecutorException e) {
View Full Code Here

        if (cafName == null || cafName.length () == 0) {
            return;
        }
       
        CompilerMessageLogger logger = new MessageLogger();
        EntryPoint entryPoint = getCompiler().getEntryPoint(
            EntryPointSpec.make(EntryPointImpl.makeEntryPointName (cafName)), targetModule, logger);
        if (entryPoint == null) {
            iceLogger.log(Level.INFO, "CAL: Compilation unsuccessful because of errors:");
            dumpCompilerMessages(logger);
        }
View Full Code Here

TOP

Related Classes of org.openquark.cal.compiler.io.EntryPoint

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.