This commit is contained in:
Ken McMillan 2016-09-07 21:25:20 -07:00
Родитель 4c465a924e
Коммит 785b9c13d7
4 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -7,4 +7,4 @@ action hello = {
}
export hello
import word
import world

Просмотреть файл

@ -25,7 +25,7 @@ spontaneously prints a message. Here is an approximation:
}
export hello
import word
import world
This program provides an action `hello` that calls action `world`
provided by the environment. Let's try compiling and running this program:
@ -139,9 +139,10 @@ interpet `money` with unbounded integers (that is "bignums").
Let's give it a try:
$ ivy_to_cpp target=repl account2.ivy
$ g++ -o account account2.cpp
$ g++ -o account2 account2.cpp
$ ./account2
> account.withdraw(4)
account2.ivy: line 29: assertion failed
$

Просмотреть файл

@ -734,11 +734,12 @@ def isolate_component(mod,isolate_name,extra_with=[],extra_strip=None):
if (isinstance(called,ia.NativeAction) or
any(p.sort.name not in mod.ghost_sorts for p in called.formal_returns)):
raise iu.IvyError(None,"No implementation for action {}".format(c))
all_syms_norm = map(ivy_logic.normalize_symbol,all_syms)
for p,ds in prop_deps:
for d in ds:
if not startswith_eq_some(d,present,mod):
for x in lu.used_symbols_ast(p.formula):
if x in all_syms:
if ivy_logic.normalize_symbol(x) in all_syms_norm:
raise iu.IvyError(p,"property {} depends on abstracted object {}"
.format(pname(p),d))

Просмотреть файл

@ -683,8 +683,8 @@ class Sig(object):
else:
yield sym
def remove_symbol(self,symbol):
assert symbol.name in self.symbols
sort = self.symbols[symbol.name]
assert symbol.name in self.symbols, symbol.name
sort = self.symbols[symbol.name].sort
if isinstance(sort,UnionSort):
assert symbol.sort in sort.sorts
sort.sorts.remove(symbol.sort)