}
}
if( in.isConst() ){
+ Trace("datatypes-rewrite-debug") << "Normalizing constant " << in << std::endl;
Node inn = normalizeConstant( in );
- Assert( !inn.isNull() );
- if( inn!=in ){
+ //constant may be a subterm of another constant, so cannot assume that this will succeed for codatatypes
+ //Assert( !inn.isNull() );
+ if( !inn.isNull() && inn!=in ){
Trace("datatypes-rewrite") << "Normalized constant " << in << " -> " << inn << std::endl;
return RewriteResponse(REWRITE_DONE, inn);
+ }else{
+ return RewriteResponse(REWRITE_DONE, in);
}
}
}
--- /dev/null
+(set-logic ALL_SUPPORTED)
+(set-info :status sat)
+(declare-sort term 0)
+(declare-codatatypes () (
+ (llist_tree (lnil_tree )
+ (lcons_tree (_select_llist_tree_0 tree)
+ (_select_llist_tree_1 llist_tree)))
+ (tree (leaf (_select_tree_0 term))
+ (node (_select_tree_1 llist_tree)))
+))
+(declare-fun nun_sk_2 () term)
+(declare-fun nun_sk_1 () term)
+(declare-fun nun_sk_0 () tree)
+(assert
+ (= nun_sk_0
+ (node
+ (lcons_tree (leaf nun_sk_1)
+ (lcons_tree (leaf nun_sk_2) (lcons_tree nun_sk_0 lnil_tree))))))
+(check-sat)
\ No newline at end of file