|
| 1 | +// SONARE: Runtime environment for formally-verifiable distributed software |
| 2 | +// |
| 3 | +// SPDX-License-Identifier: Apache-2.0 |
| 4 | +// |
| 5 | +// Designed in 2019-2024 by Dr Maxim Orlovsky <[email protected]> |
| 6 | +// Written in 2024-2025 by Dr Maxim Orlovsky <[email protected]> |
| 7 | +// |
| 8 | +// Copyright (C) 2019-2025 LNP/BP Standards Association, Switzerland. |
| 9 | +// Copyright (C) 2024-2025 Laboratories for Ubiquitous Deterministic Computing (UBIDECO), |
| 10 | +// Institute for Distributed and Cognitive Systems (InDCS), Switzerland. |
| 11 | +// Copyright (C) 2019-2025 Dr Maxim Orlovsky. |
| 12 | +// All rights under the above copyrights are reserved. |
| 13 | +// |
| 14 | +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
| 15 | +// in compliance with the License. You may obtain a copy of the License at |
| 16 | +// |
| 17 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 18 | +// |
| 19 | +// Unless required by applicable law or agreed to in writing, software distributed under the License |
| 20 | +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
| 21 | +// or implied. See the License for the specific language governing permissions and limitations under |
| 22 | +// the License. |
| 23 | + |
| 24 | +use aluvm::LibSite; |
| 25 | + |
| 26 | +use super::{ApiVm, ApiVmType, StateArithm}; |
| 27 | +use crate::state::StructData; |
| 28 | + |
| 29 | +impl ApiVm for aluvm::Vm { |
| 30 | + const TYPE: ApiVmType = ApiVmType::AluVM; |
| 31 | + type Arithm = AluVMArithm; |
| 32 | + type ReaderSite = LibSite; |
| 33 | + type AdaptorSite = LibSite; |
| 34 | +} |
| 35 | + |
| 36 | +pub struct AluVMArithm { |
| 37 | + pub vm: Option<aluvm::Vm>, |
| 38 | + pub accumulate: LibSite, |
| 39 | + pub lessen: LibSite, |
| 40 | + pub diff: LibSite, |
| 41 | +} |
| 42 | + |
| 43 | +impl StateArithm for AluVMArithm { |
| 44 | + type Site = LibSite; |
| 45 | + |
| 46 | + fn measure(&self, state: StructData) -> Option<u8> { todo!() } |
| 47 | + |
| 48 | + fn accumulate(&mut self, state: StructData) -> Option<()> { todo!() } |
| 49 | + |
| 50 | + fn lessen(&mut self, state: StructData) -> Option<()> { todo!() } |
| 51 | + |
| 52 | + fn diff(&self) -> Option<StructData> { todo!() } |
| 53 | +} |
0 commit comments