Skip to main content

`symflower symbols`

info

symflower symbols is currently available in CLI

This feature queries all functions and methods in a repository and outputs a list of all the symbols:

symflower symbols $filepath

Use the symbols list to make sure LLMs thoroughly analyze your repository.

Querying all functions/methods in a repository

When using LLMs to analyze all functions/methods in a repository, it is necessary to make sure that:

  • all of the files are located by the LLM
  • all the function/method names are found
  • and maybe even that the locations of functions/methods within the file are found.

symflower symbols provides access to the data collected by Symflower's logic for static analysis.

The output of this command is a log of all symbols in the file.

Tutorial: symflower symbols

Our example is a simple function that calculates the area of a circle:

package com.symflower.area;

public class Circle {
public static double CircleArea(double radius) {
if (radius <= 0) {
throw new IllegalArgumentException("radius must be positive");
}

return Math.PI * radius * radius;
}
}

Our main function prints the circle's area with a radius of 5.0:

package com.symflower;

import com.symflower.area.Circle;

public class Main {
public static void main(String[] args) {
System.out.println(Circle.CircleArea(5.0));
}
}

Using symflower symbols to query all functions and methods in the code returns the following output:

src/main/java/com/symflower/Main.java::Main//main:6:5-8:5
src/main/java/com/symflower/area/Circle.java::Circle//CircleArea:4:2-10:2