idp_server.State

Management of the State of problem solving with the Interactive Consultant.

class idp_server.State.State(idp: idp_engine.Parse.IDP)[source]

Contains a state of problem solving

classmethod make(idp: idp_engine.Parse.IDP, previous_active: str, jsonstr: str)idp_server.State.State[source]

Manage the cache of State

Parameters
  • idp (IDP) – idp source code

  • previous_active (str) – previous input from client

  • jsonstr (str) – input from client

Returns

a State

Return type

State

add_given(jsonstr: str)[source]

Add the assignments that the user gave through the interface. These are in the form of a json string.

Parameters

jsonstr – the user’s assignment in json

Returns

the state with the jsonstr added

Return type

State