Reference › Commands › Import

Reference › Commands

Import

The command that reads other tools' files into arche-lang.

Commands: archec import

Command What it does
archec import <arche-project> [-o <dir>] An Arche project rewritten in arche-lang, built back and compared until it gives the project back exactly.
archec import <plant.fmu> [-o plant.arche] An FMU as a component whose behaviour it is, run in the simulation.
archec import <model.sysml> [-o out.arche] A SysML v2 textual model in arche-lang; what has no equivalent is kept as a // sysml line N: comment and a note.
archec import <bus.dbc> [-o bus.arche] A CAN DBC in arche-lang, as gen --target dbc writes it back: each frame a message with its wire format (start bit, length, byte order, sign, factor, offset, range, unit, value tables as enums, cycle time as period, comments as labels), each node a component with a port per frame and a processor on the bus, each frame a route at its CAN id. See importing.
archec import <types.asn> [more.asn…] [-o types.arche] ASN.1 type definitions (a subset) in arche-lang: each module a package, its IMPORTS found among the files given; SEQUENCE a struct (a message when no other type uses it), CHOICE a union, ENUMERATED an enum, INTEGER ranges, SIZE. See importing.
archec import <robot.urdf|scene.xml> [-o robot.arche] A robot from URDF or MuJoCo's MJCF (.xml by its <robot> or <mujoco> root): its bodies nested as parts with mass, shape and joint (what gen --target mujoco writes back), its actuators and sensors as kind actuator / kind sensor parts, a commands part sending to the actuators; what they do not say as prop records. MJCF's includes and default classes resolved, the first keyframe as each joint's start. What has no place is a // urdf: or // mjcf: comment and a note. The result is built at once. From MJCF, a sensor's noise and cutoff and an actuator's forcerange and filter are said as the ports' noise, range, force-range and lag, and each <key> is a keyframe of the system.
archec import <x.py|dir> [-o x.arche|dir] [--check | --checked-only] [--embedded-only] [--report r.json] [--option int=int32|int64] [--option float=float32|float64] [--option max=64] [--avoid dir] Python functions in the action language: each module a component, each function translated (embedded, embedded-bounded) or kept as a simulation-only fn bound to the .py; its doctests a test plan. --check compares each translation with the Python in the simulator, C and Rust, and keeps what disagrees in Python. See importing.
archec import <file> [--importer id] [-o out.arche|dir] [--option k=v]… [--allow-read dir]… [--project main.arche] A file of another tool through a plugin's importer: the one whose extensions end the name (a built-in importer keeps its own endings), or --importer. A script reads only the file's folder, its plugin's, the folders it declares with reads and --allow-read. What it returns is written — one file to -o x.arche or stdout, several into -o as a folder — and checked as archec build would; its warnings at the lines of the file. The plugins are those of --project, else of main.arche here, else the built-in ones and ./plugins (plugins).