Omar Ghattas

137 papers A* 4A 18Misc 5Journal 104Unranked 5
YearRankTypeTitle / Venue / Authors
2026 J jnl
CoRR
Jiqun Tu, Ian Karlin, John Camier, Veselin Dobrev, Tzanio V. Kolev, Stefan Henneking, Omar Ghattas
2026 J jnl
J. Comput. Phys.
Stefan Henneking, Sreeram Venkat, Omar Ghattas
2026 J jnl
J. Mach. Learn. Res.
Lianghao Cao, Joshua Chen, Michael Brennan, Thomas O'Leary-Roseberry, Youssef Marzouk, Omar Ghattas
2026 J jnl
CoRR
Stefan Henneking, Fabian Kutschera, Sreeram Venkat, Alice-Agnes Gabriel, Omar Ghattas
2026 J jnl
CoRR
Xindi Gong, Dingcheng Luo, Thomas O'Leary-Roseberry, Ruanui Nicholson, Omar Ghattas
2026 J jnl
CoRR
Nick Alger, Blake Christierson, Peng Chen, Omar Ghattas
2025 J jnl
CoRR
Mathew Hu, Nick Alger, Rami Nammour, Omar Ghattas
2025 J jnl
CoRR
Boyuan Yao, Dingcheng Luo, Lianghao Cao, Nikola B. Kovachki, Thomas O'Leary-Roseberry, Omar Ghattas
2025 J jnl
J. Mach. Learn. Res.
Lianghao Cao, Thomas O'Leary-Roseberry, Omar Ghattas
2025 J jnl
CoRR
Dingcheng Luo, Thomas O'Leary-Roseberry, Peng Chen, Omar Ghattas
2025 J jnl
SIAM J. Sci. Comput.
Dingcheng Luo, Thomas O'Leary-Roseberry, Peng Chen, Omar Ghattas
2025 J jnl
SIAM J. Sci. Comput.
Sreeram Venkat, Milinda Fernando, Stefan Henneking, Omar Ghattas
2025 J jnl
CoRR
Stefan Henneking, Sreeram Venkat, Omar Ghattas
2025 conf
SC Workshops
Sreeram Venkat, Kasia Swirydowicz, Noah Wolfe, Omar Ghattas
2025 J jnl
CoRR
Sreeram Venkat, Kasia Swirydowicz, Noah Wolfe, Omar Ghattas
2025 A conf
SC
Stefan Henneking, Sreeram Venkat, Veselin Dobrev, John Camier, Tzanio V. Kolev, Milinda Fernando, Alice-Agnes Gabriel, Omar Ghattas
2025 J jnl
CoRR
Stefan Henneking, Sreeram Venkat, Veselin Dobrev, John Camier, Tzanio V. Kolev, Milinda Fernando, Alice-Agnes Gabriel, Omar Ghattas
2024 J jnl
J. Comput. Phys.
Ricardo Baptista, Lianghao Cao, Joshua Chen, Omar Ghattas, Fengyi Li, Youssef M. Marzouk, J. Tinsley Oden
2024 J jnl
J. Comput. Phys.
Thomas O'Leary-Roseberry, Peng Chen, Umberto Villa, Omar Ghattas
2024 J jnl
CoRR
Lianghao Cao, Thomas O'Leary-Roseberry, Omar Ghattas
2024 J jnl
CoRR
Sreeram Venkat, Milinda Fernando, Stefan Henneking, Omar Ghattas
2024 J jnl
CoRR
Dingcheng Luo, Joshua Chen, Peng Chen, Omar Ghattas
2024 J jnl
CoRR
Joseph Kirchhoff, Dingcheng Luo, Thomas O'Leary-Roseberry, Omar Ghattas
2024 J jnl
CoRR
Lianghao Cao, Joshua Chen, Michael Brennan, Thomas O'Leary-Roseberry, Youssef M. Marzouk, Omar Ghattas
2024 J jnl
SIAM J. Sci. Comput.
Nick Alger, Tucker Hartland, Noemi Petra, Omar Ghattas
2024 J jnl
CoRR
Julie Pham, Omar Ghattas, Noel Clemens, Karen Willcox
2024 J jnl
J. Open Source Softw.
Dingcheng Luo, Peng Chen, Thomas O'Leary-Roseberry, Umberto Villa, Omar Ghattas
2023 J jnl
SIAM/ASA J. Uncertain. Quantification
Keyi Wu, Peng Chen, Omar Ghattas
2023 J jnl
SIAM J. Sci. Comput.
Keyi Wu, Peng Chen, Omar Ghattas
2023 J jnl
CoRR
Lianghao Cao, Keyi Wu, J. Tinsley Oden, Peng Chen, Omar Ghattas
2023 J jnl
CoRR
Dingcheng Luo, Thomas O'Leary-Roseberry, Peng Chen, Omar Ghattas
2023 J jnl
Comput. Math. Appl.
Jeonghun J. Lee, Omar Ghattas
2023 J jnl
J. Sci. Comput.
Keyi Wu, Thomas O'Leary-Roseberry, Peng Chen, Omar Ghattas
2023 J jnl
J. Comput. Phys.
Dingcheng Luo, Lianghao Cao, Peng Chen, Omar Ghattas, J. Tinsley Oden
2023 J jnl
CoRR
Nick Alger, Tucker Hartland, Noemi Petra, Omar Ghattas
2023 J jnl
J. Comput. Phys.
Lianghao Cao, Thomas O'Leary-Roseberry, Prashant K. Jha, J. Tinsley Oden, Omar Ghattas
2023 J jnl
ACM Trans. Math. Softw.
Ki-Tae Kim, Umberto Villa, Matthew D. Parno, Youssef M. Marzouk, Omar Ghattas, Noemi Petra
2022 A conf
SC
Milinda Fernando, David Neilsen, Eric W. Hirschmann, Yosef Zlochower, Hari Sundar, Omar Ghattas, George Biros
2022 J jnl
SIAM J. Sci. Comput.
Lianghao Cao, Omar Ghattas, J. Tinsley Oden
2022 J jnl
CoRR
Alex Leviyev, Joshua Chen, Yifei Wang, Omar Ghattas, Aaron Zimmerman
2022 J jnl
CoRR
Thomas O'Leary-Roseberry, Peng Chen, Umberto Villa, Omar Ghattas
2022 J jnl
CoRR
Keyi Wu, Thomas O'Leary-Roseberry, Peng Chen, Omar Ghattas
2022 J jnl
Comput. Math. Appl.
Jeonghun J. Lee, Tan Bui-Thanh, Umberto Villa, Omar Ghattas
2022 J jnl
CoRR
Jeonghun J. Lee, Omar Ghattas
2022 J jnl
CoRR
Dingcheng Luo, Lianghao Cao, Peng Chen, Omar Ghattas, J. Tinsley Oden
2022 J jnl
CoRR
Lianghao Cao, Thomas O'Leary-Roseberry, Prashant K. Jha, J. Tinsley Oden, Omar Ghattas
2021 J jnl
CoRR
Keyi Wu, Peng Chen, Omar Ghattas
2021 J jnl
CoRR
Thomas O'Leary-Roseberry, Xiaosong Du, Anirban Chaudhuri, Joaquim R. R. A. Martins, Karen Willcox, Omar Ghattas
2021 J jnl
CoRR
Amal Alghamdi, Marc Andre Hesse, Jingyi Chen, Umberto Villa, Omar Ghattas
2021 J jnl
Acta Numer.
Omar Ghattas, Karen Willcox
2021 J jnl
J. Comput. Phys.
Peng Chen, Michael R. Haberman, Omar Ghattas
2021 J jnl
SIAM J. Sci. Comput.
Peng Chen, Omar Ghattas
2021 J jnl
SIAM/ASA J. Uncertain. Quantification
Peng Chen, Omar Ghattas
2021 J jnl
Nat. Comput. Sci.
Karen E. Willcox, Omar Ghattas, Patrick Heimbach
2021 J jnl
CoRR
Ki-Tae Kim, Umberto Villa, Matthew D. Parno, Youssef M. Marzouk, Omar Ghattas, Noemi Petra
2021 J jnl
ACM Trans. Math. Softw.
Umberto Villa, Noemi Petra, Omar Ghattas
2020 J jnl
CoRR
Keyi Wu, Peng Chen, Omar Ghattas
2020 J jnl
CoRR
Lianghao Cao, Omar Ghattas, J. Tinsley Oden
2020 J jnl
CoRR
Amal Alghamdi, Marc Andre Hesse, Jingyi Chen, Omar Ghattas
2020 J jnl
CoRR
Thomas O'Leary-Roseberry, Umberto Villa, Peng Chen, Omar Ghattas
2020 J jnl
CoRR
Longfei Gao, Omar Ghattas, David E. Keyes
2020 conf
PEARC
Dan Stanzione, John West, R. Todd Evans, Tommy Minyard, Omar Ghattas, Dhabaleswar K. Panda
2020 J jnl
CoRR
Ilona Ambartsumyan, Wajih Bou Karam, Tan Bui-Thanh, Omar Ghattas, David E. Keyes, Georg Stadler, George Turkiyyah, Stefano Zampini
2020 J jnl
SIAM J. Sci. Comput.
Ilona Ambartsumyan, Wajih Halim Boukaram, Tan Bui-Thanh, Omar Ghattas, David E. Keyes, Georg Stadler, George Turkiyyah, Stefano Zampini
2020 J jnl
CoRR
Thomas O'Leary-Roseberry, Omar Ghattas
2020 J jnl
CoRR
Thomas O'Leary-Roseberry, Nick Alger, Omar Ghattas
2020 A* conf
NeurIPS
Peng Chen, Omar Ghattas
2020 J jnl
CoRR
Peng Chen, Omar Ghattas
2020 J jnl
CoRR
Peng Chen, Omar Ghattas
2020 J jnl
SIAM J. Sci. Comput.
Nick Alger, Peng Chen, Omar Ghattas
2020 J jnl
CoRR
Nick Alger, Peng Chen, Omar Ghattas
2019 A* conf
NeurIPS
Amir Dezfouli, Hassan Ashtiani, Omar Ghattas, Richard Nock, Peter Dayan, Cheng Soon Ong
2019 A* conf
NeurIPS
Peng Chen, Keyi Wu, Joshua Chen, Tom O'Leary-Roseberry, Omar Ghattas
2019 J jnl
SIAM J. Sci. Comput.
Nick Alger, Vishwas Rao, Aaron Myers, Tan Bui-Thanh, Omar Ghattas
2019 J jnl
J. Comput. Phys.
Peng Chen, Umberto Villa, Omar Ghattas
2019 J jnl
CoRR
Umberto Villa, Noemi Petra, Omar Ghattas
2018 J jnl
SIAM J. Sci. Comput.
Kainan Wang, Tan Bui-Thanh, Omar Ghattas
2018 J jnl
J. Open Source Softw.
Umberto Villa, Noemi Petra, Omar Ghattas
2017 J jnl
SIAM J. Sci. Comput.
Nick Alger, Umberto Villa, Tan Bui-Thanh, Omar Ghattas
2017 J jnl
SIAM/ASA J. Uncertain. Quantification
Alen Alexanderian, Noemi Petra, Georg Stadler, Omar Ghattas
2017 J jnl
SIAM J. Sci. Comput.
Johann Rudi, Georg Stadler, Omar Ghattas
2016 J jnl
SIAM J. Sci. Comput.
Alen Alexanderian, Noemi Petra, Georg Stadler, Omar Ghattas
2016 J jnl
CoRR
Ulrich Rüde, Karen Willcox, Lois Curfman McInnes, Hans De Sterck, George Biros, Hans-Joachim Bungartz, James Corones, Evin Cramer, James Crowley, Omar Ghattas, Max D. Gunzburger, Michael Hanke, Robert J. Harrison, Michael A. Heroux, Jan S. Hesthaven, Peter K. Jimack, Chris Johnson, Kirk E. Jordan, David E. Keyes, Rolf H. Krause, Vipin Kumar, Stefan Mayer, Juan Meza, Knut Martin Mørken, J. Tinsley Oden, Linda R. Petzold, Padma Raghavan, Suzanne M. Shontz, Anne E. Trefethen, Peter R. Turner, Vladimir V. Voevodin, Barbara I. Wohlmuth, Carol S. Woodward
2016 conf
VECPAR
Omar Ghattas, Tobin Isaac, Noémi Petra, Georg Stadler
2016 J jnl
CoRR
Johann Rudi, Georg Stadler, Omar Ghattas
2015 A conf
ICS
Hari Sundar, Omar Ghattas
2015 A conf
SC
Johann Rudi, A. Cristiano I. Malossi, Tobin Isaac, Georg Stadler, Michael Gurnis, Peter W. J. Staar, Yves Ineichen, Costas Bekas, Alessandro Curioni, Omar Ghattas
2015 J jnl
J. Sci. Comput.
Lucas C. Wilcox, Georg Stadler, Tan Bui-Thanh, Omar Ghattas
2015 J jnl
SIAM J. Sci. Comput.
Tobin Isaac, Carsten Burstedde, Lucas C. Wilcox, Omar Ghattas
2015 J jnl
J. Comput. Phys.
Tobin Isaac, Noemi Petra, Georg Stadler, Omar Ghattas
2015 J jnl
SIAM J. Sci. Comput.
Tobin Isaac, Georg Stadler, Omar Ghattas
2014 J jnl
SIAM J. Sci. Comput.
Noemi Petra, James Martin, Georg Stadler, Omar Ghattas
2014 J jnl
SIAM J. Sci. Comput.
Alen Alexanderian, Noemi Petra, Georg Stadler, Omar Ghattas
2014 J jnl
SIAM/ASA J. Uncertain. Quantification
Tan Bui-Thanh, Omar Ghattas
2014 J jnl
CoRR
Tobin Isaac, Carsten Burstedde, Lucas C. Wilcox, Omar Ghattas
2014 J jnl
CoRR
Tobin Isaac, Georg Stadler, Omar Ghattas
2013 J jnl
SIAM J. Sci. Comput.
Tan Bui-Thanh, Omar Ghattas, James Martin, Georg Stadler
2013 J jnl
CoRR
Jesse Kelly, Omar Ghattas, Hari Sundar
2013 J jnl
SIAM J. Numer. Anal.
Tan Bui-Thanh, Leszek F. Demkowicz, Omar Ghattas
2013 J jnl
Math. Comput.
Tan Bui-Thanh, Leszek F. Demkowicz, Omar Ghattas
2012 J jnl
SIAM J. Sci. Comput.
James Martin, Lucas C. Wilcox, Carsten Burstedde, Omar Ghattas
2012 J jnl
SIAM J. Sci. Comput.
Tan Bui-Thanh, Omar Ghattas, David Higdon
2012 J jnl
SIAM J. Numer. Anal.
Tan Bui-Thanh, Omar Ghattas
2012 Misc conf
ICCS
Douglas L. Allaire, George Biros, J. Chambers, Omar Ghattas, D. Kordonowy, Karen Willcox
2012 A conf
SC
Tan Bui-Thanh, Carsten Burstedde, Omar Ghattas, James Martin, Georg Stadler, Lucas C. Wilcox
2012 A conf
IPDPS
Tobin Isaac, Carsten Burstedde, Omar Ghattas
2012 A conf
SC
Hari Sundar, George Biros, Carsten Burstedde, Johann Rudi, Omar Ghattas, Georg Stadler
2011 J jnl
SIAM J. Appl. Math.
Shan Yang, Georg Stadler, Robert D. Moser, Omar Ghattas
2011 J jnl
SIAM J. Sci. Comput.
H. P. Flath, Lucas C. Wilcox, Volkan Akcelik, Judith C. Hill, Bart G. van Bloemen Waanders, Omar Ghattas
2011 J jnl
SIAM J. Sci. Comput.
Carsten Burstedde, Lucas C. Wilcox, Omar Ghattas
2010 J jnl
J. Comput. Phys.
Lucas C. Wilcox, Georg Stadler, Carsten Burstedde, Omar Ghattas
2010 A conf
SC
Carsten Burstedde, Omar Ghattas, Michael Gurnis, Tobin Isaac, Georg Stadler, Tim Warburton, Lucas C. Wilcox
2010 J jnl
SIAM J. Sci. Comput.
Chad Lieberman, Karen Willcox, Omar Ghattas
2010 J jnl
IEEE Trans. Medical Imaging
Isabel N. Figueiredo, Pedro N. Figueiredo, Georg Stadler, Omar Ghattas, Adérito Araújo
2008 J jnl
SIAM J. Sci. Comput.
Tan Bui-Thanh, Karen Willcox, Omar Ghattas
2008 A conf
SC
Carsten Burstedde, Omar Ghattas, Michael Gurnis, Georg Stadler, Eh Tan, Tiankai Tu, Lucas C. Wilcox, Shijie Zhong
2007 J jnl
J. Comput. Phys.
Tan Bui-Thanh, Karen Willcox, Omar Ghattas, Bart G. van Bloemen Waanders
2007 Misc conf
International Conference on Computational Science (1)
Omar Bashir, Omar Ghattas, Judith C. Hill, Bart G. van Bloemen Waanders, Karen Willcox
2006 A conf
SC
Tiankai Tu, Hongfeng Yu, Jacobo Bielak, Omar Ghattas, Julio C. López, Kwan-Liu Ma, David R. O'Hallaron, Leonardo Ramírez-Guzmán, Nathan Stone, Ricardo Taborda-Rios, John Urbanic
2006 Misc conf
International Conference on Computational Science (3)
Volkan Akcelik, George Biros, Andrei Draganescu, Omar Ghattas, Judith C. Hill, Bart G. van Bloemen Waanders
2006 ch.
Parallel Processing for Scientific Computing
Volkan Akçelik, George Biros, Omar Ghattas, Judith Hill, David E. Keyes, Bart G. van Bloemen Waanders
2006 A conf
SC
Tiankai Tu, Hongfeng Yu, Leonardo Ramírez-Guzmán, Jacobo Bielak, Omar Ghattas, Kwan-Liu Ma, David R. O'Hallaron
2005 conf
CDC/ECC
Karen Willcox, Omar Ghattas, Bart G. van Bloemen Waanders, Brett W. Bader
2005 A conf
SC
Volkan Akcelik, George Biros, Andrei Draganescu, Judith C. Hill, Omar Ghattas, Bart G. van Bloemen Waanders
2005 J jnl
SIAM J. Sci. Comput.
George Biros, Omar Ghattas
2005 J jnl
SIAM J. Sci. Comput.
George Biros, Omar Ghattas
2005 A conf
SC
Tiankai Tu, David R. O'Hallaron, Omar Ghattas
2004 Misc conf
International Conference on Computational Science
Volkan Akcelik, Jacobo Bielak, George Biros, Ioannis Epanomeritakis, Omar Ghattas, Loukas F. Kallivokas, Eui Joong Kim
2003 A conf
SC
Volkan Akcelik, Jacobo Bielak, George Biros, Ioannis Epanomeritakis, Antonio Fernandez, Omar Ghattas, Eui Joong Kim, Julio C. López, David R. O'Hallaron, Tiankai Tu, John Urbanic
2003 A conf
SC
Kwan-Liu Ma, Aleksander Stompel, Jacobo Bielak, Omar Ghattas, Eui Joong Kim
2002 A conf
SC
Volkan Akcelik, George Biros, Omar Ghattas
2001 J jnl
Oper. Res.
Srinivas Bollapragada, Omar Ghattas, John N. Hooker
2000 A conf
SC
James F. Antaki, Guy E. Blelloch, Omar Ghattas, Ivan Malcevic, Gary L. Miller, Noel Walkington
1999 A conf
SC
George Biros, Omar Ghattas
1995 conf
CVRMed
R. V. O'Toole III, David A. Simon, Branislav Jaramaz, Omar Ghattas, Mike Blackwell, Loukas F. Kallivokas, F. Morgan, Christopher D. Visnic, Anthony M. DiGioia, Takeo Kanade
1994 Misc conf
WSC
Christopher D. Visnic, Robert H. Reid, Omar Ghattas, Anthony M. DiGioia, Branislav Jaramaz
1991 A* conf
AAAI
George Turkiyyah, Omar Ghattas
redb/extractors/macho_extractors/macho_universal.py
← Index redb/extractors/macho_extractors/macho_universal.py python
import hashlib
import inspect
import json
from datetime import datetime, timezone
from typing import Any, List

from redb.extractors.enum import Tag
from redb.extractors.macho_extractor import MachOExtractor
from redb.models.dataclasses import MachOUniversal


class MachOUniversalExtractor(MachOExtractor):

    def __init__(
        self,
        filepath,
        log,
        exporters=None,
        index_prefix=None,
        elastic_index=None,
        known_benign=False,
        known_malicious=False,
        macho=None,
    ):
        super().__init__(
            filepath,
            log,
            exporters,
            index_prefix,
            elastic_index,
            known_benign,
            known_malicious,
            macho,
        )
        self.elastic_index = self.index_prefix + "-macho_universal"
        self.log.debug(inspect.currentframe().f_code.co_name)

    def tag(self):
        return Tag.MACHO_UNIVERSAL.value

    def _extract_universal_info(self):
        """Extract Universal/FAT binary architecture information using new API."""
        self.log.debug(inspect.currentframe().f_code.co_name)

        if not self.macho:
            return None

        try:
            # Parse at Universal level first (new API requirement)
            self.macho.parse()

            # Get architectures using new API
            architectures = self.macho.get_architectures()
            if not architectures:
                return None

            # Check if this is a FAT binary
            is_fat = len(architectures) > 1

            architecture_info = []

            # Extract info for each architecture
            for arch_name in architectures:
                try:
                    # Get general info for this architecture
                    general_info = self.macho.get_general_info(arch=arch_name)

                    # Get header info for this architecture
                    header_info = self.macho.get_macho_header(arch=arch_name)

                    # Get architecture-specific MachO instance for detailed analysis
                    arch_macho = self.macho.get_macho_for_arch(arch_name)

                    # Calculate architecture slice hash (if we can access the raw data)
                    arch_sha256 = None
                    arch_md5 = None
                    arch_sha1 = None

                    # For FAT binaries, try to get slice-specific info
                    if is_fat and arch_macho:
                        try:
                            # This would require access to the slice data
                            # For now, we'll use the general file info
                            arch_sha256 = general_info.get('SHA256', '') if general_info else ''
                            arch_md5 = general_info.get('MD5', '') if general_info else ''
                            arch_sha1 = general_info.get('SHA1', '') if general_info else ''
                        except Exception as e:
                            self.log.debug(f"Could not extract slice hash for {arch_name}: {e}")

                    architecture_info.append({
                        'architecture': arch_name,
                        'arch_sha256': arch_sha256,
                        'arch_md5': arch_md5,
                        'arch_sha1': arch_sha1,
                        'cputype': header_info.get('cputype') if header_info else None,
                        'cpusubtype': header_info.get('cpusubtype') if header_info else None,
                        'filetype': header_info.get('filetype') if header_info else None
                    })

                except Exception as e:
                    self.log.warning(f"Error extracting info for architecture {arch_name}: {e}")
                    continue

            # Create Universal dataclass
            macho_universal = MachOUniversal(
                is_fat=is_fat,
                architecture_count=len(architectures),
                architectures=architectures,
                architecture_info=architecture_info,
                fat_hash=self.sha256,
                fat_md5=self.md5,
                fat_sha1=self.sha1
            )

            return macho_universal

        except Exception as e:
            self.log.error(f"Error extracting MachO Universal info: {e}")
            return None

    def _extract_fat_architecture_mappings(self):
        """Extract detailed FAT binary architecture mappings for database relationships."""
        self.log.debug(inspect.currentframe().f_code.co_name)

        if not self.macho:
            return []

        try:
            # Parse at Universal level first
            self.macho.parse()

            # Get architectures using new API
            architectures = self.macho.get_architectures()
            if not architectures or len(architectures) <= 1:
                return []  # Not a FAT binary

            mappings = []
            current_time = datetime.now(timezone.utc)

            # For each architecture, create a mapping record
            for arch_name in architectures:
                try:
                    # Get general info
                    general_info = self.macho.get_general_info()

                    # Create mapping record for FAT binary architecture table
                    mapping = {
                        'fat_hash': self.sha256,  # SHA256 of the FAT binary
                        'architecture': arch_name,
                        'arch_sha256': general_info.get('SHA256', '') if general_info else '',  # Will need proper slice extraction
                        'arch_md5': general_info.get('MD5', '') if general_info else '',
                        'arch_sha1': general_info.get('SHA1', '') if general_info else '',
                        'arch_filename': f"{general_info.get('Filename', '')}.{arch_name}" if general_info else '',
                        'analysis_date': current_time
                    }
                    mappings.append(mapping)

                except Exception as e:
                    self.log.warning(f"Error creating mapping for architecture {arch_name}: {e}")
                    continue

            return mappings

        except Exception as e:
            self.log.error(f"Error extracting FAT architecture mappings: {e}")
            return []

    def extract(self):
        self.log.debug(inspect.currentframe().f_code.co_name)
        try:
            universal_info = self._extract_universal_info()
            return universal_info
        except Exception as e:
            self.log.error(f"Error extracting MachO Universal info: {e}")
            return None

    def extract_fat_binary_basic_properties_data(self):
        """Extract data needed for creating multiple BasicProperties records for FAT binaries.

        Returns:
            Tuple: (is_fat, fat_sha256, architectures_info) where:
                - is_fat: bool indicating if this is a FAT binary
                - fat_sha256: SHA256 of the FAT wrapper
                - architectures_info: dict with arch names and their hashes
        """
        self.log.debug(inspect.currentframe().f_code.co_name)

        if not self.macho:
            return False, None, {}

        try:
            # Parse at Universal level first
            self.macho.parse()

            # Get architectures using new API
            architectures = self.macho.get_architectures()
            if not architectures or len(architectures) <= 1:
                return False, None, {}  # Not a FAT binary

            # This is a FAT binary
            architectures_info = {}

            for arch_name in architectures:
                try:
                    # Get general info for this architecture
                    general_info = self.macho.get_general_info(arch=arch_name)

                    if general_info:
                        architectures_info[arch_name] = {
                            'sha256': general_info.get('SHA256', ''),
                            'md5': general_info.get('MD5', ''),
                            'sha1': general_info.get('SHA1', ''),
                            'filename': general_info.get('Filename', ''),
                            'filesize': general_info.get('Filesize', 0)
                        }
                except Exception as e:
                    self.log.warning(f"Error extracting info for architecture {arch_name}: {e}")
                    continue

            return True, self.sha256, architectures_info

        except Exception as e:
            self.log.error(f"Error extracting FAT binary data: {e}")
            return False, None, {}

    def prepare_export_data(self, exporter_type: str) -> Any:
        if exporter_type == "ElasticsearchExporter":
            return self.extract()
        elif exporter_type == "ClickHouseExporter":
            universal_info = self.extract()
            if universal_info is None:
                return None

            data = []
            current_time = datetime.now(timezone.utc)

            # Get architecture info for the binary
            try:
                if universal_info.is_fat:
                    # For FAT binaries, architecture fields should be NULL since it contains multiple
                    architecture_raw = None
                    architecture_str = None
                else:
                    # For single-arch binaries, get the actual architecture info
                    header_info = self.macho.get_macho_header()
                    architecture_raw = header_info.get('cputype', 0) if header_info else 0
                    architecture_str = universal_info.architectures[0] if universal_info.architectures else None
            except Exception as e:
                self.log.warning(f"Could not get architecture info for binary: {e}")
                architecture_raw = None
                architecture_str = None

            # Main Universal binary record
            data.append([
                self.sha256,                              # sha256
                self.md5,                                 # md5
                self.sha1,                                # sha1
                None,                                     # parent_sha256 (always None for main FAT binary)
                architecture_raw,                         # architecture (raw CPU type)
                architecture_str,                         # architecture_str (human-readable)
                universal_info.is_fat,                    # is_fat
                universal_info.architecture_count,       # architecture_count
                universal_info.architectures,            # architectures (array)
                json.dumps(universal_info.architecture_info[0] if len(universal_info.architecture_info) == 1 else {"architectures": universal_info.architecture_info}) if universal_info.architecture_info else None,  # architecture_info (JSON)
                current_time,                             # analysis_date
            ])

            column_names = [
                'sha256', 'md5', 'sha1', 'parent_sha256', 'architecture', 'architecture_str',
                'is_fat', 'architecture_count', 'architectures', 'architecture_info',
                'analysis_date'
            ]

            column_type_names = [
                'FixedString(64)', 'FixedString(32)', 'FixedString(40)',
                'Nullable(FixedString(64))', 'Nullable(UInt32)', 'LowCardinality(Nullable(String))',
                'UInt8', 'UInt32', 'Array(LowCardinality(String))', 'JSON',
                'DateTime64(3, \'UTC\')'
            ]

            return (data, column_names, column_type_names)

        return None

    def prepare_fat_architecture_export_data(self) -> Any:
        """Prepare export data for the FAT binary architecture mapping table."""
        mappings = self._extract_fat_architecture_mappings()
        if not mappings:
            return None

        data = []
        for mapping in mappings:
            data.append([
                mapping['fat_hash'],
                mapping['architecture'],
                mapping['arch_sha256'],
                mapping['arch_md5'],
                mapping['arch_sha1'],
                mapping['arch_filename'],
                mapping['analysis_date'],
            ])

        column_names = [
            'fat_hash', 'architecture', 'arch_sha256', 'arch_md5', 'arch_sha1',
            'arch_filename', 'analysis_date'
        ]

        column_type_names = [
            'FixedString(64)', 'LowCardinality(String)', 'FixedString(64)',
            'FixedString(32)', 'FixedString(40)', 'String',
            'DateTime64(3, \'UTC\')'
        ]

        return (data, column_names, column_type_names)

    def get_clickhouse_table(self) -> str:
        return "redb_macho_universal"

    # def get_fat_architecture_table(self) -> str:
    #     """Return table name for FAT binary architecture mappings."""
    #     return "redb_fat_binary_architectures"