blob: 3fb66d6203fa3c7172f958b00b6ce0149dced862 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Language" content="en-us">
<title>Example Web Editor</title>
<link rel="stylesheet" type="text/css" href="webjars/codemirror/5.52.2/lib/codemirror.css" />
<link rel="stylesheet" type="text/css" href="webjars/codemirror/5.52.2/addon/hint/show-hint.css" />
<link rel="stylesheet" type="text/css" href="xtext/2.26.0.M1/xtext-codemirror.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<body>
<div class="container">
<div class="header">
<h1>Example Problem Web Editor</h1>
</div>
<div class="content">
<div class="xtext-editor"
data-editor-xtext-lang="problem"
data-editor-enable-formatting-action="true"
data-editor-send-full-text="false"
><pre>class Family {
contains Person[] members
}
class Person {
Person[] children opposite parent
Person parent opposite children
TaxStatus[1] taxStatus
}
enum TaxStatus {
child, student, adult, retired
}
error invalidTaxStatus(Person p) :-
taxStatus(p, child), children(p, _q).
Family('family').
members('family', anne).
members('family', bob).
members('family', ciri).
children(anne, ciri).
?children(bob, ciri).
taxStatus(anne, adult).
scope Family = 1, Person += 5..10.</pre></div>
</div>
</div>
<script type="text/javascript" src="webjars/requirejs/2.3.6/require.min.js"></script>
<script type="text/javascript" src="script.js"></script>
</body>
|