diff --git a/app/specs/emma-annotations/spec.json b/app/specs/emma-annotations/spec.json new file mode 100644 index 00000000..7d46908c --- /dev/null +++ b/app/specs/emma-annotations/spec.json @@ -0,0 +1,350 @@ +{ + "name": "emma-annotations", + "comment": "The Prism's reader of what its person says to it (app/src/PrismEmma.lex.tex), held to W3C EMMA 1.0. Every prompt or gesture is one EMMA document; the request 'check' and a line end, then a document, answers 'malformed' when it is not well-formed namespace-aware XML, else 'conforms' or 'violates' with the Implementation Report Plan assertions it breaks, then ';' and the assertions whose features it shows. The second set of the emma guest's acceptance vectors: the documents of sections 4.2 to Appendix C of the Recommendation app/specs/emma/spec.json pins, listed and carried the same way.", + "documents": [ + { + "example": 34, + "sha256": "8f59de5423bfa95fd0833012ffeef5664c4b03baa036b7314579988b8b1b944a", + "answer": "conforms; 100 200 910 1201 2300 2310" + }, + { + "example": 35, + "sha256": "cfef200b37634f53628bd4cd46f18a541e8a0e9d308382e77eaa15cb60c825c3", + "answer": "conforms; 100 200 901 910 911 1300 2300 2310" + }, + { + "example": 36, + "sha256": "8955865060e21d6d0d392011cda515577cd2629acf5fc6d6219dce2da9438617", + "answer": "conforms; 100 200 910 1400 2300 2310" + }, + { + "example": 37, + "sha256": "a748628ff1ab4d94fb44c24ea32fb45ead1c9b35fb480928e900c56b0f447fe7", + "answer": "conforms; 100 200 910 1500 2300 2310" + }, + { + "example": 38, + "sha256": "054e6b09838be58144cbd904a15ae6856e824fc6259dadc79462bd033386e6cb", + "answer": "conforms; 100 200 910 1201 1300 1500 2300 2310" + }, + { + "example": 39, + "sha256": "ee9d0fe1d31f8969ee5a18d44216504b7ab33ee5593eea1f38ecbc88862edfd7", + "answer": "conforms; 100 200 910 1600 2300 2310" + }, + { + "example": 40, + "sha256": "b761d99acccfe9f60882586ce42b7d05bb402f5fd59191f503a0cb63b20a1ca6", + "answer": "conforms; 100 200 910 1600 2300 2310" + }, + { + "example": 41, + "sha256": "4cdc0bf89fe3b4ac5e93eae07e909f6413c3da9283dabea17b1e81b9d4558714", + "answer": "conforms; 100 200 910 1600 2300 2310" + }, + { + "example": 42, + "sha256": "d1dae9b8bf5cc9c411e10fbbc3b00a8ee2a9e42fbbc00b9dfa3ebcd8ddd69698", + "answer": "conforms; 100 200 910 1600 2300 2310" + }, + { + "example": 43, + "sha256": "d96de88c7abb71033ee168cc9455c82794218f68062775e4ba34866a313ff5e7", + "answer": "conforms; 100 200 910 1600 2300 2310" + }, + { + "example": 44, + "sha256": "ff6b5991dc6907c1a5dcbcd84a571d8dc09be41a42974be9bd02bad28df68f19", + "answer": "conforms; 100 200 910 1201 1600 2300 2310" + }, + { + "example": 45, + "sha256": "65b361665bf6d0f7974030e70b05c4f50096e119f94d338cf9e44d50c3c7377f", + "answer": "conforms; 100 200 910 1700 2300 2310" + }, + { + "example": 46, + "sha256": "31e53ea6026438edfff0a4d4fde547bce1b87a0c13e7eb4b3e960448f0c092bb", + "answer": "conforms; 100 200 910 1500 1700 1701 2204 2300 2310 2320" + }, + { + "example": 47, + "sha256": "e1a729f5ed5937d0e118dc07f1a041a832285ace6a6e2cf47b0378d284ce7e33", + "answer": "conforms; 100 200 910 1700 1800 2300 2310" + }, + { + "example": 48, + "sha256": "97a72683b4fd742711b78e0dc7fad701a2b6ed4d81dd6174e9690140f5d0b31f", + "answer": "conforms; 100 200 300 910 1900 2300 2310" + }, + { + "example": 49, + "sha256": "771ee7f3b32d137f95c822928ca1fe85ee16308d409a905d25f4ea6eaf394884", + "answer": "conforms; 100 200 910 1900 2300 2310" + }, + { + "example": 50, + "sha256": "870fc7685d8e2312a11fb199fb4ee8667cdae6b9f2547d4e1eb0a46836fac5f7", + "answer": "conforms; 100 200 300 910 2000 2300 2310" + }, + { + "example": 51, + "sha256": "d2901e3fb69c71def2a00f8bb40f8b4cf74b03dffcea2844527d470d22c11533", + "answer": "conforms; 100 200 910 2100 2101 2300 2310" + }, + { + "example": 52, + "sha256": "312dbd2f465399f2b1012d00b5d25408bd0e5ead38316d2c59ed158bbbc26dd0", + "answer": "conforms; 100 200 500 910 2201 2202 2203 2300 2310" + }, + { + "example": 53, + "sha256": "4d059f9e7b826cff6408494b486b462635ea4eef8ad7db23a560d995d617b1a3", + "answer": "conforms; 100 200 910 2204 2300 2310" + }, + { + "example": 58, + "sha256": "9dd987baa600257c24b60d34bb127fb9912ca3da46e7c928a2ef4f3dbf5e7990", + "answer": "conforms; 100 200 300 910 1900 2300 2310 2320 2330" + }, + { + "example": 59, + "sha256": "150dc744806795863657f304a9ab096c349be410d63a53c426d6a7f141637f52", + "answer": "conforms; 100 200 300 910 1900 2300 2310 2320 2330" + }, + { + "example": 60, + "sha256": "001a8a885137fcf67f663be7f9640de7259489a4f01b5c3c4e6934da79799d29", + "answer": "conforms; 100 200 910 2300 2310 2401" + }, + { + "example": 61, + "sha256": "c58d2ac359ff4ab353acfbc1b29cb2a9d15dcc3fb3b3f605e45da6fc9a5abf25", + "answer": "conforms; 100 200 300 910 2300 2310 2500" + }, + { + "example": 62, + "sha256": "0f104d2855628a9496fb34c64f74be9d1c70983c2064d52218095e82967486a8", + "answer": "conforms; 100 200 400 910 1800 2100 2101 2300 2310 2700 2701 2710 2711 2713 2714 2715 2716 2717 2718" + }, + { + "example": 63, + "sha256": "46bcf68eed3b477a5e9eac5a6401647c4893b7b4ac3057ddddfc68e5e8c5dfee", + "answer": "conforms; 100 200 300 910 1000 2300 2310" + }, + { + "example": 64, + "sha256": "7b31aa7804d2e0dece20ce5e4ca2bee50d224bcdff01ff72a0a974aedabd9cff", + "answer": "conforms; 100 200 300 800 910 2300 2310" + }, + { + "example": 65, + "sha256": "e5a468e22b3a2a7a892129e44809328b177cba453f4c540bd52e3aa66a09ee5e", + "answer": "malformed" + }, + { + "example": 66, + "sha256": "78a8aa08efb6704e20ed22be857bf0901f8845f05cb0c47d47d360462b9cc44f", + "answer": "conforms; 100 200 901 910 911 1300 2300 2310" + }, + { + "example": 67, + "sha256": "a1e13b1744359a40d5a8ed1d267985baa4b5ae4ecadd366ac5a4978dca30d305", + "answer": "conforms; 100 200 901 910 911 1201 1300 1600 1700 1900 2000 2300 2310 2320 2330" + }, + { + "example": 68, + "sha256": "6742dfe703ff4ad856b367e04c01ea93541b9dce352719a8559748ace3240f69", + "answer": "conforms; 100 200 901 910 911 1201 1300 1600 1700 1900 2000 2300 2310 2320 2330" + }, + { + "example": 69, + "sha256": "da2f57956b450d6b525c8ca768ac2beba7701e8fc0bea12669376dcfd15234ba", + "answer": "conforms; 100 200 901 910 1201 1300 1600 1700 1900 2000 2100 2101 2300 2310 2320 2330" + }, + { + "example": 73, + "sha256": "2de1a25f9262c3864f0ef1c50809b65d742d4634bd20336e17217dad2b78579a", + "answer": "conforms; 100 200 910 2300 2310 2401" + }, + { + "example": 74, + "sha256": "b6d1d548862792d9370206fc0097309a4c1b2b9c78952f28bde0d54919bab662", + "answer": "conforms; 100 200 910 2300 2310" + }, + { + "example": 75, + "sha256": "210dafd51e17f420d2ed2bd81a4573dbb970d9fed1f57dff3d68e609a5c4d953", + "answer": "conforms; 100 200 901 910 1300 2300 2310" + }, + { + "example": 76, + "sha256": "baacf967cbf91821ca2846655496d6b2285fa1e8ffd89d062fb78a2c9ec19339", + "answer": "conforms; 100 200 910 1201 2100 2101 2300 2310 2401" + }, + { + "example": 77, + "sha256": "07285db4c5a626711c670426e62a85a7d4097eecf02d96df8a47b31116a42089", + "answer": "malformed" + }, + { + "example": 78, + "sha256": "daa251c800cdb3fd348506ea6cfeffd4bc14f9e9d1cf6304238cb81162bf66dd", + "answer": "conforms; 100 200 901 910 1201 1300 2100 2101 2300 2310" + } + ], + "examples": [ + [ + "check\n\r\n\r\n \r\n Cambridge\r\n London\r\n 20030315\r\n \r\n\r\n", + "conforms; 100 200 910 1201 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n \r\n From Boston to Denver tomorrow\r\n \r\n\r\n \r\n Boston\r\n Denver\r\n tomorrow\r\n \r\n \r\n \r\n\r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n \r\n\r\n", + "conforms; 100 200 901 910 911 1300 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n\r\n", + "conforms; 100 200 910 1400 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n\r\n", + "conforms; 100 200 910 1500 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n\r\n", + "conforms; 100 200 910 1201 1300 1500 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n arretez\r\n \r\n\r\n", + "conforms; 100 200 910 1600 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n \r\n area\r\n 42.1345 -37.128 42.1346 -37.120 ... \r\n \r\n \r\n\r\n", + "conforms; 100 200 910 1600 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n condizionatore\r\n \r\n\r\n\r\n", + "conforms; 100 200 910 1600 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n air conditioner\r\n \r\n\r\n", + "conforms; 100 200 910 1600 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n id1456\r\n \r\n\r\n", + "conforms; 100 200 910 1600 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n CANCEL \r\n \r\n\r\n", + "conforms; 100 200 910 1201 1600 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "conforms; 100 200 910 1700 2300 2310" + ], + [ + "check\n\r\n\r\n\r\n \r\n \r\n\r\n\r\n", + "conforms; 100 200 910 1500 1700 1701 2204 2300 2310 2320" + ], + [ + "check\n\r\n\r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "conforms; 100 200 910 1700 1800 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin \r\n \r\n \r\n\r\n", + "conforms; 100 200 300 910 1900 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n Boston\r\n Austin \r\n \r\n\r\n", + "conforms; 100 200 910 1900 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin\r\n \r\n \r\n\r\n", + "conforms; 100 200 300 910 2000 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n Chicago\r\n \r\n\r\n", + "conforms; 100 200 910 2100 2101 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n \r\n Denver\r\n \r\n \r\n Chicago\r\n \r\n \r\n\r\n", + "conforms; 100 200 500 910 2201 2202 2203 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n Denver\r\n \r\n\r\n", + "conforms; 100 200 910 2204 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n 45\r\n \r\n \r\n\r\n", + "conforms; 100 200 300 910 1900 2300 2310 2320 2330" + ], + [ + "check\n\r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin\r\n \r\n \r\n\r\n", + "conforms; 100 200 300 910 1900 2300 2310 2320 2330" + ], + [ + "check\n\r\n\r\n \r\n \r\n zoom\r\n \r\n area\r\n \r\n \r\n \r\n\r\n", + "conforms; 100 200 910 2300 2310 2401" + ], + [ + "check\n\r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin \r\n \r\n \r\n\r\n", + "conforms; 100 200 300 910 2300 2310 2500" + ], + [ + "check\n\r\n\r\n \r\n \r\n SIP\r\n \r\n\r\n \r\n SIP\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n Chicago\r\n \r\n\r\n \r\n \r\n area\r\n 34.13 -37.12 42.13 -37.12 ... \r\n \r\n \r\n \r\n\r\n", + "conforms; 100 200 400 910 1800 2100 2101 2300 2310 2700 2701 2710 2711 2713 2714 2715 2716 2717 2718" + ], + [ + "check\n\r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin\r\n \r\n\r\n \r\n help\r\n \r\n \r\n\r\n", + "conforms; 100 200 300 910 1000 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin\r\n \r\n\r\n \r\n help\r\n \r\n \r\n\r\n", + "conforms; 100 200 300 800 910 2300 2310" + ], + [ + "check\n\r\n\r\n\r\n \r\n 3\r\n \r\n\r\n", + "malformed" + ], + [ + "check\n\r\n\r\n \r\n \r\n From Boston to Denver tomorrow\r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n tomorrow\r\n \r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "conforms; 100 200 901 910 911 1300 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n \r\n From Boston to Denver tomorrow\r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n tomorrow\r\n \r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "conforms; 100 200 901 910 911 1201 1300 1600 1700 1900 2000 2300 2310 2320 2330" + ], + [ + "check\n\r\n\r\n \r\n \r\n From Boston to Denver tomorrow\r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n tomorrow\r\n \r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "conforms; 100 200 901 910 911 1201 1300 1600 1700 1900 2000 2300 2310 2320 2330" + ], + [ + "check\n\r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "conforms; 100 200 901 910 1201 1300 1600 1700 1900 2000 2100 2101 2300 2310 2320 2330" + ], + [ + "check\n\r\n\r\n \r\n \r\n zoom\r\n \r\n area\r\n \r\n \r\n \r\n\r\n", + "conforms; 100 200 910 2300 2310 2401" + ], + [ + "check\n\r\n\r\n \r\n \r\n area\r\n 42.1345 -37.128 42.1346 -37.120 ... \r\n \r\n \r\n\r\n\r\n", + "conforms; 100 200 910 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n \r\n \r\n \r\n zoom\r\n \r\n area\r\n 42.1345 -37.128 42.1346 -37.120 ... \r\n \r\n \r\n \r\n\r\n", + "conforms; 100 200 901 910 1300 2300 2310" + ], + [ + "check\n\r\n\r\n \r\n \r\n send\r\n \r\n \r\n file\r\n 1\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n\r\n", + "conforms; 100 200 910 1201 2100 2101 2300 2310 2401" + ], + [ + "check\n\r\n\r\n \r\n \r\n \r\n file\r\n 1\r\n test.pdf\r\n \r\n \r\n \r\n \r\n printer\r\n 1\r\n lpt1\r\n \r\n \r\n \r\n\r\n", + "malformed" + ], + [ + "check\n\r\n\r\n\r\n \r\n \r\n \r\n send\r\n \r\n \r\n file\r\n 1\r\n test.pdf\r\n \r\n \r\n \r\n \r\n printer\r\n 1\r\n lpt1\r\n \r\n \r\n \r\n\r\n\r\n", + "conforms; 100 200 901 910 1201 1300 2100 2101 2300 2310" + ] + ] +} diff --git a/app/specs/emma-input/spec.json b/app/specs/emma-input/spec.json new file mode 100644 index 00000000..20d7bfa9 --- /dev/null +++ b/app/specs/emma-input/spec.json @@ -0,0 +1,148 @@ +{ + "name": "emma-input", + "comment": "The emma guest (app/src/PrismEmma.lex.tex) answers three requests, each a verb, a line end and a body. 'check' and a document answers 'malformed', or 'conforms' or 'violates' with assertion ids. 'read' and a document answers 'malformed', 'other' when the document is not one the writer writes, else its lines. 'input' and lines answers the document those lines describe, 'invalid' when the lines are not in the grammar, or 'refused' and the checker's report when the document they describe would break an assertion: the writer never answers a document its own checker faults. The lines: 'ns ' first, when the payload has a namespace; 'stage ' opens an interpretation inside emma:derivation, 'best ' the interpretation (or emma:one-of member) that is a child of emma:emma, 'choice ' an emma:one-of; 'set ' gives the open element an emma: annotation; 'from ' or 'from composite' an emma:derived-from; 'field ' a payload element, which 'set' lines then annotate and 'attr ' lines give attributes ('attr xmlns ' its own namespace, 'attr xml: ' an attribute of XML's own); 'literal ' an emma:literal. No document of the Recommendation that has the writer's shape carries an 'attr' line, so no vector here holds that line. Values write a backslash, line feed, carriage return and tab as two characters. This set: 'input' of the lines read from each of those 28 documents of the Recommendation. Each answer is the same document as the Recommendation's, written densely: the same elements, attributes and text to a conforming XML parser outside the guest.", + "documents": [ + 0, + 4, + 20, + 21, + 23, + 24, + 25, + 26, + 34, + 35, + 36, + 37, + 38, + 39, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 53, + 58, + 66, + 67, + 68, + 69 + ], + "examples": [ + [ + "input\nns http://www.example.com/example\nchoice r1\nset start 1087995961542\nset end 1087995963542\nset medium acoustic\nset mode voice\nbest int1\nset confidence 0.75\nset tokens flights from boston to denver\nfield origin Boston\nfield destination Denver\nbest int2\nset confidence 0.68\nset tokens flights from austin to denver\nfield origin Austin\nfield destination Denver", + "BostonDenverAustinDenver" + ], + [ + "input\nns http://www.example.com/example\nchoice r1\nset medium acoustic\nset mode voice\nbest int1\nfield origin Boston\nfield destination Denver\nfield date 03112003\nbest int2\nfield origin Austin\nfield destination Denver\nfield date 03112003", + "BostonDenver03112003AustinDenver03112003" + ], + [ + "input\nbest r1\nset medium acoustic\nset mode voice\nliteral boston", + "boston" + ], + [ + "input\nbest r1\nset medium acoustic\nset mode voice\nliteral flights to san francisco", + "flights to san francisco" + ], + [ + "input\nns http://www.example.com/example\nbest raw\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow", + "From Boston to Denver tomorrow" + ], + [ + "input\nns http://www.example.com/example\nbest better\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date tomorrow", + "BostonDenvertomorrow" + ], + [ + "input\nns http://www.example.com/example\nbest best\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date 20030315", + "BostonDenver20030315" + ], + [ + "input\nns http://www.example.com/example\nstage raw\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow\nstage better\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 20030315", + "From Boston to Denver tomorrowBostonDenvertomorrowBostonDenver20030315" + ], + [ + "input\nns http://www.example.com/example\nbest int1\nset tokens From Cambridge to London tomorrow\nset medium acoustic\nset mode voice\nfield origin Cambridge\nset tokens From Cambridge\nfield destination London\nset tokens to London\nfield date 20030315\nset tokens tomorrow", + "CambridgeLondon20030315" + ], + [ + "input\nns http://www.example.com/example\nstage raw\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mysemproc1.xml\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nfrom raw\nbest best\nset process http://example.com/mysemproc2.xml\nfield origin Boston\nfield destination Denver\nfield date 03152003\nfrom better", + "From Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003" + ], + [ + "input\nbest int1\nset no-input true\nset medium acoustic\nset mode voice", + "" + ], + [ + "input\nbest interp1\nset uninterpreted true\nset medium acoustic\nset mode voice", + "" + ], + [ + "input\nbest understanding\nset process http://example.com/mynlu.xml\nset uninterpreted true\nset tokens From Cambridge to London tomorrow\nset medium acoustic\nset mode voice", + "" + ], + [ + "input\nns http://www.example.com/example\nbest int1\nset lang fr\nset medium acoustic\nset mode voice\nfield answer arretez", + "arretez" + ], + [ + "input\nns http://www.example.com/example\nbest int1\nset tokens please stop arretez s'il vous plait\nset lang en fr\nset medium acoustic\nset mode voice\nfield command CANCEL ", + " CANCEL " + ], + [ + "input\nns http://www.example.com/example\nbest intp1\nset signal http://example.com/signals/sg23.bin\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date 03152003", + "BostonDenver03152003" + ], + [ + "input\nbest intp1\nset medium acoustic\nset mode voice\nset function recording\nset uninterpreted true\nset signal http://example.com/signals/recording.mpg\nset signal-size 82102\nset duration 10000", + "" + ], + [ + "input\nns http://www.example.com/example\nbest intp1\nset signal http://example.com/signals/signal.dsr\nset media-type audio/dsr-es202212; rate:8000; maxptime:40\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date 03152003", + "BostonDenver03152003" + ], + [ + "input\nns http://www.example.com/example\nchoice nbest1\nset medium acoustic\nset mode voice\nbest meaning1\nset confidence 0.6\nfield location Boston\nbest meaning2\nset confidence 0.4\nfield location Austin ", + "Boston Austin " + ], + [ + "input\nns http://www.example.com/example\nbest meaning1\nset confidence 0.6\nset medium acoustic\nset mode voice\nfield destination Boston\nset confidence 0.8\nfield origin Austin \nset confidence 0.6", + " Boston Austin " + ], + [ + "input\nns http://www.example.com/myapp\nchoice nbest1\nset medium acoustic\nset mode voice\nbest intp1\nset source http://example.com/microphone/NC-61\nfield destination Boston\nbest intp2\nset source http://example.com/microphone/NC-4024\nfield destination Austin", + "BostonAustin" + ], + [ + "input\nns http://www.example.com/example\nbest int1\nset start 1087995961542\nset end 1087995963542\nset medium acoustic\nset mode voice\nfield destination Chicago", + "Chicago" + ], + [ + "input\nns http://www.example.com/example\nbest int1\nset duration 2300\nset medium acoustic\nset mode voice\nfield origin Denver", + "Denver" + ], + [ + "input\nns http://www.example.com/example\nchoice nbest1\nbest interp1\nset confidence 0.6\nset medium tactile\nset mode ink\nset function dialog\nset verbal true\nfield location Boston\nbest interp2\nset confidence 0.4\nset medium tactile\nset mode ink\nset function dialog\nset verbal false\nfield direction 45", + "Boston45" + ], + [ + "input\nns http://www.example.com/example\nstage raw\nset process http://example.com/myasr1.xml\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mynlu1.xml\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nset process http://example.com/myrefresolution1.xml\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003", + "From Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003" + ], + [ + "input\nns http://www.example.com/example\nstage raw\nset process http://example.com/myasr1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.6\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mynlu1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.8\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nset process http://example.com/myrefresolution1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.8\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003", + "From Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003" + ], + [ + "input\nns http://www.example.com/example\nstage raw\nset process http://example.com/myasr1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.6\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mynlu1.xml\nset confidence 0.8\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nset process http://example.com/myrefresolution1.xml\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003", + "From Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003" + ], + [ + "input\nns http://www.example.com/example\nbest best\nset start 1087995961542\nset end 1087995963542\nset process http://example.com/myrefresolution1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.8\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003", + "BostonDenver03152003" + ] + ] +} diff --git a/app/specs/emma-other-annotations/spec.json b/app/specs/emma-other-annotations/spec.json new file mode 100644 index 00000000..22d9a6c0 --- /dev/null +++ b/app/specs/emma-other-annotations/spec.json @@ -0,0 +1,98 @@ +{ + "name": "emma-other-annotations", + "comment": "The emma guest (app/src/PrismEmma.lex.tex) answers three requests, each a verb, a line end and a body. 'check' and a document answers 'malformed', or 'conforms' or 'violates' with assertion ids. 'read' and a document answers 'malformed', 'other' when the document is not one the writer writes, else its lines. 'input' and lines answers the document those lines describe, 'invalid' when the lines are not in the grammar, or 'refused' and the checker's report when the document they describe would break an assertion: the writer never answers a document its own checker faults. The lines: 'ns ' first, when the payload has a namespace; 'stage ' opens an interpretation inside emma:derivation, 'best ' the interpretation (or emma:one-of member) that is a child of emma:emma, 'choice ' an emma:one-of; 'set ' gives the open element an emma: annotation; 'from ' or 'from composite' an emma:derived-from; 'field ' a payload element, which 'set' lines then annotate and 'attr ' lines give attributes ('attr xmlns ' its own namespace, 'attr xml: ' an attribute of XML's own); 'literal ' an emma:literal. No document of the Recommendation that has the writer's shape carries an 'attr' line, so no vector here holds that line. Values write a backslash, line feed, carriage return and tab as two characters. This set: 'read' of the Recommendation's documents of sections 4.2 to Appendix C that do not have the writer's shape: 'other', or 'malformed' for the ones not well-formed as published.", + "documents": [ + 40, + 41, + 42, + 43, + 52, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 73, + 74, + 75, + 76, + 77, + 78 + ], + "examples": [ + [ + "read\n\r\n\r\n \r\n \r\n area\r\n 42.1345 -37.128 42.1346 -37.120 ... \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n condizionatore\r\n \r\n\r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n air conditioner\r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n id1456\r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n Denver\r\n \r\n \r\n Chicago\r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin\r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n zoom\r\n \r\n area\r\n \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n SIP\r\n \r\n\r\n \r\n SIP\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n Chicago\r\n \r\n\r\n \r\n \r\n area\r\n 34.13 -37.12 42.13 -37.12 ... \r\n \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin\r\n \r\n\r\n \r\n help\r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin\r\n \r\n\r\n \r\n help\r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n\r\n \r\n 3\r\n \r\n\r\n", + "malformed" + ], + [ + "read\n\r\n\r\n \r\n \r\n zoom\r\n \r\n area\r\n \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n area\r\n 42.1345 -37.128 42.1346 -37.120 ... \r\n \r\n \r\n\r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n \r\n \r\n zoom\r\n \r\n area\r\n 42.1345 -37.128 42.1346 -37.120 ... \r\n \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n send\r\n \r\n \r\n file\r\n 1\r\n \r\n \r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n \r\n file\r\n 1\r\n test.pdf\r\n \r\n \r\n \r\n \r\n printer\r\n 1\r\n lpt1\r\n \r\n \r\n \r\n\r\n", + "malformed" + ], + [ + "read\n\r\n\r\n\r\n \r\n \r\n \r\n send\r\n \r\n \r\n file\r\n 1\r\n test.pdf\r\n \r\n \r\n \r\n \r\n printer\r\n 1\r\n lpt1\r\n \r\n \r\n \r\n\r\n\r\n", + "other" + ] + ] +} diff --git a/app/specs/emma-other/spec.json b/app/specs/emma-other/spec.json new file mode 100644 index 00000000..d9cdde8f --- /dev/null +++ b/app/specs/emma-other/spec.json @@ -0,0 +1,123 @@ +{ + "name": "emma-other", + "comment": "The emma guest (app/src/PrismEmma.lex.tex) answers three requests, each a verb, a line end and a body. 'check' and a document answers 'malformed', or 'conforms' or 'violates' with assertion ids. 'read' and a document answers 'malformed', 'other' when the document is not one the writer writes, else its lines. 'input' and lines answers the document those lines describe, 'invalid' when the lines are not in the grammar, or 'refused' and the checker's report when the document they describe would break an assertion: the writer never answers a document its own checker faults. The lines: 'ns ' first, when the payload has a namespace; 'stage ' opens an interpretation inside emma:derivation, 'best ' the interpretation (or emma:one-of member) that is a child of emma:emma, 'choice ' an emma:one-of; 'set ' gives the open element an emma: annotation; 'from ' or 'from composite' an emma:derived-from; 'field ' a payload element, which 'set' lines then annotate and 'attr ' lines give attributes ('attr xmlns ' its own namespace, 'attr xml: ' an attribute of XML's own); 'literal ' an emma:literal. No document of the Recommendation that has the writer's shape carries an 'attr' line, so no vector here holds that line. Values write a backslash, line feed, carriage return and tab as two characters. This set: 'read' of the Recommendation's documents of sections 2 to 4.1 that do not have the writer's shape (groups, sequences, lattices, nested payloads, endpoint and grammar references): 'other', or 'malformed' for the ones not well-formed as published.", + "documents": [ + 1, + 3, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 22, + 27, + 28, + 29, + 30, + 31, + 32 + ], + "examples": [ + [ + "read\n\r\n\r\n ....\r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n ...\r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n\r\n \r\n \r\n \r\n boston\r\n \r\n \r\n boston\r\n \r\n \r\n \r\n \r\n austin\r\n \r\n \r\n austin\r\n \r\n \r\n \r\n\r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n\r\n \r\n \r\n boston\r\n \r\n \r\n boston\r\n \r\n \r\n austin\r\n \r\n \r\n austin\r\n \r\n \r\n\r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n move\r\n ambulance\r\n here\r\n \r\n\r\n \r\n 0.253\r\n 0.124\r\n \r\n\r\n \r\n 0.866\r\n 0.724\r\n \r\n \r\n\r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n temporal\r\n 2s\r\n \r\n\r\n \r\n 0.253\r\n 0.124\r\n \r\n\r\n \r\n 0.866\r\n 0.724\r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n \r\n 0.253\r\n 0.124\r\n \r\n\r\n \r\n 0.866\r\n 0.724\r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n 0.253\r\n 0.124\r\n \r\n\r\n \r\n 0.866\r\n 0.724\r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n move\r\n this-battleship\r\n here\r\n \r\n\r\n \r\n \r\n 0.253\r\n 0.124\r\n \r\n\r\n \r\n 0.866\r\n 0.724\r\n \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n flights\r\n\r\n to\r\n boston\r\n austin\r\n from\r\n\r\n portland\r\n oakland\r\n today\r\n please\r\n\r\n tomorrow\r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n flights to boston from portland today please\r\n \r\n\r\n \r\n flights to boston from portland tomorrow\r\n \r\n\r\n \r\n flights to austin from portland today please\r\n \r\n\r\n \r\n flights to austin from portland tomorrow\r\n \r\n\r\n \r\n flights to boston from oakland today please\r\n \r\n\r\n \r\n flights to boston from oakland tomorrow\r\n \r\n\r\n \r\n flights to austin from oakland today please\r\n \r\n\r\n \r\n flights to austin from oakland tomorrow\r\n \r\n \r\n\r\n", + "malformed" + ], + [ + "read\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n \r\n flights\r\n \r\n\r\n \r\n to\r\n \r\n\r\n \r\n boston\r\n \r\n\r\n \r\n austin\r\n \r\n ...\r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n \r\n flights\r\n \r\n \r\n to\r\n \r\n\r\n \r\n boston\r\n \r\n \r\n austin\r\n \r\n ...\r\n \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n\r\n \r\n \r\n \r\n flights\r\n \r\n \r\n to\r\n \r\n\r\n \r\n boston\r\n \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n London \r\n UK \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n destination\r\n \r\n\r\n \r\n Boston\r\n \r\n \r\n\r\n \r\n Boston\r\n \r\n\r\n", + "malformed" + ], + [ + "read\n\r\n\r\n \r\n \r\n \r\n from boston to denver on march eleven two thousand three\r\n \r\n\r\n \r\n from austin to denver on march eleven two thousand three\r\n \r\n \r\n\r\n\r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 03112003\r\n \r\n\r\n \r\n Austin\r\n Denver\r\n 03112003\r\n \r\n\r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n \r\n Boston\r\n Denver\r\n 03112003\r\n \r\n\r\n \r\n \r\n Austin\r\n Denver\r\n 03112003\r\n \r\n \r\n \r\n \r\n \r\n from boston to denver on march eleven two thousand three\r\n \r\n\r\n \r\n from austin to denver on march eleven two thousand three\r\n \r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin\r\n \r\n\r\n \r\n help\r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n 2121234567\r\n NY\r\n \r\n\r\n residential\r\n acme_travel_service\r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 03112003\r\n \r\n\r\n \r\n Austin\r\n Denver\r\n 03112003\r\n \r\n \r\n\r\n", + "other" + ], + [ + "read\n\r\n\r\n \r\n \r\n SIP\r\n \r\n\r\n \r\n SIP\r\n \r\n \r\n\r\n \r\n Chicago\r\n \r\n\r\n", + "other" + ] + ] +} diff --git a/app/specs/emma-read/spec.json b/app/specs/emma-read/spec.json new file mode 100644 index 00000000..5a4b1b51 --- /dev/null +++ b/app/specs/emma-read/spec.json @@ -0,0 +1,148 @@ +{ + "name": "emma-read", + "comment": "The emma guest (app/src/PrismEmma.lex.tex) answers three requests, each a verb, a line end and a body. 'check' and a document answers 'malformed', or 'conforms' or 'violates' with assertion ids. 'read' and a document answers 'malformed', 'other' when the document is not one the writer writes, else its lines. 'input' and lines answers the document those lines describe, 'invalid' when the lines are not in the grammar, or 'refused' and the checker's report when the document they describe would break an assertion: the writer never answers a document its own checker faults. The lines: 'ns ' first, when the payload has a namespace; 'stage ' opens an interpretation inside emma:derivation, 'best ' the interpretation (or emma:one-of member) that is a child of emma:emma, 'choice ' an emma:one-of; 'set ' gives the open element an emma: annotation; 'from ' or 'from composite' an emma:derived-from; 'field ' a payload element, which 'set' lines then annotate and 'attr ' lines give attributes ('attr xmlns ' its own namespace, 'attr xml: ' an attribute of XML's own); 'literal ' an emma:literal. No document of the Recommendation that has the writer's shape carries an 'attr' line, so no vector here holds that line. Values write a backslash, line feed, carriage return and tab as two characters. This set: 'read' of each of the 28 documents of the Recommendation (pinned in app/specs/emma/spec.json, same ordinals) that already have the writer's shape: interpretations with flat payload fields (annotated or not) or a literal, alone, in one emma:one-of, or staged through emma:derivation. The lines were also reached by a conforming XML parser reading the same bytes, outside the guest.", + "documents": [ + 0, + 4, + 20, + 21, + 23, + 24, + 25, + 26, + 34, + 35, + 36, + 37, + 38, + 39, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 53, + 58, + 66, + 67, + 68, + 69 + ], + "examples": [ + [ + "read\n\r\n\r\n \r\n \r\n Boston\r\n Denver\r\n \r\n\r\n \r\n Austin\r\n Denver\r\n \r\n \r\n\r\n", + "ns http://www.example.com/example\nchoice r1\nset start 1087995961542\nset end 1087995963542\nset medium acoustic\nset mode voice\nbest int1\nset confidence 0.75\nset tokens flights from boston to denver\nfield origin Boston\nfield destination Denver\nbest int2\nset confidence 0.68\nset tokens flights from austin to denver\nfield origin Austin\nfield destination Denver" + ], + [ + "read\n\r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 03112003\r\n \r\n\r\n \r\n Austin\r\n Denver\r\n 03112003\r\n \r\n \r\n\r\n", + "ns http://www.example.com/example\nchoice r1\nset medium acoustic\nset mode voice\nbest int1\nfield origin Boston\nfield destination Denver\nfield date 03112003\nbest int2\nfield origin Austin\nfield destination Denver\nfield date 03112003" + ], + [ + "read\n\r\n\r\n \r\n boston\r\n \r\n\r\n", + "best r1\nset medium acoustic\nset mode voice\nliteral boston" + ], + [ + "read\n\r\n\r\n \r\n flights to san francisco\r\n \r\n\r\n", + "best r1\nset medium acoustic\nset mode voice\nliteral flights to san francisco" + ], + [ + "read\n\r\n\r\n \r\n From Boston to Denver tomorrow\r\n \r\n\r\n\r\n", + "ns http://www.example.com/example\nbest raw\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow" + ], + [ + "read\n\r\n\r\n \r\n Boston\r\n Denver\r\n tomorrow\r\n \r\n\r\n", + "ns http://www.example.com/example\nbest better\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date tomorrow" + ], + [ + "read\n\r\n\r\n \r\n Boston\r\n Denver\r\n 20030315\r\n \r\n\r\n", + "ns http://www.example.com/example\nbest best\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date 20030315" + ], + [ + "read\n\r\n\r\n \r\n \r\n From Boston to Denver tomorrow\r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n tomorrow\r\n \r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 20030315\r\n \r\n\r\n", + "ns http://www.example.com/example\nstage raw\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow\nstage better\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 20030315" + ], + [ + "read\n\r\n\r\n \r\n Cambridge\r\n London\r\n 20030315\r\n \r\n\r\n", + "ns http://www.example.com/example\nbest int1\nset tokens From Cambridge to London tomorrow\nset medium acoustic\nset mode voice\nfield origin Cambridge\nset tokens From Cambridge\nfield destination London\nset tokens to London\nfield date 20030315\nset tokens tomorrow" + ], + [ + "read\n\r\n\r\n \r\n \r\n From Boston to Denver tomorrow\r\n \r\n\r\n \r\n Boston\r\n Denver\r\n tomorrow\r\n \r\n \r\n \r\n\r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n \r\n\r\n", + "ns http://www.example.com/example\nstage raw\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mysemproc1.xml\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nfrom raw\nbest best\nset process http://example.com/mysemproc2.xml\nfield origin Boston\nfield destination Denver\nfield date 03152003\nfrom better" + ], + [ + "read\n\r\n\r\n \r\n\r\n", + "best int1\nset no-input true\nset medium acoustic\nset mode voice" + ], + [ + "read\n\r\n\r\n \r\n\r\n", + "best interp1\nset uninterpreted true\nset medium acoustic\nset mode voice" + ], + [ + "read\n\r\n\r\n \r\n\r\n", + "best understanding\nset process http://example.com/mynlu.xml\nset uninterpreted true\nset tokens From Cambridge to London tomorrow\nset medium acoustic\nset mode voice" + ], + [ + "read\n\r\n\r\n \r\n arretez\r\n \r\n\r\n", + "ns http://www.example.com/example\nbest int1\nset lang fr\nset medium acoustic\nset mode voice\nfield answer arretez" + ], + [ + "read\n\r\n\r\n \r\n CANCEL \r\n \r\n\r\n", + "ns http://www.example.com/example\nbest int1\nset tokens please stop arretez s'il vous plait\nset lang en fr\nset medium acoustic\nset mode voice\nfield command CANCEL " + ], + [ + "read\n\r\n\r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "ns http://www.example.com/example\nbest intp1\nset signal http://example.com/signals/sg23.bin\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ], + [ + "read\n\r\n\r\n\r\n \r\n \r\n\r\n\r\n", + "best intp1\nset medium acoustic\nset mode voice\nset function recording\nset uninterpreted true\nset signal http://example.com/signals/recording.mpg\nset signal-size 82102\nset duration 10000" + ], + [ + "read\n\r\n\r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "ns http://www.example.com/example\nbest intp1\nset signal http://example.com/signals/signal.dsr\nset media-type audio/dsr-es202212; rate:8000; maxptime:40\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ], + [ + "read\n\r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin \r\n \r\n \r\n\r\n", + "ns http://www.example.com/example\nchoice nbest1\nset medium acoustic\nset mode voice\nbest meaning1\nset confidence 0.6\nfield location Boston\nbest meaning2\nset confidence 0.4\nfield location Austin " + ], + [ + "read\n\r\n\r\n \r\n Boston\r\n Austin \r\n \r\n\r\n", + "ns http://www.example.com/example\nbest meaning1\nset confidence 0.6\nset medium acoustic\nset mode voice\nfield destination Boston\nset confidence 0.8\nfield origin Austin \nset confidence 0.6" + ], + [ + "read\n\r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n Austin\r\n \r\n \r\n\r\n", + "ns http://www.example.com/myapp\nchoice nbest1\nset medium acoustic\nset mode voice\nbest intp1\nset source http://example.com/microphone/NC-61\nfield destination Boston\nbest intp2\nset source http://example.com/microphone/NC-4024\nfield destination Austin" + ], + [ + "read\n\r\n\r\n \r\n Chicago\r\n \r\n\r\n", + "ns http://www.example.com/example\nbest int1\nset start 1087995961542\nset end 1087995963542\nset medium acoustic\nset mode voice\nfield destination Chicago" + ], + [ + "read\n\r\n\r\n \r\n Denver\r\n \r\n\r\n", + "ns http://www.example.com/example\nbest int1\nset duration 2300\nset medium acoustic\nset mode voice\nfield origin Denver" + ], + [ + "read\n\r\n\r\n \r\n \r\n Boston\r\n \r\n\r\n \r\n 45\r\n \r\n \r\n\r\n", + "ns http://www.example.com/example\nchoice nbest1\nbest interp1\nset confidence 0.6\nset medium tactile\nset mode ink\nset function dialog\nset verbal true\nfield location Boston\nbest interp2\nset confidence 0.4\nset medium tactile\nset mode ink\nset function dialog\nset verbal false\nfield direction 45" + ], + [ + "read\n\r\n\r\n \r\n \r\n From Boston to Denver tomorrow\r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n tomorrow\r\n \r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "ns http://www.example.com/example\nstage raw\nset process http://example.com/myasr1.xml\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mynlu1.xml\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nset process http://example.com/myrefresolution1.xml\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ], + [ + "read\n\r\n\r\n \r\n \r\n From Boston to Denver tomorrow\r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n tomorrow\r\n \r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "ns http://www.example.com/example\nstage raw\nset process http://example.com/myasr1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.6\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mynlu1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.8\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nset process http://example.com/myrefresolution1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.8\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ], + [ + "read\n\r\n\r\n \r\n \r\n From Boston to Denver tomorrow\r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n tomorrow\r\n \r\n \r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "ns http://www.example.com/example\nstage raw\nset process http://example.com/myasr1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.6\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mynlu1.xml\nset confidence 0.8\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nset process http://example.com/myrefresolution1.xml\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ], + [ + "read\n\r\n\r\n \r\n \r\n Boston\r\n Denver\r\n 03152003\r\n \r\n\r\n", + "ns http://www.example.com/example\nbest best\nset start 1087995961542\nset end 1087995963542\nset process http://example.com/myrefresolution1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.8\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ] + ] +} diff --git a/app/specs/emma-written-check/spec.json b/app/specs/emma-written-check/spec.json new file mode 100644 index 00000000..f3a1a0fc --- /dev/null +++ b/app/specs/emma-written-check/spec.json @@ -0,0 +1,148 @@ +{ + "name": "emma-written-check", + "comment": "The emma guest (app/src/PrismEmma.lex.tex) answers three requests, each a verb, a line end and a body. 'check' and a document answers 'malformed', or 'conforms' or 'violates' with assertion ids. 'read' and a document answers 'malformed', 'other' when the document is not one the writer writes, else its lines. 'input' and lines answers the document those lines describe, 'invalid' when the lines are not in the grammar, or 'refused' and the checker's report when the document they describe would break an assertion: the writer never answers a document its own checker faults. The lines: 'ns ' first, when the payload has a namespace; 'stage ' opens an interpretation inside emma:derivation, 'best ' the interpretation (or emma:one-of member) that is a child of emma:emma, 'choice ' an emma:one-of; 'set ' gives the open element an emma: annotation; 'from ' or 'from composite' an emma:derived-from; 'field ' a payload element, which 'set' lines then annotate and 'attr ' lines give attributes ('attr xmlns ' its own namespace, 'attr xml: ' an attribute of XML's own); 'literal ' an emma:literal. No document of the Recommendation that has the writer's shape carries an 'attr' line, so no vector here holds that line. Values write a backslash, line feed, carriage return and tab as two characters. This set: 'check' of the 28 documents the writer answers for the Recommendation's own: each gets the verdict the Recommendation's document gets.", + "documents": [ + 0, + 4, + 20, + 21, + 23, + 24, + 25, + 26, + 34, + 35, + 36, + 37, + 38, + 39, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 53, + 58, + 66, + 67, + 68, + 69 + ], + "examples": [ + [ + "check\nBostonDenverAustinDenver", + "conforms; 100 200 300 910 1201 1900 2100 2101 2300 2310" + ], + [ + "check\nBostonDenver03112003AustinDenver03112003", + "conforms; 100 200 300 910 2300 2310" + ], + [ + "check\nboston", + "conforms; 100 200 700 910 2300 2310" + ], + [ + "check\nflights to san francisco", + "conforms; 100 200 700 910 2300 2310" + ], + [ + "check\nFrom Boston to Denver tomorrow", + "conforms; 100 200 910 2300 2310" + ], + [ + "check\nBostonDenvertomorrow", + "conforms; 100 200 910 2300 2310" + ], + [ + "check\nBostonDenver20030315", + "conforms; 100 200 910 2300 2310" + ], + [ + "check\nFrom Boston to Denver tomorrowBostonDenvertomorrowBostonDenver20030315", + "conforms; 100 200 901 910 911 2300 2310" + ], + [ + "check\nCambridgeLondon20030315", + "conforms; 100 200 910 1201 2300 2310" + ], + [ + "check\nFrom Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003", + "conforms; 100 200 901 910 911 1300 2300 2310" + ], + [ + "check\n", + "conforms; 100 200 910 1400 2300 2310" + ], + [ + "check\n", + "conforms; 100 200 910 1500 2300 2310" + ], + [ + "check\n", + "conforms; 100 200 910 1201 1300 1500 2300 2310" + ], + [ + "check\narretez", + "conforms; 100 200 910 1600 2300 2310" + ], + [ + "check\n CANCEL ", + "conforms; 100 200 910 1201 1600 2300 2310" + ], + [ + "check\nBostonDenver03152003", + "conforms; 100 200 910 1700 2300 2310" + ], + [ + "check\n", + "conforms; 100 200 910 1500 1700 1701 2204 2300 2310 2320" + ], + [ + "check\nBostonDenver03152003", + "conforms; 100 200 910 1700 1800 2300 2310" + ], + [ + "check\nBoston Austin ", + "conforms; 100 200 300 910 1900 2300 2310" + ], + [ + "check\n Boston Austin ", + "conforms; 100 200 910 1900 2300 2310" + ], + [ + "check\nBostonAustin", + "conforms; 100 200 300 910 2000 2300 2310" + ], + [ + "check\nChicago", + "conforms; 100 200 910 2100 2101 2300 2310" + ], + [ + "check\nDenver", + "conforms; 100 200 910 2204 2300 2310" + ], + [ + "check\nBoston45", + "conforms; 100 200 300 910 1900 2300 2310 2320 2330" + ], + [ + "check\nFrom Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003", + "conforms; 100 200 901 910 911 1300 2300 2310" + ], + [ + "check\nFrom Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003", + "conforms; 100 200 901 910 911 1201 1300 1600 1700 1900 2000 2300 2310 2320 2330" + ], + [ + "check\nFrom Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003", + "conforms; 100 200 901 910 911 1201 1300 1600 1700 1900 2000 2300 2310 2320 2330" + ], + [ + "check\nBostonDenver03152003", + "conforms; 100 200 901 910 1201 1300 1600 1700 1900 2000 2100 2101 2300 2310 2320 2330" + ] + ] +} diff --git a/app/specs/emma-written/spec.json b/app/specs/emma-written/spec.json new file mode 100644 index 00000000..6c6ac2aa --- /dev/null +++ b/app/specs/emma-written/spec.json @@ -0,0 +1,148 @@ +{ + "name": "emma-written", + "comment": "The emma guest (app/src/PrismEmma.lex.tex) answers three requests, each a verb, a line end and a body. 'check' and a document answers 'malformed', or 'conforms' or 'violates' with assertion ids. 'read' and a document answers 'malformed', 'other' when the document is not one the writer writes, else its lines. 'input' and lines answers the document those lines describe, 'invalid' when the lines are not in the grammar, or 'refused' and the checker's report when the document they describe would break an assertion: the writer never answers a document its own checker faults. The lines: 'ns ' first, when the payload has a namespace; 'stage ' opens an interpretation inside emma:derivation, 'best ' the interpretation (or emma:one-of member) that is a child of emma:emma, 'choice ' an emma:one-of; 'set ' gives the open element an emma: annotation; 'from ' or 'from composite' an emma:derived-from; 'field ' a payload element, which 'set' lines then annotate and 'attr ' lines give attributes ('attr xmlns ' its own namespace, 'attr xml: ' an attribute of XML's own); 'literal ' an emma:literal. No document of the Recommendation that has the writer's shape carries an 'attr' line, so no vector here holds that line. Values write a backslash, line feed, carriage return and tab as two characters. This set: the 28 documents the writer answers for the Recommendation's own, taken back in: 'read' of each gives the lines it was written from.", + "documents": [ + 0, + 4, + 20, + 21, + 23, + 24, + 25, + 26, + 34, + 35, + 36, + 37, + 38, + 39, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 53, + 58, + 66, + 67, + 68, + 69 + ], + "examples": [ + [ + "read\nBostonDenverAustinDenver", + "ns http://www.example.com/example\nchoice r1\nset start 1087995961542\nset end 1087995963542\nset medium acoustic\nset mode voice\nbest int1\nset confidence 0.75\nset tokens flights from boston to denver\nfield origin Boston\nfield destination Denver\nbest int2\nset confidence 0.68\nset tokens flights from austin to denver\nfield origin Austin\nfield destination Denver" + ], + [ + "read\nBostonDenver03112003AustinDenver03112003", + "ns http://www.example.com/example\nchoice r1\nset medium acoustic\nset mode voice\nbest int1\nfield origin Boston\nfield destination Denver\nfield date 03112003\nbest int2\nfield origin Austin\nfield destination Denver\nfield date 03112003" + ], + [ + "read\nboston", + "best r1\nset medium acoustic\nset mode voice\nliteral boston" + ], + [ + "read\nflights to san francisco", + "best r1\nset medium acoustic\nset mode voice\nliteral flights to san francisco" + ], + [ + "read\nFrom Boston to Denver tomorrow", + "ns http://www.example.com/example\nbest raw\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow" + ], + [ + "read\nBostonDenvertomorrow", + "ns http://www.example.com/example\nbest better\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date tomorrow" + ], + [ + "read\nBostonDenver20030315", + "ns http://www.example.com/example\nbest best\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date 20030315" + ], + [ + "read\nFrom Boston to Denver tomorrowBostonDenvertomorrowBostonDenver20030315", + "ns http://www.example.com/example\nstage raw\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow\nstage better\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 20030315" + ], + [ + "read\nCambridgeLondon20030315", + "ns http://www.example.com/example\nbest int1\nset tokens From Cambridge to London tomorrow\nset medium acoustic\nset mode voice\nfield origin Cambridge\nset tokens From Cambridge\nfield destination London\nset tokens to London\nfield date 20030315\nset tokens tomorrow" + ], + [ + "read\nFrom Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003", + "ns http://www.example.com/example\nstage raw\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mysemproc1.xml\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nfrom raw\nbest best\nset process http://example.com/mysemproc2.xml\nfield origin Boston\nfield destination Denver\nfield date 03152003\nfrom better" + ], + [ + "read\n", + "best int1\nset no-input true\nset medium acoustic\nset mode voice" + ], + [ + "read\n", + "best interp1\nset uninterpreted true\nset medium acoustic\nset mode voice" + ], + [ + "read\n", + "best understanding\nset process http://example.com/mynlu.xml\nset uninterpreted true\nset tokens From Cambridge to London tomorrow\nset medium acoustic\nset mode voice" + ], + [ + "read\narretez", + "ns http://www.example.com/example\nbest int1\nset lang fr\nset medium acoustic\nset mode voice\nfield answer arretez" + ], + [ + "read\n CANCEL ", + "ns http://www.example.com/example\nbest int1\nset tokens please stop arretez s'il vous plait\nset lang en fr\nset medium acoustic\nset mode voice\nfield command CANCEL " + ], + [ + "read\nBostonDenver03152003", + "ns http://www.example.com/example\nbest intp1\nset signal http://example.com/signals/sg23.bin\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ], + [ + "read\n", + "best intp1\nset medium acoustic\nset mode voice\nset function recording\nset uninterpreted true\nset signal http://example.com/signals/recording.mpg\nset signal-size 82102\nset duration 10000" + ], + [ + "read\nBostonDenver03152003", + "ns http://www.example.com/example\nbest intp1\nset signal http://example.com/signals/signal.dsr\nset media-type audio/dsr-es202212; rate:8000; maxptime:40\nset medium acoustic\nset mode voice\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ], + [ + "read\nBoston Austin ", + "ns http://www.example.com/example\nchoice nbest1\nset medium acoustic\nset mode voice\nbest meaning1\nset confidence 0.6\nfield location Boston\nbest meaning2\nset confidence 0.4\nfield location Austin " + ], + [ + "read\n Boston Austin ", + "ns http://www.example.com/example\nbest meaning1\nset confidence 0.6\nset medium acoustic\nset mode voice\nfield destination Boston\nset confidence 0.8\nfield origin Austin \nset confidence 0.6" + ], + [ + "read\nBostonAustin", + "ns http://www.example.com/myapp\nchoice nbest1\nset medium acoustic\nset mode voice\nbest intp1\nset source http://example.com/microphone/NC-61\nfield destination Boston\nbest intp2\nset source http://example.com/microphone/NC-4024\nfield destination Austin" + ], + [ + "read\nChicago", + "ns http://www.example.com/example\nbest int1\nset start 1087995961542\nset end 1087995963542\nset medium acoustic\nset mode voice\nfield destination Chicago" + ], + [ + "read\nDenver", + "ns http://www.example.com/example\nbest int1\nset duration 2300\nset medium acoustic\nset mode voice\nfield origin Denver" + ], + [ + "read\nBoston45", + "ns http://www.example.com/example\nchoice nbest1\nbest interp1\nset confidence 0.6\nset medium tactile\nset mode ink\nset function dialog\nset verbal true\nfield location Boston\nbest interp2\nset confidence 0.4\nset medium tactile\nset mode ink\nset function dialog\nset verbal false\nfield direction 45" + ], + [ + "read\nFrom Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003", + "ns http://www.example.com/example\nstage raw\nset process http://example.com/myasr1.xml\nset medium acoustic\nset mode voice\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mynlu1.xml\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nset process http://example.com/myrefresolution1.xml\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ], + [ + "read\nFrom Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003", + "ns http://www.example.com/example\nstage raw\nset process http://example.com/myasr1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.6\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mynlu1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.8\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nset process http://example.com/myrefresolution1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.8\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ], + [ + "read\nFrom Boston to Denver tomorrowBostonDenvertomorrowBostonDenver03152003", + "ns http://www.example.com/example\nstage raw\nset process http://example.com/myasr1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.6\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfield answer From Boston to Denver tomorrow\nstage better\nset process http://example.com/mynlu1.xml\nset confidence 0.8\nfrom raw false\nfield origin Boston\nfield destination Denver\nfield date tomorrow\nbest best\nset process http://example.com/myrefresolution1.xml\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ], + [ + "read\nBostonDenver03152003", + "ns http://www.example.com/example\nbest best\nset start 1087995961542\nset end 1087995963542\nset process http://example.com/myrefresolution1.xml\nset source http://example.com/microphone/NC-61\nset signal http://example.com/signals/sg23.wav\nset confidence 0.8\nset medium acoustic\nset mode voice\nset function dialog\nset verbal true\nset tokens from boston to denver tomorrow\nset lang en-US\nfrom better false\nfield origin Boston\nfield destination Denver\nfield date 03152003" + ] + ] +} diff --git a/app/specs/emma/spec.json b/app/specs/emma/spec.json new file mode 100644 index 00000000..c7e6261d --- /dev/null +++ b/app/specs/emma/spec.json @@ -0,0 +1,301 @@ +{ + "name": "emma", + "comment": "The Prism's reader of what its person says to it (app/src/PrismEmma.lex.tex), held to W3C EMMA 1.0. Every prompt or gesture is one EMMA document; the request 'check' and a line end, then a document, answers 'malformed' when it is not well-formed namespace-aware XML, else 'conforms' or 'violates' with the Implementation Report Plan assertions it breaks, then ';' and the assertions whose features it shows. 'sources' pins the Recommendation, its schema and the Implementation Report Plan (the Working Group's inventory of testable assertions, ST-01's requirements for w3c-emma-1.0). The plan publishes no test documents, so the acceptance vectors are the Recommendation's own: 'documents' lists every
 block of the Recommendation that opens an emma:emma element, by its ordinal among all 
 blocks, with markup removed and entities read, pinned by SHA-256; 'examples' carries those exact bytes. PrismPM compiles a guest's vectors within a fixed time, so they are held in sets over the one guest: 'check' of sections 2 to 4.1 here and of sections 4.2 to Appendix C in app/specs/emma-annotations/spec.json; the guest's 'read' and 'input' requests in app/specs/emma-read, emma-input, emma-written, emma-other and emma-other-annotations, each over these same documents. Four documents are not well-formed as W3C publishes them (14, 27, 65, 77), two elide lattice arcs with '...' and so break 603, 604 and 609 as written (17, 18), and one elides the interpretation (1, assertion 910). Each answer was also reached by a conforming XML parser reading the same bytes, outside the guest. The reader takes XML 1.0 without a DTD: elements, attributes, comments, CDATA and processing instructions, namespace declarations in scope, unique attributes; entity references are carried as written.",
+ "sources": {
+  "recommendation": {
+   "url": "https://www.w3.org/TR/2009/REC-emma-20090210/",
+   "sha256": "1d53ab2af1fb23d2be28e5916715ee6208819b8b623e28749584abda7aa51129"
+  },
+  "schema": {
+   "url": "https://www.w3.org/TR/2009/REC-emma-20090210/emma.xsd",
+   "sha256": "0117aefd45c0e0e6481efb8c6e448e1889176d1781dad33ad2716bc99596a5f5"
+  },
+  "irp": {
+   "url": "https://www.w3.org/2002/mmi/2007/emma-irp/",
+   "sha256": "ce9766f3c28a4eed8cf036426824f8ce8d06bf31fac0ad487814ad17368ed0ce"
+  }
+ },
+ "documents": [
+  {
+   "example": 0,
+   "sha256": "76d19f36a08918a518361023f6a87ccbcdaafec1bb427904b76a9fe817a0d96d",
+   "answer": "conforms; 100 200 300 910 1201 1900 2100 2101 2300 2310"
+  },
+  {
+   "example": 1,
+   "sha256": "0f7ec7de1416b10998edb0faeeaa823b3c158733153d81df64d190910b3cde27",
+   "answer": "violates 910; 100"
+  },
+  {
+   "example": 3,
+   "sha256": "310e840929bc19f9b98136603f68b1bacdeea99d17b7137f51efa87a20564f4b",
+   "answer": "conforms; 100 200 910 2300 2310"
+  },
+  {
+   "example": 4,
+   "sha256": "e8efaebe04a2e0c2d2c744b009c9d5e7c1c8779134966ea991566678e3294094",
+   "answer": "conforms; 100 200 300 910 2300 2310"
+  },
+  {
+   "example": 5,
+   "sha256": "a1d6d6b21d66bd49707151f41965c4d1b98f29b48f446e1448465d88d8fc2e43",
+   "answer": "conforms; 100 200 300 910 1201 2300 2310"
+  },
+  {
+   "example": 6,
+   "sha256": "278c0c3b3652139c094f4fc5a791e1e816cf71b7f141bbde135c25aead1bb856",
+   "answer": "conforms; 100 200 300 910 1201 2300 2310"
+  },
+  {
+   "example": 7,
+   "sha256": "f6fe2232d6f5208eaec224e83b40822d301c1fdf22620782fc63980d0a5add69",
+   "answer": "conforms; 100 200 400 910 2100 2101 2300 2310"
+  },
+  {
+   "example": 8,
+   "sha256": "b7571cd15a999d904d5408ae0c0ee89d68c54f4ee2e53ec45ed7bc398704f18a",
+   "answer": "conforms; 100 200 400 402 910 2300 2310"
+  },
+  {
+   "example": 9,
+   "sha256": "9f045d68caa4d1cf699d430262f96897252bcf1467a789a3d1b47a784828e3b0",
+   "answer": "conforms; 100 200 400 402 910 2300 2310"
+  },
+  {
+   "example": 10,
+   "sha256": "b8ef1f46c92149356db3b83aaefa871f8395d1ca530ae51796c7212539a37c22",
+   "answer": "conforms; 100 200 500 910 2300 2310"
+  },
+  {
+   "example": 11,
+   "sha256": "2b04ce5989286687efe68d42ffe0d92b4e55eee1d837a13b19617dc41b5f9303",
+   "answer": "conforms; 100 200 400 500 910 2300 2310"
+  },
+  {
+   "example": 13,
+   "sha256": "298a5699fc4c815ee18e692a5da16cf892ca0e05481188c6f91891d862ac7ad4",
+   "answer": "conforms; 100 200 600 910 2300 2310"
+  },
+  {
+   "example": 14,
+   "sha256": "fda15005ac274cf4ca68f7268a03b38a43d4d8beea48ef4ca3295499923aa21f",
+   "answer": "malformed"
+  },
+  {
+   "example": 15,
+   "sha256": "533f95c8f8d5ca345233b3f82a4f7d175407e793abdb1251712f4b75493a2d78",
+   "answer": "conforms; 100 200 600 910 2300 2310"
+  },
+  {
+   "example": 16,
+   "sha256": "08923b25c60be6ab4fca300018f2c84321f48a04360abf388c997150805a8dd4",
+   "answer": "conforms; 100 200 600 910 2300 2310"
+  },
+  {
+   "example": 17,
+   "sha256": "f64828a09b42591fe0f84f174e19b917c0b9daed9869ebc26754eda776216baa",
+   "answer": "violates 603 604; 100 200 600 910 2100 2101 2300 2310 2500"
+  },
+  {
+   "example": 18,
+   "sha256": "26dbc5c1a26fef3b7ce2a619cdbfab84a16f32ddbc75d032ace15dd31c5471df",
+   "answer": "violates 603 604 609; 100 200 600 910 2100 2101 2300 2310 2500"
+  },
+  {
+   "example": 19,
+   "sha256": "a8b637c0d63a78e9b17b6d34bf45e7ded86c535ef8584101c247c59d62aef222",
+   "answer": "conforms; 100 200 600 910 2100 2101 2201 2202 2203 2300 2310"
+  },
+  {
+   "example": 20,
+   "sha256": "c9f9251132e364f2de4032bf64423c33b88e235a64d509e18a665dd88080aeb3",
+   "answer": "conforms; 100 200 700 910 2300 2310"
+  },
+  {
+   "example": 21,
+   "sha256": "66e24844fc0c555a6464a909996d192b02c8facdf4082183d9942f363feece8d",
+   "answer": "conforms; 100 200 700 910 2300 2310"
+  },
+  {
+   "example": 22,
+   "sha256": "84ec71f15214337febeacac137ea10d051b57eefd066dc8ab502e226d684ef33",
+   "answer": "conforms; 100 200 800 910 2300 2310"
+  },
+  {
+   "example": 23,
+   "sha256": "8665da5c812ae062a352a30d3ffb59774c07d9b56eb4b24188dac9fbf04cb28c",
+   "answer": "conforms; 100 200 910 2300 2310"
+  },
+  {
+   "example": 24,
+   "sha256": "aabadbce6250c619216ef04ae64af338ce62ce6c5808ebcb15ae5ab9ed0a708c",
+   "answer": "conforms; 100 200 910 2300 2310"
+  },
+  {
+   "example": 25,
+   "sha256": "cf8f61b2df27d0310d0fdb294bd3eb8225f4f39fbf7c327725b1ee161ae621fd",
+   "answer": "conforms; 100 200 910 2300 2310"
+  },
+  {
+   "example": 26,
+   "sha256": "5ab01756a844d597a7f25f24fe461c9ee559a847c2a99877435a66760e150966",
+   "answer": "conforms; 100 200 901 910 911 2300 2310"
+  },
+  {
+   "example": 27,
+   "sha256": "b97ec9278600574a685d29ea922b2f54b6794487735836ba338bf5642adaf3b4",
+   "answer": "malformed"
+  },
+  {
+   "example": 28,
+   "sha256": "bcc9b9525ce48115a0bf13f6617e6d5f72c09f354fb2701775e4b10df9a245d1",
+   "answer": "conforms; 100 200 300 901 910 911 2300 2310"
+  },
+  {
+   "example": 29,
+   "sha256": "e7a7095aa04762dba0a12038ad3dddefde2708b1aaf1a90007136776e6c58576",
+   "answer": "conforms; 100 200 300 901 910 911 2300 2310"
+  },
+  {
+   "example": 30,
+   "sha256": "5f32f5d6ccd2277865fafd8b859afd41f0f187936aa3be511ecfce2deacf2e60",
+   "answer": "conforms; 100 200 300 910 1000 2300 2310"
+  },
+  {
+   "example": 31,
+   "sha256": "aba439f07a68bcf6977e73aa08e0d6f093ee59f26a52abb88e95a6b8dddd8737",
+   "answer": "conforms; 100 200 300 910 1100 1900 2100 2101 2300 2310"
+  },
+  {
+   "example": 32,
+   "sha256": "67293824076d1a18bc4620033285c4384e5e68f73e5c3dcc293a83e9d962702a",
+   "answer": "conforms; 100 200 910 1800 2100 2101 2300 2310 2700 2701 2710 2711 2713 2714 2716 2717 2718"
+  }
+ ],
+ "examples": [
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      Boston\r\n      Denver\r\n    \r\n\r\n    \r\n      Austin\r\n      Denver\r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 300 910 1201 1900 2100 2101 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n    ....\r\n\r\n",
+   "violates 910; 100"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    ...\r\n  \r\n\r\n",
+   "conforms; 100 200 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      Boston\r\n      Denver\r\n      03112003\r\n    \r\n\r\n    \r\n      Austin\r\n      Denver\r\n      03112003\r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 300 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n\r\n  \r\n     \r\n       \r\n          boston\r\n       \r\n       \r\n          boston\r\n       \r\n     \r\n     \r\n       \r\n          austin\r\n       \r\n       \r\n          austin\r\n       \r\n     \r\n  \r\n\r\n\r\n",
+   "conforms; 100 200 300 910 1201 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n\r\n  \r\n     \r\n        boston\r\n     \r\n     \r\n        boston\r\n     \r\n     \r\n        austin\r\n     \r\n     \r\n        austin\r\n     \r\n  \r\n\r\n\r\n",
+   "conforms; 100 200 300 910 1201 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      move\r\n      ambulance\r\n      here\r\n    \r\n\r\n    \r\n      0.253\r\n      0.124\r\n    \r\n\r\n    \r\n      0.866\r\n      0.724\r\n    \r\n  \r\n\r\n\r\n",
+   "conforms; 100 200 400 910 2100 2101 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      temporal\r\n      2s\r\n    \r\n\r\n    \r\n      0.253\r\n      0.124\r\n    \r\n\r\n    \r\n      0.866\r\n      0.724\r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 400 402 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n    \r\n      0.253\r\n      0.124\r\n    \r\n\r\n    \r\n      0.866\r\n      0.724\r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 400 402 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      0.253\r\n      0.124\r\n    \r\n\r\n    \r\n      0.866\r\n      0.724\r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 500 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n     \r\n       move\r\n       this-battleship\r\n       here\r\n     \r\n\r\n     \r\n       \r\n         0.253\r\n         0.124\r\n       \r\n\r\n     \r\n       0.866\r\n       0.724\r\n     \r\n   \r\n \r\n\r\n",
+   "conforms; 100 200 400 500 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      flights\r\n\r\n      to\r\n      boston\r\n      austin\r\n      from\r\n\r\n      portland\r\n      oakland\r\n      today\r\n      please\r\n\r\n      tomorrow\r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 600 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      flights to boston from portland today please\r\n    \r\n\r\n    \r\n      flights to boston from portland tomorrow\r\n    \r\n\r\n    \r\n      flights to austin from portland today please\r\n    \r\n\r\n    \r\n      flights to austin from portland tomorrow\r\n    \r\n\r\n    \r\n      flights to boston from oakland today please\r\n    \r\n\r\n    \r\n      flights to boston from oakland tomorrow\r\n    \r\n\r\n    \r\n      flights to austin from oakland today please\r\n    \r\n\r\n    \r\n      flights to austin from oakland tomorrow\r\n    \r\n  \r\n\r\n",
+   "malformed"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      \r\n        \r\n      \r\n      \r\n        \r\n      \r\n      \r\n        \r\n      \r\n      \r\n        \r\n      \r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 600 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      \r\n        \r\n      \r\n      \r\n        \r\n      \r\n      \r\n        \r\n      \r\n      \r\n        \r\n      \r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 600 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      \r\n         flights\r\n      \r\n\r\n      \r\n         to\r\n      \r\n\r\n      \r\n         boston\r\n      \r\n\r\n      \r\n         austin\r\n      \r\n      ...\r\n    \r\n  \r\n\r\n",
+   "violates 603 604; 100 200 600 910 2100 2101 2300 2310 2500"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      \r\n         flights\r\n      \r\n      \r\n         to\r\n      \r\n\r\n      \r\n         boston\r\n      \r\n      \r\n         austin\r\n      \r\n        ...\r\n      \r\n    \r\n  \r\n\r\n",
+   "violates 603 604 609; 100 200 600 910 2100 2101 2300 2310 2500"
+  ],
+  [
+   "check\n\r\n\r\n\r\n  \r\n    \r\n      \r\n         flights\r\n      \r\n      \r\n         to\r\n      \r\n\r\n      \r\n         boston\r\n      \r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 600 910 2100 2101 2201 2202 2203 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    boston\r\n  \r\n\r\n",
+   "conforms; 100 200 700 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    flights to san francisco\r\n  \r\n\r\n",
+   "conforms; 100 200 700 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n  \r\n     London \r\n     UK \r\n  \r\n\r\n",
+   "conforms; 100 200 800 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    From Boston to Denver tomorrow\r\n  \r\n\r\n\r\n",
+   "conforms; 100 200 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    Boston\r\n    Denver\r\n    tomorrow\r\n  \r\n\r\n",
+   "conforms; 100 200 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    Boston\r\n    Denver\r\n    20030315\r\n  \r\n\r\n",
+   "conforms; 100 200 910 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      From Boston to Denver tomorrow\r\n    \r\n\r\n    \r\n      \r\n      Boston\r\n      Denver\r\n      tomorrow\r\n    \r\n  \r\n\r\n  \r\n    \r\n    Boston\r\n    Denver\r\n    20030315\r\n  \r\n\r\n",
+   "conforms; 100 200 901 910 911 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      destination\r\n    \r\n\r\n    \r\n      Boston\r\n    \r\n  \r\n\r\n  \r\n    Boston\r\n  \r\n\r\n",
+   "malformed"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      \r\n       from boston to denver on march eleven two thousand three\r\n      \r\n\r\n      \r\n       from austin to denver on march eleven two thousand three\r\n      \r\n  \r\n\r\n\r\n\r\n  \r\n  \r\n    Boston\r\n    Denver\r\n    03112003\r\n  \r\n\r\n  \r\n    Austin\r\n    Denver\r\n    03112003\r\n  \r\n\r\n  \r\n\r\n",
+   "conforms; 100 200 300 901 910 911 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n     \r\n      Boston\r\n      Denver\r\n      03112003\r\n    \r\n\r\n    \r\n     \r\n      Austin\r\n      Denver\r\n      03112003\r\n    \r\n  \r\n  \r\n    \r\n      \r\n       from boston to denver on march eleven two thousand three\r\n      \r\n\r\n      \r\n       from austin to denver on march eleven two thousand three\r\n      \r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 300 901 910 911 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n  \r\n  \r\n    \r\n      Boston\r\n    \r\n\r\n    \r\n        Austin\r\n    \r\n\r\n    \r\n        help\r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 300 910 1000 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      2121234567\r\n      NY\r\n    \r\n\r\n    residential\r\n    acme_travel_service\r\n  \r\n\r\n  \r\n    \r\n      Boston\r\n      Denver\r\n      03112003\r\n    \r\n\r\n    \r\n      Austin\r\n      Denver\r\n      03112003\r\n    \r\n  \r\n\r\n",
+   "conforms; 100 200 300 910 1100 1900 2100 2101 2300 2310"
+  ],
+  [
+   "check\n\r\n\r\n  \r\n    \r\n      SIP\r\n    \r\n\r\n    \r\n      SIP\r\n    \r\n  \r\n\r\n  \r\n    Chicago\r\n  \r\n\r\n",
+   "conforms; 100 200 910 1800 2100 2101 2300 2310 2700 2701 2710 2711 2713 2714 2716 2717 2718"
+  ]
+ ]
+}
diff --git a/app/specs/guests/emma/emma-annotations.json b/app/specs/guests/emma/emma-annotations.json
new file mode 100644
index 00000000..17d9574c
--- /dev/null
+++ b/app/specs/guests/emma/emma-annotations.json
@@ -0,0 +1,16 @@
+{
+  "id": "emma-annotations",
+  "wasm": "site/emma/guest/emma.wasm",
+  "pin": "site/emma/guest.mjs",
+  "modules": [
+    "PrismEmma"
+  ],
+  "dispatch": "PrismEmma::prismEmmaDispatch",
+  "limits": [
+    3072,
+    3072,
+    6144
+  ],
+  "vectors": "spec:emma-annotations",
+  "as": "annotations"
+}
diff --git a/app/specs/guests/emma/emma-annotations.lock.json b/app/specs/guests/emma/emma-annotations.lock.json
new file mode 100644
index 00000000..cb049523
--- /dev/null
+++ b/app/specs/guests/emma/emma-annotations.lock.json
@@ -0,0 +1,4 @@
+{
+  "source": "79f56b04c9791bedc77d91c605c991b795e8e1f049dd58a3955634990bdd71f7",
+  "wasm": "2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d"
+}
diff --git a/app/specs/guests/emma/emma-input.json b/app/specs/guests/emma/emma-input.json
new file mode 100644
index 00000000..ddd7f05e
--- /dev/null
+++ b/app/specs/guests/emma/emma-input.json
@@ -0,0 +1,16 @@
+{
+  "id": "emma-input",
+  "wasm": "site/emma/guest/emma.wasm",
+  "pin": "site/emma/guest.mjs",
+  "modules": [
+    "PrismEmma"
+  ],
+  "dispatch": "PrismEmma::prismEmmaDispatch",
+  "limits": [
+    3072,
+    3072,
+    6144
+  ],
+  "vectors": "spec:emma-input",
+  "as": "input"
+}
diff --git a/app/specs/guests/emma/emma-input.lock.json b/app/specs/guests/emma/emma-input.lock.json
new file mode 100644
index 00000000..f01e18c4
--- /dev/null
+++ b/app/specs/guests/emma/emma-input.lock.json
@@ -0,0 +1,4 @@
+{
+  "source": "574ccc2c4afe64f5d155d23d1ffa62f7ee1389dd4ecf0edc2df4ba9eb6ed8aa7",
+  "wasm": "2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d"
+}
diff --git a/app/specs/guests/emma/emma-other-annotations.json b/app/specs/guests/emma/emma-other-annotations.json
new file mode 100644
index 00000000..6b8d73f2
--- /dev/null
+++ b/app/specs/guests/emma/emma-other-annotations.json
@@ -0,0 +1,16 @@
+{
+  "id": "emma-other-annotations",
+  "wasm": "site/emma/guest/emma.wasm",
+  "pin": "site/emma/guest.mjs",
+  "modules": [
+    "PrismEmma"
+  ],
+  "dispatch": "PrismEmma::prismEmmaDispatch",
+  "limits": [
+    3072,
+    3072,
+    6144
+  ],
+  "vectors": "spec:emma-other-annotations",
+  "as": "otherAnnotations"
+}
diff --git a/app/specs/guests/emma/emma-other-annotations.lock.json b/app/specs/guests/emma/emma-other-annotations.lock.json
new file mode 100644
index 00000000..9a9b12f2
--- /dev/null
+++ b/app/specs/guests/emma/emma-other-annotations.lock.json
@@ -0,0 +1,4 @@
+{
+  "source": "70acb6481130d4b0b47f98ff34e8092821b8b09fac9d0280958a8f39c24ab04f",
+  "wasm": "2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d"
+}
diff --git a/app/specs/guests/emma/emma-other.json b/app/specs/guests/emma/emma-other.json
new file mode 100644
index 00000000..4a1b2a48
--- /dev/null
+++ b/app/specs/guests/emma/emma-other.json
@@ -0,0 +1,16 @@
+{
+  "id": "emma-other",
+  "wasm": "site/emma/guest/emma.wasm",
+  "pin": "site/emma/guest.mjs",
+  "modules": [
+    "PrismEmma"
+  ],
+  "dispatch": "PrismEmma::prismEmmaDispatch",
+  "limits": [
+    3072,
+    3072,
+    6144
+  ],
+  "vectors": "spec:emma-other",
+  "as": "other"
+}
diff --git a/app/specs/guests/emma/emma-other.lock.json b/app/specs/guests/emma/emma-other.lock.json
new file mode 100644
index 00000000..91eed5f3
--- /dev/null
+++ b/app/specs/guests/emma/emma-other.lock.json
@@ -0,0 +1,4 @@
+{
+  "source": "ca5ac5b6877b0e5dade67d304747a78299760ec73e8bee8f15f4f8ffde5df003",
+  "wasm": "2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d"
+}
diff --git a/app/specs/guests/emma/emma-read.json b/app/specs/guests/emma/emma-read.json
new file mode 100644
index 00000000..c84b1dcd
--- /dev/null
+++ b/app/specs/guests/emma/emma-read.json
@@ -0,0 +1,16 @@
+{
+  "id": "emma-read",
+  "wasm": "site/emma/guest/emma.wasm",
+  "pin": "site/emma/guest.mjs",
+  "modules": [
+    "PrismEmma"
+  ],
+  "dispatch": "PrismEmma::prismEmmaDispatch",
+  "limits": [
+    3072,
+    3072,
+    6144
+  ],
+  "vectors": "spec:emma-read",
+  "as": "read"
+}
diff --git a/app/specs/guests/emma/emma-read.lock.json b/app/specs/guests/emma/emma-read.lock.json
new file mode 100644
index 00000000..f0bc5b78
--- /dev/null
+++ b/app/specs/guests/emma/emma-read.lock.json
@@ -0,0 +1,4 @@
+{
+  "source": "65b7318d5f517f95c0dee14d43a9e5080503b39e9dbac6e6f74ad8db9b7c0066",
+  "wasm": "2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d"
+}
diff --git a/app/specs/guests/emma/emma-written-check.json b/app/specs/guests/emma/emma-written-check.json
new file mode 100644
index 00000000..8463bc69
--- /dev/null
+++ b/app/specs/guests/emma/emma-written-check.json
@@ -0,0 +1,16 @@
+{
+  "id": "emma-written-check",
+  "wasm": "site/emma/guest/emma.wasm",
+  "pin": "site/emma/guest.mjs",
+  "modules": [
+    "PrismEmma"
+  ],
+  "dispatch": "PrismEmma::prismEmmaDispatch",
+  "limits": [
+    3072,
+    3072,
+    6144
+  ],
+  "vectors": "spec:emma-written-check",
+  "as": "writtenCheck"
+}
diff --git a/app/specs/guests/emma/emma-written-check.lock.json b/app/specs/guests/emma/emma-written-check.lock.json
new file mode 100644
index 00000000..7ed47890
--- /dev/null
+++ b/app/specs/guests/emma/emma-written-check.lock.json
@@ -0,0 +1,4 @@
+{
+  "source": "2f50c265bc261642260b9bf1d8607b01895e7763ca36e455a6293ed278c708d2",
+  "wasm": "2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d"
+}
diff --git a/app/specs/guests/emma/emma-written.json b/app/specs/guests/emma/emma-written.json
new file mode 100644
index 00000000..88dab8e0
--- /dev/null
+++ b/app/specs/guests/emma/emma-written.json
@@ -0,0 +1,16 @@
+{
+  "id": "emma-written",
+  "wasm": "site/emma/guest/emma.wasm",
+  "pin": "site/emma/guest.mjs",
+  "modules": [
+    "PrismEmma"
+  ],
+  "dispatch": "PrismEmma::prismEmmaDispatch",
+  "limits": [
+    3072,
+    3072,
+    6144
+  ],
+  "vectors": "spec:emma-written",
+  "as": "written"
+}
diff --git a/app/specs/guests/emma/emma-written.lock.json b/app/specs/guests/emma/emma-written.lock.json
new file mode 100644
index 00000000..14d3d470
--- /dev/null
+++ b/app/specs/guests/emma/emma-written.lock.json
@@ -0,0 +1,4 @@
+{
+  "source": "d6385bd6416700feae39983b542f01afd12c4619bc9f4a7b8a2b8e05be38cb0a",
+  "wasm": "2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d"
+}
diff --git a/app/specs/guests/emma/emma.json b/app/specs/guests/emma/emma.json
new file mode 100644
index 00000000..ece7a73a
--- /dev/null
+++ b/app/specs/guests/emma/emma.json
@@ -0,0 +1,16 @@
+{
+  "id": "emma",
+  "wasm": "site/emma/guest/emma.wasm",
+  "pin": "site/emma/guest.mjs",
+  "modules": [
+    "PrismEmma"
+  ],
+  "dispatch": "PrismEmma::prismEmmaDispatch",
+  "limits": [
+    3072,
+    3072,
+    6144
+  ],
+  "vectors": "spec:emma",
+  "as": "emma"
+}
diff --git a/app/specs/guests/emma/emma.lock.json b/app/specs/guests/emma/emma.lock.json
new file mode 100644
index 00000000..a8d4a52a
--- /dev/null
+++ b/app/specs/guests/emma/emma.lock.json
@@ -0,0 +1,4 @@
+{
+  "source": "0f0cb92a166fe18441dee2cb43683790093d966c67d2f8c24f6613df1245da3a",
+  "wasm": "2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d"
+}
diff --git a/app/specs/parts/spec.json b/app/specs/parts/spec.json
index d1eae526..e8304461 100644
--- a/app/specs/parts/spec.json
+++ b/app/specs/parts/spec.json
@@ -316,6 +316,14 @@
       ],
       "site/annotation/guest.mjs": [
         "how"
+      ],
+      "app/src/PrismEmma.lex.tex": [
+        "why",
+        "when",
+        "how"
+      ],
+      "site/emma/guest.mjs": [
+        "how"
       ]
     }
   }
diff --git a/app/specs/standards/debt/w3c-emma-1.0.json b/app/specs/standards/debt/w3c-emma-1.0.json
new file mode 100644
index 00000000..379cc238
--- /dev/null
+++ b/app/specs/standards/debt/w3c-emma-1.0.json
@@ -0,0 +1,6 @@
+[
+ "w3c-emma-1.0-2510",
+ "w3c-emma-1.0-2600",
+ "w3c-emma-1.0-2601",
+ "w3c-emma-1.0-606"
+]
diff --git a/app/specs/standards/register/w3c-emma-1.0.json b/app/specs/standards/register/w3c-emma-1.0.json
new file mode 100644
index 00000000..4e3b02c7
--- /dev/null
+++ b/app/specs/standards/register/w3c-emma-1.0.json
@@ -0,0 +1,280 @@
+{
+ "key": "w3c-emma-1.0",
+ "title": "W3C EMMA: Extensible MultiModal Annotation markup language, Recommendation 10 February 2009",
+ "issuer": "W3C",
+ "text": {
+  "url": "https://www.w3.org/TR/2009/REC-emma-20090210/",
+  "sha256": "1d53ab2af1fb23d2be28e5916715ee6208819b8b623e28749584abda7aa51129"
+ },
+ "inventories": [
+  {
+   "generated": "test/standards/generated/w3c-emma-1.0.json",
+   "vendored": "app/specs/standards/texts/ce9766f3c28a4eed8cf036426824f8ce8d06bf31fac0ad487814ad17368ed0ce",
+   "source": {
+    "url": "https://www.w3.org/2002/mmi/2007/emma-irp/",
+    "sha256": "ce9766f3c28a4eed8cf036426824f8ce8d06bf31fac0ad487814ad17368ed0ce"
+   }
+  }
+ ],
+ "governs": [
+  "app/src/PrismEmma.lex.tex",
+  "site/emma/guest.mjs"
+ ],
+ "realizedBy": [
+  "ST-01"
+ ],
+ "enforcedBy": {
+  "w3c-emma-1.0-100": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that the root element is emma:emma in the EMMA namespace: Recommendation example 0 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-200": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that no application-namespace element sits directly under emma:emma, emma:one-of, emma:group, emma:sequence or emma:derivation: Recommendation example 0 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-201": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that an empty emma:interpretation carries emma:uninterpreted or emma:no-input as true: Recommendation example 36 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-300": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 0 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 300 among the features read"
+  },
+  "w3c-emma-1.0-301": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that the interpretations of an emma:one-of that all carry emma:confidence are in falling order: Recommendation example 0 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-310": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that an emma:one-of holding an emma:one-of carries disjunction-type: Recommendation example 5 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-400": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 7 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 400 among the features read"
+  },
+  "w3c-emma-1.0-402": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 8 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 402 among the features read"
+  },
+  "w3c-emma-1.0-500": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 10 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 500 among the features read"
+  },
+  "w3c-emma-1.0-600": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 13 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 600 among the features read"
+  },
+  "w3c-emma-1.0-602": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that initial is the from of an arc: Recommendation example 13 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-603": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that each final is the to of an arc: Recommendation example 13 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it; example 17, which W3C publishes with the part elided, is answered as breaking 603"
+  },
+  "w3c-emma-1.0-604": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that each arc's to is the from of an arc or a final: Recommendation example 13 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it; example 17, which W3C publishes with the part elided, is answered as breaking 604"
+  },
+  "w3c-emma-1.0-605": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that each arc's from is the to of an arc or the initial: Recommendation example 13 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-607": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that an arc holds one application-namespace element or character content, and emma:info: Recommendation example 13 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-608": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that no two emma:node name the same node-number: Recommendation example 18 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-609": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that each emma:node's node-number is the from or to of an arc: Recommendation example 15 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it; example 18, which W3C publishes with the part elided, is answered as breaking 609"
+  },
+  "w3c-emma-1.0-700": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 20 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 700 among the features read"
+  },
+  "w3c-emma-1.0-800": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 22 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 800 among the features read"
+  },
+  "w3c-emma-1.0-810": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that each emma:model under emma:emma is named by an emma:model-ref: Recommendation example 22 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-811": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that each emma:model-ref names an emma:model under emma:emma: Recommendation example 22 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-901": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 26 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 901 among the features read"
+  },
+  "w3c-emma-1.0-904": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that where an interpretation has several emma:derived-from, each is composite: Recommendation example 75 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-910": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that emma:emma has an interpretation, one-of, group or sequence as a child: Recommendation example 0 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it; example 1, which W3C publishes with the part elided, is answered as breaking 910"
+  },
+  "w3c-emma-1.0-911": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 26 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 911 among the features read"
+  },
+  "w3c-emma-1.0-1000": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 30 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 1000 among the features read"
+  },
+  "w3c-emma-1.0-1001": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that each emma:grammar-ref names an emma:grammar under emma:emma: Recommendation example 30 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-1002": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that each emma:grammar under emma:emma is named by an emma:grammar-ref: Recommendation example 30 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-1100": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 31 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 1100 among the features read"
+  },
+  "w3c-emma-1.0-1201": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 0 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 1201 among the features read"
+  },
+  "w3c-emma-1.0-1300": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 35 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 1300 among the features read"
+  },
+  "w3c-emma-1.0-1400": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 36 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 1400 among the features read"
+  },
+  "w3c-emma-1.0-1500": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 37 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 1500 among the features read"
+  },
+  "w3c-emma-1.0-1600": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 39 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 1600 among the features read"
+  },
+  "w3c-emma-1.0-1700": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 45 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 1700 among the features read"
+  },
+  "w3c-emma-1.0-1701": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 46 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 1701 among the features read"
+  },
+  "w3c-emma-1.0-1800": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 32 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 1800 among the features read"
+  },
+  "w3c-emma-1.0-1900": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 0 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 1900 among the features read"
+  },
+  "w3c-emma-1.0-2000": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 50 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2000 among the features read"
+  },
+  "w3c-emma-1.0-2100": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 0 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2100 among the features read"
+  },
+  "w3c-emma-1.0-2101": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 0 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2101 among the features read"
+  },
+  "w3c-emma-1.0-2201": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 19 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2201 among the features read"
+  },
+  "w3c-emma-1.0-2202": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that emma:time-ref-anchor-point is start or end; whether a time-ref-uri denotes an interval is not in the document, so its absence is not judged: Recommendation example 19 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-2203": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 19 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2203 among the features read"
+  },
+  "w3c-emma-1.0-2204": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 46 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2204 among the features read"
+  },
+  "w3c-emma-1.0-2300": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that every emma:interpretation has emma:medium, its own, its container's, or that of the interpretation it derives from: Recommendation example 26 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-2301": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that a composite interpretation's emma:medium lists exactly the media of the inputs it combines: Recommendation example 75 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-2310": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that every emma:interpretation has emma:mode, its own, its container's, or that of the interpretation it derives from: Recommendation example 26 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-2311": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "the guest holds that a composite interpretation's emma:mode lists exactly the modes of the inputs it combines: Recommendation example 75 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, answered as keeping it"
+  },
+  "w3c-emma-1.0-2320": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 46 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2320 among the features read"
+  },
+  "w3c-emma-1.0-2330": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 58 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2330 among the features read"
+  },
+  "w3c-emma-1.0-2401": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 60 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2401 among the features read"
+  },
+  "w3c-emma-1.0-2500": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 61 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2500 among the features read"
+  },
+  "w3c-emma-1.0-2700": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 32 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2700 among the features read"
+  },
+  "w3c-emma-1.0-2701": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 32 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2701 among the features read"
+  },
+  "w3c-emma-1.0-2710": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 32 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2710 among the features read"
+  },
+  "w3c-emma-1.0-2711": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 32 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2711 among the features read"
+  },
+  "w3c-emma-1.0-2713": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 32 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2713 among the features read"
+  },
+  "w3c-emma-1.0-2714": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 32 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2714 among the features read"
+  },
+  "w3c-emma-1.0-2715": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 62 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2715 among the features read"
+  },
+  "w3c-emma-1.0-2716": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 32 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2716 among the features read"
+  },
+  "w3c-emma-1.0-2717": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 32 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2717 among the features read"
+  },
+  "w3c-emma-1.0-2718": {
+   "suite": "crates/conformance/tests/guests.rs",
+   "how": "Recommendation example 32 (app/specs/emma/spec.json and app/specs/emma-annotations/spec.json), byte for byte from the pinned Recommendation, is an acceptance vector of the emma guest; prismpm build runs it and GU-01 holds the pinned wasm to those vectors, and its answer names 2718 among the features read"
+  }
+ }
+}
diff --git a/app/specs/standards/texts/ce9766f3c28a4eed8cf036426824f8ce8d06bf31fac0ad487814ad17368ed0ce b/app/specs/standards/texts/ce9766f3c28a4eed8cf036426824f8ce8d06bf31fac0ad487814ad17368ed0ce
new file mode 100644
index 00000000..bcdfbd6c
--- /dev/null
+++ b/app/specs/standards/texts/ce9766f3c28a4eed8cf036426824f8ce8d06bf31fac0ad487814ad17368ed0ce
@@ -0,0 +1,1236 @@
+
+
+
+	
+                
+		EMMA 1.0 Implementation Report Plan
+		
+
+
+	
+	
+		
+ + W3C + +

EMMA: Extensible MultiModal Annotation 1.0:
+ Implementation Report Plan

+

23 September 2008

+
+
Editor:
+
Michael Johnston, AT&T
+
Authors:
+
Paolo Baggia, Loquendo
+
Patrizio Bergallo, Loquendo
+
Daniel C. Burnett, Nuance
+
Jerry Carter, Nuance
+
Deborah Dahl, Invited Expert
+
+ + +
+
+

+ Table of +Contents +

+ +

+ 1. +Introduction +

+

The EMMA +Specification entered the Candidate Recommendation period on 14 April 2008.

+

Preparation of an Implementation Report is a key +criterion for moving beyond the Candidate Recommendation phase. +This document describes the requirements for the Implementation +Report and the process that the Multimodal Working Group will +follow in preparing the report.

+ +

Note: This Implementation Report Plan was modified +as follows:

+ +
+
22 January 2008
+
+
    +
  • The Candidate Recommendation period is modified from "?? 2007" to + "14 April 2008" as defined in the + + Candidate Recommendation.
  • +
+
+ +
23 September 2008
+
+
    +
  • +Test assertions 801, 902, 903 and 1501 +have been removed, +because they are actually not described in + +the EMMA specification. +
  • +
+
+
+ +

+ 1.1 +Implementation report objectives +

+
    +
  1. Must verify that the specification is implementable.
  2. +
+

+ 1.2 Implementation report non-objectives +

+
    +
  1. The IR does not attempt conformance testing of +implementations.
  2. +
+

+ 2. Work during +the Candidate Recommendation period +

+

During the CR period, the Working Group will carry out the +following activities:

+
    +
  1. Clarification and improvement of the exposition of the +specification.
  2. +
  3. Disposing of comments that are communicated to the WG during +the CR period.
  4. +
  5. Preparation of an Implementation Report meeting the criteria +outlined in this document.
  6. +
+

+ 3. +Participating in the implementation report +

+

You are invited to contribute to the assessment of the W3C EMMA +1.0 Specification by participating in the Implementation Report +process.

+
    +
  • Deadline for submission of a EMMA Implementation Report is February 29th 2008.
  • +
  • All the test assertions are reported in the table below.
  • +
  • Comments on this document or requests for +further information should be sent to the Working Group's public +mailing list www-multimodal@w3.org +(archive). If +an updated version of this document or the test assertion set is published, a +notification will be sent to this mailing list.
  • +
+

+ 4. Entrance criteria for the Proposed +Recommendation phase +

+

The Multimodal Working Group established the following +entrance criteria for the Proposed Recommendation phase in the +Request for CR:

+
    +
  1. Sufficient reports of implementation experience have been +gathered to demonstrate that EMMA processors based on the +specification are implementable and have compatible behavior.
  2. +
  3. Specific Implementation Report Requirements (outlined below) have been met.
  4. +
  5. The Working Group has formally addressed and responded to all +public comments received by the Working Group.
  6. +
+

+ 5. +Implementation report requirements +

+

+ 5.1 Detailed requirements for implementation +report +

+
    +
  1. Testimonials from implementers will be included in the IR when +provided to document the utility and implementability of the +specification.
  2. +
  3. IR must cover all specified features in the specification. For +each feature the IR should indicate: +
      +
    • Feature status: required, optional, other.
    • +
    • Feature utility/usefulness based on feedback from +implementers.
    • +
    • Implementability of the feature specification.
    • +
    +
  4. +
  5. Feature status is a factor in test coverage in the report: +
      +
    • Required specification features must have at least two +implementations. Implementations that do not implement a required +specification feature must document the reason for not implementing +the feature.
    • +
    • Optional specification features must have at least one +implementation. Implementations that do not implement an optional specification +feature should document the reason for not implementing the +feature.
    • +
    +
  6. +
+
+

+ 5.2 Notes on testing

+
    +
  1. A implementation report must indicate the outcome of evaluating the implementation with respect to each of the test assertions. Possible +outcomes are "pass", "fail" or +"not-impl". "
  2. +
+
+

+ 5.3 Out of scope +

+
+

EMMA Implementation Report will not cover:

+
    +
  • Integration with other markup languages +(VoiceXML/XHTML/SVG/SRGS)
  • +
+
+ +

+ 6. +Systems +

+

Note: The testimonials with pink background from "Acme Labs" and +"Beta Inc." are just examples and will be replaced with the +actually submitted testimonials.

+
+

Acme Labs

+

Exec Summary

+

The W3C EMMA 1.0 Specification is well-written, easily +implementable and extremely useful. Acme Labs used it to describe +the recipe for haggis.

+

Beta Inc.

+

Exec Summary

+

The W3C EMMA 1.0 Specification is the best thing since +sliced bread, extremely useful, easily +implementable and well-written. Beta Inc. used it to build +a new generation of interactive services, establish world +peace, build a new chianti-spaghetti hybrid vehicle, +and mix a perfect martini.

+
+ + + +

+ 7. Test assertions +

+

The aim of this section is to describe the range of test assertions +developed for the EMMA 1.0 +Specification. The table lists all the assertions that were derived +from the EMMA 1.0 +Specification.

+

The Assert ID column uniquely identifies the assertion. +The Feature column indicates the specific elements or attributes which the test assertion applies to. +The Spec column identifies the section of the EMMA 1.0 Specification from which the assertion was derived. +The REQ column is a Y/N value indicating whether the test assertion is for a feature which is required. +The SUB column is a Y/N value indicating whether the test assertion is a subconstraint which is dependent on the +implementation of the preceding non subconstraint feature test assertion. +The Semantics column specifies the semantics of the feature or the constraint which must be met. +The Result column will be annotated with the number of 'pass', 'fail', and 'not implemented' (P/F/NI) in +the set of implementation reports. +

+

+ 7.1 Classification of test assertions +

+

+ Test assertions are classified into two types, basic test assertions which test for the presence of each feature, and sub + constraints which only apply if that particular feature is implemented. Generally, sub constraints + encode structural constraints that could not be expressed in the EMMA schema. Sub constraints are + marked with 'SUB CONSTRAINT:' in the Semantics field.

+ +

7.2 EMMA XML Schema conformance

+ +

The most fundamental test of a conforming EMMA implementation is that the EMMA documents it +utilizes must successfully validate with respect to the EMMA XML Schema.

+ +

7.3 EMMA Test assertions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Assert IDFeatureSpecReqSubSemanticsResults
PFNI
Structural Elements
100emma:emma + [3.1] + YNEMMA documents MUST have emma:emma as the root element.
200emma:interpretation[3.2]YNApplication namespace markup representing the interpretation of inputs + MUST be contained within the emma:interpretation element.
201[3.2]YYSUB CONSTRAINT: If the emma:interpretation element is empty, + then it MUST be annotated as emma:uninterpreted="true' or emma:no-input="true".
300emma:one-of[3.3.1]YNEMMA N-best interpretations MUST be contained within an emma:one-of element.
301 + [3.3.1]YYSUB CONSTRAINT: EMMA N-best interpretations contained within an emma:one-of element +MUST be ordered best-first in document order where the measure is emma:confidence if +present, otherwise the quality metric is platform specific.
310 + [3.3.1] + YYSUB CONSTRAINT: If an emma:one-of element contains other emma:one-of elements, + (embedded one-of), emma:one-of elements MUST contain a disjunction-type attribute + indicating the reason for the multiple interpretations.
400emma:group + [3.3.2] + NNInterpretations of distinct inputs MAY be represented in a single EMMA document within the emma:group element.
402emma:group-info + [3.3.2.1] + NNInformation describing the criteria used in determining the grouping +of interpretations within an emma:group MAY be indicated within an emma:group-info +child element within emma:group.
500emma:sequence + [3.3.3] + NNA temporally ordered sequence of distinct inputs MAY be contained within an +emma:sequence element with document order corresponding to temporal order.
600emma:lattice + [3.4] + NNLattices SHOULD be represented as an emma:lattice element containing a series of emma:arc and emma:node elements.
602 + [3.4.1] + YYSUB CONSTRAINT: The value of the initial attribute on emma:lattice MUST be the value of the from +attribute on at least one of the emma:arc elements that it contains.
603 + [3.4.1] + YYSUB CONSTRAINT: The value of each space separated number within the final attribute on emma:lattice MUST be the value of the to +attribute on at least one of the emma:arc elements that it contains.
604 + [3.4.1] + YYSUB CONSTRAINT: The value of a to attribute on emma:arc MUST be the value of a from +attribute on at least one of its emma:arc siblings or be one of the final values on the parent +emma:lattice element.
605 + [3.4.1] + YYSUB CONSTRAINT: The value of a from attribute on emma:arc MUST be the value of a to +attribute on at least one of its emma:arc siblings or be the initial value on the parent +emma:lattice element.
606 + [3.4.1] + YYSUB CONSTRAINT: Any epsilon transitions in the lattice MUST be represented as emma:arc +elements with no content other than emma:info.
607 + [3.4.1] + YYSUB CONSTRAINT: The content of the emma:arc element MUST be either an application namespace XML +element, well-formed character content, an application namespace element and an emma:info element, +or well-formed character content and an emma:info element.
608 + [3.4.1] + YYSUB CONSTRAINT: There MUST be no more than one emma:node specification for each numbered node in the lattice.
609 + [3.4.1] + YYSUB CONSTRAINT: For each emma:node specification, the value of the node-number attribute MUST +appear as the value of at some from or to attribute in one of the sibling emma:arc elements.
700emma:literal + [3.5] + YNString literal semantic interpretations MUST be wrapped with the tag emma:literal.
Annotation Elements
800emma:model + [4.1.1] + NNThe data model of the application semantic markup MAY appear within the emma:model element.
810 + [4.2.16] + YYSUB CONSTRAINT: If emma:model appears as a child of emma:emma, there MUST be emma:one-of or emma:interpretation elements within emma:emma with emma:model-ref attributes that refer to the id of the emma:model child of emma:emma.
811 + [4.2.16] + YYSUB CONSTRAINT: If emma:model-ref appears on an emma:interpretation or emma:one-of, + there MUST be an emma:model child of the dominating emma:emma + whose id value equals the value of the emma:model-ref attribute.
901emma:derived-from + [4.1.2]NNThe interpretation of all but the first stage of processing MAY contain an emma:derived-from element + with an attribute resource which refers to the interpretation from which that interpretation was derived.
904 + [4.1.2] + YYSUB CONSTRAINT:If there is more than one emma:derived-from within an emma:interpretation or emma:one-of, + then all of the emma:derived-from elements MUST have the attribute composite="true".
910emma:derivation + [4.1.2] + YNThe interpretation resulting of the most recent processing step MUST + appear as a child of emma:emma.
911emma:derivation + [4.1.2] + NNIf interpretations resulting from earlier processing steps + are included they SHOULD appear as children of a single emma:derivation element within emma:emma.
1000emma:grammar + [4.1.3] + NNThe grammar used MAY be referenced using an emma:grammar element within emma:emma.
1001 + [4.2.15] + YYSUB CONSTRAINT: If an emma:interpretation or emma:one-of is annotated with the emma:grammar-ref attribute, + then the value of the emma:grammar-ref MUST reference the id of an emma:grammar element child + of emma:emma in the same document.
1002 + [4.2.15] + YYSUB CONSTRAINT: If an emma:grammar element appears as a child of emma:emma, + then there MUST be an emma:interpretation or emma:one-of element + dominated by that emma:emma, whose emma:grammar-ref attribute references + the id of the emma:grammar element.
1100emma:info + [4.1.4] + NNApplication and vendor specific annotations SHOULD appear within emma:info.
Annotation attributes
1201emma:tokens [4.2.1] + NNemma:tokens MAY be used to indicate the sequence of tokens recognized in the input by the recognizer.
1300emma:process [4.2.2]NN emma:process MAY be used to identify the process used to assign + the interpretation. +
1400emma:no-input [4.2.3]YNemma:no-input="true" MUST be used to designate lack of expected input. +
1500emma:uninterpreted [4.2.4] + YN Input for which the processor is unable to assign an interpretation MUST be marked as emma:uninterpreted="true".
1600emma:lang [4.2.5] + NNemma:lang MAY be used to designate the human language of input
1700emma:signal [4.2.6] + NNemma:signal (with a URI value) MAY be used to designate the location of + the signal processed by an EMMA processor.
1701emma:signal-size [4.2.6] + NNemma:signal-size MAY be used to indicate the file size in 8-bit octets of the input signal.
1800emma:media-type [4.2.7] + NNemma:media-type MAY be used to designate the MIME type of the processed signal.
1900emma:confidence [4.2.8] + NNemma:confidence MAY be used to designate the confidence score of an input.
2000emma:source [4.2.9] + NNemma:source (with a URI value) MAY be used to designate the source device. +
2100emma:start [4.2.10.1] + NNemma:start with a millisecond value MAY be used to indicate the absolute + start time of an input.
2101emma:end [4.2.10.1] + NNemma:end with a millisecond value MAY be used to indicate the absolute + end time of an input.
2201emma:time-ref-uri [4.2.10.2] + NNThe emma:time-ref-uri attribute MAY be used to indicate the URI used + as a reference point for relative timestamps.
2202emma:time-ref-anchor [4.2.10.2] + YYSUB CONSTRAINT: If the emma:time-ref-uri points to an interval, emma:time-ref-anchor + MUST appear on the interpretation with a value of start or end, indicating + whether to use the start or end of that interval as the reference point. +
2203emma:offset-to-start [4.2.10.2] + NNThe value of emma:offset-to-start MAY be used to indicate the number + of milliseconds from the reference point to the start of the current input in a relative timestamp.
2204emma:duration [4.2.10.3] + NNThe emma:duration attribute value MAY be used to indicate the duration + in milliseconds of the current input.
2300emma:medium [4.2.11] + YNemma:medium MUST be included on all EMMA inputs, indicating + the medium of input.
2301emma:medium + [4.1.2] + YYSUBCONSTRAINT: When EMMA inputs from different modes are combined to make a composite input, if the combining inputs have different values for emma:medium, then the value on the result MUST be a space separated list of the emma:medium values from the combining modes.
2310emma:mode [4.2.11] + YNemma:mode MUST be included on all EMMA inputs, indicating + the mode of input.
2311emma:mode + [4.1.2] + YYSUBCONSTRAINT: When EMMA inputs from different modes are combined to make a composite input, the value of emma:mode on the result MUST be a space separated list of the values on the combining inputs.
2320emma:function [4.2.11] + NNemma:function MAY be included on EMMA inputs, providing + a classification of the function of the input. +
2330emma:verbal [4.2.11] + NNemma:verbal MAY be included on EMMA inputs, indicating + whether the input is verbal or non-verbal. +
2401emma:hook [4.2.12] + NNemma:hook MAY be used on application namespace markup to indicate + where content from another mode needs to be integrated.
2500emma:cost [4.2.13] + NNemma:cost MAY be used to indicate the cost or weight of an interpretation or lattice arc.
2510emma:dialog-turn [4.2.17] + NN emma:dialog-turn MAY be used to indicate an identifier for the current + dialog turn.
Scope and inheritance of annotations
2600emma:one-of + [3.3.1] + YNEMMA annotations appearing on emma:one-of MUST be true of all of the + container elements (emma:one-of,emma:interpretation,emma:sequence,emma:group) within the emma:one-of.
2601emma:derived-from + [4.3] + YNEach EMMA annotation from the previous stage of a sequential derivation (indicated using emma:derived-from) MUST be true of the interpretations in the current stage of the derivation, unless the annotation is explicitly re-stated.
Endpoint elements and attributes
2700emma:endpoint-info + [4.1.5] + NNThe emma:endpoint-info element MAY be used to contain emma:endpoint elements describing the + characteristics of the endpoints.
2701emma:endpoint + [4.1.5] + NNThe emma:endpoint element MAY be used to provide annotations regarding a communication endpoint.
2710emma:endpoint-role + [4.2.14] + NNThe emma:endpoint-role attribute MAY be used to indicate the role of an endpoint.
2711emma:endpoint-address + [4.2.14] + NNThe emma:endpoint-address attribute MAY be used to indicate the address of an endpoint.
2713emma:port-type + [4.2.14] + NNThe emma:port-type attribute MAY be used to indicate the type of port of an endpoint.
2714emma:port-num + [4.2.14] + NNThe emma:port-num attribute MAY be used to indicate the port number of an endpoint.
2715emma:message-id + [4.2.14] + NNThe emma:message-id attribute MAY be used to indicate the message id of an endpoint.
2716emma:service-name + [4.2.14] + NNThe emma:service-name attribute MAY be used to indicate name of service that the system provides.
2717emma:endpoint-pair-ref + [4.2.14] + NNThe emma:endpoint-pair-ref attribute MAY be used to indicate the pairing between sink and source endpoints.
2718emma:endpoint-info-ref + [4.2.14] + NNThe emma:endpoint-info-ref attribute MAY be used to reference the endpoint-info element associated with an interpretation.
+ + +

+ Appendices +

+ +

+ Appendix A - +Implementation report submission format +

+

The following XML should be used as a template for providing an implementation report. +

+ +
+<system-report name="YOUR-SYSTEM-NAME-HERE">
+	<testimonial>YOUR-WELL-FORMED-TESTIMOMIAL-CONTENT-HERE</testimonial>
+	<assert id="100" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="200" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="201" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="300" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="301" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="310" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="400" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="402" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="500" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="600" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="602" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="603" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="604" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="605" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="606" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="607" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="608" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="609" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="700" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="800" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="810" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="811" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="901" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="904" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="910" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="911" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1000" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1001" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1002" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1100" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1201" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1300" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1400" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1500" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1600" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1700" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1701" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1800" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="1900" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2000" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2100" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2101" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2201" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2202" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2203" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2204" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2300" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2301" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2310" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2311" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2320" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2330" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2401" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2500" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2510" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2600" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2601" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2700" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2701" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2710" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2711" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2713" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2714" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2715" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2716" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2717" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+	<assert id="2718" res="pass|fail|not-impl">OPTIONAL-NOTES-HERE</assert>
+</system-report>
+
+

+ Appendix B - +Acknowledgements +

+

The Multimodal Working Group would like to acknowledge the contributions of several individuals:

+
    +
  • Kazuyuki Ashimura, W3C
  • +
  • Jin Liu, T-Systems
  • +
  • Dave Raggett, Volantis, W3C
  • +
  • Massimo Romanelli, DFKI
  • +
+ + + diff --git a/app/src/PrismEmma.lex.tex b/app/src/PrismEmma.lex.tex new file mode 100644 index 00000000..9cbc2200 --- /dev/null +++ b/app/src/PrismEmma.lex.tex @@ -0,0 +1,1544 @@ +\begin{lexlean}{PrismEmma} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{prism.arch@1.0.0} +\title{Text application model} +\begin{semanticmodule} +structure{name: EmSrc, type_parameters: [], parameters: [], fields: [{name: b, type: Bytes}]} + +definition{ + name: emAt, + parameters: [d : EmSrc, i : Nat], + result: Nat, + body: (match (prim index (project d b) i : (Option UInt8)) + | Option.none => 0 + | Option.some x => (prim to_nat x : Nat)), + axioms: [Quot.sound, propext] +} + +definition{ + name: emLen, + parameters: [d : EmSrc], + result: Nat, + body: (prim length (project d b) : Nat) +} + +definition{ + name: emTAt, + parameters: [t : Bytes, i : Nat], + result: Nat, + body: (match (prim index t i : (Option UInt8)) + | Option.none => 0 + | Option.some x => (prim to_nat x : Nat)), + axioms: [Quot.sound, propext] +} + +definition{name: emTLen, parameters: [t : Bytes], result: Nat, body: (prim length t : Nat)} + +definition{ + name: emCut, + parameters: [t : Bytes, start : Nat, count : Nat], + result: Bytes, + body: (match (prim slice t start count : (Option Bytes)) | Option.none => 0x | Option.some x => x) +} + +definition{ + name: emByte, + parameters: [n : Nat], + result: Bytes, + body: (emCut 0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff (prim remainder n 256 0 : Nat) 1) +} + +definition{ + name: emU16, + parameters: [n : Nat], + result: Bytes, + body: (prim append (emByte (prim quotient n 256 0 : Nat)) (emByte n) : Bytes) +} + +definition{ + name: emG16, + parameters: [t : Bytes, k : Nat], + result: Nat, + body: ((prim multiply (emTAt t k) 256 : Nat) + (emTAt t (k + 1))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emPut16, + parameters: [t : Bytes, k : Nat, n : Nat], + result: Bytes, + body: (prim append (emCut t 0 k) (prim append (emU16 n) (emCut t (k + 2) (prim subtract (emTLen t) (k + 2) : Nat)) : Bytes) : Bytes) +} + +definition{ + name: emSameBytes, + parameters: [x : Bytes, y : Bytes], + result: Bool, + body: (prim equal (prim compare_bytes x y : Ordering) (prim compare_bytes 0x00 0x00 : Ordering) : Bool), + axioms: [propext] +} + +definition{ + name: emDecFrom, + parameters: [n : Nat, acc : Bytes, fuel : Nat], + result: Bytes, + body: (match fuel + | Nat.zero => acc + | Nat.succ rest => (let digits : Bytes := (prim append (emByte (48 + (prim remainder n 10 0 : Nat))) acc : Bytes); (if (n i + | Nat.succ rest => (if (emIsWs (emAt d i)) then (emSkipWs d (i + 1) rest) else i)), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emWs, + parameters: [d : EmSrc, i : Nat], + result: Nat, + body: (emSkipWs d i (emLen d)), + axioms: [Quot.sound, propext] +} + +definition{ + name: emNameStop, + parameters: [d : EmSrc, i : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => i + | Nat.succ rest => (if (emIsName (emAt d i)) then (emNameStop d (i + 1) rest) else i)), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emNameEnd, + parameters: [d : EmSrc, i : Nat], + result: Nat, + body: (emNameStop d i (emLen d)), + axioms: [Quot.sound, propext] +} + +definition{ + name: emFindByteFrom, + parameters: [d : EmSrc, i : Nat, c : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => (emLen d) + | Nat.succ rest => (if ((emLen d) true + | Nat.succ rest => (if ((emTLen p) (emLen d) + | Nat.succ rest => (if ((emLen d) true + | Nat.succ rest => (if ((emAt d (a + k)) =? (emAt d (c + k))) then (emSameFrom d a c (k + 1) rest) else false)), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emRangeEq, + parameters: [d : EmSrc, a : Nat, z : Nat, c : Nat, y : Nat], + result: Bool, + body: ((a stop + | Nat.succ rest => (if (stop true + | Nat.succ rest => (if (stop acc + | Nat.succ rest => (if ((stop i + | Nat.succ rest => (if ((stop acc + | Nat.succ rest => (let digit : Nat := (if ((i (emLen d) + | Nat.succ rest => (if ((emLen d) (emLen d) + | Nat.succ rest => (let a : Nat := (emWs d j); (let c : Nat := (emAt d a); (if ((emLen d) (ctor Option.none [Nat]) + | Nat.succ rest => (let a : Nat := (emWs d i); (let c : Nat := (emAt d a); (if (((emLen d) (ctor Option.none [Nat]) + | Nat.succ rest => (match (emDeclLoop d ps pe (emAttrsAt d t e) (emLen d)) + | Option.none => (if ((emPar t e) =? 0) then (ctor Option.none [Nat]) else (emBind d t (prim subtract (emPar t e) 1 : Nat) ps pe rest)) + | Option.some p => (ctor Option.some [Nat] p))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emIsEmma, + parameters: [d : EmSrc, t : Bytes, e : Nat, ps : Nat, pe : Nat], + result: Bool, + body: (match (emBind d t e ps pe ((emCount t) + 1)) + | Option.none => false + | Option.some p => (emRangeLit d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat) (prim utf8_encode "http://www.w3.org/2003/04/emma" : Bytes))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emBound, + parameters: [d : EmSrc, t : Bytes, e : Nat, ps : Nat, pe : Nat], + result: Bool, + body: ((emRangeLit d ps pe (prim utf8_encode "xml" : Bytes)) || (match (emBind d t e ps pe ((emCount t) + 1)) + | Option.none => false + | Option.some p => true)), + axioms: [Quot.sound, propext] +} + +definition{ + name: emAttrLoop, + parameters: [d : EmSrc, t : Bytes, e : Nat, name : Bytes, ns : Bool, i : Nat, fuel : Nat], + result: (Option Nat), + body: (match fuel + | Nat.zero => (ctor Option.none [Nat]) + | Nat.succ rest => (let a : Nat := (emWs d i); (let c : Nat := (emAt d a); (if (((emLen d) false | Option.some p => true), + axioms: [Quot.sound, propext] +} + +definition{ + name: emAttrIs, + parameters: [d : EmSrc, t : Bytes, e : Nat, name : Bytes, ns : Bool, value : Bytes], + result: Bool, + body: (match (emAttr d t e name ns) + | Option.none => false + | Option.some p => (emRangeLit d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat) value)), + axioms: [Quot.sound, propext] +} + +definition{ + name: emAttrAgain, + parameters: [d : EmSrc, a : Nat, z : Nat, i : Nat, fuel : Nat], + result: Bool, + body: (match fuel + | Nat.zero => false + | Nat.succ rest => (let c : Nat := (emWs d i); (let x : Nat := (emAt d c); (if (((emLen d) false + | Nat.succ rest => (let a : Nat := (emWs d i); (let c : Nat := (emAt d a); (if (((emLen d) 0xff + | Nat.succ rest => (if ((emLen d) " : Bytes)); (if ((emLen d) " : Bytes)); (if ((emLen d) " : Bytes)); (if ((emLen d) " : Bytes)); (if ((emLen d) false + | Nat.succ rest => (if ((emEnd t e) 0 + | Nat.succ rest => (if ((emEnd t e) false + | Nat.succ rest => (if ((emEnd t e) false + | Nat.succ rest => (if ((emEnd t e) false + | Nat.succ rest => (if ((emEnd t e) false + | Nat.succ rest => (if ((emEnd t e) (emConfRise d t e (emEnd t j) prev rest) + | Option.some p => (if (emIsCont (emKind t j)) then (let v : Nat := (emDec6 d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat)); ((prev false + | Nat.succ rest => (if ((emEnd t la) false + | Option.some p => ((emNat d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat)) =? v))) || (emArcHas d t la name v (emEnd t j) rest)))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emTokEnd, + parameters: [d : EmSrc, i : Nat, stop : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => stop + | Nat.succ rest => (if ((stop false + | Nat.succ rest => (let a : Nat := (emWs d i); (if (stop false + | Option.some p => (emListHas d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat) v (emLen d))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emInitialIs, + parameters: [d : EmSrc, t : Bytes, la : Nat, v : Nat], + result: Bool, + body: (match (emAttr d t la (prim utf8_encode "initial" : Bytes) false) + | Option.none => false + | Option.some p => ((emNat d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat)) =? v)), + axioms: [Quot.sound, propext] +} + +definition{ + name: emFinalBad, + parameters: [d : EmSrc, t : Bytes, la : Nat, i : Nat, stop : Nat, fuel : Nat], + result: Bool, + body: (match fuel + | Nat.zero => false + | Nat.succ rest => (let a : Nat := (emWs d i); (if (stop false + | Nat.succ rest => (if ((emEnd t la) false + | Option.some p => ((emNat d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat)) =? v))) || (emNodeHas d t la v (emEnd t j) rest)))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emArcEmmaKid, + parameters: [t : Bytes, a : Nat, j : Nat, fuel : Nat], + result: Bool, + body: (match fuel + | Nat.zero => false + | Nat.succ rest => (if ((emEnd t a) false + | Nat.succ rest => (if ((emEnd t la) true + | Option.some p => (let v : Nat := (emNat d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat)); (not ((emArcHas d t la (prim utf8_encode "from" : Bytes) v (la + 1) (emCount t)) || (emFinalHas d t la v)))))) else (if (which =? 605) then (((emKind t j) =? 8) && (match (emAttr d t j (prim utf8_encode "from" : Bytes) false) + | Option.none => true + | Option.some p => (let v : Nat := (emNat d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat)); (not ((emArcHas d t la (prim utf8_encode "to" : Bytes) v (la + 1) (emCount t)) || (emInitialIs d t la v)))))) else (if (which =? 607) then (((emKind t j) =? 8) && (let others : Nat := (emKidCount t j 0 (j + 1) (emCount t)); ((emArcEmmaKid t j (j + 1) (emCount t)) || ((1 false + | Option.some p => (emNodeHas d t la (emNat d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat)) (emEnd t j) (emCount t)))) else (((emKind t j) =? 9) && (match (emAttr d t j (prim utf8_encode "node-number" : Bytes) false) + | Option.none => false + | Option.some p => (let v : Nat := (emNat d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat)); (not ((emArcHas d t la (prim utf8_encode "from" : Bytes) v (la + 1) (emCount t)) || (emArcHas d t la (prim utf8_encode "to" : Bytes) v (la + 1) (emCount t))))))))))) || (emLatKid d t la which (emEnd t j) rest)))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emRefEq, + parameters: [d : EmSrc, rs : Nat, re : Nat, is : Nat, ie : Nat], + result: Bool, + body: ((emRangeEq d rs re is ie) || (((emAt d rs) =? 35) && (emRangeEq d (rs + 1) re is ie))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emAnyRef, + parameters: [d : EmSrc, t : Bytes, name : Bytes, is : Nat, ie : Nat, j : Nat, fuel : Nat], + result: Bool, + body: (match fuel + | Nat.zero => false + | Nat.succ rest => (if ((emCount t) false + | Option.some r => (emRefEq d (prim quotient r 65536 0 : Nat) (prim remainder r 65536 0 : Nat) is ie))) || (emAnyRef d t name is ie (j + 1) rest)))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emAnyDef, + parameters: [d : EmSrc, t : Bytes, k : Nat, rs : Nat, re : Nat, j : Nat, fuel : Nat], + result: Bool, + body: (match fuel + | Nat.zero => false + | Nat.succ rest => (if ((emEnd t 0) false + | Option.some p => (emRefEq d rs re (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat)))) || (emAnyDef d t k rs re (emEnd t j) rest)))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emDefBad, + parameters: [d : EmSrc, t : Bytes, e : Nat, k : Nat, name : Bytes], + result: Bool, + body: (((emKind t e) =? k) && (((emPar t e) =? 1) && (match (emAttr d t e (prim utf8_encode "id" : Bytes) false) + | Option.none => true + | Option.some p => (not (emAnyRef d t name (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat) 0 (emCount t)))))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emRefBad, + parameters: [d : EmSrc, t : Bytes, e : Nat, k : Nat, name : Bytes], + result: Bool, + body: (match (emAttr d t e name true) + | Option.none => false + | Option.some r => (not (emAnyDef d t k (prim quotient r 65536 0 : Nat) (prim remainder r 65536 0 : Nat) 1 (emCount t)))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emDfLoose, + parameters: [d : EmSrc, t : Bytes, e : Nat, j : Nat, fuel : Nat], + result: Bool, + body: (match fuel + | Nat.zero => false + | Nat.succ rest => (if ((emEnd t e) (ctor Option.none [Nat]) + | Nat.succ rest => (if ((emCount t) false + | Option.some p => (emRangeEq d is ie (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat))) then (ctor Option.some [Nat] j) else (emById d t is ie (j + 1) rest)))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emTarget, + parameters: [d : EmSrc, t : Bytes, df : Nat], + result: (Option Nat), + body: (match (emAttr d t df (prim utf8_encode "resource" : Bytes) false) + | Option.none => (ctor Option.none [Nat]) + | Option.some p => (let rs : Nat := (prim quotient p 65536 0 : Nat); (if ((emAt d rs) =? 35) then (emById d t (rs + 1) (prim remainder p 65536 0 : Nat) 0 (emCount t)) else (ctor Option.none [Nat])))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emDfHas, + parameters: [d : EmSrc, t : Bytes, has : Bytes, e : Nat, j : Nat, fuel : Nat], + result: Bool, + body: (match fuel + | Nat.zero => false + | Nat.succ rest => (if ((emEnd t e) false + | Option.some x => ((emTAt has x) =? 1))) || (emDfHas d t has e (emEnd t j) rest)))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emEffRound, + parameters: [d : EmSrc, t : Bytes, name : Bytes, has : Bytes, j : Nat, acc : Bytes, fuel : Nat], + result: Bytes, + body: (match fuel + | Nat.zero => acc + | Nat.succ rest => (if ((emCount t) has + | Nat.succ rest => (let next : Bytes := (emEffRound d t name has 0 0x (emCount t)); (if (emSameBytes next has) then has else (emEffFix d t name next rest)))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emNear, + parameters: [d : EmSrc, t : Bytes, e : Nat, name : Bytes, fuel : Nat], + result: (Option Nat), + body: (match fuel + | Nat.zero => (ctor Option.none [Nat]) + | Nat.succ rest => (match (emAttr d t e name true) + | Option.none => (if ((emPar t e) =? 0) then (ctor Option.none [Nat]) else (emNear d t (prim subtract (emPar t e) 1 : Nat) name rest)) + | Option.some p => (ctor Option.some [Nat] p))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emTokIn, + parameters: [d : EmSrc, a : Nat, z : Nat, i : Nat, stop : Nat, fuel : Nat], + result: Bool, + body: (match fuel + | Nat.zero => false + | Nat.succ rest => (let c : Nat := (emWs d i); (if (stop true + | Nat.succ rest => (let a : Nat := (emWs d i); (if (stop false + | Nat.succ rest => (if ((emEnd t e) false + | Option.some x => (match (emNear d t x name (emCount t)) + | Option.none => false + | Option.some p => (not (emTokSub d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat) rs re (emLen d)))))) || (emSrcBad d t e name rs re (emEnd t j) rest)))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emSrcTok, + parameters: [d : EmSrc, t : Bytes, e : Nat, name : Bytes, a : Nat, z : Nat, j : Nat, fuel : Nat], + result: Bool, + body: (match fuel + | Nat.zero => false + | Nat.succ rest => (if ((emEnd t e) true + | Option.some x => (match (emNear d t x name (emCount t)) + | Option.none => true + | Option.some p => (emTokIn d a z (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat) (emLen d))))) || (emSrcTok d t e name a z (emEnd t j) rest)))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emResBad, + parameters: [d : EmSrc, t : Bytes, e : Nat, name : Bytes, i : Nat, stop : Nat, fuel : Nat], + result: Bool, + body: (match fuel + | Nat.zero => false + | Nat.succ rest => (let a : Nat := (emWs d i); (if (stop true + | Option.some p => (let rs : Nat := (prim quotient p 65536 0 : Nat); (let re : Nat := (prim remainder p 65536 0 : Nat); ((emSrcBad d t e name rs re (e + 1) (emCount t)) || (emResBad d t e name rs re (emLen d))))))))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emBreaks, + parameters: [d : EmSrc, t : Bytes, medium : Bytes, mode : Bytes, c : Nat, e : Nat], + result: Bool, + body: (if (c =? 0) then ((e =? 0) && (not ((emKind t e) =? 1))) else (if (c =? 1) then (((emKind t e) =? 0) && ((not ((emPar t e) =? 0)) && (let pk : Nat := (emKind t (prim subtract (emPar t e) 1 : Nat)); ((pk =? 1) || ((pk =? 3) || ((pk =? 4) || ((pk =? 6) || (pk =? 13)))))))) else (if (c =? 2) then (((emKind t e) =? 2) && (((emEnd t e) =? (e + 1)) && ((not (emHasText d t e)) && ((not (emAttrIs d t e (prim utf8_encode "uninterpreted" : Bytes) true (prim utf8_encode "true" : Bytes))) && (not (emAttrIs d t e (prim utf8_encode "no-input" : Bytes) true (prim utf8_encode "true" : Bytes))))))) else (if (c =? 3) then (((emKind t e) =? 3) && ((not (emConfLack d t e (e + 1) (emCount t))) && (emConfRise d t e (e + 1) 1099511627776 (emCount t)))) else (if (c =? 4) then (((emKind t e) =? 3) && ((emKidKind t e 3 (e + 1) (emCount t)) && (not (emHasAttr d t e (prim utf8_encode "disjunction-type" : Bytes) false)))) else (if (c =? 5) then (((emKind t e) =? 7) && (match (emAttr d t e (prim utf8_encode "initial" : Bytes) false) + | Option.none => true + | Option.some p => (not (emArcHas d t e (prim utf8_encode "from" : Bytes) (emNat d (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat)) (e + 1) (emCount t))))) else (if (c =? 6) then (((emKind t e) =? 7) && (match (emAttr d t e (prim utf8_encode "final" : Bytes) false) + | Option.none => true + | Option.some p => (emFinalBad d t e (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat) (emLen d)))) else (if (c =? 7) then (((emKind t e) =? 7) && (emLatKid d t e 604 (e + 1) (emCount t))) else (if (c =? 8) then (((emKind t e) =? 7) && (emLatKid d t e 605 (e + 1) (emCount t))) else (if (c =? 9) then (((emKind t e) =? 7) && (emLatKid d t e 607 (e + 1) (emCount t))) else (if (c =? 10) then (((emKind t e) =? 7) && (emLatKid d t e 608 (e + 1) (emCount t))) else (if (c =? 11) then (((emKind t e) =? 7) && (emLatKid d t e 609 (e + 1) (emCount t))) else (if (c =? 12) then (emDefBad d t e 11 (prim utf8_encode "model-ref" : Bytes)) else (if (c =? 13) then (emRefBad d t e 11 (prim utf8_encode "model-ref" : Bytes)) else (if (c =? 14) then ((((emKind t e) =? 2) || ((emKind t e) =? 3)) && ((1 false + | Nat.succ rest => (if ((emCount t) false + | Nat.succ rest => (if ((emCount t) 0 + | Nat.succ rest => ((if (emAnyBreak d t medium mode c 0 (emCount t)) then bit else 0) + (emBreakMask d t medium mode (c + 1) (prim multiply bit 2 : Nat) rest))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emShowMask, + parameters: [d : EmSrc, t : Bytes, c : Nat, bit : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => 0 + | Nat.succ rest => ((if (emAnyShow d t c 0 (emCount t)) then bit else 0) + (emShowMask d t (c + 1) (prim multiply bit 2 : Nat) rest))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emIds, + parameters: [ids : Bytes, mask : Nat, c : Nat, acc : Bytes, fuel : Nat], + result: Bytes, + body: (match fuel + | Nat.zero => acc + | Nat.succ rest => (if ((prim remainder mask 2 0 : Nat) =? 1) then (emIds ids (prim quotient mask 2 0 : Nat) (c + 1) (prim append acc (prim append 0x20 (emDecFrom (emG16 ids (prim multiply c 2 : Nat)) 0x 5) : Bytes) : Bytes) rest) else (emIds ids (prim quotient mask 2 0 : Nat) (c + 1) acc rest))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emReport, + parameters: [breaks : Nat, shows : Nat], + result: Bytes, + body: (prim append (if (breaks =? 0) then (prim utf8_encode "conforms" : Bytes) else (emIds 0x006400c800c9012d0136025a025b025c025d025f02600261032a032b0388038e03e903ea089a08fc08fd09060907 breaks 0 (prim utf8_encode "violates" : Bytes) 23)) (emIds 0x006400c8012c0190019201f4025802bc03200385038e038f03e8044c04b10514057805dc064006a406a50708076c07d0083408350899089a089b089c08fc09060910091a096109c409ce0a8c0a8d0a960a970a990a9a0a9b0a9c0a9d0a9e shows 0 0x3b 47) : Bytes), + axioms: [Quot.sound, propext] +} + +definition{ + name: emCheck, + parameters: [d : EmSrc, i : Nat], + result: Bytes, + body: (let t : Bytes := (emScan d i 0x 0x ((emLen d) + 2)); (if (not ((prim remainder (emTLen t) 12 0 : Nat) =? 0)) then (prim utf8_encode "malformed" : Bytes) else (let medium : Bytes := (emEffFix d t (prim utf8_encode "medium" : Bytes) 0x ((emCount t) + 2)); (let mode : Bytes := (emEffFix d t (prim utf8_encode "mode" : Bytes) 0x ((emCount t) + 2)); (emReport (emBreakMask d t medium mode 0 1 23) (emShowMask d t 0 1 47)))))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emSpan, + parameters: [d : EmSrc, a : Nat, z : Nat], + result: Bytes, + body: (match (prim slice (project d b) a (prim subtract z a : Nat) : (Option Bytes)) + | Option.none => 0x + | Option.some x => x) +} + +definition{ + name: emAnnName, + parameters: [d : EmSrc, a : Nat, z : Nat], + result: Bool, + body: ((emRangeLit d a z (prim utf8_encode "confidence" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "cost" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "dialog-turn" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "duration" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "end" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "endpoint-address" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "endpoint-info-ref" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "endpoint-pair-ref" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "endpoint-role" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "function" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "grammar-ref" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "hook" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "lang" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "media-type" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "medium" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "message-id" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "mode" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "model-ref" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "no-input" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "offset-to-start" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "port-num" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "port-type" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "process" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "service-name" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "signal" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "signal-size" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "source" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "start" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "time-ref-anchor-point" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "time-ref-uri" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "tokens" : Bytes)) || ((emRangeLit d a z (prim utf8_encode "uninterpreted" : Bytes)) || (emRangeLit d a z (prim utf8_encode "verbal" : Bytes)))))))))))))))))))))))))))))))))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emIsDecl, + parameters: [d : EmSrc, a : Nat, z : Nat], + result: Bool, + body: ((emRangeLit d a z (prim utf8_encode "xmlns" : Bytes)) || (emStarts d a (prim utf8_encode "xmlns:" : Bytes))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emIsHex, + parameters: [c : Nat], + result: Bool, + body: ((emIsDigit c) || (((64 i + | Nat.succ rest => (if (emIsHex (emAt d i)) then (emHexEnd d (i + 1) rest) else i)), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emHexFrom, + parameters: [d : EmSrc, i : Nat, stop : Nat, acc : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => acc + | Nat.succ rest => (if (stop false + | Nat.succ rest => (if (stop i + | Nat.succ rest => (if ((i acc + | Nat.succ rest => (if (stop false + | Nat.succ rest => (let a : Nat := (emWs d i); (let c : Nat := (emAt d a); (if (((emLen d) (ctor Option.none [Nat]) + | Nat.succ rest => (if ((emCount t) false + | Nat.succ rest => (if ((emEnd t e) false + | Option.some p => ((emAt d (prim quotient p 65536 0 : Nat)) =? 35))))) else (if ((emKind t j) =? 10) then (((emEnd t j) =? (j + 1)) && ((emAttrsShape d t j 0 (emAttrsAt d t j) (emLen d)) && (emPlain d (emContentAt t j) (emContentEnd t j) (emLen d)))) else (if ((emKind t j) =? 0) then (((emEnd t j) =? (j + 1)) && ((emAttrsShape d t j 4 (emAttrsAt d t j) (emLen d)) && ((emPlain d (emContentAt t j) (emContentEnd t j) (emLen d)) && (match (emElNs d t j) + | Option.none => false + | Option.some p => (let ps : Nat := (prim quotient p 65536 0 : Nat); (let pe : Nat := (prim remainder p 65536 0 : Nat); ((ps false + | Nat.succ rest => (if ((emEnd t e) 0 + | Option.some f => (match (emElNs d t f) | Option.none => 0 | Option.some p => p)), + axioms: [Quot.sound, propext] +} + +definition{ + name: emShape, + parameters: [d : EmSrc, t : Bytes], + result: Bool, + body: (let p : Nat := (emNsOf d t); (emShapeWith d t (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emSameNs, + parameters: [d : EmSrc, t : Bytes, j : Nat], + result: Bool, + body: (let p : Nat := (emNsOf d t); (match (emElNs d t j) + | Option.none => false + | Option.some q => (emRangeEq d (prim quotient q 65536 0 : Nat) (prim remainder q 65536 0 : Nat) (prim quotient p 65536 0 : Nat) (prim remainder p 65536 0 : Nat)))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emAttrLines, + parameters: [d : EmSrc, i : Nat, acc : Bytes, fuel : Nat], + result: Bytes, + body: (match fuel + | Nat.zero => acc + | Nat.succ rest => (let a : Nat := (emWs d i); (let c : Nat := (emAt d a); (if (((emLen d) acc + | Nat.succ rest => (let a : Nat := (emWs d i); (let c : Nat := (emAt d a); (if (((emLen d) acc + | Nat.succ rest => (if ((emEnd t e) 0x + | Option.some p => (emValue d ((prim quotient p 65536 0 : Nat) + 1) (prim remainder p 65536 0 : Nat) true 0x (emLen d))) (prim append (match (emAttr d t j (prim utf8_encode "composite" : Bytes) false) + | Option.none => 0x + | Option.some q => (prim append 0x20 (emValue d (prim quotient q 65536 0 : Nat) (prim remainder q 65536 0 : Nat) true 0x (emLen d)) : Bytes)) 0x0a : Bytes) : Bytes) : Bytes) else (if ((emKind t j) =? 10) then (prim append (prim utf8_encode "literal " : Bytes) (prim append (emValue d (emContentAt t j) (emContentEnd t j) false 0x (emLen d)) 0x0a : Bytes) : Bytes) else (emAttrLines d (emAttrsAt d t j) (prim append (prim utf8_encode "field " : Bytes) (prim append (emSpan d (emLocalAt d t j) (emNameEnd d ((emTs t j) + 1))) (prim append 0x20 (prim append (emValue d (emContentAt t j) (emContentEnd t j) false 0x (emLen d)) (prim append 0x0a (if (emSameNs d t j) then 0x else (prim append (prim utf8_encode "attr xmlns " : Bytes) (prim append (match (emElNs d t j) + | Option.none => 0x + | Option.some q => (emValue d (prim quotient q 65536 0 : Nat) (prim remainder q 65536 0 : Nat) true 0x (emLen d))) 0x0a : Bytes) : Bytes)) : Bytes) : Bytes) : Bytes) : Bytes) : Bytes) (emLen d)))) : Bytes) rest))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emHeadLine, + parameters: [d : EmSrc, t : Bytes, e : Nat, word : Bytes], + result: Bytes, + body: (emSets d (emAttrsAt d t e) (prim append word (prim append (match (emAttr d t e (prim utf8_encode "id" : Bytes) false) + | Option.none => 0x + | Option.some p => (emValue d ((prim quotient p 65536 0 : Nat) + 0) (prim remainder p 65536 0 : Nat) true 0x (emLen d))) 0x0a : Bytes) : Bytes) (emLen d)), + axioms: [Quot.sound, propext] +} + +definition{ + name: emInterpLines, + parameters: [d : EmSrc, t : Bytes, e : Nat, word : Bytes], + result: Bytes, + body: (emKidLines d t e (e + 1) (emHeadLine d t e word) (emCount t)), + axioms: [Quot.sound, propext] +} + +definition{ + name: emMemberLines, + parameters: [d : EmSrc, t : Bytes, e : Nat, word : Bytes, j : Nat, acc : Bytes, fuel : Nat], + result: Bytes, + body: (match fuel + | Nat.zero => acc + | Nat.succ rest => (if ((emEnd t e) stop + | Nat.succ rest => (if (stop false + | Nat.succ rest => (if (stop i + | Nat.succ rest => (if ((i acc + | Nat.succ rest => (if (stop 0x + | Nat.succ rest => (if ((emLen d) " : Bytes) (prim utf8_encode "" : Bytes) : Bytes) : Bytes) : Bytes) else (if (phase =? 4) then (prim append acc (prim append (emFix d pend pl) (prim append (prim utf8_encode "" : Bytes) (prim utf8_encode "" : Bytes) : Bytes) : Bytes) : Bytes) else 0x)) else (let le : Nat := (emFindByte d i 10); (let w : Nat := (emWordEnd d i le); (if (emRangeLit d i w (prim utf8_encode "stage" : Bytes)) then (if ((emNcName d (w + 1) le) && ((phase =? 0) || (phase =? 1))) then (emWrite d (le + 1) 1 1 pl ns (prim append acc (prim append (if (phase =? 0) then (prim utf8_encode "" : Bytes) else (prim append (emFix d pend pl) (prim utf8_encode "" : Bytes) : Bytes)) (prim append 0x3c656d6d613a696e746572707265746174696f6e2069643d22 (prim append (emXml d (w + 1) le true 0x (emLen d)) 0x22 : Bytes) : Bytes) : Bytes) : Bytes) rest) else 0x) else (if (emRangeLit d i w (prim utf8_encode "best" : Bytes)) then (if (not (emNcName d (w + 1) le)) then 0x else (if (phase =? 0) then (emWrite d (le + 1) 2 1 pl ns (prim append acc (prim append 0x (prim append 0x3c656d6d613a696e746572707265746174696f6e2069643d22 (prim append (emXml d (w + 1) le true 0x (emLen d)) 0x22 : Bytes) : Bytes) : Bytes) : Bytes) rest) else (if (phase =? 1) then (emWrite d (le + 1) 2 1 pl ns (prim append acc (prim append (prim append (emFix d pend pl) (prim append (prim utf8_encode "" : Bytes) (prim utf8_encode "" : Bytes) : Bytes) : Bytes) (prim append 0x3c656d6d613a696e746572707265746174696f6e2069643d22 (prim append (emXml d (w + 1) le true 0x (emLen d)) 0x22 : Bytes) : Bytes) : Bytes) : Bytes) rest) else (if (phase =? 3) then (emWrite d (le + 1) 4 1 pl ns (prim append acc (prim append (emFix d pend pl) (prim append 0x3c656d6d613a696e746572707265746174696f6e2069643d22 (prim append (emXml d (w + 1) le true 0x (emLen d)) 0x22 : Bytes) : Bytes) : Bytes) : Bytes) rest) else (if (phase =? 4) then (emWrite d (le + 1) 4 1 pl ns (prim append acc (prim append (prim append (emFix d pend pl) (prim utf8_encode "" : Bytes) : Bytes) (prim append 0x3c656d6d613a696e746572707265746174696f6e2069643d22 (prim append (emXml d (w + 1) le true 0x (emLen d)) 0x22 : Bytes) : Bytes) : Bytes) : Bytes) rest) else 0x))))) else (if (emRangeLit d i w (prim utf8_encode "choice" : Bytes)) then (if ((emNcName d (w + 1) le) && ((phase =? 0) || (phase =? 1))) then (emWrite d (le + 1) 3 1 pl ns (prim append acc (prim append (if (phase =? 1) then (prim append (emFix d pend pl) (prim append (prim utf8_encode "" : Bytes) (prim utf8_encode "" : Bytes) : Bytes) : Bytes) else 0x) (prim append 0x3c656d6d613a6f6e652d6f662069643d22 (prim append (emXml d (w + 1) le true 0x (emLen d)) 0x22 : Bytes) : Bytes) : Bytes) : Bytes) rest) else 0x) else (if (emRangeLit d i w (prim utf8_encode "set" : Bytes)) then (let w2 : Nat := (emWordEnd d (w + 1) le); (if ((0 " : Bytes) : Bytes) : Bytes) : Bytes) : Bytes) : Bytes) : Bytes) rest) else 0x)) else (if (emRangeLit d i w (prim utf8_encode "field" : Bytes)) then (let w2 : Nat := (emWordEnd d (w + 1) le); (if (((phase =? 1) || ((phase =? 2) || (phase =? 4))) && (ns && (emNcName d (w + 1) w2))) then (emWrite d (le + 1) phase 2 i ns (prim append acc (prim append (emFix d pend pl) (prim append 0x3c (emSpan d (w + 1) w2) : Bytes) : Bytes) : Bytes) rest) else 0x)) else (if (emRangeLit d i w (prim utf8_encode "attr" : Bytes)) then (let w2 : Nat := (emWordEnd d (w + 1) le); (if ((pend =? 2) && ((w2 " : Bytes) (prim append (emXml d (w + 1) le false 0x (emLen d)) (prim utf8_encode "" : Bytes) : Bytes) : Bytes) : Bytes) : Bytes) rest) else 0x) else 0x)))))))))))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emDocument, + parameters: [d : EmSrc, i : Nat], + result: Bytes, + body: (let le : Nat := (emFindByte d i 10); (if (emStarts d i (prim utf8_encode "ns " : Bytes)) then (if ((i + 3) i + | Nat.succ rest => (if (isSpace (at s i)) then (skipSpace s (i + 1) rest) else i)), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: space, + parameters: [s : Bytes, i : Nat], + result: Nat, + body: (skipSpace s i (Foundation.Bytes::byteLength s)), + axioms: [Quot.sound, propext] +} + +definition{ + name: stringEndFrom, + parameters: [s : Bytes, i : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => i + | Nat.succ rest => (let b : Nat := (at s i); (if (b =? 34) then i else (if (b =? 92) then (stringEndFrom s (i + 2) rest) else (if ((Foundation.Bytes::byteLength s) i + | Nat.succ rest => (let b : Nat := (at s i); (if ((Foundation.Bytes::byteLength s) i + | Nat.succ rest => (let b : Nat := (at s i); (if (((Foundation.Bytes::byteLength s) 0x + | Option.some b => b) +} + +definition{ + name: memberFrom, + parameters: [s : Bytes, i : Nat, key : Bytes, fuel : Nat], + result: (Option Nat), + body: (match fuel + | Nat.zero => (ctor Option.none [Nat]) + | Nat.succ rest => (if ((at s i) =? 34) then (let ke : Nat := (stringEnd s (i + 1)); (let colon : Nat := (space s (ke + 1)); (if ((at s colon) =? 58) then (let v : Nat := (space s (colon + 1)); (if (Foundation.Tar::sameBytes (span s (i + 1) ke) key) then (ctor Option.some [Nat] v) else (let next : Nat := (space s (valueEnd s v)); (if ((at s next) =? 44) then (memberFrom s (space s (next + 1)) key rest) else (ctor Option.none [Nat]))))) else (ctor Option.none [Nat])))) else (ctor Option.none [Nat]))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: member, + parameters: [s : Bytes, i : Nat, key : Bytes], + result: (Option Nat), + body: (if ((at s i) =? 123) then (memberFrom s (space s (i + 1)) key (Foundation.Bytes::byteLength s)) else (ctor Option.none [Nat])), + axioms: [Quot.sound, propext] +} + +definition{ + name: elementFrom, + parameters: [s : Bytes, i : Nat, n : Nat, fuel : Nat], + result: (Option Nat), + body: (match fuel + | Nat.zero => (ctor Option.none [Nat]) + | Nat.succ rest => (if ((at s i) =? 93) then (ctor Option.none [Nat]) else (match n + | Nat.zero => (ctor Option.some [Nat] i) + | Nat.succ m => (let next : Nat := (space s (valueEnd s i)); (if ((at s next) =? 44) then (elementFrom s (space s (next + 1)) m rest) else (ctor Option.none [Nat])))))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: element, + parameters: [s : Bytes, i : Nat, n : Nat], + result: (Option Nat), + body: (if ((at s i) =? 91) then (elementFrom s (space s (i + 1)) n (Foundation.Bytes::byteLength s)) else (ctor Option.none [Nat])), + axioms: [Quot.sound, propext] +} + +definition{ + name: countFrom, + parameters: [s : Bytes, i : Nat, acc : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => acc + | Nat.succ rest => (if ((at s i) =? 93) then acc else (let next : Nat := (space s (valueEnd s i)); (if ((at s next) =? 44) then (countFrom s (space s (next + 1)) (acc + 1) rest) else (acc + 1))))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: count, + parameters: [s : Bytes, i : Nat], + result: Nat, + body: (if ((at s i) =? 91) then (countFrom s (space s (i + 1)) 0 (Foundation.Bytes::byteLength s)) else 0), + axioms: [Quot.sound, propext] +} + +definition{ + name: escaped, + parameters: [b : Nat], + result: (Option Bytes), + body: (if (b =? 110) then (ctor Option.some [Bytes] 0x0a) else (if (b =? 116) then (ctor Option.some [Bytes] 0x09) else (if (b =? 114) then (ctor Option.some [Bytes] 0x0d) else (if (b =? 34) then (ctor Option.some [Bytes] 0x22) else (if (b =? 92) then (ctor Option.some [Bytes] 0x5c) else (if (b =? 47) then (ctor Option.some [Bytes] 0x2f) else (if (b =? 98) then (ctor Option.some [Bytes] 0x08) else (if (b =? 102) then (ctor Option.some [Bytes] 0x0c) else (ctor Option.none [Bytes]))))))))) +} + +definition{ + name: runEnd, + parameters: [s : Bytes, i : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => i + | Nat.succ rest => (let b : Nat := (at s i); (if (((b =? 34) || (b =? 92)) || ((Foundation.Bytes::byteLength s) (ctor Option.none [Bytes]) + | Nat.succ rest => (let e : Nat := (runEnd s i (Foundation.Bytes::byteLength s)); (let got : Bytes := (Foundation.Bytes::appendBytes acc (span s i e)); (if ((at s e) =? 34) then (ctor Option.some [Bytes] got) else (if ((at s e) =? 92) then (match (escaped (at s (e + 1))) + | Option.none => (ctor Option.none [Bytes]) + | Option.some c => (unescapeFrom s (e + 2) (Foundation.Bytes::appendBytes got c) rest)) else (ctor Option.none [Bytes])))))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: text, + parameters: [s : Bytes, i : Nat], + result: (Option Bytes), + body: (if ((at s i) =? 34) then (unescapeFrom s (i + 1) 0x (Foundation.Bytes::byteLength s)) else (ctor Option.none [Bytes])), + axioms: [Quot.sound, propext] +} + +definition{ + name: textAt, + parameters: [s : Bytes, i : (Option Nat)], + result: Bytes, + body: (match i + | Option.none => 0x + | Option.some v => (match (text s v) | Option.none => 0x | Option.some b => b)), + axioms: [Quot.sound, propext] +} + +definition{ + name: memberAt, + parameters: [s : Bytes, i : (Option Nat), key : Bytes], + result: (Option Nat), + body: (match i | Option.none => (ctor Option.none [Nat]) | Option.some v => (member s v key)), + axioms: [Quot.sound, propext] +} + +definition{ + name: elementAt, + parameters: [s : Bytes, i : (Option Nat), n : Nat], + result: (Option Nat), + body: (match i | Option.none => (ctor Option.none [Nat]) | Option.some v => (element s v n)), + axioms: [Quot.sound, propext] +} + +definition{ + name: countAt, + parameters: [s : Bytes, i : (Option Nat)], + result: Nat, + body: (match i | Option.none => 0 | Option.some v => (count s v)), + axioms: [Quot.sound, propext] +} + +definition{ + name: root, + parameters: [s : Bytes], + result: (Option Nat), + body: (ctor Option.some [Nat] (space s 0)), + axioms: [Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/generators/emma/src/Foundation/Tar.lex.tex b/generators/emma/src/Foundation/Tar.lex.tex new file mode 100644 index 00000000..f6597aa4 --- /dev/null +++ b/generators/emma/src/Foundation/Tar.lex.tex @@ -0,0 +1,100 @@ +\begin{lexlean}{Foundation.Tar} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{prism.arch@1.0.0} +\importmodule{Foundation.Bytes} +\title{Tar archive reader} +\begin{semanticmodule} +definition{ + name: byteOr, + parameters: [s : Bytes, i : Nat], + result: Nat, + body: (match (Foundation.Bytes::byteAt s i) + | Option.none => 0 + | Option.some b => (prim to_nat b : Nat)), + axioms: [Quot.sound, propext] +} + +definition{ + name: sameBytes, + parameters: [left : Bytes, right : Bytes], + result: Bool, + body: (prim equal (prim compare_bytes left right : Ordering) (prim compare_bytes 0x00 0x00 : Ordering) : Bool), + axioms: [propext] +} + +definition{ + name: nulFrom, + parameters: [s : Bytes, i : Nat, stop : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => i + | Nat.succ rest => (if (stop 0x + | Option.some b => b)), + axioms: [Quot.sound, propext] +} + +definition{ + name: octalFrom, + parameters: [s : Bytes, i : Nat, acc : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => acc + | Nat.succ rest => (let b : Nat := (byteOr s i); (if ((b (ctor Option.none [Bytes]) + | Nat.succ rest => (if ((byteOr s header) =? 0) then (ctor Option.none [Bytes]) else (let size : Nat := (entrySize s header); (if (sameBytes (entryName s header) path) then (Foundation.Bytes::sliceBytes s (header + 512) size) else (findFrom s path ((header + 512) + (padded size)) rest))))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: find, + parameters: [archive : Bytes, path : Bytes], + result: (Option Bytes), + body: (findFrom archive path 0 (prim quotient (Foundation.Bytes::byteLength archive) 512 0 : Nat)), + axioms: [Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/generators/emma/src/Foundation/Utf8.lex.tex b/generators/emma/src/Foundation/Utf8.lex.tex new file mode 100644 index 00000000..7c90158a --- /dev/null +++ b/generators/emma/src/Foundation/Utf8.lex.tex @@ -0,0 +1,22 @@ +\begin{lexlean}{Foundation.Utf8} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{prism.arch@1.0.0} +\title{Unicode text codec} +\begin{semanticmodule} +definition{ + name: encode, + parameters: [value : String], + result: Bytes, + body: (prim utf8_encode value : Bytes) +} + +definition{ + name: decode, + parameters: [value : Bytes], + result: (Option String), + body: (prim utf8_decode value : (Option String)), + axioms: [Classical.choice, Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/generators/emma/src/Foundation/View/Text/V1/Model.lex.tex b/generators/emma/src/Foundation/View/Text/V1/Model.lex.tex new file mode 100644 index 00000000..dcd17fae --- /dev/null +++ b/generators/emma/src/Foundation/View/Text/V1/Model.lex.tex @@ -0,0 +1,63 @@ +\begin{lexlean}{Foundation.View.Text.V1.Model} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{prism.arch@1.0.0} +\title{Text application model} +\begin{semanticmodule} +structure{ + name: TextView, + type_parameters: [], + parameters: [], + fields: [ + {name: title, type: String}, + {name: heading, type: String}, + {name: inputLabel, type: String}, + {name: submitLabel, type: String}, + {name: outputLabel, type: String}, + {name: inputError, type: String}, + {name: responseError, type: String} + ] +} + +structure{ + name: AcceptanceVector, + type_parameters: [], + parameters: [], + fields: [{name: request, type: Bytes}, {name: response, type: Bytes}] +} + +structure{ + name: TextApplication, + type_parameters: [], + parameters: [], + fields: [ + {name: profile, type: String}, + {name: name, type: String}, + {name: cargoName, type: String}, + {name: cargoVersion, type: String}, + {name: cargoDescription, type: String}, + {name: cargoRepository, type: String}, + {name: cargoHomepage, type: String}, + {name: libraryRoots, type: (List String)}, + {name: acceptanceVectors, type: (List AcceptanceVector)}, + {name: entryRoot, type: String}, + {name: coreContract, type: String}, + {name: requestMaximum, type: UInt32}, + {name: responseMaximum, type: UInt32}, + {name: guestAllocationMaximum, type: UInt32}, + {name: capabilitiesEmpty, type: Bool}, + {name: fatArchive, type: Bool}, + {name: primaryLayer, type: UInt8}, + {name: viewLayer, type: UInt8}, + {name: view, type: TextView} + ] +} + +definition{ + name: textApplicationProfile, + parameters: [], + result: String, + body: "prismpm/text-application/1" +} +\end{semanticmodule} +\end{lexlean} diff --git a/generators/emma/src/Foundation/View/Text/V3/Model.lex.tex b/generators/emma/src/Foundation/View/Text/V3/Model.lex.tex new file mode 100644 index 00000000..af0ed114 --- /dev/null +++ b/generators/emma/src/Foundation/View/Text/V3/Model.lex.tex @@ -0,0 +1,410 @@ +\begin{lexlean}{Foundation.View.Text.V3.Model} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{prism.arch@1.0.0} +\importmodule{Foundation.View.Text.V1.Model} +\title{Text application model} +\begin{semanticmodule} +structure{ + name: TextCliOutcome, + type_parameters: [], + parameters: [], + fields: [{name: name, type: String}, {name: prefix, type: String}, {name: exitCode, type: UInt8}] +} + +structure{ + name: TextCliSection, + type_parameters: [], + parameters: [], + fields: [{name: title, type: String}, {name: body, type: String}] +} + +structure{ + name: TextCliExample, + type_parameters: [], + parameters: [], + fields: [{name: name, type: String}, {name: text, type: String}] +} + +structure{ + name: TextCli, + type_parameters: [], + parameters: [], + fields: [ + {name: command, type: String}, + {name: description, type: String}, + {name: usageCode, type: UInt8}, + {name: ioCode, type: UInt8}, + {name: limitCode, type: (Option UInt8)}, + {name: outcomes, type: (List TextCliOutcome)}, + {name: sections, type: (List TextCliSection)}, + {name: examples, type: (List TextCliExample)} + ] +} + +inductive{ + name: TextCliFailure, + type_parameters: [], + parameters: [], + constructors: [ + {name: UnknownFlag, fields: []}, + {name: ExtraArgument, fields: []}, + {name: MissingCommand, fields: []}, + {name: UnknownCommand, fields: []}, + {name: UnknownExample, fields: []}, + {name: InputMissing, fields: []}, + {name: InputOpen, fields: []}, + {name: InputType, fields: []}, + {name: InputRead, fields: []}, + {name: OutputWrite, fields: []}, + {name: InputLimit, fields: []}, + {name: AdapterAllocation, fields: []}, + {name: ComputeFailure, fields: []}, + {name: OutputLimit, fields: []}, + {name: ReportUnclassified, fields: []} + ] +} + +inductive{ + name: TextCliFailureClass, + type_parameters: [], + parameters: [], + constructors: [ + {name: Usage, fields: []}, + {name: Io, fields: []}, + {name: Limit, fields: []}, + {name: Fault, fields: []} + ] +} + +definition{ + name: failureClass, + parameters: [failure : TextCliFailure], + result: TextCliFailureClass, + body: (match failure + | TextCliFailure.UnknownFlag => (ctor TextCliFailureClass.Usage) + | TextCliFailure.ExtraArgument => (ctor TextCliFailureClass.Usage) + | TextCliFailure.MissingCommand => (ctor TextCliFailureClass.Usage) + | TextCliFailure.UnknownCommand => (ctor TextCliFailureClass.Usage) + | TextCliFailure.UnknownExample => (ctor TextCliFailureClass.Usage) + | TextCliFailure.InputMissing => (ctor TextCliFailureClass.Io) + | TextCliFailure.InputOpen => (ctor TextCliFailureClass.Io) + | TextCliFailure.InputType => (ctor TextCliFailureClass.Io) + | TextCliFailure.InputRead => (ctor TextCliFailureClass.Io) + | TextCliFailure.OutputWrite => (ctor TextCliFailureClass.Io) + | TextCliFailure.InputLimit => (ctor TextCliFailureClass.Limit) + | TextCliFailure.AdapterAllocation => (ctor TextCliFailureClass.Fault) + | TextCliFailure.ComputeFailure => (ctor TextCliFailureClass.Fault) + | TextCliFailure.OutputLimit => (ctor TextCliFailureClass.Fault) + | TextCliFailure.ReportUnclassified => (ctor TextCliFailureClass.Fault)), + axioms: [] +} + +inductive{ + name: FieldKind, + type_parameters: [], + parameters: [], + constructors: [ + {name: Text, fields: []}, + {name: Multiline, fields: []}, + {name: Natural, fields: []}, + {name: Choice, fields: []} + ] +} + +inductive{ + name: Palette, + type_parameters: [], + parameters: [], + constructors: [{name: Indigo, fields: []}, {name: Ocean, fields: []}] +} + +inductive{ + name: Density, + type_parameters: [], + parameters: [], + constructors: [{name: Comfortable, fields: []}, {name: Compact, fields: []}] +} + +inductive{ + name: Width, + type_parameters: [], + parameters: [], + constructors: [{name: Balanced, fields: []}, {name: Wide, fields: []}] +} + +inductive{ + name: ColorScheme, + type_parameters: [], + parameters: [], + constructors: [{name: System, fields: []}, {name: Light, fields: []}, {name: Dark, fields: []}] +} + +inductive{ + name: WasmCachePolicy, + type_parameters: [], + parameters: [], + constructors: [{name: NoStore, fields: []}] +} + +structure{ + name: Choice, + type_parameters: [], + parameters: [], + fields: [{name: value, type: String}, {name: label, type: String}] +} + +structure{ + name: Field, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: label, type: String}, + {name: kind, type: FieldKind}, + {name: help, type: String}, + {name: placeholder, type: String}, + {name: initialValue, type: String}, + {name: required, type: Bool}, + {name: choices, type: (List Choice)} + ] +} + +structure{ + name: Example, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: label, type: String}, + {name: description, type: String}, + {name: values, type: (List String)}, + {name: expectedResponse, type: String}, + {name: explanation, type: String} + ] +} + +structure{ + name: Operation, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: label, type: String}, + {name: summary, type: String}, + {name: help, type: String}, + {name: requestPrefix, type: String}, + {name: fields, type: (List Field)}, + {name: examples, type: (List Example)} + ] +} + +structure{ + name: Section, + type_parameters: [], + parameters: [], + fields: [ + {name: id, type: String}, + {name: title, type: String}, + {name: paragraphs, type: (List String)} + ] +} + +structure{ + name: Link, + type_parameters: [], + parameters: [], + fields: [{name: label, type: String}, {name: httpsUrl, type: String}] +} + +structure{ + name: ErrorHint, + type_parameters: [], + parameters: [], + fields: [ + {name: code, type: String}, + {name: title, type: String}, + {name: explanation, type: String}, + {name: recovery, type: String}, + {name: fields, type: (List String)} + ] +} + +structure{ + name: StatusCopy, + type_parameters: [], + parameters: [], + fields: [ + {name: scriptRequired, type: String}, + {name: initializing, type: String}, + {name: ready, type: String}, + {name: running, type: String}, + {name: cancelling, type: String}, + {name: cancelled, type: String}, + {name: timeout, type: String}, + {name: loadError, type: String}, + {name: computeError, type: String}, + {name: inputError, type: String}, + {name: responseError, type: String} + ] +} + +structure{ + name: Design, + type_parameters: [], + parameters: [], + fields: [ + {name: palette, type: Palette}, + {name: density, type: Density}, + {name: width, type: Width}, + {name: colorScheme, type: ColorScheme} + ] +} + +structure{ + name: RawEditor, + type_parameters: [], + parameters: [], + fields: [ + {name: requestPrefix, type: String}, + {name: label, type: String}, + {name: help, type: String}, + {name: placeholder, type: String}, + {name: initialValue, type: String}, + {name: submitLabel, type: String}, + {name: responseLabel, type: String}, + {name: expanded, type: Bool} + ] +} + +structure{ + name: DisplaySpec, + type_parameters: [], + parameters: [], + fields: [ + {name: title, type: String}, + {name: emptyText, type: String}, + {name: rawLabel, type: String}, + {name: maximumCells, type: UInt32}, + {name: maximumDetails, type: UInt32} + ] +} + +structure{ + name: Execution, + type_parameters: [], + parameters: [], + fields: [ + {name: timeoutMilliseconds, type: UInt32}, + {name: cancelLabel, type: String}, + {name: retryLabel, type: String}, + {name: wasmCachePolicy, type: WasmCachePolicy} + ] +} + +structure{ + name: WorkbenchLabels, + type_parameters: [], + parameters: [], + fields: [ + {name: navigation, type: String}, + {name: operation, type: String}, + {name: examples, type: String}, + {name: loadExample, type: String}, + {name: compute, type: String}, + {name: guide, type: String}, + {name: links, type: String}, + {name: fields, type: String}, + {name: expectedResponse, type: String}, + {name: details, type: String}, + {name: resultTable, type: String}, + {name: row, type: String}, + {name: column, type: String}, + {name: request, type: String}, + {name: reset, type: String}, + {name: skipToWorkbench, type: String} + ] +} + +structure{ + name: WorkbenchView, + type_parameters: [], + parameters: [], + fields: [ + {name: title, type: String}, + {name: heading, type: String}, + {name: purpose, type: String}, + {name: audience, type: String}, + {name: guidance, type: (List String)}, + {name: initialOperation, type: String}, + {name: initialExample, type: String}, + {name: operations, type: (List Operation)}, + {name: sections, type: (List Section)}, + {name: links, type: (List Link)}, + {name: errors, type: (List ErrorHint)}, + {name: statuses, type: StatusCopy}, + {name: design, type: Design}, + {name: raw, type: RawEditor}, + {name: response, type: DisplaySpec}, + {name: execution, type: Execution}, + {name: labels, type: WorkbenchLabels} + ] +} + +structure{ + name: TextApplication, + type_parameters: [], + parameters: [], + fields: [ + {name: profile, type: String}, + {name: name, type: String}, + {name: cargoName, type: String}, + {name: cargoVersion, type: String}, + {name: cargoDescription, type: String}, + {name: cargoRepository, type: String}, + {name: cargoHomepage, type: String}, + {name: libraryRoots, type: (List String)}, + {name: acceptanceVectors, type: (List Foundation.View.Text.V1.Model::AcceptanceVector)}, + {name: entryRoot, type: String}, + {name: coreContract, type: String}, + {name: requestMaximum, type: UInt32}, + {name: responseMaximum, type: UInt32}, + {name: guestAllocationMaximum, type: UInt32}, + {name: coreMemoryPages, type: (Option UInt32)}, + {name: coreStackBytes, type: (Option UInt32)}, + {name: capabilitiesEmpty, type: Bool}, + {name: fatArchive, type: Bool}, + {name: primaryLayer, type: UInt8}, + {name: viewLayer, type: UInt8}, + {name: view, type: Foundation.View.Text.V1.Model::TextView}, + {name: cli, type: TextCli}, + {name: workbench, type: (Option WorkbenchView)} + ] +} + +definition{name: defaultCoreMemoryPages, parameters: [], result: UInt32, body: (32 : UInt32)} + +definition{name: defaultCoreStackBytes, parameters: [], result: UInt32, body: (65536 : UInt32)} + +definition{ + name: coreMemoryPagesOrDefault, + parameters: [pages : (Option UInt32)], + result: UInt32, + body: (match pages | Option.none => (defaultCoreMemoryPages) | Option.some value => value) +} + +definition{ + name: coreStackBytesOrDefault, + parameters: [bytes : (Option UInt32)], + result: UInt32, + body: (match bytes | Option.none => (defaultCoreStackBytes) | Option.some value => value) +} + +definition{ + name: textApplicationProfile, + parameters: [], + result: String, + body: "prismpm/text-application/3" +} +\end{semanticmodule} +\end{lexlean} diff --git a/generators/emma/src/GenEmma.lex.tex b/generators/emma/src/GenEmma.lex.tex new file mode 100644 index 00000000..44cd80a8 --- /dev/null +++ b/generators/emma/src/GenEmma.lex.tex @@ -0,0 +1,179 @@ +\begin{lexlean}{GenEmma} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{prism.arch@1.0.0} +\importmodule{Foundation.Bytes} +\importmodule{Foundation.Json} +\importmodule{Foundation.Tar} +\importmodule{Foundation.Utf8} +\title{Implementation report table generator} +\begin{semanticmodule} +definition{ + name: emmaCat, + parameters: [parts : (List Bytes)], + result: Bytes, + body: (match parts + | List.nil => 0x + | List.cons head rest => (Foundation.Bytes::appendBytes head (emmaCat rest))), + recursive_argument: parts +} + +definition{ + name: emmaStartsAt, + parameters: [s : Bytes, i : Nat, pattern : Bytes], + result: Bool, + body: (Foundation.Tar::sameBytes (Foundation.Json::span s i (i + (Foundation.Bytes::byteLength pattern))) pattern), + axioms: [propext] +} + +definition{ + name: emmaU, + parameters: [value : String], + result: Bytes, + body: (Foundation.Utf8::encode value) +} + +definition{ + name: emmaLineEndAt, + parameters: [s : Bytes, i : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => i + | Nat.succ rest => (if ((Foundation.Bytes::byteLength s) (Foundation.Bytes::byteLength s) + | Nat.succ rest => (if ((Foundation.Bytes::byteLength s) acc + | Nat.succ rest => (if (stop i + | Nat.succ rest => (if (emmaIsSpace (Foundation.Tar::byteOr s i)) then (emmaInsetEnd s (i + 1) rest) else i)), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emmaLineFrom, + parameters: [s : Bytes, j : Nat, z : Nat, acc : Bytes, fuel : Nat], + result: Bytes, + body: (match fuel + | Nat.zero => acc + | Nat.succ rest => (if (z acc + | Nat.succ rest => (let n : Nat := (Foundation.Bytes::byteLength s); (if (n (ctor Option.none [Bytes]) + | Option.some piece => (ctor Option.some [Bytes] (emmaFactsFrom piece 0 0x (Foundation.Bytes::byteLength piece)))), + axioms: [Quot.sound, propext] +} + +definition{ + name: emmaDigitsEnd, + parameters: [s : Bytes, i : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => i + | Nat.succ rest => (let b : Nat := (Foundation.Tar::byteOr s i); (if ((47 (ctor Option.none [Bytes]) + | Nat.succ rest => (let n : Nat := (Foundation.Bytes::byteLength s); (let nl : Nat := (emmaFind s i 0x0a n); (if (n (ctor Option.none [Bytes]) + | Option.some entry => (emmaRowsFrom s (nl + 1) (emmaCat (cons acc (cons (if ((Foundation.Bytes::byteLength acc) =? 0) then 0x5b0a else 0x2c0a) (cons entry (nil Bytes))))) rest))))))))))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: emmaGenerate, + parameters: [archive : Bytes], + result: (Option Bytes), + body: (match (Foundation.Tar::find archive (emmaU ".gen/emma-irp-facts")) + | Option.none => (ctor Option.none [Bytes]) + | Option.some facts => (match (emmaRowsFrom facts 0 0x (Foundation.Bytes::byteLength facts)) + | Option.none => (ctor Option.none [Bytes]) + | Option.some rows => (if ((Foundation.Bytes::byteLength rows) =? 0) then (ctor Option.none [Bytes]) else (ctor Option.some [Bytes] (Foundation.Bytes::appendBytes rows 0x0a5d0a))))), + axioms: [Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/generators/emma/src/Generators.lex.tex b/generators/emma/src/Generators.lex.tex new file mode 100644 index 00000000..cb34973f --- /dev/null +++ b/generators/emma/src/Generators.lex.tex @@ -0,0 +1,76 @@ +\begin{lexlean}{Generators} +\useglossary{lexlean.std.bool@1.2.0} +\useglossary{lexlean.std.nat@1.2.0} +\useglossary{prism.arch@1.0.0} +\importmodule{Foundation.Bytes} +\importmodule{GenEmma} +\importmodule{Foundation.Tar} +\importmodule{Foundation.View.Text.V1.Model} +\importmodule{Foundation.View.Text.V3.Model} +\title{Text application model} +\begin{semanticmodule} +definition{ + name: application, + parameters: [], + result: Foundation.View.Text.V3.Model::TextApplication, + body: (record Foundation.View.Text.V3.Model::TextApplication {profile := "prismpm/text-application/3", name := "Prism generators", cargoName := "prism-generators", cargoVersion := "0.1.0", cargoDescription := "The EMMA assertion register generator of the Prism of its owner, each a LexLean module.", cargoRepository := "https://github.com/afflom/me", cargoHomepage := "https://afflom.github.io/me/", libraryRoots := (cons "PrismGenerators.Generators.dispatch" (nil String)), acceptanceVectors := (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x, response := 0x696e76616c6964}) (cons (record Foundation.View.Text.V1.Model::AcceptanceVector {request := 0x7878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878, response := 0x696e76616c6964}) (nil Foundation.View.Text.V1.Model::AcceptanceVector))), entryRoot := "PrismGenerators.Generators.dispatch", coreContract := "hologram:guest/core-wasm@1", requestMaximum := (32768 : UInt32), responseMaximum := (65536 : UInt32), guestAllocationMaximum := (32768 : UInt32), coreMemoryPages := (ctor Option.some [UInt32] (512 : UInt32)), coreStackBytes := (ctor Option.some [UInt32] (1048576 : UInt32)), capabilitiesEmpty := true, fatArchive := true, primaryLayer := (0 : UInt8), viewLayer := (1 : UInt8), view := (record Foundation.View.Text.V1.Model::TextView {title := "Prism generators", heading := "Prism generators", inputLabel := "Request", submitLabel := "Run", outputLabel := "Report", inputError := "Invalid request", responseError := "Invalid response"}), cli := (record Foundation.View.Text.V3.Model::TextCli {command := "run", description := "Runs one of the Prism generators over a ustar archive of its inputs and prints the file it writes.\n", usageCode := (64 : UInt8), ioCode := (74 : UInt8), limitCode := (ctor Option.none [UInt8]), outcomes := (cons (record Foundation.View.Text.V3.Model::TextCliOutcome {name := "written", prefix := "written", exitCode := (0 : UInt8)}) (cons (record Foundation.View.Text.V3.Model::TextCliOutcome {name := "refused", prefix := "refused: ", exitCode := (1 : UInt8)}) (cons (record Foundation.View.Text.V3.Model::TextCliOutcome {name := "error", prefix := "invalid", exitCode := (2 : UInt8)}) (nil Foundation.View.Text.V3.Model::TextCliOutcome)))), sections := (cons (record Foundation.View.Text.V3.Model::TextCliSection {title := "REQUEST", body := "The first line names a generator and its output path, then a POSIX ustar archive of its inputs follows.\n"}) (cons (record Foundation.View.Text.V3.Model::TextCliSection {title := "REPORT", body := "written and a newline, then the output file; or refused: and the reasons; or invalid.\n"}) (nil Foundation.View.Text.V3.Model::TextCliSection))), examples := (cons (record Foundation.View.Text.V3.Model::TextCliExample {name := "unknown", text := "nothing\n"}) (nil Foundation.View.Text.V3.Model::TextCliExample))}), workbench := (ctor Option.none [Foundation.View.Text.V3.Model::WorkbenchView])}) +} + +definition{ + name: lineEnd, + parameters: [s : Bytes, i : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => i + | Nat.succ rest => (if ((Foundation.Tar::byteOr s i) =? 10) then i else (lineEnd s (i + 1) rest))), + axioms: [Quot.sound, propext], + recursive_argument: fuel +} + +definition{ + name: sliceOr, + parameters: [s : Bytes, start : Nat, count : Nat], + result: Bytes, + body: (match (Foundation.Bytes::sliceBytes s start count) + | Option.none => 0x + | Option.some b => b) +} + +definition{ + name: wordEnd, + parameters: [s : Bytes, i : Nat, stop : Nat, fuel : Nat], + result: Nat, + body: (match fuel + | Nat.zero => i + | Nat.succ rest => (if (stop (refused 0x6e656564732074686520496d706c656d656e746174696f6e205265706f727420506c616e206b65707420756e646572206170702f73706563732f7374616e64617264732f7465787473) + | Option.some file => (written file)) else (if (Foundation.Tar::sameBytes name 0x656d6d61) then (match (GenEmma::emmaGenerate archive) + | Option.none => (refused 0x6e65656473202e67656e2f656d6d612d6972702d66616374732077697468207468652063656c6c73206f66206561636820617373657274696f6e20726f773a2069642c20666561747572652c2073656374696f6e2c2072657175697265642c2073656d616e74696373) + | Option.some file => (written file)) else 0x696e76616c6964)))))))))), + axioms: [Quot.sound, propext] +} +\end{semanticmodule} +\end{lexlean} diff --git a/generators/emma/steps.json b/generators/emma/steps.json new file mode 100644 index 00000000..d745c19e --- /dev/null +++ b/generators/emma/steps.json @@ -0,0 +1,16 @@ +{ + "steps": [ + { + "generator": "emmafacts", + "split": "app/specs/standards/texts/ce9766f3c28a4eed8cf036426824f8ce8d06bf31fac0ad487814ad17368ed0ce", + "output": ".gen/emma-irp-facts" + }, + { + "generator": "emma", + "inputs": [ + ".gen/emma-irp-facts" + ], + "output": "test/standards/generated/w3c-emma-1.0.json" + } + ] +} diff --git a/generators/guests/steps/emma.json b/generators/guests/steps/emma.json new file mode 100644 index 00000000..fb0390c7 --- /dev/null +++ b/generators/guests/steps/emma.json @@ -0,0 +1,11 @@ +{ + "steps": [ + { + "generator": "guestpin", + "inputs": [ + "app/specs/guests/emma/*.json" + ], + "output": "site/emma/guest.mjs" + } + ] +} diff --git a/site/emma/guest.mjs b/site/emma/guest.mjs new file mode 100644 index 00000000..2a032dc7 --- /dev/null +++ b/site/emma/guest.mjs @@ -0,0 +1,40 @@ +// Generated by generators/guests from app/specs/guests (GU-01): the standalone +// guests of PrismEmma, PrismEmma, PrismEmma, PrismEmma, PrismEmma, PrismEmma, PrismEmma, PrismEmma, built by tools/guests/build.sh from the modules the +// Prism compiles, so the Node suites run every request without the holo. Each +// exports holo_alloc(len) and holo_run(ptr, len) -> (outPtr << 32 | outLen); +// bytes whose SHA-256 is not the pinned one are refused before they compile. + +export const GUESTS = { + annotations: { path: 'guest/emma.wasm', sha256: '2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d' }, + input: { path: 'guest/emma.wasm', sha256: '2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d' }, + otherAnnotations: { path: 'guest/emma.wasm', sha256: '2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d' }, + other: { path: 'guest/emma.wasm', sha256: '2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d' }, + read: { path: 'guest/emma.wasm', sha256: '2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d' }, + writtenCheck: { path: 'guest/emma.wasm', sha256: '2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d' }, + written: { path: 'guest/emma.wasm', sha256: '2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d' }, + emma: { path: 'guest/emma.wasm', sha256: '2fd2e84515e93bf4fd2b32fe9b681f44d9d5ce316b5491cd024d3747cf421d3d' }, +}; + +const hex = (u8) => Array.from(u8, (b) => b.toString(16).padStart(2, '0')).join(''); +const encoder = new TextEncoder(); +const decoder = new TextDecoder('utf-8', { fatal: true }); + +async function compile(bytes, sha256) { + const got = hex(new Uint8Array(await crypto.subtle.digest('SHA-256', bytes))); + if (got !== sha256) throw Object.assign(new Error(`guest refused: fingerprint ${got} is not ${sha256}`), { code: 'emma.guest' }); + return WebAssembly.compile(bytes); +} + +function run(x, line) { + const input = encoder.encode(line); + const ptr = x.holo_alloc(input.length); + new Uint8Array(x.memory.buffer, ptr, input.length).set(input); + const packed = BigInt.asUintN(64, BigInt(x.holo_run(ptr, input.length))); + return decoder.decode(new Uint8Array(x.memory.buffer, Number(packed >> 32n), Number(packed & 0xffffffffn))); +} + +// A fresh instance per request: the guest's allocator never frees, and no state carries over. +export async function openGuest(bytes, sha256) { + const module = await compile(bytes, sha256); + return async (line) => run((await WebAssembly.instantiate(module, {})).exports, line); +} diff --git a/site/emma/guest/emma.wasm b/site/emma/guest/emma.wasm new file mode 100644 index 00000000..e620c3ff Binary files /dev/null and b/site/emma/guest/emma.wasm differ diff --git a/test/parts/parts.txt b/test/parts/parts.txt index df8ebc8b..60106f30 100644 --- a/test/parts/parts.txt +++ b/test/parts/parts.txt @@ -31,6 +31,7 @@ app/src/PrismCurate.lex.tex app/src/PrismCurateProofs.lex.tex app/src/PrismDest.lex.tex app/src/PrismDestProofs.lex.tex +app/src/PrismEmma.lex.tex app/src/PrismFolder.lex.tex app/src/PrismFolderProofs.lex.tex app/src/PrismGoogle.lex.tex @@ -97,6 +98,7 @@ site/device/extension.mjs site/device/host.mjs site/device/probe.mjs site/device/zip.mjs +site/emma/guest.mjs site/extension/background.js site/extension/bridge.js site/extension/name.js diff --git a/test/standards/generated/w3c-emma-1.0.json b/test/standards/generated/w3c-emma-1.0.json new file mode 100644 index 00000000..1c0ae395 --- /dev/null +++ b/test/standards/generated/w3c-emma-1.0.json @@ -0,0 +1,69 @@ +[ + {"id": "w3c-emma-1.0-100", "ref": "3.1", "text": "EMMA documents MUST have emma:emma as the root element.", "kind": "must"}, + {"id": "w3c-emma-1.0-200", "ref": "3.2", "text": "Application namespace markup representing the interpretation of inputs MUST be contained within the emma:interpretation element.", "kind": "must"}, + {"id": "w3c-emma-1.0-201", "ref": "3.2", "text": "SUB CONSTRAINT: If the emma:interpretation element is empty, then it MUST be annotated as emma:uninterpreted=\"true' or emma:no-input=\"true\".", "kind": "must"}, + {"id": "w3c-emma-1.0-300", "ref": "3.3.1", "text": "EMMA N-best interpretations MUST be contained within an emma:one-of element.", "kind": "must"}, + {"id": "w3c-emma-1.0-301", "ref": "3.3.1", "text": "SUB CONSTRAINT: EMMA N-best interpretations contained within an emma:one-of element MUST be ordered best-first in document order where the measure is emma:confidence if present, otherwise the quality metric is platform specific.", "kind": "must"}, + {"id": "w3c-emma-1.0-310", "ref": "3.3.1", "text": "SUB CONSTRAINT: If an emma:one-of element contains other emma:one-of elements, (embedded one-of), emma:one-of elements MUST contain a disjunction-type attribute indicating the reason for the multiple interpretations.", "kind": "must"}, + {"id": "w3c-emma-1.0-400", "ref": "3.3.2", "text": "Interpretations of distinct inputs MAY be represented in a single EMMA document within the emma:group element.", "kind": "may"}, + {"id": "w3c-emma-1.0-402", "ref": "3.3.2.1", "text": "Information describing the criteria used in determining the grouping of interpretations within an emma:group MAY be indicated within an emma:group-info child element within emma:group.", "kind": "may"}, + {"id": "w3c-emma-1.0-500", "ref": "3.3.3", "text": "A temporally ordered sequence of distinct inputs MAY be contained within an emma:sequence element with document order corresponding to temporal order.", "kind": "may"}, + {"id": "w3c-emma-1.0-600", "ref": "3.4", "text": "Lattices SHOULD be represented as an emma:lattice element containing a series of emma:arc and emma:node elements.", "kind": "may"}, + {"id": "w3c-emma-1.0-602", "ref": "3.4.1", "text": "SUB CONSTRAINT: The value of the initial attribute on emma:lattice MUST be the value of the from attribute on at least one of the emma:arc elements that it contains.", "kind": "must"}, + {"id": "w3c-emma-1.0-603", "ref": "3.4.1", "text": "SUB CONSTRAINT: The value of each space separated number within the final attribute on emma:lattice MUST be the value of the to attribute on at least one of the emma:arc elements that it contains.", "kind": "must"}, + {"id": "w3c-emma-1.0-604", "ref": "3.4.1", "text": "SUB CONSTRAINT: The value of a to attribute on emma:arc MUST be the value of a from attribute on at least one of its emma:arc siblings or be one of the final values on the parent emma:lattice element.", "kind": "must"}, + {"id": "w3c-emma-1.0-605", "ref": "3.4.1", "text": "SUB CONSTRAINT: The value of a from attribute on emma:arc MUST be the value of a to attribute on at least one of its emma:arc siblings or be the initial value on the parent emma:lattice element.", "kind": "must"}, + {"id": "w3c-emma-1.0-606", "ref": "3.4.1", "text": "SUB CONSTRAINT: Any epsilon transitions in the lattice MUST be represented as emma:arc elements with no content other than emma:info.", "kind": "must"}, + {"id": "w3c-emma-1.0-607", "ref": "3.4.1", "text": "SUB CONSTRAINT: The content of the emma:arc element MUST be either an application namespace XML element, well-formed character content, an application namespace element and an emma:info element, or well-formed character content and an emma:info element.", "kind": "must"}, + {"id": "w3c-emma-1.0-608", "ref": "3.4.1", "text": "SUB CONSTRAINT: There MUST be no more than one emma:node specification for each numbered node in the lattice.", "kind": "must"}, + {"id": "w3c-emma-1.0-609", "ref": "3.4.1", "text": "SUB CONSTRAINT: For each emma:node specification, the value of the node-number attribute MUST appear as the value of at some from or to attribute in one of the sibling emma:arc elements.", "kind": "must"}, + {"id": "w3c-emma-1.0-700", "ref": "3.5", "text": "String literal semantic interpretations MUST be wrapped with the tag emma:literal.", "kind": "must"}, + {"id": "w3c-emma-1.0-800", "ref": "4.1.1", "text": "The data model of the application semantic markup MAY appear within the emma:model element.", "kind": "may"}, + {"id": "w3c-emma-1.0-810", "ref": "4.2.16", "text": "SUB CONSTRAINT: If emma:model appears as a child of emma:emma, there MUST be emma:one-of or emma:interpretation elements within emma:emma with emma:model-ref attributes that refer to the id of the emma:model child of emma:emma.", "kind": "must"}, + {"id": "w3c-emma-1.0-811", "ref": "4.2.16", "text": "SUB CONSTRAINT: If emma:model-ref appears on an emma:interpretation or emma:one-of, there MUST be an emma:model child of the dominating emma:emma whose id value equals the value of the emma:model-ref attribute.", "kind": "must"}, + {"id": "w3c-emma-1.0-901", "ref": "4.1.2", "text": "The interpretation of all but the first stage of processing MAY contain an emma:derived-from element with an attribute resource which refers to the interpretation from which that interpretation was derived.", "kind": "may"}, + {"id": "w3c-emma-1.0-904", "ref": "4.1.2", "text": "SUB CONSTRAINT:If there is more than one emma:derived-from within an emma:interpretation or emma:one-of, then all of the emma:derived-from elements MUST have the attribute composite=\"true\".", "kind": "must"}, + {"id": "w3c-emma-1.0-910", "ref": "4.1.2", "text": "The interpretation resulting of the most recent processing step MUST appear as a child of emma:emma.", "kind": "must"}, + {"id": "w3c-emma-1.0-911", "ref": "4.1.2", "text": "If interpretations resulting from earlier processing steps are included they SHOULD appear as children of a single emma:derivation element within emma:emma.", "kind": "may"}, + {"id": "w3c-emma-1.0-1000", "ref": "4.1.3", "text": "The grammar used MAY be referenced using an emma:grammar element within emma:emma.", "kind": "may"}, + {"id": "w3c-emma-1.0-1001", "ref": "4.2.15", "text": "SUB CONSTRAINT: If an emma:interpretation or emma:one-of is annotated with the emma:grammar-ref attribute, then the value of the emma:grammar-ref MUST reference the id of an emma:grammar element child of emma:emma in the same document.", "kind": "must"}, + {"id": "w3c-emma-1.0-1002", "ref": "4.2.15", "text": "SUB CONSTRAINT: If an emma:grammar element appears as a child of emma:emma, then there MUST be an emma:interpretation or emma:one-of element dominated by that emma:emma, whose emma:grammar-ref attribute references the id of the emma:grammar element.", "kind": "must"}, + {"id": "w3c-emma-1.0-1100", "ref": "4.1.4", "text": "Application and vendor specific annotations SHOULD appear within emma:info.", "kind": "may"}, + {"id": "w3c-emma-1.0-1201", "ref": "4.2.1", "text": "emma:tokens MAY be used to indicate the sequence of tokens recognized in the input by the recognizer.", "kind": "may"}, + {"id": "w3c-emma-1.0-1300", "ref": "4.2.2", "text": "emma:process MAY be used to identify the process used to assign the interpretation.", "kind": "may"}, + {"id": "w3c-emma-1.0-1400", "ref": "4.2.3", "text": "emma:no-input=\"true\" MUST be used to designate lack of expected input.", "kind": "must"}, + {"id": "w3c-emma-1.0-1500", "ref": "4.2.4", "text": "Input for which the processor is unable to assign an interpretation MUST be marked as emma:uninterpreted=\"true\".", "kind": "must"}, + {"id": "w3c-emma-1.0-1600", "ref": "4.2.5", "text": "emma:lang MAY be used to designate the human language of input", "kind": "may"}, + {"id": "w3c-emma-1.0-1700", "ref": "4.2.6", "text": "emma:signal (with a URI value) MAY be used to designate the location of the signal processed by an EMMA processor.", "kind": "may"}, + {"id": "w3c-emma-1.0-1701", "ref": "4.2.6", "text": "emma:signal-size MAY be used to indicate the file size in 8-bit octets of the input signal.", "kind": "may"}, + {"id": "w3c-emma-1.0-1800", "ref": "4.2.7", "text": "emma:media-type MAY be used to designate the MIME type of the processed signal.", "kind": "may"}, + {"id": "w3c-emma-1.0-1900", "ref": "4.2.8", "text": "emma:confidence MAY be used to designate the confidence score of an input.", "kind": "may"}, + {"id": "w3c-emma-1.0-2000", "ref": "4.2.9", "text": "emma:source (with a URI value) MAY be used to designate the source device.", "kind": "may"}, + {"id": "w3c-emma-1.0-2100", "ref": "4.2.10.1", "text": "emma:start with a millisecond value MAY be used to indicate the absolute start time of an input.", "kind": "may"}, + {"id": "w3c-emma-1.0-2101", "ref": "4.2.10.1", "text": "emma:end with a millisecond value MAY be used to indicate the absolute end time of an input.", "kind": "may"}, + {"id": "w3c-emma-1.0-2201", "ref": "4.2.10.2", "text": "The emma:time-ref-uri attribute MAY be used to indicate the URI used as a reference point for relative timestamps.", "kind": "may"}, + {"id": "w3c-emma-1.0-2202", "ref": "4.2.10.2", "text": "SUB CONSTRAINT: If the emma:time-ref-uri points to an interval, emma:time-ref-anchor MUST appear on the interpretation with a value of start or end, indicating whether to use the start or end of that interval as the reference point.", "kind": "must"}, + {"id": "w3c-emma-1.0-2203", "ref": "4.2.10.2", "text": "The value of emma:offset-to-start MAY be used to indicate the number of milliseconds from the reference point to the start of the current input in a relative timestamp.", "kind": "may"}, + {"id": "w3c-emma-1.0-2204", "ref": "4.2.10.3", "text": "The emma:duration attribute value MAY be used to indicate the duration in milliseconds of the current input.", "kind": "may"}, + {"id": "w3c-emma-1.0-2300", "ref": "4.2.11", "text": "emma:medium MUST be included on all EMMA inputs, indicating the medium of input.", "kind": "must"}, + {"id": "w3c-emma-1.0-2301", "ref": "4.1.2", "text": "SUBCONSTRAINT: When EMMA inputs from different modes are combined to make a composite input, if the combining inputs have different values for emma:medium, then the value on the result MUST be a space separated list of the emma:medium values from the combining modes.", "kind": "must"}, + {"id": "w3c-emma-1.0-2310", "ref": "4.2.11", "text": "emma:mode MUST be included on all EMMA inputs, indicating the mode of input.", "kind": "must"}, + {"id": "w3c-emma-1.0-2311", "ref": "4.1.2", "text": "SUBCONSTRAINT: When EMMA inputs from different modes are combined to make a composite input, the value of emma:mode on the result MUST be a space separated list of the values on the combining inputs.", "kind": "must"}, + {"id": "w3c-emma-1.0-2320", "ref": "4.2.11", "text": "emma:function MAY be included on EMMA inputs, providing a classification of the function of the input.", "kind": "may"}, + {"id": "w3c-emma-1.0-2330", "ref": "4.2.11", "text": "emma:verbal MAY be included on EMMA inputs, indicating whether the input is verbal or non-verbal.", "kind": "may"}, + {"id": "w3c-emma-1.0-2401", "ref": "4.2.12", "text": "emma:hook MAY be used on application namespace markup to indicate where content from another mode needs to be integrated.", "kind": "may"}, + {"id": "w3c-emma-1.0-2500", "ref": "4.2.13", "text": "emma:cost MAY be used to indicate the cost or weight of an interpretation or lattice arc.", "kind": "may"}, + {"id": "w3c-emma-1.0-2510", "ref": "4.2.17", "text": "emma:dialog-turn MAY be used to indicate an identifier for the current dialog turn.", "kind": "may"}, + {"id": "w3c-emma-1.0-2600", "ref": "3.3.1", "text": "EMMA annotations appearing on emma:one-of MUST be true of all of the container elements (emma:one-of,emma:interpretation,emma:sequence,emma:group) within the emma:one-of.", "kind": "must"}, + {"id": "w3c-emma-1.0-2601", "ref": "4.3", "text": "Each EMMA annotation from the previous stage of a sequential derivation (indicated using emma:derived-from) MUST be true of the interpretations in the current stage of the derivation, unless the annotation is explicitly re-stated.", "kind": "must"}, + {"id": "w3c-emma-1.0-2700", "ref": "4.1.5", "text": "The emma:endpoint-info element MAY be used to contain emma:endpoint elements describing the characteristics of the endpoints.", "kind": "may"}, + {"id": "w3c-emma-1.0-2701", "ref": "4.1.5", "text": "The emma:endpoint element MAY be used to provide annotations regarding a communication endpoint.", "kind": "may"}, + {"id": "w3c-emma-1.0-2710", "ref": "4.2.14", "text": "The emma:endpoint-role attribute MAY be used to indicate the role of an endpoint.", "kind": "may"}, + {"id": "w3c-emma-1.0-2711", "ref": "4.2.14", "text": "The emma:endpoint-address attribute MAY be used to indicate the address of an endpoint.", "kind": "may"}, + {"id": "w3c-emma-1.0-2713", "ref": "4.2.14", "text": "The emma:port-type attribute MAY be used to indicate the type of port of an endpoint.", "kind": "may"}, + {"id": "w3c-emma-1.0-2714", "ref": "4.2.14", "text": "The emma:port-num attribute MAY be used to indicate the port number of an endpoint.", "kind": "may"}, + {"id": "w3c-emma-1.0-2715", "ref": "4.2.14", "text": "The emma:message-id attribute MAY be used to indicate the message id of an endpoint.", "kind": "may"}, + {"id": "w3c-emma-1.0-2716", "ref": "4.2.14", "text": "The emma:service-name attribute MAY be used to indicate name of service that the system provides.", "kind": "may"}, + {"id": "w3c-emma-1.0-2717", "ref": "4.2.14", "text": "The emma:endpoint-pair-ref attribute MAY be used to indicate the pairing between sink and source endpoints.", "kind": "may"}, + {"id": "w3c-emma-1.0-2718", "ref": "4.2.14", "text": "The emma:endpoint-info-ref attribute MAY be used to reference the endpoint-info element associated with an interpretation.", "kind": "may"} +] diff --git a/test/standards/requirements.json b/test/standards/requirements.json index 4c0f0cd3..d84e547a 100644 --- a/test/standards/requirements.json +++ b/test/standards/requirements.json @@ -11314,6 +11314,410 @@ "text": "collections/pages/5.2-pageTypeValidated.json" } ], + "w3c-emma-1.0": [ + { + "id": "w3c-emma-1.0-100", + "kind": "must", + "ref": "3.1", + "text": "EMMA documents MUST have emma:emma as the root element." + }, + { + "id": "w3c-emma-1.0-1000", + "kind": "may", + "ref": "4.1.3", + "text": "The grammar used MAY be referenced using an emma:grammar element within emma:emma." + }, + { + "id": "w3c-emma-1.0-1001", + "kind": "must", + "ref": "4.2.15", + "text": "SUB CONSTRAINT: If an emma:interpretation or emma:one-of is annotated with the emma:grammar-ref attribute, then the value of the emma:grammar-ref MUST reference the id of an emma:grammar element child of emma:emma in the same document." + }, + { + "id": "w3c-emma-1.0-1002", + "kind": "must", + "ref": "4.2.15", + "text": "SUB CONSTRAINT: If an emma:grammar element appears as a child of emma:emma, then there MUST be an emma:interpretation or emma:one-of element dominated by that emma:emma, whose emma:grammar-ref attribute references the id of the emma:grammar element." + }, + { + "id": "w3c-emma-1.0-1100", + "kind": "may", + "ref": "4.1.4", + "text": "Application and vendor specific annotations SHOULD appear within emma:info." + }, + { + "id": "w3c-emma-1.0-1201", + "kind": "may", + "ref": "4.2.1", + "text": "emma:tokens MAY be used to indicate the sequence of tokens recognized in the input by the recognizer." + }, + { + "id": "w3c-emma-1.0-1300", + "kind": "may", + "ref": "4.2.2", + "text": "emma:process MAY be used to identify the process used to assign the interpretation." + }, + { + "id": "w3c-emma-1.0-1400", + "kind": "must", + "ref": "4.2.3", + "text": "emma:no-input=\"true\" MUST be used to designate lack of expected input." + }, + { + "id": "w3c-emma-1.0-1500", + "kind": "must", + "ref": "4.2.4", + "text": "Input for which the processor is unable to assign an interpretation MUST be marked as emma:uninterpreted=\"true\"." + }, + { + "id": "w3c-emma-1.0-1600", + "kind": "may", + "ref": "4.2.5", + "text": "emma:lang MAY be used to designate the human language of input" + }, + { + "id": "w3c-emma-1.0-1700", + "kind": "may", + "ref": "4.2.6", + "text": "emma:signal (with a URI value) MAY be used to designate the location of the signal processed by an EMMA processor." + }, + { + "id": "w3c-emma-1.0-1701", + "kind": "may", + "ref": "4.2.6", + "text": "emma:signal-size MAY be used to indicate the file size in 8-bit octets of the input signal." + }, + { + "id": "w3c-emma-1.0-1800", + "kind": "may", + "ref": "4.2.7", + "text": "emma:media-type MAY be used to designate the MIME type of the processed signal." + }, + { + "id": "w3c-emma-1.0-1900", + "kind": "may", + "ref": "4.2.8", + "text": "emma:confidence MAY be used to designate the confidence score of an input." + }, + { + "id": "w3c-emma-1.0-200", + "kind": "must", + "ref": "3.2", + "text": "Application namespace markup representing the interpretation of inputs MUST be contained within the emma:interpretation element." + }, + { + "id": "w3c-emma-1.0-2000", + "kind": "may", + "ref": "4.2.9", + "text": "emma:source (with a URI value) MAY be used to designate the source device." + }, + { + "id": "w3c-emma-1.0-201", + "kind": "must", + "ref": "3.2", + "text": "SUB CONSTRAINT: If the emma:interpretation element is empty, then it MUST be annotated as emma:uninterpreted=\"true' or emma:no-input=\"true\"." + }, + { + "id": "w3c-emma-1.0-2100", + "kind": "may", + "ref": "4.2.10.1", + "text": "emma:start with a millisecond value MAY be used to indicate the absolute start time of an input." + }, + { + "id": "w3c-emma-1.0-2101", + "kind": "may", + "ref": "4.2.10.1", + "text": "emma:end with a millisecond value MAY be used to indicate the absolute end time of an input." + }, + { + "id": "w3c-emma-1.0-2201", + "kind": "may", + "ref": "4.2.10.2", + "text": "The emma:time-ref-uri attribute MAY be used to indicate the URI used as a reference point for relative timestamps." + }, + { + "id": "w3c-emma-1.0-2202", + "kind": "must", + "ref": "4.2.10.2", + "text": "SUB CONSTRAINT: If the emma:time-ref-uri points to an interval, emma:time-ref-anchor MUST appear on the interpretation with a value of start or end, indicating whether to use the start or end of that interval as the reference point." + }, + { + "id": "w3c-emma-1.0-2203", + "kind": "may", + "ref": "4.2.10.2", + "text": "The value of emma:offset-to-start MAY be used to indicate the number of milliseconds from the reference point to the start of the current input in a relative timestamp." + }, + { + "id": "w3c-emma-1.0-2204", + "kind": "may", + "ref": "4.2.10.3", + "text": "The emma:duration attribute value MAY be used to indicate the duration in milliseconds of the current input." + }, + { + "id": "w3c-emma-1.0-2300", + "kind": "must", + "ref": "4.2.11", + "text": "emma:medium MUST be included on all EMMA inputs, indicating the medium of input." + }, + { + "id": "w3c-emma-1.0-2301", + "kind": "must", + "ref": "4.1.2", + "text": "SUBCONSTRAINT: When EMMA inputs from different modes are combined to make a composite input, if the combining inputs have different values for emma:medium, then the value on the result MUST be a space separated list of the emma:medium values from the combining modes." + }, + { + "id": "w3c-emma-1.0-2310", + "kind": "must", + "ref": "4.2.11", + "text": "emma:mode MUST be included on all EMMA inputs, indicating the mode of input." + }, + { + "id": "w3c-emma-1.0-2311", + "kind": "must", + "ref": "4.1.2", + "text": "SUBCONSTRAINT: When EMMA inputs from different modes are combined to make a composite input, the value of emma:mode on the result MUST be a space separated list of the values on the combining inputs." + }, + { + "id": "w3c-emma-1.0-2320", + "kind": "may", + "ref": "4.2.11", + "text": "emma:function MAY be included on EMMA inputs, providing a classification of the function of the input." + }, + { + "id": "w3c-emma-1.0-2330", + "kind": "may", + "ref": "4.2.11", + "text": "emma:verbal MAY be included on EMMA inputs, indicating whether the input is verbal or non-verbal." + }, + { + "id": "w3c-emma-1.0-2401", + "kind": "may", + "ref": "4.2.12", + "text": "emma:hook MAY be used on application namespace markup to indicate where content from another mode needs to be integrated." + }, + { + "id": "w3c-emma-1.0-2500", + "kind": "may", + "ref": "4.2.13", + "text": "emma:cost MAY be used to indicate the cost or weight of an interpretation or lattice arc." + }, + { + "id": "w3c-emma-1.0-2510", + "kind": "may", + "ref": "4.2.17", + "text": "emma:dialog-turn MAY be used to indicate an identifier for the current dialog turn." + }, + { + "id": "w3c-emma-1.0-2600", + "kind": "must", + "ref": "3.3.1", + "text": "EMMA annotations appearing on emma:one-of MUST be true of all of the container elements (emma:one-of,emma:interpretation,emma:sequence,emma:group) within the emma:one-of." + }, + { + "id": "w3c-emma-1.0-2601", + "kind": "must", + "ref": "4.3", + "text": "Each EMMA annotation from the previous stage of a sequential derivation (indicated using emma:derived-from) MUST be true of the interpretations in the current stage of the derivation, unless the annotation is explicitly re-stated." + }, + { + "id": "w3c-emma-1.0-2700", + "kind": "may", + "ref": "4.1.5", + "text": "The emma:endpoint-info element MAY be used to contain emma:endpoint elements describing the characteristics of the endpoints." + }, + { + "id": "w3c-emma-1.0-2701", + "kind": "may", + "ref": "4.1.5", + "text": "The emma:endpoint element MAY be used to provide annotations regarding a communication endpoint." + }, + { + "id": "w3c-emma-1.0-2710", + "kind": "may", + "ref": "4.2.14", + "text": "The emma:endpoint-role attribute MAY be used to indicate the role of an endpoint." + }, + { + "id": "w3c-emma-1.0-2711", + "kind": "may", + "ref": "4.2.14", + "text": "The emma:endpoint-address attribute MAY be used to indicate the address of an endpoint." + }, + { + "id": "w3c-emma-1.0-2713", + "kind": "may", + "ref": "4.2.14", + "text": "The emma:port-type attribute MAY be used to indicate the type of port of an endpoint." + }, + { + "id": "w3c-emma-1.0-2714", + "kind": "may", + "ref": "4.2.14", + "text": "The emma:port-num attribute MAY be used to indicate the port number of an endpoint." + }, + { + "id": "w3c-emma-1.0-2715", + "kind": "may", + "ref": "4.2.14", + "text": "The emma:message-id attribute MAY be used to indicate the message id of an endpoint." + }, + { + "id": "w3c-emma-1.0-2716", + "kind": "may", + "ref": "4.2.14", + "text": "The emma:service-name attribute MAY be used to indicate name of service that the system provides." + }, + { + "id": "w3c-emma-1.0-2717", + "kind": "may", + "ref": "4.2.14", + "text": "The emma:endpoint-pair-ref attribute MAY be used to indicate the pairing between sink and source endpoints." + }, + { + "id": "w3c-emma-1.0-2718", + "kind": "may", + "ref": "4.2.14", + "text": "The emma:endpoint-info-ref attribute MAY be used to reference the endpoint-info element associated with an interpretation." + }, + { + "id": "w3c-emma-1.0-300", + "kind": "must", + "ref": "3.3.1", + "text": "EMMA N-best interpretations MUST be contained within an emma:one-of element." + }, + { + "id": "w3c-emma-1.0-301", + "kind": "must", + "ref": "3.3.1", + "text": "SUB CONSTRAINT: EMMA N-best interpretations contained within an emma:one-of element MUST be ordered best-first in document order where the measure is emma:confidence if present, otherwise the quality metric is platform specific." + }, + { + "id": "w3c-emma-1.0-310", + "kind": "must", + "ref": "3.3.1", + "text": "SUB CONSTRAINT: If an emma:one-of element contains other emma:one-of elements, (embedded one-of), emma:one-of elements MUST contain a disjunction-type attribute indicating the reason for the multiple interpretations." + }, + { + "id": "w3c-emma-1.0-400", + "kind": "may", + "ref": "3.3.2", + "text": "Interpretations of distinct inputs MAY be represented in a single EMMA document within the emma:group element." + }, + { + "id": "w3c-emma-1.0-402", + "kind": "may", + "ref": "3.3.2.1", + "text": "Information describing the criteria used in determining the grouping of interpretations within an emma:group MAY be indicated within an emma:group-info child element within emma:group." + }, + { + "id": "w3c-emma-1.0-500", + "kind": "may", + "ref": "3.3.3", + "text": "A temporally ordered sequence of distinct inputs MAY be contained within an emma:sequence element with document order corresponding to temporal order." + }, + { + "id": "w3c-emma-1.0-600", + "kind": "may", + "ref": "3.4", + "text": "Lattices SHOULD be represented as an emma:lattice element containing a series of emma:arc and emma:node elements." + }, + { + "id": "w3c-emma-1.0-602", + "kind": "must", + "ref": "3.4.1", + "text": "SUB CONSTRAINT: The value of the initial attribute on emma:lattice MUST be the value of the from attribute on at least one of the emma:arc elements that it contains." + }, + { + "id": "w3c-emma-1.0-603", + "kind": "must", + "ref": "3.4.1", + "text": "SUB CONSTRAINT: The value of each space separated number within the final attribute on emma:lattice MUST be the value of the to attribute on at least one of the emma:arc elements that it contains." + }, + { + "id": "w3c-emma-1.0-604", + "kind": "must", + "ref": "3.4.1", + "text": "SUB CONSTRAINT: The value of a to attribute on emma:arc MUST be the value of a from attribute on at least one of its emma:arc siblings or be one of the final values on the parent emma:lattice element." + }, + { + "id": "w3c-emma-1.0-605", + "kind": "must", + "ref": "3.4.1", + "text": "SUB CONSTRAINT: The value of a from attribute on emma:arc MUST be the value of a to attribute on at least one of its emma:arc siblings or be the initial value on the parent emma:lattice element." + }, + { + "id": "w3c-emma-1.0-606", + "kind": "must", + "ref": "3.4.1", + "text": "SUB CONSTRAINT: Any epsilon transitions in the lattice MUST be represented as emma:arc elements with no content other than emma:info." + }, + { + "id": "w3c-emma-1.0-607", + "kind": "must", + "ref": "3.4.1", + "text": "SUB CONSTRAINT: The content of the emma:arc element MUST be either an application namespace XML element, well-formed character content, an application namespace element and an emma:info element, or well-formed character content and an emma:info element." + }, + { + "id": "w3c-emma-1.0-608", + "kind": "must", + "ref": "3.4.1", + "text": "SUB CONSTRAINT: There MUST be no more than one emma:node specification for each numbered node in the lattice." + }, + { + "id": "w3c-emma-1.0-609", + "kind": "must", + "ref": "3.4.1", + "text": "SUB CONSTRAINT: For each emma:node specification, the value of the node-number attribute MUST appear as the value of at some from or to attribute in one of the sibling emma:arc elements." + }, + { + "id": "w3c-emma-1.0-700", + "kind": "must", + "ref": "3.5", + "text": "String literal semantic interpretations MUST be wrapped with the tag emma:literal." + }, + { + "id": "w3c-emma-1.0-800", + "kind": "may", + "ref": "4.1.1", + "text": "The data model of the application semantic markup MAY appear within the emma:model element." + }, + { + "id": "w3c-emma-1.0-810", + "kind": "must", + "ref": "4.2.16", + "text": "SUB CONSTRAINT: If emma:model appears as a child of emma:emma, there MUST be emma:one-of or emma:interpretation elements within emma:emma with emma:model-ref attributes that refer to the id of the emma:model child of emma:emma." + }, + { + "id": "w3c-emma-1.0-811", + "kind": "must", + "ref": "4.2.16", + "text": "SUB CONSTRAINT: If emma:model-ref appears on an emma:interpretation or emma:one-of, there MUST be an emma:model child of the dominating emma:emma whose id value equals the value of the emma:model-ref attribute." + }, + { + "id": "w3c-emma-1.0-901", + "kind": "may", + "ref": "4.1.2", + "text": "The interpretation of all but the first stage of processing MAY contain an emma:derived-from element with an attribute resource which refers to the interpretation from which that interpretation was derived." + }, + { + "id": "w3c-emma-1.0-904", + "kind": "must", + "ref": "4.1.2", + "text": "SUB CONSTRAINT:If there is more than one emma:derived-from within an emma:interpretation or emma:one-of, then all of the emma:derived-from elements MUST have the attribute composite=\"true\"." + }, + { + "id": "w3c-emma-1.0-910", + "kind": "must", + "ref": "4.1.2", + "text": "The interpretation resulting of the most recent processing step MUST appear as a child of emma:emma." + }, + { + "id": "w3c-emma-1.0-911", + "kind": "may", + "ref": "4.1.2", + "text": "If interpretations resulting from earlier processing steps are included they SHOULD appear as children of a single emma:derivation element within emma:emma." + } + ], "w3c-scxml-1.0": [ { "id": "w3c-scxml-1.0-144",