org: document named properties

* doc/org/concepts.org: Add a new section.
* doc/org/hoa.org, spot/twa/twa.hh: Link to it.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2016-07-15 18:52:06 +02:00
parent 486d9edad7
commit bbc3afe1cf
4 changed files with 60 additions and 2 deletions

View file

@ -692,15 +692,18 @@ The logic of not cluttering the output with all of =!terminal=,
so only one of those is emitted unless =-Hv= is used.
** Named properties
:PROPERTIES:
:CUSTOM_ID: named-properties
:END:
In addition to the bit properties discussed above, a TωA can carry
named properties of any type. When attaching a property to a TωA, you
only supply a name for the property, a pointer, and an optional
destructor function.
They are currently two named properties related to the HOA format.
They are currently two [[file:concepts.org::#named-properties][named properties]] related to the HOA format.
- =name= :: Is a string that stores the name of the automaton (the one given after =name:= in the HOA format)
- =automaton-name= :: Is a string that stores the name of the automaton (the one given after =name:= in the HOA format)
- =state-names= :: is a vector of strings that stores the name of the states (in case states are named in the HOA format)
You can see these properties being preserved when an automaton is read and then immediately output: