SlideShare a Scribd company logo
1 of 20
Download to read offline
Spotting automatically
cross-language relations

Federico Tomassetti (me)

Giuseppe Rizzo

Marco Torchiano
data.sql
CREATE TABLE Persons (
ID int,
FirstName varchar(255),
LastName varchar(255),
City varchar(255)
);

Person.java
String query = "select ID, FirstName, LastName, "
+ "City " + "from " + dbName
+ ".Persons";
try { ...
while (rs.next()) {
int id = rs.getInt("ID");
String firstName = rs.getString("FirstName");
String lastName = rs.getString("LastName");
String city= rs.getString("City");
} } catch (SQLException e ) {
......
}
data.sql
CREATE TABLE Persons (
ID int,
FirstName varchar(255),
LastName varchar(255),
City varchar(255)
);

Person.java
String query = "select ID, FirstName, LastName, "
+ "City " + "from " + dbName
+ ".Persons";
try { ...
while (rs.next()) {
int id = rs.getInt("ID");
String firstName = rs.getString("FirstName");
String lastName = rs.getString("LastName");
String city= rs.getString("City");
} } catch (SQLException e ) {

(Hopefully it does not happen)
}
…the complexive system, works, sometimes
If we would automatically identify
cross-language relations we could:
• Recognize them
So I am aware that this ID is
related to something else
• Support refactoring
• Validate them
• Navigate them
If we would automatically identify
cross-language relations we could:
• Recognize them
• Support refactoring
If I change one, the others are
updated
• Validate them
• Navigate them
If we would automatically identify
cross-language relations we could:
• Recognize them
• Support refactoring
• Validate them
See broken relations as errors

• Navigate them
If we would automatically identify
cross-language relations we could:
• Recognize them
• Support refactoring
• Validate them
• Navigate them
Click to see the other side of
the relation
CodeModels
ASTs
Embedded AST (prendo immagine da paper)
index.html
<ul id="types">
<li ng-repeat="t in types" ng-class="{'selected': t.id == type}">
<a ng-href="#/{{t.id}}">{{t.title}}</a>
</li>
</ul>

<div ng-repeat="puzzle in puzzles">
<h2>{{puzzle.title}}</h2>
…
</div>
app.js
var types = [
{ id: 'sliding-puzzle', title: 'Sliding puzzle' },
{ id: 'word-search-puzzle', title: 'Word search puzzle' }
];
app.controller('slidingAdvancedCtrl', function($scope) {
$scope.puzzles = [
{ src: './img/misko.jpg', title: 'Miško Hevery', rows: 4, cols: 4 },
{ src: './img/igor.jpg', title: 'Igor Minár', rows: 3, cols: 3 },
{ src: './img/vojta.jpg', title: 'Vojta Jína', rows: 4, cols: 3 }
];
});
index.html
<ul id="types">
<li ng-repeat="t in types" ng-class="{'selected': t.id == type}">
<a ng-href="#/{{t.id}}">{{t.title}}</a>
</li>
</ul>

<div ng-repeat="puzzle in puzzles">
<h2>{{puzzle.title}}</h2>
…
</div>
app.js
var types = [
{ id: 'sliding-puzzle', title: 'Sliding puzzle' },
{ id: 'word-search-puzzle', title: 'Word search puzzle' }
];
app.controller('slidingAdvancedCtrl', function($scope) {
$scope.puzzles = [
{ src: './img/misko.jpg', title: 'Miško Hevery', rows: 4, cols: 4 },
{ src: './img/igor.jpg', title: 'Igor Minár', rows: 3, cols: 3 },
{ src: './img/vojta.jpg', title: 'Vojta Jína', rows: 4, cols: 3 }
];
});
Context of a node:
all the descendants
+
the siblings and their descendants
Context of a node:
all the descendants
+
the siblings and their descendants
How to compare contexts:
1) Take all the values in the context (IDs, strings,
numbers)
+
2) Employ different metrics
Some metrics we use:
• Number of shared values
• Min and max number of different values
• Tversky Index

𝑇𝑉 𝑋, 𝑌 =

|𝑋∩𝑌|
|𝑋∩𝑌|+𝛼|𝑋−𝑌|+𝛽|𝑌−𝑋|

• Jaro, Jaccard, tf-idf and others
How to combine those metrics:
Random Tree tells us
We built a golden set of 1200 candidate relations
(around 140 real relations, the other just same ID)
We train it with golden set
Random Tree find out the best way to combine those
metrics to decide if a pair is related or not

Output of Random Tree

Rule to understand if two nodes with same ID are
connected
How to evaluate it?
10-fold cross valiationn
What we have
• A tool that spot automatically cross-language relations
with a precision and recall > 90% (on a first in-house
dataset)

What now?
• We want to build a larger golden set
• We want to integrate support in editors

Code available at:
https://github.com/orgs/CrossLanguageProject
Spotting Automatically
Cross-Language Relations
Federico Tomassetti, Giuseppe Rizzo, Marco Torchiano
CSMR 2014, Antwerpen, Belgium
Preprint at:
http://www.di.unito.it/~rizzo/publications/Tomassetti_Rizzo-CSMRWCRE2014.pdf

www.slideshare.net/FTomassetti

Code available at:
https://github.com/orgs/CrossLanguageProject

More Related Content

What's hot

PHP object calisthenics
PHP object calisthenicsPHP object calisthenics
PHP object calisthenicsGiorgio Cefaro
 
HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherIvano Malavolta
 
Desarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosDesarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosEdgar Suarez
 
Taking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order FunctionsTaking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order FunctionsDavid Golden
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutesSimon Willison
 
Node.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer NäheNode.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer NäheRalph Winzinger
 
Scala bad practices, scala.io 2019
Scala bad practices, scala.io 2019Scala bad practices, scala.io 2019
Scala bad practices, scala.io 2019Loïc Knuchel
 
Oh, you’re the NY times guy
Oh, you’re the NY times guyOh, you’re the NY times guy
Oh, you’re the NY times guyDavid Hayes
 
Datamapper @ Railsconf2010
Datamapper @ Railsconf2010Datamapper @ Railsconf2010
Datamapper @ Railsconf2010Dirkjan Bussink
 
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤Takahiro Inoue
 
MongoDB全機能解説2
MongoDB全機能解説2MongoDB全機能解説2
MongoDB全機能解説2Takahiro Inoue
 
AST + Better Reflection (PHP Benelux 2016 Unconference)
AST + Better Reflection (PHP Benelux 2016 Unconference)AST + Better Reflection (PHP Benelux 2016 Unconference)
AST + Better Reflection (PHP Benelux 2016 Unconference)James Titcumb
 
Play, Slick, play2-authの間で討死
Play, Slick, play2-authの間で討死Play, Slick, play2-authの間で討死
Play, Slick, play2-authの間で討死Kiwamu Okabe
 
Nestoria new design
Nestoria new designNestoria new design
Nestoria new designlokku
 
Ruby Language - A quick tour
Ruby Language - A quick tourRuby Language - A quick tour
Ruby Language - A quick touraztack
 
NoSQL を Ruby で実践するための n 個の方法
NoSQL を Ruby で実践するための n 個の方法NoSQL を Ruby で実践するための n 個の方法
NoSQL を Ruby で実践するための n 個の方法Tomohiro Nishimura
 

What's hot (20)

PHP object calisthenics
PHP object calisthenicsPHP object calisthenics
PHP object calisthenics
 
HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 Refresher
 
Desarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosDesarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutos
 
Taking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order FunctionsTaking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order Functions
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutes
 
Node.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer NäheNode.js - Demnächst auf einem Server in Ihrer Nähe
Node.js - Demnächst auf einem Server in Ihrer Nähe
 
Scala bad practices, scala.io 2019
Scala bad practices, scala.io 2019Scala bad practices, scala.io 2019
Scala bad practices, scala.io 2019
 
Oh, you’re the NY times guy
Oh, you’re the NY times guyOh, you’re the NY times guy
Oh, you’re the NY times guy
 
jQuery introduction
jQuery introductionjQuery introduction
jQuery introduction
 
Datamapper @ Railsconf2010
Datamapper @ Railsconf2010Datamapper @ Railsconf2010
Datamapper @ Railsconf2010
 
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤
 
MongoDB全機能解説2
MongoDB全機能解説2MongoDB全機能解説2
MongoDB全機能解説2
 
AST + Better Reflection (PHP Benelux 2016 Unconference)
AST + Better Reflection (PHP Benelux 2016 Unconference)AST + Better Reflection (PHP Benelux 2016 Unconference)
AST + Better Reflection (PHP Benelux 2016 Unconference)
 
Play, Slick, play2-authの間で討死
Play, Slick, play2-authの間で討死Play, Slick, play2-authの間で討死
Play, Slick, play2-authの間で討死
 
SQLAlchemy Seminar
SQLAlchemy SeminarSQLAlchemy Seminar
SQLAlchemy Seminar
 
Nestoria new design
Nestoria new designNestoria new design
Nestoria new design
 
画像Hacks
画像Hacks画像Hacks
画像Hacks
 
Dollar symbol
Dollar symbolDollar symbol
Dollar symbol
 
Ruby Language - A quick tour
Ruby Language - A quick tourRuby Language - A quick tour
Ruby Language - A quick tour
 
NoSQL を Ruby で実践するための n 個の方法
NoSQL を Ruby で実践するための n 個の方法NoSQL を Ruby で実践するための n 個の方法
NoSQL を Ruby で実践するための n 個の方法
 

Viewers also liked

百萬部落客贊助計畫
百萬部落客贊助計畫百萬部落客贊助計畫
百萬部落客贊助計畫Vista Cheng
 
HR (human resources)
HR (human resources)HR (human resources)
HR (human resources)yjy0208
 
Wordswordswords
WordswordswordsWordswordswords
WordswordswordsEunGi Hong
 
5 areas of focus to survive in a digital world
5 areas of focus to survive in a digital world5 areas of focus to survive in a digital world
5 areas of focus to survive in a digital worldSpark Digital
 
프레젠테이션1 1
프레젠테이션1 1프레젠테이션1 1
프레젠테이션1 1Minji KIm
 
Abyne Words Game Design Postmortem
Abyne Words Game Design PostmortemAbyne Words Game Design Postmortem
Abyne Words Game Design PostmortemSuyeong Park
 
Employer Branding_EACD_Jose Bancaleiro
Employer Branding_EACD_Jose BancaleiroEmployer Branding_EACD_Jose Bancaleiro
Employer Branding_EACD_Jose BancaleiroDianova
 
METRIC - 린 분석의 데이터 사용법
METRIC - 린 분석의 데이터 사용법METRIC - 린 분석의 데이터 사용법
METRIC - 린 분석의 데이터 사용법JeongMin Kwon
 
Magic of Context - Korean
Magic of Context - KoreanMagic of Context - Korean
Magic of Context - KoreanJimmy Park
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017Drift
 

Viewers also liked (13)

百萬部落客贊助計畫
百萬部落客贊助計畫百萬部落客贊助計畫
百萬部落客贊助計畫
 
HR (human resources)
HR (human resources)HR (human resources)
HR (human resources)
 
Magic the gathering
Magic the gatheringMagic the gathering
Magic the gathering
 
En# HowLong
En# HowLongEn# HowLong
En# HowLong
 
Wordswordswords
WordswordswordsWordswordswords
Wordswordswords
 
Wordle
WordleWordle
Wordle
 
5 areas of focus to survive in a digital world
5 areas of focus to survive in a digital world5 areas of focus to survive in a digital world
5 areas of focus to survive in a digital world
 
프레젠테이션1 1
프레젠테이션1 1프레젠테이션1 1
프레젠테이션1 1
 
Abyne Words Game Design Postmortem
Abyne Words Game Design PostmortemAbyne Words Game Design Postmortem
Abyne Words Game Design Postmortem
 
Employer Branding_EACD_Jose Bancaleiro
Employer Branding_EACD_Jose BancaleiroEmployer Branding_EACD_Jose Bancaleiro
Employer Branding_EACD_Jose Bancaleiro
 
METRIC - 린 분석의 데이터 사용법
METRIC - 린 분석의 데이터 사용법METRIC - 린 분석의 데이터 사용법
METRIC - 린 분석의 데이터 사용법
 
Magic of Context - Korean
Magic of Context - KoreanMagic of Context - Korean
Magic of Context - Korean
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017
 

Similar to Automatically Spotting Cross-language Relations

Beyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCodeBeyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCodeAijaz Ansari
 
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!Guilherme Carreiro
 
DataMapper @ RubyEnRails2009
DataMapper @ RubyEnRails2009DataMapper @ RubyEnRails2009
DataMapper @ RubyEnRails2009Dirkjan Bussink
 
ScalikeJDBC Tutorial for Beginners
ScalikeJDBC Tutorial for BeginnersScalikeJDBC Tutorial for Beginners
ScalikeJDBC Tutorial for BeginnersKazuhiro Sera
 
Persisting Data on SQLite using Room
Persisting Data on SQLite using RoomPersisting Data on SQLite using Room
Persisting Data on SQLite using RoomNelson Glauber Leal
 
More expressive types for spark with frameless
More expressive types for spark with framelessMore expressive types for spark with frameless
More expressive types for spark with framelessMiguel Pérez Pasalodos
 
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022InfluxData
 
Scala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar ProkopecScala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar ProkopecLoïc Descotte
 
Http4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackHttp4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackGaryCoady
 
여자개발자모임터 6주년 개발 세미나 - Scala Language
여자개발자모임터 6주년 개발 세미나 - Scala Language여자개발자모임터 6주년 개발 세미나 - Scala Language
여자개발자모임터 6주년 개발 세미나 - Scala LanguageAshal aka JOKER
 
Functional programming using underscorejs
Functional programming using underscorejsFunctional programming using underscorejs
Functional programming using underscorejs偉格 高
 
Open Source Search: An Analysis
Open Source Search: An AnalysisOpen Source Search: An Analysis
Open Source Search: An AnalysisJustin Finkelstein
 
jQuery Datatables With MongDb
jQuery Datatables With MongDbjQuery Datatables With MongDb
jQuery Datatables With MongDbsliimohara
 

Similar to Automatically Spotting Cross-language Relations (20)

Elm: give it a try
Elm: give it a tryElm: give it a try
Elm: give it a try
 
360|iDev
360|iDev360|iDev
360|iDev
 
Beyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCodeBeyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCode
 
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!
 
Drupal Mobile
Drupal MobileDrupal Mobile
Drupal Mobile
 
DataMapper @ RubyEnRails2009
DataMapper @ RubyEnRails2009DataMapper @ RubyEnRails2009
DataMapper @ RubyEnRails2009
 
ScalikeJDBC Tutorial for Beginners
ScalikeJDBC Tutorial for BeginnersScalikeJDBC Tutorial for Beginners
ScalikeJDBC Tutorial for Beginners
 
Scala taxonomy
Scala taxonomyScala taxonomy
Scala taxonomy
 
Persisting Data on SQLite using Room
Persisting Data on SQLite using RoomPersisting Data on SQLite using Room
Persisting Data on SQLite using Room
 
More expressive types for spark with frameless
More expressive types for spark with framelessMore expressive types for spark with frameless
More expressive types for spark with frameless
 
WOTC_Import
WOTC_ImportWOTC_Import
WOTC_Import
 
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
 
What's New In C# 7
What's New In C# 7What's New In C# 7
What's New In C# 7
 
Scala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar ProkopecScala presentation by Aleksandar Prokopec
Scala presentation by Aleksandar Prokopec
 
Http4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackHttp4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web Stack
 
여자개발자모임터 6주년 개발 세미나 - Scala Language
여자개발자모임터 6주년 개발 세미나 - Scala Language여자개발자모임터 6주년 개발 세미나 - Scala Language
여자개발자모임터 6주년 개발 세미나 - Scala Language
 
mobl
moblmobl
mobl
 
Functional programming using underscorejs
Functional programming using underscorejsFunctional programming using underscorejs
Functional programming using underscorejs
 
Open Source Search: An Analysis
Open Source Search: An AnalysisOpen Source Search: An Analysis
Open Source Search: An Analysis
 
jQuery Datatables With MongDb
jQuery Datatables With MongDbjQuery Datatables With MongDb
jQuery Datatables With MongDb
 

More from Federico Tomassetti

Jariko - A JVM interpreter for RPG written in kotlin
Jariko - A JVM interpreter for RPG written in kotlinJariko - A JVM interpreter for RPG written in kotlin
Jariko - A JVM interpreter for RPG written in kotlinFederico Tomassetti
 
JavaParser - A tool to generate, analyze and refactor Java code
JavaParser - A tool to generate, analyze and refactor Java codeJavaParser - A tool to generate, analyze and refactor Java code
JavaParser - A tool to generate, analyze and refactor Java codeFederico Tomassetti
 
How do you create a programming language for the JVM?
How do you create a programming language for the JVM?How do you create a programming language for the JVM?
How do you create a programming language for the JVM?Federico Tomassetti
 
Lifting variability from C to mbeddr-C
Lifting variability from C to mbeddr-CLifting variability from C to mbeddr-C
Lifting variability from C to mbeddr-CFederico Tomassetti
 
Maturity of Software Modelling and Model Driven Engineering: a Survey in the ...
Maturity of Software Modelling and Model Driven Engineering: a Survey in the ...Maturity of Software Modelling and Model Driven Engineering: a Survey in the ...
Maturity of Software Modelling and Model Driven Engineering: a Survey in the ...Federico Tomassetti
 
Eclipse Florence Day: Modeling in the Italian Industry
Eclipse Florence Day: Modeling in the Italian IndustryEclipse Florence Day: Modeling in the Italian Industry
Eclipse Florence Day: Modeling in the Italian IndustryFederico Tomassetti
 
Estendere Java con il Meta Programming System di JetBrains
Estendere Java con il Meta Programming System di JetBrains Estendere Java con il Meta Programming System di JetBrains
Estendere Java con il Meta Programming System di JetBrains Federico Tomassetti
 
Xtext Un Framework Per La Creazione Di Dsl
Xtext   Un Framework Per La Creazione Di DslXtext   Un Framework Per La Creazione Di Dsl
Xtext Un Framework Per La Creazione Di DslFederico Tomassetti
 
Model Driven Web Development Solutions
Model Driven Web Development SolutionsModel Driven Web Development Solutions
Model Driven Web Development SolutionsFederico Tomassetti
 

More from Federico Tomassetti (12)

Jariko - A JVM interpreter for RPG written in kotlin
Jariko - A JVM interpreter for RPG written in kotlinJariko - A JVM interpreter for RPG written in kotlin
Jariko - A JVM interpreter for RPG written in kotlin
 
JavaParser - A tool to generate, analyze and refactor Java code
JavaParser - A tool to generate, analyze and refactor Java codeJavaParser - A tool to generate, analyze and refactor Java code
JavaParser - A tool to generate, analyze and refactor Java code
 
How do you create a programming language for the JVM?
How do you create a programming language for the JVM?How do you create a programming language for the JVM?
How do you create a programming language for the JVM?
 
Building languages with Kotlin
Building languages with KotlinBuilding languages with Kotlin
Building languages with Kotlin
 
Building languages with Kotlin
Building languages with KotlinBuilding languages with Kotlin
Building languages with Kotlin
 
Lifting variability from C to mbeddr-C
Lifting variability from C to mbeddr-CLifting variability from C to mbeddr-C
Lifting variability from C to mbeddr-C
 
Maturity of Software Modelling and Model Driven Engineering: a Survey in the ...
Maturity of Software Modelling and Model Driven Engineering: a Survey in the ...Maturity of Software Modelling and Model Driven Engineering: a Survey in the ...
Maturity of Software Modelling and Model Driven Engineering: a Survey in the ...
 
Eclipse Florence Day: Modeling in the Italian Industry
Eclipse Florence Day: Modeling in the Italian IndustryEclipse Florence Day: Modeling in the Italian Industry
Eclipse Florence Day: Modeling in the Italian Industry
 
Estendere Java con il Meta Programming System di JetBrains
Estendere Java con il Meta Programming System di JetBrains Estendere Java con il Meta Programming System di JetBrains
Estendere Java con il Meta Programming System di JetBrains
 
What is Federico doing?
What is Federico doing?What is Federico doing?
What is Federico doing?
 
Xtext Un Framework Per La Creazione Di Dsl
Xtext   Un Framework Per La Creazione Di DslXtext   Un Framework Per La Creazione Di Dsl
Xtext Un Framework Per La Creazione Di Dsl
 
Model Driven Web Development Solutions
Model Driven Web Development SolutionsModel Driven Web Development Solutions
Model Driven Web Development Solutions
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Automatically Spotting Cross-language Relations

  • 1. Spotting automatically cross-language relations Federico Tomassetti (me) Giuseppe Rizzo Marco Torchiano
  • 2. data.sql CREATE TABLE Persons ( ID int, FirstName varchar(255), LastName varchar(255), City varchar(255) ); Person.java String query = "select ID, FirstName, LastName, " + "City " + "from " + dbName + ".Persons"; try { ... while (rs.next()) { int id = rs.getInt("ID"); String firstName = rs.getString("FirstName"); String lastName = rs.getString("LastName"); String city= rs.getString("City"); } } catch (SQLException e ) { ...... }
  • 3. data.sql CREATE TABLE Persons ( ID int, FirstName varchar(255), LastName varchar(255), City varchar(255) ); Person.java String query = "select ID, FirstName, LastName, " + "City " + "from " + dbName + ".Persons"; try { ... while (rs.next()) { int id = rs.getInt("ID"); String firstName = rs.getString("FirstName"); String lastName = rs.getString("LastName"); String city= rs.getString("City"); } } catch (SQLException e ) { (Hopefully it does not happen) }
  • 4. …the complexive system, works, sometimes
  • 5. If we would automatically identify cross-language relations we could: • Recognize them So I am aware that this ID is related to something else • Support refactoring • Validate them • Navigate them
  • 6. If we would automatically identify cross-language relations we could: • Recognize them • Support refactoring If I change one, the others are updated • Validate them • Navigate them
  • 7. If we would automatically identify cross-language relations we could: • Recognize them • Support refactoring • Validate them See broken relations as errors • Navigate them
  • 8. If we would automatically identify cross-language relations we could: • Recognize them • Support refactoring • Validate them • Navigate them Click to see the other side of the relation
  • 9.
  • 11. Embedded AST (prendo immagine da paper)
  • 12. index.html <ul id="types"> <li ng-repeat="t in types" ng-class="{'selected': t.id == type}"> <a ng-href="#/{{t.id}}">{{t.title}}</a> </li> </ul> <div ng-repeat="puzzle in puzzles"> <h2>{{puzzle.title}}</h2> … </div> app.js var types = [ { id: 'sliding-puzzle', title: 'Sliding puzzle' }, { id: 'word-search-puzzle', title: 'Word search puzzle' } ]; app.controller('slidingAdvancedCtrl', function($scope) { $scope.puzzles = [ { src: './img/misko.jpg', title: 'Miško Hevery', rows: 4, cols: 4 }, { src: './img/igor.jpg', title: 'Igor Minár', rows: 3, cols: 3 }, { src: './img/vojta.jpg', title: 'Vojta Jína', rows: 4, cols: 3 } ]; });
  • 13. index.html <ul id="types"> <li ng-repeat="t in types" ng-class="{'selected': t.id == type}"> <a ng-href="#/{{t.id}}">{{t.title}}</a> </li> </ul> <div ng-repeat="puzzle in puzzles"> <h2>{{puzzle.title}}</h2> … </div> app.js var types = [ { id: 'sliding-puzzle', title: 'Sliding puzzle' }, { id: 'word-search-puzzle', title: 'Word search puzzle' } ]; app.controller('slidingAdvancedCtrl', function($scope) { $scope.puzzles = [ { src: './img/misko.jpg', title: 'Miško Hevery', rows: 4, cols: 4 }, { src: './img/igor.jpg', title: 'Igor Minár', rows: 3, cols: 3 }, { src: './img/vojta.jpg', title: 'Vojta Jína', rows: 4, cols: 3 } ]; });
  • 14. Context of a node: all the descendants + the siblings and their descendants
  • 15. Context of a node: all the descendants + the siblings and their descendants
  • 16. How to compare contexts: 1) Take all the values in the context (IDs, strings, numbers) + 2) Employ different metrics Some metrics we use: • Number of shared values • Min and max number of different values • Tversky Index 𝑇𝑉 𝑋, 𝑌 = |𝑋∩𝑌| |𝑋∩𝑌|+𝛼|𝑋−𝑌|+𝛽|𝑌−𝑋| • Jaro, Jaccard, tf-idf and others
  • 17. How to combine those metrics: Random Tree tells us We built a golden set of 1200 candidate relations (around 140 real relations, the other just same ID) We train it with golden set Random Tree find out the best way to combine those metrics to decide if a pair is related or not Output of Random Tree Rule to understand if two nodes with same ID are connected
  • 18. How to evaluate it? 10-fold cross valiationn
  • 19. What we have • A tool that spot automatically cross-language relations with a precision and recall > 90% (on a first in-house dataset) What now? • We want to build a larger golden set • We want to integrate support in editors Code available at: https://github.com/orgs/CrossLanguageProject
  • 20. Spotting Automatically Cross-Language Relations Federico Tomassetti, Giuseppe Rizzo, Marco Torchiano CSMR 2014, Antwerpen, Belgium Preprint at: http://www.di.unito.it/~rizzo/publications/Tomassetti_Rizzo-CSMRWCRE2014.pdf www.slideshare.net/FTomassetti Code available at: https://github.com/orgs/CrossLanguageProject