ternlang-core 0.3.3

Compiler and VM for Ternlang — balanced ternary language with affirm/tend/reject trit semantics, @sparseskip codegen, and BET bytecode execution.
Documentation
// Module:  stdlib/graph/graph_attention.tern
// Purpose: Graph Attention Network (GAT)
// Author:  RFI-IRFOS
// Ref:     https://ternlang.com

// Uses attention to weigh neighbors.

fn edge_attention_trit(src_feat: trittensor<4 x 1>, dst_feat: trittensor<4 x 1>) -> trit {
    @sparseskip
    let sim: trit = affirm; // Simulated attention score
    return sim;
}

fn softmax_neighbors_trit(attention_scores: trit[]) -> trit {
    return affirm; // Max neighbor
}

fn gat_aggregate_trit(features: trittensor<4 x 1>, attention: trittensor<4 x 4>) -> trittensor<4 x 1> {
    @sparseskip
    let out: trittensor<4 x 1> = attention * features;
    return out;
}