user_guide:extend:upgrade_rules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
user_guide:extend:upgrade_rules [2019/11/13 01:12] – created gawrilowuser_guide:extend:upgrade_rules [2019/11/13 01:21] gawrilow
Line 47: Line 47:
  
 Upgrade rules are small perl scripts operating on polymake data in serialized form, that is, on pure perl structures like numbers, strings, anonymous lists and hashes, exactly how you see them in a JSON file.  All upgrade rules applicable to data with source version M.N are stored in a file named ''upgrades/M.(N+1)'', that is, after the target version.  An upgrade rule file can only contain upgrade rules and generic perl code like subroutines, lexical variables, or require statements, but no other kinds of rules or declarations. Upgrade rules are small perl scripts operating on polymake data in serialized form, that is, on pure perl structures like numbers, strings, anonymous lists and hashes, exactly how you see them in a JSON file.  All upgrade rules applicable to data with source version M.N are stored in a file named ''upgrades/M.(N+1)'', that is, after the target version.  An upgrade rule file can only contain upgrade rules and generic perl code like subroutines, lexical variables, or require statements, but no other kinds of rules or declarations.
 +
 +At the beginning, an upgrade rulefile should contain a comment block briefly describing all transformations defined there.
 +Please refer to the existing rules for suitable examples.
  
 The upgrade rules are applied to matching objects in the increasing order of target versions; the rules with equal target versions are applied in the order of definition in the rulefile.  If a rule can be applied to a big object and to some of its subobjects, the parent object will be processed first, while the order of processing its properties is unpredictable. The upgrade rules are applied to matching objects in the increasing order of target versions; the rules with equal target versions are applied in the order of definition in the rulefile.  If a rule can be applied to a big object and to some of its subobjects, the parent object will be processed first, while the order of processing its properties is unpredictable.
  • user_guide/extend/upgrade_rules.txt
  • Last modified: 2019/11/13 15:35
  • by gawrilow