// pk_test.sy -- Test pharmacokinetic native functions
// The language speaks biology now.

fn main() {
    println("=== PHARMACOKINETIC NATIVES TEST ===")
    println("")

    // Half-life decay
    let dopamine_hl = bio_half_life("dopamine")
    println("Dopamine half-life: " + dopamine_hl + " min")

    let cortisol_hl = bio_half_life("cortisol")
    println("Cortisol half-life: " + cortisol_hl + " min")

    let oxytocin_hl = bio_half_life("oxytocin")
    println("Oxytocin half-life: " + oxytocin_hl + " min")

    // Decay a dopamine spike over time
    let c0 = 0.8
    let c30 = half_life(c0, dopamine_hl, 30.0)
    let c60 = half_life(c0, dopamine_hl, 60.0)
    println("")
    println("Dopamine decay from 0.8:")
    println("  t=0:  " + c0)
    println("  t=30: " + c30)
    println("  t=60: " + c60)

    // Michaelis-Menten
    let rate = michaelis_menten(0.5, 1.0, 0.3)
    println("")
    println("Michaelis-Menten (S=0.5, Vmax=1.0, Km=0.3): " + rate)

    // Mass gap (Kd)
    let d2_kd = bio_kd("dopamine_d2")
    println("")
    println("Dopamine D2 receptor Kd: " + d2_kd + " nM")

    // Biological frequencies
    let f_dopa = bio_frequency("dopamine")
    let f_cort = bio_frequency("cortisol")
    println("")
    println("Dopamine frequency: " + f_dopa + " Hz")
    println("Cortisol frequency: " + f_cort + " Hz")

    // 6D Emotion Core
    let emotions = emotion_6d(0.7, 0.2, 0.8, 0.1, 0.5, 0.3)
    println("")
    println("6D Emotion (high dopamine + oxytocin):")
    println("  [valence, security, energy, engagement, connection, neutrality]")
    println("  " + emotions)

    // HH gate
    let gate = hh_gate(0.5, 1.0, 0.0, 1.0, 0.0)
    println("")
    println("H-H gate (x=0.5): " + gate)

    // Boltzmann
    let prob = boltzmann(1.0, 310.0)
    println("Boltzmann (E=1.0, T=310K): " + prob)

    println("")
    println("=== ALL PHARMACOKINETIC NATIVES OPERATIONAL ===")
}
