SlideShare a Scribd company logo
Ruby 3の型解析
に向けた計画
遠藤 侑介
大阪Ruby会議02
1
自己紹介:遠藤侑介 (@mametter)
•クックパッドで働く
フルタイムRubyコミッタ
• テスト、CIの番人
• キーワード引数 粉砕 整理
• Ruby 3の静的解析
•クックパッドに興味あったら
お声がけください
2
余談:Ruby3キーワード引数の変更
Ruby2では「最後の引数=キーワード引数」だった
Ruby3ではこれらが禁止される予定!
• キーワード引数はキーワード引数として受け渡ししよう
• オプショナル引数はハッシュとして受け渡ししよう
3
def foo(kw: 1); end
foo(kw: 42)
def foo(kw:1); end
foo(**hash)
def foo(kw: 1)
end
foo({ kw: 42 })
def foo(kw: 1)
end
foo(hash)
余談:Ruby2.7のキーワード引数
•直すべきメソッド呼出しにレベル1警告が出ます
• 詳細な案内は追ってどこかに書きます
• まだ詳細な仕様が決まっていない(委譲を調整中)
• Railsはだいたい対応済み (!?)
4
def foo(kw: 1)
end
foo({ kw: 42 })
test.rb:3: warning: The last argument is used as the keyword parameter
test.rb:1: warning: for `foo' defined here
この発表では
•Ruby 3の静的解析の構想と進捗
•型プロファイラの設計と実装
• の、細かくて難しい面をはじめて話します
5
質問:型注釈 書きたいですか?
6
def increment: (Integer) -> Integer
def increment(n)
n + 1
end
ソースコード
型注釈
質問:型注釈 書きたいですか?
🙋
• 書きたくないし、他人にも書いてほしくない
• 書きたくないが、他人はどちらでもいい
• 書きたくないが、他人には書いてほしい
• 書きたい
7
Ruby 3の静的解析の構想
•目的: バグっぽいコードを指摘する
•要件: Rubyのプログラミング体験を維持する
(自分で)型を書かない選択肢を残したい
•構想
1. 標準の型シグネチャ言語
2. 型シグネチャなし型検査+シグネチャ推定
3. 型シグネチャあり型検査
8
1. 型シグネチャフォーマット(.rbs)
Rubyコードの型情報を示す標準形式
9
class Array[X] < Object
include Enumerable
def []: (Integer) -> X?
def []=: (Integer, X) -> X
def each: () { (X) -> void } -> Array[X]
...
end
組み込みメソッドの.rbsをRuby 3に同梱予定
コントリビューションチャンス!
github.com/ruby/ruby-signature
2. 型シグネチャなし検査+推定
無注釈コードの緩い型検査+型シグネチャ推定
def foo(n)
n + "s"
end
def bar(n)
ary = [1, "S"]
ary[n]
end
foo(gets.to_i)
bar(gets.to_i)
10
型プロファイラ開発中
github.com/mame/ruby-type-profiler
def bar:
(Int) -> (Int | Str)
TypeError: failed to
resolve Integer#+(String)
mruby 向けには mruby-meta-circular も
3. 型シグネチャあり型検査
型シグネチャとコードの整合性を検査する
class Foo
def foo(s)
s + 42
end
def bar(s)
s.gsuub(//,"")
end
end
class Foo
def foo:(Str)->Int
def bar:(Str)->Int
end
11
TypeError!
Str + Int
NoMethod
Error!
Steep github.com/soutaro/steep
Sorbet github.com/sorbet/sorbet
整合?
Ruby 3の方向性
•ライブラリ作者
.rbs 書いてください🙏
(型プロファイラの推定機能でサポートはしたい)
•アプリ作者
• 注釈書かず、検査もいらない → Ruby 2と同じ
• 注釈を書いてしっかり検査 → Steep/Sorbet等
• 注釈を書かず、緩く検査したい→型プロファイラ!
12
型プロファイラの話
13
型プロファイラとは
•目的:(アプリの)型シグネチャなしで
• ざっくり型エラーを探す
• 型シグネチャのプロトタイプを生成する
•方法:プログラムを型レベルで実行する
• ライブラリの型シグネチャ
• アプリのテスト
は必要
14
型プロファイラの動作イメージ
Rubyコードを「型レベル」で実行する
普通のインタプリタ
def foo(n)
n.to_s
end
foo(42)
Calls w/
42
Returns
"42"
型プロファイラ
def foo(n)
n.to_s
end
foo(42)
Calls w/
Integer
Returns
String
Object#foo ::
(Integer) -> String
15
型プロファイラと分岐
実行を「フォーク」する
def foo(n)
if n < 10
n
else
"error"
end
end
foo(42)
Fork!
イマココ
n<10 の真偽は
わからない
Object#foo ::
(Integer) ->
(Integer | String)
16
Returns
String
Returns
Integer
どのくらいできている?
•型プロファイラ自身が5秒で解析できる
• 2000行程度の普通のRubyコード
•optcarrotが3秒で解析できる
• 5000行程度の普通のRubyコード
17
例:ユーザ定義クラス
class Foo
end
class Bar
def make_foo
Foo.new
end
end
Bar.new.make_foo
Type
Profiler
Bar#make_foo :: () -> Foo
例:インスタンス変数
class Foo
attr_accessor :ivar
end
Foo.new.ivar = 42
Foo.new.ivar = "STR"
Foo.new.ivar
Type
Profiler
Foo#@ivar :: Integer | String
Foo#ivar= :: (Integer) -> Integer
Foo#ivar= :: (String) -> String
Foo#ivar :: () -> (String | Integer)
例:ブロック
def foo(x)
yield 42
end
s = "str"
foo(1) do |x|
s
end
Type
Profiler
Object#foo ::
(Integer, &Proc[(Integer) -> String])
-> String
例:再帰関数
def fib(n)
if n > 1
fib(n-1) + fib(n-2)
else
n
end
end
fib(10000)
Type
Profiler
Object#fib ::
(Integer) -> Integer
型プロファイラの何が難しいか?
•真似できる成功事例がない
抽象解釈・記号実行 長年研究されてきたが😟
•スケーラビリティと精度のトレードオフが難しい
型プロファイラは見逃しも誤検出も許容する
•実装がとにかく地味に大変
フルセットのRubyインタプリタ+型レベル評価設計
•「コンテナ型」が扱いづらい  今日のメイン
22
コンテナ型とは?
•配列やハッシュなど、他の型を要素に持つ型
• 配列を中心に説明します
•問題:型プロファイラで配列をどう扱うか?
23
a = [1, "str", true]
p a[0] #=> Integer
p a[1] #=> String
p a[2] #=> Boolean
解決策1:単なる「Array」型
•例えばIntegerの場合
•問題点:要素の型が出てくると破滅
24
n = 1 # Integer型
n.times {|i| } # Integer#timesとわかる
a = [1] # Array型
a[0] # 要素の型は不明(any型)
a[0].times {|i| } # 何もわからない
a[0].tmes {|i| } # 警告もできない
解決策2: ジェネリクス?
•要素の型を持つ型
•問題点:破壊的変更があると型が変わる!
a = [1] # Array<Integer>と推定
a[0] # Integerとわかる
a[0].times {|i| } # Integer#timesとわかる
a = [1] # Array<Integer>と推定
a << "str" # Array<Integer|String>に変わる!
解決策2: ジェネリクス?(続き)
•型プロファイラでは値レベルの区別がない
26
a = [1] # Array<Int>
b = [1] # Array<Int>(aと完全に同じ型?)
a[0] = "str" # Array<Int>がArray<Str>に変更??
b[0] # String??
a = [1] # Array<Int>
b = a # Array<Int>(aと同じ型)
a[0] = "str" # Array<Int>がArray<Str>に変更
b[0] # String
解決策3:値レベルの区別を入れる
•ナイーブにやると解析が有限時間で止まらない
• わりと研究中の分野(separation logic)
• 一方 Sorbet は型注釈を使った
27
a = T.let([1], T::Array[T.any(Integer, String)])
b = a
a[0] = "str"
b[0] # String | Integer
型プロファイラの現在の設計 (1)
配列ができた位置(allocation site)で区別
完璧ではないがわりとよくある妥協
28
1: a = [1] # Array<1行目> # 1行目→Int
2: b = [1] # Array<2行目> # 1行目→Int 2行目→Int
3: a[0] = "str" # 1行目→Str 2行目→Int
4: b[0] # Array<2行目>の要素はInt
1: a = [1] # Array<1行目> # 1行目→Int
2: b = a # Array<1行目> # 1行目→Int
3: a[0] = "str" # 1行目→Str
4: b[0] # Array<1行目>の要素はStr
設計 (1) の問題
29
1: class Foo
2: def to_a
3: [42] # Array<3行目>
4: end
5: end
6: a = Foo.new.to_a # Array<3行目>
7: b = Foo.new.to_a # Array<3行目>
8: a[0] = "str"
9: b[0] # String??
型プロファイラの現在の設計 (2)
メソッドは超える時は位置情報を失うとする
30
1: class Foo
2: def to_a(a)
3: [42] # Array<3行目>
4: end
5: end
6: a = Foo.new.to_a # Array<6行目>(3行目ではない)
7: b = Foo.new.to_a # Array<7行目>(3行目ではない)
型プロファイラの現在の設計 (3)
•タプル型:長さ固定、各要素を区別する
31
ary = [1, "str"] # [Int, Str]
ary[0] # 0番目はInt
ary[0].times {|i| } # IntなのでInt#timesとわかる
ary = [1] + ["str"] # Array[Int | Str]
ary[0] # Int | Str
ary[0].times {|i| } # Str#timesも呼ぶかも、と警告
•シーケンス型:長さ不明、全要素をまとめる
現在の設計 (3)
•リテラル型:元のリテラルの値を持つ型
32
0 # Literal<0, Int>
ary[0] # リテラル型なので0とわかる
def access(a, n)
a[n] # nはIntなので、aryのどこを読むかは不明
end
access([1, "STR"], 0) #=> Int|Str
# Literal<0, Int>だがメソッドには渡らない
リテラル型もメソッド境界は超えない
配列型の実装の細々した問題
型の領域が無限になる
• Array<Int>
• Array<Array<Int>>
• Array<Array<Array<Int>>>
• …
• 適当な深さで打ち切る予定
33
a = 42
while true
a = [a]
end
可変長引数のサポート
配列ができたら(一応)やるだけ
34
def foo(a, *r, z)
end
foo(1, 1, "str", 1)
foo:
(Int, Array<Int|Str>, Int)
-> NilClass
def foo(a, b, c)
end
ary = [42] + ["str"]
foo(*ary)
foo:
(Int|Str, Int|Str, Int|Str)
-> NilClass
余談:既知のバグ
35
def foo(a, b, c)
end
ary = [1]
foo(1, *ary, "str")
foo:(Int, Int, Str)->Nil
foo:(Int, Int|Str, Int|Str)->Nil
期待
実際
foo(1, *ary, "str")
foo(1, *(ary.dup+["str"]))
は
のように動く
理由:YARVバイトコードの実装の都合
関連研究
•mruby-meta-circular (Hideki Miura)
• 型プロファイラの元ネタ
•Type Analysis for JavaScript (Jensen, et al.)
•pytype (Google's unofficial project)
• 型解析のための抽象解釈器の事例
36
まとめ
•Ruby 3の静的解析の構想を説明しました
•型プロファイラの難しみ(コンテナ型)を
説明しました
• いろいろ悩みながらやってます
• 協力者募集中!
https://github.com/mame/ruby-type-profiler
37

More Related Content

What's hot

PHP7の内部実装から学ぶ性能改善テクニック
PHP7の内部実装から学ぶ性能改善テクニックPHP7の内部実装から学ぶ性能改善テクニック
PHP7の内部実装から学ぶ性能改善テクニックYoshio Hanawa
 
Improve the Development Process with DevOps Practices by Fedorov Vadim
Improve the Development Process with DevOps Practices by Fedorov VadimImprove the Development Process with DevOps Practices by Fedorov Vadim
Improve the Development Process with DevOps Practices by Fedorov VadimSoftServe
 
重力プログラミング入門「第1回:地球の重力下で人工衛星を公転軌道に乗せる」
重力プログラミング入門「第1回:地球の重力下で人工衛星を公転軌道に乗せる」重力プログラミング入門「第1回:地球の重力下で人工衛星を公転軌道に乗せる」
重力プログラミング入門「第1回:地球の重力下で人工衛星を公転軌道に乗せる」fukuoka.ex
 
大学でC言語をはじめて触る人へ
大学でC言語をはじめて触る人へ大学でC言語をはじめて触る人へ
大学でC言語をはじめて触る人へssuser3c1023
 
サウンドクリエイターがほんの少しBPに触れるだけで起こる革命
サウンドクリエイターがほんの少しBPに触れるだけで起こる革命サウンドクリエイターがほんの少しBPに触れるだけで起こる革命
サウンドクリエイターがほんの少しBPに触れるだけで起こる革命Satoru Okubo
 
配管流路の多目的最適化OpenFOAM+OpenMDAO(第28回オープンCAE勉強会@関西)
配管流路の多目的最適化OpenFOAM+OpenMDAO(第28回オープンCAE勉強会@関西)配管流路の多目的最適化OpenFOAM+OpenMDAO(第28回オープンCAE勉強会@関西)
配管流路の多目的最適化OpenFOAM+OpenMDAO(第28回オープンCAE勉強会@関西)TatsuyaKatayama
 
"No Man’s Sky" から"Forza Horizon 5" まで。 国内外の成功タイトルが使う Microsoft Azure
"No Man’s Sky" から"Forza Horizon 5" まで。 国内外の成功タイトルが使う Microsoft Azure"No Man’s Sky" から"Forza Horizon 5" まで。 国内外の成功タイトルが使う Microsoft Azure
"No Man’s Sky" から"Forza Horizon 5" まで。 国内外の成功タイトルが使う Microsoft AzureDaisuke Masubuchi
 
Azure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | Edureka
Azure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | EdurekaAzure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | Edureka
Azure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | EdurekaEdureka!
 
UE4 Saitama 初心者向けハンズオン #7『サウンド機能』
UE4 Saitama 初心者向けハンズオン #7『サウンド機能』UE4 Saitama 初心者向けハンズオン #7『サウンド機能』
UE4 Saitama 初心者向けハンズオン #7『サウンド機能』Yuuki Ogino
 
Après l’#agilité, le #DevOps, la nouvelle arme de la DSI
Après l’#agilité, le #DevOps, la nouvelle arme de la DSIAprès l’#agilité, le #DevOps, la nouvelle arme de la DSI
Après l’#agilité, le #DevOps, la nouvelle arme de la DSISébastien Bourguignon
 
Jenkins使ってみた~Windows編~
Jenkins使ってみた~Windows編~Jenkins使ってみた~Windows編~
Jenkins使ってみた~Windows編~Yuta Matsumura
 
DevOps - Overview - One of the Top Trends in IT Industry
DevOps - Overview - One of the Top Trends in IT IndustryDevOps - Overview - One of the Top Trends in IT Industry
DevOps - Overview - One of the Top Trends in IT IndustryRahul Tilloo
 
以自動化先行的 DevOps 實踐經驗分享
以自動化先行的 DevOps 實踐經驗分享以自動化先行的 DevOps 實踐經驗分享
以自動化先行的 DevOps 實踐經驗分享Chen Cheng-Wei
 
Acer MRヘッドセットで計算結果の可視化
Acer MRヘッドセットで計算結果の可視化Acer MRヘッドセットで計算結果の可視化
Acer MRヘッドセットで計算結果の可視化mmer547
 
DeNA流cocos2d xとの付き合い方
DeNA流cocos2d xとの付き合い方DeNA流cocos2d xとの付き合い方
DeNA流cocos2d xとの付き合い方dena_study
 
あるキャッシュメモリの話
あるキャッシュメモリの話あるキャッシュメモリの話
あるキャッシュメモリの話nullnilaki
 
知って得するC# LINQ to Objects編
知って得するC# LINQ to Objects編知って得するC# LINQ to Objects編
知って得するC# LINQ to Objects編Shota Baba
 
使い倒そう Visual Studio Code! ~クラウド連携や遠隔ペアプロ、  もちろん Git も便利に~
使い倒そう Visual Studio Code!~クラウド連携や遠隔ペアプロ、 もちろん Git も便利に~使い倒そう Visual Studio Code!~クラウド連携や遠隔ペアプロ、 もちろん Git も便利に~
使い倒そう Visual Studio Code! ~クラウド連携や遠隔ペアプロ、  もちろん Git も便利に~Saki Homma
 
Tokyor14 - R言語でユニットテスト
Tokyor14 - R言語でユニットテストTokyor14 - R言語でユニットテスト
Tokyor14 - R言語でユニットテストYohei Sato
 

What's hot (20)

PHP7の内部実装から学ぶ性能改善テクニック
PHP7の内部実装から学ぶ性能改善テクニックPHP7の内部実装から学ぶ性能改善テクニック
PHP7の内部実装から学ぶ性能改善テクニック
 
Improve the Development Process with DevOps Practices by Fedorov Vadim
Improve the Development Process with DevOps Practices by Fedorov VadimImprove the Development Process with DevOps Practices by Fedorov Vadim
Improve the Development Process with DevOps Practices by Fedorov Vadim
 
重力プログラミング入門「第1回:地球の重力下で人工衛星を公転軌道に乗せる」
重力プログラミング入門「第1回:地球の重力下で人工衛星を公転軌道に乗せる」重力プログラミング入門「第1回:地球の重力下で人工衛星を公転軌道に乗せる」
重力プログラミング入門「第1回:地球の重力下で人工衛星を公転軌道に乗せる」
 
大学でC言語をはじめて触る人へ
大学でC言語をはじめて触る人へ大学でC言語をはじめて触る人へ
大学でC言語をはじめて触る人へ
 
サウンドクリエイターがほんの少しBPに触れるだけで起こる革命
サウンドクリエイターがほんの少しBPに触れるだけで起こる革命サウンドクリエイターがほんの少しBPに触れるだけで起こる革命
サウンドクリエイターがほんの少しBPに触れるだけで起こる革命
 
配管流路の多目的最適化OpenFOAM+OpenMDAO(第28回オープンCAE勉強会@関西)
配管流路の多目的最適化OpenFOAM+OpenMDAO(第28回オープンCAE勉強会@関西)配管流路の多目的最適化OpenFOAM+OpenMDAO(第28回オープンCAE勉強会@関西)
配管流路の多目的最適化OpenFOAM+OpenMDAO(第28回オープンCAE勉強会@関西)
 
"No Man’s Sky" から"Forza Horizon 5" まで。 国内外の成功タイトルが使う Microsoft Azure
"No Man’s Sky" から"Forza Horizon 5" まで。 国内外の成功タイトルが使う Microsoft Azure"No Man’s Sky" から"Forza Horizon 5" まで。 国内外の成功タイトルが使う Microsoft Azure
"No Man’s Sky" から"Forza Horizon 5" まで。 国内外の成功タイトルが使う Microsoft Azure
 
Azure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | Edureka
Azure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | EdurekaAzure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | Edureka
Azure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | Edureka
 
UE4 Saitama 初心者向けハンズオン #7『サウンド機能』
UE4 Saitama 初心者向けハンズオン #7『サウンド機能』UE4 Saitama 初心者向けハンズオン #7『サウンド機能』
UE4 Saitama 初心者向けハンズオン #7『サウンド機能』
 
Après l’#agilité, le #DevOps, la nouvelle arme de la DSI
Après l’#agilité, le #DevOps, la nouvelle arme de la DSIAprès l’#agilité, le #DevOps, la nouvelle arme de la DSI
Après l’#agilité, le #DevOps, la nouvelle arme de la DSI
 
Jenkins使ってみた~Windows編~
Jenkins使ってみた~Windows編~Jenkins使ってみた~Windows編~
Jenkins使ってみた~Windows編~
 
DevOps - Overview - One of the Top Trends in IT Industry
DevOps - Overview - One of the Top Trends in IT IndustryDevOps - Overview - One of the Top Trends in IT Industry
DevOps - Overview - One of the Top Trends in IT Industry
 
以自動化先行的 DevOps 實踐經驗分享
以自動化先行的 DevOps 實踐經驗分享以自動化先行的 DevOps 實踐經驗分享
以自動化先行的 DevOps 實踐經驗分享
 
Acer MRヘッドセットで計算結果の可視化
Acer MRヘッドセットで計算結果の可視化Acer MRヘッドセットで計算結果の可視化
Acer MRヘッドセットで計算結果の可視化
 
DeNA流cocos2d xとの付き合い方
DeNA流cocos2d xとの付き合い方DeNA流cocos2d xとの付き合い方
DeNA流cocos2d xとの付き合い方
 
devops
devops devops
devops
 
あるキャッシュメモリの話
あるキャッシュメモリの話あるキャッシュメモリの話
あるキャッシュメモリの話
 
知って得するC# LINQ to Objects編
知って得するC# LINQ to Objects編知って得するC# LINQ to Objects編
知って得するC# LINQ to Objects編
 
使い倒そう Visual Studio Code! ~クラウド連携や遠隔ペアプロ、  もちろん Git も便利に~
使い倒そう Visual Studio Code!~クラウド連携や遠隔ペアプロ、 もちろん Git も便利に~使い倒そう Visual Studio Code!~クラウド連携や遠隔ペアプロ、 もちろん Git も便利に~
使い倒そう Visual Studio Code! ~クラウド連携や遠隔ペアプロ、  もちろん Git も便利に~
 
Tokyor14 - R言語でユニットテスト
Tokyor14 - R言語でユニットテストTokyor14 - R言語でユニットテスト
Tokyor14 - R言語でユニットテスト
 

Similar to Ruby 3の型解析に向けた計画

A Plan towards Ruby 3 Types
A Plan towards Ruby 3 TypesA Plan towards Ruby 3 Types
A Plan towards Ruby 3 Typesmametter
 
Type Profiler: Ambitious Type Inference for Ruby 3
Type Profiler: Ambitious Type Inference for Ruby 3Type Profiler: Ambitious Type Inference for Ruby 3
Type Profiler: Ambitious Type Inference for Ruby 3mametter
 
Preparing Java 7 Certifications
Preparing Java 7 CertificationsPreparing Java 7 Certifications
Preparing Java 7 CertificationsGiacomo Veneri
 
Invitation to the dark side of Ruby
Invitation to the dark side of RubyInvitation to the dark side of Ruby
Invitation to the dark side of RubySATOSHI TAGOMORI
 
TypeProf for IDE: Enrich Development Experience without Annotations
TypeProf for IDE: Enrich Development Experience without AnnotationsTypeProf for IDE: Enrich Development Experience without Annotations
TypeProf for IDE: Enrich Development Experience without Annotationsmametter
 
Ruby -the wheel Technology
Ruby -the wheel TechnologyRuby -the wheel Technology
Ruby -the wheel Technologyppparthpatel123
 
First Class Variables as AST Annotations
First Class Variables as AST AnnotationsFirst Class Variables as AST Annotations
First Class Variables as AST AnnotationsMarcus Denker
 
First Class Variables as AST Annotations
 First Class Variables as AST Annotations First Class Variables as AST Annotations
First Class Variables as AST AnnotationsESUG
 
Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Henry S
 
A Type-level Ruby Interpreter for Testing and Understanding
A Type-level Ruby Interpreter for Testing and UnderstandingA Type-level Ruby Interpreter for Testing and Understanding
A Type-level Ruby Interpreter for Testing and Understandingmametter
 
Python: The Iterator Pattern (Comprehensions)
Python: The Iterator Pattern (Comprehensions)Python: The Iterator Pattern (Comprehensions)
Python: The Iterator Pattern (Comprehensions)Damian T. Gordon
 
Advanced Reflection in Pharo
Advanced Reflection in PharoAdvanced Reflection in Pharo
Advanced Reflection in PharoPharo
 
A Static Type Analyzer of Untyped Ruby Code for Ruby 3
A Static Type Analyzer of Untyped Ruby Code for Ruby 3A Static Type Analyzer of Untyped Ruby Code for Ruby 3
A Static Type Analyzer of Untyped Ruby Code for Ruby 3mametter
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite AutomataArchana Gopinath
 
Type Profiler: An Analysis to guess type signatures
Type Profiler: An Analysis to guess type signaturesType Profiler: An Analysis to guess type signatures
Type Profiler: An Analysis to guess type signaturesmametter
 
Hash Functions FTW
Hash Functions FTWHash Functions FTW
Hash Functions FTWsunnygleason
 

Similar to Ruby 3の型解析に向けた計画 (20)

A Plan towards Ruby 3 Types
A Plan towards Ruby 3 TypesA Plan towards Ruby 3 Types
A Plan towards Ruby 3 Types
 
Type Profiler: Ambitious Type Inference for Ruby 3
Type Profiler: Ambitious Type Inference for Ruby 3Type Profiler: Ambitious Type Inference for Ruby 3
Type Profiler: Ambitious Type Inference for Ruby 3
 
Preparing Java 7 Certifications
Preparing Java 7 CertificationsPreparing Java 7 Certifications
Preparing Java 7 Certifications
 
Invitation to the dark side of Ruby
Invitation to the dark side of RubyInvitation to the dark side of Ruby
Invitation to the dark side of Ruby
 
TypeProf for IDE: Enrich Development Experience without Annotations
TypeProf for IDE: Enrich Development Experience without AnnotationsTypeProf for IDE: Enrich Development Experience without Annotations
TypeProf for IDE: Enrich Development Experience without Annotations
 
4 Expressions and Operators
4  Expressions and Operators4  Expressions and Operators
4 Expressions and Operators
 
Ruby -the wheel Technology
Ruby -the wheel TechnologyRuby -the wheel Technology
Ruby -the wheel Technology
 
First Class Variables as AST Annotations
First Class Variables as AST AnnotationsFirst Class Variables as AST Annotations
First Class Variables as AST Annotations
 
First Class Variables as AST Annotations
 First Class Variables as AST Annotations First Class Variables as AST Annotations
First Class Variables as AST Annotations
 
Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2
 
A Type-level Ruby Interpreter for Testing and Understanding
A Type-level Ruby Interpreter for Testing and UnderstandingA Type-level Ruby Interpreter for Testing and Understanding
A Type-level Ruby Interpreter for Testing and Understanding
 
Ruby basics
Ruby basicsRuby basics
Ruby basics
 
Python: The Iterator Pattern (Comprehensions)
Python: The Iterator Pattern (Comprehensions)Python: The Iterator Pattern (Comprehensions)
Python: The Iterator Pattern (Comprehensions)
 
Maccro Strikes Back
Maccro Strikes BackMaccro Strikes Back
Maccro Strikes Back
 
Advanced Reflection in Pharo
Advanced Reflection in PharoAdvanced Reflection in Pharo
Advanced Reflection in Pharo
 
A Static Type Analyzer of Untyped Ruby Code for Ruby 3
A Static Type Analyzer of Untyped Ruby Code for Ruby 3A Static Type Analyzer of Untyped Ruby Code for Ruby 3
A Static Type Analyzer of Untyped Ruby Code for Ruby 3
 
Scheme language
Scheme languageScheme language
Scheme language
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite Automata
 
Type Profiler: An Analysis to guess type signatures
Type Profiler: An Analysis to guess type signaturesType Profiler: An Analysis to guess type signatures
Type Profiler: An Analysis to guess type signatures
 
Hash Functions FTW
Hash Functions FTWHash Functions FTW
Hash Functions FTW
 

More from mametter

error_highlight: User-friendly Error Diagnostics
error_highlight: User-friendly Error Diagnosticserror_highlight: User-friendly Error Diagnostics
error_highlight: User-friendly Error Diagnosticsmametter
 
TRICK 2022 Results
TRICK 2022 ResultsTRICK 2022 Results
TRICK 2022 Resultsmametter
 
クックパッド春の超絶技巧パンまつり 超絶技巧プログラミング編 資料
クックパッド春の超絶技巧パンまつり 超絶技巧プログラミング編 資料クックパッド春の超絶技巧パンまつり 超絶技巧プログラミング編 資料
クックパッド春の超絶技巧パンまつり 超絶技巧プログラミング編 資料mametter
 
Enjoy Ruby Programming in IDE and TypeProf
Enjoy Ruby Programming in IDE and TypeProfEnjoy Ruby Programming in IDE and TypeProf
Enjoy Ruby Programming in IDE and TypeProfmametter
 
emruby: ブラウザで動くRuby
emruby: ブラウザで動くRubyemruby: ブラウザで動くRuby
emruby: ブラウザで動くRubymametter
 
型プロファイラ:抽象解釈に基づくRuby 3の静的解析
型プロファイラ:抽象解釈に基づくRuby 3の静的解析型プロファイラ:抽象解釈に基づくRuby 3の静的解析
型プロファイラ:抽象解釈に基づくRuby 3の静的解析mametter
 
Ruby 3の型推論やってます
Ruby 3の型推論やってますRuby 3の型推論やってます
Ruby 3の型推論やってますmametter
 
マニアックなRuby 2.7新機能紹介
マニアックなRuby 2.7新機能紹介マニアックなRuby 2.7新機能紹介
マニアックなRuby 2.7新機能紹介mametter
 
Ruby 3 の型解析に向けた計画
Ruby 3 の型解析に向けた計画Ruby 3 の型解析に向けた計画
Ruby 3 の型解析に向けた計画mametter
 
本番環境で使える実行コード記録機能
本番環境で使える実行コード記録機能本番環境で使える実行コード記録機能
本番環境で使える実行コード記録機能mametter
 
Transcendental Programming in Ruby
Transcendental Programming in RubyTranscendental Programming in Ruby
Transcendental Programming in Rubymametter
 
Cookpad Hackarade #04: Create Your Own Interpreter
Cookpad Hackarade #04: Create Your Own InterpreterCookpad Hackarade #04: Create Your Own Interpreter
Cookpad Hackarade #04: Create Your Own Interpretermametter
 
Ruby 3のキーワード引数について考える
Ruby 3のキーワード引数について考えるRuby 3のキーワード引数について考える
Ruby 3のキーワード引数について考えるmametter
 
TRICK 2018 results
TRICK 2018 resultsTRICK 2018 results
TRICK 2018 resultsmametter
 
Esoteric, Obfuscated, Artistic Programming in Ruby
Esoteric, Obfuscated, Artistic Programming in RubyEsoteric, Obfuscated, Artistic Programming in Ruby
Esoteric, Obfuscated, Artistic Programming in Rubymametter
 
Cookpad Spring 1day internship 2018 超絶技巧プログラミングコース資料
Cookpad Spring 1day internship 2018 超絶技巧プログラミングコース資料Cookpad Spring 1day internship 2018 超絶技巧プログラミングコース資料
Cookpad Spring 1day internship 2018 超絶技巧プログラミングコース資料mametter
 
Esoteric, Obfuscated, Artistic Programming in Ruby
Esoteric, Obfuscated, Artistic Programming in RubyEsoteric, Obfuscated, Artistic Programming in Ruby
Esoteric, Obfuscated, Artistic Programming in Rubymametter
 
An introduction and future of Ruby coverage library
An introduction and future of Ruby coverage libraryAn introduction and future of Ruby coverage library
An introduction and future of Ruby coverage librarymametter
 
Ruby でつくる型付き Ruby
Ruby でつくる型付き RubyRuby でつくる型付き Ruby
Ruby でつくる型付き Rubymametter
 
Ruby で高速なプログラムを書く
Ruby で高速なプログラムを書くRuby で高速なプログラムを書く
Ruby で高速なプログラムを書くmametter
 

More from mametter (20)

error_highlight: User-friendly Error Diagnostics
error_highlight: User-friendly Error Diagnosticserror_highlight: User-friendly Error Diagnostics
error_highlight: User-friendly Error Diagnostics
 
TRICK 2022 Results
TRICK 2022 ResultsTRICK 2022 Results
TRICK 2022 Results
 
クックパッド春の超絶技巧パンまつり 超絶技巧プログラミング編 資料
クックパッド春の超絶技巧パンまつり 超絶技巧プログラミング編 資料クックパッド春の超絶技巧パンまつり 超絶技巧プログラミング編 資料
クックパッド春の超絶技巧パンまつり 超絶技巧プログラミング編 資料
 
Enjoy Ruby Programming in IDE and TypeProf
Enjoy Ruby Programming in IDE and TypeProfEnjoy Ruby Programming in IDE and TypeProf
Enjoy Ruby Programming in IDE and TypeProf
 
emruby: ブラウザで動くRuby
emruby: ブラウザで動くRubyemruby: ブラウザで動くRuby
emruby: ブラウザで動くRuby
 
型プロファイラ:抽象解釈に基づくRuby 3の静的解析
型プロファイラ:抽象解釈に基づくRuby 3の静的解析型プロファイラ:抽象解釈に基づくRuby 3の静的解析
型プロファイラ:抽象解釈に基づくRuby 3の静的解析
 
Ruby 3の型推論やってます
Ruby 3の型推論やってますRuby 3の型推論やってます
Ruby 3の型推論やってます
 
マニアックなRuby 2.7新機能紹介
マニアックなRuby 2.7新機能紹介マニアックなRuby 2.7新機能紹介
マニアックなRuby 2.7新機能紹介
 
Ruby 3 の型解析に向けた計画
Ruby 3 の型解析に向けた計画Ruby 3 の型解析に向けた計画
Ruby 3 の型解析に向けた計画
 
本番環境で使える実行コード記録機能
本番環境で使える実行コード記録機能本番環境で使える実行コード記録機能
本番環境で使える実行コード記録機能
 
Transcendental Programming in Ruby
Transcendental Programming in RubyTranscendental Programming in Ruby
Transcendental Programming in Ruby
 
Cookpad Hackarade #04: Create Your Own Interpreter
Cookpad Hackarade #04: Create Your Own InterpreterCookpad Hackarade #04: Create Your Own Interpreter
Cookpad Hackarade #04: Create Your Own Interpreter
 
Ruby 3のキーワード引数について考える
Ruby 3のキーワード引数について考えるRuby 3のキーワード引数について考える
Ruby 3のキーワード引数について考える
 
TRICK 2018 results
TRICK 2018 resultsTRICK 2018 results
TRICK 2018 results
 
Esoteric, Obfuscated, Artistic Programming in Ruby
Esoteric, Obfuscated, Artistic Programming in RubyEsoteric, Obfuscated, Artistic Programming in Ruby
Esoteric, Obfuscated, Artistic Programming in Ruby
 
Cookpad Spring 1day internship 2018 超絶技巧プログラミングコース資料
Cookpad Spring 1day internship 2018 超絶技巧プログラミングコース資料Cookpad Spring 1day internship 2018 超絶技巧プログラミングコース資料
Cookpad Spring 1day internship 2018 超絶技巧プログラミングコース資料
 
Esoteric, Obfuscated, Artistic Programming in Ruby
Esoteric, Obfuscated, Artistic Programming in RubyEsoteric, Obfuscated, Artistic Programming in Ruby
Esoteric, Obfuscated, Artistic Programming in Ruby
 
An introduction and future of Ruby coverage library
An introduction and future of Ruby coverage libraryAn introduction and future of Ruby coverage library
An introduction and future of Ruby coverage library
 
Ruby でつくる型付き Ruby
Ruby でつくる型付き RubyRuby でつくる型付き Ruby
Ruby でつくる型付き Ruby
 
Ruby で高速なプログラムを書く
Ruby で高速なプログラムを書くRuby で高速なプログラムを書く
Ruby で高速なプログラムを書く
 

Recently uploaded

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...Elena Simperl
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Product School
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backElena Simperl
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsVlad Stirbu
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsExpeed Software
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsPaul Groth
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Product School
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Thierry Lestable
 

Recently uploaded (20)

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 

Ruby 3の型解析に向けた計画