Skip to content

Commit 4049f15

Browse files
author
Thomas Kiley
committed
Adapt the XSD to include the binary output
Also updat the LaTeX and markdown documentation to include the new attribute
1 parent 304c92c commit 4049f15

File tree

3 files changed

+50
-5
lines changed

3 files changed

+50
-5
lines changed

doc/assets/xml_spec.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ always present
168168

169169
- `full_lhs`: original lhs expression (after dereferencing)
170170

171-
- `full_lhs_value`: a constant with the new value
171+
- `full_lhs_value`: a constant with the new value.
172+
- if the type is a floating point number type, there will be an attribute`binary`
173+
showing its value.
172174

173175
**Example**:
174176

@@ -181,6 +183,12 @@ always present
181183
<full_lhs>b</full_lhs>
182184
<full_lhs_value>-1879048192</full_lhs_value>
183185
</assignment>
186+
<assignment assignment_type="state" base_name="d" display_name="main::1::d" hidden="false" identifier="main::1::d" mode="C" step_nr="26" thread="0">
187+
<location file="main.i" function="main" line="3" working-directory="/home/tkiley/workspace/cbmc/regression/cbmc/Float24"/>
188+
<type>double</type>
189+
<full_lhs>d</full_lhs>
190+
<full_lhs_value binary="0100000000010100011001100110011001100110011001100110011001100110">5.1</full_lhs_value>
191+
</assignment>
184192
```
185193

186194
**XSD**:
@@ -192,7 +200,15 @@ always present
192200
<xs:element name="location" minOccurs="0"></xs:element>
193201
<xs:element name="type" type="xs:string" minOccurs="0"></xs:element>
194202
<xs:element name="full_lhs" type="xs:string"></xs:element>
195-
<xs:element name="full_lhs_value" type="xs:int"></xs:element>
203+
<xs:element name="full_lhs_value">
204+
<xs:complexType>
205+
<xs:simpleContent>
206+
<xs:extension base="xs:string">
207+
<xs:attribute name="binary" type="xs:string"/>
208+
</xs:extension>
209+
</xs:simpleContent>
210+
</xs:complexType>
211+
</xs:element>
196212
</xs:all>
197213
<xs:attributeGroup ref="traceStepAttrs">
198214
<xs:attribute name="assignment_type" type="xs:string"></xs:attribute>

doc/assets/xml_spec.tex

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,15 @@ \subsection{Trace Steps in XML}
147147
always present
148148
\begin{itemize}
149149
\item \texttt{full\_lhs}: original lhs expression (after dereferencing)
150-
\item \texttt{full\_lhs\_value}: a constant with the new value
150+
\item \texttt{full\_lhs\_value}: a constant with the new value.
151+
\begin{itemize}
152+
\item if the type is a floating point number type, there will be an attribute
153+
\texttt{binary} showing its value.
154+
\end{itemize}
155+
151156
\end{itemize}
152157
158+
153159
\noindent\textbf{Example}:
154160
\begin{minted}{xml}
155161
<assignment assignment_type="state" base_name="b" display_name="main::1::b"
@@ -160,6 +166,13 @@ \subsection{Trace Steps in XML}
160166
<full_lhs>b</full_lhs>
161167
<full_lhs_value>-1879048192</full_lhs_value>
162168
</assignment>
169+
<assignment assignment_type="state" base_name="d" display_name="main::1::d" hidden="false" identifier="main::1::d" mode="C" step_nr="26" thread="0">
170+
<location ../>
171+
<type>double</type>
172+
<full_lhs>d</full_lhs>
173+
<full_lhs_value
174+
binary="0100000000010100011001100110011001100110011001100110011001100110">5.1</full_lhs_value>
175+
</assignment>
163176
\end{minted}
164177
165178
\noindent\textbf{XSD}:
@@ -170,7 +183,15 @@ \subsection{Trace Steps in XML}
170183
<xs:element name="location" minOccurs="0"></xs:element>
171184
<xs:element name="type" type="xs:string" minOccurs="0"></xs:element>
172185
<xs:element name="full_lhs" type="xs:string"></xs:element>
173-
<xs:element name="full_lhs_value" type="xs:int"></xs:element>
186+
<xs:element name="full_lhs_value">
187+
<xs:complexType>
188+
<xs:simpleContent>
189+
<xs:extension base="xs:string">
190+
<xs:attribute name="binary" type="xs:string"/>
191+
</xs:extension>
192+
</xs:simpleContent>
193+
</xs:complexType>
194+
</xs:element>
174195
</xs:all>
175196
<xs:attributeGroup ref="traceStepAttrs">
176197
<xs:attribute name="assignment_type" type="xs:string"></xs:attribute>

doc/assets/xml_spec.xsd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@
4040
<xs:element ref="location" minOccurs="0"/>
4141
<xs:element name="type" type="xs:string" minOccurs="0"/>
4242
<xs:element name="full_lhs" type="xs:string"/>
43-
<xs:element name="full_lhs_value" type="xs:string"/>
43+
<xs:element name="full_lhs_value">
44+
<xs:complexType>
45+
<xs:simpleContent>
46+
<xs:extension base="xs:string">
47+
<xs:attribute name="binary" type="xs:string"/>
48+
</xs:extension>
49+
</xs:simpleContent>
50+
</xs:complexType>
51+
</xs:element>
4452
</xs:all>
4553
<xs:attributeGroup ref="traceStepAttrs"/>
4654
<xs:attribute name="assignment_type" type="xs:string"/>

0 commit comments

Comments
 (0)