Osamu Watanabe

183 papers A* 10A 10B 29C 3Misc 6Journal 95Unranked 26
YearRankTypeTitle / Venue / Authors
2020 J jnl
Theor. Comput. Sci.
Tong Qin, Osamu Watanabe
2020 conf
Complexity and Approximation
Shuichi Hirahara, Osamu Watanabe
2020 conf
APPROX-RANDOM
Shuichi Hirahara, Osamu Watanabe
2020 B conf
WALCOM
Osamu Watanabe
2020 J jnl
Comput. Complex.
Edith Hemaspaandra, Lane A. Hemaspaandra, Holger Spakowski, Osamu Watanabe
2019 J jnl
IEICE Trans. Fundam. Electron. Commun. Comput. Sci.
Ryo Ashida, Sebastian Kuhnert, Osamu Watanabe
2019 J jnl
Electron. Colloquium Comput. Complex.
Ryo Ashida, Tatsuya Imai, Kotaro Nakagawa, A. Pavan, N. V. Vinodchandran, Osamu Watanabe
2019 J jnl
Electron. Colloquium Comput. Complex.
Shuichi Hirahara, Osamu Watanabe
2019 J jnl
Discret. Appl. Math.
David Avis, David Bremner, Hans Raj Tiwary, Osamu Watanabe
2018 B conf
WALCOM
Tong Qin, Osamu Watanabe
2018 J jnl
Appl. Algebra Eng. Commun. Comput.
Yoshinori Aono, Manindra Agrawal, Takakazu Satoh, Osamu Watanabe
2018 B conf
MFCS
Edith Hemaspaandra, Lane A. Hemaspaandra, Holger Spakowski, Osamu Watanabe
2017 J jnl
Electron. Colloquium Comput. Complex.
Tong Qin, Osamu Watanabe
2017 J jnl
Theory Comput. Syst.
Suguru Tamaki, Osamu Watanabe
2017 J jnl
Theory Comput. Syst.
Akinori Kawachi, Benjamin Rossman, Osamu Watanabe
2017 J jnl
CoRR
Edith Hemaspaandra, Lane A. Hemaspaandra, Holger Spakowski, Osamu Watanabe
2016 J jnl
Algorithmica
Daniel Kane, Osamu Watanabe
2016 A conf
CCC
Shuichi Hirahara, Osamu Watanabe
2016 B conf
SOFSEM
Tatsuya Imai, Osamu Watanabe
2015 B conf
Discovery Science
Linus Hermansson, Fredrik D. Johansson, Osamu Watanabe
2015 J jnl
CoRR
Linus Hermansson, Fredrik D. Johansson, Osamu Watanabe
2015 J jnl
J. Discrete Algorithms
Johannes Köbler, Sebastian Kuhnert, Osamu Watanabe
2015 J jnl
Electron. Colloquium Comput. Complex.
Shuichi Hirahara, Osamu Watanabe
2015 J jnl
CoRR
Ryuhei Mori, Osamu Watanabe
2014 B conf
ISAAC
Daniel M. Kane, Osamu Watanabe
2014 J jnl
CoRR
Ryuhei Mori, Takeshi Koshiba, Osamu Watanabe, Masaki Yamamoto
2014 J jnl
Electron. Colloquium Comput. Complex.
Tetsuo Asano, David G. Kirkpatrick, Kotaro Nakagawa, Osamu Watanabe
2014 J jnl
CoRR
David Avis, David Bremner, Hans Raj Tiwary, Osamu Watanabe
2014 Misc conf
CSR
Akinori Kawachi, Benjamin Rossman, Osamu Watanabe
2014 conf
MFCS (2)
Tetsuo Asano, David G. Kirkpatrick, Kotaro Nakagawa, Osamu Watanabe
2013 J jnl
Electron. Colloquium Comput. Complex.
Daniel M. Kane, Osamu Watanabe
2013 A conf
CCC
Tatsuya Imai, Kotaro Nakagawa, Aduri Pavan, N. V. Vinodchandran, Osamu Watanabe
2013 J jnl
Comput. Complex.
Holger Dell, Valentine Kabanets, Dieter van Melkebeek, Osamu Watanabe
2013 J jnl
Algorithmica
Osamu Watanabe
2012 J jnl
IEICE Trans. Inf. Syst.
Akinori Kawachi, Hidetoki Tanaka, Osamu Watanabe
2012 B conf
ISAAC
Johannes Köbler, Sebastian Kuhnert, Osamu Watanabe
2012 J jnl
Electron. Colloquium Comput. Complex.
Sebastian Kuhnert, Johannes Köbler, Osamu Watanabe
2012 A conf
CCC
Holger Dell, Valentine Kabanets, Dieter van Melkebeek, Osamu Watanabe
2012 Misc conf
ACISP
Yoshinori Aono, Manindra Agrawal, Takakazu Satoh, Osamu Watanabe
2012 J jnl
IACR Cryptol. ePrint Arch.
Yoshinori Aono, Manindra Agrawal, Takakazu Satoh, Osamu Watanabe
2012 J jnl
Electron. J. Comb.
Amin Coja-Oghlan, Mikael Onsjö, Osamu Watanabe
2012 J jnl
Electron. Colloquium Comput. Complex.
Akinori Kawachi, Benjamin Rossman, Osamu Watanabe
2011 J jnl
J. Graph Algorithms Appl.
Takeya Shigezumi, Yushi Uno, Osamu Watanabe
2011 B ed.
ISAAC
Takao Asano, Shin-Ichi Nakano, Yoshio Okamoto, Osamu Watanabe
2011 A* conf
IJCAI
Yoshikazu Kobayashi, Akihiro Kishimoto, Osamu Watanabe
2011 J jnl
Electron. Colloquium Comput. Complex.
Valentine Kabanets, Osamu Watanabe
2011 J jnl
IEICE Trans. Fundam. Electron. Commun. Comput. Sci.
Tomonori Ando, Yoshiyuki Kabashima, Hisanao Takahashi, Osamu Watanabe, Masaki Yamamoto
2010 B conf
WALCOM
Takeya Shigezumi, Yushi Uno, Osamu Watanabe
2010 J jnl
Theor. Comput. Sci.
Osamu Watanabe, Masaki Yamamoto
2010 J jnl
IEEE Trans. Comput. Intell. AI Games
Yusuke Soejima, Akihiro Kishimoto, Osamu Watanabe
2010 J jnl
Theor. Comput. Sci.
Edith Hemaspaandra, Lane A. Hemaspaandra, Till Tantau, Osamu Watanabe
2010 conf
APPROX-RANDOM
Amin Coja-Oghlan, Mikael Onsjö, Osamu Watanabe
2010 J jnl
Random Struct. Algorithms
Toshiya Itoh, Osamu Watanabe
2009 C conf
CTW
Takeya Shigezumi, Yushi Uno, Osamu Watanabe
2009 J jnl
Theory Comput. Syst.
Mikael Onsjö, Osamu Watanabe
2009 A conf
CCC
Manindra Agrawal, Osamu Watanabe
2009 J jnl
Electron. Colloquium Comput. Complex.
Manindra Agrawal, Osamu Watanabe
2009 J jnl
Theor. Comput. Sci.
Naoto Miyoshi, Takeya Shigezumi, Ryuhei Uehara, Osamu Watanabe
2009 ed.
SAGA
Osamu Watanabe, Thomas Zeugmann
2009 J jnl
Electron. Colloquium Comput. Complex.
Akinori Kawachi, Osamu Watanabe
2009 J jnl
Theory Comput. Syst.
Mikael Onsjö, Osamu Watanabe
2008 J jnl
Theory Comput. Syst.
José L. Balcázar, Yang Dai, Junichi Tanaka, Osamu Watanabe
2008 C conf
AAIM
Naoto Miyoshi, Takeya Shigezumi, Ryuhei Uehara, Osamu Watanabe
2007 C conf
CiE
Osamu Watanabe, Mikael Onsjö
2007 B conf
FCT
Edith Hemaspaandra, Lane A. Hemaspaandra, Till Tantau, Osamu Watanabe
2007 J jnl
Theory Comput. Syst.
Thomas Hofmeister, Uwe Schöning, Rainer Schuler, Osamu Watanabe
2007 J jnl
CoRR
Toshiya Itoh, Osamu Watanabe
2006 B conf
ISAAC
Mikael Onsjö, Osamu Watanabe
2006 A conf
SAT
Osamu Watanabe, Masaki Yamamoto
2006 J jnl
Algorithmica
Jin-Yi Cai, Osamu Watanabe
2005 J jnl
Theor. Comput. Sci.
Osamu Watanabe
2005 conf
SAGA
Osamu Watanabe
2005 J jnl
Inf. Process. Lett.
Ryoichi Kato, Osamu Watanabe
2005 J jnl
CoRR
Edith Hemaspaandra, Lane A. Hemaspaandra, Osamu Watanabe
2004 J jnl
Theory Comput. Syst.
Shin Aida, Marcel Crâsmaru, Kenneth W. Regan, Osamu Watanabe
2004 B conf
ALT
Kohei Hatano, Osamu Watanabe
2004 J jnl
SIAM J. Comput.
Jin-Yi Cai, Osamu Watanabe
2004 B conf
ISAAC
Jin-Yi Cai, Osamu Watanabe
2004 J jnl
Inf. Process. Lett.
Jin-Yi Cai, Osamu Watanabe
2003 conf
SAGA
Osamu Watanabe, Takeshi Sawai, Hayato Takahashi
2003 Misc conf
COCOON
Jin-Yi Cai, Osamu Watanabe
2003 conf
FSTTCS
Jin-Yi Cai, Osamu Watanabe
2002 A conf
STACS
Thomas Hofmeister, Uwe Schöning, Rainer Schuler, Osamu Watanabe
2002 J jnl
Data Min. Knowl. Discov.
Carlos Domingo, Ricard Gavaldà, Osamu Watanabe
2002 conf
Progress in Discovery Science
Osamu Watanabe
2002 A conf
STACS
Shin Aida, Marcel Crâsmaru, Kenneth W. Regan, Osamu Watanabe
2002 J jnl
Theor. Comput. Sci.
Osamu Watanabe, Arun Sharma
2002 J jnl
Theory Comput. Syst.
Shin Aida, Rainer Schuler, Tatsuie Tsukiji, Osamu Watanabe
2001 B conf
ALT
José L. Balcázar, Yang Dai, Osamu Watanabe
2001 Misc conf
COCOON
Kyoichi Okamoto, Osamu Watanabe
2001 B conf
SOFSEM
Osamu Watanabe
2001 conf
RANDOM-APPROX
Kazuyuki Amano, John Tromp, Paul M. B. Vitányi, Osamu Watanabe
2001 A conf
STACS
Shin Aida, Rainer Schuler, Tatsuie Tsukiji, Osamu Watanabe
2001 A* conf
ICDM
José L. Balcázar, Yang Dai, Osamu Watanabe
2001 conf
SAGA
Ricard Gavaldà, Osamu Watanabe
2000 J jnl
Inf. Process. Lett.
Rajesh P. N. Rao, Jörg Rothe, Osamu Watanabe
2000 A* conf
COLT
Carlos Domingo, Osamu Watanabe
2000 J jnl
Electron. Colloquium Comput. Complex.
Shin Aida, Rainer Schuler, Tatsuie Tsukiji, Osamu Watanabe
2000 J jnl
Theory Comput. Syst.
Wolfgang Lindner, Rainer Schuler, Osamu Watanabe
2000 B conf
PAKDD
Carlos Domingo, Osamu Watanabe
2000 B conf
ALT
Osamu Watanabe
2000 ed.
IFIP TCS
Jan van Leeuwen, Osamu Watanabe, Masami Hagiya, Peter D. Mosses, Takayasu Ito
1999 B conf
Discovery Science
Carlos Domingo, Ricard Gavaldà, Osamu Watanabe
1999 B ed.
ALT
Osamu Watanabe, Takashi Yokomori
1999 J jnl
CoRR
Lane A. Hemaspaandra, Zhigen Jiang, Jörg Rothe, Osamu Watanabe
1999 A* conf
ICALP
Osamu Watanabe
1999 J jnl
CoRR
Lane A. Hemaspaandra, Zhigen Jiang, Jörg Rothe, Osamu Watanabe
1999 Misc conf
COCOON
Peter Bro Miltersen, N. V. Vinodchandran, Osamu Watanabe
1998 conf
RANDOM
Carlos Domingo, Osamu Watanabe, Tadashi Yamazaki
1998 J jnl
CoRR
Carlos Domingo, Osamu Watanabe, Tadashi Yamazaki
1998 J jnl
Theor. Comput. Sci.
Lane A. Hemaspaandra, Zhigen Jiang, Jörg Rothe, Osamu Watanabe
1998 J jnl
CoRR
Satoshi Horie, Osamu Watanabe
1998 J jnl
SIAM J. Comput.
Johannes Köbler, Osamu Watanabe
1998 B conf
Discovery Science
Carlos Domingo, Ricard Gavaldà, Osamu Watanabe
1998 J jnl
CoRR
Carlos Domingo, Ricard Gavaldà, Osamu Watanabe
1998 A conf
CCC
Wolfgang Lindner, Rainer Schuler, Osamu Watanabe
1997 conf
Advances in Algorithms, Languages, and Complexity
José L. Balcázar, Ricard Gavaldà, Osamu Watanabe
1997 B conf
ISAAC
Satoshi Horie, Osamu Watanabe
1997 B conf
ALT
Carlos Domingo, Tatsuie Tsukiji, Osamu Watanabe
1997 J jnl
Inf. Process. Lett.
Carlos Domingo, Tatsuie Tsukiji, Osamu Watanabe
1997 J jnl
J. Univers. Comput. Sci.
Lane A. Hemaspaandra, Zhigen Jiang, Jörg Rothe, Osamu Watanabe
1996 B conf
ISAAC
Osamu Watanabe, Osamu Yamashita
1996 J jnl
J. Univers. Comput. Sci.
José L. Balcázar, Josep Díaz, Ricard Gavaldà, Osamu Watanabe
1996 J jnl
J. Comput. Syst. Sci.
Mitsunori Ogihara, Thomas Thierauf, Seinosuke Toda, Osamu Watanabe
1996 J jnl
Inf. Comput.
Ronald V. Book, Osamu Watanabe
1996 J jnl
RAIRO Theor. Informatics Appl.
Thomas Thierauf, Seinosuke Toda, Osamu Watanabe
1996 conf
SWAT
Hoong Chuin Lau, Osamu Watanabe
1996 J jnl
Nord. J. Comput.
Hoong Chuin Lau, Osamu Watanabe
1996 Misc conf
COCOON
Lane A. Hemaspaandra, Zhigen Jiang, Jörg Rothe, Osamu Watanabe
1995 A* conf
ICALP
Johannes Köbler, Osamu Watanabe
1995 J jnl
Inf. Comput.
Luc Longpré, Osamu Watanabe
1995 conf
SCT
Rainer Schuler, Osamu Watanabe
1994 J jnl
Math. Syst. Theory
Osamu Watanabe
1994 A* conf
COLT
José L. Balcázar, Josep Díaz, Ricard Gavaldà, Osamu Watanabe
1994 J jnl
J. ACM
Pekka Orponen, Ker-I Ko, Uwe Schöning, Osamu Watanabe
1994 J jnl
Comput. Complex.
Thomas Thierauf, Seinosuke Toda, Osamu Watanabe
1994 B conf
ISAAC
Ronald V. Book, Osamu Watanabe
1994 A conf
STACS
Thomas Thierauf, Seinosuke Toda, Osamu Watanabe
1994 J jnl
Math. Syst. Theory
Osamu Watanabe, Ricard Gavaldà
1994 conf
SCT
Osamu Watanabe
1994 J jnl
New Gener. Comput.
José L. Balcázar, Josep Díaz, Ricard Gavaldà, Osamu Watanabe
1994 J jnl
Inf. Process. Lett.
Rajesh P. N. Rao, Jörg Rothe, Osamu Watanabe
1993 ch.
Current Trends in Theoretical Computer Science
Ronald V. Book, Osamu Watanabe
1993 conf
SCT
Mitsunori Ogiwara, Thomas Thierauf, Seinosuke Toda, Osamu Watanabe
1993 J jnl
SIAM J. Comput.
Ricard Gavaldà, Osamu Watanabe
1993 J jnl
Math. Syst. Theory
Osamu Watanabe, Seinosuke Toda
1992 B conf
ALT
José L. Balcázar, Josep Díaz, Ricard Gavaldà, Osamu Watanabe
1992 B conf
ISAAC
Kaoru Kurosawa, Osamu Watanabe
1992 conf
SCT
Lane A. Hemachandra, Mitsunori Ogiwara, Osamu Watanabe
1992 J jnl
J. Comput. Syst. Sci.
Osamu Watanabe
1992 J jnl
Theor. Comput. Sci.
Osamu Watanabe, Shouwen Tang
1992 B conf
ISAAC
Luc Longpré, Osamu Watanabe
1992 B conf
MFCS
Osamu Watanabe
1992 J jnl
Theor. Comput. Sci.
Seinosuke Toda, Osamu Watanabe
1992 J jnl
SIAM J. Comput.
Eric Allender, Lane A. Hemachandra, Mitsunori Ogiwara, Osamu Watanabe
1991 J jnl
Math. Syst. Theory
Osamu Watanabe
1991 J jnl
SIAM J. Comput.
Mitsunori Ogiwara, Osamu Watanabe
1991 conf
SCT
Ricard Gavaldà, Osamu Watanabe
1991 J jnl
Theor. Comput. Sci.
Osamu Watanabe
1991 conf
SCT
Eric Allender, Lane A. Hemachandra, Mitsunori Ogiwara, Osamu Watanabe
1990 A* conf
ICALP
Osamu Watanabe
1990 B conf
MFCS
Ricard Gavaldà, Leen Torenvliet, Osamu Watanabe, José L. Balcázar
1990 J jnl
Inf. Comput.
Eric Allender, Osamu Watanabe
1990 A* conf
STOC
Mitsunori Ogiwara, Osamu Watanabe
1990 conf
SCT
Mitsunori Ogiwara, Osamu Watanabe
1990 conf
SIGAL International Symposium on Algorithms
Osamu Watanabe, Seinosuke Toda
1989 J jnl
Bull. EATCS
Ronald V. Book, Osamu Watanabe
1989 conf
SCT
Osamu Watanabe, Shouwen Tang
1989 J jnl
SIAM J. Comput.
Shouwen Tang, Osamu Watanabe
1988 conf
SCT
Eric Allender, Osamu Watanabe
1988 J jnl
SIAM J. Comput.
Ronald V. Book, Pekka Orponen, David A. Russo, Osamu Watanabe
1988 J jnl
Inf. Process. Lett.
Osamu Watanabe
1988 conf
SCT
Shouwen Tang, Osamu Watanabe
1988 A* conf
ICALP
Osamu Watanabe
1987 J jnl
Theor. Comput. Sci.
Osamu Watanabe
1987
On the structure of interactable complexity classes.
Osamu Watanabe
1987 conf
SCT
Osamu Watanabe
1986 A* conf
ICALP
Ronald V. Book, Pekka Orponen, David A. Russo, Osamu Watanabe
1986 conf
SCT
Ker-I Ko, Pekka Orponen, Uwe Schöning, Osamu Watanabe
1985 J jnl
Theor. Comput. Sci.
Osamu Watanabe
1983 J jnl
Theor. Comput. Sci.
Osamu Watanabe
1981 J jnl
Inf. Process. Lett.
Osamu Watanabe
1980 J jnl
Inf. Process. Lett.
Osamu Watanabe
docs/apk-code-schema.md
← Index docs/apk-code-schema.md markdown
# APK Code Analysis — ClickHouse Schema

All tables follow the `ReplacingMergeTree(analysis_date)` pattern from
`docs/new-code-binja-schema.md`, except `code_apk_analysis_errors` which
uses `MergeTree()`.

**Companion PDD:** `APK_CODE_ANALYSIS_PDD-Tech_Annex.md` §7

---

## Table overview

| # | Table | Analog (Binja) | Engine | Key |
|---|-------|----------------|--------|-----|
| 1 | `code_apk_decompiled_methods_content` | `code_binja_decompiled_functions_content` | ReplacingMergeTree | `decompiled_method_hash` |
| 2 | `code_apk_decompiled_methods_references` | `code_binja_decompiled_functions_references` | ReplacingMergeTree | `(sha256, decompiled_method_hash)` |
| 3 | `code_apk_smali_methods_content` | `code_binja_disassembled_functions_content` | ReplacingMergeTree | `smali_method_hash` |
| 4 | `code_apk_smali_methods_references` | `code_binja_disassembled_functions_references` | ReplacingMergeTree | `(sha256, smali_method_hash)` |
| 5 | `code_apk_method_similarity_metrics` | `code_binja_function_similarity_metrics` | ReplacingMergeTree | `smali_method_hash` |
| 6 | `code_apk_cfg_methods` | `code_binja_cfg_functions` | ReplacingMergeTree | `smali_method_hash` |
| 7 | `code_binja_strings_raw` *(shared)* | — | Null (→ MV) | — |
| 8 | `code_apk_analysis_errors` | `function_analysis_errors_binja` | MergeTree | `(sha256, error_location, error_hash)` |

---

## Table 1: `code_apk_decompiled_methods_content`

**Analog:** `code_binja_decompiled_functions_content`

```sql
CREATE TABLE IF NOT EXISTS code_apk_decompiled_methods_content (
    decompiled_method_hash FixedString(64),          -- SHA-256 of normalized Java source
    decompiled_method String CODEC(ZSTD(3)),          -- Full Java method source
    decompiled_method_type Enum8('USER'=1, 'LIBRARY'=2, 'UNKNOWN'=5) DEFAULT 'UNKNOWN',
    decompiled_has_string_encryption UInt8 DEFAULT 0,
    decompiled_has_reflection_calls UInt8 DEFAULT 0,
    decompiled_excessive_goto_count UInt8 DEFAULT 0,
    analysis_date DateTime64(3, 'UTC'),

    INDEX idx_method_content_token lower(decompiled_method) TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 1
) ENGINE = ReplacingMergeTree(analysis_date)
ORDER BY decompiled_method_hash;
```

## Table 2: `code_apk_decompiled_methods_references`

**Analog:** `code_binja_decompiled_functions_references`

```sql
CREATE TABLE IF NOT EXISTS code_apk_decompiled_methods_references (
    sha256 FixedString(64),
    decompiled_method_hash FixedString(64),
    smali_method_hash Nullable(FixedString(64)),
    decompiled_class_name LowCardinality(String),
    decompiled_method_name LowCardinality(String),
    decompiled_method_signature String,               -- Dalvik descriptor: (Landroid/os/Bundle;)V
    decompiled_method_prototype String,               -- Java-style: void onCreate(Bundle)
    functions_caller Array(String),
    functions_call Array(String),
    analysis_date DateTime64(3, 'UTC'),

    INDEX idx_decompiled_class_name decompiled_class_name TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 1,
    INDEX idx_decompiled_method_name decompiled_method_name TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 1,
    INDEX idx_functions_caller functions_caller TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 1,
    INDEX idx_functions_call functions_call TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 1
) ENGINE = ReplacingMergeTree(analysis_date)
ORDER BY (sha256, decompiled_method_hash);
```

## Table 3: `code_apk_smali_methods_content`

**Analog:** `code_binja_disassembled_functions_content`

```sql
CREATE TABLE IF NOT EXISTS code_apk_smali_methods_content (
    smali_method_hash FixedString(64),                -- SHA-256 of normalized smali body
    smali_method String CODEC(ZSTD(3)),               -- Full smali method body
    smali_method_type Enum8('USER'=1, 'LIBRARY'=2, 'UNKNOWN'=5) DEFAULT 'UNKNOWN',
    smali_instructions_count UInt32,
    smali_register_count UInt16,
    smali_has_string_encryption UInt8 DEFAULT 0,
    smali_has_reflection_calls UInt8 DEFAULT 0,
    smali_excessive_goto_count UInt8 DEFAULT 0,
    smali_flattened_score Float64 DEFAULT 0.0,       -- Control flow flattening score (0.01.0)
    smali_mba_score Float64 DEFAULT 0.0,             -- Mixed boolean-arithmetic score (0.01.0)
    analysis_date DateTime64(3, 'UTC'),

    INDEX idx_smali_ngram smali_method TYPE ngrambf_v1(3, 32768, 3, 0) GRANULARITY 1,
    INDEX idx_smali_method_type smali_method_type TYPE set(3) GRANULARITY 1,
    INDEX idx_smali_instr_count smali_instructions_count TYPE minmax GRANULARITY 4,
    INDEX idx_smali_reg_count smali_register_count TYPE minmax GRANULARITY 4,
    INDEX idx_smali_flattened smali_flattened_score TYPE minmax GRANULARITY 4,
    INDEX idx_smali_mba smali_mba_score TYPE minmax GRANULARITY 4
) ENGINE = ReplacingMergeTree(analysis_date)
ORDER BY smali_method_hash;
```

## Table 4: `code_apk_smali_methods_references`

**Analog:** `code_binja_disassembled_functions_references`

```sql
CREATE TABLE IF NOT EXISTS code_apk_smali_methods_references (
    sha256 FixedString(64),
    smali_method_hash FixedString(64),
    decompiled_method_hash Nullable(FixedString(64)),
    smali_class_name LowCardinality(String),
    smali_method_name LowCardinality(String),
    smali_method_signature String,
    analysis_date DateTime64(3, 'UTC'),

    INDEX idx_smali_class_name smali_class_name TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 1,
    INDEX idx_smali_method_name smali_method_name TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 1
) ENGINE = ReplacingMergeTree(analysis_date)
ORDER BY (sha256, smali_method_hash);
```

## Table 5: `code_apk_method_similarity_metrics`

**Analog:** `code_binja_function_similarity_metrics`

Content-based fuzzy matching table. Structural/CFG scalars (block_count, edge_count, etc.)
are in `code_apk_cfg_methods` (Table 6) — this table holds only fuzzy hashes and MinHash.

```sql
CREATE TABLE IF NOT EXISTS code_apk_method_similarity_metrics (
    smali_method_hash FixedString(64),
    -- Raw smali fuzzy hashes (analog: ssdeep_disassembly / tlsh_disassembly)
    ssdeep_smali Nullable(String),
    tlsh_smali Nullable(FixedString(72)),
    -- Semantically normalized smali fuzzy hashes (analog: ssdeep_llil / tlsh_llil)
    ssdeep_smali_normalized Nullable(String),
    tlsh_smali_normalized Nullable(FixedString(72)),
    minhash Array(UInt8),
    analysis_date DateTime64(3, 'UTC'),

    INDEX idx_ssdeep ssdeep_smali TYPE bloom_filter GRANULARITY 1,
    INDEX idx_tlsh tlsh_smali TYPE bloom_filter GRANULARITY 1,
    INDEX idx_ssdeep_norm ssdeep_smali_normalized TYPE bloom_filter GRANULARITY 1,
    INDEX idx_tlsh_norm tlsh_smali_normalized TYPE bloom_filter GRANULARITY 1
) ENGINE = ReplacingMergeTree(analysis_date)
ORDER BY smali_method_hash;
```

## Table 6: `code_apk_cfg_methods`

**Analog:** `code_binja_cfg_functions` (see `db_migration/cfg_functions_ddl.sql`)

Structural and topological features computed from smali CFG. All fields mirror
the Binja table with APK-appropriate naming.

```sql
CREATE TABLE IF NOT EXISTS code_apk_cfg_methods (
    -- Identity
    smali_method_hash FixedString(64),

    -- Tier 0: Exact structural match
    cfg_topology_hash FixedString(16),

    -- Tier 1: Structural pre-filtering
    block_count UInt16,
    edge_count UInt16,
    cfg_instructions_count UInt32,            -- Dalvik instruction count (analog: llil_total_operations)
    call_count UInt16,
    cyclomatic_complexity UInt16,
    loop_count UInt16,
    max_depth UInt16,
    max_fan_out UInt16,
    md_index_topdown UInt64,
    md_index_bottomup UInt64,
    prime_product_smali UInt64,              -- Dalvik semantic primes (analog: prime_product_llil)

    -- Tier 2: Fuzzy matching
    cfg_feature_tlsh Nullable(FixedString(72)),
    wl_minhash Array(UInt8),

    -- Embedding-ready storage
    bb_features Array(Array(UInt16)),        -- ACFG block feature vectors
    cfg_adjacency Array(UInt32),             -- Packed (src << 16 | tgt)

    analysis_date DateTime64(3, 'UTC'),

    -- Indexes
    INDEX idx_topology cfg_topology_hash TYPE bloom_filter GRANULARITY 1,
    INDEX idx_complexity cyclomatic_complexity TYPE minmax GRANULARITY 4,
    INDEX idx_block_count block_count TYPE minmax GRANULARITY 4,
    INDEX idx_edge_count edge_count TYPE minmax GRANULARITY 4,
    INDEX idx_call_count call_count TYPE minmax GRANULARITY 4,
    INDEX idx_cfg_instr_count cfg_instructions_count TYPE minmax GRANULARITY 4,
    INDEX idx_loop_count loop_count TYPE minmax GRANULARITY 4,
    INDEX idx_max_depth max_depth TYPE minmax GRANULARITY 4,
    INDEX idx_max_fan_out max_fan_out TYPE minmax GRANULARITY 4,
    INDEX idx_md_topdown md_index_topdown TYPE minmax GRANULARITY 4,
    INDEX idx_md_bottomup md_index_bottomup TYPE minmax GRANULARITY 4,
    INDEX idx_prime prime_product_smali TYPE bloom_filter GRANULARITY 1,
    INDEX idx_cfg_tlsh cfg_feature_tlsh TYPE bloom_filter GRANULARITY 1
) ENGINE = ReplacingMergeTree(analysis_date)
ORDER BY smali_method_hash;
```

**Column mapping (APK → Binja):**

| APK column | Binja column | Notes |
|------------|-------------|-------|
| `smali_method_hash` | `disassembled_function_hash` | Both SHA-256 of normalized code |
| `cfg_instructions_count` | `llil_total_operations` | Dalvik instructions vs LLIL operations |
| `prime_product_smali` | `prime_product_llil` | Same prime algorithm, Dalvik semantic categories |
| All others | Same name | Identical algorithms from shared `cfg_features.py` |

## Table 7: `code_binja_strings_raw` (shared)

APK strings are inserted into the existing `code_binja_strings_raw` Null-engine table,
which feeds materialized views (`code_binja_strings_by_binary`, `mv_string_popularity_public`).
This enables cross-format string correlation between PE/ELF/Mach-O/APK samples.

No new table creation needed — see `docs/new-code-binja-schema.md` for the existing DDL.

## Table 8: `code_apk_analysis_errors`

**Analog:** `function_analysis_errors_binja`

```sql
CREATE TABLE IF NOT EXISTS code_apk_analysis_errors (
    sha256 FixedString(64),
    class_name Nullable(String) CODEC(ZSTD(3)),
    method_name Nullable(String) CODEC(ZSTD(3)),
    error_location LowCardinality(String) CODEC(ZSTD(3)),   -- 'jadx', 'apktool', 'androguard', 'analysis'
    error_message Nullable(String) CODEC(ZSTD(3)),
    error_type Nullable(String) CODEC(ZSTD(3)),
    error_hash FixedString(32),                               -- MD5 for dedup
    status Enum8('new' = 1, 'investigating' = 2, 'fixed' = 3, 'wontfix' = 4) DEFAULT 'new',
    analysis_date DateTime64(3, 'UTC')
) ENGINE = MergeTree()
ORDER BY (sha256, error_location, error_hash);
```