Bibliographic Details
| Title: |
SYSTEM AND METHOD FOR SUPPORTING COMPATIBILITY CHECKING FOR LAMBDA EXPRESSION |
| Document Number: |
20170147302 |
| Publication Date: |
May 25, 2017 |
| Appl. No: |
15/402319 |
| Application Filed: |
January 10, 2017 |
| Abstract: |
A system and method can support compatibility checking in a programming language environment. The programming language environment can check whether a target type associated with an expression in the programming language environment is functional, wherein the target type is functional when it has exactly one method meeting one or more criteria that define that method as relevant in a counting system. Then, the programming language environment can derive a function descriptor from the target type, which is context-dependent. Furthermore, the programming language environment can type-check the expression with the function descriptor associated with the target type. |
| Claim: |
1. A method for supporting compatibility checking in a programming language environment operating on one or more microprocessors, comprising: checking whether a target type associated with an expression in the programming language environment is functional, wherein the target type associated with the expression is context-dependent; deriving a function descriptor from the target type; and type-checking the expression with the function descriptor associated with the target type. |
| Claim: |
2. The method according to claim 1, further comprising: allowing the expression to be a lambda expression that provides a list of formal parameters and a body. |
| Claim: |
3. The method according to claim 2, further comprising: inferring one or more parameter types associated with the lambda expression. |
| Claim: |
4. The method according to claim 2 further comprising: type-checking the one or more parameter types with the function descriptor. |
| Claim: |
5. The method according to claim 2, further comprising: type-checking a return type of a body of the lambda expression with the function descriptor. |
| Claim: |
6. The method according to claim 2, further comprising: type-checking one or more exception types that can result from an execution a body of the lambda expression with the function descriptor. |
| Claim: |
7. The method according to claim 2, further comprising: allowing the lambda expression to appear in one of a assignment context, an invocation context, and a casting context. |
| Claim: |
8. The method according to claim 2, further comprising: inferring a natural parameterized type from a wildcard-parameterized functional interface type and the lambda expression. |
| Claim: |
9. A system for supporting compatibility checking in a programming language environment, comprising: one or more microprocessors; a compiler, running on the one or more microprocessors, that operates to perform the steps of: checking whether a target type associated with an expression in the programming language environment is functional, wherein the target type associated with the expression is context-dependent; deriving a function descriptor from the target type; and type-checking the expression with the function descriptor associated with the target type. |
| Claim: |
10. The system according to claim 9, wherein: allowing the expression to be a lambda expression that provides a list of formal parameters and a body. |
| Claim: |
11. The system according to claim 10, wherein: inferring one or more parameter types associated with the lambda expression. |
| Claim: |
12. The system according to claim 10 wherein: type-checking the one or more parameter types with the function descriptor. |
| Claim: |
13. The system according to claim 10, wherein: type-checking a return type of a body of the lambda expression with the function descriptor. |
| Claim: |
14. The system according to claim 10, wherein: type-checking one or more exception types that can result from an execution a body of the lambda expression with the function descriptor. |
| Claim: |
15. The method according to claim 10, wherein: allowing the lambda expression to appear in one of a assignment context, an invocation context, and a casting context. |
| Claim: |
16. The system according to claim 10, wherein: inferring a natural parameterized type from a wildcard-parameterized functional interface type and the lambda expression. |
| Claim: |
17. A non-transitory machine readable storage medium having instructions stored thereon that when executed cause a system to perform the steps comprising: checking whether a target type associated with an expression in the programming language environment is functional, wherein the target type associated with the expression is context-dependent; deriving a function descriptor from the target type; and type-checking the expression with the function descriptor associated with the target type. |
| Current International Class: |
06 |
| Accession Number: |
edspap.20170147302 |
| Database: |
USPTO Patent Applications |