Re: Does RDF support variable and conditional assignment

Dear Joylix,

(meta: it seems to me that this question is not specific to RDF-star, 
but more genarally about RDF, so semantic-web@w3.org would be a more 
appropriate list)

On 03/01/2021 16:25, Joy lix wrote:
>
> Dear All:
>
> I wanted to write a machine-readable product manual, and need to 
> describe the attributes of the product. such as:
>
> ---  #example-1
>
>      statement:
>
>                    The economical speed of a car is usually 60% of its 
> maximum speed
>
>      property expression:
>
>                   economicalSpeed = 0.6 * maximumSpeed
>
Neither RDF nor RDF-star intend to provide that kind of expressiveness. 
RDF is about describing plain facts, not *rules* allowing you to infer 
such facts from other facts.

For the later, you need additional languages on top of RDF, such as N3 
(see for example: http://ppr.cs.dal.ca:3002/n3/editor/s/VnKTjIS2 ).

> ---  #example-2
>
>       statement:
>
>                  When the running speed  is 55-80 km/h, the fourth 
> gear should be adopted, and the corresponding engine speed is 
> 2500-3000 RPM
>
>       property expression:
>
>                  if runningSpeed is in range(55, 80)   then
>
> gearLevel = 4
>
> engineSpeed should be in range(2500, 3000)
>
>                  else
>
> ...
>
> I want to record the above requirements in a single file or in graph 
> database, and use another Python API or SPARQL to query:
>
>        -- Car1.maximumSpeed = 200
>
>             and get -->  Car1.economicalSpeed = 0.6 * 200 = 120
>
>        -- Car2.runningSpeed =70
>
>             and get -->  Car2.gearLevel = 4,    Car2.engineSpeed is in 
> range(2500,300)
>
> I want to know if RDF supports the variable or conditional expressions 
> described above? I want to emphasize that I don't need to implement 
> reasoning or verification in this rdf file, Instead, simply document 
> these attributes and requirements(even use CSV or JSON data form), 
> and  then up to the application to query and compare, so for 
> simplicity, I'll try not to use SHACL. I wonder if there is any other 
> easier way to do this.
>
> Thank you for any advice.
>
> Joylix
>

Received on Tuesday, 5 January 2021 11:07:55 UTC