def well_formed

near-architecture@0.9.1.0 · arc.bend:383

import near-architecture@0.9.1.0/arc.bend as Arc
import Base

383# The system is well formed: node keys and container/part keys are unique, every container is on
384# a node, every part in a container, and every link joins two things that exist.
385def well_formed(+s: System) -> Bool:
386  distinct_keys(nkeys(nodes(s))) && distinct_keys(keys(s)) &&
387  all_in(container_ons(containers(s)), nkeys(nodes(s))) &&
388  all_in(part_ins(parts(s)), ckeys(containers(s))) &&
389  all_in(part_ons(parts(s)), nkeys(nodes(s))) &&
390  all_in(link_ends(links(s)), keys(s))

Uses (16)

Used by (0)

No other definition uses this definition.