Skip to content

#3265 step 0: state the calls_out contract (what counts as a call) #3327

Closed

Description

@squid-protocol

Part of #3265. Do first -- every later step (resolver, metrics, benchmark) needs a written definition of what a call is, or there is nothing to resolve or score against.

Today the definition is implicit, spread across each language's calls_out pattern and the per-language _calls_out_ignore sets added in Epic #3264 Phase 3 (#3282-#3287). calls_out_to (detector.py ~L8781) is a deduplicated list of bare names with self-recursion removed and call counts dropped.

Decisions to write down (one language-independent sentence plus corollaries, via the rule-contract-audit process into gitgalaxy/standards/signal_contracts.py):

  • Constructors (new Foo(), Foo() in Python) -- a call to Foo?
  • Method calls -- is obj.save() the edge save, or obj.save (see step 2)?
  • Built-ins / stdlib (print, len) -- emitted and classified later as external, or never emitted?
  • Macros, decorators, callbacks passed by name (map(f, xs)), dynamic dispatch (getattr, call_user_func).
  • Recursion -- keep dropping it, or keep it (function PageRank will want it)?
  • Multiplicity -- keep deduplicating, or keep per-call-site counts for edge weights?

Done when: the contract row is stated, and the per-language rules that disagree with it are listed (fixing them can be follow-ups).

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-engineenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions