TOAST
The Online Argument Structures Tool

TOAST API user guide

TOAST has a RESTful API, to allow you to use it in your own applications.

The base URL for the API is: http://toast.arg.tech/api The following methods are available:

POST /evaluate

Description: evaluates an argumentation theory, returning a JSON description

NameDescription
axiomsList of axioms
premisesList of premises
assumptionsList of assumptions
kbPrefsList of knowledge base preferences (note: cannot contain any axioms)
rulesList of rules
rulePrefsList of rule preferences
contrarinessList of contraries and contradictories
linkWeakest (default) or last link preference principle
semanticsGrounded (default), preferred or semi-stable
queryFormula to find an (un)acceptable argument for
transpositionTrue or false (default); whather or not to close the theory under transposition

Data can be posted either as key-value pairs (in which case all lists are delimited by semi-colons), or as a JSON object (in which case, all lists are JSON arrays). For instance, using cURL: curl -d "premises=p;q;&rules=[r1] p=>s;&contrariness=q^p;" http://toast.arg.tech/api/evaluate Returns: {
   "wellformed":true,
   "result":"",
   "extensions":[
      [
         "A1: q"
      ]
   ],
   "arguments":[
      "A3: A2=>s",
      "A2: p",
      "A1: q"
   ],
   "defeat":[
      "A1>A3",
      "A1>A2"
   ]
}
Alternatively, posting JSON: curl -d
>'{"premises":["p","q"],"kbPrefs":["p<q"],"rules":["[r1] p=>s","[r2] q=>t"],"rulePrefs":["[r1]<[r2]"],"contrariness":["s-t"],"link":"weakest"}'
> http://toast.arg.tech/api/evaluate"
Returns: {
   "link":"weakest",
   "kbPrefs":[
      "p < q"
   ],
   "semantics":"grounded",
   "assumptions":[

   ],
   "rulePrefs":[
      "[r1] < [r2]"
   ],
   "defeat":[
      "A3>A4"
   ],
   "axioms":[

   ],
   "wellformed":true,
   "extensions":{
      "0":[
         "A1",
         "A2",
         "A3"
      ]
   },
   "premises":[
      "p",
      "q"
   ],
   "acceptableConclusions":{
      "0":[
         "p",
         "q",
         "t"
      ]
   },
   "arguments":[
      "A1: p",
      "A2: q",
      "A4: A1=>s",
      "A3: A2=>t"
   ],
   "contrariness":[
      "s-t"
   ]
}

GET aifdb/<argument>

Description: evaluates the provided argument ID in AIFdb, returning a JSON description.