зеркало из https://github.com/microsoft/ivy.git
more bug fixing
This commit is contained in:
Родитель
4c465a924e
Коммит
785b9c13d7
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче