MCPcopy Index your code
hub / github.com/appleseedlab/superc

github.com/appleseedlab/superc @v1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0 ↗ · + Follow
13,137 symbols 63,007 edges 2,059 files 7,942 documented · 60%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

xtc

A clone of the xtc project including SuperC and Kmax. The main homepage for xtc is http://www.cs.nyu.edu/xtc/, where past versions and links to publications can be found.

Dependencies and environment variables

Building SuperC requires bison. For debian and ubuntu run

apt-get install bison

The following environment variables are expected by xtc.

JAVA_DEV_ROOT=~/src/xtc  # or wherever your git repo is cloned
CLASSPATH=$CLASSPATH:$JAVA_DEV_ROOT/classes:$JAVA_DEV_ROOT/bin/junit.jar:$JAVA_DEV_ROOT/bin/antlr.jar:$JAVA_DEV_ROOT/bin/javabdd.jar:/usr/share/java/org.sat4j.core.jar
JAVA_ARGS="-Xms2048m -Xmx4048m -Xss128m" # JVM settings
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/  # Location of java jdk
export JAVA_DEV_ROOT CLASSPATH JAVA_ARGS JAVA_HOME

Building SuperC

Starting from the root of the xtc source tree, run the following:

cd src/xtc/lang/cpp/  # go to the SuperC directory
make configure  # configure SuperC
cd -  # go back to the source root
make  # build all of xtc

Testing SuperC

From the root of the source tree, run

make check-cpp

Using SuperC with Linux source code

Use the script src/xtc/lang/cpp/scripts/superc_linux.sh. See src/xtc/lang/cpp/scripts/data.sh for example usage. Linux versions past 2013 have not been tested.

SuperC Manual

Run make manual in src/xtc/lang/cpp. Requires pdflatex.

Kmax

See Kmax's README for build and use instructions.

Extension points exported contracts — how you extend this code

ParsingContext (Interface)
The interface for the parsing context plugin. @author Robert Grimm, Paul Gazzillo @version $Revision: 1.1 $ [7 implementers]
src/xtc/lang/cpp/ParsingContext.java
EOFListener (Interface)
Event listener to provide notification that the most recently inserted character stream has reached its end. @see #inse
data/NestedReader.java
RSAPrivateKey (Interface)
@version $Revision: 1.1 $ @author Jeroen C. van Gelderen (gelderen@cryptix.org)
data/RSAPrivateKey.java
BlinkEventSource (Interface)
The Blink event source tag. [6 implementers]
src/xtc/lang/blink/Event.java
Action (Interface)
The interface to all actions. An action implements a computation that takes a single argument and produces a single res [21 …
src/xtc/util/Action.java
SemanticValues (Interface)
Support for semantic actions and parser context. @author Robert Grimm, Paul Gazzillo @version $Revision: 1.4 $ [4 implementers]
src/xtc/lang/cpp/SemanticValues.java
SemanticActions (Interface)
The interface to the semantic action plugin. @author Paul Gazzillo @version $Revision: 1.4 $ [4 implementers]
src/xtc/lang/cpp/SemanticActions.java

Core symbols most depended-on inside this repo

hasValue
called by 10107
src/xtc/parser/Result.java
semanticValue
called by 6926
src/xtc/parser/Result.java
select
called by 6133
src/xtc/parser/Result.java
createValue
called by 3765
src/xtc/parser/Result.java
create
called by 3658
src/xtc/tree/GNode.java
select
called by 3207
src/xtc/parser/ParseError.java
location
called by 2573
src/xtc/parser/ParserBase.java
setLocation
called by 2313
src/xtc/tree/Node.java

Shape

Method 9,576
Function 2,026
Class 1,405
Enum 92
Interface 38

Languages

Java77%
C18%
Python4%
C++1%

Modules by API surface

src/xtc/lang/blink/CommandParser.java645 symbols
src/xtc/lang/jeannie/JeannieParser.java383 symbols
src/xtc/lang/CFactoryParser.java239 symbols
src/xtc/lang/blink/agent/c2j_proxy.c234 symbols
src/xtc/lang/CReader.java225 symbols
src/xtc/lang/CParser.java221 symbols
src/xtc/lang/JavaFactoryParser.java199 symbols
src/xtc/lang/JavaSevenReader.java198 symbols
src/xtc/lang/JavaSevenParser.java192 symbols
src/xtc/lang/JavaEntities.java192 symbols
src/xtc/lang/JavaFiveReader.java188 symbols
src/xtc/lang/CAnalyzer.java185 symbols

For agents

$ claude mcp add superc \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact