@@ -17,9 +17,20 @@ internal class SexprHandler : ISemgusProblemHandler
1717 {
1818 private readonly ISexprWriter _sw ;
1919
20- public SexprHandler ( TextWriter writer )
20+ /// <summary>
21+ /// Flags for the processing
22+ /// </summary>
23+ private readonly HandlerFlags _flags ;
24+
25+ /// <summary>
26+ /// Creates a new S-expression handler for the given writer and options
27+ /// </summary>
28+ /// <param name="writer">Underlying s-expression writer</param>
29+ /// <param name="flags">Processing flags</param>
30+ public SexprHandler ( TextWriter writer , HandlerFlags flags )
2131 {
2232 _sw = new SexprWriter ( writer ) ;
33+ _flags = flags ;
2334 }
2435
2536 public void OnCheckSynth ( SmtContext smtCtx , SemgusContext semgusCtx )
@@ -53,7 +64,7 @@ public void OnCheckSynth(SmtContext smtCtx, SemgusContext semgusCtx)
5364 _sw . WriteKeyword ( "symbols" ) ;
5465 _sw . Write ( chc . Symbols ) ;
5566 _sw . WriteKeyword ( "constraint" ) ;
56- _sw . Write ( chc . Constraint ) ;
67+ _sw . Write ( chc . Constraint , _flags . TermAnnotations ) ;
5768 _sw . WriteKeyword ( "constructor" ) ;
5869 _sw . WriteConstructor ( chc . Binder ) ;
5970 } ) ;
@@ -69,7 +80,7 @@ public void OnCheckSynth(SmtContext smtCtx, SemgusContext semgusCtx)
6980 _sw . WriteList ( ( ) =>
7081 {
7182 _sw . WriteSymbol ( "constraint" ) ;
72- _sw . Write ( constraint ) ;
83+ _sw . Write ( constraint , _flags . TermAnnotations ) ;
7384 } ) ;
7485 }
7586
@@ -145,7 +156,7 @@ public void OnFunctionDefinition(SmtContext ctx, SmtFunction function, SmtFuncti
145156 _sw . WriteKeyword ( "rank" ) ;
146157 _sw . Write ( rank ) ;
147158 _sw . WriteKeyword ( "definition" ) ;
148- _sw . Write ( lambda ) ;
159+ _sw . Write ( lambda , _flags . TermAnnotations ) ;
149160 } ) ;
150161 }
151162
0 commit comments