File tree 3 files changed +6
-10
lines changed
3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -363,10 +363,10 @@ static void ArrayExample1(Context ctx)
363
363
364
364
Console . WriteLine ( "Model = " + s . Model ) ;
365
365
366
- // Console.WriteLine("Interpretation of MyArray:\n" + s.Model.ConstInterp(aex.FuncDecl));
366
+ Console . WriteLine ( "Interpretation of MyArray:\n " + s . Model . ConstInterp ( aex . FuncDecl ) ) ;
367
367
Console . WriteLine ( "Interpretation of x:\n " + s . Model . ConstInterp ( xc ) ) ;
368
368
Console . WriteLine ( "Interpretation of f:\n " + s . Model . FuncInterp ( fd ) ) ;
369
- // Console.WriteLine("Interpretation of MyArray as Term:\n" + s.Model.ConstInterp(aex.FuncDecl));
369
+ Console . WriteLine ( "Interpretation of MyArray as Term:\n " + s . Model . ConstInterp ( aex . FuncDecl ) ) ;
370
370
}
371
371
372
372
/// <summary>
Original file line number Diff line number Diff line change @@ -51,9 +51,8 @@ public Expr ConstInterp(FuncDecl f)
51
51
Debug . Assert ( f != null ) ;
52
52
53
53
Context . CheckContextMatch ( f ) ;
54
- if ( f . Arity != 0 ||
55
- Native . Z3_get_sort_kind ( Context . nCtx , Native . Z3_get_range ( Context . nCtx , f . NativeObject ) ) == ( uint ) Z3_sort_kind . Z3_ARRAY_SORT )
56
- throw new Z3Exception ( "Non-zero arity functions and arrays have FunctionInterpretations as a model. Use FuncInterp." ) ;
54
+ if ( f . Arity != 0 )
55
+ throw new Z3Exception ( "Non-zero arity functions have FunctionInterpretations as a model. Use FuncInterp." ) ;
57
56
58
57
IntPtr n = Native . Z3_model_get_const_interp ( Context . nCtx , NativeObject , f . NativeObject ) ;
59
58
if ( n == IntPtr . Zero )
Original file line number Diff line number Diff line change @@ -50,12 +50,9 @@ public Expr getConstInterp(Expr a)
50
50
public Expr getConstInterp (FuncDecl f )
51
51
{
52
52
getContext ().checkContextMatch (f );
53
- if (f .getArity () != 0
54
- || Native .getSortKind (getContext ().nCtx (),
55
- Native .getRange (getContext ().nCtx (), f .getNativeObject ())) == Z3_sort_kind .Z3_ARRAY_SORT
56
- .toInt ())
53
+ if (f .getArity () != 0 )
57
54
throw new Z3Exception (
58
- "Non-zero arity functions and arrays have FunctionInterpretations as a model. Use getFuncInterp." );
55
+ "Non-zero arity functions have FunctionInterpretations as a model. Use getFuncInterp." );
59
56
60
57
long n = Native .modelGetConstInterp (getContext ().nCtx (), getNativeObject (),
61
58
f .getNativeObject ());
You can’t perform that action at this time.
0 commit comments