Null function (original) (raw)
In computer science, a null function (or null operator) is a subroutine that leaves the program state unchanged. When it is part of the instruction set of a processor, it is called a NOP or NOOP (No OPeration). Mathematically, a (computer) function is null if and only if its execution leaves the program state unchanged. That is, a null function is an identity function whose domain and codomain are both the state space of the program, and for which: for all elements .
Property | Value |
---|---|
dbo:abstract | In computer science, a null function (or null operator) is a subroutine that leaves the program state unchanged. When it is part of the instruction set of a processor, it is called a NOP or NOOP (No OPeration). Mathematically, a (computer) function is null if and only if its execution leaves the program state unchanged. That is, a null function is an identity function whose domain and codomain are both the state space of the program, and for which: for all elements . Less rigorous definitions may also be encountered. For example, a function may take a single operand, transform it into a new data type, and return the result. While such usages bear a strong visual resemblance to identity functions, they create or alter a binary data value and thus change the program state. From a software maintainability perspective it is better to identify such "minor" alternations of state explicitly, since calling them null functions provides future maintainers of the code with no insights on their actual purposes. (en) Em ciência da computação, uma função nula, nulo (ou operador nulo) é uma sub-rotina que não retorna qualquer valor de dados e deixa o estado do programa inalterado. Quando faz parte do conjunto de instruções de um processador, ela é chamada de NOP ou NOOP (Nenhuma OPeração). Matematicamente, um função de computação f é nula se, e somente se, sua execução deixa o estado do programa inalterado. Isto é, uma função nula é uma cujo domínio e contradomínio são tanto o S do programa, e para os quais: f(s) = s para todos os elementos s em S. Definições menos rigorosas também podem ser encontradas. Por exemplo, uma função pode ter um único operador, transformá-lo em um novo tipo de dados, e retornar o resultado. Enquanto tais usos tem uma forte semelhança visual com a função identidade, eles criam ou alteram um valor de dados binários e, portanto, a mudança do estado do programa. De uma perspectiva da manutenção de software é melhor para identificar essas alternâncias de estado "menores" explicitamente, uma vez que chamando-as de funções nulas fornece-se futuros mantenedores do código sem dicernimento sobre seus efeitos reais. (pt) |
dbo:wikiPageID | 9021355 (xsd:integer) |
dbo:wikiPageLength | 3248 (xsd:nonNegativeInteger) |
dbo:wikiPageRevisionID | 1076988615 (xsd:integer) |
dbo:wikiPageWikiLink | dbr:Program_state dbr:NOP_(code) dbr:Dead_code dbr:Infinite_loop dbr:State_space dbr:Subroutine dbr:Computer_science dbr:Method_stub dbc:Subroutines dbr:Type_conversion dbr:Type_signature dbr:Domain_of_a_function dbr:Data_type dbr:Central_processing_unit dbr:Internet_Engineering_Task_Force dbr:Codomain dbr:Software_development dbr:Identity_function dbr:Instruction_set dbr:Operating_system dbr:CPU dbr:Multiprocessing dbr:IEFBR14 dbr:Embedded_system_overview dbr:Software_applications |
dbp:wikiPageUsesTemplate | dbt:Distinguish dbt:Refimprove dbt:Reflist dbt:Nulls dbt:Cite_IETF |
dct:subject | dbc:Subroutines |
gold:hypernym | dbr:Subroutine |
rdf:type | owl:Thing yago:WikicatSubroutines yago:Abstraction100002137 yago:Code106355894 yago:CodingSystem106353757 yago:Communication100033020 yago:Writing106359877 yago:WrittenCommunication106349220 yago:Routine106582403 yago:Software106566077 |
rdfs:comment | In computer science, a null function (or null operator) is a subroutine that leaves the program state unchanged. When it is part of the instruction set of a processor, it is called a NOP or NOOP (No OPeration). Mathematically, a (computer) function is null if and only if its execution leaves the program state unchanged. That is, a null function is an identity function whose domain and codomain are both the state space of the program, and for which: for all elements . (en) Em ciência da computação, uma função nula, nulo (ou operador nulo) é uma sub-rotina que não retorna qualquer valor de dados e deixa o estado do programa inalterado. Quando faz parte do conjunto de instruções de um processador, ela é chamada de NOP ou NOOP (Nenhuma OPeração). Matematicamente, um função de computação f é nula se, e somente se, sua execução deixa o estado do programa inalterado. Isto é, uma função nula é uma cujo domínio e contradomínio são tanto o S do programa, e para os quais: f(s) = s para todos os elementos s em S. (pt) |
rdfs:label | Null function (en) Função nula (ciência da computação) (pt) |
owl:differentFrom | dbr:Zero_function dbr:Empty_function dbr:Identity_function |
owl:sameAs | freebase:Null function yago-res:Null function wikidata:Null function dbpedia-pt:Null function https://global.dbpedia.org/id/3p9kF |
prov:wasDerivedFrom | wikipedia-en:Null_function?oldid=1076988615&ns=0 |
foaf:isPrimaryTopicOf | wikipedia-en:Null_function |
is dbo:wikiPageRedirects of | dbr:Null_operation dbr:Null_operator |
is dbo:wikiPageWikiLink of | dbr:April_Fools'_Day_Request_for_Comments dbr:Vladimir_Ilyushin dbr:Heap's_algorithm dbr:Indian_mathematics dbr:Stubroutine dbr:Null_operation dbr:Null_operator |
is owl:differentFrom of | dbr:Identity_function |
is foaf:primaryTopic of | wikipedia-en:Null_function |