21
21
import visitor .interpreter .InterpreterHelper ;
22
22
import visitor .interpreter .RequiresGenerator ;
23
23
24
- import javax .xml .ws .Provider ;
25
24
import java .lang .reflect .InvocationTargetException ;
26
25
import java .lang .reflect .Method ;
27
26
import java .util .ArrayList ;
28
27
import java .util .HashMap ;
29
28
import java .util .List ;
30
29
import java .util .Map ;
30
+ import java .util .function .Function ;
31
31
32
32
public class BaseExpressionInterpreter
33
33
implements SmallStepExpressionInterpreter <ConcreteValue >
@@ -175,7 +175,7 @@ public ConcreteValue interpretCompositeInterval(Primitive primitive, ConcreteVal
175
175
public ConcreteValue interpretCompositeFilterSpec (Primitive primitive ,
176
176
String id ,
177
177
ConcreteValue x ,
178
- Provider <ConcreteValue > suchThat )
178
+ Function <ConcreteValue , Object > suchThat )
179
179
{
180
180
AlkIterableValue struct = InterpreterHelper .getIterableInstance (primitive );
181
181
Storable fromExpr = x .toRValue ();
@@ -197,7 +197,7 @@ public ConcreteValue interpretCompositeFilterSpec(Primitive primitive,
197
197
for (Location loc : locs )
198
198
{
199
199
proxy .addTempEntry (id , loc .toRValue ().clone (locationGenerator ));
200
- Storable eval = suchThat .invoke (null ).toRValue ();
200
+ Storable eval = (( Storable ) suchThat .apply (null ) ).toRValue ();
201
201
202
202
if (!(eval instanceof AlkBool ))
203
203
throw new AlkException ("Second expression in filter specification must be a boolean" );
@@ -217,7 +217,7 @@ public ConcreteValue interpretCompositeFilterSpec(Primitive primitive,
217
217
}
218
218
219
219
@ Override
220
- public ConcreteValue interpretCompositeSelectSpec (Primitive primitive , String id , ConcreteValue x , Provider <ConcreteValue > suchThat )
220
+ public ConcreteValue interpretCompositeSelectSpec (Primitive primitive , String id , ConcreteValue x , Function <ConcreteValue , Object > suchThat )
221
221
{
222
222
AlkIterableValue struct = InterpreterHelper .getIterableInstance (primitive );
223
223
Storable fromExpr = x .toRValue ();
@@ -237,7 +237,7 @@ public ConcreteValue interpretCompositeSelectSpec(Primitive primitive, String id
237
237
for (Location loc : locs )
238
238
{
239
239
proxy .addTempEntry (id , loc .toRValue ().clone (locationGenerator ));
240
- Storable eval = suchThat .invoke (null ).toRValue ();
240
+ Storable eval = (( Storable ) suchThat .apply (null ) ).toRValue ();
241
241
242
242
if (!(eval instanceof AlkValue ))
243
243
throw new InternalException ("Can't use non-alkvalue in composite select spec" );
0 commit comments