Skip to content

Commit 335d527

Browse files
committed
Fix
1 parent 3ae8447 commit 335d527

3 files changed

Lines changed: 40 additions & 1 deletion

File tree

src/cmd_parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ bool CmdParser::parseNextCommand()
182182
}
183183
if (!params.empty())
184184
{
185-
// parameters are quote arrows
185+
// explicit parameters are quote arrows
186186
for (size_t i=0, nparams = params.size(); i<nparams; i++)
187187
{
188188
size_t ii = nparams-i-1;

tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ set(ethos_test_file_list
142142
overload-define.eo
143143
nested-requires.eo
144144
pairwise-singleton.eo
145+
quote-opaque.eo
145146
)
146147

147148
if(ENABLE_ORACLES)

tests/quote-opaque.eo

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
(declare-type Int ())
2+
(declare-consts <numeral> Int)
3+
4+
(declare-const @const (-> (! Int :opaque) (! Type :var T :opaque) T))
5+
6+
7+
8+
(declare-const = (-> (! Type :var T :implicit) T T Bool))
9+
10+
(program substitute
11+
((T Type) (U Type) (S Type) (x S) (y S) (f (-> T U)) (a T) (z U))
12+
(S S U) U
13+
(
14+
((substitute x y x) y)
15+
((substitute x y (f a)) (_ (substitute x y f) (substitute x y a)))
16+
((substitute x y z) z)
17+
)
18+
)
19+
20+
21+
(declare-rule eq-subs
22+
((f Bool) (a Bool) (b Bool))
23+
:premises (f (= a b))
24+
:args ()
25+
:conclusion (substitute a b f)
26+
)
27+
28+
(declare-const T Type)
29+
(declare-const U Type)
30+
(declare-const f (-> U T))
31+
(assume a1 (= (@const 1 T) (f (@const 1 U))))
32+
(assume a2 (= T U))
33+
; substitution will not impact the n within the opaque symbol
34+
(step a3 (= (@const 1 T) (f (@const 1 U))) :rule eq-subs :premises (a1 a2))
35+
36+
37+
38+
;(declare-parameterized-const @pconst ((id Int :opaque) (T Type :opaque))

0 commit comments

Comments
 (0)