The starting point is an untyped semantics defining which objects are computed by programs components, with explicit runtime errors. The standard collecting semantics is defined as specifying the strongest program component properties. A type system defines a syntax for types and their meaning, that is the set of objects of any given type. The type system is then sound by construction. We then transpose this exercice to logic programs.
Assertions are linguistic constructions which allow expressing properties of programs.
Several assertion languages have been used in the past in different contexts. Such information is also used automatically by the compiler to check specifications as much as possible at compile-time. This allows using properties in assertions beyond the predefined set understandable by the static analyzer, e.g., properties defined by user programs. We provide a translation scheme which, given a set of assertions for a program, produces another program which performs run-time checking of the assertions whenever it is executed. This translation is correct in the sense that if an assertion is flagged not to hold, the assertion actually does not hold.