IPAddr parser correctness #
parse_sound, parse_complete, and parse_eq_none_iff characterize exactly when
Cedar.Spec.Ext.IPAddr.ip (a.k.a. ip) succeeds, in terms of the grammar-level IsWfIPNet
predicate and declarative IsIPNetValue relation. Its two branches use v4Value and v6Value to
give the denotation of the same components that witness the input rendering. The parser-independent
bridge lemmas they build on live in Cedar.Thm.Ext.IPAddr.Lemmas.
Well-formedness and valuation #
Well-formed IP-net syntax is exactly syntax to which the grammar assigns some IPNet.
Soundness #
Soundness of IPAddr.ip: if parsing succeeds, the declarative grammar relation assigns the
input exactly the returned IPNet.
Completeness #
Completeness for the V4 form: a well-formed V4 string parses to its v4Value.
Completeness for the V6 form: a well-formed V6 string parses to its v6Value.
Completeness of IPAddr.ip: if the grammar assigns str the value net, parsing returns that
exact IPNet.
Exact parser characterization: parsing succeeds with net precisely when the declarative
grammar relation assigns the input that IPNet.
The relational value specification is single-valued: an IP-net string denotes at most one
IPNet.
Failure characterization #
Failure characterization: IPAddr.ip rejects exactly the strings that are not well-formed
IP-nets. (There is no overflow condition — the grammar's field bounds already exclude
out-of-range values.)
Roundtrip #
parse ∘ toString roundtrip: parsing the canonical representation recovers the original
IP-net.
toString is injective: distinct IP-nets produce distinct canonical strings.
Equal normal form iff equal value: normalization decides IP-net equality.