Logo von Abstract Trace Summarizer

Abstract Trace Summarizer

Community
ArabelaTso
abstract-trace-summarizer

Führt abstrakte Interpretation durch, um zusammengefasste Ausführungsspuren und Darstellungen des Programmverhaltens auf hoher Ebene zu erstellen. Hebt wichtige Kontrollflusspfade, Variablenbeziehungen, Schleifeninvarianten, Funktionszusammenfassungen und mögliche Laufzeitzustände mithilfe abstrakter Domänen hervor (Intervalle, Vorzeichen, Nullheit usw.). Verwenden Sie diesen Skill, um Programmverhalten zu analysieren, Ausführungspfade nachzuvollziehen, Schleifeninvarianten zu berechnen, Wertebereiche von Variablen zu verfolgen, potenzielle Laufzeitfehler zu erkennen oder Programmzusammenfassungen ohne konkrete Ausführung zu erstellen.

Add to TypingMind

Übersicht

HerausgeberArabelaTso
RepositorySkills-4-SE
Skill-Nameabstract-trace-summarizer
Sterne
258
Forks
25
Mitgelieferte Dateien
2
LizenzApache-2.0
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 2

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von ArabelaTso auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Abstract Trace Summarizer in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/abstract-trace-summarizer
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git /tmp/Skills-4-SE
mkdir -p .claude/skills
cp -r /tmp/Skills-4-SE/skills/abstract-trace-summarizer .claude/skills/abstract-trace-summarizer
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Abstract Trace Summarizer in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Abstract Trace Summarizer automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Abstract Trace Summarizer nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Abstract Trace Summarizer

Overview

This skill performs abstract interpretation to analyze program behavior and produce summarized execution traces. It computes over-approximations of possible runtime states, tracks control flow paths, infers variable relationships, and generates high-level behavioral summaries without requiring concrete program execution.

Core Workflow

1. Program Analysis Setup

Initial Assessment:

  • Identify programming language and paradigm
  • Determine analysis scope (function, module, program)
  • Select appropriate abstract domains
  • Identify analysis goals (safety, correctness, optimization)

Abstract Domain Selection:

Choose domains based on analysis needs:

Numerical domains:

  • Intervals: Track value ranges [min, max]
  • Signs: Track {negative, zero, positive, unknown}
  • Octagons: Linear constraints ±x ±y ≤ c
  • Polyhedra: General linear constraints

Non-numerical domains:

  • Nullness: Track {null, non-null, unknown} for pointers
  • Constant propagation: Track known constant values
  • Type domains: Track possible types
  • Parity: Track {even, odd, unknown}

Relational vs non-relational:

  • Non-relational: Track variables independently (faster, less precise)
  • Relational: Track relationships between variables (slower, more precise)

2. Control Flow Analysis

Build Control Flow Graph (CFG):

Represent program structure:

Entry → Statement₁ → Statement₂ → ... → Exit
         ↓ (branch)
       Statement₃ → ...

Identify key structures:

  • Sequential: Straight-line code
  • Conditional: if-then-else branches
  • Loops: while, for, do-while
  • Function calls: Call/return edges
  • Exception handling: try-catch-finally

Path analysis:

  • Path-sensitive: Track separate states per path (more precise)
  • Path-insensitive: Merge states at join points (more efficient)
  • Trace partitioning: Hybrid approach based on key predicates

3. Abstract State Computation

Transfer Functions:

Model how statements affect abstract states:

Assignment: x = expr

1. Evaluate expr in current abstract state
2. Update abstract state for variable x
3. Propagate to successor states

Conditional: if (condition)

1. Evaluate condition in current abstract state
2. Refine state for true branch (assume condition holds)
3. Refine state for false branch (assume condition doesn't hold)
4. Analyze both branches separately

Loop: while (condition)

1. Compute fixpoint at loop head using widening
2. Analyze loop body with refined state
3. Optionally apply narrowing for precision
4. Extract loop invariant from fixpoint

Function call: y = f(x)

1. Look up or compute function summary
2. Apply preconditions to arguments
3. Update state with postconditions
4. Handle side effects

Lattice Operations:

Join (∪): Merge states from different paths

Example: [1,5] ∪ [3,8] = [1,8]
Use: At control flow merge points

Meet (∩): Refine state with constraints

Example: [1,10] ∩ [5,15] = [5,10]
Use: When adding constraints from conditions

Widening (∇): Accelerate convergence for loops

Example: [0,n] ∇ [0,n+1] = [0,+∞]
Use: At loop heads to ensure termination

Narrowing (△): Refine widened results

Example: [0,+∞] △ [0,100] = [0,100]
Use: After widening to improve precision

4. Variable Relationship Tracking

Data Dependencies:

Track how variables affect each other:

  • Def-use chains: Where variables are defined and used
  • Use-def chains: Which definitions reach each use
  • Dependency graph: Variable dependency relationships

Relational Constraints:

For relational domains, track constraints:

Intervals: x ∈ [0,10], y ∈ [5,15]
Octagons: x - y ≤ 5, x + y ≤ 20
Polyhedra: 2x + 3y ≤ 30, x - y ≥ 0

Equality Tracking:

After x = y: track that x and y have equal values
After x = y + 1: track that x = y + 1

5. Loop Invariant Inference

Fixpoint Computation:

1. Initialize loop head state
2. Analyze loop body
3. Compute join of entry state and back-edge state
4. Apply widening if not converged
5. Repeat until fixpoint reached
6. Optionally apply narrowing

Loop Invariant:

Properties that hold at loop head:

Example: for i in range(n):
  Invariant: 0 ≤ i < n

Loop Bounds:

Estimate iteration counts:

  • Constant bounds: for i in range(10) → 10 iterations
  • Symbolic bounds: for i in range(n) → n iterations
  • Unbounded: while condition → unknown iterations

Loop Effects:

Summarize loop behavior:

  • Which variables are modified
  • How values change per iteration
  • Accumulated effects over all iterations

6. Function Summarization

Compute Function Summaries:

Preconditions: Required input states

Example: def divide(a, b)
  Precondition: b ≠ 0

Postconditions: Guaranteed output states

Example: def abs(x)
  Postcondition: result ≥ 0

Side effects: Modifications to global state

Example: def append(list, item)
  Side effect: list length increases by 1

Frame conditions: What remains unchanged

Example: def get_first(list)
  Frame: list is not modified

Modular Analysis:

Analyze functions separately:

  1. Compute summary for each function
  2. Reuse summaries at call sites
  3. Handle recursion with fixpoint computation

7. Trace Summarization

Generate High-Level Summary:

Execution paths:

Path 1: Entry → L1 → L2 → L5 → Exit
  Condition: x > 0
  Result: returns positive value

Path 2: Entry → L1 → L3 → L4 → Exit
  Condition: x ≤ 0
  Result: returns zero or negative value

Key control flow:

- 3 conditional branches
- 2 loops (nested)
- 5 function calls
- 1 exception handler

Variable states:

Entry: x ∈ ℤ, y ∈ ℤ
Exit: result ∈ [0, +∞]
Invariant: x + y ≤ 100

Potential runtime states:

Normal termination: 85% of paths
Exception thrown: 15% of paths
Infinite loop: Not possible (proven)

Output Format

Structure the abstract trace summary as follows:

markdown
## Program Summary
- **Language**: [Programming language]
- **Scope**: [Function/Module/Program name]
- **Analysis Type**: [Abstract domain(s) used]

## Control Flow Structure
- **Total paths**: [Number of execution paths]
- **Loops**: [Number and nesting depth]
- **Conditionals**: [Number of branches]
- **Function calls**: [Number of calls]

## Abstract States

### Entry State
[Initial abstract state for variables]

### Key Program Points
**Location L1**: [Statement or label]

[Abstract state at this point]


**Location L2**: [Statement or label]

[Abstract state at this point]


### Exit State
[Final abstract state for variables]

## Variable Relationships
[Tracked relationships and constraints between variables]

## Loop Invariants
**Loop at L[X]**:
- **Invariant**: [Properties that hold at loop head]
- **Bound**: [Iteration count estimate]
- **Effect**: [How loop modifies state]

## Function Summaries
**Function [name]**:
- **Precondition**: [Required input conditions]
- **Postcondition**: [Guaranteed output conditions]
- **Side effects**: [Modifications to global state]
- **Complexity**: [Time/space complexity]

## Execution Paths

### Path 1: [Description]
**Condition**: [Path condition]
**Trace**: [Sequence of program points]
**Result**: [Final state or return value]

### Path 2: [Description]
**Condition**: [Path condition]
**Trace**: [Sequence of program points]
**Result**: [Final state or return value]

## Potential Runtime Behaviors
- **Normal termination**: [Conditions and states]
- **Exceptions**: [Possible exceptions and conditions]
- **Non-termination**: [Infinite loops or recursion]
- **Resource usage**: [Memory, time estimates]

## Safety Properties
- **Buffer safety**: [Array bounds checking results]
- **Null safety**: [Null pointer dereference analysis]
- **Type safety**: [Type correctness analysis]
- **Arithmetic safety**: [Overflow/underflow analysis]

## Recommendations
[Suggestions for improving code based on analysis]

Analysis Techniques by Language

Python

  • Type inference: Track possible types for dynamic variables
  • Exception flow: Model try-except-finally blocks
  • List operations: Track list lengths and element types
  • Dictionary operations: Track key-value relationships

Java/C#

  • Null analysis: Track nullness for object references
  • Type hierarchy: Use class hierarchy for precision
  • Exception handling: Model checked and unchecked exceptions
  • Concurrency: Analyze thread interleavings and synchronization

C/C++

  • Pointer analysis: Track points-to relationships
  • Buffer bounds: Analyze array and buffer accesses
  • Memory safety: Detect use-after-free, double-free
  • Undefined behavior: Identify potential UB

JavaScript

  • Type coercion: Model implicit type conversions
  • Prototype chain: Track prototype relationships
  • Async operations: Model promises and callbacks
  • Dynamic properties: Track object property additions

Common Analysis Patterns

Pattern 1: Simple Loop Analysis

python
# Code
for i in range(n):
    sum += arr[i]

# Analysis
Entry: sum = 0, i = ⊤, n ∈ [0,+∞]
Loop head: sum ∈ [0,+∞], i ∈ [0,n-1]
Loop invariant: 0 ≤ i < n, sum ≥ 0
Exit: sum ∈ [0,+∞], i = n

Pattern 2: Conditional Branch Analysis

python
# Code
if x > 0:
    result = x
else:
    result = -x

# Analysis
Entry: x ∈ ℤ
Branch 1 (x > 0): x ∈ [1,+∞], result = x ∈ [1,+∞]
Branch 2 (x ≤ 0): x ∈ [-∞,0], result = -x ∈ [0,+∞]
Join: result ∈ [0,+∞]

Pattern 3: Null Safety Analysis

java
// Code
if (obj != null) {
    return obj.getValue();
}
return -1;

// Analysis
Entry: obj ∈ {null, non-null, ⊤}
Branch 1 (obj != null): obj = non-null, access SAFE
Branch 2 (obj == null): obj = null, no dereference
Result: No null pointer dereference possible

Pattern 4: Array Bounds Analysis

python
# Code
for i in range(len(arr)):
    arr[i] = 0

# Analysis
Entry: arr has length L ∈ [0,+∞]
Loop: i ∈ [0, L-1]
Access: arr[i] where i ∈ [0, L-1] ⊆ [0, L-1]
Result: All accesses are safe

Precision vs Performance Trade-offs

High Precision (Slower)

  • Path-sensitive analysis
  • Relational domains (polyhedra, octagons)
  • Context-sensitive function analysis
  • Narrowing after widening

Use when:

  • Proving critical safety properties
  • Small code regions
  • High assurance requirements

Balanced Precision

  • Trace partitioning
  • Interval domain with some relations
  • Summary-based function analysis
  • Widening without narrowing

Use when:

  • General program analysis
  • Medium-sized programs
  • Balance between precision and cost

High Performance (Less Precise)

  • Path-insensitive analysis
  • Non-relational domains (intervals, signs)
  • Context-insensitive function analysis
  • Aggressive widening

Use when:

  • Large codebases
  • Quick feedback needed
  • Scalability is priority

Important Guidelines

DO:

  • ✅ Select appropriate abstract domains for the analysis goal
  • ✅ Clearly document assumptions and approximations
  • ✅ Explain loop invariants and their significance
  • ✅ Highlight potential safety issues or runtime errors
  • ✅ Provide concrete examples when explaining abstract states
  • ✅ Show both over-approximation and under-approximation when relevant
  • ✅ Explain fixpoint computation for loops
  • ✅ Track variable relationships when using relational domains

DON'T:

  • ❌ Claim absolute certainty (abstract interpretation is approximate)
  • ❌ Ignore infeasible paths without noting them
  • ❌ Use overly complex domains when simpler ones suffice
  • ❌ Forget to apply widening at loop heads (may not terminate)
  • ❌ Present abstract states without explaining their meaning
  • ❌ Ignore language-specific features (exceptions, concurrency)
  • ❌ Overlook function summaries for modular analysis

Resources

references/abstract_interpretation.md

Comprehensive guide to abstract interpretation concepts including abstract domains, lattice operations, transfer functions, control flow analysis, variable relationship tracking, runtime state abstraction, trace summarization techniques, and precision vs performance trade-offs.

references/examples.md

Complete examples of abstract trace summarization for various program patterns including simple loops, conditional branches, nested loops, pointer analysis, exception flow, recursive functions, concurrent programs, array bounds checking, string analysis, and state machines.

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Abstract Trace Summarizer?

Führt abstrakte Interpretation durch, um zusammengefasste Ausführungsspuren und Darstellungen des Programmverhaltens auf hoher Ebene zu erstellen. Hebt wichtige Kontrollflusspfade, Variablenbeziehungen, Schleifeninvarianten, Funktionszusammenfassungen und mögliche Laufzeitzustände mithilfe abstrakter Domänen hervor (Intervalle, Vorzeichen, Nullheit usw.). Verwenden Sie diesen Skill, um Programmverhalten zu analysieren, Ausführungspfade nachzuvollziehen, Schleifeninvarianten zu berechnen, Wertebereiche von Variablen zu verfolgen, potenzielle Laufzeitfehler zu erkennen oder Programmzusammenfa...

Warum Abstract Trace Summarizer in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Abstract Trace Summarizer besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Abstract Trace Summarizer in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/abstract-trace-summarizer ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Abstract Trace Summarizer nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Abstract Trace Summarizer verwenden?

So viele Sie möchten. In TypingMind können Sie Abstract Trace Summarizer mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Abstract Trace Summarizer kostenlos?

Ja. Der Skill wird von ArabelaTso auf GitHub unter der Lizenz Apache-2.0 veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇