Page MenuHomePhabricator

Use the orchestrator/evaluator to validate instances of each Z4/Type using on-wiki defined Z8/Functions instead of hard-coded
Closed, ResolvedPublic

Description

An instance of a given Z4/Type should be validated against the keys as defined in the given Z4/Type.

Related Objects

StatusSubtypeAssignedTask
OpenNone
StalledNone
Resolvedcmassaro
ResolvedDVrandecic
Resolvedcmassaro
ResolvedJdforrester-WMF
OpenNone
ResolvedNone
Resolvedcmassaro
ResolvedDVrandecic
ResolvedLindsaykwardell
Resolvedarthurlorenzi
ResolvedNone
InvalidNone
Resolvedcmassaro
Resolvedcmassaro
Resolvedcmassaro
Resolvedcmassaro
Resolvedcmassaro
ResolvedJdforrester-WMF
Resolvedcmassaro
Resolvedcmassaro
Resolvedcmassaro
ResolvedNone
ResolvedSimoneThisDot
ResolvedSimoneThisDot
ResolvedSimoneThisDot
Resolvedcmassaro
Resolvedcmassaro
ResolvedNone
ResolvedDVrandecic
Resolvedcmassaro
Resolvedarthurlorenzi
OpenNone

Event Timeline

DVrandecic raised the priority of this task from Medium to High.Oct 7 2020, 12:43 AM

Just a thought... Do we envisage a one-to-one relationship between Z4/Type and its Z4K3/validator, or can the same validator function be reused on multiple Z4/Types (which seems to imply a supertype, but perhaps we want to keep that concept implicit for now)?

Just a thought... Do we envisage a one-to-one relationship between Z4/Type and its Z4K3/validator, or can the same validator function be reused on multiple Z4/Types (which seems to imply a supertype, but perhaps we want to keep that concept implicit for now)?

I imagine you might re-use some of the sub-functions of the validators, e.g. the validator for the type Zn for floating point numbers will have a function checking that ZnK2 is a string that represents an IEEE double-precision float (or whatever), and that would also be useful for the type Zm for complex numbers on values ZmK2 and ZmK4 or whatever.

Just a thought... Do we envisage a one-to-one relationship between Z4/Type and its Z4K3/validator, or can the same validator function be reused on multiple Z4/Types (which seems to imply a supertype, but perhaps we want to keep that concept implicit for now)?

I imagine you might re-use some of the sub-functions of the validators, e.g. the validator for the type Zn for floating point numbers will have a function checking that ZnK2 is a string that represents an IEEE double-precision float (or whatever), and that would also be useful for the type Zm for complex numbers on values ZmK2 and ZmK4 or whatever.

Hmmm... Thanks... I'd suppose sub-function re-use more at the Z5/Error level but, yes, if the Z4/Type is composite then its (singular) validator function might be no more than a composition of the validator functions of each of its component Z4/Types. Or it might be such a composition plus additional validation across the component types. There is some sort of parallelism there. What about different validator functions with the same Z14/Implementation (for the time being)? Does that say, "these types are different in theory but identical in practice"?

The Testers are going to be the inputs to the generic (system) validator for each of the Implementations of a given Function definition; certainly some Testers could theoretically be shared between different functions (trivial examples: [1,1 -> 1] would be a valid test for a multiply function and a bitwise AND function; [2,2 -> 4] would be valid for multiply and add; etc.), but it might be simpler to lock Testers to a specific Function.

Thanks for that, James. I may come back to this through T269182, but Happy Holidays in any event!

Change 659130 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikiLambda@master] tests: Add test suite for generic ZType re-use

https://gerrit.wikimedia.org/r/659130

Change 659131 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikiLambda@master] tests: Test creating a non-wiki type based on a non-wiki type

https://gerrit.wikimedia.org/r/659131

Change 659130 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] tests: Add test suite for generic ZType re-use

https://gerrit.wikimedia.org/r/659130

Change 659131 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] tests: Test creating a non-wiki type based on a non-wiki type

https://gerrit.wikimedia.org/r/659131

I believe that this is now done for the scope of Phase Beta.

Jdforrester-WMF subscribed.

I'll un-lick this for the later phase.

Change 674744 had a related patch set uploaded (by DVrandecic; author: DVrandecic):
[mediawiki/extensions/WikiLambda@master] Change the validator of Z4/Type to a validate function

https://gerrit.wikimedia.org/r/674744

Change 674744 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Change the validator of Z4/Type to a validate function

https://gerrit.wikimedia.org/r/674744

Change 680426 had a related patch set uploaded (by DVrandecic; author: DVrandecic):

[mediawiki/extensions/WikiLambda@master] Moving all other builtin types from Z30 to their proper validator

https://gerrit.wikimedia.org/r/680426

Change 680426 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Moving all other builtin types from Z30 to their proper validator

https://gerrit.wikimedia.org/r/680426

Jdforrester-WMF renamed this task from Use Z4/Type to validate instances to Use the orchestrator/evaluator to validate instances of each Z4/Type using on-wiki defined Z8/Functions.May 5 2021, 5:30 PM
Jdforrester-WMF renamed this task from Use the orchestrator/evaluator to validate instances of each Z4/Type using on-wiki defined Z8/Functions to Use the orchestrator/evaluator to validate instances of each Z4/Type using on-wiki defined Z8/Functions instead of hard-coded .May 11 2021, 8:33 PM
DVrandecic assigned this task to cmassaro.