Skip to content

Commit 9c838a1

Browse files
Documentation improvements in bytecode instrument
1 parent ea3ba42 commit 9c838a1

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/java_bytecode/java_bytecode_instrument.cpp

+17-17
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ const std::vector<std::string> exception_needed_classes = { // NOLINT
8585
/// Creates a class stub for exc_name and generates a
8686
/// conditional GOTO such that exc_name is thrown when
8787
/// cond is met.
88-
/// \par parameters: `cond`: condition to be met in order
88+
/// \param cond: condition to be met in order
8989
/// to throw an exception
90-
/// `original_loc`: source location in the original program
91-
/// `exc_name`: the name of the exception to be thrown
90+
/// \param original_loc: source location in the original program
91+
/// \param exc_name: the name of the exception to be thrown
9292
/// \return Returns the code initialising the throwing the
9393
/// exception
9494
codet java_bytecode_instrumentt::throw_exception(
@@ -171,9 +171,9 @@ codet java_bytecode_instrumentt::check_arithmetic_exception(
171171
/// and throws ArrayIndexOutofBoundsException/generates an assertion
172172
/// if necessary; Exceptions are thrown when the `throw_runtime_exceptions`
173173
/// flag is set. Otherwise, assertions are emitted.
174-
/// \par parameters: `array_struct`: the array being accessed
175-
/// `idx`: index into the array
176-
/// `original_loc: source location in the original code
174+
/// \param array_struct: array being accessed
175+
/// \param idx: index into the array
176+
/// \param original_loc: source location in the original code
177177
/// \return Based on the value of the flag `throw_runtime_exceptions`,
178178
/// it returns code that either throws an ArrayIndexOutPfBoundsException
179179
/// or emits an assertion checking the array access
@@ -216,9 +216,9 @@ codet java_bytecode_instrumentt::check_array_access(
216216
/// ClassCastException/generates an assertion when necessary;
217217
/// Exceptions are thrown when the `throw_runtime_exceptions` flag is set.
218218
/// Otherwise, assertions are emitted.
219-
/// \par parameters: `class1`: the subclass
220-
/// `class2`: the super class
221-
/// `original_loc: source location in the original code
219+
/// \param class1: the subclass
220+
/// \param class2: the super class
221+
/// \param original_loc: source location in the original code
222222
/// \return Based on the value of the flag `throw_runtime_exceptions`,
223223
/// it returns code that either throws an ClassCastException or emits an
224224
/// assertion checking the subtype relation
@@ -265,7 +265,7 @@ codet java_bytecode_instrumentt::check_class_cast(
265265
/// generates an assertion when necessary;
266266
/// Exceptions are thrown when the `throw_runtime_exceptions` flag is set.
267267
/// Otherwise, assertions are emitted.
268-
/// \par parameters: `expr`: the checked expression
268+
/// \param expr: the checked expression
269269
/// `original_loc: source location in the original code
270270
/// \return Based on the value of the flag `throw_runtime_exceptions`,
271271
/// it returns code that either throws an NullPointerException or emits an
@@ -295,8 +295,8 @@ codet java_bytecode_instrumentt::check_null_dereference(
295295
/// generates an assertion when necessary;
296296
/// Exceptions are thrown when the `throw_runtime_exceptions` flag is set.
297297
/// Otherwise, assertions are emitted.
298-
/// \par parameters: `length`: the checked length
299-
/// `original_loc: source location in the original code
298+
/// \param length: the checked length
299+
/// \param original_loc: source location in the original code
300300
/// \return Based on the value of the flag `throw_runtime_exceptions`,
301301
/// it returns code that either throws an NegativeArraySizeException
302302
/// or emits an assertion checking the subtype relation
@@ -358,7 +358,7 @@ void java_bytecode_instrumentt::prepend_instrumentation(
358358

359359
/// Augments `expr` with instrumentation in the form of either
360360
/// assertions or runtime exceptions
361-
/// \par parameters: `expr`: the expression to be instrumented
361+
/// \param `expr` the expression to be instrumented
362362
void java_bytecode_instrumentt::instrument_code(exprt &expr)
363363
{
364364
codet &code=to_code(expr);
@@ -473,7 +473,7 @@ void java_bytecode_instrumentt::instrument_code(exprt &expr)
473473

474474
/// Computes the instrumentation for `expr` in the form of
475475
/// either assertions or runtime exceptions.
476-
/// \par parameters: `expr`: the expression for which we compute
476+
/// \param expr: the expression for which we compute
477477
/// instrumentation
478478
/// \return: The instrumentation required for `expr`
479479
codet java_bytecode_instrumentt::instrument_expr(
@@ -517,7 +517,7 @@ codet java_bytecode_instrumentt::instrument_expr(
517517
const irep_idt &statement=side_effect_expr.get_statement();
518518
if(statement==ID_throw)
519519
{
520-
// this corresponds to athrow and so we check that
520+
// this corresponds to a throw and so we check that
521521
// we don't throw null
522522
result.copy_to_operands(
523523
check_null_dereference(
@@ -526,7 +526,7 @@ codet java_bytecode_instrumentt::instrument_expr(
526526
}
527527
else if(statement==ID_java_new_array)
528528
{
529-
// this correpond to new array so we check that
529+
// this corresponds to new array so we check that
530530
// length is >=0
531531
result.copy_to_operands(
532532
check_array_length(
@@ -562,7 +562,7 @@ codet java_bytecode_instrumentt::instrument_expr(
562562
}
563563

564564
/// Instruments `expr`
565-
/// \par parameters: `expr`: the expression to be instrumented
565+
/// \param expr: the expression to be instrumented
566566
void java_bytecode_instrumentt::operator()(exprt &expr)
567567
{
568568
instrument_code(expr);

0 commit comments

Comments
 (0)