@@ -29,10 +29,24 @@ pub mod codes {
2929 /// exact probabilistic provenance through recursion. Carries the nearest
3030 /// allowed alternative in its message (D9/I4).
3131 pub const TABLE_2_4_FORBIDDEN : DiagCode = DiagCode ( 1008 ) ;
32+ /// A fact's `::` annotation does not fit the predicate's declared
33+ /// annotation: an integer weight belongs on `Trop` only, a probability on
34+ /// `Bool`/`Prov`/`Prov_k` only and inside [0, 1], and a `Trop` fact must
35+ /// carry a weight.
36+ pub const FACT_ANNOTATION_MISMATCH : DiagCode = DiagCode ( 1009 ) ;
3237 /// A fact on a `neural` predicate is not probabilistic: a neural predicate's
3338 /// ground atoms are a model's soft outputs, so they must carry a probability
3439 /// (`p :: n(...)`), never be asserted as certain.
3540 pub const NEURAL_FACT_NOT_SOFT : DiagCode = DiagCode ( 1010 ) ;
41+ /// A construct that has no meaning under `@asp` (stable-model semantics):
42+ /// `::` fact annotations, `input` declarations, queries, `neural`
43+ /// predicates, compound fact arguments. Refused by name, never silently
44+ /// dropped.
45+ pub const ASP_UNSUPPORTED : DiagCode = DiagCode ( 1011 ) ;
46+ /// A predicate is declared more than once with a conflicting signature —
47+ /// silently letting the last declaration win would make every other check
48+ /// order-dependent.
49+ pub const CONFLICTING_DECLARATION : DiagCode = DiagCode ( 1012 ) ;
3650
3751 pub const ALL : & [ ( DiagCode , & str ) ] = & [
3852 ( UNDECLARED_PRED , "check.undeclared-predicate" ) ,
@@ -43,7 +57,10 @@ pub mod codes {
4357 ( NOT_EXECUTABLE , "check.not-executable-annotation" ) ,
4458 ( SEMIRING_CONFLICT , "check.semiring-conflict" ) ,
4559 ( TABLE_2_4_FORBIDDEN , "check.table-2.4-forbidden" ) ,
60+ ( FACT_ANNOTATION_MISMATCH , "check.fact-annotation-mismatch" ) ,
4661 ( NEURAL_FACT_NOT_SOFT , "check.neural-fact-not-soft" ) ,
62+ ( ASP_UNSUPPORTED , "check.asp-unsupported" ) ,
63+ ( CONFLICTING_DECLARATION , "check.conflicting-declaration" ) ,
4764 ] ;
4865}
4966
0 commit comments