Tutorials

Learn how to use CodeLogician through hands-on tutorials. Whether you prefer command-line interfaces or terminal UIs, these guides will help you get started with formal verification.

Why These Tutorials Matter

Master CodeLogician through practical, step-by-step guides that teach you:

  • Setting up and configuring CodeLogician for your workflow
  • Understanding core concepts like formalization, verification, and reasoning
  • Using different interfaces - CLI for automation, TUI for exploration
  • Integrating with AI assistants like Claude Code and other tools

Available Tutorials

These tutorials walk you through the essential features of CodeLogician:

Available Tutorials

CLI Tutorial: CodeLogician with Claude Code

Focus: Command-line interface for AI coding assistants
Use Case: Integrating CodeLogician with terminal-based coding agents
Duration: ~30 minutes

Start Tutorial →

What you'll learn:

  • Installing and setting up the CodeLogician CLI
  • Using the codelogician doc command for documentation
  • Establishing a rapid feedback loop with codelogician eval
  • Building a verified traffic light control system from scratch
  • Leveraging formal verification in your coding workflow

Key Features:

  • Rapid feedback loops with CLI commands
  • Comprehensive IML/ImandraX documentation access
  • Integration with terminal-based AI assistants
  • Practical example: Traffic light safety verification

TUI Tutorial: Terminal User Interface (Part 1)

Focus: Visual terminal interface for code analysis
Use Case: Interactive exploration of formalization and verification
Duration: ~45 minutes

Start Tutorial →

What you'll learn:

  • Starting the CodeLogician server
  • Navigating the TUI interface and its modes
  • Understanding formalization concepts (admissibility, transparency, opaqueness)
  • Exploring the model view and dependency trees
  • Interpreting formalisation status indicators
  • Working with opaque functions

Key Features:

  • Interactive visual interface in the terminal
  • Real-time formalization status monitoring
  • Dependency tree visualization
  • Customizable color schemes
  • Project-wide analysis and navigation

Which Tutorial Should I Start With?

Start with CLI if you want to:

  • Integrate with AI coding assistants (Claude Code, etc.)
  • Quick one-off verifications
  • Scriptable automation
  • Learn IML/ImandraX basics

Start with TUI if you want to:

  • Visual project-wide analysis
  • Explore formalization interactively
  • Understand module dependencies
  • Monitor analysis in real-time

Real-World Applications

Ready for Production Examples?

After completing these tutorials, explore our Case Studies section to see CodeLogician applied to real-world production systems including:

  • Algorithmic Trading Rules - Redundancy detection in complex rule systems
  • LSE Trading Systems - MIT201 compliance verification (2 case studies)
  • Bank Account Classification - Complexity analysis and test coverage

Each case study includes the original code, verification results, and downloadable examples.


Additional Resources

Documentation

Getting Help

Prerequisites

Before starting these tutorials, make sure you have:

  1. Python 3.12+ installed on your system
  2. Imandra Universe API Key - Get your free key at universe.imandra.ai
  3. Terminal emulator with 256 colors (for TUI)
  4. CodeLogician Python package - Install with pip install codelogician

Installation

pip install codelogician
export IMANDRA_UNIVERSE_KEY="your-api-key-here"
codelogician --help