@@ -152,7 +152,7 @@ Content outside the markers is preserved when regenerating. Enable this with `sy
152152
153153```
154154vallm/
155- ├── mcp_server├── mcp/ ├── server/ ├── bump_version ├── _tools_vallm ├── hookspecs├── examples/ ├── cli/ ├── mcp_demo ├── vallm/ ├── __main__ ├── self_server ├── base ├── logical ├── complexity ├── regression ├── validators/ ├── security ├── semantic_cache ├── syntax ├── semantic ├── imports/ ├── lint ├── graph_diff ├── core/ ├── proposal ├── gitignore ├── ast_compare ├── output_formatters ├── scoring ├── batch_processor ├── languages ├── sandbox/ ├── runner ├── base ├── python_imports ├── javascript_imports ├── go_imports ├── c_imports ├── rust_imports ├── wrapper ├── factory ├── utils ├── main_template ├── java_imports ├── main ├── main ├── main ├── ollama_simple_demo ├── claude_autonomous_demo ├── iteration_1 ├── iteration_2 ├── best_version ├── main ├── main ├── main ├── main_template ├── main ├── refactored_output ├── main ├── utils/ ├── mcp_demo ├── extraction ├── save_analysis_data ├── extract_code_from_response ├── validation_runner ├── logging_utils ├── main ├── order_processor ├── process_user_input ├── simple_buggy ├── load_config ├── utils/ ├── calculate_total ├── save_data ├── main├── project ├── run ├── run ├── docker-entrypoint ├── run ├── docker-entrypoint ├── run ├── docker-entrypoint ├── data_processor ├── config ├── command_handlers```
155+ ├── examples/├── mcp/ ├── server/ ├── bump_version├── mcp_server ├── hookspecs ├── _tools_vallm ├── cli/ ├── mcp_demo ├── vallm/ ├── __main__ ├── self_server ├── base ├── logical ├── complexity ├── regression ├── validators/ ├── security ├── semantic_cache ├── syntax ├── semantic ├── imports/ ├── lint ├── graph_diff ├── core/ ├── proposal ├── gitignore ├── ast_compare ├── output_formatters ├── scoring ├── batch_processor ├── runner ├── sandbox/ ├── base ├── javascript_imports ├── python_imports ├── languages ├── go_imports ├── c_imports ├── rust_imports ├── utils ├── wrapper ├── factory ├── java_imports ├── main_template ├── main ├── main ├── main ├── claude_autonomous_demo ├── iteration_1 ├── best_version ├── iteration_2 ├── main ├── main ├── ollama_simple_demo ├── main ├── main_template ├── main ├── refactored_output ├── main ├── utils/ ├── mcp_demo ├── save_analysis_data ├── extraction ├── extract_code_from_response ├── logging_utils ├── validation_runner ├── order_processor ├── main ├── process_user_input ├── load_config ├── utils/ ├── simple_buggy ├── calculate_total ├── main ├── save_data├── project ├── run ├── run ├── docker-entrypoint ├── run ├── docker-entrypoint ├── run ├── docker-entrypoint ├── data_processor ├── config ├── command_handlers```
156156
157157## API Overview
158158
@@ -177,12 +177,12 @@ vallm/
177177- **`ValidationResult`** — Result from a single validator.
178178- **`PipelineResult`** — Aggregated result from all validators.
179179- **`BatchProcessor`** — Handles batch validation of multiple files.
180- - **`Language`** — Supported programming languages with their tree-sitter identifiers.
181180- **`ExecutionResult`** — Result of sandboxed code execution.
182181- **`SandboxRunner`** — Unified interface for running code in a sandbox.
183182- **`BaseImportValidator`** — Base class for all import validators.
184- - **`PythonImportValidator`** — Python-specific import validator.
185183- **`JavaScriptImportValidator`** — JavaScript/TypeScript import validator.
184+ - **`PythonImportValidator`** — Python-specific import validator.
185+ - **`Language`** — Supported programming languages with their tree-sitter identifiers.
186186- **`GoImportValidator`** — Go import validator.
187187- **`CImportValidator`** — C/C++ import validator.
188188- **`RustImportValidator`** — Rust import validator.
@@ -270,15 +270,6 @@ vallm/
270270- `visualize_flow(code, output_path)` — Generate control flow visualization.
271271- `main()` — Main example function.
272272- `main()` — —
273- - `log_section(title)` — —
274- - `log_step(step, description)` — —
275- - `analyze_with_code2llm(code_path)` — Simple code2llm analysis.
276- - `call_ollama(prompt, model)` — Call Ollama API.
277- - `validate_with_vallm(code)` — Simple vallm validation.
278- - `run_simple_test(code)` — Simple syntax test.
279- - `generate_ollama_prompt(code, analysis)` — Generate simple prompt for Ollama.
280- - `run_simple_workflow(code_path, max_iterations)` — Run simple refactoring workflow.
281- - `main()` — Main function.
282273- `log_section(title)` — Print a section header.
283274- `log_step(step, description)` — Print a step.
284275- `log_code(label, code, max_lines)` — Log code with label.
@@ -296,6 +287,15 @@ vallm/
296287- `main()` — Main function with improvements.
297288- `main()` — —
298289- `main()` — —
290+ - `log_section(title)` — —
291+ - `log_step(step, description)` — —
292+ - `analyze_with_code2llm(code_path)` — Simple code2llm analysis.
293+ - `call_ollama(prompt, model)` — Call Ollama API.
294+ - `validate_with_vallm(code)` — Simple vallm validation.
295+ - `run_simple_test(code)` — Simple syntax test.
296+ - `generate_ollama_prompt(code, analysis)` — Generate simple prompt for Ollama.
297+ - `run_simple_workflow(code_path, max_iterations)` — Run simple refactoring workflow.
298+ - `main()` — Main function.
299299- `main()` — —
300300- `main()` — —
301301- `main()` — —
@@ -324,20 +324,15 @@ vallm/
324324- `generate_refactoring_prompt(code, analysis)` — Generate prompt for LLM to refactor code.
325325- `run_mcp_workflow(code_path, max_iterations)` — Run the complete MCP workflow.
326326- `main()` — Main entry point.
327+ - `save_analysis_data(example_name, result_data)` — Save analysis data to JSON file.
327328- `extract_code_from_response(response, language)` — Extract code from LLM response.
328329- `extract_json_from_response(response)` — Extract JSON object from LLM response.
329- - `save_analysis_data(example_name, result_data)` — Save analysis data to JSON file.
330330- `extract_code_from_response(response)` — Extract Python code from LLM response.
331- - `run_validation_examples(example_name, good_code, bad_code, complex_code)` — Run standard validation examples (good, bad, complex code).
332331- `log_section(title)` — Print a section header.
333332- `log_step(step, description)` — Print a step indicator.
334333- `log_code(label, code, max_lines)` — Log code with label and truncation.
335334- `log_result(status, message)` — Log a result with appropriate color.
336- - `create_sample_project(base_path)` — Create a sample project for analysis.
337- - `analyze_with_code2llm(project_path)` — Analyze project structure using code2llm.
338- - `validate_with_vallm(project_path)` — Validate all Python files with vallm.
339- - `generate_report(code2llm_result, vallm_result, output_path)` — Generate combined analysis report.
340- - `main()` — Main example function.
335+ - `run_validation_examples(example_name, good_code, bad_code, complex_code)` — Run standard validation examples (good, bad, complex code).
341336- `process_order(data)` — Process order data - has multiple issues.
342337- `load_config()` — Load config - security issue with eval.
343338- `save_data(data, filename)` — Save data - uses pickle without validation.
@@ -346,18 +341,23 @@ vallm/
346341- `validate_email_2(email)` — Email validation - same logic, different function.
347342- `calculate_shipping(weight)` — Calculate shipping with magic numbers.
348343- `dead_code()` — Function that's never called.
344+ - `create_sample_project(base_path)` — Create a sample project for analysis.
345+ - `analyze_with_code2llm(project_path)` — Analyze project structure using code2llm.
346+ - `validate_with_vallm(project_path)` — Validate all Python files with vallm.
347+ - `generate_report(code2llm_result, vallm_result, output_path)` — Generate combined analysis report.
348+ - `main()` — Main example function.
349349- `process_user_input(user_input)` — Process user input with standard logic.
350+ - `load_config()` — Load configuration with default values.
350351- `process_user_input(user_input)` — Process user input with security issues.
351352- `load_config()` — Load configuration with eval.
352353- `save_data(data, filename)` — Save data without validation.
353354- `calculate_total(items)` — Calculate total with no error handling.
354355- `duplicate_function()` — Another duplicate function.
355356- `unused_function()` — This function is never used.
356357- `main()` — Main function with problems.
357- - `load_config()` — Load configuration with default values.
358358- `calculate_total(items)` — Calculate total price from items list.
359- - `save_data(data, filename)` — Save data to JSON file.
360359- `run_demo_main()` — Run the standard demo main function pattern.
360+ - `save_data(data, filename)` — Save data to JSON file.
361361- `run_example()` — —
362362- `print_section()` — —
363363- `print_step()` — —
0 commit comments