Consensys / EthOn

EthOn - The Ethereum Ontology
http://ethon.consensys.net
Other
245 stars 44 forks source link

EthOn_Contracts.ttl property bugs #172

Open dmuhs opened 6 years ago

dmuhs commented 6 years ago

The stackItemsAdded and stackItemsRemoved seem to be swapped throughout the EthOn_Constracts.ttl file. While the yellowpaper shows that e.g. ADD deleted two elements from the EVM stack and adds another one to it, the respective EthOn definition is as follows

:Opcode_ADD a owl:NamedIndividual , :Opcode ;
    :cost "3"^^xsd:integer ;
    :hexValue "01"^^xsd:hexBinary ;
    :name "ADD"^^xsd:string ;
    :stackItemsAdded "2"^^xsd:integer ;
    :stackItemsRemoved "1"^^xsd:integer ;
    rdfs:comment "Addition operation."@en .

This leads to some amusing entries, which apparently have gone undetected such as

:Opcode_POP a owl:NamedIndividual , :Opcode ;
    :cost "2"^^xsd:integer ;
    :hexValue "50"^^xsd:hexBinary ;
    :name "POP"^^xsd:string ;
    :stackItemsAdded "1"^^xsd:integer ;
    :stackItemsRemoved "0"^^xsd:integer ;
    rdfs:comment "Remove item from stack"@en .

This issue seems to affect the whole file and potentially others.