or run

tessl search
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-9/

{
  "context": "This criteria evaluates how effectively the engineer uses mathjs's parser functionality to implement a stateful calculator. The evaluation focuses on proper usage of the parser() function to maintain persistent state across evaluations, including variables and function definitions.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Parser instance creation",
      "description": "Uses math.parser() to create a parser instance with persistent state rather than using math.evaluate() for each expression",
      "max_score": 20
    },
    {
      "name": "Expression evaluation",
      "description": "Correctly uses parser.evaluate() method to evaluate expressions, assignments, and function definitions",
      "max_score": 20
    },
    {
      "name": "Variable persistence",
      "description": "Demonstrates that variables persist across multiple evaluate() calls by leveraging the parser's internal scope",
      "max_score": 15
    },
    {
      "name": "Function definitions",
      "description": "Supports function definitions using parser.evaluate() with syntax like 'f(x) = x^2' and subsequent function calls",
      "max_score": 15
    },
    {
      "name": "State clearing",
      "description": "Uses parser.clear() method or creates a new parser instance to reset all variables and functions",
      "max_score": 15
    },
    {
      "name": "Variable retrieval",
      "description": "Uses parser.get() method to retrieve individual variable or function values from the parser's scope",
      "max_score": 15
    }
  ]
}