refutable


Also found in: Dictionary, Thesaurus, Wikipedia.

refutable

In lazy functional languages, a refutable pattern is one which may fail to match. An expression being matched against a refutable pattern is first evaluated to head normal form (which may fail to terminate) and then the top-level constructor of the result is compared with that of the pattern. If they are the same then any arguments are matched against the pattern's arguments otherwise the match fails.

An irrefutable pattern is one which always matches. An attempt to evaluate any variable in the pattern forces the pattern to be matched as though it were refutable which may fail to match (resulting in an error) or fail to terminate.

Patterns in Haskell are normally refutable but may be made irrefutable by prefixing them with a tilde (~). For example,

(\ (x,y) -> 1) undefined ==> undefined (\ ~(x,y) -> 1) undefined ==> 1

Patterns in Miranda are refutable, except for tuples which are irrefutable. Thus

g [x] = 2 g undefined ==> undefined

f (x,y) = 1 f undefined ==> 1

Pattern bindings in local definitions are irrefutable in both languages:

h = 1 where [x] = undefined ==> 1 Irrefutable patterns can be used to simulate unlifted products because they effectively ignore the top-level constructor of the expression being matched and consider only its components.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)
References in periodicals archive ?
ASC 740 does not, however, provide guidance on the types of evidence that should be considered, and there is no bright-line test for establishing or releasing a valuation allowance, although, in practice, many public accounting firms use a 3-year cumulative loss standard as a refutable starting point.
Friedman argued that the theoretical assumptions of neoclassical models were a necessary abstraction required in order to yield refutable implications.
"Attempts to spread the claim that the Lebanese resistance [Hezbollah] is aiding [the regime] are refutable," Ali told reporters after meeting Foreign Affairs Minister Adnan Mansour.
One must notice, nevertheless, that the combined framework does not present itself as a real testable model, but as Bjaalid, Hoien & Lundberg acknowledge; "one critical feature of a useful model is that it is refutable" (p.
On Godel's account, if prevailing set theories are consistent, the continuum hypothesis is not refutable in them.
The statement called on Israel to halt the home demolitions and provide security for Arabs in "their homes in Jerusalem." The commission's secretary general Hanna Issa dismissed as "clearly false and refutable" Israel's claim it had discovered an eighth century BC Jewish temple five kilometres from the Al Aqsa Mosque Compound.
According to that account, a G-level mathematical assertion from a given mathematical practice is provable, and hence its C-level correlate true, if it is provable in a formal system that is a legitimate injective idealization of the practice in question, while such a G-level assertion is refutable if it is refutable in such a formal system.
Este calificaba de metafisico lo que no era refutable. En contra de esta idea, Moulines sostiene que hay afirmaciones que no son refutables, pero no por ello pueden clasificarse como metafisicas.