EntryPointSpec addSpec = EntryPointSpec.make(QualifiedName.make(CAL_Prelude.MODULE_NAME, "add"), new InputPolicy[] {
InputPolicy.DEFAULT_INPUT_POLICY,
InputPolicy.DEFAULT_INPUT_POLICY
}, OutputPolicy.makeTypedCalValueOutputPolicy(SourceModel.TypeExprDefn.TypeCons.make(CAL_Prelude.TypeConstructors.Int)));
EntryPoint add = compiler.getEntryPoint(addSpec, CAL_Prelude.MODULE_NAME, messageLogger);
//this should output 3 as a CAL internal value
Object addResult = executor.exec(add, new Object[] { new Integer(1), new Integer(2) });
EntryPointSpec addSpec2 = EntryPointSpec.make(QualifiedName.make(CAL_Prelude.MODULE_NAME, "add"), new InputPolicy[] {
InputPolicy.makeTypedCalValueInputPolicy(SourceModel.TypeExprDefn.TypeCons.make(CAL_Prelude.TypeConstructors.Int)),
InputPolicy.INT_INPUT_POLICY
}, OutputPolicy.INT_OUTPUT_POLICY);
EntryPoint add2 = compiler.getEntryPoint(addSpec2, CAL_Prelude.MODULE_NAME, messageLogger);
//this should output 3 as a CAL internal value
Object add2Result = executor.exec(add2, new Object[] { addResult, new Integer(2) });