Java & Lambda: a Featherweight Story
We present FJ&$\lambda$, a new core calculus that extends Featherweight Java (FJ) with interfaces, supporting multiple inheritance in a restricted form, $\lambda$-expressions, and intersection types. Our main goal is to formalise how lambdas and intersection types are grafted on Java 8, by study...
Gespeichert in:
| Veröffentlicht in: | Logical methods in computer science Jg. 14, Issue 3 |
|---|---|
| Hauptverfasser: | , , , , |
| Format: | Journal Article |
| Sprache: | Englisch |
| Veröffentlicht: |
Logical Methods in Computer Science e.V
05.09.2018
|
| Schlagworte: | |
| ISSN: | 1860-5974, 1860-5974 |
| Online-Zugang: | Volltext |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| Abstract | We present FJ&$\lambda$, a new core calculus that extends Featherweight Java (FJ) with interfaces, supporting multiple inheritance in a restricted form, $\lambda$-expressions, and intersection types. Our main goal is to formalise how lambdas and intersection types are grafted on Java 8, by studying their properties in a formal setting. We show how intersection types play a significant role in several cases, in particular in the typecast of a $\lambda$-expression and in the typing of conditional expressions. We also embody interface \emph{default methods} in FJ&$\lambda$, since they increase the dynamism of $\lambda$-expressions, by allowing these methods to be called on $\lambda$-expressions. The crucial point in Java 8 and in our calculus is that $\lambda$-expressions can have various types according to the context requirements (target types): indeed, Java code does not compile when $\lambda$-expressions come without target types. In particular, in the operational semantics we must record target types by decorating $\lambda$-expressions, otherwise they would be lost in the runtime expressions. We prove the subject reduction property and progress for the resulting calculus, and we give a type inference algorithm that returns the type of a given program if it is well typed. The design of FJ&$\lambda$ has been driven by the aim of making it a subset of Java 8, while preserving the elegance and compactness of FJ. Indeed, FJ&$\lambda$ programs are typed and behave the same as Java programs. |
|---|---|
| AbstractList | We present FJ&$\lambda$, a new core calculus that extends Featherweight Java (FJ) with interfaces, supporting multiple inheritance in a restricted form, $\lambda$-expressions, and intersection types. Our main goal is to formalise how lambdas and intersection types are grafted on Java 8, by studying their properties in a formal setting. We show how intersection types play a significant role in several cases, in particular in the typecast of a $\lambda$-expression and in the typing of conditional expressions. We also embody interface \emph{default methods} in FJ&$\lambda$, since they increase the dynamism of $\lambda$-expressions, by allowing these methods to be called on $\lambda$-expressions. The crucial point in Java 8 and in our calculus is that $\lambda$-expressions can have various types according to the context requirements (target types): indeed, Java code does not compile when $\lambda$-expressions come without target types. In particular, in the operational semantics we must record target types by decorating $\lambda$-expressions, otherwise they would be lost in the runtime expressions. We prove the subject reduction property and progress for the resulting calculus, and we give a type inference algorithm that returns the type of a given program if it is well typed. The design of FJ&$\lambda$ has been driven by the aim of making it a subset of Java 8, while preserving the elegance and compactness of FJ. Indeed, FJ&$\lambda$ programs are typed and behave the same as Java programs. |
| Author | Bono, Viviana Giannini, Paola Bettini, Lorenzo Dezani-Ciancaglini, Mariangiola Venneri, Betti |
| Author_xml | – sequence: 1 givenname: Lorenzo orcidid: 0000-0002-4481-8096 surname: Bettini fullname: Bettini, Lorenzo – sequence: 2 givenname: Viviana orcidid: 0000-0002-2533-0511 surname: Bono fullname: Bono, Viviana – sequence: 3 givenname: Mariangiola orcidid: 0000-0002-3341-0941 surname: Dezani-Ciancaglini fullname: Dezani-Ciancaglini, Mariangiola – sequence: 4 givenname: Paola orcidid: 0000-0003-2239-9529 surname: Giannini fullname: Giannini, Paola – sequence: 5 givenname: Betti orcidid: 0000-0001-6458-0305 surname: Venneri fullname: Venneri, Betti |
| BookMark | eNpNkDtLA0EUhQeJYIz5A1ZbiGixOq-dRzoJRiMrFtF6uDNzN9mQZGV2UfLvzUPE05zDKb7iOye9TbNBQi4ZveNCCXNfvo5nOZM3YsT0LafMnJA-M4rmhdWy92-fkWHbLukuQjDDVZ9cvcAXZNdZCWsfYZRBNkHoFpi-sZ4vumzWNWl7QU4rWLU4_O0B-Zg8vo-f8_LtaTp-KPMgqOlyy7miylcStY4ehS-kZxopVqIwWChgBVUUtQhRR2Q6RDBSVcYbsFFBEAMyPXJjA0v3meo1pK1roHaHo0lzB6mrwwqdCCpIUJprWslKG6-tsBYBuY0MC7pj8SMrpKZtE1Z_PEbdQZvba3NMOuGYdntt4gd831_d |
| ContentType | Journal Article |
| DBID | AAYXX CITATION DOA |
| DOI | 10.23638/LMCS-14(3:17)2018 |
| DatabaseName | CrossRef DOAJ Directory of Open Access Journals |
| DatabaseTitle | CrossRef |
| DatabaseTitleList | CrossRef |
| Database_xml | – sequence: 1 dbid: DOA name: DOAJ Directory of Open Access Journals url: https://www.doaj.org/ sourceTypes: Open Website |
| DeliveryMethod | fulltext_linktorsrc |
| Discipline | Computer Science |
| EISSN | 1860-5974 |
| ExternalDocumentID | oai_doaj_org_article_3c6c4a67270f4f78b79399eae29d1e50 10_23638_LMCS_14_3_17_2018 |
| GroupedDBID | .4S .DC 29L 2WC 5GY 5VS AAFWJ AAYXX ADBBV ADMLS ADQAK AENEX AFPKN ALMA_UNASSIGNED_HOLDINGS ARCSS BCNDV CITATION EBS EJD FRP GROUPED_DOAJ J9A KQ8 MK~ ML~ M~E OK1 OVT P2P TR2 TUS XSB |
| ID | FETCH-LOGICAL-c308t-922606bf4e77dbe3b54b17e0ef358e56a15060e73cd7de17cda846f8b8a9d6ac3 |
| IEDL.DBID | DOA |
| ISICitedReferencesCount | 6 |
| ISICitedReferencesURI | http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=000450660200016&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| ISSN | 1860-5974 |
| IngestDate | Fri Oct 03 12:54:03 EDT 2025 Sat Nov 29 08:04:21 EST 2025 |
| IsDoiOpenAccess | true |
| IsOpenAccess | true |
| IsPeerReviewed | true |
| IsScholarly | true |
| Language | English |
| License | https://creativecommons.org/licenses/by/4.0 |
| LinkModel | DirectLink |
| MergedId | FETCHMERGED-LOGICAL-c308t-922606bf4e77dbe3b54b17e0ef358e56a15060e73cd7de17cda846f8b8a9d6ac3 |
| ORCID | 0000-0002-2533-0511 0000-0003-2239-9529 0000-0002-4481-8096 0000-0002-3341-0941 0000-0001-6458-0305 |
| OpenAccessLink | https://doaj.org/article/3c6c4a67270f4f78b79399eae29d1e50 |
| ParticipantIDs | doaj_primary_oai_doaj_org_article_3c6c4a67270f4f78b79399eae29d1e50 crossref_primary_10_23638_LMCS_14_3_17_2018 |
| PublicationCentury | 2000 |
| PublicationDate | 2018-09-05 |
| PublicationDateYYYYMMDD | 2018-09-05 |
| PublicationDate_xml | – month: 09 year: 2018 text: 2018-09-05 day: 05 |
| PublicationDecade | 2010 |
| PublicationTitle | Logical methods in computer science |
| PublicationYear | 2018 |
| Publisher | Logical Methods in Computer Science e.V |
| Publisher_xml | – name: Logical Methods in Computer Science e.V |
| SSID | ssj0000331826 |
| Score | 2.2948418 |
| Snippet | We present FJ&$\lambda$, a new core calculus that extends Featherweight Java (FJ) with interfaces, supporting multiple inheritance in a restricted form,... |
| SourceID | doaj crossref |
| SourceType | Open Website Index Database |
| SubjectTerms | 03b70, 03b15, 68q55 computer science - logic in computer science computer science - programming languages |
| Title | Java & Lambda: a Featherweight Story |
| URI | https://doaj.org/article/3c6c4a67270f4f78b79399eae29d1e50 |
| Volume | 14, Issue 3 |
| WOSCitedRecordID | wos000450660200016&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| hasFullText | 1 |
| inHoldings | 1 |
| isFullTextHit | |
| isPrint | |
| journalDatabaseRights | – providerCode: PRVAON databaseName: DOAJ Directory of Open Access Journals customDbUrl: eissn: 1860-5974 dateEnd: 99991231 omitProxy: false ssIdentifier: ssj0000331826 issn: 1860-5974 databaseCode: DOA dateStart: 20040101 isFulltext: true titleUrlDefault: https://www.doaj.org/ providerName: Directory of Open Access Journals – providerCode: PRVHPJ databaseName: ROAD: Directory of Open Access Scholarly Resources customDbUrl: eissn: 1860-5974 dateEnd: 99991231 omitProxy: false ssIdentifier: ssj0000331826 issn: 1860-5974 databaseCode: M~E dateStart: 20040101 isFulltext: true titleUrlDefault: https://road.issn.org providerName: ISSN International Centre |
| link | http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwrV1LSwMxEA5SPHjxLdYXi3hQJHSzyW52e9PSItKKUIXewiSZgAer1Fpv_naT7Cr15MXLHsISkm-SzDd5fEPIGQib6pwh1YUsqDAIVDteUFNxFGhTI5yLySbk3V05mVT3S6m-wp2wWh64Bq7DTWEEhPPC1AknS-0HVFUhYFZZhnW07lnPUjAV12DOA3GuX8lk3A-yznDUG1MmznmXyQvv9spfnmhJsD96lsEmWW8oYXJVN2WLrOB0m2x8p1tImtm3Q05vYQHJEJ61hW4CScPePuLmZjIOp-W75HHQf-jd0CbFATU8Lee08uwnLbQTKKXVyHUuNJOYouN5iXkBUQAQJTdWWmTSWPCEwZW6hMoWYPgeaU1fprhPkiyzNreCS6lBZC4DZsqMg9W2cMAla5PL7-6q11rJQvkIIIKjAjg-ClBcMakCOG1yHRD5-TOoUMcCbxvV2Eb9ZZuD_6jkkKyFBsV7XfkRac1n73hMVs1i_vQ2O4lm99_RZ_8L0cKxbQ |
| linkProvider | Directory of Open Access Journals |
| openUrl | ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Java+Lambda%3A+a+Featherweight+Story&rft.jtitle=Logical+methods+in+computer+science&rft.au=Lorenzo+Bettini&rft.au=Viviana+Bono&rft.au=Mariangiola+Dezani-Ciancaglini&rft.au=Paola+Giannini&rft.date=2018-09-05&rft.pub=Logical+Methods+in+Computer+Science+e.V&rft.eissn=1860-5974&rft.volume=14%2C+Issue+3&rft_id=info:doi/10.23638%2FLMCS-14%283%3A17%292018&rft.externalDBID=DOA&rft.externalDocID=oai_doaj_org_article_3c6c4a67270f4f78b79399eae29d1e50 |
| thumbnail_l | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/lc.gif&issn=1860-5974&client=summon |
| thumbnail_m | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/mc.gif&issn=1860-5974&client=summon |
| thumbnail_s | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/sc.gif&issn=1860-5974&client=summon |