Commit 17eba541c019a8eb9bf0b236a8c240f31ea544ed

Authored by Francisco Coelho
1 parent 677cc471
Exists in master

Updated meeting info

code/python/.ipynb_checkpoints/EventLattice-checkpoint.ipynb 0 → 100644
... ... @@ -0,0 +1,113 @@
  1 +{
  2 + "cells": [
  3 + {
  4 + "cell_type": "code",
  5 + "execution_count": null,
  6 + "id": "57fc5921-9d6b-4b43-a8f6-743a03650d63",
  7 + "metadata": {},
  8 + "outputs": [],
  9 + "source": [
  10 + "import event_lattice as el"
  11 + ]
  12 + },
  13 + {
  14 + "cell_type": "code",
  15 + "execution_count": null,
  16 + "id": "00f0eb68",
  17 + "metadata": {},
  18 + "outputs": [],
  19 + "source": [
  20 + "def zoom_event(event_str, lattice, lower_op=el.sum_op, upper_op=el.prod_op):\n",
  21 + " event = el.Event.from_str(event_str)\n",
  22 + " event_class = lattice.event_class(event)\n",
  23 + " propagated = lattice.propagated_value(\n",
  24 + " event, lower_op=lower_op, upper_op=upper_op)\n",
  25 + "\n",
  26 + " print(\n",
  27 + " f\"Event: {event}\\n\\tClass: {event_class} \\n\\tValue: {propagated}\")"
  28 + ]
  29 + },
  30 + {
  31 + "cell_type": "code",
  32 + "execution_count": null,
  33 + "id": "cdd8c6d6",
  34 + "metadata": {},
  35 + "outputs": [],
  36 + "source": [
  37 + "smodels = el.Lattice.parse({\n",
  38 + " \"A\": 2,\n",
  39 + " \"ab\": 3,\n",
  40 + " \"ac\": 5\n",
  41 + "})\n",
  42 + "\n",
  43 + "lattice = el.Lattice(smodels)\n",
  44 + "\n",
  45 + "print(lattice)"
  46 + ]
  47 + },
  48 + {
  49 + "cell_type": "code",
  50 + "execution_count": null,
  51 + "id": "2b445339",
  52 + "metadata": {},
  53 + "outputs": [],
  54 + "source": [
  55 + "zoom_event(\"abc\", lattice)\n",
  56 + "zoom_event(\"a\", lattice)\n",
  57 + "zoom_event(\"b\", lattice)\n",
  58 + "zoom_event(\"bc\", lattice)\n",
  59 + "zoom_event(\"ac\", lattice)"
  60 + ]
  61 + },
  62 + {
  63 + "cell_type": "code",
  64 + "execution_count": null,
  65 + "id": "f1b85255",
  66 + "metadata": {},
  67 + "outputs": [],
  68 + "source": [
  69 + "from itertools import *\n",
  70 + "\n",
  71 + "lits = lattice.literals()\n",
  72 + "for len_lit in range(len(lits)+1):\n",
  73 + " events = list(\"\".join(c) for c in combinations(lits, len_lit))\n",
  74 + " for event in events:\n",
  75 + " zoom_event(event, lattice)"
  76 + ]
  77 + },
  78 + {
  79 + "cell_type": "code",
  80 + "execution_count": null,
  81 + "id": "07973a47",
  82 + "metadata": {},
  83 + "outputs": [],
  84 + "source": []
  85 + }
  86 + ],
  87 + "metadata": {
  88 + "kernelspec": {
  89 + "display_name": "Python 3.9.13 ('base')",
  90 + "language": "python",
  91 + "name": "python3"
  92 + },
  93 + "language_info": {
  94 + "codemirror_mode": {
  95 + "name": "ipython",
  96 + "version": 3
  97 + },
  98 + "file_extension": ".py",
  99 + "mimetype": "text/x-python",
  100 + "name": "python",
  101 + "nbconvert_exporter": "python",
  102 + "pygments_lexer": "ipython3",
  103 + "version": "3.9.13"
  104 + },
  105 + "vscode": {
  106 + "interpreter": {
  107 + "hash": "a59afa236e16843183c59a167f072b6fa0409044b3c4938e82ac98aad91bf217"
  108 + }
  109 + }
  110 + },
  111 + "nbformat": 4,
  112 + "nbformat_minor": 5
  113 +}
... ...
code/python/EventLattice.ipynb
... ... @@ -2,7 +2,7 @@
2 2 "cells": [
3 3 {
4 4 "cell_type": "code",
5   - "execution_count": 1,
  5 + "execution_count": 7,
6 6 "id": "57fc5921-9d6b-4b43-a8f6-743a03650d63",
7 7 "metadata": {},
8 8 "outputs": [],
... ... @@ -12,7 +12,7 @@
12 12 },
13 13 {
14 14 "cell_type": "code",
15   - "execution_count": 2,
  15 + "execution_count": 8,
16 16 "id": "00f0eb68",
17 17 "metadata": {},
18 18 "outputs": [],
... ... @@ -29,7 +29,7 @@
29 29 },
30 30 {
31 31 "cell_type": "code",
32   - "execution_count": 10,
  32 + "execution_count": 9,
33 33 "id": "cdd8c6d6",
34 34 "metadata": {},
35 35 "outputs": [
... ... @@ -62,7 +62,7 @@
62 62 },
63 63 {
64 64 "cell_type": "code",
65   - "execution_count": 11,
  65 + "execution_count": 10,
66 66 "id": "2b445339",
67 67 "metadata": {},
68 68 "outputs": [
... ... @@ -71,10 +71,10 @@
71 71 "output_type": "stream",
72 72 "text": [
73 73 "Event: abc\n",
74   - "\tClass: <|ab,ac> \n",
  74 + "\tClass: <|ac,ab> \n",
75 75 "\tValue: 8\n",
76 76 "Event: a\n",
77   - "\tClass: <ab,ac|> \n",
  77 + "\tClass: <ac,ab|> \n",
78 78 "\tValue: 15\n",
79 79 "Event: b\n",
80 80 "\tClass: <ab|> \n",
... ... @@ -98,7 +98,7 @@
98 98 },
99 99 {
100 100 "cell_type": "code",
101   - "execution_count": 12,
  101 + "execution_count": 11,
102 102 "id": "f1b85255",
103 103 "metadata": {},
104 104 "outputs": [
... ... @@ -107,7 +107,7 @@
107 107 "output_type": "stream",
108 108 "text": [
109 109 "Event: \n",
110   - "\tClass: <A,ab,ac|> \n",
  110 + "\tClass: <A,ac,ab|> \n",
111 111 "\tValue: 30\n",
112 112 "Event: A\n",
113 113 "\tClass: <A|A> \n",
... ... @@ -115,188 +115,188 @@
115 115 "Event: b\n",
116 116 "\tClass: <ab|> \n",
117 117 "\tValue: 3\n",
  118 + "Event: a\n",
  119 + "\tClass: <ac,ab|> \n",
  120 + "\tValue: 15\n",
118 121 "Event: B\n",
119 122 "\tClass: <|> \n",
120 123 "\tValue: 0\n",
121   - "Event: C\n",
122   - "\tClass: <|> \n",
123   - "\tValue: 0\n",
124 124 "Event: c\n",
125 125 "\tClass: <ac|> \n",
126 126 "\tValue: 5\n",
127   - "Event: a\n",
128   - "\tClass: <ab,ac|> \n",
129   - "\tValue: 15\n",
  127 + "Event: C\n",
  128 + "\tClass: <|> \n",
  129 + "\tValue: 0\n",
130 130 "Event: Ab\n",
131 131 "\tClass: <|A> \n",
132 132 "\tValue: 2\n",
133   - "Event: AB\n",
  133 + "Event: Aa\n",
134 134 "\tClass: <|A> \n",
135   - "\tValue: 2\n",
136   - "Event: AC\n",
  135 + "\tValue: 0\n",
  136 + "Event: AB\n",
137 137 "\tClass: <|A> \n",
138 138 "\tValue: 2\n",
139 139 "Event: Ac\n",
140 140 "\tClass: <|A> \n",
141 141 "\tValue: 2\n",
142   - "Event: Aa\n",
  142 + "Event: AC\n",
143 143 "\tClass: <|A> \n",
144   - "\tValue: 0\n",
  144 + "\tValue: 2\n",
  145 + "Event: ab\n",
  146 + "\tClass: <ab|ab> \n",
  147 + "\tValue: 3\n",
145 148 "Event: Bb\n",
146 149 "\tClass: <|> \n",
147 150 "\tValue: 0\n",
  151 + "Event: bc\n",
  152 + "\tClass: <|> \n",
  153 + "\tValue: 0\n",
148 154 "Event: Cb\n",
149 155 "\tClass: <|> \n",
150 156 "\tValue: 0\n",
151   - "Event: bc\n",
  157 + "Event: Ba\n",
152 158 "\tClass: <|> \n",
153 159 "\tValue: 0\n",
154   - "Event: ab\n",
155   - "\tClass: <ab|ab> \n",
156   - "\tValue: 3\n",
157   - "Event: BC\n",
  160 + "Event: ac\n",
  161 + "\tClass: <ac|ac> \n",
  162 + "\tValue: 5\n",
  163 + "Event: Ca\n",
158 164 "\tClass: <|> \n",
159 165 "\tValue: 0\n",
160 166 "Event: Bc\n",
161 167 "\tClass: <|> \n",
162 168 "\tValue: 0\n",
163   - "Event: Ba\n",
  169 + "Event: BC\n",
164 170 "\tClass: <|> \n",
165 171 "\tValue: 0\n",
166 172 "Event: Cc\n",
167 173 "\tClass: <|> \n",
168 174 "\tValue: 0\n",
169   - "Event: Ca\n",
170   - "\tClass: <|> \n",
  175 + "Event: Aab\n",
  176 + "\tClass: <|A,ab> \n",
171 177 "\tValue: 0\n",
172   - "Event: ac\n",
173   - "\tClass: <ac|ac> \n",
174   - "\tValue: 5\n",
175 178 "Event: ABb\n",
176 179 "\tClass: <|A> \n",
177 180 "\tValue: 0\n",
178   - "Event: ACb\n",
179   - "\tClass: <|A> \n",
180   - "\tValue: 2\n",
181 181 "Event: Abc\n",
182 182 "\tClass: <|A> \n",
183 183 "\tValue: 2\n",
184   - "Event: Aab\n",
185   - "\tClass: <|A,ab> \n",
186   - "\tValue: 0\n",
187   - "Event: ABC\n",
188   - "\tClass: <|A> \n",
189   - "\tValue: 2\n",
190   - "Event: ABc\n",
  184 + "Event: ACb\n",
191 185 "\tClass: <|A> \n",
192 186 "\tValue: 2\n",
193 187 "Event: ABa\n",
194 188 "\tClass: <|A> \n",
195 189 "\tValue: 0\n",
196   - "Event: ACc\n",
197   - "\tClass: <|A> \n",
198   - "\tValue: 0\n",
199   - "Event: ACa\n",
200   - "\tClass: <|A> \n",
201   - "\tValue: 0\n",
202 190 "Event: Aac\n",
203 191 "\tClass: <|A,ac> \n",
204 192 "\tValue: 0\n",
205   - "Event: BCb\n",
206   - "\tClass: <|> \n",
  193 + "Event: ACa\n",
  194 + "\tClass: <|A> \n",
207 195 "\tValue: 0\n",
208   - "Event: Bbc\n",
209   - "\tClass: <|> \n",
  196 + "Event: ABc\n",
  197 + "\tClass: <|A> \n",
  198 + "\tValue: 2\n",
  199 + "Event: ABC\n",
  200 + "\tClass: <|A> \n",
  201 + "\tValue: 2\n",
  202 + "Event: ACc\n",
  203 + "\tClass: <|A> \n",
210 204 "\tValue: 0\n",
211 205 "Event: Bab\n",
212 206 "\tClass: <|ab> \n",
213 207 "\tValue: 0\n",
214   - "Event: Cbc\n",
215   - "\tClass: <|> \n",
216   - "\tValue: 0\n",
  208 + "Event: abc\n",
  209 + "\tClass: <|ac,ab> \n",
  210 + "\tValue: 8\n",
217 211 "Event: Cab\n",
218 212 "\tClass: <|ab> \n",
219 213 "\tValue: 3\n",
220   - "Event: abc\n",
221   - "\tClass: <|ab,ac> \n",
222   - "\tValue: 8\n",
223   - "Event: BCc\n",
  214 + "Event: Bbc\n",
224 215 "\tClass: <|> \n",
225 216 "\tValue: 0\n",
226   - "Event: BCa\n",
  217 + "Event: BCb\n",
  218 + "\tClass: <|> \n",
  219 + "\tValue: 0\n",
  220 + "Event: Cbc\n",
227 221 "\tClass: <|> \n",
228 222 "\tValue: 0\n",
229 223 "Event: Bac\n",
230 224 "\tClass: <|ac> \n",
231 225 "\tValue: 5\n",
  226 + "Event: BCa\n",
  227 + "\tClass: <|> \n",
  228 + "\tValue: 0\n",
232 229 "Event: Cac\n",
233 230 "\tClass: <|ac> \n",
234 231 "\tValue: 0\n",
235   - "Event: ABCb\n",
236   - "\tClass: <|A> \n",
237   - "\tValue: 0\n",
238   - "Event: ABbc\n",
239   - "\tClass: <|A> \n",
  232 + "Event: BCc\n",
  233 + "\tClass: <|> \n",
240 234 "\tValue: 0\n",
241 235 "Event: ABab\n",
242 236 "\tClass: <|A,ab> \n",
243 237 "\tValue: 0\n",
244   - "Event: ACbc\n",
245   - "\tClass: <|A> \n",
  238 + "Event: Aabc\n",
  239 + "\tClass: <|A,ac,ab> \n",
246 240 "\tValue: 0\n",
247 241 "Event: ACab\n",
248 242 "\tClass: <|A,ab> \n",
249 243 "\tValue: 0\n",
250   - "Event: Aabc\n",
251   - "\tClass: <|A,ab,ac> \n",
  244 + "Event: ABbc\n",
  245 + "\tClass: <|A> \n",
252 246 "\tValue: 0\n",
253   - "Event: ABCc\n",
  247 + "Event: ABCb\n",
254 248 "\tClass: <|A> \n",
255 249 "\tValue: 0\n",
256   - "Event: ABCa\n",
  250 + "Event: ACbc\n",
257 251 "\tClass: <|A> \n",
258 252 "\tValue: 0\n",
259 253 "Event: ABac\n",
260 254 "\tClass: <|A,ac> \n",
261 255 "\tValue: 0\n",
  256 + "Event: ABCa\n",
  257 + "\tClass: <|A> \n",
  258 + "\tValue: 0\n",
262 259 "Event: ACac\n",
263 260 "\tClass: <|A,ac> \n",
264 261 "\tValue: 0\n",
265   - "Event: BCbc\n",
266   - "\tClass: <|> \n",
  262 + "Event: ABCc\n",
  263 + "\tClass: <|A> \n",
  264 + "\tValue: 0\n",
  265 + "Event: Babc\n",
  266 + "\tClass: <|ac,ab> \n",
267 267 "\tValue: 0\n",
268 268 "Event: BCab\n",
269 269 "\tClass: <|ab> \n",
270 270 "\tValue: 0\n",
271   - "Event: Babc\n",
272   - "\tClass: <|ab,ac> \n",
273   - "\tValue: 0\n",
274 271 "Event: Cabc\n",
275   - "\tClass: <|ab,ac> \n",
  272 + "\tClass: <|ac,ab> \n",
  273 + "\tValue: 0\n",
  274 + "Event: BCbc\n",
  275 + "\tClass: <|> \n",
276 276 "\tValue: 0\n",
277 277 "Event: BCac\n",
278 278 "\tClass: <|ac> \n",
279 279 "\tValue: 0\n",
280   - "Event: ABCbc\n",
281   - "\tClass: <|A> \n",
  280 + "Event: ABabc\n",
  281 + "\tClass: <|A,ac,ab> \n",
282 282 "\tValue: 0\n",
283 283 "Event: ABCab\n",
284 284 "\tClass: <|A,ab> \n",
285 285 "\tValue: 0\n",
286   - "Event: ABabc\n",
287   - "\tClass: <|A,ab,ac> \n",
288   - "\tValue: 0\n",
289 286 "Event: ACabc\n",
290   - "\tClass: <|A,ab,ac> \n",
  287 + "\tClass: <|A,ac,ab> \n",
  288 + "\tValue: 0\n",
  289 + "Event: ABCbc\n",
  290 + "\tClass: <|A> \n",
291 291 "\tValue: 0\n",
292 292 "Event: ABCac\n",
293 293 "\tClass: <|A,ac> \n",
294 294 "\tValue: 0\n",
295 295 "Event: BCabc\n",
296   - "\tClass: <|ab,ac> \n",
  296 + "\tClass: <|ac,ab> \n",
297 297 "\tValue: 0\n",
298 298 "Event: ABCabc\n",
299   - "\tClass: <|A,ab,ac> \n",
  299 + "\tClass: <|A,ac,ab> \n",
300 300 "\tValue: 0\n"
301 301 ]
302 302 }
... ... @@ -305,10 +305,11 @@
305 305 "from itertools import *\n",
306 306 "\n",
307 307 "lits = lattice.literals()\n",
  308 + "events = []\n",
308 309 "for len_lit in range(len(lits)+1):\n",
309   - " events = list(\"\".join(c) for c in combinations(lits, len_lit))\n",
310   - " for event in events:\n",
311   - " zoom_event(event, lattice)"
  310 + " events = events + list(\"\".join(c) for c in combinations(lits, len_lit))\n",
  311 + "for event in events:\n",
  312 + " zoom_event(event, lattice)"
312 313 ]
313 314 },
314 315 {
... ... @@ -322,7 +323,7 @@
322 323 ],
323 324 "metadata": {
324 325 "kernelspec": {
325   - "display_name": "Python 3.9.13 ('base')",
  326 + "display_name": "Python 3 (ipykernel)",
326 327 "language": "python",
327 328 "name": "python3"
328 329 },
... ... @@ -336,7 +337,7 @@
336 337 "name": "python",
337 338 "nbconvert_exporter": "python",
338 339 "pygments_lexer": "ipython3",
339   - "version": "3.9.13"
  340 + "version": "3.9.15"
340 341 },
341 342 "vscode": {
342 343 "interpreter": {
... ...
code/python/event_lattice.py
... ... @@ -110,7 +110,6 @@ class Event:
110 110  
111 111 class Lattice:
112 112  
113   -
114 113 @staticmethod
115 114 def parse(d):
116 115 result = dict()
... ...
meetings.md
1 1 ## Zugzwang Meetings
2 2  
  3 +
3 4 ### 2022-12-12
4 5  
5 6 - Is the project proposal ok? How long/detailed should it be?
6 7 - Initial exploratory code `event_lattice.py` and `EventLattice.ipynb` done.
7   -- Start writing paper: Introduction, state of the art, motivation, _etc._
  8 +- Start writing paper: Introduction, state of the art, motivation, key problems, _etc._
  9 + - Target Conferences
  10 + - KR;
  11 + - [ICLP](https://waset.org/language-planning-conference-in-april-2023-in-lisbon);
  12 + - [ECAI](https://ecai2023.eu/)
8 13 - Next task for prototype:
9 14 - Get stable models from potassco/s(casp)
10 15 - other?
... ...