File tree 1 file changed +26
-0
lines changed 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -975,6 +975,32 @@ typet smt2_parsert::sort()
975
975
return nil_typet ();
976
976
}
977
977
}
978
+ else if (buffer == " Array" )
979
+ {
980
+ // this gets two sorts as arguments, domain and range
981
+ auto domain = sort ();
982
+ auto range = sort ();
983
+
984
+ // eat the ')'
985
+ if (next_token () != CLOSE)
986
+ {
987
+ error () << " expected ')' at end of Array sort" << eom;
988
+ return nil_typet ();
989
+ }
990
+
991
+ // we can turn arrays that map an unsigned bitvector type
992
+ // to something else into our 'array_typet'
993
+ if (domain.id () == ID_unsignedbv)
994
+ {
995
+ const auto size = to_unsignedbv_type (domain).largest_expr ();
996
+ return array_typet (range, size);
997
+ }
998
+ else
999
+ {
1000
+ error () << " unsupported array sort" << eom;
1001
+ return nil_typet ();
1002
+ }
1003
+ }
978
1004
else
979
1005
{
980
1006
error () << " unexpected sort: `" << buffer << ' \' ' << eom;
You can’t perform that action at this time.
0 commit comments