Printing an Alloy model and/or Alloy expression using the Alloy API


I was wondering if there is a way to print an Alloy model once it has been parsed by the Alloy API/Analyzer. I know that there is a way to print a parsed Alloy expression using the toString() method built into the Expr class within the Alloy API. However, the toString() method will not always output a parsable Alloy expression. For example, if you have the following function/predicate call[1], the toString() method inside the Expr class will return instead of[1] after the model has been parsed and stored inside the API. Is there a way for us to be able to print[1] instead of after parsing has been completed or is there a way to print an Alloy model after it has been parsed?

Any help would be greatly appreciated!