public void FakeImportDirectResponse(TMessage message, Principal server, Principal client) { ImportDirectResponse(true, message, null, server, client); }
static string EmitPrincipalHandleOrNondet(Principal p) => (p == null) ? "SVX.VProgram_API.Nondet<SVX.Principal>()" : EmitPrincipalHandle(p);
// TODO: client needs to tie in to some ambient "current principal" variable private void ImportDirectResponse(bool fake, TMessage message, Action modelAction, Principal server, Principal client) { Import(fake, message, modelAction, server, server, client); }
public void ImportDirectResponseWithModel(TMessage message, Action modelAction, Principal server, Principal client) { ImportDirectResponse(false, message, modelAction, server, client); }
/* The modelAction is called after any configured payload tokens/secrets * have been extracted but before any SymT processing. It should use * fake operations (SVX_Ops.FakeCall, MessageStructure.Fake*) to fill in * the SymTs of the message being imported and any relevant nested * messages to represent the path assumed to have been taken to produce * their data. * * (Emphasis on "assumed"! Even if we have faithful models of all * participants, proving that the assumed path is the only path that * reaches the import is in general a whole-protocol verification * problem. Since such proofs require a very different style of * reasoning than normal use of SVX, we are not attempting to extend the * SVX framework to provide any help with them at this time. So in the * worst case, the use of models with an assumed path severely weakens * the assurance that SVX provides.) */ public void ImportWithModel(TMessage message, Action modelAction, Principal producer, Principal sender) { Import(false, message, modelAction, producer, sender, null); }
public void FakeImport(TMessage message, Principal producer, Principal sender) { Import(true, message, null, producer, sender, null); }
} // Happens even if fake. internal virtual void Import(TMessage message, Principal producer, Principal sender) { }
public void FakeExportDirectResponse(TMessage message, Principal requestProducer) { Export(true, message, null, null, requestProducer); }
// For cleanliness in serialization, provide a separate API so that // message.SVX_placeholderRequestProducer is only set when we expect the // receiver to use it. public void ExportDirectResponse(TMessage message, Principal receiver, Principal requestProducer) { Export(false, message, receiver, null, requestProducer); }
public void Export(TMessage message, Principal receiver, Principal target) { Export(false, message, receiver, target, null); }
internal virtual void Export(TMessage message, Principal receiver, Principal target) { }