Contract server John J. Camilleri, 2016-05-30

Commands

Path (POST) Description Parameters Request body Response body
/coml/uppaal COML to UPPAAL scl=1 for enabling translation via SCL COML (XML) UPPAAL (XML)
/coml/cnl Linearise COML contract using CNL COML (XML) CNL
/coml/codsh COML to COD shorthand COML (XML) CODSH
/codsh/coml COD shorthand to COML CODSH COML (XML)
/codsh/uppaal COD shorthand to UPPAAL CODSH UPPAAL (XML)
/nl/tsv Natural language to tab-separated values (ConPar) First line: entities e.g. you=User,we=Provider
Rest: English text, one sentence per line.
TSV (see below)
/tsv/coml TSV to COML TSV including header row (see below) COML (XML)
/coml/syntactic Syntactic query on COML First line: query, e.g. (hasRep && (isObl || hasAgent(john)))
Available predicates are: isObl, isPer, isFor, hasRep, hasName(name), hasAgent(agent), hasAction(action), hasTime, hasGuard .
Available operators are: && (conjunction), || (disjunction), -- (difference).
Rest of request: COML
List of matching clause names, separated by newlines

General notes

TSV format

Columns

Sentence No Modality Subject Verb Object Adverbials Time Conditions Notes Reparation
Original text Name/number for clause O, P, F or a refinement AND[x,y,...], OR[x,y,...], SEQ[x,y,...] where x, y, ... are clause names Agent Verb without object Object (or blank) Adverbial modifiers (free-text) Temporal constraints: before 10, after 5, within 7, t0 < 10, t_RegCourse > 5. Multiple constraints can be joined with && or and. Conditions for enabling the clause: isDone(clause), isComplete(clause), isVio(clause), as well as any temporal constraints (see Time column). Multiple conditions can be joined with && or and. Notes (free-text) T (top), B (bottom) or a clause name

Notes

Identifier naming

Replacements

When creating identifier names for UPPAAL, the following replacements are made:

Replace With
  (space), . (period), - (hyphen) _ (underscore)
, (comma) X
& (ampersand) _and_
()[]{}<> (all brackets) (removed)

Reserved words

The following reserved words cannot occur as names: urgent, broadcast, meta, const, int, clock, chan, bool, scalar, struct, typedef, for, while, do, if, return, system, init, process, and, or