File size: 1,742 Bytes
224e773
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="UTF-8"?>
<!--

  Web application constraint specification using FormalConstraintDSL.

  Based on the HK-OS v6 constraint program (spec/hk-os-v6-constraint.txt).

  Demonstrates: technology constraints, layout invariants, truth layer.

-->
<FormalConstraintDSL version="1.0">
  <Meta>
    <System>WEB_APP</System>
    <Mode>DETERMINISTIC-CONSTRAINT-BUILD</Mode>
    <Output>PROOF_BACKED_ARTIFACT</Output>
    <TruthPolicy>STATIC_DECLARATION_ONLY NO_FAKE_RUNTIME_STATE</TruthPolicy>
  </Meta>

  <Domains>
    <TechnologySet id="T">HTML CSS VanillaJS</TechnologySet>
    <ForbiddenSet id="F">React TypeScript npm FakeTelemetry</ForbiddenSet>
    <StateSet>
      <Valid>Static Live</Valid>
      <Invalid>Fake</Invalid>
    </StateSet>
  </Domains>

  <BooleanKernel>
    <Primitive name="NAND"><![CDATA[NAND(a,b) = 1 - ab]]></Primitive>
    <Derived name="NOT">NAND(a,a)</Derived>
    <Derived name="AND">NAND(NAND(a,b), NAND(a,b))</Derived>
    <Derived name="IMPLIES">OR(NOT(a), b)</Derived>
  </BooleanKernel>

  <TruthLayer>
    <Rule>StaticState MUST declare Static</Rule>
    <Rule>LiveState MUST have RuntimeSource</Rule>
    <Rule>FakeState = INVALID</Rule>
  </TruthLayer>

  <ValidityPredicate name="V">
    <Rule><![CDATA[
      V(build) = 1 IFF:
        NOT(USED(ForbiddenTech))
        AND truth_state_valid(build)
        AND no_fake_telemetry(build)
        AND all_controls_implemented(build)
    ]]></Rule>
  </ValidityPredicate>

  <FatalViolations>
    <Violation>USED(React) = true</Violation>
    <Violation>FAKE_TELEMETRY = true</Violation>
    <Violation>STATIC_VALUE labeled as LIVE</Violation>
  </FatalViolations>

</FormalConstraintDSL>