Add PascaLIGO pretty printer tests.

This commit is contained in:
Sander Spies 2020-06-08 15:00:44 +02:00
parent d7b4a97731
commit a58dca7097
99 changed files with 2939 additions and 3 deletions

View File

@ -91,6 +91,103 @@
(rule (targets function-shared.mligo_output) (action (with-stdout-to function-shared.mligo_output (run ligo pretty-print function-shared.mligo))) (deps function-shared.mligo))
(rule (targets guess_string.mligo_output) (action (with-stdout-to guess_string.mligo_output (run ligo pretty-print guess_string.mligo))) (deps guess_string.mligo))
;; pascaligo
(rule (targets address.ligo_output) (action (with-stdout-to address.ligo_output (run ligo pretty-print address.ligo))) (deps address.ligo))
(rule (targets amount.ligo_output) (action (with-stdout-to amount.ligo_output (run ligo pretty-print amount.ligo))) (deps amount.ligo))
(rule (targets annotation.ligo_output) (action (with-stdout-to annotation.ligo_output (run ligo pretty-print annotation.ligo))) (deps annotation.ligo))
(rule (targets application.ligo_output) (action (with-stdout-to application.ligo_output (run ligo pretty-print application.ligo))) (deps application.ligo))
(rule (targets arithmetic.ligo_output) (action (with-stdout-to arithmetic.ligo_output (run ligo pretty-print arithmetic.ligo))) (deps arithmetic.ligo))
(rule (targets assign.ligo_output) (action (with-stdout-to assign.ligo_output (run ligo pretty-print assign.ligo))) (deps assign.ligo))
(rule (targets attributes.ligo_output) (action (with-stdout-to attributes.ligo_output (run ligo pretty-print attributes.ligo))) (deps attributes.ligo))
(rule (targets bad_timestamp.ligo_output) (action (with-stdout-to bad_timestamp.ligo_output (run ligo pretty-print bad_timestamp.ligo))) (deps bad_timestamp.ligo))
(rule (targets bad_type_operator.ligo_output) (action (with-stdout-to bad_type_operator.ligo_output (run ligo pretty-print bad_type_operator.ligo))) (deps bad_type_operator.ligo))
(rule (targets balance_constant.ligo_output) (action (with-stdout-to balance_constant.ligo_output (run ligo pretty-print balance_constant.ligo))) (deps balance_constant.ligo))
(rule (targets big_map.ligo_output) (action (with-stdout-to big_map.ligo_output (run ligo pretty-print big_map.ligo))) (deps big_map.ligo))
(rule (targets bitwise_arithmetic.ligo_output) (action (with-stdout-to bitwise_arithmetic.ligo_output (run ligo pretty-print bitwise_arithmetic.ligo))) (deps bitwise_arithmetic.ligo))
(rule (targets blockless.ligo_output) (action (with-stdout-to blockless.ligo_output (run ligo pretty-print blockless.ligo))) (deps blockless.ligo))
(rule (targets boolean_operators.ligo_output) (action (with-stdout-to boolean_operators.ligo_output (run ligo pretty-print boolean_operators.ligo))) (deps boolean_operators.ligo))
(rule (targets bytes_arithmetic.ligo_output) (action (with-stdout-to bytes_arithmetic.ligo_output (run ligo pretty-print bytes_arithmetic.ligo))) (deps bytes_arithmetic.ligo))
(rule (targets bytes_unpack.ligo_output) (action (with-stdout-to bytes_unpack.ligo_output (run ligo pretty-print bytes_unpack.ligo))) (deps bytes_unpack.ligo))
(rule (targets chain_id.ligo_output) (action (with-stdout-to chain_id.ligo_output (run ligo pretty-print chain_id.ligo))) (deps chain_id.ligo))
(rule (targets check_signature.ligo_output) (action (with-stdout-to check_signature.ligo_output (run ligo pretty-print check_signature.ligo))) (deps check_signature.ligo))
(rule (targets closure-1.ligo_output) (action (with-stdout-to closure-1.ligo_output (run ligo pretty-print closure-1.ligo))) (deps closure-1.ligo))
(rule (targets closure-2.ligo_output) (action (with-stdout-to closure-2.ligo_output (run ligo pretty-print closure-2.ligo))) (deps closure-2.ligo))
(rule (targets closure-3.ligo_output) (action (with-stdout-to closure-3.ligo_output (run ligo pretty-print closure-3.ligo))) (deps closure-3.ligo))
(rule (targets closure.ligo_output) (action (with-stdout-to closure.ligo_output (run ligo pretty-print closure.ligo))) (deps closure.ligo))
(rule (targets coase.ligo_output) (action (with-stdout-to coase.ligo_output (run ligo pretty-print coase.ligo))) (deps coase.ligo))
(rule (targets condition-simple.ligo_output) (action (with-stdout-to condition-simple.ligo_output (run ligo pretty-print condition-simple.ligo))) (deps condition-simple.ligo))
(rule (targets condition.ligo_output) (action (with-stdout-to condition.ligo_output (run ligo pretty-print condition.ligo))) (deps condition.ligo))
(rule (targets counter.ligo_output) (action (with-stdout-to counter.ligo_output (run ligo pretty-print counter.ligo))) (deps counter.ligo))
(rule (targets crypto.ligo_output) (action (with-stdout-to crypto.ligo_output (run ligo pretty-print crypto.ligo))) (deps crypto.ligo))
(rule (targets declaration-local.ligo_output) (action (with-stdout-to declaration-local.ligo_output (run ligo pretty-print declaration-local.ligo))) (deps declaration-local.ligo))
(rule (targets declarations.ligo_output) (action (with-stdout-to declarations.ligo_output (run ligo pretty-print declarations.ligo))) (deps declarations.ligo))
(rule (targets deep_access.ligo_output) (action (with-stdout-to deep_access.ligo_output (run ligo pretty-print deep_access.ligo))) (deps deep_access.ligo))
(rule (targets dispatch-counter.ligo_output) (action (with-stdout-to dispatch-counter.ligo_output (run ligo pretty-print dispatch-counter.ligo))) (deps dispatch-counter.ligo))
(rule (targets double_main.ligo_output) (action (with-stdout-to double_main.ligo_output (run ligo pretty-print double_main.ligo))) (deps double_main.ligo))
(rule (targets double_michelson_or.ligo_output) (action (with-stdout-to double_michelson_or.ligo_output (run ligo pretty-print double_michelson_or.ligo))) (deps double_michelson_or.ligo))
(rule (targets empty_case.ligo_output) (action (with-stdout-to empty_case.ligo_output (run ligo pretty-print empty_case.ligo))) (deps empty_case.ligo))
(rule (targets entrypoints.ligo_output) (action (with-stdout-to entrypoints.ligo_output (run ligo pretty-print entrypoints.ligo))) (deps entrypoints.ligo))
(rule (targets eq_bool.ligo_output) (action (with-stdout-to eq_bool.ligo_output (run ligo pretty-print eq_bool.ligo))) (deps eq_bool.ligo))
(rule (targets evaluation_tests.ligo_output) (action (with-stdout-to evaluation_tests.ligo_output (run ligo pretty-print evaluation_tests.ligo))) (deps evaluation_tests.ligo))
(rule (targets FA1.2.ligo_output) (action (with-stdout-to FA1.2.ligo_output (run ligo pretty-print FA1.2.ligo))) (deps FA1.2.ligo))
(rule (targets failwith.ligo_output) (action (with-stdout-to failwith.ligo_output (run ligo pretty-print failwith.ligo))) (deps failwith.ligo))
(rule (targets for_fail.ligo_output) (action (with-stdout-to for_fail.ligo_output (run ligo pretty-print for_fail.ligo))) (deps for_fail.ligo))
(rule (targets function-anon.ligo_output) (action (with-stdout-to function-anon.ligo_output (run ligo pretty-print function-anon.ligo))) (deps function-anon.ligo))
(rule (targets function-complex.ligo_output) (action (with-stdout-to function-complex.ligo_output (run ligo pretty-print function-complex.ligo))) (deps function-complex.ligo))
(rule (targets function-shared.ligo_output) (action (with-stdout-to function-shared.ligo_output (run ligo pretty-print function-shared.ligo))) (deps function-shared.ligo))
(rule (targets function.ligo_output) (action (with-stdout-to function.ligo_output (run ligo pretty-print function.ligo))) (deps function.ligo))
(rule (targets get_contract.ligo_output) (action (with-stdout-to get_contract.ligo_output (run ligo pretty-print get_contract.ligo))) (deps get_contract.ligo))
(rule (targets high-order.ligo_output) (action (with-stdout-to high-order.ligo_output (run ligo pretty-print high-order.ligo))) (deps high-order.ligo))
(rule (targets id.ligo_output) (action (with-stdout-to id.ligo_output (run ligo pretty-print id.ligo))) (deps id.ligo))
(rule (targets implicit_account.ligo_output) (action (with-stdout-to implicit_account.ligo_output (run ligo pretty-print implicit_account.ligo))) (deps implicit_account.ligo))
(rule (targets included.ligo_output) (action (with-stdout-to included.ligo_output (run ligo pretty-print included.ligo))) (deps included.ligo))
(rule (targets includer.ligo_output) (action (with-stdout-to includer.ligo_output (run ligo pretty-print includer.ligo))) (deps includer.ligo))
(rule (targets isnat.ligo_output) (action (with-stdout-to isnat.ligo_output (run ligo pretty-print isnat.ligo))) (deps isnat.ligo))
(rule (targets key_hash_comparable.ligo_output) (action (with-stdout-to key_hash_comparable.ligo_output (run ligo pretty-print key_hash_comparable.ligo))) (deps key_hash_comparable.ligo))
(rule (targets key_hash.ligo_output) (action (with-stdout-to key_hash.ligo_output (run ligo pretty-print key_hash.ligo))) (deps key_hash.ligo))
(rule (targets lambda.ligo_output) (action (with-stdout-to lambda.ligo_output (run ligo pretty-print lambda.ligo))) (deps lambda.ligo))
(rule (targets list.ligo_output) (action (with-stdout-to list.ligo_output (run ligo pretty-print list.ligo))) (deps list.ligo))
(rule (targets loop_bugs.ligo_output) (action (with-stdout-to loop_bugs.ligo_output (run ligo pretty-print loop_bugs.ligo))) (deps loop_bugs.ligo))
(rule (targets loop.ligo_output) (action (with-stdout-to loop.ligo_output (run ligo pretty-print loop.ligo))) (deps loop.ligo))
(rule (targets map.ligo_output) (action (with-stdout-to map.ligo_output (run ligo pretty-print map.ligo))) (deps map.ligo))
(rule (targets match.ligo_output) (action (with-stdout-to match.ligo_output (run ligo pretty-print match.ligo))) (deps match.ligo))
(rule (targets michelson_or_tree_intermediary.ligo_output) (action (with-stdout-to michelson_or_tree_intermediary.ligo_output (run ligo pretty-print michelson_or_tree_intermediary.ligo))) (deps michelson_or_tree_intermediary.ligo))
(rule (targets michelson_or_tree.ligo_output) (action (with-stdout-to michelson_or_tree.ligo_output (run ligo pretty-print michelson_or_tree.ligo))) (deps michelson_or_tree.ligo))
(rule (targets michelson_pair_tree_intermediary.ligo_output) (action (with-stdout-to michelson_pair_tree_intermediary.ligo_output (run ligo pretty-print michelson_pair_tree_intermediary.ligo))) (deps michelson_pair_tree_intermediary.ligo))
(rule (targets michelson_pair_tree.ligo_output) (action (with-stdout-to michelson_pair_tree.ligo_output (run ligo pretty-print michelson_pair_tree.ligo))) (deps michelson_pair_tree.ligo))
(rule (targets multiple-parameters.ligo_output) (action (with-stdout-to multiple-parameters.ligo_output (run ligo pretty-print multiple-parameters.ligo))) (deps multiple-parameters.ligo))
(rule (targets multisig-v2.ligo_output) (action (with-stdout-to multisig-v2.ligo_output (run ligo pretty-print multisig-v2.ligo))) (deps multisig-v2.ligo))
(rule (targets multisig.ligo_output) (action (with-stdout-to multisig.ligo_output (run ligo pretty-print multisig.ligo))) (deps multisig.ligo))
(rule (targets option.ligo_output) (action (with-stdout-to option.ligo_output (run ligo pretty-print option.ligo))) (deps option.ligo))
(rule (targets quote-declaration.ligo_output) (action (with-stdout-to quote-declaration.ligo_output (run ligo pretty-print quote-declaration.ligo))) (deps quote-declaration.ligo))
(rule (targets quote-declarations.ligo_output) (action (with-stdout-to quote-declarations.ligo_output (run ligo pretty-print quote-declarations.ligo))) (deps quote-declarations.ligo))
(rule (targets record.ligo_output) (action (with-stdout-to record.ligo_output (run ligo pretty-print record.ligo))) (deps record.ligo))
(rule (targets recursion.ligo_output) (action (with-stdout-to recursion.ligo_output (run ligo pretty-print recursion.ligo))) (deps recursion.ligo))
(rule (targets redeclaration.ligo_output) (action (with-stdout-to redeclaration.ligo_output (run ligo pretty-print redeclaration.ligo))) (deps redeclaration.ligo))
(rule (targets replaceable_id.ligo_output) (action (with-stdout-to replaceable_id.ligo_output (run ligo pretty-print replaceable_id.ligo))) (deps replaceable_id.ligo))
(rule (targets self_address.ligo_output) (action (with-stdout-to self_address.ligo_output (run ligo pretty-print self_address.ligo))) (deps self_address.ligo))
(rule (targets self_type_annotation.ligo_output) (action (with-stdout-to self_type_annotation.ligo_output (run ligo pretty-print self_type_annotation.ligo))) (deps self_type_annotation.ligo))
(rule (targets self_with_entrypoint.ligo_output) (action (with-stdout-to self_with_entrypoint.ligo_output (run ligo pretty-print self_with_entrypoint.ligo))) (deps self_with_entrypoint.ligo))
(rule (targets self_without_entrypoint.ligo_output) (action (with-stdout-to self_without_entrypoint.ligo_output (run ligo pretty-print self_without_entrypoint.ligo))) (deps self_without_entrypoint.ligo))
(rule (targets set_arithmetic-1.ligo_output) (action (with-stdout-to set_arithmetic-1.ligo_output (run ligo pretty-print set_arithmetic-1.ligo))) (deps set_arithmetic-1.ligo))
(rule (targets set_arithmetic.ligo_output) (action (with-stdout-to set_arithmetic.ligo_output (run ligo pretty-print set_arithmetic.ligo))) (deps set_arithmetic.ligo))
(rule (targets set_delegate.ligo_output) (action (with-stdout-to set_delegate.ligo_output (run ligo pretty-print set_delegate.ligo))) (deps set_delegate.ligo))
(rule (targets shadow.ligo_output) (action (with-stdout-to shadow.ligo_output (run ligo pretty-print shadow.ligo))) (deps shadow.ligo))
(rule (targets simple_access.ligo_output) (action (with-stdout-to simple_access.ligo_output (run ligo pretty-print simple_access.ligo))) (deps simple_access.ligo))
(rule (targets string_arithmetic.ligo_output) (action (with-stdout-to string_arithmetic.ligo_output (run ligo pretty-print string_arithmetic.ligo))) (deps string_arithmetic.ligo))
(rule (targets string.ligo_output) (action (with-stdout-to string.ligo_output (run ligo pretty-print string.ligo))) (deps string.ligo))
(rule (targets super-counter.ligo_output) (action (with-stdout-to super-counter.ligo_output (run ligo pretty-print super-counter.ligo))) (deps super-counter.ligo))
(rule (targets tez.ligo_output) (action (with-stdout-to tez.ligo_output (run ligo pretty-print tez.ligo))) (deps tez.ligo))
(rule (targets time-lock.ligo_output) (action (with-stdout-to time-lock.ligo_output (run ligo pretty-print time-lock.ligo))) (deps time-lock.ligo))
(rule (targets timestamp.ligo_output) (action (with-stdout-to timestamp.ligo_output (run ligo pretty-print timestamp.ligo))) (deps timestamp.ligo))
(rule (targets toto.ligo_output) (action (with-stdout-to toto.ligo_output (run ligo pretty-print toto.ligo))) (deps toto.ligo))
(rule (targets tuple.ligo_output) (action (with-stdout-to tuple.ligo_output (run ligo pretty-print tuple.ligo))) (deps tuple.ligo))
(rule (targets type-alias.ligo_output) (action (with-stdout-to type-alias.ligo_output (run ligo pretty-print type-alias.ligo))) (deps type-alias.ligo))
(rule (targets unit.ligo_output) (action (with-stdout-to unit.ligo_output (run ligo pretty-print unit.ligo))) (deps unit.ligo))
(rule (targets variant-matching.ligo_output) (action (with-stdout-to variant-matching.ligo_output (run ligo pretty-print variant-matching.ligo))) (deps variant-matching.ligo))
(rule (targets variant.ligo_output) (action (with-stdout-to variant.ligo_output (run ligo pretty-print variant.ligo))) (deps variant.ligo))
(rule (targets website1.ligo_output) (action (with-stdout-to website1.ligo_output (run ligo pretty-print website1.ligo))) (deps website1.ligo))
(rule (targets website2.ligo_output) (action (with-stdout-to website2.ligo_output (run ligo pretty-print website2.ligo))) (deps website2.ligo))
;; compare the output with the expected result
;; reasonligo
@ -185,6 +282,105 @@
(alias (name runtest) (action (diff expected/function-shared.mligo.expected function-shared.mligo_output)))
(alias (name runtest) (action (diff expected/guess_string.mligo.expected guess_string.mligo_output)))
;; pascaligo
(alias (name runtest) (action (diff expected/address.ligo.expected address.ligo_output)))
(alias (name runtest) (action (diff expected/amount.ligo.expected amount.ligo_output)))
(alias (name runtest) (action (diff expected/annotation.ligo.expected annotation.ligo_output)))
(alias (name runtest) (action (diff expected/application.ligo.expected application.ligo_output)))
(alias (name runtest) (action (diff expected/arithmetic.ligo.expected arithmetic.ligo_output)))
(alias (name runtest) (action (diff expected/assign.ligo.expected assign.ligo_output)))
(alias (name runtest) (action (diff expected/attributes.ligo.expected attributes.ligo_output)))
(alias (name runtest) (action (diff expected/bad_timestamp.ligo.expected bad_timestamp.ligo_output)))
(alias (name runtest) (action (diff expected/bad_type_operator.ligo.expected bad_type_operator.ligo_output)))
(alias (name runtest) (action (diff expected/balance_constant.ligo.expected balance_constant.ligo_output)))
(alias (name runtest) (action (diff expected/big_map.ligo.expected big_map.ligo_output)))
(alias (name runtest) (action (diff expected/bitwise_arithmetic.ligo.expected bitwise_arithmetic.ligo_output)))
(alias (name runtest) (action (diff expected/blockless.ligo.expected blockless.ligo_output)))
(alias (name runtest) (action (diff expected/boolean_operators.ligo.expected boolean_operators.ligo_output)))
(alias (name runtest) (action (diff expected/bytes_arithmetic.ligo.expected bytes_arithmetic.ligo_output)))
(alias (name runtest) (action (diff expected/bytes_unpack.ligo.expected bytes_unpack.ligo_output)))
(alias (name runtest) (action (diff expected/chain_id.ligo.expected chain_id.ligo_output)))
(alias (name runtest) (action (diff expected/check_signature.ligo.expected check_signature.ligo_output)))
(alias (name runtest) (action (diff expected/closure-1.ligo.expected closure-1.ligo_output)))
(alias (name runtest) (action (diff expected/closure-2.ligo.expected closure-2.ligo_output)))
(alias (name runtest) (action (diff expected/closure-3.ligo.expected closure-3.ligo_output)))
(alias (name runtest) (action (diff expected/closure.ligo.expected closure.ligo_output)))
(alias (name runtest) (action (diff expected/coase.ligo.expected coase.ligo_output)))
(alias (name runtest) (action (diff expected/condition-simple.ligo.expected condition-simple.ligo_output)))
(alias (name runtest) (action (diff expected/condition.ligo.expected condition.ligo_output)))
(alias (name runtest) (action (diff expected/counter.ligo.expected counter.ligo_output)))
(alias (name runtest) (action (diff expected/crypto.ligo.expected crypto.ligo_output)))
(alias (name runtest) (action (diff expected/declaration-local.ligo.expected declaration-local.ligo_output)))
(alias (name runtest) (action (diff expected/declarations.ligo.expected declarations.ligo_output)))
(alias (name runtest) (action (diff expected/deep_access.ligo.expected deep_access.ligo_output)))
(alias (name runtest) (action (diff expected/dispatch-counter.ligo.expected dispatch-counter.ligo_output)))
(alias (name runtest) (action (diff expected/double_main.ligo.expected double_main.ligo_output)))
(alias (name runtest) (action (diff expected/double_michelson_or.ligo.expected double_michelson_or.ligo_output)))
(alias (name runtest) (action (diff expected/empty_case.ligo.expected empty_case.ligo_output)))
(alias (name runtest) (action (diff expected/entrypoints.ligo.expected entrypoints.ligo_output)))
(alias (name runtest) (action (diff expected/eq_bool.ligo.expected eq_bool.ligo_output)))
(alias (name runtest) (action (diff expected/evaluation_tests.ligo.expected evaluation_tests.ligo_output)))
(alias (name runtest) (action (diff expected/FA1.2.ligo.expected FA1.2.ligo_output)))
(alias (name runtest) (action (diff expected/failwith.ligo.expected failwith.ligo_output)))
(alias (name runtest) (action (diff expected/for_fail.ligo.expected for_fail.ligo_output)))
(alias (name runtest) (action (diff expected/function-anon.ligo.expected function-anon.ligo_output)))
(alias (name runtest) (action (diff expected/function-complex.ligo.expected function-complex.ligo_output)))
(alias (name runtest) (action (diff expected/function-shared.ligo.expected function-shared.ligo_output)))
(alias (name runtest) (action (diff expected/function.ligo.expected function.ligo_output)))
(alias (name runtest) (action (diff expected/get_contract.ligo.expected get_contract.ligo_output)))
(alias (name runtest) (action (diff expected/high-order.ligo.expected high-order.ligo_output)))
(alias (name runtest) (action (diff expected/id.ligo.expected id.ligo_output)))
(alias (name runtest) (action (diff expected/implicit_account.ligo.expected implicit_account.ligo_output)))
(alias (name runtest) (action (diff expected/included.ligo.expected included.ligo_output)))
(alias (name runtest) (action (diff expected/includer.ligo.expected includer.ligo_output)))
(alias (name runtest) (action (diff expected/isnat.ligo.expected isnat.ligo_output)))
(alias (name runtest) (action (diff expected/key_hash_comparable.ligo.expected key_hash_comparable.ligo_output)))
(alias (name runtest) (action (diff expected/key_hash.ligo.expected key_hash.ligo_output)))
(alias (name runtest) (action (diff expected/lambda.ligo.expected lambda.ligo_output)))
(alias (name runtest) (action (diff expected/list.ligo.expected list.ligo_output)))
(alias (name runtest) (action (diff expected/loop_bugs.ligo.expected loop_bugs.ligo_output)))
(alias (name runtest) (action (diff expected/loop.ligo.expected loop.ligo_output)))
(alias (name runtest) (action (diff expected/map.ligo.expected map.ligo_output)))
(alias (name runtest) (action (diff expected/match.ligo.expected match.ligo_output)))
(alias (name runtest) (action (diff expected/michelson_or_tree_intermediary.ligo.expected michelson_or_tree_intermediary.ligo_output)))
(alias (name runtest) (action (diff expected/michelson_or_tree.ligo.expected michelson_or_tree.ligo_output)))
(alias (name runtest) (action (diff expected/michelson_pair_tree_intermediary.ligo.expected michelson_pair_tree_intermediary.ligo_output)))
(alias (name runtest) (action (diff expected/michelson_pair_tree.ligo.expected michelson_pair_tree.ligo_output)))
(alias (name runtest) (action (diff expected/multiple-parameters.ligo.expected multiple-parameters.ligo_output)))
(alias (name runtest) (action (diff expected/multisig-v2.ligo.expected multisig-v2.ligo_output)))
(alias (name runtest) (action (diff expected/multisig.ligo.expected multisig.ligo_output)))
(alias (name runtest) (action (diff expected/option.ligo.expected option.ligo_output)))
(alias (name runtest) (action (diff expected/quote-declaration.ligo.expected quote-declaration.ligo_output)))
(alias (name runtest) (action (diff expected/quote-declarations.ligo.expected quote-declarations.ligo_output)))
(alias (name runtest) (action (diff expected/record.ligo.expected record.ligo_output)))
(alias (name runtest) (action (diff expected/recursion.ligo.expected recursion.ligo_output)))
(alias (name runtest) (action (diff expected/redeclaration.ligo.expected redeclaration.ligo_output)))
(alias (name runtest) (action (diff expected/replaceable_id.ligo.expected replaceable_id.ligo_output)))
(alias (name runtest) (action (diff expected/self_address.ligo.expected self_address.ligo_output)))
(alias (name runtest) (action (diff expected/self_type_annotation.ligo.expected self_type_annotation.ligo_output)))
(alias (name runtest) (action (diff expected/self_with_entrypoint.ligo.expected self_with_entrypoint.ligo_output)))
(alias (name runtest) (action (diff expected/self_without_entrypoint.ligo.expected self_without_entrypoint.ligo_output)))
(alias (name runtest) (action (diff expected/set_arithmetic-1.ligo.expected set_arithmetic-1.ligo_output)))
(alias (name runtest) (action (diff expected/set_arithmetic.ligo.expected set_arithmetic.ligo_output)))
(alias (name runtest) (action (diff expected/set_delegate.ligo.expected set_delegate.ligo_output)))
(alias (name runtest) (action (diff expected/shadow.ligo.expected shadow.ligo_output)))
(alias (name runtest) (action (diff expected/simple_access.ligo.expected simple_access.ligo_output)))
(alias (name runtest) (action (diff expected/string_arithmetic.ligo.expected string_arithmetic.ligo_output)))
(alias (name runtest) (action (diff expected/string.ligo.expected string.ligo_output)))
(alias (name runtest) (action (diff expected/super-counter.ligo.expected super-counter.ligo_output)))
(alias (name runtest) (action (diff expected/tez.ligo.expected tez.ligo_output)))
(alias (name runtest) (action (diff expected/time-lock.ligo.expected time-lock.ligo_output)))
(alias (name runtest) (action (diff expected/timestamp.ligo.expected timestamp.ligo_output)))
(alias (name runtest) (action (diff expected/toto.ligo.expected toto.ligo_output)))
(alias (name runtest) (action (diff expected/tuple.ligo.expected tuple.ligo_output)))
(alias (name runtest) (action (diff expected/type-alias.ligo.expected type-alias.ligo_output)))
(alias (name runtest) (action (diff expected/unit.ligo.expected unit.ligo_output)))
(alias (name runtest) (action (diff expected/variant-matching.ligo.expected variant-matching.ligo_output)))
(alias (name runtest) (action (diff expected/variant.ligo.expected variant.ligo_output)))
(alias (name runtest) (action (diff expected/website1.ligo.expected website1.ligo_output)))
(alias (name runtest) (action (diff expected/website2.ligo.expected website2.ligo_output)))
;; try to parse the generated contracts
;; reasonligo
(alias (name runtest) (action (ignore-stdout (run ligo print-cst address.religo_output -s reasonligo))) (deps address.religo_output))
@ -278,6 +474,105 @@
(alias (name runtest) (action (ignore-stdout (run ligo print-cst function-shared.mligo_output -s cameligo))) (deps function-shared.mligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst guess_string.mligo_output -s cameligo))) (deps guess_string.mligo_output))
;; pascaligo
(alias (name runtest) (action (ignore-stdout (run ligo print-cst address.ligo_output -s pascaligo))) (deps address.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst amount.ligo_output -s pascaligo))) (deps amount.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst annotation.ligo_output -s pascaligo))) (deps annotation.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst application.ligo_output -s pascaligo))) (deps application.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst arithmetic.ligo_output -s pascaligo))) (deps arithmetic.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst assign.ligo_output -s pascaligo))) (deps assign.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst attributes.ligo_output -s pascaligo))) (deps attributes.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst bad_timestamp.ligo_output -s pascaligo))) (deps bad_timestamp.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst bad_type_operator.ligo_output -s pascaligo))) (deps bad_type_operator.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst balance_constant.ligo_output -s pascaligo))) (deps balance_constant.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst big_map.ligo_output -s pascaligo))) (deps big_map.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst bitwise_arithmetic.ligo_output -s pascaligo))) (deps bitwise_arithmetic.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst blockless.ligo_output -s pascaligo))) (deps blockless.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst boolean_operators.ligo_output -s pascaligo))) (deps boolean_operators.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst bytes_arithmetic.ligo_output -s pascaligo))) (deps bytes_arithmetic.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst bytes_unpack.ligo_output -s pascaligo))) (deps bytes_unpack.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst chain_id.ligo_output -s pascaligo))) (deps chain_id.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst check_signature.ligo_output -s pascaligo))) (deps check_signature.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst closure-1.ligo_output -s pascaligo))) (deps closure-1.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst closure-2.ligo_output -s pascaligo))) (deps closure-2.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst closure-3.ligo_output -s pascaligo))) (deps closure-3.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst closure.ligo_output -s pascaligo))) (deps closure.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst coase.ligo_output -s pascaligo))) (deps coase.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst condition-simple.ligo_output -s pascaligo))) (deps condition-simple.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst condition.ligo_output -s pascaligo))) (deps condition.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst counter.ligo_output -s pascaligo))) (deps counter.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst crypto.ligo_output -s pascaligo))) (deps crypto.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst declaration-local.ligo_output -s pascaligo))) (deps declaration-local.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst declarations.ligo_output -s pascaligo))) (deps declarations.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst deep_access.ligo_output -s pascaligo))) (deps deep_access.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst dispatch-counter.ligo_output -s pascaligo))) (deps dispatch-counter.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst double_main.ligo_output -s pascaligo))) (deps double_main.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst double_michelson_or.ligo_output -s pascaligo))) (deps double_michelson_or.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst empty_case.ligo_output -s pascaligo))) (deps empty_case.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst entrypoints.ligo_output -s pascaligo))) (deps entrypoints.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst eq_bool.ligo_output -s pascaligo))) (deps eq_bool.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst evaluation_tests.ligo_output -s pascaligo))) (deps evaluation_tests.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst FA1.2.ligo_output -s pascaligo))) (deps FA1.2.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst failwith.ligo_output -s pascaligo))) (deps failwith.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst for_fail.ligo_output -s pascaligo))) (deps for_fail.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst function-anon.ligo_output -s pascaligo))) (deps function-anon.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst function-complex.ligo_output -s pascaligo))) (deps function-complex.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst function-shared.ligo_output -s pascaligo))) (deps function-shared.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst function.ligo_output -s pascaligo))) (deps function.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst get_contract.ligo_output -s pascaligo))) (deps get_contract.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst high-order.ligo_output -s pascaligo))) (deps high-order.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst id.ligo_output -s pascaligo))) (deps id.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst implicit_account.ligo_output -s pascaligo))) (deps implicit_account.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst included.ligo_output -s pascaligo))) (deps included.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst includer.ligo_output -s pascaligo))) (deps includer.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst isnat.ligo_output -s pascaligo))) (deps isnat.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst key_hash_comparable.ligo_output -s pascaligo))) (deps key_hash_comparable.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst key_hash.ligo_output -s pascaligo))) (deps key_hash.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst lambda.ligo_output -s pascaligo))) (deps lambda.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst list.ligo_output -s pascaligo))) (deps list.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst loop_bugs.ligo_output -s pascaligo))) (deps loop_bugs.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst loop.ligo_output -s pascaligo))) (deps loop.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst map.ligo_output -s pascaligo))) (deps map.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst match.ligo_output -s pascaligo))) (deps match.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst michelson_or_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_or_tree_intermediary.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst michelson_or_tree.ligo_output -s pascaligo))) (deps michelson_or_tree.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst michelson_pair_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_pair_tree_intermediary.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst michelson_pair_tree.ligo_output -s pascaligo))) (deps michelson_pair_tree.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst multiple-parameters.ligo_output -s pascaligo))) (deps multiple-parameters.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst multisig-v2.ligo_output -s pascaligo))) (deps multisig-v2.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst multisig.ligo_output -s pascaligo))) (deps multisig.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst option.ligo_output -s pascaligo))) (deps option.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst quote-declaration.ligo_output -s pascaligo))) (deps quote-declaration.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst quote-declarations.ligo_output -s pascaligo))) (deps quote-declarations.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst record.ligo_output -s pascaligo))) (deps record.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst recursion.ligo_output -s pascaligo))) (deps recursion.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst redeclaration.ligo_output -s pascaligo))) (deps redeclaration.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst replaceable_id.ligo_output -s pascaligo))) (deps replaceable_id.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst self_address.ligo_output -s pascaligo))) (deps self_address.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst self_type_annotation.ligo_output -s pascaligo))) (deps self_type_annotation.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst self_with_entrypoint.ligo_output -s pascaligo))) (deps self_with_entrypoint.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst self_without_entrypoint.ligo_output -s pascaligo))) (deps self_without_entrypoint.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst set_arithmetic-1.ligo_output -s pascaligo))) (deps set_arithmetic-1.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst set_arithmetic.ligo_output -s pascaligo))) (deps set_arithmetic.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst set_delegate.ligo_output -s pascaligo))) (deps set_delegate.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst shadow.ligo_output -s pascaligo))) (deps shadow.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst simple_access.ligo_output -s pascaligo))) (deps simple_access.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst string_arithmetic.ligo_output -s pascaligo))) (deps string_arithmetic.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst string.ligo_output -s pascaligo))) (deps string.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst super-counter.ligo_output -s pascaligo))) (deps super-counter.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst tez.ligo_output -s pascaligo))) (deps tez.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst time-lock.ligo_output -s pascaligo))) (deps time-lock.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst timestamp.ligo_output -s pascaligo))) (deps timestamp.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst toto.ligo_output -s pascaligo))) (deps toto.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst tuple.ligo_output -s pascaligo))) (deps tuple.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst type-alias.ligo_output -s pascaligo))) (deps type-alias.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst unit.ligo_output -s pascaligo))) (deps unit.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst variant-matching.ligo_output -s pascaligo))) (deps variant-matching.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst variant.ligo_output -s pascaligo))) (deps variant.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst website1.ligo_output -s pascaligo))) (deps website1.ligo_output))
(alias (name runtest) (action (ignore-stdout (run ligo print-cst website2.ligo_output -s pascaligo))) (deps website2.ligo_output))
;; pretty print with the former pretty printed contracts as input
;; reasonligo
(rule (targets address.religo_output2) (action (with-stdout-to address.religo_output2 (run ligo pretty-print address.religo_output -s reasonligo))) (deps address.religo_output))
@ -335,6 +630,7 @@
(rule (targets variant.religo_output2) (action (with-stdout-to variant.religo_output2 (run ligo pretty-print variant.religo_output -s reasonligo))) (deps variant.religo_output))
(rule (targets website2.religo_output2) (action (with-stdout-to website2.religo_output2 (run ligo pretty-print website2.religo_output -s reasonligo))) (deps website2.religo_output))
;; cameligo
(rule (targets assert.mligo_output2) (action (with-stdout-to assert.mligo_output2 (run ligo pretty-print assert.mligo_output -s cameligo))) (deps assert.mligo_output))
(rule (targets address.mligo_output2) (action (with-stdout-to address.mligo_output2 (run ligo pretty-print address.mligo_output -s cameligo))) (deps address.mligo_output))
(rule (targets amount_lambda.mligo_output2) (action (with-stdout-to amount_lambda.mligo_output2 (run ligo pretty-print amount_lambda.mligo_output -s cameligo))) (deps amount_lambda.mligo_output))
@ -370,6 +666,104 @@
(rule (targets function-shared.mligo_output2) (action (with-stdout-to function-shared.mligo_output2 (run ligo pretty-print function-shared.mligo_output -s cameligo))) (deps function-shared.mligo_output))
(rule (targets guess_string.mligo_output2) (action (with-stdout-to guess_string.mligo_output2 (run ligo pretty-print guess_string.mligo_output -s cameligo))) (deps guess_string.mligo_output))
;; pascaligo
(rule (targets address.ligo_output2) (action (with-stdout-to address.ligo_output2 (run ligo pretty-print address.ligo_output -s pascaligo))) (deps address.ligo_output))
(rule (targets amount.ligo_output2) (action (with-stdout-to amount.ligo_output2 (run ligo pretty-print amount.ligo_output -s pascaligo))) (deps amount.ligo_output))
(rule (targets annotation.ligo_output2) (action (with-stdout-to annotation.ligo_output2 (run ligo pretty-print annotation.ligo_output -s pascaligo))) (deps annotation.ligo_output))
(rule (targets application.ligo_output2) (action (with-stdout-to application.ligo_output2 (run ligo pretty-print application.ligo_output -s pascaligo))) (deps application.ligo_output))
(rule (targets arithmetic.ligo_output2) (action (with-stdout-to arithmetic.ligo_output2 (run ligo pretty-print arithmetic.ligo_output -s pascaligo))) (deps arithmetic.ligo_output))
(rule (targets assign.ligo_output2) (action (with-stdout-to assign.ligo_output2 (run ligo pretty-print assign.ligo_output -s pascaligo))) (deps assign.ligo_output))
(rule (targets attributes.ligo_output2) (action (with-stdout-to attributes.ligo_output2 (run ligo pretty-print attributes.ligo_output -s pascaligo))) (deps attributes.ligo_output))
(rule (targets bad_timestamp.ligo_output2) (action (with-stdout-to bad_timestamp.ligo_output2 (run ligo pretty-print bad_timestamp.ligo_output -s pascaligo))) (deps bad_timestamp.ligo_output))
(rule (targets bad_type_operator.ligo_output2) (action (with-stdout-to bad_type_operator.ligo_output2 (run ligo pretty-print bad_type_operator.ligo_output -s pascaligo))) (deps bad_type_operator.ligo_output))
(rule (targets balance_constant.ligo_output2) (action (with-stdout-to balance_constant.ligo_output2 (run ligo pretty-print balance_constant.ligo_output -s pascaligo))) (deps balance_constant.ligo_output))
(rule (targets big_map.ligo_output2) (action (with-stdout-to big_map.ligo_output2 (run ligo pretty-print big_map.ligo_output -s pascaligo))) (deps big_map.ligo_output))
(rule (targets bitwise_arithmetic.ligo_output2) (action (with-stdout-to bitwise_arithmetic.ligo_output2 (run ligo pretty-print bitwise_arithmetic.ligo_output -s pascaligo))) (deps bitwise_arithmetic.ligo_output))
(rule (targets blockless.ligo_output2) (action (with-stdout-to blockless.ligo_output2 (run ligo pretty-print blockless.ligo_output -s pascaligo))) (deps blockless.ligo_output))
(rule (targets boolean_operators.ligo_output2) (action (with-stdout-to boolean_operators.ligo_output2 (run ligo pretty-print boolean_operators.ligo_output -s pascaligo))) (deps boolean_operators.ligo_output))
(rule (targets bytes_arithmetic.ligo_output2) (action (with-stdout-to bytes_arithmetic.ligo_output2 (run ligo pretty-print bytes_arithmetic.ligo_output -s pascaligo))) (deps bytes_arithmetic.ligo_output))
(rule (targets bytes_unpack.ligo_output2) (action (with-stdout-to bytes_unpack.ligo_output2 (run ligo pretty-print bytes_unpack.ligo_output -s pascaligo))) (deps bytes_unpack.ligo_output))
(rule (targets chain_id.ligo_output2) (action (with-stdout-to chain_id.ligo_output2 (run ligo pretty-print chain_id.ligo_output -s pascaligo))) (deps chain_id.ligo_output))
(rule (targets check_signature.ligo_output2) (action (with-stdout-to check_signature.ligo_output2 (run ligo pretty-print check_signature.ligo_output -s pascaligo))) (deps check_signature.ligo_output))
(rule (targets closure-1.ligo_output2) (action (with-stdout-to closure-1.ligo_output2 (run ligo pretty-print closure-1.ligo_output -s pascaligo))) (deps closure-1.ligo_output))
(rule (targets closure-2.ligo_output2) (action (with-stdout-to closure-2.ligo_output2 (run ligo pretty-print closure-2.ligo_output -s pascaligo))) (deps closure-2.ligo_output))
(rule (targets closure-3.ligo_output2) (action (with-stdout-to closure-3.ligo_output2 (run ligo pretty-print closure-3.ligo_output -s pascaligo))) (deps closure-3.ligo_output))
(rule (targets closure.ligo_output2) (action (with-stdout-to closure.ligo_output2 (run ligo pretty-print closure.ligo_output -s pascaligo))) (deps closure.ligo_output))
(rule (targets coase.ligo_output2) (action (with-stdout-to coase.ligo_output2 (run ligo pretty-print coase.ligo_output -s pascaligo))) (deps coase.ligo_output))
(rule (targets condition-simple.ligo_output2) (action (with-stdout-to condition-simple.ligo_output2 (run ligo pretty-print condition-simple.ligo_output -s pascaligo))) (deps condition-simple.ligo_output))
(rule (targets condition.ligo_output2) (action (with-stdout-to condition.ligo_output2 (run ligo pretty-print condition.ligo_output -s pascaligo))) (deps condition.ligo_output))
(rule (targets counter.ligo_output2) (action (with-stdout-to counter.ligo_output2 (run ligo pretty-print counter.ligo_output -s pascaligo))) (deps counter.ligo_output))
(rule (targets crypto.ligo_output2) (action (with-stdout-to crypto.ligo_output2 (run ligo pretty-print crypto.ligo_output -s pascaligo))) (deps crypto.ligo_output))
(rule (targets declaration-local.ligo_output2) (action (with-stdout-to declaration-local.ligo_output2 (run ligo pretty-print declaration-local.ligo_output -s pascaligo))) (deps declaration-local.ligo_output))
(rule (targets declarations.ligo_output2) (action (with-stdout-to declarations.ligo_output2 (run ligo pretty-print declarations.ligo_output -s pascaligo))) (deps declarations.ligo_output))
(rule (targets deep_access.ligo_output2) (action (with-stdout-to deep_access.ligo_output2 (run ligo pretty-print deep_access.ligo_output -s pascaligo))) (deps deep_access.ligo_output))
(rule (targets dispatch-counter.ligo_output2) (action (with-stdout-to dispatch-counter.ligo_output2 (run ligo pretty-print dispatch-counter.ligo_output -s pascaligo))) (deps dispatch-counter.ligo_output))
(rule (targets double_main.ligo_output2) (action (with-stdout-to double_main.ligo_output2 (run ligo pretty-print double_main.ligo_output -s pascaligo))) (deps double_main.ligo_output))
(rule (targets double_michelson_or.ligo_output2) (action (with-stdout-to double_michelson_or.ligo_output2 (run ligo pretty-print double_michelson_or.ligo_output -s pascaligo))) (deps double_michelson_or.ligo_output))
(rule (targets empty_case.ligo_output2) (action (with-stdout-to empty_case.ligo_output2 (run ligo pretty-print empty_case.ligo_output -s pascaligo))) (deps empty_case.ligo_output))
(rule (targets entrypoints.ligo_output2) (action (with-stdout-to entrypoints.ligo_output2 (run ligo pretty-print entrypoints.ligo_output -s pascaligo))) (deps entrypoints.ligo_output))
(rule (targets eq_bool.ligo_output2) (action (with-stdout-to eq_bool.ligo_output2 (run ligo pretty-print eq_bool.ligo_output -s pascaligo))) (deps eq_bool.ligo_output))
(rule (targets evaluation_tests.ligo_output2) (action (with-stdout-to evaluation_tests.ligo_output2 (run ligo pretty-print evaluation_tests.ligo_output -s pascaligo))) (deps evaluation_tests.ligo_output))
(rule (targets FA1.2.ligo_output2) (action (with-stdout-to FA1.2.ligo_output2 (run ligo pretty-print FA1.2.ligo_output -s pascaligo))) (deps FA1.2.ligo_output))
(rule (targets failwith.ligo_output2) (action (with-stdout-to failwith.ligo_output2 (run ligo pretty-print failwith.ligo_output -s pascaligo))) (deps failwith.ligo_output))
(rule (targets for_fail.ligo_output2) (action (with-stdout-to for_fail.ligo_output2 (run ligo pretty-print for_fail.ligo_output -s pascaligo))) (deps for_fail.ligo_output))
(rule (targets function-anon.ligo_output2) (action (with-stdout-to function-anon.ligo_output2 (run ligo pretty-print function-anon.ligo_output -s pascaligo))) (deps function-anon.ligo_output))
(rule (targets function-complex.ligo_output2) (action (with-stdout-to function-complex.ligo_output2 (run ligo pretty-print function-complex.ligo_output -s pascaligo))) (deps function-complex.ligo_output))
(rule (targets function-shared.ligo_output2) (action (with-stdout-to function-shared.ligo_output2 (run ligo pretty-print function-shared.ligo_output -s pascaligo))) (deps function-shared.ligo_output))
(rule (targets function.ligo_output2) (action (with-stdout-to function.ligo_output2 (run ligo pretty-print function.ligo_output -s pascaligo))) (deps function.ligo_output))
(rule (targets get_contract.ligo_output2) (action (with-stdout-to get_contract.ligo_output2 (run ligo pretty-print get_contract.ligo_output -s pascaligo))) (deps get_contract.ligo_output))
(rule (targets high-order.ligo_output2) (action (with-stdout-to high-order.ligo_output2 (run ligo pretty-print high-order.ligo_output -s pascaligo))) (deps high-order.ligo_output))
(rule (targets id.ligo_output2) (action (with-stdout-to id.ligo_output2 (run ligo pretty-print id.ligo_output -s pascaligo))) (deps id.ligo_output))
(rule (targets implicit_account.ligo_output2) (action (with-stdout-to implicit_account.ligo_output2 (run ligo pretty-print implicit_account.ligo_output -s pascaligo))) (deps implicit_account.ligo_output))
(rule (targets included.ligo_output2) (action (with-stdout-to included.ligo_output2 (run ligo pretty-print included.ligo_output -s pascaligo))) (deps included.ligo_output))
(rule (targets includer.ligo_output2) (action (with-stdout-to includer.ligo_output2 (run ligo pretty-print includer.ligo_output -s pascaligo))) (deps includer.ligo_output))
(rule (targets isnat.ligo_output2) (action (with-stdout-to isnat.ligo_output2 (run ligo pretty-print isnat.ligo_output -s pascaligo))) (deps isnat.ligo_output))
(rule (targets key_hash_comparable.ligo_output2) (action (with-stdout-to key_hash_comparable.ligo_output2 (run ligo pretty-print key_hash_comparable.ligo_output -s pascaligo))) (deps key_hash_comparable.ligo_output))
(rule (targets key_hash.ligo_output2) (action (with-stdout-to key_hash.ligo_output2 (run ligo pretty-print key_hash.ligo_output -s pascaligo))) (deps key_hash.ligo_output))
(rule (targets lambda.ligo_output2) (action (with-stdout-to lambda.ligo_output2 (run ligo pretty-print lambda.ligo_output -s pascaligo))) (deps lambda.ligo_output))
(rule (targets list.ligo_output2) (action (with-stdout-to list.ligo_output2 (run ligo pretty-print list.ligo_output -s pascaligo))) (deps list.ligo_output))
(rule (targets loop_bugs.ligo_output2) (action (with-stdout-to loop_bugs.ligo_output2 (run ligo pretty-print loop_bugs.ligo_output -s pascaligo))) (deps loop_bugs.ligo_output))
(rule (targets loop.ligo_output2) (action (with-stdout-to loop.ligo_output2 (run ligo pretty-print loop.ligo_output -s pascaligo))) (deps loop.ligo_output))
(rule (targets map.ligo_output2) (action (with-stdout-to map.ligo_output2 (run ligo pretty-print map.ligo_output -s pascaligo))) (deps map.ligo_output))
(rule (targets match.ligo_output2) (action (with-stdout-to match.ligo_output2 (run ligo pretty-print match.ligo_output -s pascaligo))) (deps match.ligo_output))
(rule (targets michelson_or_tree_intermediary.ligo_output2) (action (with-stdout-to michelson_or_tree_intermediary.ligo_output2 (run ligo pretty-print michelson_or_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_or_tree_intermediary.ligo_output))
(rule (targets michelson_or_tree.ligo_output2) (action (with-stdout-to michelson_or_tree.ligo_output2 (run ligo pretty-print michelson_or_tree.ligo_output -s pascaligo))) (deps michelson_or_tree.ligo_output))
(rule (targets michelson_pair_tree_intermediary.ligo_output2) (action (with-stdout-to michelson_pair_tree_intermediary.ligo_output2 (run ligo pretty-print michelson_pair_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_pair_tree_intermediary.ligo_output))
(rule (targets michelson_pair_tree.ligo_output2) (action (with-stdout-to michelson_pair_tree.ligo_output2 (run ligo pretty-print michelson_pair_tree.ligo_output -s pascaligo))) (deps michelson_pair_tree.ligo_output))
(rule (targets multiple-parameters.ligo_output2) (action (with-stdout-to multiple-parameters.ligo_output2 (run ligo pretty-print multiple-parameters.ligo_output -s pascaligo))) (deps multiple-parameters.ligo_output))
(rule (targets multisig-v2.ligo_output2) (action (with-stdout-to multisig-v2.ligo_output2 (run ligo pretty-print multisig-v2.ligo_output -s pascaligo))) (deps multisig-v2.ligo_output))
(rule (targets multisig.ligo_output2) (action (with-stdout-to multisig.ligo_output2 (run ligo pretty-print multisig.ligo_output -s pascaligo))) (deps multisig.ligo_output))
(rule (targets option.ligo_output2) (action (with-stdout-to option.ligo_output2 (run ligo pretty-print option.ligo_output -s pascaligo))) (deps option.ligo_output))
(rule (targets quote-declaration.ligo_output2) (action (with-stdout-to quote-declaration.ligo_output2 (run ligo pretty-print quote-declaration.ligo_output -s pascaligo))) (deps quote-declaration.ligo_output))
(rule (targets quote-declarations.ligo_output2) (action (with-stdout-to quote-declarations.ligo_output2 (run ligo pretty-print quote-declarations.ligo_output -s pascaligo))) (deps quote-declarations.ligo_output))
(rule (targets record.ligo_output2) (action (with-stdout-to record.ligo_output2 (run ligo pretty-print record.ligo_output -s pascaligo))) (deps record.ligo_output))
(rule (targets recursion.ligo_output2) (action (with-stdout-to recursion.ligo_output2 (run ligo pretty-print recursion.ligo_output -s pascaligo))) (deps recursion.ligo_output))
(rule (targets redeclaration.ligo_output2) (action (with-stdout-to redeclaration.ligo_output2 (run ligo pretty-print redeclaration.ligo_output -s pascaligo))) (deps redeclaration.ligo_output))
(rule (targets replaceable_id.ligo_output2) (action (with-stdout-to replaceable_id.ligo_output2 (run ligo pretty-print replaceable_id.ligo_output -s pascaligo))) (deps replaceable_id.ligo_output))
(rule (targets self_address.ligo_output2) (action (with-stdout-to self_address.ligo_output2 (run ligo pretty-print self_address.ligo_output -s pascaligo))) (deps self_address.ligo_output))
(rule (targets self_type_annotation.ligo_output2) (action (with-stdout-to self_type_annotation.ligo_output2 (run ligo pretty-print self_type_annotation.ligo_output -s pascaligo))) (deps self_type_annotation.ligo_output))
(rule (targets self_with_entrypoint.ligo_output2) (action (with-stdout-to self_with_entrypoint.ligo_output2 (run ligo pretty-print self_with_entrypoint.ligo_output -s pascaligo))) (deps self_with_entrypoint.ligo_output))
(rule (targets self_without_entrypoint.ligo_output2) (action (with-stdout-to self_without_entrypoint.ligo_output2 (run ligo pretty-print self_without_entrypoint.ligo_output -s pascaligo))) (deps self_without_entrypoint.ligo_output))
(rule (targets set_arithmetic-1.ligo_output2) (action (with-stdout-to set_arithmetic-1.ligo_output2 (run ligo pretty-print set_arithmetic-1.ligo_output -s pascaligo))) (deps set_arithmetic-1.ligo_output))
(rule (targets set_arithmetic.ligo_output2) (action (with-stdout-to set_arithmetic.ligo_output2 (run ligo pretty-print set_arithmetic.ligo_output -s pascaligo))) (deps set_arithmetic.ligo_output))
(rule (targets set_delegate.ligo_output2) (action (with-stdout-to set_delegate.ligo_output2 (run ligo pretty-print set_delegate.ligo_output -s pascaligo))) (deps set_delegate.ligo_output))
(rule (targets shadow.ligo_output2) (action (with-stdout-to shadow.ligo_output2 (run ligo pretty-print shadow.ligo_output -s pascaligo))) (deps shadow.ligo_output))
(rule (targets simple_access.ligo_output2) (action (with-stdout-to simple_access.ligo_output2 (run ligo pretty-print simple_access.ligo_output -s pascaligo))) (deps simple_access.ligo_output))
(rule (targets string_arithmetic.ligo_output2) (action (with-stdout-to string_arithmetic.ligo_output2 (run ligo pretty-print string_arithmetic.ligo_output -s pascaligo))) (deps string_arithmetic.ligo_output))
(rule (targets string.ligo_output2) (action (with-stdout-to string.ligo_output2 (run ligo pretty-print string.ligo_output -s pascaligo))) (deps string.ligo_output))
(rule (targets super-counter.ligo_output2) (action (with-stdout-to super-counter.ligo_output2 (run ligo pretty-print super-counter.ligo_output -s pascaligo))) (deps super-counter.ligo_output))
(rule (targets tez.ligo_output2) (action (with-stdout-to tez.ligo_output2 (run ligo pretty-print tez.ligo_output -s pascaligo))) (deps tez.ligo_output))
(rule (targets time-lock.ligo_output2) (action (with-stdout-to time-lock.ligo_output2 (run ligo pretty-print time-lock.ligo_output -s pascaligo))) (deps time-lock.ligo_output))
(rule (targets timestamp.ligo_output2) (action (with-stdout-to timestamp.ligo_output2 (run ligo pretty-print timestamp.ligo_output -s pascaligo))) (deps timestamp.ligo_output))
(rule (targets toto.ligo_output2) (action (with-stdout-to toto.ligo_output2 (run ligo pretty-print toto.ligo_output -s pascaligo))) (deps toto.ligo_output))
(rule (targets tuple.ligo_output2) (action (with-stdout-to tuple.ligo_output2 (run ligo pretty-print tuple.ligo_output -s pascaligo))) (deps tuple.ligo_output))
(rule (targets type-alias.ligo_output2) (action (with-stdout-to type-alias.ligo_output2 (run ligo pretty-print type-alias.ligo_output -s pascaligo))) (deps type-alias.ligo_output))
(rule (targets unit.ligo_output2) (action (with-stdout-to unit.ligo_output2 (run ligo pretty-print unit.ligo_output -s pascaligo))) (deps unit.ligo_output))
(rule (targets variant-matching.ligo_output2) (action (with-stdout-to variant-matching.ligo_output2 (run ligo pretty-print variant-matching.ligo_output -s pascaligo))) (deps variant-matching.ligo_output))
(rule (targets variant.ligo_output2) (action (with-stdout-to variant.ligo_output2 (run ligo pretty-print variant.ligo_output -s pascaligo))) (deps variant.ligo_output))
(rule (targets website1.ligo_output2) (action (with-stdout-to website1.ligo_output2 (run ligo pretty-print website1.ligo_output -s pascaligo))) (deps website1.ligo_output))
(rule (targets website2.ligo_output2) (action (with-stdout-to website2.ligo_output2 (run ligo pretty-print website2.ligo_output -s pascaligo))) (deps website2.ligo_output))
;; diff the pretty printed contract with the pretty printed pretty printed contract
;; reasonligo
(alias (name runtest) (action (diff address.religo_output address.religo_output2)) (deps address.religo_output address.religo_output2))
@ -427,6 +821,7 @@
(alias (name runtest) (action (diff variant.religo_output variant.religo_output2)) (deps variant.religo_output variant.religo_output2))
(alias (name runtest) (action (diff website2.religo_output website2.religo_output2)) (deps website2.religo_output website2.religo_output2))
;; cameligo
(alias (name runtest) (action (diff assert.mligo_output assert.mligo_output2)) (deps assert.mligo_output assert.mligo_output2))
(alias (name runtest) (action (diff address.mligo_output address.mligo_output2)) (deps address.mligo_output address.mligo_output2))
(alias (name runtest) (action (diff amount_lambda.mligo_output amount_lambda.mligo_output2)) (deps amount_lambda.mligo_output amount_lambda.mligo_output2))
@ -462,6 +857,106 @@
(alias (name runtest) (action (diff function-shared.mligo_output function-shared.mligo_output2)) (deps function-shared.mligo_output function-shared.mligo_output2))
(alias (name runtest) (action (diff guess_string.mligo_output guess_string.mligo_output2)) (deps guess_string.mligo_output guess_string.mligo_output2))
;; pascaligo
(alias (name runtest) (action (diff address.ligo_output address.ligo_output2)) (deps address.ligo_output address.ligo_output2))
(alias (name runtest) (action (diff amount.ligo_output amount.ligo_output2)) (deps amount.ligo_output amount.ligo_output2))
(alias (name runtest) (action (diff annotation.ligo_output annotation.ligo_output2)) (deps annotation.ligo_output annotation.ligo_output2))
(alias (name runtest) (action (diff application.ligo_output application.ligo_output2)) (deps application.ligo_output application.ligo_output2))
(alias (name runtest) (action (diff arithmetic.ligo_output arithmetic.ligo_output2)) (deps arithmetic.ligo_output arithmetic.ligo_output2))
(alias (name runtest) (action (diff assign.ligo_output assign.ligo_output2)) (deps assign.ligo_output assign.ligo_output2))
(alias (name runtest) (action (diff attributes.ligo_output attributes.ligo_output2)) (deps attributes.ligo_output attributes.ligo_output2))
(alias (name runtest) (action (diff bad_timestamp.ligo_output bad_timestamp.ligo_output2)) (deps bad_timestamp.ligo_output bad_timestamp.ligo_output2))
(alias (name runtest) (action (diff bad_type_operator.ligo_output bad_type_operator.ligo_output2)) (deps bad_type_operator.ligo_output bad_type_operator.ligo_output2))
(alias (name runtest) (action (diff balance_constant.ligo_output balance_constant.ligo_output2)) (deps balance_constant.ligo_output balance_constant.ligo_output2))
(alias (name runtest) (action (diff big_map.ligo_output big_map.ligo_output2)) (deps big_map.ligo_output big_map.ligo_output2))
(alias (name runtest) (action (diff bitwise_arithmetic.ligo_output bitwise_arithmetic.ligo_output2)) (deps bitwise_arithmetic.ligo_output bitwise_arithmetic.ligo_output2))
(alias (name runtest) (action (diff blockless.ligo_output blockless.ligo_output2)) (deps blockless.ligo_output blockless.ligo_output2))
(alias (name runtest) (action (diff boolean_operators.ligo_output boolean_operators.ligo_output2)) (deps boolean_operators.ligo_output boolean_operators.ligo_output2))
(alias (name runtest) (action (diff bytes_arithmetic.ligo_output bytes_arithmetic.ligo_output2)) (deps bytes_arithmetic.ligo_output bytes_arithmetic.ligo_output2))
(alias (name runtest) (action (diff bytes_unpack.ligo_output bytes_unpack.ligo_output2)) (deps bytes_unpack.ligo_output bytes_unpack.ligo_output2))
(alias (name runtest) (action (diff chain_id.ligo_output chain_id.ligo_output2)) (deps chain_id.ligo_output chain_id.ligo_output2))
(alias (name runtest) (action (diff check_signature.ligo_output check_signature.ligo_output2)) (deps check_signature.ligo_output check_signature.ligo_output2))
(alias (name runtest) (action (diff closure-1.ligo_output closure-1.ligo_output2)) (deps closure-1.ligo_output closure-1.ligo_output2))
(alias (name runtest) (action (diff closure-2.ligo_output closure-2.ligo_output2)) (deps closure-2.ligo_output closure-2.ligo_output2))
(alias (name runtest) (action (diff closure-3.ligo_output closure-3.ligo_output2)) (deps closure-3.ligo_output closure-3.ligo_output2))
(alias (name runtest) (action (diff closure.ligo_output closure.ligo_output2)) (deps closure.ligo_output closure.ligo_output2))
(alias (name runtest) (action (diff coase.ligo_output coase.ligo_output2)) (deps coase.ligo_output coase.ligo_output2))
(alias (name runtest) (action (diff condition-simple.ligo_output condition-simple.ligo_output2)) (deps condition-simple.ligo_output condition-simple.ligo_output2))
(alias (name runtest) (action (diff condition.ligo_output condition.ligo_output2)) (deps condition.ligo_output condition.ligo_output2))
(alias (name runtest) (action (diff counter.ligo_output counter.ligo_output2)) (deps counter.ligo_output counter.ligo_output2))
(alias (name runtest) (action (diff crypto.ligo_output crypto.ligo_output2)) (deps crypto.ligo_output crypto.ligo_output2))
(alias (name runtest) (action (diff declaration-local.ligo_output declaration-local.ligo_output2)) (deps declaration-local.ligo_output declaration-local.ligo_output2))
(alias (name runtest) (action (diff declarations.ligo_output declarations.ligo_output2)) (deps declarations.ligo_output declarations.ligo_output2))
(alias (name runtest) (action (diff deep_access.ligo_output deep_access.ligo_output2)) (deps deep_access.ligo_output deep_access.ligo_output2))
(alias (name runtest) (action (diff dispatch-counter.ligo_output dispatch-counter.ligo_output2)) (deps dispatch-counter.ligo_output dispatch-counter.ligo_output2))
(alias (name runtest) (action (diff double_main.ligo_output double_main.ligo_output2)) (deps double_main.ligo_output double_main.ligo_output2))
(alias (name runtest) (action (diff double_michelson_or.ligo_output double_michelson_or.ligo_output2)) (deps double_michelson_or.ligo_output double_michelson_or.ligo_output2))
(alias (name runtest) (action (diff empty_case.ligo_output empty_case.ligo_output2)) (deps empty_case.ligo_output empty_case.ligo_output2))
(alias (name runtest) (action (diff entrypoints.ligo_output entrypoints.ligo_output2)) (deps entrypoints.ligo_output entrypoints.ligo_output2))
(alias (name runtest) (action (diff eq_bool.ligo_output eq_bool.ligo_output2)) (deps eq_bool.ligo_output eq_bool.ligo_output2))
(alias (name runtest) (action (diff evaluation_tests.ligo_output evaluation_tests.ligo_output2)) (deps evaluation_tests.ligo_output evaluation_tests.ligo_output2))
(alias (name runtest) (action (diff FA1.2.ligo_output FA1.2.ligo_output2)) (deps FA1.2.ligo_output FA1.2.ligo_output2))
(alias (name runtest) (action (diff failwith.ligo_output failwith.ligo_output2)) (deps failwith.ligo_output failwith.ligo_output2))
(alias (name runtest) (action (diff for_fail.ligo_output for_fail.ligo_output2)) (deps for_fail.ligo_output for_fail.ligo_output2))
(alias (name runtest) (action (diff function-anon.ligo_output function-anon.ligo_output2)) (deps function-anon.ligo_output function-anon.ligo_output2))
(alias (name runtest) (action (diff function-complex.ligo_output function-complex.ligo_output2)) (deps function-complex.ligo_output function-complex.ligo_output2))
(alias (name runtest) (action (diff function-shared.ligo_output function-shared.ligo_output2)) (deps function-shared.ligo_output function-shared.ligo_output2))
(alias (name runtest) (action (diff function.ligo_output function.ligo_output2)) (deps function.ligo_output function.ligo_output2))
(alias (name runtest) (action (diff get_contract.ligo_output get_contract.ligo_output2)) (deps get_contract.ligo_output get_contract.ligo_output2))
(alias (name runtest) (action (diff high-order.ligo_output high-order.ligo_output2)) (deps high-order.ligo_output high-order.ligo_output2))
(alias (name runtest) (action (diff id.ligo_output id.ligo_output2)) (deps id.ligo_output id.ligo_output2))
(alias (name runtest) (action (diff implicit_account.ligo_output implicit_account.ligo_output2)) (deps implicit_account.ligo_output implicit_account.ligo_output2))
(alias (name runtest) (action (diff included.ligo_output included.ligo_output2)) (deps included.ligo_output included.ligo_output2))
(alias (name runtest) (action (diff includer.ligo_output includer.ligo_output2)) (deps includer.ligo_output includer.ligo_output2))
(alias (name runtest) (action (diff isnat.ligo_output isnat.ligo_output2)) (deps isnat.ligo_output isnat.ligo_output2))
(alias (name runtest) (action (diff key_hash_comparable.ligo_output key_hash_comparable.ligo_output2)) (deps key_hash_comparable.ligo_output key_hash_comparable.ligo_output2))
(alias (name runtest) (action (diff key_hash.ligo_output key_hash.ligo_output2)) (deps key_hash.ligo_output key_hash.ligo_output2))
(alias (name runtest) (action (diff lambda.ligo_output lambda.ligo_output2)) (deps lambda.ligo_output lambda.ligo_output2))
(alias (name runtest) (action (diff list.ligo_output list.ligo_output2)) (deps list.ligo_output list.ligo_output2))
(alias (name runtest) (action (diff loop_bugs.ligo_output loop_bugs.ligo_output2)) (deps loop_bugs.ligo_output loop_bugs.ligo_output2))
(alias (name runtest) (action (diff loop.ligo_output loop.ligo_output2)) (deps loop.ligo_output loop.ligo_output2))
(alias (name runtest) (action (diff map.ligo_output map.ligo_output2)) (deps map.ligo_output map.ligo_output2))
(alias (name runtest) (action (diff match.ligo_output match.ligo_output2)) (deps match.ligo_output match.ligo_output2))
(alias (name runtest) (action (diff michelson_or_tree_intermediary.ligo_output michelson_or_tree_intermediary.ligo_output2)) (deps michelson_or_tree_intermediary.ligo_output michelson_or_tree_intermediary.ligo_output2))
(alias (name runtest) (action (diff michelson_or_tree.ligo_output michelson_or_tree.ligo_output2)) (deps michelson_or_tree.ligo_output michelson_or_tree.ligo_output2))
(alias (name runtest) (action (diff michelson_pair_tree_intermediary.ligo_output michelson_pair_tree_intermediary.ligo_output2)) (deps michelson_pair_tree_intermediary.ligo_output michelson_pair_tree_intermediary.ligo_output2))
(alias (name runtest) (action (diff michelson_pair_tree.ligo_output michelson_pair_tree.ligo_output2)) (deps michelson_pair_tree.ligo_output michelson_pair_tree.ligo_output2))
(alias (name runtest) (action (diff multiple-parameters.ligo_output multiple-parameters.ligo_output2)) (deps multiple-parameters.ligo_output multiple-parameters.ligo_output2))
(alias (name runtest) (action (diff multisig-v2.ligo_output multisig-v2.ligo_output2)) (deps multisig-v2.ligo_output multisig-v2.ligo_output2))
(alias (name runtest) (action (diff multisig.ligo_output multisig.ligo_output2)) (deps multisig.ligo_output multisig.ligo_output2))
(alias (name runtest) (action (diff option.ligo_output option.ligo_output2)) (deps option.ligo_output option.ligo_output2))
(alias (name runtest) (action (diff quote-declaration.ligo_output quote-declaration.ligo_output2)) (deps quote-declaration.ligo_output quote-declaration.ligo_output2))
(alias (name runtest) (action (diff quote-declarations.ligo_output quote-declarations.ligo_output2)) (deps quote-declarations.ligo_output quote-declarations.ligo_output2))
(alias (name runtest) (action (diff record.ligo_output record.ligo_output2)) (deps record.ligo_output record.ligo_output2))
(alias (name runtest) (action (diff recursion.ligo_output recursion.ligo_output2)) (deps recursion.ligo_output recursion.ligo_output2))
(alias (name runtest) (action (diff redeclaration.ligo_output redeclaration.ligo_output2)) (deps redeclaration.ligo_output redeclaration.ligo_output2))
(alias (name runtest) (action (diff replaceable_id.ligo_output replaceable_id.ligo_output2)) (deps replaceable_id.ligo_output replaceable_id.ligo_output2))
(alias (name runtest) (action (diff self_address.ligo_output self_address.ligo_output2)) (deps self_address.ligo_output self_address.ligo_output2))
(alias (name runtest) (action (diff self_type_annotation.ligo_output self_type_annotation.ligo_output2)) (deps self_type_annotation.ligo_output self_type_annotation.ligo_output2))
(alias (name runtest) (action (diff self_with_entrypoint.ligo_output self_with_entrypoint.ligo_output2)) (deps self_with_entrypoint.ligo_output self_with_entrypoint.ligo_output2))
(alias (name runtest) (action (diff self_without_entrypoint.ligo_output self_without_entrypoint.ligo_output2)) (deps self_without_entrypoint.ligo_output self_without_entrypoint.ligo_output2))
(alias (name runtest) (action (diff set_arithmetic-1.ligo_output set_arithmetic-1.ligo_output2)) (deps set_arithmetic-1.ligo_output set_arithmetic-1.ligo_output2))
(alias (name runtest) (action (diff set_arithmetic.ligo_output set_arithmetic.ligo_output2)) (deps set_arithmetic.ligo_output set_arithmetic.ligo_output2))
(alias (name runtest) (action (diff set_delegate.ligo_output set_delegate.ligo_output2)) (deps set_delegate.ligo_output set_delegate.ligo_output2))
(alias (name runtest) (action (diff shadow.ligo_output shadow.ligo_output2)) (deps shadow.ligo_output shadow.ligo_output2))
(alias (name runtest) (action (diff simple_access.ligo_output simple_access.ligo_output2)) (deps simple_access.ligo_output simple_access.ligo_output2))
(alias (name runtest) (action (diff string_arithmetic.ligo_output string_arithmetic.ligo_output2)) (deps string_arithmetic.ligo_output string_arithmetic.ligo_output2))
(alias (name runtest) (action (diff string.ligo_output string.ligo_output2)) (deps string.ligo_output string.ligo_output2))
(alias (name runtest) (action (diff super-counter.ligo_output super-counter.ligo_output2)) (deps super-counter.ligo_output super-counter.ligo_output2))
(alias (name runtest) (action (diff tez.ligo_output tez.ligo_output2)) (deps tez.ligo_output tez.ligo_output2))
(alias (name runtest) (action (diff time-lock.ligo_output time-lock.ligo_output2)) (deps time-lock.ligo_output time-lock.ligo_output2))
(alias (name runtest) (action (diff timestamp.ligo_output timestamp.ligo_output2)) (deps timestamp.ligo_output timestamp.ligo_output2))
(alias (name runtest) (action (diff toto.ligo_output toto.ligo_output2)) (deps toto.ligo_output toto.ligo_output2))
(alias (name runtest) (action (diff tuple.ligo_output tuple.ligo_output2)) (deps tuple.ligo_output tuple.ligo_output2))
(alias (name runtest) (action (diff type-alias.ligo_output type-alias.ligo_output2)) (deps type-alias.ligo_output type-alias.ligo_output2))
(alias (name runtest) (action (diff unit.ligo_output unit.ligo_output2)) (deps unit.ligo_output unit.ligo_output2))
(alias (name runtest) (action (diff variant-matching.ligo_output variant-matching.ligo_output2)) (deps variant-matching.ligo_output variant-matching.ligo_output2))
(alias (name runtest) (action (diff variant.ligo_output variant.ligo_output2)) (deps variant.ligo_output variant.ligo_output2))
(alias (name runtest) (action (diff website1.ligo_output website1.ligo_output2)) (deps website1.ligo_output website1.ligo_output2))
(alias (name runtest) (action (diff website2.ligo_output website2.ligo_output2)) (deps website2.ligo_output website2.ligo_output2))
;; check produced ast
;; reasonligo
(rule (targets address.religo_ast) (action (with-stdout-to address.religo_ast (run ligo print-ast address.religo -s reasonligo))) (deps address.religo))
(rule (targets amount.religo_ast) (action (with-stdout-to amount.religo_ast (run ligo print-ast amount.religo -s reasonligo))) (deps amount.religo))
(rule (targets arithmetic.religo_ast) (action (with-stdout-to arithmetic.religo_ast (run ligo print-ast arithmetic.religo -s reasonligo))) (deps arithmetic.religo))
@ -515,6 +1010,7 @@
(rule (targets variant.religo_ast) (action (with-stdout-to variant.religo_ast (run ligo print-ast variant.religo -s reasonligo))) (deps variant.religo))
(rule (targets website2.religo_ast) (action (with-stdout-to website2.religo_ast (run ligo print-ast website2.religo -s reasonligo))) (deps website2.religo))
;; cameligo
(rule (targets assert.mligo_ast) (action (with-stdout-to assert.mligo_ast (run ligo print-ast assert.mligo -s cameligo))) (deps assert.mligo))
(rule (targets address.mligo_ast) (action (with-stdout-to address.mligo_ast (run ligo print-ast address.mligo -s cameligo))) (deps address.mligo))
(rule (targets amount_lambda.mligo_ast) (action (with-stdout-to amount_lambda.mligo_ast (run ligo print-ast amount_lambda.mligo -s cameligo))) (deps amount_lambda.mligo))
@ -549,8 +1045,105 @@
(rule (targets fibo4.mligo_ast) (action (with-stdout-to fibo4.mligo_ast (run ligo print-ast fibo4.mligo -s cameligo))) (deps fibo4.mligo))
(rule (targets function-shared.mligo_ast) (action (with-stdout-to function-shared.mligo_ast (run ligo print-ast function-shared.mligo -s cameligo))) (deps function-shared.mligo))
(rule (targets guess_string.mligo_ast) (action (with-stdout-to guess_string.mligo_ast (run ligo print-ast guess_string.mligo -s cameligo))) (deps guess_string.mligo))
;; pascaligo
(rule (targets address.ligo_ast) (action (with-stdout-to address.ligo_ast (run ligo print-ast address.ligo -s pascaligo))) (deps address.ligo))
(rule (targets amount.ligo_ast) (action (with-stdout-to amount.ligo_ast (run ligo print-ast amount.ligo -s pascaligo))) (deps amount.ligo))
(rule (targets annotation.ligo_ast) (action (with-stdout-to annotation.ligo_ast (run ligo print-ast annotation.ligo -s pascaligo))) (deps annotation.ligo))
(rule (targets application.ligo_ast) (action (with-stdout-to application.ligo_ast (run ligo print-ast application.ligo -s pascaligo))) (deps application.ligo))
(rule (targets arithmetic.ligo_ast) (action (with-stdout-to arithmetic.ligo_ast (run ligo print-ast arithmetic.ligo -s pascaligo))) (deps arithmetic.ligo))
(rule (targets assign.ligo_ast) (action (with-stdout-to assign.ligo_ast (run ligo print-ast assign.ligo -s pascaligo))) (deps assign.ligo))
(rule (targets attributes.ligo_ast) (action (with-stdout-to attributes.ligo_ast (run ligo print-ast attributes.ligo -s pascaligo))) (deps attributes.ligo))
(rule (targets bad_timestamp.ligo_ast) (action (with-stdout-to bad_timestamp.ligo_ast (run ligo print-ast bad_timestamp.ligo -s pascaligo))) (deps bad_timestamp.ligo))
(rule (targets bad_type_operator.ligo_ast) (action (with-stdout-to bad_type_operator.ligo_ast (run ligo print-ast bad_type_operator.ligo -s pascaligo))) (deps bad_type_operator.ligo))
(rule (targets balance_constant.ligo_ast) (action (with-stdout-to balance_constant.ligo_ast (run ligo print-ast balance_constant.ligo -s pascaligo))) (deps balance_constant.ligo))
(rule (targets big_map.ligo_ast) (action (with-stdout-to big_map.ligo_ast (run ligo print-ast big_map.ligo -s pascaligo))) (deps big_map.ligo))
(rule (targets bitwise_arithmetic.ligo_ast) (action (with-stdout-to bitwise_arithmetic.ligo_ast (run ligo print-ast bitwise_arithmetic.ligo -s pascaligo))) (deps bitwise_arithmetic.ligo))
(rule (targets blockless.ligo_ast) (action (with-stdout-to blockless.ligo_ast (run ligo print-ast blockless.ligo -s pascaligo))) (deps blockless.ligo))
(rule (targets boolean_operators.ligo_ast) (action (with-stdout-to boolean_operators.ligo_ast (run ligo print-ast boolean_operators.ligo -s pascaligo))) (deps boolean_operators.ligo))
(rule (targets bytes_arithmetic.ligo_ast) (action (with-stdout-to bytes_arithmetic.ligo_ast (run ligo print-ast bytes_arithmetic.ligo -s pascaligo))) (deps bytes_arithmetic.ligo))
(rule (targets bytes_unpack.ligo_ast) (action (with-stdout-to bytes_unpack.ligo_ast (run ligo print-ast bytes_unpack.ligo -s pascaligo))) (deps bytes_unpack.ligo))
(rule (targets chain_id.ligo_ast) (action (with-stdout-to chain_id.ligo_ast (run ligo print-ast chain_id.ligo -s pascaligo))) (deps chain_id.ligo))
(rule (targets check_signature.ligo_ast) (action (with-stdout-to check_signature.ligo_ast (run ligo print-ast check_signature.ligo -s pascaligo))) (deps check_signature.ligo))
(rule (targets closure-1.ligo_ast) (action (with-stdout-to closure-1.ligo_ast (run ligo print-ast closure-1.ligo -s pascaligo))) (deps closure-1.ligo))
(rule (targets closure-2.ligo_ast) (action (with-stdout-to closure-2.ligo_ast (run ligo print-ast closure-2.ligo -s pascaligo))) (deps closure-2.ligo))
(rule (targets closure-3.ligo_ast) (action (with-stdout-to closure-3.ligo_ast (run ligo print-ast closure-3.ligo -s pascaligo))) (deps closure-3.ligo))
(rule (targets closure.ligo_ast) (action (with-stdout-to closure.ligo_ast (run ligo print-ast closure.ligo -s pascaligo))) (deps closure.ligo))
(rule (targets coase.ligo_ast) (action (with-stdout-to coase.ligo_ast (run ligo print-ast coase.ligo -s pascaligo))) (deps coase.ligo))
(rule (targets condition-simple.ligo_ast) (action (with-stdout-to condition-simple.ligo_ast (run ligo print-ast condition-simple.ligo -s pascaligo))) (deps condition-simple.ligo))
(rule (targets condition.ligo_ast) (action (with-stdout-to condition.ligo_ast (run ligo print-ast condition.ligo -s pascaligo))) (deps condition.ligo))
(rule (targets counter.ligo_ast) (action (with-stdout-to counter.ligo_ast (run ligo print-ast counter.ligo -s pascaligo))) (deps counter.ligo))
(rule (targets crypto.ligo_ast) (action (with-stdout-to crypto.ligo_ast (run ligo print-ast crypto.ligo -s pascaligo))) (deps crypto.ligo))
(rule (targets declaration-local.ligo_ast) (action (with-stdout-to declaration-local.ligo_ast (run ligo print-ast declaration-local.ligo -s pascaligo))) (deps declaration-local.ligo))
(rule (targets declarations.ligo_ast) (action (with-stdout-to declarations.ligo_ast (run ligo print-ast declarations.ligo -s pascaligo))) (deps declarations.ligo))
(rule (targets deep_access.ligo_ast) (action (with-stdout-to deep_access.ligo_ast (run ligo print-ast deep_access.ligo -s pascaligo))) (deps deep_access.ligo))
(rule (targets dispatch-counter.ligo_ast) (action (with-stdout-to dispatch-counter.ligo_ast (run ligo print-ast dispatch-counter.ligo -s pascaligo))) (deps dispatch-counter.ligo))
(rule (targets double_main.ligo_ast) (action (with-stdout-to double_main.ligo_ast (run ligo print-ast double_main.ligo -s pascaligo))) (deps double_main.ligo))
(rule (targets double_michelson_or.ligo_ast) (action (with-stdout-to double_michelson_or.ligo_ast (run ligo print-ast double_michelson_or.ligo -s pascaligo))) (deps double_michelson_or.ligo))
(rule (targets empty_case.ligo_ast) (action (with-stdout-to empty_case.ligo_ast (run ligo print-ast empty_case.ligo -s pascaligo))) (deps empty_case.ligo))
(rule (targets entrypoints.ligo_ast) (action (with-stdout-to entrypoints.ligo_ast (run ligo print-ast entrypoints.ligo -s pascaligo))) (deps entrypoints.ligo))
(rule (targets eq_bool.ligo_ast) (action (with-stdout-to eq_bool.ligo_ast (run ligo print-ast eq_bool.ligo -s pascaligo))) (deps eq_bool.ligo))
(rule (targets evaluation_tests.ligo_ast) (action (with-stdout-to evaluation_tests.ligo_ast (run ligo print-ast evaluation_tests.ligo -s pascaligo))) (deps evaluation_tests.ligo))
(rule (targets FA1.2.ligo_ast) (action (with-stdout-to FA1.2.ligo_ast (run ligo print-ast FA1.2.ligo -s pascaligo))) (deps FA1.2.ligo))
(rule (targets failwith.ligo_ast) (action (with-stdout-to failwith.ligo_ast (run ligo print-ast failwith.ligo -s pascaligo))) (deps failwith.ligo))
(rule (targets for_fail.ligo_ast) (action (with-stdout-to for_fail.ligo_ast (run ligo print-ast for_fail.ligo -s pascaligo))) (deps for_fail.ligo))
(rule (targets function-anon.ligo_ast) (action (with-stdout-to function-anon.ligo_ast (run ligo print-ast function-anon.ligo -s pascaligo))) (deps function-anon.ligo))
(rule (targets function-complex.ligo_ast) (action (with-stdout-to function-complex.ligo_ast (run ligo print-ast function-complex.ligo -s pascaligo))) (deps function-complex.ligo))
(rule (targets function-shared.ligo_ast) (action (with-stdout-to function-shared.ligo_ast (run ligo print-ast function-shared.ligo -s pascaligo))) (deps function-shared.ligo))
(rule (targets function.ligo_ast) (action (with-stdout-to function.ligo_ast (run ligo print-ast function.ligo -s pascaligo))) (deps function.ligo))
(rule (targets get_contract.ligo_ast) (action (with-stdout-to get_contract.ligo_ast (run ligo print-ast get_contract.ligo -s pascaligo))) (deps get_contract.ligo))
(rule (targets high-order.ligo_ast) (action (with-stdout-to high-order.ligo_ast (run ligo print-ast high-order.ligo -s pascaligo))) (deps high-order.ligo))
(rule (targets id.ligo_ast) (action (with-stdout-to id.ligo_ast (run ligo print-ast id.ligo -s pascaligo))) (deps id.ligo))
(rule (targets implicit_account.ligo_ast) (action (with-stdout-to implicit_account.ligo_ast (run ligo print-ast implicit_account.ligo -s pascaligo))) (deps implicit_account.ligo))
(rule (targets included.ligo_ast) (action (with-stdout-to included.ligo_ast (run ligo print-ast included.ligo -s pascaligo))) (deps included.ligo))
(rule (targets includer.ligo_ast) (action (with-stdout-to includer.ligo_ast (run ligo print-ast includer.ligo -s pascaligo))) (deps includer.ligo))
(rule (targets isnat.ligo_ast) (action (with-stdout-to isnat.ligo_ast (run ligo print-ast isnat.ligo -s pascaligo))) (deps isnat.ligo))
(rule (targets key_hash_comparable.ligo_ast) (action (with-stdout-to key_hash_comparable.ligo_ast (run ligo print-ast key_hash_comparable.ligo -s pascaligo))) (deps key_hash_comparable.ligo))
(rule (targets key_hash.ligo_ast) (action (with-stdout-to key_hash.ligo_ast (run ligo print-ast key_hash.ligo -s pascaligo))) (deps key_hash.ligo))
(rule (targets lambda.ligo_ast) (action (with-stdout-to lambda.ligo_ast (run ligo print-ast lambda.ligo -s pascaligo))) (deps lambda.ligo))
(rule (targets list.ligo_ast) (action (with-stdout-to list.ligo_ast (run ligo print-ast list.ligo -s pascaligo))) (deps list.ligo))
(rule (targets loop_bugs.ligo_ast) (action (with-stdout-to loop_bugs.ligo_ast (run ligo print-ast loop_bugs.ligo -s pascaligo))) (deps loop_bugs.ligo))
(rule (targets loop.ligo_ast) (action (with-stdout-to loop.ligo_ast (run ligo print-ast loop.ligo -s pascaligo))) (deps loop.ligo))
(rule (targets map.ligo_ast) (action (with-stdout-to map.ligo_ast (run ligo print-ast map.ligo -s pascaligo))) (deps map.ligo))
(rule (targets match.ligo_ast) (action (with-stdout-to match.ligo_ast (run ligo print-ast match.ligo -s pascaligo))) (deps match.ligo))
(rule (targets michelson_or_tree_intermediary.ligo_ast) (action (with-stdout-to michelson_or_tree_intermediary.ligo_ast (run ligo print-ast michelson_or_tree_intermediary.ligo -s pascaligo))) (deps michelson_or_tree_intermediary.ligo))
(rule (targets michelson_or_tree.ligo_ast) (action (with-stdout-to michelson_or_tree.ligo_ast (run ligo print-ast michelson_or_tree.ligo -s pascaligo))) (deps michelson_or_tree.ligo))
(rule (targets michelson_pair_tree_intermediary.ligo_ast) (action (with-stdout-to michelson_pair_tree_intermediary.ligo_ast (run ligo print-ast michelson_pair_tree_intermediary.ligo -s pascaligo))) (deps michelson_pair_tree_intermediary.ligo))
(rule (targets michelson_pair_tree.ligo_ast) (action (with-stdout-to michelson_pair_tree.ligo_ast (run ligo print-ast michelson_pair_tree.ligo -s pascaligo))) (deps michelson_pair_tree.ligo))
(rule (targets multiple-parameters.ligo_ast) (action (with-stdout-to multiple-parameters.ligo_ast (run ligo print-ast multiple-parameters.ligo -s pascaligo))) (deps multiple-parameters.ligo))
(rule (targets multisig-v2.ligo_ast) (action (with-stdout-to multisig-v2.ligo_ast (run ligo print-ast multisig-v2.ligo -s pascaligo))) (deps multisig-v2.ligo))
(rule (targets multisig.ligo_ast) (action (with-stdout-to multisig.ligo_ast (run ligo print-ast multisig.ligo -s pascaligo))) (deps multisig.ligo))
(rule (targets option.ligo_ast) (action (with-stdout-to option.ligo_ast (run ligo print-ast option.ligo -s pascaligo))) (deps option.ligo))
(rule (targets quote-declaration.ligo_ast) (action (with-stdout-to quote-declaration.ligo_ast (run ligo print-ast quote-declaration.ligo -s pascaligo))) (deps quote-declaration.ligo))
(rule (targets quote-declarations.ligo_ast) (action (with-stdout-to quote-declarations.ligo_ast (run ligo print-ast quote-declarations.ligo -s pascaligo))) (deps quote-declarations.ligo))
(rule (targets record.ligo_ast) (action (with-stdout-to record.ligo_ast (run ligo print-ast record.ligo -s pascaligo))) (deps record.ligo))
(rule (targets recursion.ligo_ast) (action (with-stdout-to recursion.ligo_ast (run ligo print-ast recursion.ligo -s pascaligo))) (deps recursion.ligo))
(rule (targets redeclaration.ligo_ast) (action (with-stdout-to redeclaration.ligo_ast (run ligo print-ast redeclaration.ligo -s pascaligo))) (deps redeclaration.ligo))
(rule (targets replaceable_id.ligo_ast) (action (with-stdout-to replaceable_id.ligo_ast (run ligo print-ast replaceable_id.ligo -s pascaligo))) (deps replaceable_id.ligo))
(rule (targets self_address.ligo_ast) (action (with-stdout-to self_address.ligo_ast (run ligo print-ast self_address.ligo -s pascaligo))) (deps self_address.ligo))
(rule (targets self_type_annotation.ligo_ast) (action (with-stdout-to self_type_annotation.ligo_ast (run ligo print-ast self_type_annotation.ligo -s pascaligo))) (deps self_type_annotation.ligo))
(rule (targets self_with_entrypoint.ligo_ast) (action (with-stdout-to self_with_entrypoint.ligo_ast (run ligo print-ast self_with_entrypoint.ligo -s pascaligo))) (deps self_with_entrypoint.ligo))
(rule (targets self_without_entrypoint.ligo_ast) (action (with-stdout-to self_without_entrypoint.ligo_ast (run ligo print-ast self_without_entrypoint.ligo -s pascaligo))) (deps self_without_entrypoint.ligo))
(rule (targets set_arithmetic-1.ligo_ast) (action (with-stdout-to set_arithmetic-1.ligo_ast (run ligo print-ast set_arithmetic-1.ligo -s pascaligo))) (deps set_arithmetic-1.ligo))
(rule (targets set_arithmetic.ligo_ast) (action (with-stdout-to set_arithmetic.ligo_ast (run ligo print-ast set_arithmetic.ligo -s pascaligo))) (deps set_arithmetic.ligo))
(rule (targets set_delegate.ligo_ast) (action (with-stdout-to set_delegate.ligo_ast (run ligo print-ast set_delegate.ligo -s pascaligo))) (deps set_delegate.ligo))
(rule (targets shadow.ligo_ast) (action (with-stdout-to shadow.ligo_ast (run ligo print-ast shadow.ligo -s pascaligo))) (deps shadow.ligo))
(rule (targets simple_access.ligo_ast) (action (with-stdout-to simple_access.ligo_ast (run ligo print-ast simple_access.ligo -s pascaligo))) (deps simple_access.ligo))
(rule (targets string_arithmetic.ligo_ast) (action (with-stdout-to string_arithmetic.ligo_ast (run ligo print-ast string_arithmetic.ligo -s pascaligo))) (deps string_arithmetic.ligo))
(rule (targets string.ligo_ast) (action (with-stdout-to string.ligo_ast (run ligo print-ast string.ligo -s pascaligo))) (deps string.ligo))
(rule (targets super-counter.ligo_ast) (action (with-stdout-to super-counter.ligo_ast (run ligo print-ast super-counter.ligo -s pascaligo))) (deps super-counter.ligo))
(rule (targets tez.ligo_ast) (action (with-stdout-to tez.ligo_ast (run ligo print-ast tez.ligo -s pascaligo))) (deps tez.ligo))
(rule (targets time-lock.ligo_ast) (action (with-stdout-to time-lock.ligo_ast (run ligo print-ast time-lock.ligo -s pascaligo))) (deps time-lock.ligo))
(rule (targets timestamp.ligo_ast) (action (with-stdout-to timestamp.ligo_ast (run ligo print-ast timestamp.ligo -s pascaligo))) (deps timestamp.ligo))
(rule (targets toto.ligo_ast) (action (with-stdout-to toto.ligo_ast (run ligo print-ast toto.ligo -s pascaligo))) (deps toto.ligo))
(rule (targets tuple.ligo_ast) (action (with-stdout-to tuple.ligo_ast (run ligo print-ast tuple.ligo -s pascaligo))) (deps tuple.ligo))
(rule (targets type-alias.ligo_ast) (action (with-stdout-to type-alias.ligo_ast (run ligo print-ast type-alias.ligo -s pascaligo))) (deps type-alias.ligo))
(rule (targets unit.ligo_ast) (action (with-stdout-to unit.ligo_ast (run ligo print-ast unit.ligo -s pascaligo))) (deps unit.ligo))
(rule (targets variant-matching.ligo_ast) (action (with-stdout-to variant-matching.ligo_ast (run ligo print-ast variant-matching.ligo -s pascaligo))) (deps variant-matching.ligo))
(rule (targets variant.ligo_ast) (action (with-stdout-to variant.ligo_ast (run ligo print-ast variant.ligo -s pascaligo))) (deps variant.ligo))
(rule (targets website1.ligo_ast) (action (with-stdout-to website1.ligo_ast (run ligo print-ast website1.ligo -s pascaligo))) (deps website1.ligo))
(rule (targets website2.ligo_ast) (action (with-stdout-to website2.ligo_ast (run ligo print-ast website2.ligo -s pascaligo))) (deps website2.ligo))
;; reasonligo
(rule (targets address.religo_ast_pretty) (action (with-stdout-to address.religo_ast_pretty (run ligo print-ast address.religo_output -s reasonligo))) (deps address.religo_output))
(rule (targets amount.religo_ast_pretty) (action (with-stdout-to amount.religo_ast_pretty (run ligo print-ast amount.religo_output -s reasonligo))) (deps amount.religo_output))
(rule (targets arithmetic.religo_ast_pretty) (action (with-stdout-to arithmetic.religo_ast_pretty (run ligo print-ast arithmetic.religo_output -s reasonligo))) (deps arithmetic.religo_output))
@ -604,6 +1197,7 @@
(rule (targets variant.religo_ast_pretty) (action (with-stdout-to variant.religo_ast_pretty (run ligo print-ast variant.religo_output -s reasonligo))) (deps variant.religo_output))
(rule (targets website2.religo_ast_pretty) (action (with-stdout-to website2.religo_ast_pretty (run ligo print-ast website2.religo_output -s reasonligo))) (deps website2.religo_output))
;; cameligo
(rule (targets assert.mligo_ast_pretty) (action (with-stdout-to assert.mligo_ast_pretty (run ligo print-ast assert.mligo_output -s cameligo))) (deps assert.mligo_output))
(rule (targets address.mligo_ast_pretty) (action (with-stdout-to address.mligo_ast_pretty (run ligo print-ast address.mligo_output -s cameligo))) (deps address.mligo_output))
(rule (targets amount_lambda.mligo_ast_pretty) (action (with-stdout-to amount_lambda.mligo_ast_pretty (run ligo print-ast amount_lambda.mligo_output -s cameligo))) (deps amount_lambda.mligo_output))
@ -638,7 +1232,106 @@
(rule (targets fibo4.mligo_ast_pretty) (action (with-stdout-to fibo4.mligo_ast_pretty (run ligo print-ast fibo4.mligo_output -s cameligo))) (deps fibo4.mligo_output))
(rule (targets function-shared.mligo_ast_pretty) (action (with-stdout-to function-shared.mligo_ast_pretty (run ligo print-ast function-shared.mligo_output -s cameligo))) (deps function-shared.mligo_output))
(rule (targets guess_string.mligo_ast_pretty) (action (with-stdout-to guess_string.mligo_ast_pretty (run ligo print-ast guess_string.mligo_output -s cameligo))) (deps guess_string.mligo_output))
;; pascaligo
(rule (targets address.ligo_ast_pretty) (action (with-stdout-to address.ligo_ast_pretty (run ligo print-ast address.ligo_output -s pascaligo))) (deps address.ligo_output))
(rule (targets amount.ligo_ast_pretty) (action (with-stdout-to amount.ligo_ast_pretty (run ligo print-ast amount.ligo_output -s pascaligo))) (deps amount.ligo_output))
(rule (targets annotation.ligo_ast_pretty) (action (with-stdout-to annotation.ligo_ast_pretty (run ligo print-ast annotation.ligo_output -s pascaligo))) (deps annotation.ligo_output))
(rule (targets application.ligo_ast_pretty) (action (with-stdout-to application.ligo_ast_pretty (run ligo print-ast application.ligo_output -s pascaligo))) (deps application.ligo_output))
(rule (targets arithmetic.ligo_ast_pretty) (action (with-stdout-to arithmetic.ligo_ast_pretty (run ligo print-ast arithmetic.ligo_output -s pascaligo))) (deps arithmetic.ligo_output))
(rule (targets assign.ligo_ast_pretty) (action (with-stdout-to assign.ligo_ast_pretty (run ligo print-ast assign.ligo_output -s pascaligo))) (deps assign.ligo_output))
(rule (targets attributes.ligo_ast_pretty) (action (with-stdout-to attributes.ligo_ast_pretty (run ligo print-ast attributes.ligo_output -s pascaligo))) (deps attributes.ligo_output))
(rule (targets bad_timestamp.ligo_ast_pretty) (action (with-stdout-to bad_timestamp.ligo_ast_pretty (run ligo print-ast bad_timestamp.ligo_output -s pascaligo))) (deps bad_timestamp.ligo_output))
(rule (targets bad_type_operator.ligo_ast_pretty) (action (with-stdout-to bad_type_operator.ligo_ast_pretty (run ligo print-ast bad_type_operator.ligo_output -s pascaligo))) (deps bad_type_operator.ligo_output))
(rule (targets balance_constant.ligo_ast_pretty) (action (with-stdout-to balance_constant.ligo_ast_pretty (run ligo print-ast balance_constant.ligo_output -s pascaligo))) (deps balance_constant.ligo_output))
(rule (targets big_map.ligo_ast_pretty) (action (with-stdout-to big_map.ligo_ast_pretty (run ligo print-ast big_map.ligo_output -s pascaligo))) (deps big_map.ligo_output))
(rule (targets bitwise_arithmetic.ligo_ast_pretty) (action (with-stdout-to bitwise_arithmetic.ligo_ast_pretty (run ligo print-ast bitwise_arithmetic.ligo_output -s pascaligo))) (deps bitwise_arithmetic.ligo_output))
(rule (targets blockless.ligo_ast_pretty) (action (with-stdout-to blockless.ligo_ast_pretty (run ligo print-ast blockless.ligo_output -s pascaligo))) (deps blockless.ligo_output))
(rule (targets boolean_operators.ligo_ast_pretty) (action (with-stdout-to boolean_operators.ligo_ast_pretty (run ligo print-ast boolean_operators.ligo_output -s pascaligo))) (deps boolean_operators.ligo_output))
(rule (targets bytes_arithmetic.ligo_ast_pretty) (action (with-stdout-to bytes_arithmetic.ligo_ast_pretty (run ligo print-ast bytes_arithmetic.ligo_output -s pascaligo))) (deps bytes_arithmetic.ligo_output))
(rule (targets bytes_unpack.ligo_ast_pretty) (action (with-stdout-to bytes_unpack.ligo_ast_pretty (run ligo print-ast bytes_unpack.ligo_output -s pascaligo))) (deps bytes_unpack.ligo_output))
(rule (targets chain_id.ligo_ast_pretty) (action (with-stdout-to chain_id.ligo_ast_pretty (run ligo print-ast chain_id.ligo_output -s pascaligo))) (deps chain_id.ligo_output))
(rule (targets check_signature.ligo_ast_pretty) (action (with-stdout-to check_signature.ligo_ast_pretty (run ligo print-ast check_signature.ligo_output -s pascaligo))) (deps check_signature.ligo_output))
(rule (targets closure-1.ligo_ast_pretty) (action (with-stdout-to closure-1.ligo_ast_pretty (run ligo print-ast closure-1.ligo_output -s pascaligo))) (deps closure-1.ligo_output))
(rule (targets closure-2.ligo_ast_pretty) (action (with-stdout-to closure-2.ligo_ast_pretty (run ligo print-ast closure-2.ligo_output -s pascaligo))) (deps closure-2.ligo_output))
(rule (targets closure-3.ligo_ast_pretty) (action (with-stdout-to closure-3.ligo_ast_pretty (run ligo print-ast closure-3.ligo_output -s pascaligo))) (deps closure-3.ligo_output))
(rule (targets closure.ligo_ast_pretty) (action (with-stdout-to closure.ligo_ast_pretty (run ligo print-ast closure.ligo_output -s pascaligo))) (deps closure.ligo_output))
(rule (targets coase.ligo_ast_pretty) (action (with-stdout-to coase.ligo_ast_pretty (run ligo print-ast coase.ligo_output -s pascaligo))) (deps coase.ligo_output))
(rule (targets condition-simple.ligo_ast_pretty) (action (with-stdout-to condition-simple.ligo_ast_pretty (run ligo print-ast condition-simple.ligo_output -s pascaligo))) (deps condition-simple.ligo_output))
(rule (targets condition.ligo_ast_pretty) (action (with-stdout-to condition.ligo_ast_pretty (run ligo print-ast condition.ligo_output -s pascaligo))) (deps condition.ligo_output))
(rule (targets counter.ligo_ast_pretty) (action (with-stdout-to counter.ligo_ast_pretty (run ligo print-ast counter.ligo_output -s pascaligo))) (deps counter.ligo_output))
(rule (targets crypto.ligo_ast_pretty) (action (with-stdout-to crypto.ligo_ast_pretty (run ligo print-ast crypto.ligo_output -s pascaligo))) (deps crypto.ligo_output))
(rule (targets declaration-local.ligo_ast_pretty) (action (with-stdout-to declaration-local.ligo_ast_pretty (run ligo print-ast declaration-local.ligo_output -s pascaligo))) (deps declaration-local.ligo_output))
(rule (targets declarations.ligo_ast_pretty) (action (with-stdout-to declarations.ligo_ast_pretty (run ligo print-ast declarations.ligo_output -s pascaligo))) (deps declarations.ligo_output))
(rule (targets deep_access.ligo_ast_pretty) (action (with-stdout-to deep_access.ligo_ast_pretty (run ligo print-ast deep_access.ligo_output -s pascaligo))) (deps deep_access.ligo_output))
(rule (targets dispatch-counter.ligo_ast_pretty) (action (with-stdout-to dispatch-counter.ligo_ast_pretty (run ligo print-ast dispatch-counter.ligo_output -s pascaligo))) (deps dispatch-counter.ligo_output))
(rule (targets double_main.ligo_ast_pretty) (action (with-stdout-to double_main.ligo_ast_pretty (run ligo print-ast double_main.ligo_output -s pascaligo))) (deps double_main.ligo_output))
(rule (targets double_michelson_or.ligo_ast_pretty) (action (with-stdout-to double_michelson_or.ligo_ast_pretty (run ligo print-ast double_michelson_or.ligo_output -s pascaligo))) (deps double_michelson_or.ligo_output))
(rule (targets empty_case.ligo_ast_pretty) (action (with-stdout-to empty_case.ligo_ast_pretty (run ligo print-ast empty_case.ligo_output -s pascaligo))) (deps empty_case.ligo_output))
(rule (targets entrypoints.ligo_ast_pretty) (action (with-stdout-to entrypoints.ligo_ast_pretty (run ligo print-ast entrypoints.ligo_output -s pascaligo))) (deps entrypoints.ligo_output))
(rule (targets eq_bool.ligo_ast_pretty) (action (with-stdout-to eq_bool.ligo_ast_pretty (run ligo print-ast eq_bool.ligo_output -s pascaligo))) (deps eq_bool.ligo_output))
(rule (targets evaluation_tests.ligo_ast_pretty) (action (with-stdout-to evaluation_tests.ligo_ast_pretty (run ligo print-ast evaluation_tests.ligo_output -s pascaligo))) (deps evaluation_tests.ligo_output))
(rule (targets FA1.2.ligo_ast_pretty) (action (with-stdout-to FA1.2.ligo_ast_pretty (run ligo print-ast FA1.2.ligo_output -s pascaligo))) (deps FA1.2.ligo_output))
(rule (targets failwith.ligo_ast_pretty) (action (with-stdout-to failwith.ligo_ast_pretty (run ligo print-ast failwith.ligo_output -s pascaligo))) (deps failwith.ligo_output))
(rule (targets for_fail.ligo_ast_pretty) (action (with-stdout-to for_fail.ligo_ast_pretty (run ligo print-ast for_fail.ligo_output -s pascaligo))) (deps for_fail.ligo_output))
(rule (targets function-anon.ligo_ast_pretty) (action (with-stdout-to function-anon.ligo_ast_pretty (run ligo print-ast function-anon.ligo_output -s pascaligo))) (deps function-anon.ligo_output))
(rule (targets function-complex.ligo_ast_pretty) (action (with-stdout-to function-complex.ligo_ast_pretty (run ligo print-ast function-complex.ligo_output -s pascaligo))) (deps function-complex.ligo_output))
(rule (targets function-shared.ligo_ast_pretty) (action (with-stdout-to function-shared.ligo_ast_pretty (run ligo print-ast function-shared.ligo_output -s pascaligo))) (deps function-shared.ligo_output))
(rule (targets function.ligo_ast_pretty) (action (with-stdout-to function.ligo_ast_pretty (run ligo print-ast function.ligo_output -s pascaligo))) (deps function.ligo_output))
(rule (targets get_contract.ligo_ast_pretty) (action (with-stdout-to get_contract.ligo_ast_pretty (run ligo print-ast get_contract.ligo_output -s pascaligo))) (deps get_contract.ligo_output))
(rule (targets high-order.ligo_ast_pretty) (action (with-stdout-to high-order.ligo_ast_pretty (run ligo print-ast high-order.ligo_output -s pascaligo))) (deps high-order.ligo_output))
(rule (targets id.ligo_ast_pretty) (action (with-stdout-to id.ligo_ast_pretty (run ligo print-ast id.ligo_output -s pascaligo))) (deps id.ligo_output))
(rule (targets implicit_account.ligo_ast_pretty) (action (with-stdout-to implicit_account.ligo_ast_pretty (run ligo print-ast implicit_account.ligo_output -s pascaligo))) (deps implicit_account.ligo_output))
(rule (targets included.ligo_ast_pretty) (action (with-stdout-to included.ligo_ast_pretty (run ligo print-ast included.ligo_output -s pascaligo))) (deps included.ligo_output))
(rule (targets includer.ligo_ast_pretty) (action (with-stdout-to includer.ligo_ast_pretty (run ligo print-ast includer.ligo_output -s pascaligo))) (deps includer.ligo_output))
(rule (targets isnat.ligo_ast_pretty) (action (with-stdout-to isnat.ligo_ast_pretty (run ligo print-ast isnat.ligo_output -s pascaligo))) (deps isnat.ligo_output))
(rule (targets key_hash_comparable.ligo_ast_pretty) (action (with-stdout-to key_hash_comparable.ligo_ast_pretty (run ligo print-ast key_hash_comparable.ligo_output -s pascaligo))) (deps key_hash_comparable.ligo_output))
(rule (targets key_hash.ligo_ast_pretty) (action (with-stdout-to key_hash.ligo_ast_pretty (run ligo print-ast key_hash.ligo_output -s pascaligo))) (deps key_hash.ligo_output))
(rule (targets lambda.ligo_ast_pretty) (action (with-stdout-to lambda.ligo_ast_pretty (run ligo print-ast lambda.ligo_output -s pascaligo))) (deps lambda.ligo_output))
(rule (targets list.ligo_ast_pretty) (action (with-stdout-to list.ligo_ast_pretty (run ligo print-ast list.ligo_output -s pascaligo))) (deps list.ligo_output))
(rule (targets loop_bugs.ligo_ast_pretty) (action (with-stdout-to loop_bugs.ligo_ast_pretty (run ligo print-ast loop_bugs.ligo_output -s pascaligo))) (deps loop_bugs.ligo_output))
(rule (targets loop.ligo_ast_pretty) (action (with-stdout-to loop.ligo_ast_pretty (run ligo print-ast loop.ligo_output -s pascaligo))) (deps loop.ligo_output))
(rule (targets map.ligo_ast_pretty) (action (with-stdout-to map.ligo_ast_pretty (run ligo print-ast map.ligo_output -s pascaligo))) (deps map.ligo_output))
(rule (targets match.ligo_ast_pretty) (action (with-stdout-to match.ligo_ast_pretty (run ligo print-ast match.ligo_output -s pascaligo))) (deps match.ligo_output))
(rule (targets michelson_or_tree_intermediary.ligo_ast_pretty) (action (with-stdout-to michelson_or_tree_intermediary.ligo_ast_pretty (run ligo print-ast michelson_or_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_or_tree_intermediary.ligo_output))
(rule (targets michelson_or_tree.ligo_ast_pretty) (action (with-stdout-to michelson_or_tree.ligo_ast_pretty (run ligo print-ast michelson_or_tree.ligo_output -s pascaligo))) (deps michelson_or_tree.ligo_output))
(rule (targets michelson_pair_tree_intermediary.ligo_ast_pretty) (action (with-stdout-to michelson_pair_tree_intermediary.ligo_ast_pretty (run ligo print-ast michelson_pair_tree_intermediary.ligo_output -s pascaligo))) (deps michelson_pair_tree_intermediary.ligo_output))
(rule (targets michelson_pair_tree.ligo_ast_pretty) (action (with-stdout-to michelson_pair_tree.ligo_ast_pretty (run ligo print-ast michelson_pair_tree.ligo_output -s pascaligo))) (deps michelson_pair_tree.ligo_output))
(rule (targets multiple-parameters.ligo_ast_pretty) (action (with-stdout-to multiple-parameters.ligo_ast_pretty (run ligo print-ast multiple-parameters.ligo_output -s pascaligo))) (deps multiple-parameters.ligo_output))
(rule (targets multisig-v2.ligo_ast_pretty) (action (with-stdout-to multisig-v2.ligo_ast_pretty (run ligo print-ast multisig-v2.ligo_output -s pascaligo))) (deps multisig-v2.ligo_output))
(rule (targets multisig.ligo_ast_pretty) (action (with-stdout-to multisig.ligo_ast_pretty (run ligo print-ast multisig.ligo_output -s pascaligo))) (deps multisig.ligo_output))
(rule (targets option.ligo_ast_pretty) (action (with-stdout-to option.ligo_ast_pretty (run ligo print-ast option.ligo_output -s pascaligo))) (deps option.ligo_output))
(rule (targets quote-declaration.ligo_ast_pretty) (action (with-stdout-to quote-declaration.ligo_ast_pretty (run ligo print-ast quote-declaration.ligo_output -s pascaligo))) (deps quote-declaration.ligo_output))
(rule (targets quote-declarations.ligo_ast_pretty) (action (with-stdout-to quote-declarations.ligo_ast_pretty (run ligo print-ast quote-declarations.ligo_output -s pascaligo))) (deps quote-declarations.ligo_output))
(rule (targets record.ligo_ast_pretty) (action (with-stdout-to record.ligo_ast_pretty (run ligo print-ast record.ligo_output -s pascaligo))) (deps record.ligo_output))
(rule (targets recursion.ligo_ast_pretty) (action (with-stdout-to recursion.ligo_ast_pretty (run ligo print-ast recursion.ligo_output -s pascaligo))) (deps recursion.ligo_output))
(rule (targets redeclaration.ligo_ast_pretty) (action (with-stdout-to redeclaration.ligo_ast_pretty (run ligo print-ast redeclaration.ligo_output -s pascaligo))) (deps redeclaration.ligo_output))
(rule (targets replaceable_id.ligo_ast_pretty) (action (with-stdout-to replaceable_id.ligo_ast_pretty (run ligo print-ast replaceable_id.ligo_output -s pascaligo))) (deps replaceable_id.ligo_output))
(rule (targets self_address.ligo_ast_pretty) (action (with-stdout-to self_address.ligo_ast_pretty (run ligo print-ast self_address.ligo_output -s pascaligo))) (deps self_address.ligo_output))
(rule (targets self_type_annotation.ligo_ast_pretty) (action (with-stdout-to self_type_annotation.ligo_ast_pretty (run ligo print-ast self_type_annotation.ligo_output -s pascaligo))) (deps self_type_annotation.ligo_output))
(rule (targets self_with_entrypoint.ligo_ast_pretty) (action (with-stdout-to self_with_entrypoint.ligo_ast_pretty (run ligo print-ast self_with_entrypoint.ligo_output -s pascaligo))) (deps self_with_entrypoint.ligo_output))
(rule (targets self_without_entrypoint.ligo_ast_pretty) (action (with-stdout-to self_without_entrypoint.ligo_ast_pretty (run ligo print-ast self_without_entrypoint.ligo_output -s pascaligo))) (deps self_without_entrypoint.ligo_output))
(rule (targets set_arithmetic-1.ligo_ast_pretty) (action (with-stdout-to set_arithmetic-1.ligo_ast_pretty (run ligo print-ast set_arithmetic-1.ligo_output -s pascaligo))) (deps set_arithmetic-1.ligo_output))
(rule (targets set_arithmetic.ligo_ast_pretty) (action (with-stdout-to set_arithmetic.ligo_ast_pretty (run ligo print-ast set_arithmetic.ligo_output -s pascaligo))) (deps set_arithmetic.ligo_output))
(rule (targets set_delegate.ligo_ast_pretty) (action (with-stdout-to set_delegate.ligo_ast_pretty (run ligo print-ast set_delegate.ligo_output -s pascaligo))) (deps set_delegate.ligo_output))
(rule (targets shadow.ligo_ast_pretty) (action (with-stdout-to shadow.ligo_ast_pretty (run ligo print-ast shadow.ligo_output -s pascaligo))) (deps shadow.ligo_output))
(rule (targets simple_access.ligo_ast_pretty) (action (with-stdout-to simple_access.ligo_ast_pretty (run ligo print-ast simple_access.ligo_output -s pascaligo))) (deps simple_access.ligo_output))
(rule (targets string_arithmetic.ligo_ast_pretty) (action (with-stdout-to string_arithmetic.ligo_ast_pretty (run ligo print-ast string_arithmetic.ligo_output -s pascaligo))) (deps string_arithmetic.ligo_output))
(rule (targets string.ligo_ast_pretty) (action (with-stdout-to string.ligo_ast_pretty (run ligo print-ast string.ligo_output -s pascaligo))) (deps string.ligo_output))
(rule (targets super-counter.ligo_ast_pretty) (action (with-stdout-to super-counter.ligo_ast_pretty (run ligo print-ast super-counter.ligo_output -s pascaligo))) (deps super-counter.ligo_output))
(rule (targets tez.ligo_ast_pretty) (action (with-stdout-to tez.ligo_ast_pretty (run ligo print-ast tez.ligo_output -s pascaligo))) (deps tez.ligo_output))
(rule (targets time-lock.ligo_ast_pretty) (action (with-stdout-to time-lock.ligo_ast_pretty (run ligo print-ast time-lock.ligo_output -s pascaligo))) (deps time-lock.ligo_output))
(rule (targets timestamp.ligo_ast_pretty) (action (with-stdout-to timestamp.ligo_ast_pretty (run ligo print-ast timestamp.ligo_output -s pascaligo))) (deps timestamp.ligo_output))
(rule (targets toto.ligo_ast_pretty) (action (with-stdout-to toto.ligo_ast_pretty (run ligo print-ast toto.ligo_output -s pascaligo))) (deps toto.ligo_output))
(rule (targets tuple.ligo_ast_pretty) (action (with-stdout-to tuple.ligo_ast_pretty (run ligo print-ast tuple.ligo_output -s pascaligo))) (deps tuple.ligo_output))
(rule (targets type-alias.ligo_ast_pretty) (action (with-stdout-to type-alias.ligo_ast_pretty (run ligo print-ast type-alias.ligo_output -s pascaligo))) (deps type-alias.ligo_output))
(rule (targets unit.ligo_ast_pretty) (action (with-stdout-to unit.ligo_ast_pretty (run ligo print-ast unit.ligo_output -s pascaligo))) (deps unit.ligo_output))
(rule (targets variant-matching.ligo_ast_pretty) (action (with-stdout-to variant-matching.ligo_ast_pretty (run ligo print-ast variant-matching.ligo_output -s pascaligo))) (deps variant-matching.ligo_output))
(rule (targets variant.ligo_ast_pretty) (action (with-stdout-to variant.ligo_ast_pretty (run ligo print-ast variant.ligo_output -s pascaligo))) (deps variant.ligo_output))
(rule (targets website1.ligo_ast_pretty) (action (with-stdout-to website1.ligo_ast_pretty (run ligo print-ast website1.ligo_output -s pascaligo))) (deps website1.ligo_output))
(rule (targets website2.ligo_ast_pretty) (action (with-stdout-to website2.ligo_ast_pretty (run ligo print-ast website2.ligo_output -s pascaligo))) (deps website2.ligo_output))
;; reasonligo
(alias (name runtest) (action (diff address.religo_ast address.religo_ast_pretty)) (deps address.religo_ast address.religo_ast_pretty))
(alias (name runtest) (action (diff amount.religo_ast amount.religo_ast_pretty)) (deps amount.religo_ast amount.religo_ast_pretty))
(alias (name runtest) (action (diff arithmetic.religo_ast arithmetic.religo_ast_pretty)) (deps arithmetic.religo_ast arithmetic.religo_ast_pretty))
@ -691,7 +1384,7 @@
(alias (name runtest) (action (diff tuples_sequences_functions.religo_ast tuples_sequences_functions.religo_ast_pretty)) (deps tuples_sequences_functions.religo_ast tuples_sequences_functions.religo_ast_pretty))
(alias (name runtest) (action (diff variant.religo_ast variant.religo_ast_pretty)) (deps variant.religo_ast variant.religo_ast_pretty))
(alias (name runtest) (action (diff website2.religo_ast website2.religo_ast_pretty)) (deps website2.religo_ast website2.religo_ast_pretty))
;; cameligo
(alias (name runtest) (action (diff assert.mligo_ast assert.mligo_ast_pretty)) (deps assert.mligo_ast assert.mligo_ast_pretty))
(alias (name runtest) (action (diff address.mligo_ast address.mligo_ast_pretty)) (deps address.mligo_ast address.mligo_ast_pretty))
(alias (name runtest) (action (diff amount_lambda.mligo_ast amount_lambda.mligo_ast_pretty)) (deps amount_lambda.mligo_ast amount_lambda.mligo_ast_pretty))
@ -726,3 +1419,100 @@
(alias (name runtest) (action (diff fibo4.mligo_ast fibo4.mligo_ast_pretty)) (deps fibo4.mligo_ast fibo4.mligo_ast_pretty))
(alias (name runtest) (action (diff function-shared.mligo_ast function-shared.mligo_ast_pretty)) (deps function-shared.mligo_ast function-shared.mligo_ast_pretty))
(alias (name runtest) (action (diff guess_string.mligo_ast guess_string.mligo_ast_pretty)) (deps guess_string.mligo_ast guess_string.mligo_ast_pretty))
;; pascaligo
(alias (name runtest) (action (diff address.ligo_ast address.ligo_ast_pretty)) (deps address.ligo_ast address.ligo_ast_pretty))
(alias (name runtest) (action (diff amount.ligo_ast amount.ligo_ast_pretty)) (deps amount.ligo_ast amount.ligo_ast_pretty))
(alias (name runtest) (action (diff annotation.ligo_ast annotation.ligo_ast_pretty)) (deps annotation.ligo_ast annotation.ligo_ast_pretty))
(alias (name runtest) (action (diff application.ligo_ast application.ligo_ast_pretty)) (deps application.ligo_ast application.ligo_ast_pretty))
(alias (name runtest) (action (diff arithmetic.ligo_ast arithmetic.ligo_ast_pretty)) (deps arithmetic.ligo_ast arithmetic.ligo_ast_pretty))
(alias (name runtest) (action (diff assign.ligo_ast assign.ligo_ast_pretty)) (deps assign.ligo_ast assign.ligo_ast_pretty))
(alias (name runtest) (action (diff attributes.ligo_ast attributes.ligo_ast_pretty)) (deps attributes.ligo_ast attributes.ligo_ast_pretty))
(alias (name runtest) (action (diff bad_timestamp.ligo_ast bad_timestamp.ligo_ast_pretty)) (deps bad_timestamp.ligo_ast bad_timestamp.ligo_ast_pretty))
(alias (name runtest) (action (diff bad_type_operator.ligo_ast bad_type_operator.ligo_ast_pretty)) (deps bad_type_operator.ligo_ast bad_type_operator.ligo_ast_pretty))
(alias (name runtest) (action (diff balance_constant.ligo_ast balance_constant.ligo_ast_pretty)) (deps balance_constant.ligo_ast balance_constant.ligo_ast_pretty))
(alias (name runtest) (action (diff big_map.ligo_ast big_map.ligo_ast_pretty)) (deps big_map.ligo_ast big_map.ligo_ast_pretty))
(alias (name runtest) (action (diff bitwise_arithmetic.ligo_ast bitwise_arithmetic.ligo_ast_pretty)) (deps bitwise_arithmetic.ligo_ast bitwise_arithmetic.ligo_ast_pretty))
(alias (name runtest) (action (diff blockless.ligo_ast blockless.ligo_ast_pretty)) (deps blockless.ligo_ast blockless.ligo_ast_pretty))
(alias (name runtest) (action (diff boolean_operators.ligo_ast boolean_operators.ligo_ast_pretty)) (deps boolean_operators.ligo_ast boolean_operators.ligo_ast_pretty))
(alias (name runtest) (action (diff bytes_arithmetic.ligo_ast bytes_arithmetic.ligo_ast_pretty)) (deps bytes_arithmetic.ligo_ast bytes_arithmetic.ligo_ast_pretty))
(alias (name runtest) (action (diff bytes_unpack.ligo_ast bytes_unpack.ligo_ast_pretty)) (deps bytes_unpack.ligo_ast bytes_unpack.ligo_ast_pretty))
(alias (name runtest) (action (diff chain_id.ligo_ast chain_id.ligo_ast_pretty)) (deps chain_id.ligo_ast chain_id.ligo_ast_pretty))
(alias (name runtest) (action (diff check_signature.ligo_ast check_signature.ligo_ast_pretty)) (deps check_signature.ligo_ast check_signature.ligo_ast_pretty))
(alias (name runtest) (action (diff closure-1.ligo_ast closure-1.ligo_ast_pretty)) (deps closure-1.ligo_ast closure-1.ligo_ast_pretty))
(alias (name runtest) (action (diff closure-2.ligo_ast closure-2.ligo_ast_pretty)) (deps closure-2.ligo_ast closure-2.ligo_ast_pretty))
(alias (name runtest) (action (diff closure-3.ligo_ast closure-3.ligo_ast_pretty)) (deps closure-3.ligo_ast closure-3.ligo_ast_pretty))
(alias (name runtest) (action (diff closure.ligo_ast closure.ligo_ast_pretty)) (deps closure.ligo_ast closure.ligo_ast_pretty))
(alias (name runtest) (action (diff coase.ligo_ast coase.ligo_ast_pretty)) (deps coase.ligo_ast coase.ligo_ast_pretty))
(alias (name runtest) (action (diff condition-simple.ligo_ast condition-simple.ligo_ast_pretty)) (deps condition-simple.ligo_ast condition-simple.ligo_ast_pretty))
(alias (name runtest) (action (diff condition.ligo_ast condition.ligo_ast_pretty)) (deps condition.ligo_ast condition.ligo_ast_pretty))
(alias (name runtest) (action (diff counter.ligo_ast counter.ligo_ast_pretty)) (deps counter.ligo_ast counter.ligo_ast_pretty))
(alias (name runtest) (action (diff crypto.ligo_ast crypto.ligo_ast_pretty)) (deps crypto.ligo_ast crypto.ligo_ast_pretty))
(alias (name runtest) (action (diff declaration-local.ligo_ast declaration-local.ligo_ast_pretty)) (deps declaration-local.ligo_ast declaration-local.ligo_ast_pretty))
(alias (name runtest) (action (diff declarations.ligo_ast declarations.ligo_ast_pretty)) (deps declarations.ligo_ast declarations.ligo_ast_pretty))
(alias (name runtest) (action (diff deep_access.ligo_ast deep_access.ligo_ast_pretty)) (deps deep_access.ligo_ast deep_access.ligo_ast_pretty))
(alias (name runtest) (action (diff dispatch-counter.ligo_ast dispatch-counter.ligo_ast_pretty)) (deps dispatch-counter.ligo_ast dispatch-counter.ligo_ast_pretty))
(alias (name runtest) (action (diff double_main.ligo_ast double_main.ligo_ast_pretty)) (deps double_main.ligo_ast double_main.ligo_ast_pretty))
(alias (name runtest) (action (diff double_michelson_or.ligo_ast double_michelson_or.ligo_ast_pretty)) (deps double_michelson_or.ligo_ast double_michelson_or.ligo_ast_pretty))
(alias (name runtest) (action (diff empty_case.ligo_ast empty_case.ligo_ast_pretty)) (deps empty_case.ligo_ast empty_case.ligo_ast_pretty))
(alias (name runtest) (action (diff entrypoints.ligo_ast entrypoints.ligo_ast_pretty)) (deps entrypoints.ligo_ast entrypoints.ligo_ast_pretty))
(alias (name runtest) (action (diff eq_bool.ligo_ast eq_bool.ligo_ast_pretty)) (deps eq_bool.ligo_ast eq_bool.ligo_ast_pretty))
(alias (name runtest) (action (diff evaluation_tests.ligo_ast evaluation_tests.ligo_ast_pretty)) (deps evaluation_tests.ligo_ast evaluation_tests.ligo_ast_pretty))
(alias (name runtest) (action (diff FA1.2.ligo_ast FA1.2.ligo_ast_pretty)) (deps FA1.2.ligo_ast FA1.2.ligo_ast_pretty))
(alias (name runtest) (action (diff failwith.ligo_ast failwith.ligo_ast_pretty)) (deps failwith.ligo_ast failwith.ligo_ast_pretty))
(alias (name runtest) (action (diff for_fail.ligo_ast for_fail.ligo_ast_pretty)) (deps for_fail.ligo_ast for_fail.ligo_ast_pretty))
(alias (name runtest) (action (diff function-anon.ligo_ast function-anon.ligo_ast_pretty)) (deps function-anon.ligo_ast function-anon.ligo_ast_pretty))
(alias (name runtest) (action (diff function-complex.ligo_ast function-complex.ligo_ast_pretty)) (deps function-complex.ligo_ast function-complex.ligo_ast_pretty))
(alias (name runtest) (action (diff function-shared.ligo_ast function-shared.ligo_ast_pretty)) (deps function-shared.ligo_ast function-shared.ligo_ast_pretty))
(alias (name runtest) (action (diff function.ligo_ast function.ligo_ast_pretty)) (deps function.ligo_ast function.ligo_ast_pretty))
(alias (name runtest) (action (diff get_contract.ligo_ast get_contract.ligo_ast_pretty)) (deps get_contract.ligo_ast get_contract.ligo_ast_pretty))
(alias (name runtest) (action (diff high-order.ligo_ast high-order.ligo_ast_pretty)) (deps high-order.ligo_ast high-order.ligo_ast_pretty))
(alias (name runtest) (action (diff id.ligo_ast id.ligo_ast_pretty)) (deps id.ligo_ast id.ligo_ast_pretty))
(alias (name runtest) (action (diff implicit_account.ligo_ast implicit_account.ligo_ast_pretty)) (deps implicit_account.ligo_ast implicit_account.ligo_ast_pretty))
(alias (name runtest) (action (diff included.ligo_ast included.ligo_ast_pretty)) (deps included.ligo_ast included.ligo_ast_pretty))
(alias (name runtest) (action (diff includer.ligo_ast includer.ligo_ast_pretty)) (deps includer.ligo_ast includer.ligo_ast_pretty))
(alias (name runtest) (action (diff isnat.ligo_ast isnat.ligo_ast_pretty)) (deps isnat.ligo_ast isnat.ligo_ast_pretty))
(alias (name runtest) (action (diff key_hash_comparable.ligo_ast key_hash_comparable.ligo_ast_pretty)) (deps key_hash_comparable.ligo_ast key_hash_comparable.ligo_ast_pretty))
(alias (name runtest) (action (diff key_hash.ligo_ast key_hash.ligo_ast_pretty)) (deps key_hash.ligo_ast key_hash.ligo_ast_pretty))
(alias (name runtest) (action (diff lambda.ligo_ast lambda.ligo_ast_pretty)) (deps lambda.ligo_ast lambda.ligo_ast_pretty))
(alias (name runtest) (action (diff list.ligo_ast list.ligo_ast_pretty)) (deps list.ligo_ast list.ligo_ast_pretty))
(alias (name runtest) (action (diff loop_bugs.ligo_ast loop_bugs.ligo_ast_pretty)) (deps loop_bugs.ligo_ast loop_bugs.ligo_ast_pretty))
(alias (name runtest) (action (diff loop.ligo_ast loop.ligo_ast_pretty)) (deps loop.ligo_ast loop.ligo_ast_pretty))
(alias (name runtest) (action (diff map.ligo_ast map.ligo_ast_pretty)) (deps map.ligo_ast map.ligo_ast_pretty))
(alias (name runtest) (action (diff match.ligo_ast match.ligo_ast_pretty)) (deps match.ligo_ast match.ligo_ast_pretty))
(alias (name runtest) (action (diff michelson_or_tree_intermediary.ligo_ast michelson_or_tree_intermediary.ligo_ast_pretty)) (deps michelson_or_tree_intermediary.ligo_ast michelson_or_tree_intermediary.ligo_ast_pretty))
(alias (name runtest) (action (diff michelson_or_tree.ligo_ast michelson_or_tree.ligo_ast_pretty)) (deps michelson_or_tree.ligo_ast michelson_or_tree.ligo_ast_pretty))
(alias (name runtest) (action (diff michelson_pair_tree_intermediary.ligo_ast michelson_pair_tree_intermediary.ligo_ast_pretty)) (deps michelson_pair_tree_intermediary.ligo_ast michelson_pair_tree_intermediary.ligo_ast_pretty))
(alias (name runtest) (action (diff michelson_pair_tree.ligo_ast michelson_pair_tree.ligo_ast_pretty)) (deps michelson_pair_tree.ligo_ast michelson_pair_tree.ligo_ast_pretty))
(alias (name runtest) (action (diff multiple-parameters.ligo_ast multiple-parameters.ligo_ast_pretty)) (deps multiple-parameters.ligo_ast multiple-parameters.ligo_ast_pretty))
(alias (name runtest) (action (diff multisig-v2.ligo_ast multisig-v2.ligo_ast_pretty)) (deps multisig-v2.ligo_ast multisig-v2.ligo_ast_pretty))
(alias (name runtest) (action (diff multisig.ligo_ast multisig.ligo_ast_pretty)) (deps multisig.ligo_ast multisig.ligo_ast_pretty))
(alias (name runtest) (action (diff option.ligo_ast option.ligo_ast_pretty)) (deps option.ligo_ast option.ligo_ast_pretty))
(alias (name runtest) (action (diff quote-declaration.ligo_ast quote-declaration.ligo_ast_pretty)) (deps quote-declaration.ligo_ast quote-declaration.ligo_ast_pretty))
(alias (name runtest) (action (diff quote-declarations.ligo_ast quote-declarations.ligo_ast_pretty)) (deps quote-declarations.ligo_ast quote-declarations.ligo_ast_pretty))
(alias (name runtest) (action (diff record.ligo_ast record.ligo_ast_pretty)) (deps record.ligo_ast record.ligo_ast_pretty))
(alias (name runtest) (action (diff recursion.ligo_ast recursion.ligo_ast_pretty)) (deps recursion.ligo_ast recursion.ligo_ast_pretty))
(alias (name runtest) (action (diff redeclaration.ligo_ast redeclaration.ligo_ast_pretty)) (deps redeclaration.ligo_ast redeclaration.ligo_ast_pretty))
(alias (name runtest) (action (diff replaceable_id.ligo_ast replaceable_id.ligo_ast_pretty)) (deps replaceable_id.ligo_ast replaceable_id.ligo_ast_pretty))
(alias (name runtest) (action (diff self_address.ligo_ast self_address.ligo_ast_pretty)) (deps self_address.ligo_ast self_address.ligo_ast_pretty))
(alias (name runtest) (action (diff self_type_annotation.ligo_ast self_type_annotation.ligo_ast_pretty)) (deps self_type_annotation.ligo_ast self_type_annotation.ligo_ast_pretty))
(alias (name runtest) (action (diff self_with_entrypoint.ligo_ast self_with_entrypoint.ligo_ast_pretty)) (deps self_with_entrypoint.ligo_ast self_with_entrypoint.ligo_ast_pretty))
(alias (name runtest) (action (diff self_without_entrypoint.ligo_ast self_without_entrypoint.ligo_ast_pretty)) (deps self_without_entrypoint.ligo_ast self_without_entrypoint.ligo_ast_pretty))
(alias (name runtest) (action (diff set_arithmetic-1.ligo_ast set_arithmetic-1.ligo_ast_pretty)) (deps set_arithmetic-1.ligo_ast set_arithmetic-1.ligo_ast_pretty))
(alias (name runtest) (action (diff set_arithmetic.ligo_ast set_arithmetic.ligo_ast_pretty)) (deps set_arithmetic.ligo_ast set_arithmetic.ligo_ast_pretty))
(alias (name runtest) (action (diff set_delegate.ligo_ast set_delegate.ligo_ast_pretty)) (deps set_delegate.ligo_ast set_delegate.ligo_ast_pretty))
(alias (name runtest) (action (diff shadow.ligo_ast shadow.ligo_ast_pretty)) (deps shadow.ligo_ast shadow.ligo_ast_pretty))
(alias (name runtest) (action (diff simple_access.ligo_ast simple_access.ligo_ast_pretty)) (deps simple_access.ligo_ast simple_access.ligo_ast_pretty))
(alias (name runtest) (action (diff string_arithmetic.ligo_ast string_arithmetic.ligo_ast_pretty)) (deps string_arithmetic.ligo_ast string_arithmetic.ligo_ast_pretty))
(alias (name runtest) (action (diff string.ligo_ast string.ligo_ast_pretty)) (deps string.ligo_ast string.ligo_ast_pretty))
(alias (name runtest) (action (diff super-counter.ligo_ast super-counter.ligo_ast_pretty)) (deps super-counter.ligo_ast super-counter.ligo_ast_pretty))
(alias (name runtest) (action (diff tez.ligo_ast tez.ligo_ast_pretty)) (deps tez.ligo_ast tez.ligo_ast_pretty))
(alias (name runtest) (action (diff time-lock.ligo_ast time-lock.ligo_ast_pretty)) (deps time-lock.ligo_ast time-lock.ligo_ast_pretty))
(alias (name runtest) (action (diff timestamp.ligo_ast timestamp.ligo_ast_pretty)) (deps timestamp.ligo_ast timestamp.ligo_ast_pretty))
(alias (name runtest) (action (diff toto.ligo_ast toto.ligo_ast_pretty)) (deps toto.ligo_ast toto.ligo_ast_pretty))
(alias (name runtest) (action (diff tuple.ligo_ast tuple.ligo_ast_pretty)) (deps tuple.ligo_ast tuple.ligo_ast_pretty))
(alias (name runtest) (action (diff type-alias.ligo_ast type-alias.ligo_ast_pretty)) (deps type-alias.ligo_ast type-alias.ligo_ast_pretty))
(alias (name runtest) (action (diff unit.ligo_ast unit.ligo_ast_pretty)) (deps unit.ligo_ast unit.ligo_ast_pretty))
(alias (name runtest) (action (diff variant-matching.ligo_ast variant-matching.ligo_ast_pretty)) (deps variant-matching.ligo_ast variant-matching.ligo_ast_pretty))
(alias (name runtest) (action (diff variant.ligo_ast variant.ligo_ast_pretty)) (deps variant.ligo_ast variant.ligo_ast_pretty))
(alias (name runtest) (action (diff website1.ligo_ast website1.ligo_ast_pretty)) (deps website1.ligo_ast website1.ligo_ast_pretty))
(alias (name runtest) (action (diff website2.ligo_ast website2.ligo_ast_pretty)) (deps website2.ligo_ast website2.ligo_ast_pretty))

View File

@ -0,0 +1,172 @@
type tokens is big_map (address, nat)
type allowances is big_map (address * address, nat)
type storage is
record [
tokens : tokens;
allowances : allowances;
total_amount : nat
]
type transfer is
record [
address_from : address;
address_to : address;
value : nat
]
type approve is record [spender : address; value : nat]
type getAllowance is
record [
owner : address;
spender : address;
callback : contract (nat)
]
type getBalance is
record [owner : address; callback : contract (nat)]
type getTotalSupply is record [callback : contract (nat)]
type action is
Transfer of transfer
| Approve of approve
| GetAllowance of getAllowance
| GetBalance of getBalance
| GetTotalSupply of getTotalSupply
function transfer (const p : transfer; const s : storage)
: list (operation) * storage is
block {
var new_allowances : allowances := Big_map.empty;
if Tezos.sender = p.address_from
then {
new_allowances := s.allowances
}
else {
var authorized_value : nat
:= case (Big_map.find_opt
((Tezos.sender, p.address_from), s.allowances))
of [
Some (value) -> value
| None -> 0n
];
if (authorized_value < p.value)
then {
failwith ("Not Enough Allowance")
}
else {
new_allowances :=
Big_map.update
((Tezos.sender, p.address_from),
(Some (abs (authorized_value - p.value))),
s.allowances)
}
};
var sender_balance : nat
:= case (Big_map.find_opt (p.address_from, s.tokens)) of [
Some (value) -> value
| None -> 0n
];
var new_tokens : tokens := Big_map.empty;
if (sender_balance < p.value)
then {
failwith ("Not Enough Balance")
}
else {
new_tokens :=
Big_map.update
(p.address_from,
(Some (abs (sender_balance - p.value))), s.tokens);
var receiver_balance : nat
:= case (Big_map.find_opt (p.address_to, s.tokens)) of [
Some (value) -> value
| None -> 0n
];
new_tokens :=
Big_map.update
(p.address_to, (Some (receiver_balance + p.value)),
new_tokens)
}
} with
((nil : list (operation)),
s with
record [
tokens = new_tokens;
allowances = new_allowances
])
function approve (const p : approve; const s : storage)
: list (operation) * storage is
block {
var previous_value : nat
:= case Big_map.find_opt
((p.spender, Tezos.sender), s.allowances)
of [
Some (value) -> value
| None -> 0n
];
var new_allowances : allowances := Big_map.empty;
if previous_value > 0n and p.value > 0n
then {
failwith ("Unsafe Allowance Change")
}
else {
new_allowances :=
Big_map.update
((p.spender, Tezos.sender), (Some (p.value)),
s.allowances)
}
} with
((nil : list (operation)),
s with
record [allowances = new_allowances])
function getAllowance
(const p : getAllowance;
const s : storage) : list (operation) * storage is
block {
var value : nat
:= case Big_map.find_opt
((p.owner, p.spender), s.allowances)
of [
Some (value) -> value
| None -> 0n
];
var op : operation
:= Tezos.transaction (value, 0mutez, p.callback)
} with (list [op], s)
function getBalance
(const p : getBalance;
const s : storage) : list (operation) * storage is
block {
var value : nat
:= case Big_map.find_opt (p.owner, s.tokens) of [
Some (value) -> value
| None -> 0n
];
var op : operation
:= Tezos.transaction (value, 0mutez, p.callback)
} with (list [op], s)
function getTotalSupply
(const p : getTotalSupply;
const s : storage) : list (operation) * storage is
block {
var total : nat := s.total_amount;
var op : operation
:= Tezos.transaction (total, 0mutez, p.callback)
} with (list [op], s)
function main (const a : action; const s : storage)
: list (operation) * storage is
case a of [
Transfer (p) -> transfer (p, s)
| Approve (p) -> approve (p, s)
| GetAllowance (p) -> getAllowance (p, s)
| GetBalance (p) -> getBalance (p, s)
| GetTotalSupply (p) -> getTotalSupply (p, s)
]

View File

@ -0,0 +1,4 @@
function main (const p : key_hash) : address is
block {
const c : contract (unit) = Tezos.implicit_account (p)
} with Tezos.address (c)

View File

@ -0,0 +1,7 @@
function check (const p : unit) : int is
block {
var result : int := 0;
if amount = 100000000mutez
then result := 42
else result := 0
} with result

View File

@ -0,0 +1,4 @@
const lst : list (int) = list []
const my_address : address
= ("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx" : address)

View File

@ -0,0 +1,13 @@
type foo is record [bar : int -> int]
function f (const i : int) : int is i
function g (const i : unit) : int -> int is f
const r : foo = record [bar = f]
const x : int = f (42)
const y : int = r.bar (42)
const z : int = (g (unit)) (42)

View File

@ -0,0 +1,16 @@
function mod_op (const n : int) : nat is n mod 42
function plus_op (const n : int) : int is n + 42
function minus_op (const n : int) : int is n - 42
function times_op (const n : int) : int is n * 42
function div_op (const n : int) : int is n / 2
function int_op (const n : nat) : int is int (n)
function neg_op (const n : int) : int is -n
function ediv_op (const n : int) : option (int * nat) is
ediv (n, 2)

View File

@ -0,0 +1,4 @@
function main (const i : int) : int is
block {
i := i + 1
} with i

View File

@ -0,0 +1,24 @@
const x : int = 1
attributes ["inline"]
function foo (const a : int) : int is
block {
const test : int = 2 + a;
attributes ["inline"]
} with test
attributes ["inline"]
const y : int = 1
attributes ["inline"; "other"]
function bar (const b : int) : int is
block {
function test (const z : int) : int is
block {
const r : int = 2 + b + z
} with r;
attributes ["inline"; "foo"; "bar"]
} with test (b)

View File

@ -0,0 +1,11 @@
type parameter is unit
type storage is timestamp
type return is list (operation) * storage
function main (const p : parameter; const s : storage)
: return is
block {
var stamp : timestamp := ("badtimestamp" : timestamp)
} with ((nil : list (operation)), stamp)

View File

@ -0,0 +1,12 @@
type parameter is unit
type binding is nat * nat
type storage is map (binding)
type return is list (operation) * storage
function main
(const param : parameter;
const store : storage) : return is
((nil : list (operation)), store)

View File

@ -0,0 +1,10 @@
type parameter is unit
type storage is tez
type return is list (operation) * storage
function main
(const param : parameter;
const store : storage) : return is
((nil : list (operation)), Tezos.balance)

View File

@ -0,0 +1,41 @@
type parameter is unit
type storage is big_map (int, int) * unit
type return is list (operation) * storage
function main (const p : parameter; const s : storage)
: return is
block {
var toto : option (int) := Some (0);
toto := s.0 [23];
s.0 [2] := 444
} with ((nil : list (operation)), s)
type foo is big_map (int, int)
function set_ (var n : int; var m : foo) : foo is
block {
m [23] := n
} with m
function add (var n : int; var m : foo) : foo is set_ (n, m)
function rm (var m : foo) : foo is
block {
remove 42 from map m
} with m
function get (const m : foo) : option (int) is m [42]
const empty_big_map : big_map (int, int) = big_map []
const big_map1 : big_map (int, int)
= big_map [23 -> 0; 42 -> 0]
function mutimaps (const m : foo; const n : foo) : foo is
block {
var bar : foo := m;
bar [42] := 0;
n [42] := get_force (42, bar)
} with n

View File

@ -0,0 +1,11 @@
function or_op (const n : nat) : nat is Bitwise.or (n, 4n)
function and_op (const n : nat) : nat is Bitwise.and (n, 7n)
function xor_op (const n : nat) : nat is Bitwise.xor (n, 7n)
function lsl_op (const n : nat) : nat is
Bitwise.shift_left (n, 7n)
function lsr_op (const n : nat) : nat is
Bitwise.shift_right (n, 7n)

View File

@ -0,0 +1 @@
function blockless (const n : int) : int is n + 10

View File

@ -0,0 +1,9 @@
function or_true (const b : bool) : bool is b or true
function or_false (const b : bool) : bool is b or false
function and_true (const b : bool) : bool is b and true
function and_false (const b : bool) : bool is b and false
function not_bool (const b : bool) : bool is not b

View File

@ -0,0 +1,8 @@
function concat_op (const s : bytes) : bytes is
Bytes.concat (s, 0x7070)
function slice_op (const s : bytes) : bytes is
Bytes.sub (1n, 2n, s)
function hasherman (const s : bytes) : bytes is
Crypto.sha256 (s)

View File

@ -0,0 +1,15 @@
function id_string (const p : string) : option (string) is
block {
const packed : bytes = Bytes.pack (p)
} with (Bytes.unpack (packed) : option (string))
function id_int (const p : int) : option (int) is
block {
const packed : bytes = Bytes.pack (p)
} with (Bytes.unpack (packed) : option (int))
function id_address (const p : address)
: option (address) is
block {
const packed : bytes = Bytes.pack (p)
} with (Bytes.unpack (packed) : option (address))

View File

@ -0,0 +1,2 @@
function chain_id (const tt : chain_id) : chain_id is
Tezos.chain_id

View File

@ -0,0 +1,5 @@
function check_signature
(const pk : key;
const signed : signature;
const msg : bytes) : bool is
Crypto.check (pk, signed, msg)

View File

@ -0,0 +1,4 @@
function foo (const i : int) : int is
block {
function add (const j : int) : int is i + j
} with add (i)

View File

@ -0,0 +1,5 @@
function foobar (const i : int) : int is
block {
const j : int = 3;
function add (const k : int) : int is i + j + k
} with add (42)

View File

@ -0,0 +1,6 @@
function foobar (const i : int) : int is
block {
const j : int = 3;
const k : int = 4;
function add (const l : int) : int is i + j + k + l
} with add (42)

View File

@ -0,0 +1,5 @@
function toto (const i : int) : int is
block {
function tata (const j : int) : int is i + j;
function titi (const j : int) : int is i + j
} with tata (i) + titi (i)

View File

@ -0,0 +1,137 @@
type card_pattern_id is nat
type card_pattern is
record [coefficient : tez; quantity : nat]
type card_patterns is map (card_pattern_id, card_pattern)
type card_id is nat
type card is
record [
card_owner : address;
card_pattern : card_pattern_id
]
type cards is map (card_id, card)
type storage is
record [
cards : cards;
card_patterns : card_patterns;
next_id : nat
]
type return is list (operation) * storage
type action_buy_single is
record [card_to_buy : card_pattern_id]
type action_sell_single is record [card_to_sell : card_id]
type action_transfer_single is
record [card_to_transfer : card_id; destination : address]
type parameter is
Buy_single of action_buy_single
| Sell_single of action_sell_single
| Transfer_single of action_transfer_single
function transfer_single
(const action : action_transfer_single;
const s : storage) : return is
block {
const cards : cards = s.cards;
const card : card
= case cards [action.card_to_transfer] of [
Some (card) -> card
| None ->
(failwith ("transfer_single: No card.") : card)
];
if card.card_owner =/= sender
then failwith ("This card doesn't belong to you")
else skip;
card.card_owner := action.destination;
cards [action.card_to_transfer] := card;
s.cards := cards
} with ((nil : list (operation)), s)
function sell_single
(const action : action_sell_single;
const s : storage) : return is
block {
const card : card
= case s.cards [action.card_to_sell] of [
Some (card) -> card
| None -> (failwith ("sell_single: No card.") : card)
];
if card.card_owner =/= sender
then failwith ("This card doesn't belong to you")
else skip;
const card_pattern : card_pattern
= case s.card_patterns [card.card_pattern] of [
Some (pattern) -> pattern
| None ->
(failwith ("sell_single: No card pattern.")
: card_pattern)
];
card_pattern.quantity := abs (card_pattern.quantity - 1n);
const card_patterns : card_patterns = s.card_patterns;
card_patterns [card.card_pattern] := card_pattern;
s.card_patterns := card_patterns;
const cards : cards = s.cards;
remove action.card_to_sell from map cards;
s.cards := cards;
const price : tez
= card_pattern.coefficient * card_pattern.quantity;
const receiver : contract (unit)
= case (Tezos.get_contract_opt (Tezos.sender)
: option (contract (unit)))
of [
Some (contract) -> contract
| None ->
(failwith ("sell_single: No contract.")
: contract (unit))
];
const op : operation
= Tezos.transaction (unit, price, receiver);
const operations : list (operation) = list [op]
} with (operations, s)
function buy_single
(const action : action_buy_single;
const s : storage) : return is
block {
const card_pattern : card_pattern
= case s.card_patterns [action.card_to_buy] of [
Some (pattern) -> pattern
| None ->
(failwith ("buy_single: No card pattern.")
: card_pattern)
];
const price : tez
= card_pattern.coefficient * (card_pattern.quantity + 1n);
if price > amount
then failwith ("Not enough money")
else skip;
card_pattern.quantity := card_pattern.quantity + 1n;
const card_patterns : card_patterns = s.card_patterns;
card_patterns [action.card_to_buy] := card_pattern;
s.card_patterns := card_patterns;
const cards : cards = s.cards;
cards [s.next_id] :=
record [
card_owner = sender;
card_pattern = action.card_to_buy
];
s.cards := cards;
s.next_id := s.next_id + 1n
} with ((nil : list (operation)), s)
function main (const action : parameter; const s : storage)
: return is
case action of [
Buy_single (bs) -> buy_single (bs, s)
| Sell_single (as) -> sell_single (as, s)
| Transfer_single (at) -> transfer_single (at, s)
]

View File

@ -0,0 +1,2 @@
function main (const i : int) : int is
if 1 = 1 then 42 else 0

View File

@ -0,0 +1,10 @@
function main (const i : int) : int is
block {
var result : int := 23;
if i = 2 then result := 42 else result := 0
} with result
function foo (const b : bool) : int is
block {
const x : int = 41
} with 1 + (if b then x else main (x))

View File

@ -0,0 +1,7 @@
type t is int
function main (const p : int; const s : t)
: list (operation) * int is
block {
skip
} with ((nil : list (operation)), p + s)

View File

@ -0,0 +1,5 @@
function hasherman512 (const s : bytes) : bytes is
Crypto.sha512 (s)
function hasherman_blake (const s : bytes) : bytes is
Crypto.blake2b (s)

View File

@ -0,0 +1,4 @@
function main (const i : int) : int is
block {
const j : int = 42
} with j

View File

@ -0,0 +1,3 @@
const foo : int = 42
function main (const i : int) : int is i + foo

View File

@ -0,0 +1,31 @@
type pii is int * int
type ppi is record [x : pii; y : pii]
type ppp is ppi * ppi
function main (const toto : unit) : int is
block {
var a : ppp
:= (record [x = (0, 1); y = (10, 11)],
record [x = (100, 101); y = (110, 111)]);
a.0.x.0 := 2
} with a.0.x.0
function asymetric_tuple_access (const foo : unit) : int is
block {
var tuple : int * (int * (int * int)) := (0, (1, (2, 3)))
} with tuple.0 + tuple.1.0 + tuple.1.1.0 + tuple.1.1.1
type nested_record_t is
record [nesty : record [mymap : map (int, string)]]
function nested_record (var nee : nested_record_t)
: string is
block {
nee.nesty.mymap [1] := "one"
} with
case nee.nesty.mymap [1] of [
Some (s) -> s
| None -> (failwith ("Should not happen.") : string)
]

View File

@ -0,0 +1,21 @@
type parameter is Increment of int | Decrement of int
type storage is int
type return is list (operation) * storage
function increment (const i : int; const n : int) : int is
i + n
function decrement (const i : int; const n : int) : int is
i - n
const nop : list (operation) = nil
function main
(const action : parameter;
const store : storage) : return is
case action of [
Increment (n) -> (nop, increment (store, n))
| Decrement (n) -> (nop, decrement (store, n))
]

View File

@ -0,0 +1,14 @@
type parameter is unit
type storage is int
type return is list (operation) * storage
function main (const p : parameter; const s : storage)
: return is ((nil : list (operation)), s + 1)
function main (const p : parameter; const s : storage)
: return is
block {
const ret : return = main (p, s)
} with (ret.0, ret.1 + 1)

View File

@ -0,0 +1,12 @@
type storage is michelson_or (int, "foo", string, "bar")
type foobar is michelson_or (int, "baz", int, "fooo")
type return is list (operation) * storage
function main (const action : unit; const store : storage)
: return is
block {
const foo : storage = (M_right ("one") : storage);
const bar : foobar = (M_right (1) : foobar)
} with ((nil : list (operation)), (foo : storage))

View File

@ -0,0 +1,7 @@
type t is Bar of int | Baz
function main (const x : t) : int is
case x of [
Bar (n) -> n
| Baz -> -1
]

View File

@ -0,0 +1,23 @@
type storage is unit
type return is list (operation) * storage
function cb (const a : address; const s : storage)
: return is
block {
const c : contract (unit) = get_entrypoint ("%cb", a)
} with (list [Tezos.transaction (unit, 0mutez, c)], s)
function cbo (const a : address; const s : storage)
: return is
block {
const c : contract (unit)
= case (get_entrypoint_opt ("%cbo", a)
: option (contract (unit)))
of [
Some (c) -> c
| None ->
(failwith ("cbo: Entrypoint not found.")
: contract (unit))
]
} with (list [Tezos.transaction (unit, 0mutez, c)], s)

View File

@ -0,0 +1,5 @@
function main (const a : bool; const b : bool) : int is
block {
var result : int := 27;
if a = b then result := 999 else result := 1
} with result

View File

@ -0,0 +1,5 @@
type t is record [foo : nat; bar : string]
const a : t = record [foo = 0n; bar = "bar"]
const b : int = 2

View File

@ -0,0 +1,44 @@
type parameter is Zero of nat | Pos of nat
type storage is unit
type return is list (operation) * storage
function main (const p : parameter; const s : storage)
: return is
block {
case p of [
Zero (n) -> if n > 0n then failwith ("fail") else skip
| Pos (n) -> if n > 0n then skip else failwith ("fail")
]
} with ((nil : list (operation)), s)
function foobar (const i : int) : int is
block {
var p : parameter := Zero (42n);
if i > 0
then {
i := i + 1;
if i > 10
then {
i := 20;
failwith ("who knows");
i := 30
}
else skip
}
else
case p of [
Zero (n) -> failwith (42n)
| Pos (n) -> skip
]
} with
case p of [
Zero (n) -> i
| Pos (n) -> (failwith ("waaaa") : int)
]
function failer (const p : int) : int is
block {
if p = 1 then failwith (42) else skip
} with p

View File

@ -0,0 +1,7 @@
function main (const a : int) : int is
block {
for i := 0 to 100
block {
skip
}
} with i

View File

@ -0,0 +1,2 @@
const x : int
= (function (const i : int) : int is i + 1) (41)

View File

@ -0,0 +1,7 @@
function main (const i : int) : int is
block {
var j : int := 0;
var k : int := 1;
j := k + i;
k := i + j
} with k + j

View File

@ -0,0 +1,6 @@
function inc (const i : int) : int is i + 1
function double_inc (const i : int) : int is inc (i + 1)
function foo (const i : int) : int is
inc (i) + double_inc (i)

View File

@ -0,0 +1 @@
function main (const i : int) : int is i

View File

@ -0,0 +1,20 @@
type storage is unit
type return is list (operation) * storage
function cb (const s : storage) : return is
block {
const c : contract (unit) = get_contract (Tezos.sender)
} with (list [Tezos.transaction (unit, 0mutez, c)], s)
function cbo (const s : unit) : return is
block {
const c : contract (unit)
= case (Tezos.get_contract_opt (Tezos.sender)
: option (contract (unit)))
of [
Some (contract) -> contract
| None ->
(failwith ("contract not found") : contract (unit))
]
} with (list [Tezos.transaction (unit, 0mutez, c)], s)

View File

@ -0,0 +1,6 @@
type heap_elt is int * string
function heap_elt_lt (const x : heap_elt;
const y : heap_elt) : bool is x.0 < y.0
#include "heap.ligo"

View File

@ -0,0 +1,103 @@
// Implementation of the heap data structure in PascaLIGO
// See: https://en.wikipedia.org/wiki/Heap_%28data_structure%29
type heap is map (nat, heap_elt)
function is_empty (const h : heap) : bool is size (h) = 0n
function get_top (const h : heap) : heap_elt is get_force (1n, h)
function pop_switch (const h : heap) : heap is
block {
const result : heap_elt = get_top (h);
const s : nat = Map.size (h);
const last : heap_elt =
case h[s] of
Some (e) -> e
| None -> (failwith ("No element.") : heap_elt)
end;
remove 1n from map h;
h[1n] := last
} with h
function pop_ (const h : heap) : nat is
block {
const result : heap_elt = get_top (h);
const s : nat = Map.size (h);
var current : heap_elt :=
case h[s] of
Some (e) -> e
| None -> (failwith ("No element.") : heap_elt)
end;
const i : nat = 1n;
const left : nat = 2n * i;
const right : nat = left + 1n;
remove 1n from map h;
h[1n] := current;
var largest : nat := i;
const tmp : heap_elt = get_force (s, h);
if left <= s and heap_elt_lt (tmp, get_force (left,h))
then largest := left
else
if right <= s and heap_elt_lt (tmp, get_force (right,h))
then largest := right
else skip
} with largest
function insert (const h : heap ; const e : heap_elt) : heap is
block {
var i : nat := size (h) + 1n;
h[i] := e;
var largest : nat := i;
var parent : nat := 0n;
while largest =/= i block {
parent := i/2n;
largest := i;
if parent >= 1n then {
if heap_elt_lt (get_force (parent,h), get_force(i,h))) then {
largest := parent;
const tmp : heap_elt = get_force (i,h);
h[i] := get_force(parent, h);
h[parent] := tmp
} else skip
} else skip
}
} with h
function pop (const h : heap) : heap * heap_elt * nat is
block {
const result : heap_elt = get_top (h);
var s : nat := size (h);
const last : heap_elt = get_force (s,h);
remove s from map h;
h[1n] := last;
s := size (h);
var i : nat := 0n;
var largest : nat := 1n;
var left : nat := 0n;
var right : nat := 0n;
var c : nat := 0n;
while largest =/= i block {
c := c + 1n;
i := largest;
left := 2n * i;
right := left + 1n;
if left <= s then {
if heap_elt_lt (get_force (left,h), get_force(i,h)) then {
largest := left;
const tmp : heap_elt = get_force(i,h);
h[i] := get_force (left, h);
h[left] := tmp
} else skip
}
else
if right <= s then {
if heap_elt_lt (get_force (right, h), get_force (i,h)) then {
largest := right;
const tmp : heap_elt = get_force (i,h);
h[i] := get_force (right, h);
h[left] := tmp
} else skip
} else skip
}
} with (h, result, c)

View File

@ -0,0 +1,40 @@
function foobar (const i : int) : int is
block {
function foo (const i : int) : int is i;
function bar (const f : int -> int) : int is f (i)
} with bar (foo)
function higher2 (const i : int; const f : int -> int)
: int is f (i)
function foobar2 (const i : int) : int is
block {
function foo2 (const i : int) : int is i
} with higher2 (i, foo2)
const a : int = 0
function foobar3 (const i : int) : int is
block {
function foo2 (const i : int) : int is a + i
} with higher2 (i, foo2)
function f (const i : int) : int is i
function g (const i : int) : int is f (i)
function foobar4 (const i : int) : int is g (g (i))
function higher3
(const i : int;
const f : int -> int;
const g : int -> int) : int is f (g (i))
function foobar5 (const i : int) : int is
block {
const a : int = 0;
function foo (const i : int) : int is a + i;
function goo (const i : int) : int is foo (i)
} with higher3 (i, foo, goo)
function foobar6 (const i : int) : int -> int is f

View File

@ -0,0 +1,164 @@
type id is int
type id_details is
record [
owner : address;
controller : address;
profile : bytes
]
type buy is
record [
profile : bytes;
initial_controller : option (address)
]
type update_owner is record [id : id; new_owner : address]
type update_details is
record [
id : id;
new_profile : option (bytes);
new_controller : option (address)
]
type action is
Buy of buy
| Update_owner of update_owner
| Update_details of update_details
| Skip of unit
type storage is
record [
identities : big_map (id, id_details);
next_id : int;
name_price : tez;
skip_price : tez
]
function buy
(const parameter : buy;
const storage : storage) : list (operation) * storage is
block {
if amount = storage.name_price
then skip
else failwith ("Incorrect amount paid.");
const profile : bytes = parameter.profile;
const initial_controller : option (address)
= parameter.initial_controller;
var identities : big_map (id, id_details)
:= storage.identities;
const new_id : int = storage.next_id;
const controller : address
= case initial_controller of [
Some (addr) -> addr
| None -> sender
];
const new_id_details : id_details
= record [
owner = sender;
controller = controller;
profile = profile
];
identities [new_id] := new_id_details
} with
((nil : list (operation)),
storage with
record [identities = identities; next_id = new_id + 1
])
function update_owner
(const parameter : update_owner;
const storage : storage) : list (operation) * storage is
block {
if (amount =/= 0mutez)
then
block {
failwith ("Updating owner doesn't cost anything.")
}
else skip;
const id : int = parameter.id;
const new_owner : address = parameter.new_owner;
var identities : big_map (id, id_details)
:= storage.identities;
const id_details : id_details
= case identities [id] of [
Some (id_details) -> id_details
| None ->
(failwith ("This ID does not exist.") : id_details)
];
if sender = id_details.owner
then skip
else failwith ("You are not the owner of this ID.");
id_details.owner := new_owner;
identities [id] := id_details
} with
((nil : list (operation)),
storage with
record [identities = identities])
function update_details
(const parameter : update_details;
const storage : storage) : list (operation) * storage is
block {
if (amount =/= 0mutez)
then failwith ("Updating details doesn't cost anything.")
else skip;
const id : int = parameter.id;
const new_profile : option (bytes) = parameter.new_profile;
const new_controller : option (address)
= parameter.new_controller;
const identities : big_map (id, id_details)
= storage.identities;
const id_details : id_details
= case identities [id] of [
Some (id_details) -> id_details
| None ->
(failwith ("This ID does not exist.") : id_details)
];
if (sender = id_details.controller)
or (sender = id_details.owner)
then skip
else
failwith
("You are not the owner or controller of this ID.");
const owner : address = id_details.owner;
const profile : bytes
= case new_profile of [
None -> id_details.profile
| Some (new_profile) -> new_profile
];
const controller : address
= case new_controller of [
None -> id_details.controller
| Some (new_controller) -> new_controller
];
id_details.owner := owner;
id_details.controller := controller;
id_details.profile := profile;
identities [id] := id_details
} with
((nil : list (operation)),
storage with
record [identities = identities])
function skip_ (const p : unit; const storage : storage)
: list (operation) * storage is
block {
if amount = storage.skip_price
then skip
else failwith ("Incorrect amount paid.")
} with
((nil : list (operation)),
storage with
record [next_id = storage.next_id + 1])
function main
(const action : action;
const storage : storage) : list (operation) * storage is
case action of [
Buy (b) -> buy (b, storage)
| Update_owner (uo) -> update_owner (uo, storage)
| Update_details (ud) -> update_details (ud, storage)
| Skip (s) -> skip_ (unit, storage)
]

View File

@ -0,0 +1,2 @@
function main (const kh : key_hash) : contract (unit) is
Tezos.implicit_account (kh)

View File

@ -0,0 +1 @@
const foo : int = 144

View File

@ -0,0 +1,3 @@
const foo : int = 144
const bar : int = foo

View File

@ -0,0 +1 @@
function main (const i : int) : option (nat) is is_nat (i)

View File

@ -0,0 +1,6 @@
function check_hash_key
(const kh1 : key_hash;
const k2 : key) : bool * key_hash is
block {
var kh2 : key_hash := Crypto.hash_key (k2)
} with ((kh1 = kh2), kh2)

View File

@ -0,0 +1,10 @@
type storage is
record [
one : map (key_hash, nat);
two : big_map (key_hash, bool)
]
type return is list (operation) * storage
function main (const a : int; const store : storage)
: return is ((nil : list (operation)), store)

View File

@ -0,0 +1,4 @@
function f (const x : unit) : unit is Unit
function main (const p : unit; const s : unit) : unit is
f (Unit)

View File

@ -0,0 +1,32 @@
type foobar is list (int)
const fb : foobar = list [23; 42]
const fb2 : foobar = 144 # fb
const fb3 : foobar = cons (688, fb2)
function size_ (const m : foobar) : nat is size (m)
const bl : foobar = list [144; 51; 42; 120; 421]
function fold_op (const s : list (int)) : int is
block {
function aggregate (const prec : int; const cur : int)
: int is prec + cur
} with List.fold (aggregate, s, 10)
function iter_op (const s : list (int)) : int is
block {
var r : int := 0;
function aggregate (const i : int) : unit is
block {
r := r + i
} with unit;
List.iter (aggregate, s)
} with r
function map_op (const s : list (int)) : list (int) is
block {
function increment (const i : int) : int is i + 1
} with List.map (increment, s)

View File

@ -0,0 +1,231 @@
function counter (var n : nat) : nat is
block {
var i : nat := 0n;
while i < n
block {
i := i + 1n
}
} with i
function while_sum (var n : nat) : nat is
block {
var i : nat := 0n;
var r : nat := 0n;
while i < n
block {
i := i + 1n;
r := r + i
}
} with r
function for_sum (var n : nat) : int is
block {
var acc : int := 0;
for i := 1 to int (n)
block {
acc := acc + i
}
} with acc
function for_sum_step (var n : nat) : int is
block {
var acc : int := 0;
for i := 1 to int (2n * n) step 2
block {
acc := acc + i
}
} with acc
function for_collection_list (var nee : unit)
: (int * string) is
block {
var acc : int := 0;
var st : string := "to";
var mylist : list (int) := list [1; 1; 1];
for x in list mylist
block {
acc := acc + x;
st := st ^ "to"
}
} with (acc, st)
function for_collection_set (var nee : unit)
: int * string is
block {
var acc : int := 0;
var st : string := "to";
var myset : set (int) := set [1; 2; 3];
for x in set myset
block {
acc := acc + x;
st := st ^ "to"
}
} with (acc, st)
function for_collection_if_and_local_var (var nee : unit)
: int is
block {
var acc : int := 0;
const theone : int = 1;
const thetwo : int = 2;
var myset : set (int) := set [1; 2; 3];
for x in set myset
block {
if x = theone
then acc := acc + x
else
if x = thetwo
then acc := acc + thetwo
else acc := acc + 10
}
} with acc
function for_collection_rhs_capture (var nee : unit)
: int is
block {
var acc : int := 0;
const mybigint : int = 1000;
var myset : set (int) := set [1; 2; 3];
for x in set myset
block {
if x = 1 then acc := acc + mybigint else acc := acc + 10
}
} with acc
function for_collection_proc_call (var nee : unit) : int is
block {
var acc : int := 0;
var myset : set (int) := set [1; 2; 3];
for x in set myset
block {
if x = 1
then acc := acc + for_collection_rhs_capture (unit)
else acc := acc + 10
}
} with acc
function for_collection_comp_with_acc (var nee : unit)
: int is
block {
var myint : int := 0;
var mylist : list (int) := list [1; 10; 15];
for x in list mylist
block {
if x < myint then skip else myint := myint + 10
}
} with myint
function for_collection_with_patches (var nee : unit)
: map (string, int) is
block {
var myint : int := 12;
var mylist : list (string) := list ["I"; "am"; "foo"];
var mymap : map (string, int) := map [];
for x in list mylist
block {
patch mymap with map [x -> myint]
}
} with mymap
function for_collection_empty (var nee : unit) : int is
block {
var acc : int := 0;
var myset : set (int) := set [1; 2; 3];
for x in set myset
block {
skip
}
} with acc
function for_collection_map_kv (var nee : unit)
: int * string is
block {
var acc : int := 0;
var st : string := "";
var mymap : map (string, int)
:= map ["1" -> 1; "2" -> 2; "3" -> 3];
for k -> v in map mymap
block {
acc := acc + v;
st := st ^ k
}
} with (acc, st)
function for_collection_map_k (var nee : unit) : string is
block {
var st : string := "";
var mymap : map (string, int)
:= map ["1" -> 1; "2" -> 2; "3" -> 3];
for k in map mymap
block {
st := st ^ k
}
} with st
function nested_for_collection (var nee : unit)
: int * string is
block {
var myint : int := 0;
var mystoo : string := "";
var mylist : list (int) := list [1; 2; 3];
var mymap : map (string, string)
:= map [" one" -> ","; "two" -> " "];
for i in list mylist
block {
myint := myint + i;
var myset : set (string) := set ["1"; "2"; "3"];
for st in set myset
block {
myint := myint + i;
mystoo := mystoo ^ st;
for k -> v in map mymap
block {
mystoo := mystoo ^ k ^ v
}
}
}
} with (myint, mystoo)
function nested_for_collection_local_var (var nee : unit)
: int * string is
block {
var myint : int := 0;
var myst : string := "";
var mylist : list (int) := list [1; 2; 3];
for i in list mylist
block {
var myst_loc : string := "";
myint := myint + i;
var myset : set (string) := set ["1"; "2"; "3"];
for st in set myset
block {
myint := myint + i;
myst_loc := myst_loc ^ st
};
myst := myst_loc ^ myst
}
} with (myint, myst)
function dummy (const n : nat) : nat is
block {
while false
block {
skip
}
} with n
function inner_capture_in_conditional_block (var nee : unit)
: bool * int is
block {
var count : int := 1;
var ret : bool := false;
var mylist : list (int) := list [1; 2; 3];
for it1 in list mylist
block {
for it2 in list mylist
block {
if count = it2 then ret := not (ret) else skip
};
count := count + 1
}
} with (ret, count)

View File

@ -0,0 +1,23 @@
function shadowing_in_body (var nee : unit) : string is
block {
var st : string := "";
var list1 : list (string) := list ["to"; "to"];
for x in list list1
block {
const x : string = "ta";
st := st ^ x
}
} with st
function shadowing_assigned_in_body (var nee : unit)
: string is
block {
var st : string := "";
var list1 : list (string) := list ["to"; "to"];
for x in list list1
block {
st := st ^ x;
var st : string := "ta";
st := st ^ x
}
} with st

View File

@ -0,0 +1,66 @@
type foobar is map (int, int)
const empty_map : foobar = map []
const map1 : foobar
= map [144 -> 23; 51 -> 23; 42 -> 23; 120 -> 23; 421 -> 23]
const map2 : foobar = map [23 -> 0; 42 -> 0]
function set_ (var n : int; var m : foobar) : foobar is
block {
m [23] := n
} with m
function add (var n : int; var m : foobar) : foobar is
set_ (n, m)
function rm (var m : foobar) : foobar is
block {
remove 42 from map m
} with m
function patch_ (var m : foobar) : foobar is
block {
patch m with map [0 -> 5; 1 -> 6; 2 -> 7]
} with m
function patch_deep (var m : foobar * nat) : foobar * nat is
block {
patch m.0 with map [1 -> 9]
} with m
function size_ (const m : foobar) : nat is Map.size (m)
function get (const m : foobar) : option (int) is m [42]
function mem (const k : int; const m : foobar) : bool is
Map.mem (k, m)
function iter_op (const m : foobar) : unit is
block {
function aggregate (const i : int; const j : int)
: unit is
block {
if i = j then skip else failwith ("fail")
} with unit
} with Map.iter (aggregate, m)
function map_op (const m : foobar) : foobar is
block {
function increment (const i : int; const j : int) : int is
j + 1
} with Map.map (increment, m)
function fold_op (const m : foobar) : int is
block {
function aggregate (const i : int; const j : int * int)
: int is i + j.0 + j.1
} with Map.fold (aggregate, m, 10)
function deep_op (var m : foobar) : foobar is
block {
var coco : int * foobar := (0, m);
remove 42 from map coco.1;
coco.1 [32] := 16
} with coco.1

View File

@ -0,0 +1,36 @@
function match_bool (const i : int) : int is
block {
var result : int := 23;
case i = 2 of [
True -> result := 42
| False -> result := 0
]
} with result
function match_option (const o : option (int)) : int is
block {
var result : int := 23;
case o of [
None -> skip
| Some (s) -> result := s
]
} with result
function match_expr_bool (const i : int) : int is
case i = 2 of [
True -> 42
| False -> 0
]
function match_expr_option (const o : option (int)) : int is
case o of [
None -> 42
| Some (s) -> s
]
function match_expr_list (const l : list (int)) : int is
case l of [
nil -> -1
| hd #
tl -> hd
]

View File

@ -0,0 +1,13 @@
type inner_storage is michelson_or (int, "one", nat, "two")
type storage is
michelson_or (int, "three", inner_storage, "four")
type return is list (operation) * storage
function main (const action : unit; const store : storage)
: return is
block {
const foo : storage
= (M_right ((M_left (1) : inner_storage)) : storage)
} with ((nil : list (operation)), (foo : storage))

View File

@ -0,0 +1,13 @@
type inner_storage is michelson_or (int, "one", nat, "two")
type storage is
michelson_or (int, "three", inner_storage, "")
type return is list (operation) * storage
function main (const action : unit; const store : storage)
: return is
block {
const foo : storage
= (M_right ((M_left (1) : inner_storage)) : storage)
} with ((nil : list (operation)), (foo : storage))

View File

@ -0,0 +1,13 @@
type inner_storage is
michelson_pair (int, "one", nat, "two")
type storage is
michelson_pair (string, "three", inner_storage, "four")
type return is list (operation) * storage
function main (const action : unit; const store : storage)
: return is
block {
const foo : storage = ("foo", (1, 2n))
} with ((nil : list (operation)), (foo : storage))

View File

@ -0,0 +1,13 @@
type inner_storage is
michelson_pair (int, "one", nat, "two")
type storage is
michelson_pair (string, "three", inner_storage, "")
type return is list (operation) * storage
function main (const action : unit; const store : storage)
: return is
block {
const foo : storage = ("foo", (1, 2n))
} with ((nil : list (operation)), (foo : storage))

View File

@ -0,0 +1,14 @@
function ab (const a : int; const b : int) : int is a + b
function abcd
(const a : int;
const b : int;
const c : int;
const d : int) : int is a + b + c + d + 2
function abcde
(const a : int;
const b : int;
const c : int;
const d : int;
const e : int) : int is c + e + 3

View File

@ -0,0 +1,129 @@
type threshold is nat
type max_proposal is nat
type max_message_size is nat
type state_hash is bytes
type addr_set is set (address)
type message_store is map (bytes, addr_set)
type proposal_counters is map (address, nat)
type storage is
record [
state_hash : state_hash;
threshold : threshold;
max_proposal : max_proposal;
max_message_size : max_message_size;
authorized_addresses : addr_set;
message_store : message_store;
proposal_counters : proposal_counters
]
type message is bytes -> list (operation)
type send_pt is message
type withdraw_pt is message
type default_pt is unit
type return is list (operation) * storage
type parameter is
Send of send_pt
| Withdraw of withdraw_pt
| Default of default_pt
function send (const param : send_pt; const s : storage)
: return is
block {
if not Set.mem (Tezos.sender, s.authorized_addresses)
then failwith ("Unauthorized address")
else skip;
var message : message := param;
const packed_msg : bytes = Bytes.pack (message);
if Bytes.length (packed_msg) > s.max_message_size
then failwith ("Message size exceed maximum limit")
else skip;
var new_store : addr_set := set [];
case map_get (packed_msg, s.message_store) of [
Some (voters) ->
block {
if Set.mem (Tezos.sender, voters)
then skip
else
s.proposal_counters [Tezos.sender] :=
get_force (Tezos.sender, s.proposal_counters)
+ 1n;
new_store := Set.add (Tezos.sender, voters)
}
| None ->
block {
s.proposal_counters [sender] :=
get_force (Tezos.sender, s.proposal_counters) + 1n;
new_store := set [Tezos.sender]
}
];
var sender_proposal_counter : nat
:= get_force (Tezos.sender, s.proposal_counters);
if sender_proposal_counter > s.max_proposal
then failwith ("Maximum number of proposal reached")
else skip;
var ret_ops : list (operation) := nil;
if Set.cardinal (new_store) >= s.threshold
then {
remove packed_msg from map s.message_store;
ret_ops := message (s.state_hash);
s.state_hash :=
Crypto.sha256
(Bytes.concat (s.state_hash, packed_msg));
for addr -> ctr in map s.proposal_counters
block {
if Set.mem (addr, new_store)
then s.proposal_counters [addr] := abs (ctr - 1n)
else skip
}
}
else s.message_store [packed_msg] := new_store
} with (ret_ops, s)
function withdraw
(const param : withdraw_pt;
const s : storage) : return is
block {
var message : message := param;
const packed_msg : bytes = Bytes.pack (message);
case s.message_store [packed_msg] of [
Some (voters) ->
block {
const new_set : addr_set
= Set.remove (Tezos.sender, voters);
if Set.cardinal (voters) =/= Set.cardinal (new_set)
then
s.proposal_counters [Tezos.sender] :=
abs
(get_force (Tezos.sender, s.proposal_counters)
- 1n)
else skip;
if Set.cardinal (new_set) = 0n
then remove packed_msg from map s.message_store
else s.message_store [packed_msg] := new_set
}
| None -> skip
]
} with ((nil : list (operation)), s)
function default (const p : default_pt; const s : storage)
: return is ((nil : list (operation)), s)
function main (const param : parameter; const s : storage)
: return is
case param of [
Send (p) -> send (p, s)
| Withdraw (p) -> withdraw (p, s)
| Default (p) -> default (p, s)
]

View File

@ -0,0 +1,73 @@
type counter is nat
type threshold is nat
type authorized_keys is list (key)
type id is string
type storage is
record [
id : id;
counter : counter;
threshold : threshold;
auth : authorized_keys
]
type message is unit -> list (operation)
type signatures is list (key_hash * signature)
type check_message_pt is
record [
counter : counter;
message : message;
signatures : signatures
]
type return is list (operation) * storage
type parameter is CheckMessage of check_message_pt
function check_message
(const param : check_message_pt;
const s : storage) : return is
block {
var message : message := param.message;
if param.counter =/= s.counter
then failwith ("Counters does not match")
else {
const packed_payload : bytes
= Bytes.pack
((message, param.counter, s.id, Tezos.chain_id));
var valid : nat := 0n;
var keys : authorized_keys := s.auth;
for pkh_sig in list param.signatures
block {
case keys of [
nil -> skip
| key #
tl ->
block {
keys := tl;
if pkh_sig.0 = Crypto.hash_key (key)
then
if Crypto.check
(key, pkh_sig.1, packed_payload)
then valid := valid + 1n
else failwith ("Invalid signature")
else skip
}
]
};
if valid < s.threshold
then failwith ("Not enough signatures passed the check")
else s.counter := s.counter + 1n
}
} with (message (unit), s)
function main (const param : parameter; const s : storage)
: return is
case param of [
CheckMessage (p) -> check_message (p, s)
]

View File

@ -0,0 +1,12 @@
type foobar is option (int)
const s : foobar = Some (42)
const n : foobar = None
function assign (var m : int) : foobar is
block {
var coco : foobar := None;
coco := Some (m);
coco := (None : foobar)
} with coco

View File

@ -0,0 +1,3 @@
function foo (const input : int) : int is input + 42
function main (const i : int) : int is i + foo (i)

View File

@ -0,0 +1,5 @@
function foo (const input : int) : int is input + 23
function bar (const input : int) : int is input + 51
function main (const i : int) : int is foo (i) + bar (i)

View File

@ -0,0 +1,41 @@
type foobar is record [foo : int; bar : int]
const fb : foobar = record [foo = 0; bar = 0]
type abc is record [a : int; b : int; c : int]
const abc : abc = record [a = 42; b = 142; c = 242]
const a : int = abc.a
const b : int = abc.b
const c : int = abc.c
function projection (const r : foobar) : int is
r.foo + r.bar
function modify (var r : foobar) : foobar is
block {
r.foo := 256
} with r
function modify_abc (const r : abc) : abc is
block {
const c : int = 42;
r := r with record [b = 2048; c = c]
} with r
type big_record is
record [a : int; b : int; c : int; d : int; e : int]
const br : big_record
= record [a = 23; b = 23; c = 23; d = 23; e = 23]
type double_record is record [inner : abc]
function modify_inner (const r : double_record)
: double_record is
block {
r := r with record [inner.b = 2048]
} with r

View File

@ -0,0 +1,9 @@
recursive function sum (const n : int; const acc : int)
: int is if n < 1 then acc else sum (n - 1, acc + n)
recursive
function fibo
(const n : int;
const n_1 : int;
const n_0 : int) : int is
if n < 2 then n_1 else fibo (n - 1, n_1 + n_0, n_1)

View File

@ -0,0 +1,7 @@
function foo (const p : unit) : int is 0
function main (const p : unit; const s : int)
: list (operation) * int is
((nil : list (operation)), foo (unit))
function foo (const p : unit) : int is 1

View File

@ -0,0 +1,40 @@
type storage_t is address
type change_addr_pt is address
type message_t is list (operation)
type pass_message_pt is unit -> message_t
type contract_return_t is list (operation) * storage_t
type entry_point_t is
Change_address of change_addr_pt
| Pass_message of pass_message_pt
function change_address
(const param : change_addr_pt;
const s : storage_t) : contract_return_t is
block {
if sender =/= s
then failwith ("Unauthorized sender")
else skip
} with ((nil : list (operation)), param)
function pass_message
(const param : pass_message_pt;
const s : storage_t) : contract_return_t is
block {
if sender =/= s
then failwith ("Unauthorized sender")
else skip;
var message : pass_message_pt := param
} with (param (unit), s)
function main
(const param : entry_point_t;
const s : storage_t) : contract_return_t is
case param of [
Change_address (p) -> change_address (p, s)
| Pass_message (p) -> pass_message (p, s)
]

View File

@ -0,0 +1,2 @@
function main (const p : unit) : address is
Tezos.self_address

View File

@ -0,0 +1,12 @@
type parameter is nat
type storage is int
type return is list (operation) * storage
function main (const p : parameter; const s : storage)
: return is
block {
const self_contract : contract (parameter)
= Tezos.self ("%default")
} with ((nil : list (operation)), s)

View File

@ -0,0 +1,14 @@
type parameter is Default | Toto of int
type storage is nat
type return is list (operation) * storage
function main (const p : parameter; const s : storage)
: return is
block {
const self_contract : contract (int)
= Tezos.self ("%toto");
const op : operation
= Tezos.transaction (2, 300000000mutez, self_contract)
} with (list [op], s)

View File

@ -0,0 +1,14 @@
type parameter is int
type storage is nat
type return is list (operation) * storage
function main (const p : parameter; const s : storage)
: return is
block {
const self_contract : contract (int)
= Tezos.self ("%default");
const op : operation
= Tezos.transaction (2, 300000000mutez, self_contract)
} with (list [op], s)

View File

@ -0,0 +1,15 @@
function iter_op (const s : set (int)) : int is
block {
var r : int := 0;
function aggregate (const i : int) : unit is
block {
r := r + i
} with unit;
set_iter (aggregate, s)
} with r
function fold_op (const s : set (int)) : int is
block {
function aggregate (const i : int; const j : int) : int is
i + j
} with set_fold (aggregate, s, 15)

View File

@ -0,0 +1,35 @@
const s_e : set (string) = set_empty
const s_fb : set (string) = set ["foo"; "bar"]
function add_op (const s : set (string)) : set (string) is
set_add ("foobar", s)
function remove_op (const s : set (string))
: set (string) is set_remove ("foobar", s)
function remove_syntax (var s : set (string))
: set (string) is
block {
remove "foobar" from set s
} with s
function remove_deep (var s : set (string) * nat)
: set (string) * nat is
block {
remove "foobar" from set s.0
} with s
function patch_op (var s : set (string)) : set (string) is
block {
patch s with set ["foobar"]
} with s
function patch_op_deep (var s : set (string) * nat)
: set (string) * nat is
block {
patch s.0 with set ["foobar"]
} with s
function mem_op (const s : set (string)) : bool is
set_mem ("foobar", s)

View File

@ -0,0 +1,5 @@
function main (const p : key_hash) : list (operation) is
block {
const unused : operation = set_delegate (Some (p));
const dummy : list (operation) = nil
} with dummy

View File

@ -0,0 +1,4 @@
function foo (const i : int) : int is
block {
function bar (const i : int) : int is i
} with bar (0)

View File

@ -0,0 +1,19 @@
type tpi is int * int
type rpi is record [x : int; y : int]
type mpi is map (string, int)
function main (const toto : tpi) : int is
block {
var a : tpi := toto;
var b : rpi := record [x = 0; y = 1];
var m : mpi := map ["y" -> 1];
a.0 := 2;
b.x := a.0;
m ["x"] := b.x
} with
case m ["x"] of [
Some (s) -> s
| None -> 42
]

View File

@ -0,0 +1,7 @@
const s : string = "toto"
const x : string = s ^ "bar"
const y : string = "foo" ^ x
const v : string = {|deadbeef|}

View File

@ -0,0 +1,5 @@
function concat_op (const s : string) : string is
string_concat (s, "toto")
function slice_op (const s : string) : string is
string_slice (1n, 2n, s)

View File

@ -0,0 +1,12 @@
type action is Increment of int | Decrement of int
type storage is int
type return is list (operation) * storage
function main (const p : action; const s : int) : return is
((nil : list (operation)),
case p of [
Increment (n) -> s + n
| Decrement (n) -> s - n
])

View File

@ -0,0 +1,21 @@
const add_tez : tez = 21mutez + 21mutez
const sub_tez : tez = 21mutez - 20mutez
const not_enough_tez : tez = 4611686018427387903mutez
const nat_mul_tez : tez = 1n * 100mutez
const tez_mul_nat : tez = 100mutez * 10n
const tez_div_tez1 : nat = 100mutez / 1mutez
const tez_div_tez2 : nat = 100mutez / 90mutez
const tez_div_tez3 : nat = 100mutez / 110mutez
const tez_mod_tez1 : tez = 100mutez mod 1mutez
const tez_mod_tez2 : tez = 100mutez mod 90mutez
const tez_mod_tez3 : tez = 100mutez mod 110mutez

View File

@ -0,0 +1,34 @@
type storage_t is timestamp
type message_t is unit -> list (operation)
type default_pt is unit
type call_pt is message_t
type contract_return_t is list (operation) * storage_t
type entry_point_t is
Call of call_pt
| Default of default_pt
function call (const p : call_pt; const s : storage_t)
: contract_return_t is
block {
if s >= now
then failwith ("Contract is still time locked")
else skip;
const message : message_t = p;
const ret_ops : list (operation) = message (unit)
} with (ret_ops, s)
function default (const p : default_pt; const s : storage_t)
: contract_return_t is ((nil : list (operation)), s)
function main
(const param : entry_point_t;
const s : storage_t) : contract_return_t is
case param of [
Call (p) -> call (p, s)
| Default (p) -> default (p, s)
]

View File

@ -0,0 +1,5 @@
type storage_ is timestamp
function main (const p : unit; const s : storage_)
: list (operation) * storage_ is
((nil : list (operation)), now)

View File

@ -0,0 +1,3 @@
type toto is record [a : nat; b : nat]
const foo : int = 3

View File

@ -0,0 +1,27 @@
type abc is int * int * int
function projection_abc (const tpl : abc) : int is tpl.1
function modify_abc (const tpl : abc) : abc is
block {
tpl.1 := 2048
} with tpl
type foobar is int * int
const fb : foobar = (0, 0)
function projection (const tpl : foobar) : int is
tpl.0 + tpl.1
type big_tuple is
int * int * int * int * int * int * int * int * int *
int * int * int
const br : big_tuple
= (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
function update (const tpl : big_tuple) : big_tuple is
block {
tpl.11 := 2048
} with tpl

View File

@ -0,0 +1,3 @@
type toto is int
const foo : toto = 23

View File

@ -0,0 +1 @@
const u : unit = unit

View File

@ -0,0 +1,8 @@
type foobar is Foo of int | Bar of bool | Kee of nat
function fb (const p : foobar) : int is
case p of [
Foo (n) -> n
| Bar (t) -> 42
| Kee (n) -> 23
]

View File

@ -0,0 +1,7 @@
type foobar is Foo of int | Bar of bool | Kee of nat
const foo : foobar = Foo (42)
const bar : foobar = Bar (true)
const kee : foobar = Kee (23n)

View File

@ -0,0 +1,3 @@
function main (const p : int; const s : int)
: list (operation) * int is
((nil : list (operation)), s + 1)

View File

@ -0,0 +1,15 @@
type action is Increment of int | Decrement of int
type return is list (operation) * int
function add (const a : int; const b : int) : int is a + b
function subtract (const a : int; const b : int) : int is
a - b
function main (const p : action; const s : int) : return is
((nil : list (operation)),
case p of [
Increment (n) -> add (s, n)
| Decrement (n) -> subtract (s, n)
])