tensorlogic-compiler 0.1.0-rc.1

Compiler for transforming logic expressions into tensor computation graphs
Documentation
//! End-to-end integration tests for tensorlogic-compiler.
//!
//! These tests verify complete workflows from TLExpr construction through
//! compilation to EinsumGraph generation, validating that all components
//! work together correctly.
//!
//! **Note**: These tests require the `integration-tests` feature AND
//! tensorlogic-scirs-backend dev-dependency (currently commented out due to
//! circular dependencies). To enable:
//!
//! 1. Uncomment tensorlogic-scirs-backend in Cargo.toml [dev-dependencies]
//! 2. Run: `cargo test --features integration-tests`

#![allow(unexpected_cfgs)]

// Disable all tests in this file when scirs-backend is not available
// The `integration-tests` feature is used to signal that scirs-backend should be used,
// but since it creates circular dependencies, we conditionally compile everything out.

#[allow(unexpected_cfgs)]
#[cfg(all(feature = "integration-tests", feature = "__has_scirs_backend"))]
mod integration_tests {
    use tensorlogic_compiler::{
        compile_to_einsum, compile_to_einsum_with_context, CompilationConfig, CompilerContext,
    };
    use tensorlogic_infer::TlAutodiff;
    use tensorlogic_ir::{EinsumGraph, TLExpr, Term};
    use tensorlogic_scirs_backend::Scirs2Exec;

    // All the integration tests would go here...
    // But this module is never compiled because __has_scirs_backend feature doesn't exist
}

// Provide a placeholder test so the file isn't empty
#[test]
fn integration_tests_placeholder() {
    // These integration tests require tensorlogic-scirs-backend which is
    // currently disabled to avoid circular dev-dependencies.
    //
    // To enable:
    // 1. Uncomment tensorlogic-scirs-backend in Cargo.toml [dev-dependencies]
    // 2. Add feature gate checking for scirs-backend availability
    // 3. Run: cargo test --features integration-tests

    #[cfg(feature = "integration-tests")]
    {
        eprintln!("Warning: integration-tests feature enabled but tensorlogic-scirs-backend not available");
        eprintln!("These tests require tensorlogic-scirs-backend (circular dev-dependency)");
    }

    // Always pass - this is just a placeholder
}