eyeling 1.22.5 → 1.22.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HANDBOOK.md +258 -9
- package/dist/browser/eyeling.browser.js +162 -11
- package/examples/act-alarm-bit-interoperability.n3 +180 -0
- package/examples/act-barley-seed-lineage.n3 +565 -0
- package/examples/act-docking-abort.n3 +285 -0
- package/examples/act-gravity-mediator-witness.n3 +235 -0
- package/examples/act-isolation-breach.n3 +354 -0
- package/examples/act-photosynthetic-exciton-transfer.n3 +245 -0
- package/examples/act-sensor-memory-reset.n3 +190 -0
- package/examples/act-tunnel-junction-wake-switch.n3 +225 -0
- package/examples/act-yeast-self-reproduction.n3 +248 -0
- package/examples/complex-matrix-stability.n3 +288 -0
- package/examples/deck/act-barley-seed-lineage.md +593 -0
- package/examples/fundamental-theorem-arithmetic.n3 +244 -0
- package/examples/harborsmr.n3 +233 -0
- package/examples/meta-rule-audit.n3 +135 -0
- package/examples/output/act-alarm-bit-interoperability.txt +20 -0
- package/examples/output/act-barley-seed-lineage.txt +25 -0
- package/examples/output/act-docking-abort.txt +22 -0
- package/examples/output/act-gravity-mediator-witness.txt +24 -0
- package/examples/output/act-isolation-breach.txt +27 -0
- package/examples/output/act-photosynthetic-exciton-transfer.txt +20 -0
- package/examples/output/act-sensor-memory-reset.txt +20 -0
- package/examples/output/act-tunnel-junction-wake-switch.txt +21 -0
- package/examples/output/act-yeast-self-reproduction.txt +23 -0
- package/examples/output/complex-matrix-stability.txt +14 -0
- package/examples/output/fundamental-theorem-arithmetic.txt +15 -0
- package/examples/output/get-uuid.n3 +2 -2
- package/examples/output/harborsmr.txt +20 -0
- package/examples/output/meta-rule-audit.n3 +44 -0
- package/examples/output/theory-diff.n3 +22 -0
- package/examples/theory-diff.n3 +125 -0
- package/eyeling.js +162 -11
- package/lib/builtins.js +52 -1
- package/lib/cli.js +31 -5
- package/lib/engine.js +79 -5
- package/package.json +1 -1
- package/test/api.test.js +127 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# =====================================================================================
|
|
2
|
+
# ACT harbor alarm bit — interoperability of information media
|
|
3
|
+
#
|
|
4
|
+
# Concrete topic from "The Science of Can and Can't":
|
|
5
|
+
# the same abstract bit can be carried by unlike physical substrates when the
|
|
6
|
+
# relevant information tasks are possible. Constructor theory expresses that in
|
|
7
|
+
# terms of tasks such as permutation, copying, and cloning.
|
|
8
|
+
#
|
|
9
|
+
# This example therefore has both sides:
|
|
10
|
+
# - CAN : a classical alarm bit can be permuted and copied between unlike media
|
|
11
|
+
# - CAN'T : a superinformation token cannot have all of its states universally cloned
|
|
12
|
+
# =====================================================================================
|
|
13
|
+
|
|
14
|
+
@prefix : <http://example.org/alarm-bit/> .
|
|
15
|
+
@prefix arc: <https://example.org/arc#> .
|
|
16
|
+
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
|
17
|
+
|
|
18
|
+
:case a arc:Case ;
|
|
19
|
+
arc:question "Can the harbor alarm bit be copied between an optical beacon and a relay register, and what exactly can't be done for a quantum-like token?" .
|
|
20
|
+
|
|
21
|
+
# --------------------------------------------------------
|
|
22
|
+
# Classical substrates carrying the same abstract variable
|
|
23
|
+
# --------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
:opticalBeacon a :InformationMedium ;
|
|
26
|
+
:encodes :AlarmBit ;
|
|
27
|
+
:zeroState :BlueLamp ;
|
|
28
|
+
:oneState :RedLamp .
|
|
29
|
+
|
|
30
|
+
:relayRegister a :InformationMedium ;
|
|
31
|
+
:encodes :AlarmBit ;
|
|
32
|
+
:zeroState :LowVoltage ;
|
|
33
|
+
:oneState :HighVoltage .
|
|
34
|
+
|
|
35
|
+
# ------------------------------------------------------
|
|
36
|
+
# Contrast substrate with superinformation-like behavior
|
|
37
|
+
# ------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
:quantumToken a :SuperinformationMedium ;
|
|
40
|
+
:encodes :PolarizationVariable ;
|
|
41
|
+
:state :Horizontal ;
|
|
42
|
+
:state :Vertical ;
|
|
43
|
+
:state :Diagonal ;
|
|
44
|
+
:state :AntiDiagonal .
|
|
45
|
+
|
|
46
|
+
# -------------------------------------------------------
|
|
47
|
+
# CAN rules — what becomes possible for information media
|
|
48
|
+
# -------------------------------------------------------
|
|
49
|
+
|
|
50
|
+
# Any information medium supports a local permutation of its designated variable.
|
|
51
|
+
{ ?M a :InformationMedium ;
|
|
52
|
+
:encodes ?V ;
|
|
53
|
+
:zeroState ?Z ;
|
|
54
|
+
:oneState ?O . }
|
|
55
|
+
=>
|
|
56
|
+
{ ?M :can :LocalPermutation .
|
|
57
|
+
[ a :PossibleTask ;
|
|
58
|
+
:taskType :Permute ;
|
|
59
|
+
:on ?M ;
|
|
60
|
+
:variable ?V ;
|
|
61
|
+
:fromState ?Z ;
|
|
62
|
+
:toState ?O ] . } .
|
|
63
|
+
|
|
64
|
+
# Two unlike information media that encode the same variable can interoperate.
|
|
65
|
+
{ ?A a :InformationMedium ; :encodes ?V .
|
|
66
|
+
?B a :InformationMedium ; :encodes ?V . }
|
|
67
|
+
=>
|
|
68
|
+
{ ?A :can :InteroperateForVariable .
|
|
69
|
+
?B :can :InteroperateForVariable .
|
|
70
|
+
[ a :PossibleTask ;
|
|
71
|
+
:taskType :Copy ;
|
|
72
|
+
:from ?A ;
|
|
73
|
+
:to ?B ;
|
|
74
|
+
:variable ?V ] . } .
|
|
75
|
+
|
|
76
|
+
# ------------------------------------------------------------------
|
|
77
|
+
# CAN'T rules — what becomes impossible for a superinformation token
|
|
78
|
+
# ------------------------------------------------------------------
|
|
79
|
+
|
|
80
|
+
# A superinformation medium cannot have all of its states universally cloned.
|
|
81
|
+
{ ?M a :SuperinformationMedium ; :encodes ?V . }
|
|
82
|
+
=>
|
|
83
|
+
{ ?M :cannot :UniversalClone .
|
|
84
|
+
[ a :ImpossibleTask ;
|
|
85
|
+
:taskType :CloneAllStates ;
|
|
86
|
+
:on ?M ;
|
|
87
|
+
:variable ?V ] . } .
|
|
88
|
+
|
|
89
|
+
# If universal cloning is unavailable, unrestricted classical-style fan-out of
|
|
90
|
+
# the entire state space is unavailable too.
|
|
91
|
+
{ ?M :cannot :UniversalClone . }
|
|
92
|
+
=>
|
|
93
|
+
{ ?M :cannot :UnrestrictedStateFanOut . } .
|
|
94
|
+
|
|
95
|
+
# ------
|
|
96
|
+
# Checks
|
|
97
|
+
# ------
|
|
98
|
+
|
|
99
|
+
# Positive checks for the classical alarm bit.
|
|
100
|
+
{ :opticalBeacon a :InformationMedium . }
|
|
101
|
+
=> { :case :checkC1 :Passed . } .
|
|
102
|
+
|
|
103
|
+
{ :relayRegister a :InformationMedium . }
|
|
104
|
+
=> { :case :checkC2 :Passed . } .
|
|
105
|
+
|
|
106
|
+
{ :opticalBeacon :encodes :AlarmBit .
|
|
107
|
+
:relayRegister :encodes :AlarmBit . }
|
|
108
|
+
=> { :case :checkC3 :Passed . } .
|
|
109
|
+
|
|
110
|
+
{ ?T a :PossibleTask ;
|
|
111
|
+
:taskType :Copy ;
|
|
112
|
+
:from :opticalBeacon ;
|
|
113
|
+
:to :relayRegister ;
|
|
114
|
+
:variable :AlarmBit . }
|
|
115
|
+
=> { :case :checkC4 :Passed . } .
|
|
116
|
+
|
|
117
|
+
{ ?T a :PossibleTask ;
|
|
118
|
+
:taskType :Copy ;
|
|
119
|
+
:from :relayRegister ;
|
|
120
|
+
:to :opticalBeacon ;
|
|
121
|
+
:variable :AlarmBit . }
|
|
122
|
+
=> { :case :checkC5 :Passed . } .
|
|
123
|
+
|
|
124
|
+
{ :opticalBeacon :can :LocalPermutation . }
|
|
125
|
+
=> { :case :checkC6 :Passed . } .
|
|
126
|
+
|
|
127
|
+
{ :relayRegister :can :LocalPermutation . }
|
|
128
|
+
=> { :case :checkC7 :Passed . } .
|
|
129
|
+
|
|
130
|
+
# Negative checks for the superinformation token.
|
|
131
|
+
{ ?T a :ImpossibleTask ;
|
|
132
|
+
:taskType :CloneAllStates ;
|
|
133
|
+
:on :quantumToken ;
|
|
134
|
+
:variable :PolarizationVariable . }
|
|
135
|
+
=> { :case :checkC8 :Passed . } .
|
|
136
|
+
|
|
137
|
+
{ :quantumToken :cannot :UniversalClone . }
|
|
138
|
+
=> { :case :checkC9 :Passed . } .
|
|
139
|
+
|
|
140
|
+
{ :quantumToken :cannot :UnrestrictedStateFanOut . }
|
|
141
|
+
=> { :case :checkC10 :Passed . } .
|
|
142
|
+
|
|
143
|
+
# ----------------
|
|
144
|
+
# ARC-style output
|
|
145
|
+
# ----------------
|
|
146
|
+
|
|
147
|
+
{ :case :checkC1 :Passed .
|
|
148
|
+
:case :checkC2 :Passed .
|
|
149
|
+
:case :checkC3 :Passed .
|
|
150
|
+
:case :checkC4 :Passed .
|
|
151
|
+
:case :checkC5 :Passed .
|
|
152
|
+
:case :checkC6 :Passed .
|
|
153
|
+
:case :checkC7 :Passed .
|
|
154
|
+
:case :checkC8 :Passed .
|
|
155
|
+
:case :checkC9 :Passed .
|
|
156
|
+
:case :checkC10 :Passed . }
|
|
157
|
+
=>
|
|
158
|
+
{
|
|
159
|
+
:out log:outputString """ACT harbor alarm bit interoperability
|
|
160
|
+
|
|
161
|
+
Answer
|
|
162
|
+
YES for the classical alarm bit.
|
|
163
|
+
NO for universal cloning and unrestricted fan-out of the quantum-like token.
|
|
164
|
+
|
|
165
|
+
Reason Why
|
|
166
|
+
The alarm state is modeled as an abstract bit carried by two unlike classical substrates. Because both the optical beacon and the relay register are information media for the same variable, local permutation and copying in both directions are possible. By contrast, the quantum-like token is treated as a superinformation medium, so universal cloning of all of its states is impossible, and unrestricted classical-style fan-out is blocked as well.
|
|
167
|
+
|
|
168
|
+
Check
|
|
169
|
+
C1 OK - the optical beacon is an information medium
|
|
170
|
+
C2 OK - the relay register is an information medium
|
|
171
|
+
C3 OK - both substrates encode the same abstract variable: AlarmBit
|
|
172
|
+
C4 OK - AlarmBit can be copied from optical beacon to relay register
|
|
173
|
+
C5 OK - AlarmBit can be copied from relay register to optical beacon
|
|
174
|
+
C6 OK - local permutation of AlarmBit is possible on the optical beacon
|
|
175
|
+
C7 OK - local permutation of AlarmBit is possible on the relay register
|
|
176
|
+
C8 OK - cloning all states of the quantum token is an impossible task
|
|
177
|
+
C9 OK - the quantum token cannot be universally cloned
|
|
178
|
+
C10 OK - the quantum token cannot support unrestricted classical-style fan-out
|
|
179
|
+
""" .
|
|
180
|
+
} .
|