cirrus-uchicago/symbolon/early-exit-large-range-shortcut

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 nested loops iterate over a range [a,b] that may be very large, forcing symbolic execution to unroll many iterations to discover that the answer is trivially determined (e.g., when the range exceeds a modulus).

Install

npx vskill@latest install cirrus-uchicago/symbolon/early-exit-large-range-shortcut

SKILL.md

The same SKILL.md was published earlier as cirrus-uchicago/symbolon/early-exit-large-range-shortcut.

early-exit-large-range-shortcut

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 nested loops iterate over a range [a,b] that may be very large, forcing symbolic execution to unroll many iterations to discover that the answer is trivially determined (e.g., when the range exceeds a modulus).

Transformation

Add an upfront guard that detects the trivial case (e.g., if (b-a) > MOD print 0) and returns immediately, so the expensive nested loop is only entered for small bounded ranges.

Why it helps

KLEE's path explosion grows with loop iteration counts on symbolic bounds; a guarded shortcut prunes an entire class of inputs into one path with a simple constraint, letting the solver focus on the bounded sub-case and achieve deeper coverage within its budget.

Example

Before:

c
#include<stdio.h>
int main()
{
unsigned long long a,b,i,j,t=2018,m;
scanf("%ld%ld",&a,&b);
for(i=a;i<=b-1;i++)
{
for(j=i+1;j<=b;j++)
{
m=i*j%2019;
if(m<t)
t=m;
if(t==0)
break;
}
if(t==0)
break;
}
printf("%ld",t);
}

After:

c
#include<stdio.h>
int main()
{
long long a,b,m=1000000;
scanf("%lld%lld",&a,&b);
if(b-a>2019)printf("0\n");
else
{
for(long long i=a;i<b;i++)
{
for(long long j=i+1;j<=b;j++)
{
if((i%2019*j%2019)%2019<m)m=(i%2019*j%2019)%2019;
}
}
printf("%lld\n",m);
}
}

Evidence

  • Average coverage delta: 0.3438
  • Source problems: train_AtCoder_p02983
  • Rule id: e06f0780

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/early-exit-large-range-shortcut/badge)](https://verified-skill.com/skills/cirrus-uchicago/symbolon/early-exit-large-range-shortcut)

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