@@ -96,7 +96,6 @@ impl SMTLib {
96
96
self . add_code ( "(check-sat)" . to_string ( ) ) ;
97
97
self . add_code ( "(pop)" . to_string ( ) ) ;
98
98
}
99
- FolStatement :: Choice ( _, _) => unimplemented ! ( "Choice" ) ,
100
99
}
101
100
}
102
101
@@ -351,45 +350,45 @@ impl SMTTranslatable for Expression {
351
350
fn to_smt ( & self ) -> String {
352
351
match self {
353
352
Expression :: Local ( local) => local. variable . name . clone ( ) ,
354
- Expression :: Field ( field ) => unimplemented ! ( ) ,
355
- Expression :: LabelledOld ( labelledOld ) => unimplemented ! ( ) ,
353
+ Expression :: Field ( _ ) => unimplemented ! ( ) ,
354
+ Expression :: LabelledOld ( _ ) => unimplemented ! ( ) ,
356
355
Expression :: Constant ( constant) => match & constant. value {
357
356
ConstantValue :: Bool ( bool) => bool. to_string ( ) ,
358
357
ConstantValue :: Int ( i64) => i64. to_string ( ) ,
359
358
ConstantValue :: BigInt ( s) => s. clone ( ) ,
360
359
} ,
361
- Expression :: MagicWand ( magicWand ) => format ! (
360
+ Expression :: MagicWand ( magic_wand ) => format ! (
362
361
"(=> {} {})" , // TODO: is this correct?
363
- magicWand . left. to_smt( ) ,
364
- magicWand . right. to_smt( )
362
+ magic_wand . left. to_smt( ) ,
363
+ magic_wand . right. to_smt( )
365
364
) ,
366
- Expression :: PredicateAccessPredicate ( access ) => {
365
+ Expression :: PredicateAccessPredicate ( _access ) => {
367
366
// TODO: access predicates for predicates
368
367
warn ! ( "PredicateAccessPredicate not supported" ) ;
369
368
"" . to_string ( )
370
369
}
371
- Expression :: FieldAccessPredicate ( fieldAccessPredicate ) => unimplemented ! ( ) ,
372
- Expression :: Unfolding ( unfolding ) => unimplemented ! ( ) ,
373
- Expression :: UnaryOp ( unaryOp ) => {
370
+ Expression :: FieldAccessPredicate ( _ ) => unimplemented ! ( ) ,
371
+ Expression :: Unfolding ( _ ) => unimplemented ! ( ) ,
372
+ Expression :: UnaryOp ( unary_op ) => {
374
373
format ! (
375
374
"({} {})" ,
376
- unaryOp . op_kind. to_smt( ) ,
377
- unaryOp . argument. to_smt( )
375
+ unary_op . op_kind. to_smt( ) ,
376
+ unary_op . argument. to_smt( )
378
377
)
379
378
}
380
- Expression :: BinaryOp ( binaryOp ) => format ! (
379
+ Expression :: BinaryOp ( binary_op ) => format ! (
381
380
"({} {} {})" ,
382
- binaryOp . op_kind. to_smt( ) ,
383
- binaryOp . left. to_smt( ) ,
384
- binaryOp . right. to_smt( )
381
+ binary_op . op_kind. to_smt( ) ,
382
+ binary_op . left. to_smt( ) ,
383
+ binary_op . right. to_smt( )
385
384
) ,
386
- Expression :: PermBinaryOp ( permBinaryOp ) => format ! (
385
+ Expression :: PermBinaryOp ( perm_binary_op ) => format ! (
387
386
"({} {} {})" ,
388
- permBinaryOp . op_kind. to_smt( ) ,
389
- permBinaryOp . left. to_smt( ) ,
390
- permBinaryOp . right. to_smt( )
387
+ perm_binary_op . op_kind. to_smt( ) ,
388
+ perm_binary_op . left. to_smt( ) ,
389
+ perm_binary_op . right. to_smt( )
391
390
) ,
392
- Expression :: ContainerOp ( containerOp ) => containerOp . to_smt ( ) ,
391
+ Expression :: ContainerOp ( container_op ) => container_op . to_smt ( ) ,
393
392
Expression :: Conditional ( conditional) => format ! (
394
393
"(ite {} {} {})" ,
395
394
conditional. guard. to_smt( ) ,
@@ -441,12 +440,12 @@ impl SMTTranslatable for Expression {
441
440
}
442
441
QuantifierKind :: Exists => unimplemented ! ( ) ,
443
442
} ,
444
- Expression :: LetExpr ( letExpr ) => unimplemented ! ( ) ,
445
- Expression :: FuncApp ( funcApp ) => unimplemented ! ( ) ,
446
- Expression :: DomainFuncApp ( domainFuncApp ) => {
447
- mk_app ( & domainFuncApp . function_name , & domainFuncApp . arguments )
443
+ Expression :: LetExpr ( _ ) => unimplemented ! ( ) ,
444
+ Expression :: FuncApp ( _ ) => unimplemented ! ( ) ,
445
+ Expression :: DomainFuncApp ( domain_func_app ) => {
446
+ mk_app ( & domain_func_app . function_name , & domain_func_app . arguments )
448
447
}
449
- Expression :: InhaleExhale ( inhaleExhale ) => unimplemented ! ( ) ,
448
+ Expression :: InhaleExhale ( _ ) => unimplemented ! ( ) ,
450
449
}
451
450
}
452
451
}
@@ -497,7 +496,7 @@ impl SMTTranslatable for UnaryOpKind {
497
496
498
497
impl SMTTranslatable for ContainerOp {
499
498
fn to_smt ( & self ) -> String {
500
- match self . kind {
499
+ match & self . kind {
501
500
ContainerOpKind :: SetConstructor => {
502
501
if self . operands . len ( ) == 1 {
503
502
return format ! ( "(Set_singleton {})" , self . operands[ 0 ] . to_smt( ) ) ;
@@ -577,8 +576,8 @@ impl SMTTranslatable for Type {
577
576
} ,
578
577
Type :: Seq ( seq) => format ! ( "Seq<{}>" , seq. element_type. to_smt( ) ) ,
579
578
Type :: Set ( set) => format ! ( "Set<{}>" , set. element_type. to_smt( ) ) ,
580
- Type :: MultiSet ( set ) => unimplemented ! ( "MultiSet" ) ,
581
- Type :: Map ( map ) => unimplemented ! ( "Map" ) ,
579
+ Type :: MultiSet ( _ ) => unimplemented ! ( "MultiSet" ) ,
580
+ Type :: Map ( _ ) => unimplemented ! ( "Map" ) ,
582
581
Type :: Ref => unimplemented ! ( "Ref" ) ,
583
582
Type :: Domain ( domain) => domain. name . to_string ( ) ,
584
583
}
0 commit comments