Open
Description
Problem to Solve
Currently, queries do not permit the following syntax:
$v isa vehicle;
$v isa $vehicle-type;
$v has license-plate "VATICLE";
This syntax allows for the types of the vehicle to be retrieved.
Current Workaround
The following syntax works instead:
$v isa $vehicle-type;
$vehicle-type sub vehicle;
$v has license-plate "VATICLE";
Proposed Solution
The problem with the currently illegal syntax is that $v
can have multiple conflicting types, however both types can be satisfied by checking if $vehicle-type
is a subtype of vehicle
against the schema and returning an error only if not. While not necessary, improving the expressivity of the language in this way (and others) would be a nice feature and might be more intuitive for users.