section "Conversion rules" {
    ConvertsIS @ converts(integer, string) <-;
    ConvertsIF @ converts(integer, float) <-;
    ConvertsFS @ converts(float, string) <-;
}

section "Rules for literals" {
    TInt @ type(lit(?n), integer) <- int(?n);
    TFloat @ type(lit(?f), float) <- float(?f);
    TString @ type(lit(?s), string) <- str(?s);
}

section "" {
    TPlusInt @ type(plus(?e_1, ?e_2), integer) <- type(?e_1, integer), type(?e_2, integer);
    TPlusFloat @ type(plus(?e_1, ?e_2), float) <- type(?e_1, float), type(?e_2, float);
    TPlusString @ type(plus(?e_1, ?e_2), string) <- type(?e_1, string), type(?e_2, string);
}

TConverts @ type(?e, ?tau_2) <- type(?e, ?tau_1), converts(?tau_1, ?tau_2);
