J. Gregory Trafton

114 papers A* 27A 3B 16C 4Misc 1Journal 48Unranked 15
YearRankTypeTitle / Venue / Authors
2026 J jnl
ACM Trans. Hum. Robot Interact.
Laura Saad, Eileen Roesler, Elizabeth K. Phillips, J. Gregory Trafton
2026 conf
HRI Companion
Hanna Parikh, Paul Vallejo, Elizabeth K. Phillips, Eileen Roesler, J. Gregory Trafton, Laura Saad
2025 A* conf
HRI
Pawinee Pithayarungsarit, Laura Saad, J. Gregory Trafton, Eileen Roesler
2025 A* conf
HRI
Laura Saad, Eileen Roesler, Elizabeth K. Phillips, J. Gregory Trafton
2025 A* conf
HRI
Ting-Han Lin, Hannah Dinner, Tsz Long Leung, Bilge Mutlu, J. Gregory Trafton, Sarah Sebo
2025 J jnl
CoRR
Ting-Han Lin, Hannah Dinner, Tsz Long Leung, Bilge Mutlu, J. Gregory Trafton, Sarah Sebo
2025 B conf
RO-MAN
Laura Saad, Eileen Roesler, J. Malcolm McCurry, Nathaniel Gyory, J. Gregory Trafton
2025 A* conf
HRI
Houston Claure, Inyoung Shin, J. Gregory Trafton, Marynel Vázquez
2025 J jnl
Int. J. Intell. Robotics Appl.
Stephen Misenti, Brendan Hertel, Bowen Weng, Ryan Donald, Advait Prasad Jawaji, Magnus-Tryggvi Kosoko-Thoroddsen, J. Gregory Trafton, Adam Norton, Reza Azadeh, Yan Gu
2025 B conf
RO-MAN
Tyler Tran, Nathaniel Gyory, Hunter Thompson, Anthony M. Harrison, Laura Saad, J. Gregory Trafton, Wallace Lawson
2025 J jnl
npj Digit. Medicine
Joshua M. Biro, Jessica L. Handley, J. Malcolm McCurry, Adam Visconti, Jeffrey Weinfeld, J. Gregory Trafton, Raj M. Ratwani
2025 A* conf
ICRA
Bryce Ikeda, Mark Higger, Christina Soyoung Song, J. Gregory Trafton
2025 A* conf
HRI
Jaclyn Molan, Laura Saad, Eileen Roesler, J. Malcolm McCurry, Nathaniel Gyory, J. Gregory Trafton
2025 J jnl
CoRR
Jaclyn Molan, Laura Saad, Eileen Roesler, J. Malcolm McCurry, Nathaniel Gyory, J. Gregory Trafton
2025 J jnl
Int. J. Soc. Robotics
Chelsea R. Frazier, J. Malcolm McCurry, Kevin Zish, J. Gregory Trafton
2025 J jnl
CoRR
Sangeet Khemlani, Tyler Tran, Nathaniel Gyory, Anthony M. Harrison, Wallace E. Lawson, Ravenna Thielstrom, Hunter Thompson, Taaren Singh, J. Gregory Trafton
2025 J jnl
CoRR
Tyler Tran, Sangeet Khemlani, J. Gregory Trafton
2024 B conf
RO-MAN
Nathaniel Gyory, Wallace E. Lawson, J. Gregory Trafton
2024 J jnl
ACM Trans. Hum. Robot Interact.
J. Gregory Trafton, J. Malcolm McCurry, Kevin Zish, Chelsea R. Frazier
2023 conf
NICE
Wallace Lawson, Anthony M. Harrison, J. Gregory Trafton
2023 B conf
RO-MAN
J. Gregory Trafton, Chelsea R. Frazier, Kevin Zish, Branden J. Bio, J. Malcolm McCurry
2022 B conf
RO-MAN
Wallace Lawson, Anthony M. Harrison, Mai Lee Chang, William Adams, J. Gregory Trafton
2022 J jnl
Top. Cogn. Sci.
Laura M. Hiatt, Connor Brooks, J. Gregory Trafton
2021 B conf
ICSR
Ben Wright, J. Malcolm McCurry, Wallace Lawson, J. Gregory Trafton
2021 J jnl
ACM Trans. Hum. Robot Interact.
J. Gregory Trafton, Paula D. Raymond, Sangeet Khemlani
2020 conf
HRI (Companion)
Wallace Lawson, Anthony M. Harrison, Eric S. Vorm, J. Gregory Trafton
2020 B conf
ICSR
Ben Wright, Magdalena D. Bugajska, William Adams, Ed Lawson, J. Malcolm McCurry, J. Gregory Trafton
2020 A conf
AAMAS
J. Gregory Trafton, Laura M. Hiatt, Benjamin Brumback, J. Malcolm McCurry
2018 A* conf
HRI
Anthony M. Harrison, Wendy M. Xu, J. Gregory Trafton
2017 J jnl
Top. Cogn. Sci.
Robert Thomson, Anthony M. Harrison, J. Gregory Trafton, Laura M. Hiatt
2017 J jnl
Cogn. Sci.
Laura M. Hiatt, J. Gregory Trafton
2017 J jnl
Hum. Factors
Franklin P. Tamborello II, J. Gregory Trafton
2017 J jnl
Int. J. Robotics Res.
Laura M. Hiatt, Cody Narber, Esube Bekele, Sangeet S. Khemlani, J. Gregory Trafton
2017 B conf
RO-MAN
Priya Narayanan, Magdalena D. Bugajska, Wallace Lawson, J. Gregory Trafton
2017 J jnl
IEEE Intell. Syst.
John E. Laird, Kevin A. Gluck, John R. Anderson, Kenneth D. Forbus, Odest Chadwicke Jenkins, Christian Lebiere, Dario D. Salvucci, Matthias Scheutz, Andrea Thomaz, J. Gregory Trafton, Robert E. Wray, Shiwali Mohan, James R. Kirk
2017 B conf
CogSci
Kevin Zish, J. Malcolm McCurry, Nathan Aguiar, J. Gregory Trafton
2016 J jnl
CoRR
Paul Baxter, J. Gregory Trafton, Séverin Lemaignan
2016 conf
AAAI Fall Symposia
Wallace Lawson, Keith Sullivan, Esube Bekele, Laura M. Hiatt, Robert Goring, J. Gregory Trafton
2016 A* conf
HRI
Paul Baxter, Séverin Lemaignan, J. Gregory Trafton
2015 conf
AAAI Fall Symposia
Cody G. Narber, Wallace Lawson, J. Gregory Trafton
2015 J jnl
Int. J. Hum. Comput. Stud.
Erik M. Altmann, J. Gregory Trafton
2015 J jnl
Autom. Softw. Eng.
Constance L. Heitmeyer, Marc Pickett, Elizabeth I. Leonard, Myla M. Archer, Indrakshi Ray, David W. Aha, J. Gregory Trafton
2015 B conf
CogSci
Franklin P. Tamborello II, J. Gregory Trafton, Erik M. Altmann
2015 conf
HRI (Extended Abstracts)
Laura M. Hiatt, J. Gregory Trafton
2015 conf
ICDL-EPIROB
J. Gregory Trafton, Anthony M. Harrison, Wallace E. Lawson
2014 B conf
CogSci
Franklin P. Tamborello II, J. Gregory Trafton
2014 B conf
CogSci
Dario D. Salvucci, Michael D. Byrne, Christian Lebiere, Niels A. Taatgen, J. Gregory Trafton
2014 A* conf
HRI
Paul Baxter, J. Gregory Trafton
2014 J jnl
IEEE Trans. Hum. Mach. Syst.
Leonard A. Breslow, Daniel Gartenberg, J. Malcolm McCurry, J. Gregory Trafton
2014 conf
CVPR Workshops
Wallace E. Lawson, Laura M. Hiatt, J. Gregory Trafton
2014 A* conf
HRI
Lilia Moshkina, Susan Bell Trickett, J. Gregory Trafton
2014 A* conf
CHI
J. Gregory Trafton, Raj M. Ratwani
2014 J jnl
Hum. Factors
Susan S. Kirschenbaum, J. Gregory Trafton, Christian D. Schunn, Susan Bell Trickett
2013 J jnl
J. Hum. Robot Interact.
J. Gregory Trafton, Laura M. Hiatt, Anthony M. Harrison, Franklin P. Tamborello II, Sangeet S. Khemlani, Alan C. Schultz
2013 Misc conf
FLAIRS
Marc Pickett, David W. Aha, J. Gregory Trafton
2013 A* conf
CHI
Daniel Gartenberg, Leonard A. Breslow, Joo Park, J. Malcolm McCurry, J. Gregory Trafton
2013 conf
BTAS
Wallace E. Lawson, J. Gregory Trafton, Eric Martinson
2013 B conf
CogSci
Sangeet S. Khemlani, Daniel Gartenberg, Kun Hee Park, J. Gregory Trafton
2013 conf
VISAPP (1)
Wallace E. Lawson, J. Gregory Trafton
2012 J jnl
Proc. IEEE
J. Gregory Trafton, Allison M. Jacobs, Anthony M. Harrison
2012 J jnl
Int. J. Hum. Comput. Stud.
Jooyoung Jang, Susan Bell Trickett, Christian D. Schunn, J. Gregory Trafton
2011 J jnl
Hum. Comput. Interact.
Raj M. Ratwani, J. Gregory Trafton
2011 J jnl
Cogn. Syst. Res.
J. Gregory Trafton, Erik M. Altmann, Raj M. Ratwani
2011 A* conf
IJCAI
Laura M. Hiatt, Anthony M. Harrison, J. Gregory Trafton
2011 J jnl
Top. Cogn. Sci.
J. Gregory Trafton, Anthony M. Harrison
2011 J jnl
Int. J. Soc. Robotics
William G. Kennedy, J. Gregory Trafton
2011 A* ed.
HRI
Aude Billard, Peter H. Kahn Jr., Julie A. Adams, J. Gregory Trafton
2011 conf
CTS
J. Gregory Trafton
2010 J jnl
Top. Cogn. Sci.
Raj M. Ratwani, J. Gregory Trafton
2010 A* conf
HRI
Nathan G. Freier, Minoru Asada, Pam Hinds, Gerhard Sagerer, J. Gregory Trafton
2010 A* conf
HRI
Sarah Kriz, Gregory Anderson, J. Gregory Trafton
2010 A* conf
HRI
Raj M. Ratwani, J. Malcolm McCurry, J. Gregory Trafton
2009 J jnl
Int. J. Soc. Robotics
William G. Kennedy, Magdalena D. Bugajska, Anthony M. Harrison, J. Gregory Trafton
2009 J jnl
Hum. Factors
Maura C. Lohrenz, J. Gregory Trafton, Melissa R. Beck, Marlin L. Gendron
2009 A* conf
HRI
Allison M. Jacobs, Benjamin R. Fransen, J. Malcolm McCurry, Frederick W. P. Heckel, Alan R. Wagner, J. Gregory Trafton
2009 J jnl
Hum. Factors
Leonard A. Breslow, Raj M. Ratwani, J. Gregory Trafton
2009 conf
CMMR/ICAD
Derek P. Brock, Brian McClimens, Christina Wasylyshyn, J. Gregory Trafton, J. Malcolm McCurry
2009 J jnl
Top. Cogn. Sci.
Susan Bell Trickett, J. Gregory Trafton, Christian D. Schunn
2009 conf
AAAI Spring Symposium: Experimental Design for Real-World Systems
Julie A. Adams, Marjorie Skubic, Trey Smith, J. Gregory Trafton, Julie Fitzgerald, Aaron Spaulding, Holly A. Yanco, Kristen Stubbs
2009 A conf
IROS
Benjamin R. Fransen, Evan V. Herbst, Anthony M. Harrison, William Adams, J. Gregory Trafton
2009 A* conf
HRI
Sarah Kriz, Gregory Anderson, Magdalena D. Bugajska, J. Gregory Trafton
2008 A* conf
AAAI
William G. Kennedy, Magdalena D. Bugajska, William Adams, Alan C. Schultz, J. Gregory Trafton
2008 A* conf
HRI
J. Gregory Trafton, Magdalena D. Bugajska, Benjamin R. Fransen, Raj M. Ratwani
2008 A* conf
CHI
Raj M. Ratwani, J. Malcolm McCurry, J. Gregory Trafton
2007 J jnl
Cogn. Sci.
Susan Bell Trickett, J. Gregory Trafton
2007 J jnl
Cogn. Syst. Res.
William G. Kennedy, J. Gregory Trafton
2007 A* conf
AAAI
William G. Kennedy, Magdalena D. Bugajska, Matthew Marge, William Adams, Benjamin R. Fransen, Dennis Perzanowski, Alan C. Schultz, J. Gregory Trafton
2006 B conf
SMC
Terrence Fong, Jean Scholtz, Julie A. Shah, Lorenzo Flückiger, Clayton Kunz, David Lees, John Schreiner, Michael D. Siegel, Laura M. Hiatt, Illah R. Nourbakhsh, Reid G. Simmons, Robert O. Ambrose, Robert R. Burridge, Brian Antonishek, Magdalena D. Bugajska, Alan C. Schultz, J. Gregory Trafton
2006 A* conf
HRI
J. Gregory Trafton, Alan C. Schultz, Dennis Perzanowski, Magdalena D. Bugajska, William Adams, Nicholas L. Cassimatis, Derek P. Brock
2006 A* conf
HRI
Peter Squire, J. Gregory Trafton, Raja Parasuraman
2006 J jnl
Spatial Cogn. Comput.
J. Gregory Trafton, Susan Bell Trickett, Cara A. Stitzlein, Lelyn Saner, Christian D. Schunn, Susan S. Kirschenbaum
2006 C conf
Diagrams
Susan Bell Trickett, J. Gregory Trafton
2005 J jnl
Int. J. Humanoid Robotics
Donald Sofge, Magdalena D. Bugajska, J. Gregory Trafton, Dennis Perzanowski, Scott Thomas, Marjorie Skubic, Samuel Blisard, Nicholas L. Cassimatis, Derek P. Brock, William Adams, Alan C. Schultz
2005 J jnl
IEEE Trans. Syst. Man Cybern. Part A
J. Gregory Trafton, Nicholas L. Cassimatis, Magdalena D. Bugajska, Derek P. Brock, Farilee Mintz, Alan C. Schultz
2005 B conf
RO-MAN
J. Gregory Trafton, Alan C. Schultz, Magdalena D. Bugajska, Farilee Mintz
2005 A* conf
AAAI
Magdalena D. Bugajska, William Adams, Scott Thomas, J. Gregory Trafton, Alan C. Schultz
2005 J jnl
Interactions
Alan C. Schultz, J. Gregory Trafton
2005 J jnl
Cogn. Syst. Res.
Sally Bogacz, J. Gregory Trafton
2005 A* conf
AAAI
Marjorie Skubic, Derek Anderson, Samuel Blisard, Dennis Perzanowski, William Adams, J. Gregory Trafton, Alan C. Schultz
2004 conf
ICCM
Laura M. Hiatt, J. Gregory Trafton, Anthony M. Harrison, Alan C. Schultz
2004 J jnl
Robotics Auton. Syst.
Nicholas L. Cassimatis, J. Gregory Trafton, Magdalena D. Bugajska, Alan C. Schultz
2004 J jnl
Hum. Factors
Christopher A. Monk, Deborah A. Boehm-Davis, J. Gregory Trafton
2004 C conf
Diagrams
Susan Bell Trickett, J. Gregory Trafton
2003 B conf
SMC
Dennis Perzanowski, Derek P. Brock, William Adams, Magdalena D. Bugajska, Alan C. Schultz, J. Gregory Trafton, Samuel Blisard, Marjorie Skubic
2003 J jnl
Int. J. Hum. Comput. Stud.
J. Gregory Trafton, Erik M. Altmann, Derek P. Brock, Farilee Mintz
2002 A conf
IROS
Magdalena D. Bugajska, Alan C. Schultz, J. Gregory Trafton, Matthew Taylor, Farilee Mintz
2002 J jnl
Künstliche Intell.
Nik Swoboda, J. Gregory Trafton
2002 J jnl
Cogn. Sci.
Erik M. Altmann, J. Gregory Trafton
2002 C conf
Diagrams
J. Gregory Trafton, Sandra P. Marshall, Farilee Mintz, Susan Bell Trickett
2002 J jnl
Cogn. Sci.
Erik M. Altmann, J. Gregory Trafton
2002 C conf
Diagrams
Sally Bogacz, J. Gregory Trafton
2001 J jnl
Hum. Comput. Interact.
J. Gregory Trafton, Susan Bell Trickett
2000 J jnl
Int. J. Hum. Comput. Stud.
J. Gregory Trafton, Susan S. Kirschenbaum, Ted L. Tsui, Robert T. Miyamoto, James A. Ballas, Paula D. Raymond
1999 conf
CHI Extended Abstracts
Sheryl L. Miller, J. Gregory Trafton
redb/extractors/js_extractor.py
← Index redb/extractors/js_extractor.py python
import logging
import re
from abc import ABCMeta, abstractmethod

from redb.extractors.extractor import Extractor
from redb.extractors.js_extractors.js_context import JSContext, _text_entropy

logger = logging.getLogger(__name__)

# ESM is recognised by line-anchored `import ... from "..."` / bare side-effect
# `import "..."` / top-level `export ...`. Anchored at line start to avoid
# matching the substring inside string literals or comments.
_ESM_PATTERN = re.compile(
    r'(?m)^\s*(?:'
    r'import\s+[^;\n]*?\bfrom\s+[\'"]'
    r'|import\s+[\'"][^\'"]+[\'"]'
    r'|export\s+(?:default\b|\{|\*|const\b|let\b|var\b|function\b|class\b|async\b)'
    r')'
)


@abstractmethod
class JSExtractor(Extractor, metaclass=ABCMeta):
    """Base class for JavaScript file extractors.

    Every JSExtractor reads its raw materials (bytes / decoded source / line
    list / scan_source results / pyjsparser AST / text entropy) from a shared
    `JSContext`. When workers.py drives the JS pipeline it builds one context
    per sample and threads it into every extractor via `context=`. When tests
    or other callers instantiate an extractor directly, the constructor builds
    a fresh context from `(filepath, source=...)`.

    All historical instance attributes (`self.binary`, `self.js_source`,
    `self.lines`) and helpers (`self._decode_source`, `self._parse_ast`,
    `self._calculate_text_entropy`) are preserved as thin delegators so
    existing extractor code keeps working unchanged.
    """

    def __init__(
        self,
        filepath,
        log,
        exporters=None,
        index_prefix=None,
        known_benign=False,
        known_malicious=False,
        source=None,
        context=None,
    ):
        if context is None:
            context = JSContext.from_path(filepath, log=log, source=source)
        elif source is not None and context.source != source:
            log.warning(
                "JSExtractor received both `source=` and `context=` with "
                "differing source; ignoring source kwarg"
            )
        self._context = context

        super().__init__(
            filepath,
            log,
            exporters,
            index_prefix,
            known_benign=known_benign,
            known_malicious=known_malicious,
        )

    @property
    def binary(self):
        return self._context.raw_bytes

    @property
    def js_source(self):
        return self._context.source

    @property
    def lines(self):
        return self._context.lines

    def _decode_source(self):
        """Back-compat shim — the context already decoded once at construction.

        Kept so any external caller using the historical method name keeps
        working without touching the underlying bytes again.
        """
        return self._context.source

    def _parse_ast(self):
        """Return the shared pyjsparser AST (or None if unavailable)."""
        return self._context.ast

    def _calculate_text_entropy(self, text):
        """Shannon text entropy for `text`.

        When `text` is the context's own source we read the cached value;
        otherwise we compute fresh. JSStringsExtractor calls this on arbitrary
        decoded substrings, so the fresh-compute path must remain available.
        """
        if text is self._context.source:
            return self._context.text_entropy
        return _text_entropy(text)

    def _detect_environment(self):
        """Detect the target JS runtime environment."""
        src = self.js_source
        if not src:
            return "unknown"

        # WScript/WSH indicators
        wscript_patterns = [
            'WScript.', 'WSH.', 'ActiveXObject', 'Scripting.FileSystemObject',
            'WScript.Shell', 'ADODB.Stream',
        ]
        for p in wscript_patterns:
            if p in src:
                return "wscript"

        # Browser-extension APIs — checked before generic browser/worker because
        # `chrome.*` and `browser.runtime` are distinctive of MV2/MV3 extensions
        extension_patterns = [
            'chrome.runtime', 'chrome.tabs', 'chrome.storage',
            'chrome.webRequest', 'browser.runtime', 'browser.tabs',
        ]
        for p in extension_patterns:
            if p in src:
                return "browser_extension"

        # Service / Web Workers — worker-only APIs that don't appear in regular
        # browser pages (a generic browser script would use `window.` or
        # `document.`, never `self.importScripts` or `caches.match`)
        worker_patterns = [
            "self.addEventListener('fetch'", 'self.addEventListener("fetch"',
            'self.importScripts', 'self.skipWaiting',
            'caches.match', 'caches.open',
        ]
        for p in worker_patterns:
            if p in src:
                return "service_worker"

        # Deno runtime
        if 'Deno.' in src:
            return "deno"

        # Node.js indicators
        node_patterns = [
            'require(', 'module.exports', 'process.env', '__dirname',
            '__filename', 'Buffer.', 'child_process',
        ]
        for p in node_patterns:
            if p in src:
                return "node"

        # Browser indicators
        browser_patterns = [
            'document.', 'window.', 'navigator.', 'localStorage',
            'sessionStorage', 'XMLHttpRequest', 'addEventListener',
        ]
        for p in browser_patterns:
            if p in src:
                return "browser"

        return "unknown"

    def _detect_script_type(self):
        """Detect the script type/format."""
        src = self.js_source
        if not src:
            return "unknown"

        stripped = src.lstrip()

        # JScript.Encode payload — must be checked first since the encoded
        # body can't be classified any other way
        if stripped.startswith('#@~^'):
            return "jse"

        # WSF / HTA live in the first few KB of an HTML-ish wrapper
        head_lower = stripped[:4096].lower()

        # Windows Script File — XML wrapper around one or more <script> blocks
        if ('<job' in head_lower or '<package' in head_lower) and '<script' in head_lower:
            return "wsf"

        # HTML Application — distinct from generic embedded_html because HTAs
        # run under mshta.exe with full WSH/ActiveX access
        if '<hta:application' in head_lower or 'application/hta' in head_lower:
            return "hta"

        if stripped.startswith('<!') or stripped.startswith('<html') or '<script' in stripped[:2000]:
            return "embedded_html"

        if 'WScript.' in src or 'WSH.' in src:
            return "wscript"

        if _ESM_PATTERN.search(src):
            return "esm"

        if 'require(' in src or 'module.exports' in src:
            return "node_module"

        return "standalone"