Refactor get_uplc_type to account for constr types that don't exactly resolve to a uplc type
Check arg_stack in uplc generator has only 1 argument at the end of the generation
warning fixes
This commit is contained in:
microproofs 2024-04-25 16:55:01 +02:00 committed by Kasey
parent 1091eba3c3
commit fc0e88018e
37 changed files with 268 additions and 251 deletions

View File

@ -1470,19 +1470,21 @@ impl<'a> CodeGenerator<'a> {
match uplc_type { match uplc_type {
// primitives // primitives
UplcType::Integer Some(
| UplcType::String UplcType::Integer
| UplcType::Bool | UplcType::String
| UplcType::ByteString | UplcType::Bool
| UplcType::Unit | UplcType::ByteString
| UplcType::Bls12_381G1Element | UplcType::Unit
| UplcType::Bls12_381G2Element | UplcType::Bls12_381G1Element
| UplcType::Bls12_381MlResult => value, | UplcType::Bls12_381G2Element
| UplcType::Bls12_381MlResult,
) => value,
// Untyped Data // Untyped Data
UplcType::Data if tipo.is_data() => value, Some(UplcType::Data) => value,
// Map type // Map type
UplcType::List(_) if tipo.is_map() => { Some(UplcType::List(_)) if tipo.is_map() => {
assert!(!tipo.get_inner_types().is_empty()); assert!(!tipo.get_inner_types().is_empty());
let inner_list_type = &tipo.get_inner_types()[0]; let inner_list_type = &tipo.get_inner_types()[0];
@ -1565,7 +1567,7 @@ impl<'a> CodeGenerator<'a> {
AirTree::let_assignment(&map_name, value, func_call) AirTree::let_assignment(&map_name, value, func_call)
} }
// Tuple type // Tuple type
UplcType::List(_) if tipo.is_tuple() => { Some(UplcType::List(_)) if tipo.is_tuple() => {
let tuple_inner_types = tipo.get_inner_types(); let tuple_inner_types = tipo.get_inner_types();
assert!(!tuple_inner_types.is_empty()); assert!(!tuple_inner_types.is_empty());
@ -1610,7 +1612,7 @@ impl<'a> CodeGenerator<'a> {
AirTree::let_assignment(&tuple_name, value, tuple_access) AirTree::let_assignment(&tuple_name, value, tuple_access)
} }
// Regular List type // Regular List type
UplcType::List(_) => { Some(UplcType::List(_)) => {
assert!(!tipo.get_inner_types().is_empty()); assert!(!tipo.get_inner_types().is_empty());
let inner_list_type = &tipo.get_inner_types()[0]; let inner_list_type = &tipo.get_inner_types()[0];
@ -1686,7 +1688,7 @@ impl<'a> CodeGenerator<'a> {
} }
} }
// Pair type // Pair type
UplcType::Pair(_, _) => { Some(UplcType::Pair(_, _)) => {
let tuple_inner_types = tipo.get_inner_types(); let tuple_inner_types = tipo.get_inner_types();
assert!(tuple_inner_types.len() == 2); assert!(tuple_inner_types.len() == 2);
@ -1726,7 +1728,7 @@ impl<'a> CodeGenerator<'a> {
} }
// Constr type // Constr type
UplcType::Data => { None => {
let data_type = let data_type =
lookup_data_type_by_tipo(&self.data_types, tipo).unwrap_or_else(|| { lookup_data_type_by_tipo(&self.data_types, tipo).unwrap_or_else(|| {
unreachable!("We need a data type definition for type {:#?}", tipo) unreachable!("We need a data type definition for type {:#?}", tipo)
@ -4012,6 +4014,7 @@ impl<'a> CodeGenerator<'a> {
arg_stack.push(arg); arg_stack.push(arg);
} }
} }
assert!(arg_stack.len() == 1, "Expected one term on the stack");
arg_stack.pop().unwrap() arg_stack.pop().unwrap()
} }
@ -4544,60 +4547,63 @@ impl<'a> CodeGenerator<'a> {
BinOp::Or => left.delayed_if_then_else(Term::bool(true), right), BinOp::Or => left.delayed_if_then_else(Term::bool(true), right),
BinOp::Eq | BinOp::NotEq => { BinOp::Eq | BinOp::NotEq => {
let builtin = match &uplc_type { let builtin = match &uplc_type {
UplcType::Integer => Term::equals_integer(), Some(UplcType::Integer) => Term::equals_integer(),
UplcType::String => Term::equals_string(), Some(UplcType::String) => Term::equals_string(),
UplcType::ByteString => Term::equals_bytestring(), Some(UplcType::ByteString) => Term::equals_bytestring(),
UplcType::Bls12_381G1Element => Term::bls12_381_g1_equal(), Some(UplcType::Bls12_381G1Element) => Term::bls12_381_g1_equal(),
UplcType::Bls12_381G2Element => Term::bls12_381_g2_equal(), Some(UplcType::Bls12_381G2Element) => Term::bls12_381_g2_equal(),
UplcType::Bool | UplcType::Unit => Term::unit(), Some(UplcType::Bool | UplcType::Unit) => Term::unit(),
UplcType::List(_) | UplcType::Pair(_, _) | UplcType::Data => { Some(UplcType::List(_) | UplcType::Pair(_, _) | UplcType::Data)
Term::equals_data() | None => Term::equals_data(),
} Some(UplcType::Bls12_381MlResult) => {
UplcType::Bls12_381MlResult => {
panic!("ML Result equality is not supported") panic!("ML Result equality is not supported")
} }
}; };
let binop_eq = match uplc_type { let binop_eq =
UplcType::Bool => { match uplc_type {
if matches!(name, BinOp::Eq) { Some(UplcType::Bool) => {
left.delayed_if_then_else( if matches!(name, BinOp::Eq) {
right.clone(), left.delayed_if_then_else(
right.if_then_else(Term::bool(false), Term::bool(true)), right.clone(),
) right.if_then_else(Term::bool(false), Term::bool(true)),
} else { )
left.delayed_if_then_else( } else {
right left.delayed_if_then_else(
.clone() right
.if_then_else(Term::bool(false), Term::bool(true)), .clone()
right, .if_then_else(Term::bool(false), Term::bool(true)),
) right,
)
}
} }
} Some(UplcType::List(_)) if tipo.is_map() => builtin
UplcType::List(_) if tipo.is_map() => builtin .apply(Term::map_data().apply(left))
.apply(Term::map_data().apply(left)) .apply(Term::map_data().apply(right)),
.apply(Term::map_data().apply(right)), Some(UplcType::List(_)) => builtin
UplcType::List(_) => builtin .apply(Term::list_data().apply(left))
.apply(Term::list_data().apply(left)) .apply(Term::list_data().apply(right)),
.apply(Term::list_data().apply(right)), Some(UplcType::Pair(_, _)) => builtin
UplcType::Pair(_, _) => {
builtin
.apply(Term::map_data().apply( .apply(Term::map_data().apply(
Term::mk_cons().apply(left).apply(Term::empty_map()), Term::mk_cons().apply(left).apply(Term::empty_map()),
)) ))
.apply(Term::map_data().apply( .apply(Term::map_data().apply(
Term::mk_cons().apply(right).apply(Term::empty_map()), Term::mk_cons().apply(right).apply(Term::empty_map()),
)) )),
} Some(
UplcType::Data UplcType::Data
| UplcType::Bls12_381G1Element | UplcType::Bls12_381G1Element
| UplcType::Bls12_381G2Element | UplcType::Bls12_381G2Element
| UplcType::Bls12_381MlResult | UplcType::Bls12_381MlResult
| UplcType::Integer | UplcType::Integer
| UplcType::String | UplcType::String
| UplcType::ByteString => builtin.apply(left).apply(right), | UplcType::ByteString,
UplcType::Unit => left.choose_unit(right.choose_unit(Term::bool(true))), )
}; | None => builtin.apply(left).apply(right),
Some(UplcType::Unit) => {
left.choose_unit(right.choose_unit(Term::bool(true)))
}
};
if !tipo.is_bool() && matches!(name, BinOp::NotEq) { if !tipo.is_bool() && matches!(name, BinOp::NotEq) {
binop_eq.if_then_else(Term::bool(false), Term::bool(true)) binop_eq.if_then_else(Term::bool(false), Term::bool(true))
@ -4857,18 +4863,22 @@ impl<'a> CodeGenerator<'a> {
let uplc_type = tipo.get_uplc_type(); let uplc_type = tipo.get_uplc_type();
let subject = match uplc_type { let subject = match uplc_type {
UplcType::Bool Some(
| UplcType::Integer UplcType::Bool
| UplcType::String | UplcType::Integer
| UplcType::ByteString | UplcType::String
| UplcType::Unit | UplcType::ByteString
| UplcType::List(_) | UplcType::Unit
| UplcType::Pair(_, _) | UplcType::List(_)
| UplcType::Bls12_381G1Element | UplcType::Pair(_, _)
| UplcType::Bls12_381G2Element | UplcType::Bls12_381G1Element
| UplcType::Bls12_381MlResult => subject, | UplcType::Bls12_381G2Element
UplcType::Data if tipo.is_data() => subject, | UplcType::Bls12_381MlResult,
UplcType::Data => Term::var( ) => subject,
Some(UplcType::Data) => subject,
None => Term::var(
self.special_functions self.special_functions
.use_function_uplc(CONSTR_INDEX_EXPOSER.to_string()), .use_function_uplc(CONSTR_INDEX_EXPOSER.to_string()),
) )
@ -4916,28 +4926,30 @@ impl<'a> CodeGenerator<'a> {
let uplc_type = tipo.get_uplc_type(); let uplc_type = tipo.get_uplc_type();
let condition = match uplc_type { let condition = match uplc_type {
UplcType::Bool Some(
| UplcType::Unit UplcType::Bool
| UplcType::List(_) | UplcType::Unit
| UplcType::Pair(_, _) | UplcType::List(_)
| UplcType::Bls12_381MlResult => unreachable!("{:#?}", tipo), | UplcType::Pair(_, _)
UplcType::Integer => Term::equals_integer() | UplcType::Bls12_381MlResult,
) => unreachable!("{:#?}", tipo),
Some(UplcType::Data) => unimplemented!(),
Some(UplcType::Integer) => Term::equals_integer()
.apply(clause) .apply(clause)
.apply(Term::var(subject_name)), .apply(Term::var(subject_name)),
UplcType::String => Term::equals_string() Some(UplcType::String) => Term::equals_string()
.apply(clause) .apply(clause)
.apply(Term::var(subject_name)), .apply(Term::var(subject_name)),
UplcType::ByteString => Term::equals_bytestring() Some(UplcType::ByteString) => Term::equals_bytestring()
.apply(clause) .apply(clause)
.apply(Term::var(subject_name)), .apply(Term::var(subject_name)),
UplcType::Data if tipo.is_data() => unimplemented!(), Some(UplcType::Bls12_381G1Element) => Term::bls12_381_g1_equal()
UplcType::Data => Term::equals_integer()
.apply(clause) .apply(clause)
.apply(Term::var(subject_name)), .apply(Term::var(subject_name)),
UplcType::Bls12_381G1Element => Term::bls12_381_g1_equal() Some(UplcType::Bls12_381G2Element) => Term::bls12_381_g2_equal()
.apply(clause) .apply(clause)
.apply(Term::var(subject_name)), .apply(Term::var(subject_name)),
UplcType::Bls12_381G2Element => Term::bls12_381_g2_equal() None => Term::equals_integer()
.apply(clause) .apply(clause)
.apply(Term::var(subject_name)), .apply(Term::var(subject_name)),
}; };
@ -5084,35 +5096,36 @@ impl<'a> CodeGenerator<'a> {
let uplc_type = tipo.get_uplc_type(); let uplc_type = tipo.get_uplc_type();
let condition = match uplc_type { let condition = match uplc_type {
UplcType::Bool Some(
| UplcType::Unit UplcType::Bool
| UplcType::List(_) | UplcType::Unit
| UplcType::Pair(_, _) | UplcType::List(_)
| UplcType::Bls12_381MlResult => unreachable!("{:#?}", tipo), | UplcType::Pair(_, _)
UplcType::Integer => Term::equals_integer() | UplcType::Bls12_381MlResult,
) => unreachable!("{:#?}", tipo),
Some(UplcType::Data) => unimplemented!(),
Some(UplcType::Integer) => Term::equals_integer()
.apply(checker) .apply(checker)
.apply(Term::var(subject_name)), .apply(Term::var(subject_name)),
UplcType::String => Term::equals_string() Some(UplcType::String) => Term::equals_string()
.apply(checker) .apply(checker)
.apply(Term::var(subject_name)), .apply(Term::var(subject_name)),
UplcType::ByteString => Term::equals_bytestring() Some(UplcType::ByteString) => Term::equals_bytestring()
.apply(checker) .apply(checker)
.apply(Term::var(subject_name)), .apply(Term::var(subject_name)),
Some(UplcType::Bls12_381G1Element) => Term::bls12_381_g1_equal()
UplcType::Data if tipo.is_data() => unimplemented!(), .apply(checker)
UplcType::Data => Term::equals_integer().apply(checker).apply( .apply(Term::var(subject_name)),
Some(UplcType::Bls12_381G2Element) => Term::bls12_381_g2_equal()
.apply(checker)
.apply(Term::var(subject_name)),
None => Term::equals_integer().apply(checker).apply(
Term::var( Term::var(
self.special_functions self.special_functions
.use_function_uplc(CONSTR_INDEX_EXPOSER.to_string()), .use_function_uplc(CONSTR_INDEX_EXPOSER.to_string()),
) )
.apply(Term::var(subject_name)), .apply(Term::var(subject_name)),
), ),
UplcType::Bls12_381G1Element => Term::bls12_381_g1_equal()
.apply(checker)
.apply(Term::var(subject_name)),
UplcType::Bls12_381G2Element => Term::bls12_381_g2_equal()
.apply(checker)
.apply(Term::var(subject_name)),
}; };
Some(condition.if_then_else(then.delay(), term).force()) Some(condition.if_then_else(then.delay(), term).force())

View File

@ -362,22 +362,22 @@ pub fn get_generic_variant_name(t: &Rc<Type>) -> String {
let uplc_type = t.get_uplc_type(); let uplc_type = t.get_uplc_type();
match uplc_type { match uplc_type {
UplcType::Bool => "_bool".to_string(), Some(UplcType::Bool) => "_bool".to_string(),
UplcType::Integer => "_int".to_string(), Some(UplcType::Integer) => "_int".to_string(),
UplcType::String => "_string".to_string(), Some(UplcType::String) => "_string".to_string(),
UplcType::ByteString => "_bytearray".to_string(), Some(UplcType::ByteString) => "_bytearray".to_string(),
UplcType::Unit => "_void".to_string(), Some(UplcType::Unit) => "_void".to_string(),
UplcType::List(_) if t.is_map() => "_map".to_string(), Some(UplcType::List(_)) if t.is_map() => "_map".to_string(),
UplcType::List(_) => "_list".to_string(), Some(UplcType::List(_)) => "_list".to_string(),
UplcType::Pair(_, _) => "_pair".to_string(), Some(UplcType::Pair(_, _)) => "_pair".to_string(),
UplcType::Bls12_381G1Element => "_bls381_12_g1".to_string(), Some(UplcType::Bls12_381G1Element) => "_bls381_12_g1".to_string(),
UplcType::Bls12_381G2Element => "_bls381_12_g2".to_string(), Some(UplcType::Bls12_381G2Element) => "_bls381_12_g2".to_string(),
UplcType::Bls12_381MlResult => "_ml_result".to_string(), Some(UplcType::Bls12_381MlResult) => "_ml_result".to_string(),
UplcType::Data if t.is_unbound() => "_unbound".to_string(), None if t.is_unbound() => "_unbound".to_string(),
UplcType::Data if t.is_generic() => { None if t.is_generic() => {
unreachable!("FOUND A POLYMORPHIC TYPE. EXPECTED MONOMORPHIC TYPE") unreachable!("FOUND A POLYMORPHIC TYPE. EXPECTED MONOMORPHIC TYPE")
} }
UplcType::Data => "_data".to_string(), None | Some(UplcType::Data) => "_data".to_string(),
} }
} }
@ -943,29 +943,29 @@ pub fn known_data_to_type(term: Term<Name>, field_type: &Type) -> Term<Name> {
let uplc_type = field_type.get_uplc_type(); let uplc_type = field_type.get_uplc_type();
match uplc_type { match uplc_type {
UplcType::Integer => Term::un_i_data().apply(term), Some(UplcType::Integer) => Term::un_i_data().apply(term),
UplcType::ByteString => Term::un_b_data().apply(term), Some(UplcType::ByteString) => Term::un_b_data().apply(term),
UplcType::Bool => Term::less_than_integer() Some(UplcType::Bool) => Term::less_than_integer()
.apply(Term::integer(0.into())) .apply(Term::integer(0.into()))
.apply(Term::fst_pair().apply(Term::unconstr_data().apply(term))), .apply(Term::fst_pair().apply(Term::unconstr_data().apply(term))),
UplcType::String => Term::decode_utf8().apply(Term::un_b_data().apply(term)), Some(UplcType::String) => Term::decode_utf8().apply(Term::un_b_data().apply(term)),
UplcType::Unit => Term::unit().lambda("_").apply(term), Some(UplcType::Unit) => Term::unit().lambda("_").apply(term),
UplcType::List(_) if field_type.is_map() => Term::unmap_data().apply(term), Some(UplcType::List(_)) if field_type.is_map() => Term::unmap_data().apply(term),
UplcType::List(_) => Term::unlist_data().apply(term), Some(UplcType::List(_)) => Term::unlist_data().apply(term),
UplcType::Pair(_, _) => Term::mk_pair_data() Some(UplcType::Pair(_, _)) => Term::mk_pair_data()
.apply(Term::head_list().apply(Term::var("__list_data"))) .apply(Term::head_list().apply(Term::var("__list_data")))
.apply(Term::head_list().apply(Term::tail_list().apply(Term::var("__list_data")))) .apply(Term::head_list().apply(Term::tail_list().apply(Term::var("__list_data"))))
.lambda("__list_data") .lambda("__list_data")
.apply(Term::unlist_data().apply(term)), .apply(Term::unlist_data().apply(term)),
UplcType::Data if field_type.is_data() => term,
UplcType::Data => term, Some(UplcType::Bls12_381G1Element) => {
UplcType::Bls12_381G1Element => {
Term::bls12_381_g1_uncompress().apply(Term::un_b_data().apply(term)) Term::bls12_381_g1_uncompress().apply(Term::un_b_data().apply(term))
} }
UplcType::Bls12_381G2Element => { Some(UplcType::Bls12_381G2Element) => {
Term::bls12_381_g2_uncompress().apply(Term::un_b_data().apply(term)) Term::bls12_381_g2_uncompress().apply(Term::un_b_data().apply(term))
} }
UplcType::Bls12_381MlResult => panic!("ML Result not supported"), Some(UplcType::Bls12_381MlResult) => panic!("ML Result not supported"),
Some(UplcType::Data) | None => term,
} }
} }
@ -973,21 +973,21 @@ pub fn unknown_data_to_type(term: Term<Name>, field_type: &Type) -> Term<Name> {
let uplc_type = field_type.get_uplc_type(); let uplc_type = field_type.get_uplc_type();
match uplc_type { match uplc_type {
UplcType::Integer => Term::un_i_data().apply(term), Some(UplcType::Integer) => Term::un_i_data().apply(term),
UplcType::ByteString => Term::un_b_data().apply(term), Some(UplcType::ByteString) => Term::un_b_data().apply(term),
UplcType::String => Term::decode_utf8().apply(Term::un_b_data().apply(term)), Some(UplcType::String) => Term::decode_utf8().apply(Term::un_b_data().apply(term)),
UplcType::List(_) if field_type.is_map() => Term::unmap_data().apply(term), Some(UplcType::List(_)) if field_type.is_map() => Term::unmap_data().apply(term),
UplcType::List(_) => Term::unlist_data().apply(term), Some(UplcType::List(_)) => Term::unlist_data().apply(term),
UplcType::Data if field_type.is_data() => term,
UplcType::Data => term, Some(UplcType::Bls12_381G1Element) => {
UplcType::Bls12_381G1Element => {
Term::bls12_381_g1_uncompress().apply(Term::un_b_data().apply(term)) Term::bls12_381_g1_uncompress().apply(Term::un_b_data().apply(term))
} }
UplcType::Bls12_381G2Element => { Some(UplcType::Bls12_381G2Element) => {
Term::bls12_381_g2_uncompress().apply(Term::un_b_data().apply(term)) Term::bls12_381_g2_uncompress().apply(Term::un_b_data().apply(term))
} }
UplcType::Bls12_381MlResult => panic!("ML Result not supported"), Some(UplcType::Bls12_381MlResult) => panic!("ML Result not supported"),
UplcType::Pair(_, _) => Term::tail_list()
Some(UplcType::Pair(_, _)) => Term::tail_list()
.apply(Term::tail_list().apply(Term::var("__list_data"))) .apply(Term::tail_list().apply(Term::var("__list_data")))
.delayed_choose_list( .delayed_choose_list(
Term::mk_pair_data() Term::mk_pair_data()
@ -999,7 +999,7 @@ pub fn unknown_data_to_type(term: Term<Name>, field_type: &Type) -> Term<Name> {
) )
.lambda("__list_data") .lambda("__list_data")
.apply(Term::unlist_data().apply(term)), .apply(Term::unlist_data().apply(term)),
UplcType::Bool => Term::snd_pair() Some(UplcType::Bool) => Term::snd_pair()
.apply(Term::var("__pair__")) .apply(Term::var("__pair__"))
.delayed_choose_list( .delayed_choose_list(
Term::equals_integer() Term::equals_integer()
@ -1016,7 +1016,7 @@ pub fn unknown_data_to_type(term: Term<Name>, field_type: &Type) -> Term<Name> {
) )
.lambda("__pair__") .lambda("__pair__")
.apply(Term::unconstr_data().apply(term)), .apply(Term::unconstr_data().apply(term)),
UplcType::Unit => Term::equals_integer() Some(UplcType::Unit) => Term::equals_integer()
.apply(Term::integer(0.into())) .apply(Term::integer(0.into()))
.apply(Term::fst_pair().apply(Term::var("__pair__"))) .apply(Term::fst_pair().apply(Term::var("__pair__")))
.delayed_if_then_else( .delayed_if_then_else(
@ -1027,6 +1027,8 @@ pub fn unknown_data_to_type(term: Term<Name>, field_type: &Type) -> Term<Name> {
) )
.lambda("__pair__") .lambda("__pair__")
.apply(Term::unconstr_data().apply(term)), .apply(Term::unconstr_data().apply(term)),
Some(UplcType::Data) | None => term,
} }
} }
@ -1041,7 +1043,7 @@ pub fn unknown_data_to_type_debug(
let uplc_type = field_type.get_uplc_type(); let uplc_type = field_type.get_uplc_type();
match uplc_type { match uplc_type {
UplcType::Integer => Term::var("__val") Some(UplcType::Integer) => Term::var("__val")
.delayed_choose_data( .delayed_choose_data(
error_term.clone(), error_term.clone(),
error_term.clone(), error_term.clone(),
@ -1051,7 +1053,7 @@ pub fn unknown_data_to_type_debug(
) )
.lambda("__val") .lambda("__val")
.apply(term), .apply(term),
UplcType::ByteString => Term::var("__val") Some(UplcType::ByteString) => Term::var("__val")
.delayed_choose_data( .delayed_choose_data(
error_term.clone(), error_term.clone(),
error_term.clone(), error_term.clone(),
@ -1061,7 +1063,7 @@ pub fn unknown_data_to_type_debug(
) )
.lambda("__val") .lambda("__val")
.apply(term), .apply(term),
UplcType::String => Term::var("__val") Some(UplcType::String) => Term::var("__val")
.delayed_choose_data( .delayed_choose_data(
error_term.clone(), error_term.clone(),
error_term.clone(), error_term.clone(),
@ -1072,7 +1074,7 @@ pub fn unknown_data_to_type_debug(
.lambda("__val") .lambda("__val")
.apply(term), .apply(term),
UplcType::List(_) if field_type.is_map() => Term::var("__val") Some(UplcType::List(_)) if field_type.is_map() => Term::var("__val")
.delayed_choose_data( .delayed_choose_data(
error_term.clone(), error_term.clone(),
Term::unmap_data().apply(Term::var("__val")), Term::unmap_data().apply(Term::var("__val")),
@ -1082,7 +1084,7 @@ pub fn unknown_data_to_type_debug(
) )
.lambda("__val") .lambda("__val")
.apply(term), .apply(term),
UplcType::List(_) => Term::var("__val") Some(UplcType::List(_)) => Term::var("__val")
.delayed_choose_data( .delayed_choose_data(
error_term.clone(), error_term.clone(),
error_term.clone(), error_term.clone(),
@ -1092,19 +1094,8 @@ pub fn unknown_data_to_type_debug(
) )
.lambda("__val") .lambda("__val")
.apply(term), .apply(term),
UplcType::Data if field_type.is_data() => term,
// constr type Some(UplcType::Bls12_381G1Element) => Term::var("__val")
UplcType::Data => Term::var("__val")
.delayed_choose_data(
Term::var("__val"),
error_term.clone(),
error_term.clone(),
error_term.clone(),
error_term.clone(),
)
.lambda("__val")
.apply(term),
UplcType::Bls12_381G1Element => Term::var("__val")
.delayed_choose_data( .delayed_choose_data(
error_term.clone(), error_term.clone(),
error_term.clone(), error_term.clone(),
@ -1114,7 +1105,7 @@ pub fn unknown_data_to_type_debug(
) )
.lambda("__val") .lambda("__val")
.apply(term), .apply(term),
UplcType::Bls12_381G2Element => Term::var("__val") Some(UplcType::Bls12_381G2Element) => Term::var("__val")
.delayed_choose_data( .delayed_choose_data(
error_term.clone(), error_term.clone(),
error_term.clone(), error_term.clone(),
@ -1124,8 +1115,8 @@ pub fn unknown_data_to_type_debug(
) )
.lambda("__val") .lambda("__val")
.apply(term), .apply(term),
UplcType::Bls12_381MlResult => panic!("ML Result not supported"), Some(UplcType::Bls12_381MlResult) => panic!("ML Result not supported"),
UplcType::Pair(_, _) => Term::var("__val") Some(UplcType::Pair(_, _)) => Term::var("__val")
.delayed_choose_data( .delayed_choose_data(
error_term.clone(), error_term.clone(),
error_term.clone(), error_term.clone(),
@ -1156,7 +1147,7 @@ pub fn unknown_data_to_type_debug(
) )
.lambda("__val") .lambda("__val")
.apply(term), .apply(term),
UplcType::Bool => Term::var("__val") Some(UplcType::Bool) => Term::var("__val")
.delayed_choose_data( .delayed_choose_data(
Term::snd_pair() Term::snd_pair()
.apply(Term::var("__pair__")) .apply(Term::var("__pair__"))
@ -1182,7 +1173,7 @@ pub fn unknown_data_to_type_debug(
) )
.lambda("__val") .lambda("__val")
.apply(term), .apply(term),
UplcType::Unit => Term::var("__val") Some(UplcType::Unit) => Term::var("__val")
.delayed_choose_data( .delayed_choose_data(
Term::equals_integer() Term::equals_integer()
.apply(Term::integer(0.into())) .apply(Term::integer(0.into()))
@ -1200,6 +1191,19 @@ pub fn unknown_data_to_type_debug(
) )
.lambda("__val") .lambda("__val")
.apply(term), .apply(term),
Some(UplcType::Data) => term,
// constr type
None => Term::var("__val")
.delayed_choose_data(
Term::var("__val"),
error_term.clone(),
error_term.clone(),
error_term.clone(),
error_term.clone(),
)
.lambda("__val")
.apply(term),
} }
} }
@ -1294,21 +1298,20 @@ pub fn convert_type_to_data(term: Term<Name>, field_type: &Rc<Type>) -> Term<Nam
let uplc_type = field_type.get_uplc_type(); let uplc_type = field_type.get_uplc_type();
match uplc_type { match uplc_type {
UplcType::Integer => Term::i_data().apply(term), Some(UplcType::Integer) => Term::i_data().apply(term),
UplcType::String => Term::b_data().apply(Term::encode_utf8().apply(term)), Some(UplcType::String) => Term::b_data().apply(Term::encode_utf8().apply(term)),
UplcType::ByteString => Term::b_data().apply(term), Some(UplcType::ByteString) => Term::b_data().apply(term),
UplcType::List(_) if field_type.is_map() => Term::map_data().apply(term), Some(UplcType::List(_)) if field_type.is_map() => Term::map_data().apply(term),
UplcType::List(_) => Term::list_data().apply(term), Some(UplcType::List(_)) => Term::list_data().apply(term),
UplcType::Data if field_type.is_data() => term,
UplcType::Data => term, Some(UplcType::Bls12_381G1Element) => {
UplcType::Bls12_381G1Element => {
Term::b_data().apply(Term::bls12_381_g1_compress().apply(term)) Term::b_data().apply(Term::bls12_381_g1_compress().apply(term))
} }
UplcType::Bls12_381G2Element => { Some(UplcType::Bls12_381G2Element) => {
Term::b_data().apply(Term::bls12_381_g2_compress().apply(term)) Term::b_data().apply(Term::bls12_381_g2_compress().apply(term))
} }
UplcType::Bls12_381MlResult => panic!("ML Result not supported"), Some(UplcType::Bls12_381MlResult) => panic!("ML Result not supported"),
UplcType::Pair(_, _) => Term::list_data() Some(UplcType::Pair(_, _)) => Term::list_data()
.apply( .apply(
Term::mk_cons() Term::mk_cons()
.apply(Term::fst_pair().apply(Term::var("__pair"))) .apply(Term::fst_pair().apply(Term::var("__pair")))
@ -1320,7 +1323,7 @@ pub fn convert_type_to_data(term: Term<Name>, field_type: &Rc<Type>) -> Term<Nam
) )
.lambda("__pair") .lambda("__pair")
.apply(term), .apply(term),
UplcType::Unit => Term::Constant( Some(UplcType::Unit) => Term::Constant(
UplcConstant::Data(PlutusData::Constr(Constr { UplcConstant::Data(PlutusData::Constr(Constr {
tag: convert_constr_to_tag(0).unwrap(), tag: convert_constr_to_tag(0).unwrap(),
any_constructor: None, any_constructor: None,
@ -1330,7 +1333,7 @@ pub fn convert_type_to_data(term: Term<Name>, field_type: &Rc<Type>) -> Term<Nam
) )
.lambda("_") .lambda("_")
.apply(term), .apply(term),
UplcType::Bool => term.if_then_else( Some(UplcType::Bool) => term.if_then_else(
Term::Constant( Term::Constant(
UplcConstant::Data(PlutusData::Constr(Constr { UplcConstant::Data(PlutusData::Constr(Constr {
tag: convert_constr_to_tag(1).unwrap(), tag: convert_constr_to_tag(1).unwrap(),
@ -1348,6 +1351,8 @@ pub fn convert_type_to_data(term: Term<Name>, field_type: &Rc<Type>) -> Term<Nam
.into(), .into(),
), ),
), ),
Some(UplcType::Data) | None => term,
} }
} }
@ -1758,7 +1763,7 @@ pub fn get_list_elements_len_and_tail(
pub fn cast_validator_args(term: Term<Name>, arguments: &[TypedArg]) -> Term<Name> { pub fn cast_validator_args(term: Term<Name>, arguments: &[TypedArg]) -> Term<Name> {
let mut term = term; let mut term = term;
for arg in arguments.iter().rev() { for arg in arguments.iter().rev() {
if !matches!(arg.tipo.get_uplc_type(), UplcType::Data) { if !matches!(arg.tipo.get_uplc_type(), Some(UplcType::Data) | None) {
term = term term = term
.lambda(arg.arg_name.get_variable_name().unwrap_or("_")) .lambda(arg.arg_name.get_variable_name().unwrap_or("_"))
.apply(known_data_to_type( .apply(known_data_to_type(

View File

@ -8,10 +8,10 @@ use chumsky::prelude::*;
pub fn parser( pub fn parser(
r: Recursive<'_, Token, UntypedExpr, ParseError>, r: Recursive<'_, Token, UntypedExpr, ParseError>,
) -> impl Parser<Token, UntypedExpr, Error = ParseError> + '_ { ) -> impl Parser<Token, UntypedExpr, Error = ParseError> + '_ {
select! {Token::Name { name } if &name == PRELUDE => name} select! {Token::Name { name } if name == PRELUDE => name}
.then_ignore(just(Token::Dot)) .then_ignore(just(Token::Dot))
.or_not() .or_not()
.then_ignore(select! {Token::UpName { name } if &name == PAIR => name}) .then_ignore(select! {Token::UpName { name } if name == PAIR => name})
.ignore_then( .ignore_then(
r.clone() r.clone()
.separated_by(just(Token::Comma)) .separated_by(just(Token::Comma))

View File

@ -269,18 +269,20 @@ impl Type {
pub fn is_primitive(&self) -> bool { pub fn is_primitive(&self) -> bool {
let uplc_type = self.get_uplc_type(); let uplc_type = self.get_uplc_type();
match uplc_type { match uplc_type {
UplcType::Bool Some(
| UplcType::Integer UplcType::Bool
| UplcType::String | UplcType::Integer
| UplcType::ByteString | UplcType::String
| UplcType::Unit | UplcType::ByteString
| UplcType::Bls12_381G1Element | UplcType::Unit
| UplcType::Bls12_381G2Element | UplcType::Bls12_381G1Element
| UplcType::Bls12_381MlResult => true, | UplcType::Bls12_381G2Element
| UplcType::Bls12_381MlResult
| UplcType::Data,
) => true,
UplcType::Data if self.is_data() => true, None => false,
UplcType::Data => false, Some(UplcType::List(_) | UplcType::Pair(_, _)) => false,
UplcType::List(_) | UplcType::Pair(_, _) => false,
} }
} }
@ -472,7 +474,7 @@ impl Type {
Self::Var { tipo, .. } => tipo.borrow().get_inner_types(), Self::Var { tipo, .. } => tipo.borrow().get_inner_types(),
_ => vec![], _ => vec![],
} }
} else if matches!(self.get_uplc_type(), UplcType::Data) { } else if self.get_uplc_type().is_none() {
match self { match self {
Type::App { args, .. } => args.clone(), Type::App { args, .. } => args.clone(),
Type::Fn { args, ret, .. } => { Type::Fn { args, ret, .. } => {
@ -488,31 +490,35 @@ impl Type {
} }
} }
pub fn get_uplc_type(&self) -> UplcType { pub fn get_uplc_type(&self) -> Option<UplcType> {
if self.is_int() { if self.is_int() {
UplcType::Integer Some(UplcType::Integer)
} else if self.is_bytearray() { } else if self.is_bytearray() {
UplcType::ByteString Some(UplcType::ByteString)
} else if self.is_string() { } else if self.is_string() {
UplcType::String Some(UplcType::String)
} else if self.is_bool() { } else if self.is_bool() {
UplcType::Bool Some(UplcType::Bool)
} else if self.is_void() { } else if self.is_void() {
UplcType::Unit Some(UplcType::Unit)
} else if self.is_map() { } else if self.is_map() {
UplcType::List(UplcType::Pair(UplcType::Data.into(), UplcType::Data.into()).into()) Some(UplcType::List(
UplcType::Pair(UplcType::Data.into(), UplcType::Data.into()).into(),
))
} else if self.is_list() || self.is_tuple() { } else if self.is_list() || self.is_tuple() {
UplcType::List(UplcType::Data.into()) Some(UplcType::List(UplcType::Data.into()))
} else if self.is_pair() { } else if self.is_pair() {
UplcType::Pair(UplcType::Data.into(), UplcType::Data.into()) Some(UplcType::Pair(UplcType::Data.into(), UplcType::Data.into()))
} else if self.is_bls381_12_g1() { } else if self.is_bls381_12_g1() {
UplcType::Bls12_381G1Element Some(UplcType::Bls12_381G1Element)
} else if self.is_bls381_12_g2() { } else if self.is_bls381_12_g2() {
UplcType::Bls12_381G2Element Some(UplcType::Bls12_381G2Element)
} else if self.is_ml_result() { } else if self.is_ml_result() {
UplcType::Bls12_381MlResult Some(UplcType::Bls12_381MlResult)
} else if self.is_data() {
Some(UplcType::Data)
} else { } else {
UplcType::Data None
} }
} }
@ -1066,13 +1072,6 @@ impl TypeVar {
} }
} }
} }
pub fn get_uplc_type(&self) -> Option<UplcType> {
match self {
Self::Link { tipo } => Some(tipo.get_uplc_type()),
_ => None,
}
}
} }
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463885, nanos_since_epoch = 953327000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055767, nanos_since_epoch = 971886000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -5,7 +5,7 @@
"plutusVersion": "v2", "plutusVersion": "v2",
"compiler": { "compiler": {
"name": "Aiken", "name": "Aiken",
"version": "v1.0.26-alpha+4d36884" "version": "v1.0.26-alpha+821d869"
} }
}, },
"validators": [ "validators": [

View File

@ -5,7 +5,7 @@
"plutusVersion": "v2", "plutusVersion": "v2",
"compiler": { "compiler": {
"name": "Aiken", "name": "Aiken",
"version": "v1.0.26-alpha+4d36884" "version": "v1.0.26-alpha+821d869"
} }
}, },
"validators": [ "validators": [

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463884, nanos_since_epoch = 765100000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055769, nanos_since_epoch = 606310000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463888, nanos_since_epoch = 383357000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055769, nanos_since_epoch = 886756000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463890, nanos_since_epoch = 965623000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055768, nanos_since_epoch = 494960000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463887, nanos_since_epoch = 961778000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055765, nanos_since_epoch = 138956000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463902, nanos_since_epoch = 215633000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055779, nanos_since_epoch = 84463000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463897, nanos_since_epoch = 385755000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055769, nanos_since_epoch = 870599000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463893, nanos_since_epoch = 847358000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055768, nanos_since_epoch = 584957000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463886, nanos_since_epoch = 284148000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055766, nanos_since_epoch = 525538000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463884, nanos_since_epoch = 163138000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055773, nanos_since_epoch = 519699000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -5,7 +5,7 @@
"plutusVersion": "v2", "plutusVersion": "v2",
"compiler": { "compiler": {
"name": "Aiken", "name": "Aiken",
"version": "v1.0.26-alpha+4d36884" "version": "v1.0.26-alpha+821d869"
} }
}, },
"validators": [ "validators": [

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463896, nanos_since_epoch = 514093000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055769, nanos_since_epoch = 196556000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463896, nanos_since_epoch = 410684000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055775, nanos_since_epoch = 337191000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463899, nanos_since_epoch = 4921000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055766, nanos_since_epoch = 404145000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463884, nanos_since_epoch = 166567000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055769, nanos_since_epoch = 438366000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -5,7 +5,7 @@
"plutusVersion": "v2", "plutusVersion": "v2",
"compiler": { "compiler": {
"name": "Aiken", "name": "Aiken",
"version": "v1.0.26-alpha+4d36884" "version": "v1.0.26-alpha+821d869"
} }
}, },
"validators": [ "validators": [

View File

@ -5,7 +5,7 @@
"plutusVersion": "v2", "plutusVersion": "v2",
"compiler": { "compiler": {
"name": "Aiken", "name": "Aiken",
"version": "v1.0.26-alpha+4d36884" "version": "v1.0.26-alpha+821d869"
} }
}, },
"validators": [ "validators": [

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463891, nanos_since_epoch = 684027000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055779, nanos_since_epoch = 824042000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463887, nanos_since_epoch = 129564000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055774, nanos_since_epoch = 480306000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@specialize-dict-key" = [{ secs_since_epoch = 1713463739, nanos_since_epoch = 865019000 }, "4a03ebbbc134cedfe1bf03b59d5ed476f4dd97a769dc259552a9086e786bb108"] "aiken-lang/stdlib@specialize-dict-key" = [{ secs_since_epoch = 1714055775, nanos_since_epoch = 582445000 }, "4a03ebbbc134cedfe1bf03b59d5ed476f4dd97a769dc259552a9086e786bb108"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463893, nanos_since_epoch = 54580000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055768, nanos_since_epoch = 799533000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -5,7 +5,7 @@
"plutusVersion": "v2", "plutusVersion": "v2",
"compiler": { "compiler": {
"name": "Aiken", "name": "Aiken",
"version": "v1.0.26-alpha+4d36884" "version": "v1.0.26-alpha+821d869"
} }
}, },
"validators": [ "validators": [

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@specialize-dict-key" = [{ secs_since_epoch = 1713463624, nanos_since_epoch = 244261000 }, "4a03ebbbc134cedfe1bf03b59d5ed476f4dd97a769dc259552a9086e786bb108"] "aiken-lang/stdlib@specialize-dict-key" = [{ secs_since_epoch = 1714055770, nanos_since_epoch = 469989000 }, "4a03ebbbc134cedfe1bf03b59d5ed476f4dd97a769dc259552a9086e786bb108"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1713463884, nanos_since_epoch = 866338000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1714055766, nanos_since_epoch = 449700000 }, "2a710731e0127ec3e21c6c3962a0254c98602e7428b33fc4fcaa67ab368ce1b1"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@specialize-dict-key" = [{ secs_since_epoch = 1713463713, nanos_since_epoch = 938757000 }, "4a03ebbbc134cedfe1bf03b59d5ed476f4dd97a769dc259552a9086e786bb108"] "aiken-lang/stdlib@specialize-dict-key" = [{ secs_since_epoch = 1714055778, nanos_since_epoch = 453151000 }, "4a03ebbbc134cedfe1bf03b59d5ed476f4dd97a769dc259552a9086e786bb108"]

View File

@ -5,7 +5,7 @@
"plutusVersion": "v2", "plutusVersion": "v2",
"compiler": { "compiler": {
"name": "Aiken", "name": "Aiken",
"version": "v1.0.26-alpha+4d36884" "version": "v1.0.26-alpha+821d869"
} }
}, },
"validators": [ "validators": [

View File

@ -5,7 +5,7 @@
"plutusVersion": "v2", "plutusVersion": "v2",
"compiler": { "compiler": {
"name": "Aiken", "name": "Aiken",
"version": "v1.0.26-alpha+4d36884" "version": "v1.0.26-alpha+821d869"
} }
}, },
"validators": [ "validators": [

View File

@ -6,7 +6,7 @@
"plutusVersion": "v2", "plutusVersion": "v2",
"compiler": { "compiler": {
"name": "Aiken", "name": "Aiken",
"version": "v1.0.26-alpha+4d36884" "version": "v1.0.26-alpha+821d869"
}, },
"license": "Apache-2.0" "license": "Apache-2.0"
}, },

View File

@ -3,15 +3,15 @@
exit_codes=() exit_codes=()
TESTS=() TESTS=()
# for scenario in $(find . -maxdepth 1 -mindepth 1 -type d ! -name script_context); do for scenario in $(find . -maxdepth 1 -mindepth 1 -type d ! -name script_context); do
# ./run $scenario & ./run $scenario &
# TESTS+=("$!") TESTS+=("$!")
# done done
#
# for p in ${TESTS[@]}; do for p in ${TESTS[@]}; do
# wait $p wait $p
# exit_codes+=("$?") exit_codes+=("$?")
# done done
for interaction in $(find script_context/validators -type f); do for interaction in $(find script_context/validators -type f); do

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@specialize-dict-key" = [{ secs_since_epoch = 1713463977, nanos_since_epoch = 479564000 }, "4a03ebbbc134cedfe1bf03b59d5ed476f4dd97a769dc259552a9086e786bb108"] "aiken-lang/stdlib@specialize-dict-key" = [{ secs_since_epoch = 1714055683, nanos_since_epoch = 673729000 }, "4a03ebbbc134cedfe1bf03b59d5ed476f4dd97a769dc259552a9086e786bb108"]

View File

@ -5,7 +5,7 @@
"plutusVersion": "v2", "plutusVersion": "v2",
"compiler": { "compiler": {
"name": "Aiken", "name": "Aiken",
"version": "v1.0.26-alpha+4d36884" "version": "v1.0.26-alpha+821d869"
} }
}, },
"validators": [ "validators": [