@tasks.register<EOL>def validate_product_equation(poi=None):
from . import utils<EOL>from . import validators<EOL>container_dir, product_name = tasks.get_poi_tuple(poi=poi)<EOL>feature_list = utils.get_features_from_equation(container_dir, product_name)<EOL>ordering_constraints = utils.get_feature_order_constraints(container_dir)<EOL>spec_path = utils.get_feature_ide_paths(container_dir, product_name).product_spec_path<EOL>print('<STR_LIT>')<EOL>print('<STR_LIT>')<EOL>feature_order_validator = validators.FeatureOrderValidator(feature_list, ordering_constraints)<EOL>feature_order_validator.check_order()<EOL>if feature_order_validator.has_errors():<EOL><INDENT>print('<STR_LIT>')<EOL>for error in feature_order_validator.get_violations():<EOL><INDENT>print('<STR_LIT>', error[<NUM_LIT:1>])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>print('<STR_LIT>')<EOL>if not os.path.exists(spec_path):<EOL><INDENT>print(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>)<EOL>return<EOL><DEDENT>spec_validator = validators.ProductSpecValidator(spec_path, product_name, feature_list)<EOL>if not spec_validator.is_valid():<EOL><INDENT>if spec_validator.get_errors_mandatory():<EOL><INDENT>print('<STR_LIT>', spec_validator.get_errors_mandatory())<EOL><DEDENT>if spec_validator.get_errors_never():<EOL><INDENT>print('<STR_LIT>', spec_validator.get_errors_never())<EOL><DEDENT><DEDENT>else:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>if feature_order_validator.has_errors() or spec_validator.has_errors():<EOL><INDENT>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>
Validates the product equation.
* Validates the feature order
* Validates the product spec (mandatory functional features)
:param poi: optional product of interest