A committed slot is bound to a known value.
An uncommitted slot is bound to a valdesc.
int slad_size([slad] *sl)
The number of slots (committed and uncommitted) in the [slad]
int num_committed([slad] *sl)
The number of committed slots in the [slad]
int num_uncommitted([slad] *sl)
The number of uncommitted slots in the [slad]
string_array *mk_slotnames([slad] *sl)
MALLOCS and returns a string array containing all the [slotnames] (committed and uncommitted) in the [slad].
bool is_glad([slad] *sl)
True if and only if there are no uncommitted slots
MALLOCS and returns a string array containing all the committed [slotnames] in the [slad].DY>string_array *mk_uncommitted_slotnames([slad] *sl)MALLOCS and returns a string array containing all the uncommitted [slotnames] in the [slad].[value] *committed_value([slad] *sl,char *[slotname])PRECONDITION: The [slotname] must exist in the [slad]. If the slot is uncommitted returns NULL If the slot is committed, returns a pointer to the [value] associated with the [slotname]. Note that the [value] must never be adjusted or freed by the user, and is only valid until sl is freed.[valdesc] *uncommitted_valdesc([slad] *sl,char *[slotname])PRECONDITION: The [slotname] must exist in the [slad]. If the slot is committed returns NULL If the slot is uncommitted, returns a pointer to the [valdesc] associated with the [slotname]. Note that the result must never be adjusted or freed by the user, and is only valid until sl is freed.void fprintf_[slad](FILE *s,char *m1,[slad] *sl,char *m2)Prints a representation of the [slad]void free_[slad]([slad] *sl)Frees the memory of [slad] and all its subcomponents[slad] *mk_copy_slad([slad] *sl)Mallocs a COPY of sl and all its subcomponents[slad] *mk_empty_slad()Creates a [slad] with no slotsvoid add_slot([slad] *sl,char *parentname,char *[slotname],[valdesc] *vd)Arguments are COPIED in. Adds to the list of slots, at the end of the list of the slots owned by the parent slot identified by parentname. The new slot is uncommitted, with [slotname] slotname and [valdesc] vd. If parentname is NULL, adds to the end of the base slots.void commit_slot([slad] *sl,char *[slotname],[value] *v)[slotname] and v are COPIED in. The [valdesc] associated with the [slotname] is freed.