We are modernizing the following code so we need to extract software requirements to document its functionality.

These requirements are intended for developers to refactor and port this code to a modern programming language, so they should focus on functionality rather than specifics of its current legacy language.

Write the requirements in the style of an INCOSE software requirements specification document.

Here is the code:

```
{SOURCE_CODE}
```

{context}
