cirrus-uchicago/symbolon/align-array-indexing-with-input

Claude Code and agent skill by cirrus-uchicago/symbolon

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when the program accesses a precomputed table using an offset (e.g., arr[n-1]) that introduces an arithmetic operation between the symbolic input and the index

Install

npx vskill@latest install cirrus-uchicago/symbolon/align-array-indexing-with-input

SKILL.md

The same SKILL.md was published earlier as cirrus-uchicago/symbolon/align-array-indexing-with-input.

align-array-indexing-with-input

Overview

A KLEE-coverage code transformation. Applying it rewrites C source so symbolic execution explores more of the program's behavior.

When to use

When the program accesses a precomputed table using an offset (e.g., arr[n-1]) that introduces an arithmetic operation between the symbolic input and the index

Transformation

Reindex the precomputed array so the symbolic input directly maps to the array slot (e.g., store dp[n] instead of x[n-1]), removing the subtraction at the access site

Why it helps

KLEE models array accesses as constraints over the index expression; eliminating arithmetic on the symbolic index produces simpler, more directly solvable constraints and avoids extra path conditions for boundary cases like n-1 underflow, letting the solver enumerate valid inputs faster and reach more branches.

Example

Before:

c
#include<stdio.h>
int main(){
int x[32]={1,2,4};
for(int i=3;i<31;i++)
x[i]=x[i-1]+x[i-2]+x[i-3];
int n;
while(1){
scanf("%d",&n);if(n==0)break;
int d=x[n-1];
int y=d/365/10+1;
printf("%d\n",y);
}
return 0;
}

After:

c
#include<stdio.h>
int main(){
int i=2,n,dp[31];
dp[0]=dp[1]=1;
dp[2]=2;
while(++i<31)
dp[i]=dp[i-1]+dp[i-2]+dp[i-3];
while(scanf("%d",&n),n)
printf("%d\n",dp[n]/(10*365)+1);
}

Evidence

  • Average coverage delta: 0.353
  • Source problems: train_AIZU_p00168
  • Rule id: 17f85a7d

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
11
7-day trend score
17

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cirrus-uchicago/symbolon/align-array-indexing-with-input/badge)](https://verified-skill.com/skills/cirrus-uchicago/symbolon/align-array-indexing-with-input)

Something wrong with this skill or its page? Tell us.