Skip to content

Commit ae66e65

Browse files
author
Owen Jones
committed
Add \ref in lots of places
It often doesn't work when backticks are used, so I've removed them. They don't affect how the text appears that much when I look at the html.
1 parent 62ea911 commit ae66e65

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

src/util/dstring.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Author: Daniel Kroening, [email protected]
1616

1717
#include "string_container.h"
1818

19-
/// `dstringt` has one field, an unsigned integer `no` which is an index into
19+
/// \ref dstringt has one field, an unsigned integer \ref no which is an index into
2020
/// a static table of strings. This makes it expensive to create a new string
2121
/// (because you have to look through the whole table to see if it is already
2222
/// there, and add it if it isn't) but very cheap to compare strings (just
2323
/// compare the two integers). It also means that when you have lots of copies
2424
/// of the same string you only have to store the whole string once, which
2525
/// saves space.
2626
///
27-
/// `irep_idt` and `irep_namet` are typedef-ed to `dstringt` in irep.h unless
27+
/// `irep_idt` and `irep_namet` are typedef-ed to \ref dstringt in irep.h unless
2828
/// `USE_STD_STRING` is set.
2929
///
3030
///

src/util/irep.h

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -85,72 +85,72 @@ const irept &get_nil_irep();
8585
/// \brief Base class for tree-like data structures with sharing
8686
///
8787
/// There are a large number of kinds of tree structured or tree-like data in
88-
/// CPROVER. `irept` provides a single, unified representation for all of
88+
/// CPROVER. \ref irept provides a single, unified representation for all of
8989
/// these, allowing structure sharing and reference counting of data. As
90-
/// such `irept` is the basic unit of data in CPROVER. Each `irept`
90+
/// such \ref irept is the basic unit of data in CPROVER. Each \ref irept
9191
/// contains (or references, if reference counted data sharing is enabled, as
9292
/// it is by default - see the `SHARING` macro) a basic unit of data (of type
93-
/// `dt`) which contains four things:
93+
/// \ref dt) which contains four things:
9494
///
95-
/// * `data`: A string, which is returned when the `id()` function is used.
96-
/// (Unless `USE_STD_STRING` is set, this is actually a `dstring` and thus
95+
/// * \ref irept::dt::data : A string, which is returned when the \ref id() function is used.
96+
/// (Unless `USE_STD_STRING` is set, this is actually a \ref dstringt and thus
9797
/// an integer which is a reference into a string table.)
9898
///
99-
/// * `named_sub`: A map from `irep_namet` (a string) to `irept`. This
99+
/// * \ref irept::dt::named_sub : A map from `irep_namet` (a string) to \ref irept. This
100100
/// is used for named children, i.e. subexpressions, parameters, etc.
101101
///
102-
/// * `comments`: Another map from `irep_namet` to `irept` which is used
102+
/// * \ref irept::dt::comments : Another map from `irep_namet` to \ref irept which is used
103103
/// for annotations and other ‘non-semantic’ information. Note that this
104-
/// map is ignore by the default `operator==`.
104+
/// map is ignore by the default \ref operator==.
105105
///
106-
/// * `sub`: A vector of `irept` which is used to store ordered but
106+
/// * \ref irept::dt::sub : A vector of \ref irept which is used to store ordered but
107107
/// unnamed children.
108108
///
109-
/// The `irept::pretty` function outputs the explicit tree structure of
110-
/// an `irept` and can be used to understand and debug problems with
109+
/// The \ref irept::pretty function outputs the explicit tree structure of
110+
/// an \ref irept and can be used to understand and debug problems with
111111
/// `irept`s.
112112
///
113113
/// On their own `irept`s do not "mean" anything; they are effectively
114114
/// generic tree nodes. Their interpretation depends on the contents of
115-
/// result of the `id` function (the `data`) field. `util/irep_ids.def`
115+
/// result of the \ref id() function, i.e. the `data` field. `util/irep_ids.def`
116116
/// contains a list of `id` values. During the build process it is used
117117
/// to generate `util/irep_ids.h` which gives constants for each id
118118
/// (named `ID_`). You can also make `irep_id`s which do not come from
119-
/// `util/irep_ids.def`. An `irep_id`can then be used to identify what
120-
/// kind of data `irept` stores and thus what can be done with it.
119+
/// `util/irep_ids.def`. An `irep_idt` can then be used to identify what
120+
/// kind of data the \ref irept stores and thus what can be done with it.
121121
///
122122
/// To simplify this process, there are a variety of classes that inherit
123-
/// from `irept`, roughly corresponding to the ids listed (i.e. `ID_or`
124-
/// (the string `"or”`) corresponds to the class `or_exprt`). These give
123+
/// from \ref irept, roughly corresponding to the ids listed (i.e. `ID_or`
124+
/// (the string "or”) corresponds to the class \ref or_exprt). These give
125125
/// semantically relevant accessor functions for the data; effectively
126126
/// different APIs for the same underlying data structure. None of these
127127
/// classes add fields (only methods) and so static casting can be used. The
128-
/// inheritance graph of the subclasses of `irept` is a useful starting
128+
/// inheritance graph of the subclasses of \ref irept is a useful starting
129129
/// point for working out how to manipulate data.
130130
///
131131
/// There are three main groups of classes (or APIs); those derived from
132-
/// `typet`, `codet` and `exprt` respectively. Although all of these inherit
133-
/// from `irept`, these are the most abstract level that code should handle
132+
/// \ref typet, \ref codet and \ref exprt respectively. Although all of these inherit
133+
/// from \ref irept, these are the most abstract level that code should handle
134134
/// data. If code is manipulating plain `irept`s then something is wrong
135135
/// with the architecture of the code.
136136
///
137-
/// Many of the key descendant of `exprt` are declared in `std_expr.h`. All
138-
/// expressions have a named subexpresion with ID `type`, which gives the
137+
/// Many of the key descendants of \ref exprt are declared in \ref std_expr.h. All
138+
/// expressions have a named subexpression with ID "type", which gives the
139139
/// type of the expression (slightly simplified from C/C++ as
140-
/// `unsignedbv_typet`, `signedbv_typet`, `floatbv_typet`, etc.). All type
140+
/// \ref unsignedbv_typet, \ref signedbv_typet, \ref floatbv_typet, etc.). All type
141141
/// conversions are explicit with an expression with `id() == ID_typecast`
142-
/// and a `typecast_exprt`. One key descendant of `exprt` is `symbol_exprt`
143-
/// which creates `irept` instances with the id of “symbol”. These are used
142+
/// and a \ref typecast_exprt. One key descendant of \ref exprt is \ref symbol_exprt
143+
/// which creates \ref irept instances with ID “symbol”. These are used
144144
/// to represent variables; the name of which can be found using the
145145
/// `get_identifier` accessor function.
146146
///
147-
/// `codet` inherits from `exprt` and is defined in `std_code.h`. It
147+
/// \ref codet inherits from \ref exprt and is defined in `std_code.h`. It
148148
/// represents executable code; statements in a C-like language rather than
149149
/// expressions. In the front-end there are versions of these that hold
150150
/// whole code blocks, but in goto-programs these have been flattened so
151-
/// that each `irept` represents one sequence point (almost one line of
152-
/// code / one semi-colon). The most common descendant of `codet` is
153-
/// `code_assignt` so a common pattern is to cast the `codet` to an
151+
/// that each \ref irept represents one sequence point (almost one line of
152+
/// code / one semi-colon). The most common descendant of \ref codet is
153+
/// \ref code_assignt so a common pattern is to cast the \ref codet to an
154154
/// assignment and then recurse on the expression on either side.
155155
class irept
156156
{

0 commit comments

Comments
 (0)