|
6 | 6 | //! in CBMC's documentation. All these representations precisely replicate ones in CBMC.
|
7 | 7 | //!
|
8 | 8 | //! In short, CBMC's AST has three levels:
|
9 |
| -//! 1. [SymbolTable] is the top level symbol table. |
10 |
| -//! 2. [Symbol] is a symbol in the symbol table. |
11 |
| -//! 3. [Irep] represents all trees (code, expression, metadata, etc). |
| 9 | +//! 1. [irep::SymbolTable] is the top level symbol table. |
| 10 | +//! 2. [irep::Symbol] is a symbol in the symbol table. |
| 11 | +//! 3. [irep::Irep] represents all trees (code, expression, metadata, etc). |
12 | 12 | //!
|
13 |
| -//! Each tree represented by [Irep] has three nodes: |
14 |
| -//! 1. [id] for identity, |
15 |
| -//! 2. [sub] for a (potentially empty) list of unnamed subtrees as [Irep], |
16 |
| -//! 3. [named_sub] for a (potentially empty) map of named subtrees as [Irep]. |
| 13 | +//! Each tree represented by [irep::Irep] has three nodes: |
| 14 | +//! 1. [irep::Irep::id] for identity, |
| 15 | +//! 2. [irep::Irep::sub] for a (potentially empty) list of unnamed subtrees as [irep::Irep], |
| 16 | +//! 3. [irep::Irep::named_sub] for a (potentially empty) map of named subtrees as [irep::Irep]. |
17 | 17 | //!
|
18 |
| -//! The function of a tree is usually (but not always) recognized by its [id], and thus the aggregation |
19 |
| -//! of all recognized [id]s are represented by [IrepId]. [sub] usually contains operands and [named_sub] |
20 |
| -//! usually contains other flags or metadata. For example, for a binary operation [a + b], the [id] of |
21 |
| -//! this tree is ["plus"] denoting the tree being a plus operation. [sub] contains two [Irep]s |
22 |
| -//! representing [a] and [b] respectively. [named_sub] contains other information include the type of |
23 |
| -//! the expression, location information, and so on. |
| 18 | +//! The function of a tree is usually (but not always) recognized by |
| 19 | +//! its [irep::Irep::id], and thus the aggregation of all recognized |
| 20 | +//! [irep::Irep::id]s are represented by [irep::IrepId]. [irep::Irep::sub] usually |
| 21 | +//! contains operands and [irep::Irep::named_sub] usually contains |
| 22 | +//! other flags or metadata. For example, for a binary operation [a + |
| 23 | +//! b], the [irep::Irep::id] of this tree is ["plus"] denoting the |
| 24 | +//! tree being a plus operation. [irep::Irep::sub] contains two [irep::Irep]s |
| 25 | +//! representing \[a\] and \[b\] respectively. [irep::Irep::named_sub] |
| 26 | +//! contains other information include the type of the expression, |
| 27 | +//! location information, and so on. |
24 | 28 | //!
|
25 |
| -//! Speical [id]s include: |
26 |
| -//! 1. [Empty] and [Nil] behaves like [null]. |
| 29 | +//! Speical [irep::Irep::id]s include: |
| 30 | +//! 1. [irep::IrepId::Empty] and [irep::IrepId::Nil] behaves like \[null\]. |
27 | 31 |
|
28 | 32 | mod env;
|
29 | 33 | pub mod goto_program;
|
|
0 commit comments