init commit again
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-binding
|
||||
tuple(
|
||||
accumulate( ),
|
||||
accumulate(bind-value("x", true)),
|
||||
accumulate(bind-value("x", true),
|
||||
bind-value("y", bound-directly"x")),
|
||||
accumulate(bind-value("x", true),
|
||||
bind-value("y", bound-directly"x"),
|
||||
bind-value("z", bound-directly"x")),
|
||||
accumulate(bind-value("x", true),
|
||||
bind-value("y", true),
|
||||
bind-value("x", bound-directly"x")))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term:
|
||||
tuple(
|
||||
map( ),
|
||||
{"x"|->true},
|
||||
{"x"|->true, "y"|->true},
|
||||
{"x"|->true, "y"|->true, "z"|->true},
|
||||
{"y"|->true, "x"|->true})
|
||||
;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-binding
|
||||
scope(
|
||||
bind-recursively("x",
|
||||
thunk closure
|
||||
is-value bound-value"x"),
|
||||
force bound-value"x")
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term:
|
||||
true
|
||||
;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
general {
|
||||
funcon-term:
|
||||
bind-value("x", 1)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: {"x"|->1};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-binding
|
||||
scope(
|
||||
{"x"|->true, "y"|->fresh-link(booleans)},
|
||||
and(
|
||||
bound-directly"x",
|
||||
is-in-type(bound-directly"y", links),
|
||||
else(bound-directly"z", true)))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: true;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-binding
|
||||
scope(
|
||||
{"x"|->true, "y"|->fresh-initialised-link(booleans,true)},
|
||||
and(
|
||||
bound-value"x",
|
||||
bound-value"y",
|
||||
else(bound-value"z",true)))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: true;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-binding
|
||||
scope({"x"|->1},
|
||||
closed(else(bound-directly"x", true)))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: true;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-binding tuple(
|
||||
collateral( ),
|
||||
collateral(bind-value("x", true)),
|
||||
collateral(bind-value("x", true),
|
||||
bind-value("y", false)),
|
||||
collateral(bind-value("x", true),
|
||||
bind-value("y", false),
|
||||
unbind"z"),
|
||||
scope(bind-value("x",true),
|
||||
collateral(bind-value("x", false),
|
||||
bind-value("y", true),
|
||||
bind-value("z", bound-directly"x"))))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term:
|
||||
tuple(
|
||||
map( ),
|
||||
{"x"|->true},
|
||||
{"x"|->true, "y"|->false},
|
||||
{"x"|->true, "y"|->false, "z"|->( )},
|
||||
{"x"|->false,"y"|->true, "z"|->true})
|
||||
;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
general {
|
||||
funcon-term:
|
||||
and(
|
||||
is-in-type(map(),environments),
|
||||
is-in-type({"x"|->true},environments),
|
||||
is-in-type({"x"|->true, "y"|->false},environments))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: true;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-generating
|
||||
not is-equal(fresh-identifier, fresh-identifier)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: true;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
general {
|
||||
funcon-term:
|
||||
and(
|
||||
is-in-type("x", identifiers),
|
||||
is-in-type(identifier-tagged("x",false), identifiers),
|
||||
is-in-type(identifier-tagged(identifier-tagged("x",true),false), identifiers),
|
||||
is-in-type(identifier-tagged("x",identifier-tagged("x",true)), identifiers)
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: true;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-binding(print"OK")
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: null-value;
|
||||
standard-out: ["OK"];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-binding
|
||||
scope(
|
||||
recursive(
|
||||
{"x"},
|
||||
bind-value("x", thunk closure
|
||||
if-true-else(not is-equal(null-value, bound-value"x"), true, false))),
|
||||
force bound-value"x")
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term:
|
||||
true
|
||||
;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
general {
|
||||
funcon-term:
|
||||
initialise-binding
|
||||
and(
|
||||
scope(bind-value("x", false),
|
||||
scope(bind-value("x", true),
|
||||
bound-directly"x")),
|
||||
scope(bind-value("x", false),
|
||||
true))
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: true;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
general {
|
||||
funcon-term:
|
||||
unbind("x")
|
||||
;
|
||||
}
|
||||
|
||||
tests {
|
||||
result-term: {"x"|->( )};
|
||||
}
|
||||
Reference in New Issue
Block a user